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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (571) hide show
  1. package/LICENSE +102 -5
  2. package/dist/lib/neutral/add-artifact-4IVGW6CI.mjs +30 -0
  3. package/dist/lib/neutral/add-artifact-4IVGW6CI.mjs.map +7 -0
  4. package/dist/lib/neutral/agent-F4L7UXME.mjs +65 -0
  5. package/dist/lib/neutral/agent-F4L7UXME.mjs.map +7 -0
  6. package/dist/lib/neutral/chunk-5GPL2WXU.mjs +292 -0
  7. package/dist/lib/neutral/chunk-5GPL2WXU.mjs.map +7 -0
  8. package/dist/lib/neutral/chunk-7UCYAP3T.mjs +332 -0
  9. package/dist/lib/neutral/chunk-7UCYAP3T.mjs.map +7 -0
  10. package/dist/lib/neutral/chunk-ANSF2BHN.mjs +67 -0
  11. package/dist/lib/neutral/chunk-ANSF2BHN.mjs.map +7 -0
  12. package/dist/lib/neutral/chunk-BCT55UTL.mjs +75 -0
  13. package/dist/lib/neutral/chunk-BCT55UTL.mjs.map +7 -0
  14. package/dist/lib/neutral/chunk-COL54UJ3.mjs +60 -0
  15. package/dist/lib/neutral/chunk-COL54UJ3.mjs.map +7 -0
  16. package/dist/lib/neutral/chunk-EJAQUAKM.mjs +73 -0
  17. package/dist/lib/neutral/chunk-EJAQUAKM.mjs.map +7 -0
  18. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  19. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
  20. package/dist/lib/neutral/chunk-KGU725LW.mjs +29 -0
  21. package/dist/lib/neutral/chunk-KGU725LW.mjs.map +7 -0
  22. package/dist/lib/neutral/chunk-KS3IA6FQ.mjs +101 -0
  23. package/dist/lib/neutral/chunk-KS3IA6FQ.mjs.map +7 -0
  24. package/dist/lib/neutral/chunk-MMQ7HFL4.mjs +107 -0
  25. package/dist/lib/neutral/chunk-MMQ7HFL4.mjs.map +7 -0
  26. package/dist/lib/neutral/chunk-NR3GTWRC.mjs +53 -0
  27. package/dist/lib/neutral/chunk-NR3GTWRC.mjs.map +7 -0
  28. package/dist/lib/neutral/chunk-PLGEBNTO.mjs +65 -0
  29. package/dist/lib/neutral/chunk-PLGEBNTO.mjs.map +7 -0
  30. package/dist/lib/neutral/chunk-W2722TC5.mjs +70 -0
  31. package/dist/lib/neutral/chunk-W2722TC5.mjs.map +7 -0
  32. package/dist/lib/neutral/chunk-WLR3BGO4.mjs +25 -0
  33. package/dist/lib/neutral/chunk-WLR3BGO4.mjs.map +7 -0
  34. package/dist/lib/neutral/chunk-ZFXLTBZG.mjs +73 -0
  35. package/dist/lib/neutral/chunk-ZFXLTBZG.mjs.map +7 -0
  36. package/dist/lib/neutral/context-add-S5MBW2NA.mjs +22 -0
  37. package/dist/lib/neutral/context-add-S5MBW2NA.mjs.map +7 -0
  38. package/dist/lib/neutral/context-remove-35O5T5N5.mjs +22 -0
  39. package/dist/lib/neutral/context-remove-35O5T5N5.mjs.map +7 -0
  40. package/dist/lib/neutral/create-project-3AGXJ4TD.mjs +35 -0
  41. package/dist/lib/neutral/create-project-3AGXJ4TD.mjs.map +7 -0
  42. package/dist/lib/neutral/delete-J3PMWP7Z.mjs +19 -0
  43. package/dist/lib/neutral/delete-J3PMWP7Z.mjs.map +7 -0
  44. package/dist/lib/neutral/enable-blueprints-IVKST3WH.mjs +47 -0
  45. package/dist/lib/neutral/enable-blueprints-IVKST3WH.mjs.map +7 -0
  46. package/dist/lib/neutral/fetch-KHMHV7JR.mjs +16 -0
  47. package/dist/lib/neutral/fetch-KHMHV7JR.mjs.map +7 -0
  48. package/dist/lib/neutral/fetch-messages-QOBBCTGC.mjs +139 -0
  49. package/dist/lib/neutral/fetch-messages-QOBBCTGC.mjs.map +7 -0
  50. package/dist/lib/neutral/get-context-FBYWIP72.mjs +35 -0
  51. package/dist/lib/neutral/get-context-FBYWIP72.mjs.map +7 -0
  52. package/dist/lib/neutral/index.mjs +914 -0
  53. package/dist/lib/neutral/index.mjs.map +7 -0
  54. package/dist/lib/neutral/load-GAT3T2AD.mjs +17 -0
  55. package/dist/lib/neutral/load-GAT3T2AD.mjs.map +7 -0
  56. package/dist/lib/neutral/meta.json +1 -0
  57. package/dist/lib/neutral/object-create-PL3WRP74.mjs +35 -0
  58. package/dist/lib/neutral/object-create-PL3WRP74.mjs.map +7 -0
  59. package/dist/lib/neutral/object-delete-PZJQN5KW.mjs +18 -0
  60. package/dist/lib/neutral/object-delete-PZJQN5KW.mjs.map +7 -0
  61. package/dist/lib/neutral/object-update-R43N3VJX.mjs +28 -0
  62. package/dist/lib/neutral/object-update-R43N3VJX.mjs.map +7 -0
  63. package/dist/lib/neutral/project-VVXXUMAI.mjs +23 -0
  64. package/dist/lib/neutral/project-VVXXUMAI.mjs.map +7 -0
  65. package/dist/lib/neutral/project-rules-KSVSOZJV.mjs +78 -0
  66. package/dist/lib/neutral/project-rules-KSVSOZJV.mjs.map +7 -0
  67. package/dist/lib/neutral/prompt-INL55Q2B.mjs +170 -0
  68. package/dist/lib/neutral/prompt-INL55Q2B.mjs.map +7 -0
  69. package/dist/lib/neutral/qualifier-DAF4H7V3.mjs +88 -0
  70. package/dist/lib/neutral/qualifier-DAF4H7V3.mjs.map +7 -0
  71. package/dist/lib/neutral/query-MP5NSQKO.mjs +69 -0
  72. package/dist/lib/neutral/query-MP5NSQKO.mjs.map +7 -0
  73. package/dist/lib/neutral/query-U56GNEV6.mjs +32 -0
  74. package/dist/lib/neutral/query-U56GNEV6.mjs.map +7 -0
  75. package/dist/lib/neutral/query-blueprints-PLWYVOI3.mjs +16 -0
  76. package/dist/lib/neutral/query-blueprints-PLWYVOI3.mjs.map +7 -0
  77. package/dist/lib/neutral/relation-create-YAAAFTR2.mjs +34 -0
  78. package/dist/lib/neutral/relation-create-YAAAFTR2.mjs.map +7 -0
  79. package/dist/lib/neutral/relation-delete-IEPKERFR.mjs +18 -0
  80. package/dist/lib/neutral/relation-delete-IEPKERFR.mjs.map +7 -0
  81. package/dist/lib/neutral/save-GWAPLT3Z.mjs +23 -0
  82. package/dist/lib/neutral/save-GWAPLT3Z.mjs.map +7 -0
  83. package/dist/lib/neutral/schema-add-5BNIINRS.mjs +24 -0
  84. package/dist/lib/neutral/schema-add-5BNIINRS.mjs.map +7 -0
  85. package/dist/lib/neutral/schema-list-54UK7S4R.mjs +38 -0
  86. package/dist/lib/neutral/schema-list-54UK7S4R.mjs.map +7 -0
  87. package/dist/lib/neutral/sync-issues-DWY76B3M.mjs +166 -0
  88. package/dist/lib/neutral/sync-issues-DWY76B3M.mjs.map +7 -0
  89. package/dist/lib/neutral/sync-triggers-NOIQLELD.mjs +135 -0
  90. package/dist/lib/neutral/sync-triggers-NOIQLELD.mjs.map +7 -0
  91. package/dist/lib/neutral/tag-add-NLVRGTC6.mjs +19 -0
  92. package/dist/lib/neutral/tag-add-NLVRGTC6.mjs.map +7 -0
  93. package/dist/lib/neutral/tag-remove-N4HFBIA2.mjs +19 -0
  94. package/dist/lib/neutral/tag-remove-N4HFBIA2.mjs.map +7 -0
  95. package/dist/lib/neutral/testing/index.mjs +76 -0
  96. package/dist/lib/neutral/testing/index.mjs.map +7 -0
  97. package/dist/lib/neutral/update-blueprints-2SNK6HLG.mjs +16 -0
  98. package/dist/lib/neutral/update-blueprints-2SNK6HLG.mjs.map +7 -0
  99. package/dist/lib/neutral/update-tasks-QQUR53RN.mjs +13 -0
  100. package/dist/lib/neutral/update-tasks-QQUR53RN.mjs.map +7 -0
  101. package/dist/types/src/blueprints/automation/blueprint.d.ts +4 -0
  102. package/dist/types/src/blueprints/automation/blueprint.d.ts.map +1 -0
  103. package/dist/types/src/blueprints/automation/index.d.ts +2 -0
  104. package/dist/types/src/blueprints/automation/index.d.ts.map +1 -0
  105. package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts +4 -0
  106. package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts.map +1 -0
  107. package/dist/types/src/blueprints/blueprint-manager/blueprint.test.d.ts +2 -0
  108. package/dist/types/src/blueprints/blueprint-manager/blueprint.test.d.ts.map +1 -0
  109. package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts +61 -0
  110. package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts.map +1 -0
  111. package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts +36 -0
  112. package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts.map +1 -0
  113. package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts +4 -0
  114. package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts.map +1 -0
  115. package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts +27 -0
  116. package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts.map +1 -0
  117. package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts +4 -0
  118. package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts.map +1 -0
  119. package/dist/types/src/blueprints/blueprint-manager/index.d.ts +3 -0
  120. package/dist/types/src/blueprints/blueprint-manager/index.d.ts.map +1 -0
  121. package/dist/types/src/blueprints/browser/blueprint.d.ts +4 -0
  122. package/dist/types/src/blueprints/browser/blueprint.d.ts.map +1 -0
  123. package/dist/types/src/blueprints/browser/blueprint.test.d.ts +2 -0
  124. package/dist/types/src/blueprints/browser/blueprint.test.d.ts.map +1 -0
  125. package/dist/types/src/blueprints/browser/index.d.ts +2 -0
  126. package/dist/types/src/blueprints/browser/index.d.ts.map +1 -0
  127. package/dist/types/src/blueprints/database/blueprint.d.ts +4 -0
  128. package/dist/types/src/blueprints/database/blueprint.d.ts.map +1 -0
  129. package/dist/types/src/blueprints/database/blueprint.test.d.ts +2 -0
  130. package/dist/types/src/blueprints/database/blueprint.test.d.ts.map +1 -0
  131. package/dist/types/src/blueprints/database/functions/context-add.d.ts +7 -0
  132. package/dist/types/src/blueprints/database/functions/context-add.d.ts.map +1 -0
  133. package/dist/types/src/blueprints/database/functions/context-remove.d.ts +7 -0
  134. package/dist/types/src/blueprints/database/functions/context-remove.d.ts.map +1 -0
  135. package/dist/types/src/blueprints/database/functions/definitions.d.ts +59 -0
  136. package/dist/types/src/blueprints/database/functions/definitions.d.ts.map +1 -0
  137. package/dist/types/src/blueprints/database/functions/index.d.ts +4 -0
  138. package/dist/types/src/blueprints/database/functions/index.d.ts.map +1 -0
  139. package/dist/types/src/blueprints/database/functions/load.d.ts +7 -0
  140. package/dist/types/src/blueprints/database/functions/load.d.ts.map +1 -0
  141. package/dist/types/src/blueprints/database/functions/object-create.d.ts +8 -0
  142. package/dist/types/src/blueprints/database/functions/object-create.d.ts.map +1 -0
  143. package/dist/types/src/blueprints/database/functions/object-delete.d.ts +7 -0
  144. package/dist/types/src/blueprints/database/functions/object-delete.d.ts.map +1 -0
  145. package/dist/types/src/blueprints/database/functions/object-update.d.ts +10 -0
  146. package/dist/types/src/blueprints/database/functions/object-update.d.ts.map +1 -0
  147. package/dist/types/src/blueprints/database/functions/query.d.ts +12 -0
  148. package/dist/types/src/blueprints/database/functions/query.d.ts.map +1 -0
  149. package/dist/types/src/blueprints/database/functions/relation-create.d.ts +10 -0
  150. package/dist/types/src/blueprints/database/functions/relation-create.d.ts.map +1 -0
  151. package/dist/types/src/blueprints/database/functions/relation-delete.d.ts +7 -0
  152. package/dist/types/src/blueprints/database/functions/relation-delete.d.ts.map +1 -0
  153. package/dist/types/src/blueprints/database/functions/schema-add.d.ts +9 -0
  154. package/dist/types/src/blueprints/database/functions/schema-add.d.ts.map +1 -0
  155. package/dist/types/src/blueprints/database/functions/schema-list.d.ts +7 -0
  156. package/dist/types/src/blueprints/database/functions/schema-list.d.ts.map +1 -0
  157. package/dist/types/src/blueprints/database/functions/tag-add.d.ts +8 -0
  158. package/dist/types/src/blueprints/database/functions/tag-add.d.ts.map +1 -0
  159. package/dist/types/src/blueprints/database/functions/tag-remove.d.ts +8 -0
  160. package/dist/types/src/blueprints/database/functions/tag-remove.d.ts.map +1 -0
  161. package/dist/types/src/blueprints/database/index.d.ts +3 -0
  162. package/dist/types/src/blueprints/database/index.d.ts.map +1 -0
  163. package/dist/types/src/blueprints/discord/blueprint.d.ts +4 -0
  164. package/dist/types/src/blueprints/discord/blueprint.d.ts.map +1 -0
  165. package/dist/types/src/blueprints/discord/functions/definitions.d.ts +15 -0
  166. package/dist/types/src/blueprints/discord/functions/definitions.d.ts.map +1 -0
  167. package/dist/types/src/{functions/discord → blueprints/discord/functions}/fetch-messages.d.ts +3 -2
  168. package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts.map +1 -0
  169. package/dist/types/src/blueprints/discord/functions/fetch-messages.test.d.ts.map +1 -0
  170. package/dist/types/src/blueprints/discord/functions/index.d.ts +4 -0
  171. package/dist/types/src/blueprints/discord/functions/index.d.ts.map +1 -0
  172. package/dist/types/src/blueprints/discord/index.d.ts +2 -2
  173. package/dist/types/src/blueprints/discord/index.d.ts.map +1 -1
  174. package/dist/types/src/blueprints/github/functions/definitions.d.ts +7 -0
  175. package/dist/types/src/blueprints/github/functions/definitions.d.ts.map +1 -0
  176. package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts +8 -0
  177. package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts.map +1 -0
  178. package/dist/types/src/blueprints/github/functions/index.d.ts +4 -0
  179. package/dist/types/src/blueprints/github/functions/index.d.ts.map +1 -0
  180. package/dist/types/src/blueprints/github/index.d.ts +2 -0
  181. package/dist/types/src/blueprints/github/index.d.ts.map +1 -0
  182. package/dist/types/src/blueprints/index.d.ts +11 -6
  183. package/dist/types/src/blueprints/index.d.ts.map +1 -1
  184. package/dist/types/src/blueprints/linear/blueprint.d.ts +4 -0
  185. package/dist/types/src/blueprints/linear/blueprint.d.ts.map +1 -0
  186. package/dist/types/src/blueprints/linear/functions/definitions.d.ts +6 -0
  187. package/dist/types/src/blueprints/linear/functions/definitions.d.ts.map +1 -0
  188. package/dist/types/src/blueprints/linear/functions/index.d.ts +4 -0
  189. package/dist/types/src/blueprints/linear/functions/index.d.ts.map +1 -0
  190. package/dist/types/src/blueprints/linear/functions/linear.test.d.ts.map +1 -0
  191. package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts +10 -0
  192. package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts.map +1 -0
  193. package/dist/types/src/blueprints/linear/index.d.ts +2 -2
  194. package/dist/types/src/blueprints/linear/index.d.ts.map +1 -1
  195. package/dist/types/src/blueprints/memory/blueprint.d.ts +4 -0
  196. package/dist/types/src/blueprints/memory/blueprint.d.ts.map +1 -0
  197. package/dist/types/src/blueprints/memory/blueprint.test.d.ts +2 -0
  198. package/dist/types/src/blueprints/memory/blueprint.test.d.ts.map +1 -0
  199. package/dist/types/src/blueprints/memory/functions/definitions.d.ts +17 -0
  200. package/dist/types/src/blueprints/memory/functions/definitions.d.ts.map +1 -0
  201. package/dist/types/src/blueprints/memory/functions/delete.d.ts +10 -0
  202. package/dist/types/src/blueprints/memory/functions/delete.d.ts.map +1 -0
  203. package/dist/types/src/blueprints/memory/functions/index.d.ts +4 -0
  204. package/dist/types/src/blueprints/memory/functions/index.d.ts.map +1 -0
  205. package/dist/types/src/blueprints/memory/functions/query.d.ts +8 -0
  206. package/dist/types/src/blueprints/memory/functions/query.d.ts.map +1 -0
  207. package/dist/types/src/blueprints/memory/functions/save.d.ts +8 -0
  208. package/dist/types/src/blueprints/memory/functions/save.d.ts.map +1 -0
  209. package/dist/types/src/blueprints/memory/index.d.ts +3 -0
  210. package/dist/types/src/blueprints/memory/index.d.ts.map +1 -0
  211. package/dist/types/src/blueprints/planning/blueprint.d.ts +4 -0
  212. package/dist/types/src/blueprints/planning/blueprint.d.ts.map +1 -0
  213. package/dist/types/src/blueprints/planning/functions/index.d.ts +4 -0
  214. package/dist/types/src/blueprints/planning/functions/index.d.ts.map +1 -0
  215. package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts +24 -0
  216. package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts.map +1 -0
  217. package/dist/types/src/blueprints/planning/functions/update-tasks.test.d.ts +2 -0
  218. package/dist/types/src/blueprints/planning/functions/update-tasks.test.d.ts.map +1 -0
  219. package/dist/types/src/blueprints/planning/index.d.ts +2 -2
  220. package/dist/types/src/blueprints/planning/index.d.ts.map +1 -1
  221. package/dist/types/src/blueprints/project/blueprint.d.ts +4 -0
  222. package/dist/types/src/blueprints/project/blueprint.d.ts.map +1 -0
  223. package/dist/types/src/blueprints/project/blueprint.test.d.ts +2 -0
  224. package/dist/types/src/blueprints/project/blueprint.test.d.ts.map +1 -0
  225. package/dist/types/src/blueprints/project/functions/add-artifact.d.ts +4 -0
  226. package/dist/types/src/blueprints/project/functions/add-artifact.d.ts.map +1 -0
  227. package/dist/types/src/blueprints/project/functions/agent.d.ts +4 -0
  228. package/dist/types/src/blueprints/project/functions/agent.d.ts.map +1 -0
  229. package/dist/types/src/blueprints/project/functions/definitions.d.ts +166 -0
  230. package/dist/types/src/blueprints/project/functions/definitions.d.ts.map +1 -0
  231. package/dist/types/src/blueprints/project/functions/get-context.d.ts +4 -0
  232. package/dist/types/src/blueprints/project/functions/get-context.d.ts.map +1 -0
  233. package/dist/types/src/blueprints/project/functions/index.d.ts +4 -0
  234. package/dist/types/src/blueprints/project/functions/index.d.ts.map +1 -0
  235. package/dist/types/src/blueprints/project/functions/qualifier.d.ts +77 -0
  236. package/dist/types/src/blueprints/project/functions/qualifier.d.ts.map +1 -0
  237. package/dist/types/src/blueprints/project/index.d.ts +3 -0
  238. package/dist/types/src/blueprints/project/index.d.ts.map +1 -0
  239. package/dist/types/src/blueprints/project-wizard/blueprint.d.ts +4 -0
  240. package/dist/types/src/blueprints/project-wizard/blueprint.d.ts.map +1 -0
  241. package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts +55 -0
  242. package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts.map +1 -0
  243. package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts +104 -0
  244. package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts.map +1 -0
  245. package/dist/types/src/blueprints/project-wizard/functions/index.d.ts +4 -0
  246. package/dist/types/src/blueprints/project-wizard/functions/index.d.ts.map +1 -0
  247. package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts +4 -0
  248. package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts.map +1 -0
  249. package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts +52 -0
  250. package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts.map +1 -0
  251. package/dist/types/src/blueprints/project-wizard/index.d.ts +3 -0
  252. package/dist/types/src/blueprints/project-wizard/index.d.ts.map +1 -0
  253. package/dist/types/src/blueprints/testing.d.ts +9 -5
  254. package/dist/types/src/blueprints/testing.d.ts.map +1 -1
  255. package/dist/types/src/blueprints/websearch/blueprint.d.ts +4 -0
  256. package/dist/types/src/blueprints/websearch/blueprint.d.ts.map +1 -0
  257. package/dist/types/src/blueprints/websearch/blueprint.test.d.ts +2 -0
  258. package/dist/types/src/blueprints/websearch/blueprint.test.d.ts.map +1 -0
  259. package/dist/types/src/blueprints/websearch/functions/definitions.d.ts +5 -0
  260. package/dist/types/src/blueprints/websearch/functions/definitions.d.ts.map +1 -0
  261. package/dist/types/src/blueprints/websearch/functions/fetch.d.ts +6 -0
  262. package/dist/types/src/blueprints/websearch/functions/fetch.d.ts.map +1 -0
  263. package/dist/types/src/blueprints/websearch/functions/index.d.ts +4 -0
  264. package/dist/types/src/blueprints/websearch/functions/index.d.ts.map +1 -0
  265. package/dist/types/src/blueprints/websearch/index.d.ts +3 -3
  266. package/dist/types/src/blueprints/websearch/index.d.ts.map +1 -1
  267. package/dist/types/src/blueprints/websearch/{websearch-toolkit.d.ts → toolkit.d.ts} +4 -1
  268. package/dist/types/src/blueprints/websearch/toolkit.d.ts.map +1 -0
  269. package/dist/types/src/{functions/research → crud}/graph.d.ts +12 -11
  270. package/dist/types/src/crud/graph.d.ts.map +1 -0
  271. package/dist/types/src/crud/graph.test.d.ts.map +1 -0
  272. package/dist/types/src/crud/index.d.ts +2 -0
  273. package/dist/types/src/crud/index.d.ts.map +1 -0
  274. package/dist/types/src/errors.d.ts +41 -0
  275. package/dist/types/src/errors.d.ts.map +1 -0
  276. package/dist/types/src/functions/agent/definitions.d.ts +61 -0
  277. package/dist/types/src/functions/agent/definitions.d.ts.map +1 -0
  278. package/dist/types/src/functions/agent/index.d.ts +3 -4
  279. package/dist/types/src/functions/agent/index.d.ts.map +1 -1
  280. package/dist/types/src/functions/agent/prompt.d.ts +2 -9
  281. package/dist/types/src/functions/agent/prompt.d.ts.map +1 -1
  282. package/dist/types/src/functions/agent/prompt.test.d.ts +2 -0
  283. package/dist/types/src/functions/agent/prompt.test.d.ts.map +1 -0
  284. package/dist/types/src/functions/index.d.ts +0 -6
  285. package/dist/types/src/functions/index.d.ts.map +1 -1
  286. package/dist/types/src/index.d.ts +3 -1
  287. package/dist/types/src/index.d.ts.map +1 -1
  288. package/dist/types/src/sync/sync.d.ts +3 -4
  289. package/dist/types/src/sync/sync.d.ts.map +1 -1
  290. package/dist/types/src/testing/index.d.ts +2 -1
  291. package/dist/types/src/testing/index.d.ts.map +1 -1
  292. package/dist/types/src/testing/plugins.d.ts +19 -0
  293. package/dist/types/src/testing/plugins.d.ts.map +1 -0
  294. package/dist/types/src/toolkits/WebToolkit.d.ts +38 -0
  295. package/dist/types/src/toolkits/WebToolkit.d.ts.map +1 -0
  296. package/dist/types/src/toolkits/index.d.ts +2 -0
  297. package/dist/types/src/toolkits/index.d.ts.map +1 -0
  298. package/dist/types/src/types/Agent.d.ts +79 -0
  299. package/dist/types/src/types/Agent.d.ts.map +1 -0
  300. package/dist/types/src/types/Chat.d.ts +56 -0
  301. package/dist/types/src/types/Chat.d.ts.map +1 -0
  302. package/dist/types/src/types/McpServer.d.ts +21 -0
  303. package/dist/types/src/types/McpServer.d.ts.map +1 -0
  304. package/dist/types/src/types/Memory.d.ts +12 -0
  305. package/dist/types/src/types/Memory.d.ts.map +1 -0
  306. package/dist/types/src/types/Plan.d.ts +89 -0
  307. package/dist/types/src/types/Plan.d.ts.map +1 -0
  308. package/dist/types/src/types/index.d.ts +6 -0
  309. package/dist/types/src/types/index.d.ts.map +1 -0
  310. package/dist/types/src/util/graphql.d.ts.map +1 -1
  311. package/dist/types/tsconfig.tsbuildinfo +1 -1
  312. package/package.json +46 -39
  313. package/src/blueprints/automation/blueprint.ts +105 -0
  314. package/src/blueprints/automation/index.ts +5 -0
  315. package/src/blueprints/blueprint-manager/blueprint.conversations.json +1 -0
  316. package/src/blueprints/blueprint-manager/blueprint.test.ts +202 -0
  317. package/src/blueprints/blueprint-manager/blueprint.ts +49 -0
  318. package/src/blueprints/blueprint-manager/functions/definitions.ts +57 -0
  319. package/src/blueprints/blueprint-manager/functions/enable-blueprints.ts +43 -0
  320. package/src/blueprints/blueprint-manager/functions/index.ts +13 -0
  321. package/src/blueprints/blueprint-manager/functions/query-blueprints.ts +18 -0
  322. package/src/blueprints/blueprint-manager/functions/update-blueprints.ts +18 -0
  323. package/src/blueprints/blueprint-manager/index.ts +6 -0
  324. package/src/blueprints/browser/blueprint.test.ts +61 -0
  325. package/src/blueprints/browser/blueprint.ts +40 -0
  326. package/src/blueprints/browser/index.ts +5 -0
  327. package/src/blueprints/database/blueprint.conversations.json +1 -0
  328. package/src/blueprints/database/blueprint.test.ts +531 -0
  329. package/src/blueprints/database/blueprint.ts +66 -0
  330. package/src/blueprints/database/functions/context-add.ts +24 -0
  331. package/src/blueprints/database/functions/context-remove.ts +24 -0
  332. package/src/blueprints/database/functions/definitions.ts +318 -0
  333. package/src/blueprints/database/functions/index.ts +23 -0
  334. package/src/blueprints/database/functions/load.ts +19 -0
  335. package/src/blueprints/database/functions/object-create.ts +38 -0
  336. package/src/blueprints/database/functions/object-delete.ts +20 -0
  337. package/src/blueprints/database/functions/object-update.ts +30 -0
  338. package/src/blueprints/database/functions/query.ts +63 -0
  339. package/src/blueprints/database/functions/relation-create.ts +34 -0
  340. package/src/blueprints/database/functions/relation-delete.ts +21 -0
  341. package/src/blueprints/database/functions/schema-add.ts +28 -0
  342. package/src/blueprints/database/functions/schema-list.ts +33 -0
  343. package/src/blueprints/database/functions/tag-add.ts +21 -0
  344. package/src/blueprints/database/functions/tag-remove.ts +21 -0
  345. package/src/blueprints/database/index.ts +21 -0
  346. package/src/blueprints/discord/blueprint.ts +41 -0
  347. package/src/blueprints/discord/functions/definitions.ts +70 -0
  348. package/src/blueprints/discord/functions/fetch-messages.test.ts +50 -0
  349. package/src/blueprints/discord/functions/fetch-messages.ts +198 -0
  350. package/src/blueprints/discord/functions/index.ts +9 -0
  351. package/src/blueprints/discord/index.ts +2 -3
  352. package/src/blueprints/github/functions/definitions.ts +26 -0
  353. package/src/blueprints/github/functions/fetch-prs.ts +24 -0
  354. package/src/blueprints/github/functions/index.ts +9 -0
  355. package/src/blueprints/github/index.ts +5 -0
  356. package/src/blueprints/index.ts +11 -6
  357. package/src/blueprints/linear/blueprint.ts +42 -0
  358. package/src/blueprints/linear/functions/definitions.ts +23 -0
  359. package/src/blueprints/linear/functions/index.ts +9 -0
  360. package/src/blueprints/linear/functions/linear.test.ts +57 -0
  361. package/src/{functions/linear → blueprints/linear/functions}/sync-issues.ts +44 -51
  362. package/src/blueprints/linear/index.ts +2 -3
  363. package/src/blueprints/memory/blueprint.conversations.json +1 -0
  364. package/src/blueprints/memory/blueprint.test.ts +139 -0
  365. package/src/blueprints/memory/blueprint.ts +41 -0
  366. package/src/blueprints/memory/functions/definitions.ts +68 -0
  367. package/src/blueprints/memory/functions/delete.ts +20 -0
  368. package/src/blueprints/memory/functions/index.ts +13 -0
  369. package/src/blueprints/memory/functions/query.ts +32 -0
  370. package/src/blueprints/memory/functions/save.ts +20 -0
  371. package/src/blueprints/memory/index.ts +6 -0
  372. package/src/blueprints/planning/blueprint.ts +24 -0
  373. package/src/blueprints/planning/functions/index.ts +9 -0
  374. package/src/blueprints/planning/functions/update-tasks.md +116 -0
  375. package/src/blueprints/planning/functions/update-tasks.test.ts +55 -0
  376. package/src/blueprints/planning/functions/update-tasks.ts +67 -0
  377. package/src/blueprints/planning/index.ts +3 -4
  378. package/src/blueprints/project/blueprint.conversations.json +1 -0
  379. package/src/blueprints/project/blueprint.test.ts +712 -0
  380. package/src/blueprints/project/blueprint.ts +64 -0
  381. package/src/blueprints/project/functions/add-artifact.ts +31 -0
  382. package/src/blueprints/project/functions/agent.ts +69 -0
  383. package/src/blueprints/project/functions/definitions.ts +92 -0
  384. package/src/blueprints/project/functions/get-context.ts +47 -0
  385. package/src/blueprints/project/functions/index.ts +14 -0
  386. package/src/blueprints/project/functions/qualifier.ts +90 -0
  387. package/src/blueprints/project/index.ts +6 -0
  388. package/src/blueprints/project-wizard/blueprint.ts +52 -0
  389. package/src/blueprints/project-wizard/functions/create-project.ts +32 -0
  390. package/src/blueprints/project-wizard/functions/definitions.ts +63 -0
  391. package/src/blueprints/project-wizard/functions/index.ts +13 -0
  392. package/src/blueprints/project-wizard/functions/project-rules.ts +77 -0
  393. package/src/blueprints/project-wizard/functions/sync-triggers.ts +153 -0
  394. package/src/blueprints/project-wizard/index.ts +6 -0
  395. package/src/blueprints/testing.ts +29 -8
  396. package/src/blueprints/websearch/blueprint.conversations.json +1 -0
  397. package/src/blueprints/websearch/blueprint.test.ts +39 -0
  398. package/src/blueprints/websearch/blueprint.ts +30 -0
  399. package/src/blueprints/websearch/functions/definitions.ts +25 -0
  400. package/src/blueprints/websearch/functions/fetch.ts +18 -0
  401. package/src/blueprints/websearch/functions/index.ts +9 -0
  402. package/src/blueprints/websearch/index.ts +3 -4
  403. package/src/blueprints/websearch/{websearch-toolkit.ts → toolkit.ts} +6 -1
  404. package/src/crud/graph.test.ts +44 -0
  405. package/src/crud/graph.ts +378 -0
  406. package/src/crud/index.ts +5 -0
  407. package/src/errors.ts +25 -0
  408. package/src/functions/READ_THIS.md +5 -0
  409. package/src/functions/agent/definitions.ts +56 -0
  410. package/src/functions/agent/index.ts +3 -5
  411. package/src/functions/agent/prompt.conversations.json +1 -0
  412. package/src/functions/agent/prompt.test.ts +78 -0
  413. package/src/functions/agent/prompt.ts +210 -87
  414. package/src/functions/index.ts +0 -6
  415. package/src/index.ts +3 -1
  416. package/src/sync/sync.ts +52 -34
  417. package/src/testing/index.ts +2 -1
  418. package/src/testing/plugins.tsx +79 -0
  419. package/src/toolkits/WebToolkit.ts +33 -0
  420. package/src/toolkits/index.ts +5 -0
  421. package/src/types/Agent.ts +238 -0
  422. package/src/types/Chat.ts +63 -0
  423. package/src/types/McpServer.ts +37 -0
  424. package/src/types/Memory.ts +24 -0
  425. package/src/types/Plan.ts +111 -0
  426. package/src/types/index.ts +9 -0
  427. package/dist/lib/browser/index.mjs +0 -2481
  428. package/dist/lib/browser/index.mjs.map +0 -7
  429. package/dist/lib/browser/meta.json +0 -1
  430. package/dist/lib/node-esm/index.mjs +0 -2483
  431. package/dist/lib/node-esm/index.mjs.map +0 -7
  432. package/dist/lib/node-esm/meta.json +0 -1
  433. package/dist/types/src/blueprints/design/design-blueprint.d.ts +0 -4
  434. package/dist/types/src/blueprints/design/design-blueprint.d.ts.map +0 -1
  435. package/dist/types/src/blueprints/design/design-blueprint.test.d.ts +0 -2
  436. package/dist/types/src/blueprints/design/design-blueprint.test.d.ts.map +0 -1
  437. package/dist/types/src/blueprints/design/index.d.ts +0 -3
  438. package/dist/types/src/blueprints/design/index.d.ts.map +0 -1
  439. package/dist/types/src/blueprints/discord/discord-blueprint.d.ts +0 -18
  440. package/dist/types/src/blueprints/discord/discord-blueprint.d.ts.map +0 -1
  441. package/dist/types/src/blueprints/linear/linear-blueprint.d.ts +0 -18
  442. package/dist/types/src/blueprints/linear/linear-blueprint.d.ts.map +0 -1
  443. package/dist/types/src/blueprints/planning/planning-blueprint.d.ts +0 -4
  444. package/dist/types/src/blueprints/planning/planning-blueprint.d.ts.map +0 -1
  445. package/dist/types/src/blueprints/planning/planning-blueprint.test.d.ts +0 -2
  446. package/dist/types/src/blueprints/planning/planning-blueprint.test.d.ts.map +0 -1
  447. package/dist/types/src/blueprints/research/index.d.ts +0 -3
  448. package/dist/types/src/blueprints/research/index.d.ts.map +0 -1
  449. package/dist/types/src/blueprints/research/research-blueprint.d.ts +0 -4
  450. package/dist/types/src/blueprints/research/research-blueprint.d.ts.map +0 -1
  451. package/dist/types/src/blueprints/research/research-blueprint.test.d.ts +0 -2
  452. package/dist/types/src/blueprints/research/research-blueprint.test.d.ts.map +0 -1
  453. package/dist/types/src/blueprints/websearch/websearch-blueprint.d.ts +0 -4
  454. package/dist/types/src/blueprints/websearch/websearch-blueprint.d.ts.map +0 -1
  455. package/dist/types/src/blueprints/websearch/websearch-toolkit.d.ts.map +0 -1
  456. package/dist/types/src/experimental/feed.test.d.ts +0 -2
  457. package/dist/types/src/experimental/feed.test.d.ts.map +0 -1
  458. package/dist/types/src/functions/discord/fetch-messages.d.ts.map +0 -1
  459. package/dist/types/src/functions/discord/fetch-messages.test.d.ts.map +0 -1
  460. package/dist/types/src/functions/discord/index.d.ts +0 -12
  461. package/dist/types/src/functions/discord/index.d.ts.map +0 -1
  462. package/dist/types/src/functions/document/index.d.ts +0 -12
  463. package/dist/types/src/functions/document/index.d.ts.map +0 -1
  464. package/dist/types/src/functions/document/read.d.ts +0 -7
  465. package/dist/types/src/functions/document/read.d.ts.map +0 -1
  466. package/dist/types/src/functions/document/update.d.ts +0 -6
  467. package/dist/types/src/functions/document/update.d.ts.map +0 -1
  468. package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts +0 -173
  469. package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts.map +0 -1
  470. package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts +0 -2
  471. package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts.map +0 -1
  472. package/dist/types/src/functions/entity-extraction/index.d.ts +0 -174
  473. package/dist/types/src/functions/entity-extraction/index.d.ts.map +0 -1
  474. package/dist/types/src/functions/exa/exa.d.ts +0 -5
  475. package/dist/types/src/functions/exa/exa.d.ts.map +0 -1
  476. package/dist/types/src/functions/exa/index.d.ts +0 -3
  477. package/dist/types/src/functions/exa/index.d.ts.map +0 -1
  478. package/dist/types/src/functions/exa/mock.d.ts +0 -5
  479. package/dist/types/src/functions/exa/mock.d.ts.map +0 -1
  480. package/dist/types/src/functions/github/fetch-prs.d.ts +0 -6
  481. package/dist/types/src/functions/github/fetch-prs.d.ts.map +0 -1
  482. package/dist/types/src/functions/linear/index.d.ts +0 -9
  483. package/dist/types/src/functions/linear/index.d.ts.map +0 -1
  484. package/dist/types/src/functions/linear/linear.test.d.ts.map +0 -1
  485. package/dist/types/src/functions/linear/sync-issues.d.ts +0 -12
  486. package/dist/types/src/functions/linear/sync-issues.d.ts.map +0 -1
  487. package/dist/types/src/functions/research/create-document.d.ts +0 -7
  488. package/dist/types/src/functions/research/create-document.d.ts.map +0 -1
  489. package/dist/types/src/functions/research/graph.d.ts.map +0 -1
  490. package/dist/types/src/functions/research/graph.test.d.ts.map +0 -1
  491. package/dist/types/src/functions/research/index.d.ts +0 -19
  492. package/dist/types/src/functions/research/index.d.ts.map +0 -1
  493. package/dist/types/src/functions/research/research-graph.d.ts +0 -18
  494. package/dist/types/src/functions/research/research-graph.d.ts.map +0 -1
  495. package/dist/types/src/functions/research/research.d.ts +0 -13
  496. package/dist/types/src/functions/research/research.d.ts.map +0 -1
  497. package/dist/types/src/functions/research/research.test.d.ts +0 -2
  498. package/dist/types/src/functions/research/research.test.d.ts.map +0 -1
  499. package/dist/types/src/functions/research/types.d.ts +0 -384
  500. package/dist/types/src/functions/research/types.d.ts.map +0 -1
  501. package/dist/types/src/functions/tasks/index.d.ts +0 -15
  502. package/dist/types/src/functions/tasks/index.d.ts.map +0 -1
  503. package/dist/types/src/functions/tasks/read.d.ts +0 -7
  504. package/dist/types/src/functions/tasks/read.d.ts.map +0 -1
  505. package/dist/types/src/functions/tasks/task-list.d.ts +0 -74
  506. package/dist/types/src/functions/tasks/task-list.d.ts.map +0 -1
  507. package/dist/types/src/functions/tasks/task-list.test.d.ts +0 -2
  508. package/dist/types/src/functions/tasks/task-list.test.d.ts.map +0 -1
  509. package/dist/types/src/functions/tasks/update.d.ts +0 -9
  510. package/dist/types/src/functions/tasks/update.d.ts.map +0 -1
  511. package/dist/types/src/plugins.d.ts +0 -19
  512. package/dist/types/src/plugins.d.ts.map +0 -1
  513. package/dist/types/src/testing/data/exa-search-1748337321991.d.ts +0 -38
  514. package/dist/types/src/testing/data/exa-search-1748337321991.d.ts.map +0 -1
  515. package/dist/types/src/testing/data/exa-search-1748337331526.d.ts +0 -37
  516. package/dist/types/src/testing/data/exa-search-1748337331526.d.ts.map +0 -1
  517. package/dist/types/src/testing/data/exa-search-1748337344119.d.ts +0 -58
  518. package/dist/types/src/testing/data/exa-search-1748337344119.d.ts.map +0 -1
  519. package/dist/types/src/testing/data/index.d.ts +0 -3
  520. package/dist/types/src/testing/data/index.d.ts.map +0 -1
  521. package/src/blueprints/design/design-blueprint.test.ts +0 -108
  522. package/src/blueprints/design/design-blueprint.ts +0 -33
  523. package/src/blueprints/design/index.ts +0 -7
  524. package/src/blueprints/discord/discord-blueprint.ts +0 -34
  525. package/src/blueprints/linear/linear-blueprint.ts +0 -35
  526. package/src/blueprints/planning/planning-blueprint.test.ts +0 -129
  527. package/src/blueprints/planning/planning-blueprint.ts +0 -98
  528. package/src/blueprints/research/index.ts +0 -7
  529. package/src/blueprints/research/research-blueprint.test.ts +0 -7
  530. package/src/blueprints/research/research-blueprint.ts +0 -45
  531. package/src/blueprints/websearch/websearch-blueprint.ts +0 -20
  532. package/src/experimental/feed.test.ts +0 -108
  533. package/src/functions/discord/fetch-messages.test.ts +0 -59
  534. package/src/functions/discord/fetch-messages.ts +0 -251
  535. package/src/functions/discord/index.ts +0 -9
  536. package/src/functions/document/index.ts +0 -11
  537. package/src/functions/document/read.ts +0 -29
  538. package/src/functions/document/update.ts +0 -30
  539. package/src/functions/entity-extraction/entity-extraction.conversations.json +0 -1
  540. package/src/functions/entity-extraction/entity-extraction.test.ts +0 -100
  541. package/src/functions/entity-extraction/entity-extraction.ts +0 -163
  542. package/src/functions/entity-extraction/index.ts +0 -9
  543. package/src/functions/exa/exa.ts +0 -37
  544. package/src/functions/exa/index.ts +0 -6
  545. package/src/functions/exa/mock.ts +0 -71
  546. package/src/functions/github/fetch-prs.ts +0 -30
  547. package/src/functions/linear/index.ts +0 -9
  548. package/src/functions/linear/linear.test.ts +0 -86
  549. package/src/functions/research/create-document.ts +0 -69
  550. package/src/functions/research/graph.test.ts +0 -69
  551. package/src/functions/research/graph.ts +0 -388
  552. package/src/functions/research/index.ts +0 -15
  553. package/src/functions/research/instructions-research.tpl +0 -98
  554. package/src/functions/research/research-graph.ts +0 -47
  555. package/src/functions/research/research.conversations.json +0 -10714
  556. package/src/functions/research/research.test.ts +0 -240
  557. package/src/functions/research/research.ts +0 -155
  558. package/src/functions/research/types.ts +0 -24
  559. package/src/functions/tasks/index.ts +0 -11
  560. package/src/functions/tasks/read.ts +0 -34
  561. package/src/functions/tasks/task-list.test.ts +0 -99
  562. package/src/functions/tasks/task-list.ts +0 -165
  563. package/src/functions/tasks/update.ts +0 -52
  564. package/src/plugins.tsx +0 -68
  565. package/src/testing/data/exa-search-1748337321991.ts +0 -131
  566. package/src/testing/data/exa-search-1748337331526.ts +0 -144
  567. package/src/testing/data/exa-search-1748337344119.ts +0 -133
  568. package/src/testing/data/index.ts +0 -11
  569. /package/dist/types/src/{functions/discord → blueprints/discord/functions}/fetch-messages.test.d.ts +0 -0
  570. /package/dist/types/src/{functions/linear → blueprints/linear/functions}/linear.test.d.ts +0 -0
  571. /package/dist/types/src/{functions/research → crud}/graph.test.d.ts +0 -0
@@ -0,0 +1,914 @@
1
+ import {
2
+ AgentPrompt
3
+ } from "./chunk-COL54UJ3.mjs";
4
+ import {
5
+ DeleteMemory,
6
+ QueryMemories,
7
+ SaveMemory
8
+ } from "./chunk-EJAQUAKM.mjs";
9
+ import {
10
+ EnableBlueprints,
11
+ QueryBlueprints,
12
+ UpdateBlueprints
13
+ } from "./chunk-ANSF2BHN.mjs";
14
+ import {
15
+ AgentRules,
16
+ CreateAgent,
17
+ SyncTriggers
18
+ } from "./chunk-BCT55UTL.mjs";
19
+ import {
20
+ SyncIssues,
21
+ syncObjects
22
+ } from "./chunk-MMQ7HFL4.mjs";
23
+ import {
24
+ UpdateTasks
25
+ } from "./chunk-PLGEBNTO.mjs";
26
+ import {
27
+ Fetch
28
+ } from "./chunk-WLR3BGO4.mjs";
29
+ import {
30
+ ContextAdd,
31
+ ContextRemove,
32
+ Load,
33
+ ObjectCreate,
34
+ ObjectDelete,
35
+ ObjectUpdate,
36
+ Query,
37
+ RelationCreate,
38
+ RelationDelete,
39
+ SchemaAdd,
40
+ SchemaList,
41
+ TagAdd,
42
+ TagRemove
43
+ } from "./chunk-7UCYAP3T.mjs";
44
+ import {
45
+ FetchMessages
46
+ } from "./chunk-ZFXLTBZG.mjs";
47
+ import {
48
+ AgentBlueprintHandlers,
49
+ blueprint_default
50
+ } from "./chunk-W2722TC5.mjs";
51
+ import {
52
+ AddArtifact,
53
+ AgentWorker,
54
+ GetContext,
55
+ Qualifier
56
+ } from "./chunk-KS3IA6FQ.mjs";
57
+ import {
58
+ Agent_exports,
59
+ McpServer_exports,
60
+ Plan_exports
61
+ } from "./chunk-5GPL2WXU.mjs";
62
+ import {
63
+ Chat_exports
64
+ } from "./chunk-NR3GTWRC.mjs";
65
+ import {
66
+ Memory_exports
67
+ } from "./chunk-KGU725LW.mjs";
68
+ import {
69
+ __export
70
+ } from "./chunk-J5LGTIGS.mjs";
71
+
72
+ // src/blueprints/discord/blueprint.ts
73
+ import { Blueprint } from "@dxos/compute";
74
+ import { Ref } from "@dxos/echo";
75
+ import { Text } from "@dxos/schema";
76
+ import { trim } from "@dxos/util";
77
+
78
+ // src/blueprints/discord/functions/index.ts
79
+ import { OperationHandlerSet } from "@dxos/compute";
80
+ var DiscordHandlers = OperationHandlerSet.lazy(() => import("./fetch-messages-QOBBCTGC.mjs"));
81
+
82
+ // src/blueprints/discord/blueprint.ts
83
+ var BLUEPRINT_KEY = "org.dxos.blueprint.discord";
84
+ var instructions = trim`
85
+ You are able to fetch messages from Discord servers.
86
+
87
+ Known servers:
88
+
89
+ DXOS serverId: 837138313172353095
90
+ `;
91
+ var make = () => Blueprint.make({
92
+ key: BLUEPRINT_KEY,
93
+ name: "Discord",
94
+ description: "Discord integration.",
95
+ instructions: {
96
+ source: Ref.make(Text.make({
97
+ content: instructions
98
+ }))
99
+ },
100
+ tools: Blueprint.toolDefinitions({
101
+ operations: [
102
+ FetchMessages
103
+ ]
104
+ })
105
+ });
106
+ var blueprint = {
107
+ key: BLUEPRINT_KEY,
108
+ make
109
+ };
110
+ var blueprint_default2 = blueprint;
111
+
112
+ // src/blueprints/linear/blueprint.ts
113
+ import { Blueprint as Blueprint2 } from "@dxos/compute";
114
+ import { Ref as Ref2 } from "@dxos/echo";
115
+ import { Text as Text2 } from "@dxos/schema";
116
+ import { trim as trim2 } from "@dxos/util";
117
+
118
+ // src/blueprints/linear/functions/index.ts
119
+ import { OperationHandlerSet as OperationHandlerSet2 } from "@dxos/compute";
120
+ var LinearHandlers = OperationHandlerSet2.lazy(() => import("./sync-issues-DWY76B3M.mjs"));
121
+
122
+ // src/blueprints/linear/blueprint.ts
123
+ var BLUEPRINT_KEY2 = "org.dxos.blueprint.linear";
124
+ var instructions2 = trim2`
125
+ You are able to sync Linear workspaces.
126
+ Sometimes sync does not complete in one go and you need to call the function again.
127
+
128
+ Known workspaces:
129
+
130
+ DXOS teamId: 1127c63a-6f77-4725-9229-50f6cd47321c
131
+ `;
132
+ var make2 = () => Blueprint2.make({
133
+ key: BLUEPRINT_KEY2,
134
+ name: "Linear",
135
+ description: "Syncs Linear workspaces.",
136
+ instructions: {
137
+ source: Ref2.make(Text2.make({
138
+ content: instructions2
139
+ }))
140
+ },
141
+ tools: Blueprint2.toolDefinitions({
142
+ operations: [
143
+ SyncIssues
144
+ ]
145
+ })
146
+ });
147
+ var blueprint2 = {
148
+ key: BLUEPRINT_KEY2,
149
+ make: make2
150
+ };
151
+ var blueprint_default3 = blueprint2;
152
+
153
+ // src/blueprints/planning/blueprint.ts
154
+ import { Blueprint as Blueprint3 } from "@dxos/compute";
155
+
156
+ // src/blueprints/planning/functions/index.ts
157
+ import { OperationHandlerSet as OperationHandlerSet3 } from "@dxos/compute";
158
+ var PlanningHandlers = OperationHandlerSet3.lazy(() => import("./update-tasks-QQUR53RN.mjs"));
159
+
160
+ // src/blueprints/planning/blueprint.ts
161
+ var BLUEPRINT_KEY3 = "org.dxos.blueprint.planning";
162
+ var make3 = () => Blueprint3.make({
163
+ key: BLUEPRINT_KEY3,
164
+ name: "Planning",
165
+ description: "Plans and tracks complex tasks using artifacts.",
166
+ tools: Blueprint3.toolDefinitions({
167
+ operations: [
168
+ UpdateTasks
169
+ ]
170
+ })
171
+ });
172
+ var blueprint3 = {
173
+ key: BLUEPRINT_KEY3,
174
+ make: make3
175
+ };
176
+ var blueprint_default4 = blueprint3;
177
+
178
+ // src/blueprints/websearch/blueprint.ts
179
+ import { Blueprint as Blueprint4 } from "@dxos/compute";
180
+ import { Ref as Ref3 } from "@dxos/echo";
181
+ import { Text as Text3 } from "@dxos/schema";
182
+
183
+ // src/blueprints/websearch/functions/index.ts
184
+ import { OperationHandlerSet as OperationHandlerSet4 } from "@dxos/compute";
185
+ var WebSearchHandlers = OperationHandlerSet4.lazy(() => import("./fetch-KHMHV7JR.mjs"));
186
+
187
+ // src/blueprints/websearch/blueprint.ts
188
+ var BLUEPRINT_KEY4 = "org.dxos.blueprint.web-search";
189
+ var make4 = () => Blueprint4.make({
190
+ key: BLUEPRINT_KEY4,
191
+ name: "Web Search",
192
+ description: "Search the web.",
193
+ agentCanEnable: true,
194
+ instructions: {
195
+ source: Ref3.make(Text3.make())
196
+ },
197
+ tools: Blueprint4.toolDefinitions({
198
+ operations: [
199
+ Fetch
200
+ ],
201
+ tools: [
202
+ "AnthropicWebSearch"
203
+ ]
204
+ })
205
+ });
206
+ var blueprint4 = {
207
+ key: BLUEPRINT_KEY4,
208
+ make: make4
209
+ };
210
+ var blueprint_default5 = blueprint4;
211
+
212
+ // src/blueprints/websearch/toolkit.ts
213
+ import * as AnthropicTool from "@effect/ai-anthropic/AnthropicTool";
214
+ import * as Toolkit from "@effect/ai/Toolkit";
215
+ import * as Layer from "effect/Layer";
216
+ import { OpaqueToolkit } from "@dxos/ai";
217
+ var WebSearchToolkit = Toolkit.make(AnthropicTool.WebSearch_20250305({}));
218
+ var WebSearchToolkitOpaque = OpaqueToolkit.make(WebSearchToolkit, Layer.empty);
219
+
220
+ // src/blueprints/browser/blueprint.ts
221
+ import { Blueprint as Blueprint5 } from "@dxos/compute";
222
+ import { Ref as Ref4 } from "@dxos/echo";
223
+ import { Text as Text4 } from "@dxos/schema";
224
+ import { trim as trim3 } from "@dxos/util";
225
+ var BLUEPRINT_KEY5 = "org.dxos.blueprint.browser";
226
+ var instructions3 = trim3`
227
+ You are able to connect and use a virtual browser with persistent session.
228
+ Browser tools are provided via MCP.
229
+ `;
230
+ var make6 = () => Blueprint5.make({
231
+ key: BLUEPRINT_KEY5,
232
+ name: "Browser",
233
+ description: "Access to a real isolated browser.",
234
+ agentCanEnable: true,
235
+ instructions: {
236
+ source: Ref4.make(Text4.make({
237
+ content: instructions3
238
+ }))
239
+ },
240
+ mcpServers: [
241
+ {
242
+ // https://dash.cloudflare.com/950816f3f59b079880a1ae33fb0ec320/workers/services/view/playwright-mcp-example/production
243
+ url: "https://playwright-mcp-example.dxos.workers.dev/sse",
244
+ protocol: "sse"
245
+ }
246
+ ]
247
+ });
248
+ var blueprint5 = {
249
+ key: BLUEPRINT_KEY5,
250
+ make: make6
251
+ };
252
+ var blueprint_default6 = blueprint5;
253
+
254
+ // src/blueprints/database/blueprint.ts
255
+ import { Blueprint as Blueprint6 } from "@dxos/compute";
256
+ import { Ref as Ref5 } from "@dxos/echo";
257
+ import { Text as Text5 } from "@dxos/schema";
258
+ import { trim as trim4 } from "@dxos/util";
259
+
260
+ // src/blueprints/database/functions/index.ts
261
+ import { OperationHandlerSet as OperationHandlerSet5 } from "@dxos/compute";
262
+ var DatabaseHandlers = OperationHandlerSet5.lazy(() => import("./context-add-S5MBW2NA.mjs"), () => import("./context-remove-35O5T5N5.mjs"), () => import("./load-GAT3T2AD.mjs"), () => import("./object-create-PL3WRP74.mjs"), () => import("./object-delete-PZJQN5KW.mjs"), () => import("./object-update-R43N3VJX.mjs"), () => import("./query-MP5NSQKO.mjs"), () => import("./relation-create-YAAAFTR2.mjs"), () => import("./relation-delete-IEPKERFR.mjs"), () => import("./schema-add-5BNIINRS.mjs"), () => import("./schema-list-54UK7S4R.mjs"), () => import("./tag-add-NLVRGTC6.mjs"), () => import("./tag-remove-N4HFBIA2.mjs"));
263
+
264
+ // src/blueprints/database/blueprint.ts
265
+ var BLUEPRINT_KEY6 = "org.dxos.blueprint.database";
266
+ var instructions4 = trim4`
267
+ You can query, create, update, and delete objects in ECHO.
268
+ You can manage schemas, relations, tags, and add objects to the chat context.
269
+ `;
270
+ var make7 = () => Blueprint6.make({
271
+ key: BLUEPRINT_KEY6,
272
+ name: "Database",
273
+ description: "Query and manipulate objects in the ECHO database.",
274
+ agentCanEnable: true,
275
+ instructions: {
276
+ source: Ref5.make(Text5.make({
277
+ content: instructions4
278
+ }))
279
+ },
280
+ tools: Blueprint6.toolDefinitions({
281
+ operations: [
282
+ ContextAdd,
283
+ ContextRemove,
284
+ Load,
285
+ ObjectCreate,
286
+ ObjectDelete,
287
+ ObjectUpdate,
288
+ Query,
289
+ RelationCreate,
290
+ RelationDelete,
291
+ SchemaAdd,
292
+ SchemaList,
293
+ TagAdd,
294
+ TagRemove
295
+ ]
296
+ })
297
+ });
298
+ var blueprint6 = {
299
+ key: BLUEPRINT_KEY6,
300
+ make: make7
301
+ };
302
+ var blueprint_default7 = blueprint6;
303
+
304
+ // src/blueprints/memory/blueprint.ts
305
+ import { Blueprint as Blueprint7 } from "@dxos/compute";
306
+ import { Ref as Ref6 } from "@dxos/echo";
307
+ import { Text as Text6 } from "@dxos/schema";
308
+ import { trim as trim5 } from "@dxos/util";
309
+
310
+ // src/blueprints/memory/functions/index.ts
311
+ import { OperationHandlerSet as OperationHandlerSet6 } from "@dxos/compute";
312
+ var MemoryHandlers = OperationHandlerSet6.lazy(() => import("./save-GWAPLT3Z.mjs"), () => import("./query-U56GNEV6.mjs"), () => import("./delete-J3PMWP7Z.mjs"));
313
+
314
+ // src/blueprints/memory/blueprint.ts
315
+ var BLUEPRINT_KEY7 = "org.dxos.blueprint.memory";
316
+ var instructions5 = trim5`
317
+ You have the ability to save and recall memories.
318
+ Memories are persistent knowledge units stored in the database.
319
+ Use memories to remember facts, user preferences, decisions, and any knowledge that should persist across conversations.
320
+
321
+ When the user asks you to remember something, save it as a memory with a descriptive title.
322
+ When the user asks about something you might have stored, query your memories first.
323
+ You can also delete outdated or incorrect memories.
324
+ `;
325
+ var make8 = () => Blueprint7.make({
326
+ key: BLUEPRINT_KEY7,
327
+ name: "Memory",
328
+ description: "Persistent memory storage and retrieval.",
329
+ agentCanEnable: true,
330
+ instructions: {
331
+ source: Ref6.make(Text6.make({
332
+ content: instructions5
333
+ }))
334
+ },
335
+ tools: Blueprint7.toolDefinitions({
336
+ operations: [
337
+ SaveMemory,
338
+ QueryMemories,
339
+ DeleteMemory
340
+ ]
341
+ })
342
+ });
343
+ var blueprint7 = {
344
+ key: BLUEPRINT_KEY7,
345
+ make: make8
346
+ };
347
+ var blueprint_default8 = blueprint7;
348
+
349
+ // src/blueprints/automation/blueprint.ts
350
+ import { Blueprint as Blueprint8, Trigger, Operation } from "@dxos/compute";
351
+ import { Ref as Ref7 } from "@dxos/echo";
352
+ import { Text as Text7 } from "@dxos/schema";
353
+ import { trim as trim6 } from "@dxos/util";
354
+ var BLUEPRINT_KEY8 = "dxos.org/blueprint/automation";
355
+ var instructions6 = trim6`
356
+ Automation allows you to automatically initiate actions based on events.
357
+ Automations are configured by creating a trigger that references a function.
358
+ Whenever event that matches the trigger occurs, the function is invoked.
359
+
360
+ ## Configuration
361
+
362
+ Triggers are configured by the properties of the Trigger object.
363
+ - enabled: Must be true for trigger to run.
364
+ - spec: Events that the trigger matches.
365
+ - function: Ref to a ${Operation.PersistentOperation.typename} object that will be invoked. Query the functions present in the space first, and reference them in the trigger.
366
+ - input: The spec of the input data that will be passed to the function.
367
+
368
+ ## Input patterns
369
+
370
+ Input to the invoked function is defined by the input property of the Trigger object.
371
+ It's an object that supports constants or template strings.
372
+
373
+ Example:
374
+
375
+ {
376
+ item: '{{event.item}}',
377
+ instructions: 'Summarize and perform entity-extraction'
378
+ mailbox: { '/': 'dxn:echo:AAA:ZZZ' }
379
+ }
380
+
381
+ ## Trigger kinds
382
+
383
+ - Timer: Triggered by a cron schedule.
384
+ - Queue: Subscribes and processes items begginging to end.
385
+ Note: queues are the same as feeds. The queue DXN should be of form: dxn:queue:data:<space-id>:<queue-id>.
386
+ - Subscription: Subscribes and processes database items based on a query.
387
+
388
+ Avoid: email and webhook triggers.
389
+
390
+ ## Editing triggers
391
+
392
+ Triggers are represented as objects of type ${Trigger.Trigger.typename}.
393
+ You need access to the Database blueprint to manipulate triggers.
394
+ Read trigger schema before manipulating triggers.
395
+ Having a Trigger object in the database is enough to setup an automation.
396
+
397
+ ## Examples
398
+
399
+ Timer:
400
+
401
+ {
402
+ "function": { "/": "dxn:echo:AAA:ZZZ" },
403
+ "enabled": true,
404
+ "spec": {
405
+ "kind": "timer",
406
+ "cron": "*/5 * * * *"
407
+ }
408
+ }
409
+
410
+ Queue:
411
+
412
+ {
413
+ "function": { "/": "dxn:echo:AAA:ZZZ" },
414
+ "enabled": true,
415
+ "spec": {
416
+ "kind": "queue",
417
+ "queue": "dxn:queue:data:XXX:YYY"
418
+ }
419
+ }
420
+
421
+ Subscription:
422
+
423
+ {
424
+ "function": { "/": "dxn:echo:AAA:ZZZ" },
425
+ "enabled": true,
426
+ "spec": {
427
+ "kind": "subscription",
428
+ "query": { "ast": { "type": "select", "filter": { "type": "object", "typename": "dxn:type:org.dxos.type.person" } } }
429
+ }
430
+ }
431
+ `;
432
+ var make9 = () => Blueprint8.make({
433
+ key: BLUEPRINT_KEY8,
434
+ name: "Triggers",
435
+ description: "Trigger management and automation.",
436
+ instructions: {
437
+ source: Ref7.make(Text7.make({
438
+ content: instructions6
439
+ }))
440
+ }
441
+ });
442
+ var blueprint8 = {
443
+ key: BLUEPRINT_KEY8,
444
+ make: make9
445
+ };
446
+ var blueprint_default9 = blueprint8;
447
+
448
+ // src/blueprints/blueprint-manager/blueprint.ts
449
+ import { Blueprint as Blueprint9, Template } from "@dxos/compute";
450
+ import { trim as trim7 } from "@dxos/util";
451
+
452
+ // src/blueprints/blueprint-manager/functions/index.ts
453
+ import { OperationHandlerSet as OperationHandlerSet7 } from "@dxos/compute";
454
+ var BlueprintManagerHandlers = OperationHandlerSet7.lazy(() => import("./query-blueprints-PLWYVOI3.mjs"), () => import("./enable-blueprints-IVKST3WH.mjs"), () => import("./update-blueprints-2SNK6HLG.mjs"));
455
+
456
+ // src/blueprints/blueprint-manager/blueprint.ts
457
+ var BLUEPRINT_KEY9 = "org.dxos.blueprint.blueprint-manager";
458
+ var make10 = () => Blueprint9.make({
459
+ key: BLUEPRINT_KEY9,
460
+ name: "Blueprint Manager",
461
+ description: "Query and enable blueprints in the current conversation.",
462
+ instructions: Template.make({
463
+ source: trim7`
464
+ You can query available blueprints and enable them in the current conversation.
465
+ Use [query-blueprints] to refresh the list of available blueprints.
466
+ Use [refresh-blueprints] to update blueprint objects stored in the database from the built-in registry when they have drifted.
467
+ Use [enable-blueprints] to enable blueprints by their keys. Always call [query-blueprints] first.
468
+ Only blueprints with agentCanEnable=true can be enabled by the agent.
469
+
470
+ <available_blueprints>
471
+ {{#each blueprints}}
472
+ - {{key}} "{{name}}"{{#if description}} -- {{description}}{{/if}}{{#if agentCanEnable}} [agent-can-enable]{{/if}}
473
+ {{/each}}
474
+ </available_blueprints>
475
+
476
+ NOTE: You must enable the blueprint to use it, only then the tools from that blueprint will appear.
477
+ `,
478
+ inputs: [
479
+ {
480
+ name: "blueprints",
481
+ kind: "operation",
482
+ operation: QueryBlueprints.meta.key
483
+ }
484
+ ]
485
+ }),
486
+ tools: Blueprint9.toolDefinitions({
487
+ operations: [
488
+ QueryBlueprints,
489
+ EnableBlueprints,
490
+ UpdateBlueprints
491
+ ]
492
+ })
493
+ });
494
+ var blueprint9 = {
495
+ key: BLUEPRINT_KEY9,
496
+ make: make10
497
+ };
498
+ var blueprint_default10 = blueprint9;
499
+
500
+ // src/blueprints/project-wizard/blueprint.ts
501
+ import { Blueprint as Blueprint10, Template as Template2 } from "@dxos/compute";
502
+ import { trim as trim8 } from "@dxos/util";
503
+
504
+ // src/blueprints/project-wizard/functions/index.ts
505
+ import { OperationHandlerSet as OperationHandlerSet8 } from "@dxos/compute";
506
+ var AgentWizardHandlers = OperationHandlerSet8.lazy(() => import("./create-project-3AGXJ4TD.mjs"), () => import("./project-rules-KSVSOZJV.mjs"), () => import("./sync-triggers-NOIQLELD.mjs"));
507
+
508
+ // src/blueprints/project-wizard/blueprint.ts
509
+ var BLUEPRINT_KEY10 = "org.dxos.blueprint.agent-wizard";
510
+ var make11 = () => Blueprint10.make({
511
+ key: BLUEPRINT_KEY10,
512
+ name: "Agent Wizard",
513
+ description: "Help the user create a new agent (subscriptions, optional cron timer, sync-triggers after edits).",
514
+ agentCanEnable: true,
515
+ instructions: Template2.make({
516
+ source: trim8`
517
+ You are a wizard that helps the user create a new agent.
518
+
519
+ Agents are goal oriented and autonomously driven.
520
+ Each agent has instructions - the goal of the agent.
521
+ The instructions also typically describe what actions to perform in reaction to events (emails).
522
+ The agent has a number of associated artifacts to work with.
523
+ Agents can subscribe to emails.
524
+
525
+ Agents have a \`cron\` field: when set, the agent runs on a timer on that schedule (standard cron syntax).
526
+ Use \`cron\` when the user wants the agent to run periodically (e.g. "every morning", "once a day", "every 5 minutes").
527
+ Examples: \`0 9 * * *\` for daily at 09:00, or \`*/5 * * * *\` for every 5 minutes.
528
+ Timer triggers bypass the qualifier and invoke the agent worker directly on the schedule.
529
+
530
+ The agent itself is an ECHO object and can be edited like any other object using the database blueprint.
531
+ You can edit the agent's instructions, name, and other properties directly.
532
+ If you edit the agent's \`enabled\` field, \`filterEvents\` field, subscriptions array, or \`cron\` field, you MUST call the sync-triggers function afterward to synchronize the triggers (\`enabled\` is applied to all triggers).
533
+
534
+ IMPORTANT: Before attempting to create an agent call the [agent-rules] tool to get the rules for creating an agent.
535
+ `
536
+ }),
537
+ tools: Blueprint10.toolDefinitions({
538
+ operations: [
539
+ AgentRules,
540
+ CreateAgent,
541
+ SyncTriggers
542
+ ]
543
+ })
544
+ });
545
+ var blueprint10 = {
546
+ key: BLUEPRINT_KEY10,
547
+ make: make11
548
+ };
549
+ var blueprint_default11 = blueprint10;
550
+
551
+ // src/crud/graph.ts
552
+ import * as Tool from "@effect/ai/Tool";
553
+ import * as Toolkit2 from "@effect/ai/Toolkit";
554
+ import * as Context from "effect/Context";
555
+ import * as Effect from "effect/Effect";
556
+ import * as Function from "effect/Function";
557
+ import * as Option from "effect/Option";
558
+ import * as Schema from "effect/Schema";
559
+ import * as SchemaAST from "effect/SchemaAST";
560
+ import { Database, Entity, Feed, Filter, Obj, Query as Query2, Type } from "@dxos/echo";
561
+ import { isEncodedReference } from "@dxos/echo-protocol";
562
+ import { ReferenceAnnotationId, RelationSourceDXNId, RelationSourceId, RelationTargetDXNId, RelationTargetId, createObject, getTypeAnnotation, getTypeIdentifierAnnotation } from "@dxos/echo/internal";
563
+ import { mapAst } from "@dxos/effect";
564
+ import { DXN, ObjectId } from "@dxos/keys";
565
+ import { log } from "@dxos/log";
566
+ import { deepMapValues, isNonNullable, trim as trim9 } from "@dxos/util";
567
+ var __dxlog_file = "/__w/dxos/dxos/packages/core/compute/assistant-toolkit/src/crud/graph.ts";
568
+ var Subgraph = Schema.Struct({
569
+ /** Objects and relations. */
570
+ objects: Schema.Array(Schema.Any)
571
+ });
572
+ var findRelatedSchema = async (db, anchor) => {
573
+ const allSchemas = await db.graph.schemaRegistry.query().run();
574
+ return allSchemas.filter((schema) => {
575
+ if (getTypeAnnotation(schema)?.kind !== Entity.Kind.Relation) {
576
+ return false;
577
+ }
578
+ return isSchemaAddressableByDXN(anchor, DXN.parse(getTypeAnnotation(schema).sourceSchema)) || isSchemaAddressableByDXN(anchor, DXN.parse(getTypeAnnotation(schema).targetSchema));
579
+ }).map((schema) => ({
580
+ kind: "relation",
581
+ schema
582
+ }));
583
+ };
584
+ var isSchemaAddressableByDXN = (schema, dxn) => {
585
+ if (getTypeIdentifierAnnotation(schema) === dxn.toString()) {
586
+ return true;
587
+ }
588
+ const t = dxn.asTypeDXN();
589
+ if (t) {
590
+ return t.type === Type.getTypename(schema);
591
+ }
592
+ return false;
593
+ };
594
+ var LocalSearchToolkit = Toolkit2.make(Tool.make("search_local_search", {
595
+ description: "Search the local database for information using a vector index",
596
+ parameters: {
597
+ query: Schema.String.annotations({
598
+ description: "The query to search for. Could be a question or a topic or a set of keywords."
599
+ })
600
+ },
601
+ success: Schema.Unknown,
602
+ failure: Schema.Never,
603
+ dependencies: [
604
+ Database.Service,
605
+ Feed.FeedService
606
+ ]
607
+ }));
608
+ var LocalSearchHandler = LocalSearchToolkit.toLayer({
609
+ search_local_search: Effect.fn(function* ({ query }) {
610
+ const objects = yield* Database.runQuery(Query2.select(Filter.text(query, {
611
+ type: "vector"
612
+ })));
613
+ const results = [
614
+ ...objects
615
+ ];
616
+ const feedOption = yield* Effect.serviceOption(Feed.ContextFeedService);
617
+ if (Option.isSome(feedOption)) {
618
+ const feedObjects = yield* Feed.runQuery(feedOption.value.feed, Filter.everything());
619
+ results.push(...feedObjects);
620
+ }
621
+ return trim9`
622
+ <local_context>
623
+ ${JSON.stringify(results, null, 2)}
624
+ </local_context>
625
+ `;
626
+ })
627
+ });
628
+ var GraphWriterSchema = class extends Context.Tag("@dxos/assistant/GraphWriterSchema")() {
629
+ };
630
+ var makeGraphWriterToolkit = ({ schema }) => {
631
+ return Toolkit2.make(Tool.make("graph_writer", {
632
+ description: "Write to the local graph database",
633
+ parameters: createExtractionSchema(schema).fields,
634
+ success: Schema.Unknown,
635
+ failure: Schema.Never,
636
+ dependencies: [
637
+ Database.Service,
638
+ Feed.ContextFeedService,
639
+ Feed.FeedService
640
+ ]
641
+ }).annotateContext(Context.make(GraphWriterSchema, {
642
+ schema
643
+ })));
644
+ };
645
+ var makeGraphWriterHandler = (toolkit, { onAppend } = {}) => {
646
+ const { schema } = Context.get(toolkit.tools.graph_writer.annotations, GraphWriterSchema);
647
+ return toolkit.toLayer({
648
+ graph_writer: Effect.fn(function* (input) {
649
+ const { db } = yield* Database.Service;
650
+ const { feed } = yield* Feed.ContextFeedService;
651
+ const data = yield* sanitizeObjects(schema, input, db, feed);
652
+ yield* Feed.append(feed, data);
653
+ const dxns = data.map((obj) => Obj.getDXN(obj));
654
+ onAppend?.(dxns);
655
+ return dxns;
656
+ })
657
+ });
658
+ };
659
+ var createExtractionSchema = (types) => {
660
+ return Schema.Struct({
661
+ ...Object.fromEntries(types.map(preprocessSchema).map((schema, index) => [
662
+ `objects_${getSanitizedSchemaName(types[index])}`,
663
+ Schema.optional(Schema.Array(schema)).annotations({
664
+ description: `The objects of type: ${Type.getDXN(types[index])?.asTypeDXN().type}. ${SchemaAST.getDescriptionAnnotation(types[index].ast).pipe(Option.getOrElse(() => ""))}`
665
+ })
666
+ ]))
667
+ });
668
+ };
669
+ var getSanitizedSchemaName = (schema) => {
670
+ return Type.getDXN(schema).asTypeDXN().type.replaceAll(/[^a-zA-Z0-9]+/g, "_");
671
+ };
672
+ var sanitizeObjects = (types, data, db, feed) => Effect.gen(function* () {
673
+ const entries = types.map((type) => data[`objects_${getSanitizedSchemaName(type)}`]?.map((object) => ({
674
+ data: object,
675
+ schema: type
676
+ })) ?? []).flat();
677
+ const idMap = /* @__PURE__ */ new Map();
678
+ const existingIds = /* @__PURE__ */ new Set();
679
+ const enitties = /* @__PURE__ */ new Map();
680
+ const resolveId = (id) => {
681
+ if (ObjectId.isValid(id)) {
682
+ existingIds.add(id);
683
+ return DXN.fromLocalObjectId(id);
684
+ }
685
+ const mappedId = idMap.get(id);
686
+ if (mappedId) {
687
+ return DXN.fromLocalObjectId(mappedId);
688
+ }
689
+ return void 0;
690
+ };
691
+ const res = entries.map((entry) => {
692
+ if (ObjectId.isValid(entry.data.id)) {
693
+ return entry;
694
+ }
695
+ idMap.set(entry.data.id, ObjectId.random());
696
+ entry.data.id = idMap.get(entry.data.id);
697
+ return entry;
698
+ }).map((entry) => {
699
+ const data2 = deepMapValues(entry.data, (value, recurse) => {
700
+ if (isEncodedReference(value)) {
701
+ const ref = value["/"];
702
+ const id = resolveId(ref);
703
+ if (id) {
704
+ return {
705
+ "/": id.toString()
706
+ };
707
+ } else {
708
+ return {
709
+ "/": `search:?q=${encodeURIComponent(ref)}`
710
+ };
711
+ }
712
+ }
713
+ return recurse(value);
714
+ });
715
+ if (Entity.getKind(entry.schema) === "relation") {
716
+ const sourceDXN = resolveId(data2.source);
717
+ if (!sourceDXN) {
718
+ log.warn("source not found", {
719
+ source: data2.source
720
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 193, S: this });
721
+ }
722
+ const targetDXN = resolveId(data2.target);
723
+ if (!targetDXN) {
724
+ log.warn("target not found", {
725
+ target: data2.target
726
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 199, S: this });
727
+ }
728
+ delete data2.source;
729
+ delete data2.target;
730
+ data2[RelationSourceDXNId] = sourceDXN;
731
+ data2[RelationTargetDXNId] = targetDXN;
732
+ }
733
+ return {
734
+ data: data2,
735
+ schema: entry.schema
736
+ };
737
+ }).filter((object) => !existingIds.has(object.data.id));
738
+ const dbObjects = yield* Effect.promise(() => db.query(Query2.select(Filter.id(...existingIds))).run());
739
+ const feedObjects = feed && existingIds.size > 0 ? yield* Feed.runQuery(feed, Filter.id(...existingIds)) : [];
740
+ const objects = [
741
+ ...dbObjects,
742
+ ...feedObjects
743
+ ].filter(isNonNullable);
744
+ log.info("objects", {
745
+ dbObjects,
746
+ feedObjects,
747
+ existingIds
748
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 221, S: this });
749
+ const missing = Array.from(existingIds).filter((id) => !objects.some((object) => object.id === id));
750
+ if (missing.length > 0) {
751
+ throw new Error(`Object IDs do not point to existing objects: ${missing.join(", ")}`);
752
+ }
753
+ return res.flatMap(({ data: data2, schema }) => {
754
+ let skip = false;
755
+ if (RelationSourceDXNId in data2) {
756
+ const id = data2[RelationSourceDXNId].asEchoDXN()?.echoId;
757
+ const obj = objects.find((object) => object.id === id) ?? enitties.get(id);
758
+ if (obj) {
759
+ delete data2[RelationSourceDXNId];
760
+ data2[RelationSourceId] = obj;
761
+ } else {
762
+ skip = true;
763
+ }
764
+ }
765
+ if (RelationTargetDXNId in data2) {
766
+ const id = data2[RelationTargetDXNId].asEchoDXN()?.echoId;
767
+ const obj = objects.find((object) => object.id === id) ?? enitties.get(id);
768
+ if (obj) {
769
+ delete data2[RelationTargetDXNId];
770
+ data2[RelationTargetId] = obj;
771
+ } else {
772
+ skip = true;
773
+ }
774
+ }
775
+ if (!skip) {
776
+ const obj = createObject(schema, data2);
777
+ enitties.set(obj.id, obj);
778
+ return [
779
+ obj
780
+ ];
781
+ }
782
+ return [];
783
+ });
784
+ });
785
+ var SoftRef = Schema.Struct({
786
+ "/": Schema.String
787
+ }).annotations({
788
+ description: "Reference to another object."
789
+ });
790
+ var preprocessSchema = (schema) => {
791
+ const isRelationSchema = Entity.getKind(schema) === "relation";
792
+ const go = (ast, visited = /* @__PURE__ */ new Set()) => {
793
+ if (visited.has(ast)) {
794
+ return ast;
795
+ }
796
+ visited.add(ast);
797
+ if (SchemaAST.getAnnotation(ast, ReferenceAnnotationId).pipe(Option.isSome)) {
798
+ return SoftRef.ast;
799
+ }
800
+ return mapAst(ast, (child) => go(child, visited));
801
+ };
802
+ return Schema.make(mapAst(schema.ast, (ast) => go(ast))).pipe(Schema.omit("id"), Schema.extend(Schema.Struct({
803
+ id: Schema.String.annotations({
804
+ description: "The id of this object. Come up with a unique id based on your judgement."
805
+ })
806
+ })), isRelationSchema ? Schema.extend(Schema.Struct({
807
+ source: Schema.String.annotations({
808
+ description: "The id of the source object for this relation."
809
+ }),
810
+ target: Schema.String.annotations({
811
+ description: "The id of the target object for this relation."
812
+ })
813
+ })) : Function.identity);
814
+ };
815
+
816
+ // src/functions/agent/index.ts
817
+ import { OperationHandlerSet as OperationHandlerSet9 } from "@dxos/compute";
818
+ var AgentHandlers = OperationHandlerSet9.lazy(() => import("./prompt-INL55Q2B.mjs"));
819
+
820
+ // src/toolkits/WebToolkit.ts
821
+ var WebToolkit_exports = {};
822
+ __export(WebToolkit_exports, {
823
+ WebToolkit: () => WebToolkit,
824
+ layer: () => layer
825
+ });
826
+ import * as AnthropicTool2 from "@effect/ai-anthropic/AnthropicTool";
827
+ import * as Tool2 from "@effect/ai/Tool";
828
+ import * as Toolkit3 from "@effect/ai/Toolkit";
829
+ import * as Effect2 from "effect/Effect";
830
+ import * as Schema2 from "effect/Schema";
831
+ var WebToolkit = Toolkit3.make(AnthropicTool2.WebSearch_20250305({}).pipe(), Tool2.make("WebFetch", {
832
+ parameters: {
833
+ url: Schema2.String
834
+ },
835
+ success: Schema2.String
836
+ }));
837
+ var layer = WebToolkit.toLayer({
838
+ WebFetch: Effect2.fnUntraced(function* ({ url }) {
839
+ const response = yield* Effect2.promise(() => fetch(url).then((response2) => response2.text()));
840
+ return response;
841
+ })
842
+ });
843
+ export {
844
+ AddArtifact,
845
+ Agent_exports as Agent,
846
+ blueprint_default as AgentBlueprint,
847
+ AgentBlueprintHandlers,
848
+ AgentHandlers,
849
+ AgentPrompt,
850
+ AgentRules,
851
+ blueprint_default11 as AgentWizardBlueprint,
852
+ AgentWizardHandlers,
853
+ AgentWorker,
854
+ blueprint_default9 as AutomationBlueprint,
855
+ blueprint_default10 as BlueprintManagerBlueprint,
856
+ BlueprintManagerHandlers,
857
+ blueprint_default6 as BrowserBlueprint,
858
+ Chat_exports as Chat,
859
+ ContextAdd,
860
+ ContextRemove,
861
+ CreateAgent,
862
+ blueprint_default7 as DatabaseBlueprint,
863
+ DatabaseHandlers,
864
+ Load as DatabaseLoad,
865
+ Query as DatabaseQuery,
866
+ DeleteMemory,
867
+ blueprint_default2 as DiscordBlueprint,
868
+ DiscordHandlers,
869
+ EnableBlueprints,
870
+ FetchMessages,
871
+ GetContext,
872
+ blueprint_default3 as LinearBlueprint,
873
+ LinearHandlers,
874
+ LocalSearchHandler,
875
+ LocalSearchToolkit,
876
+ McpServer_exports as McpServer,
877
+ Memory_exports as Memory,
878
+ blueprint_default8 as MemoryBlueprint,
879
+ MemoryHandlers,
880
+ ObjectCreate,
881
+ ObjectDelete,
882
+ ObjectUpdate,
883
+ Plan_exports as Plan,
884
+ blueprint_default4 as PlanningBlueprint,
885
+ PlanningHandlers,
886
+ UpdateTasks as PlanningUpdateTasks,
887
+ Qualifier,
888
+ QueryBlueprints,
889
+ QueryMemories,
890
+ RelationCreate,
891
+ RelationDelete,
892
+ SaveMemory,
893
+ SchemaAdd,
894
+ SchemaList,
895
+ Subgraph,
896
+ SyncIssues,
897
+ SyncTriggers,
898
+ TagAdd,
899
+ TagRemove,
900
+ blueprint_default5 as WebSearchBlueprint,
901
+ Fetch as WebSearchFetch,
902
+ WebSearchHandlers,
903
+ WebSearchToolkit,
904
+ WebSearchToolkitOpaque,
905
+ WebToolkit_exports as WebToolkit,
906
+ createExtractionSchema,
907
+ findRelatedSchema,
908
+ getSanitizedSchemaName,
909
+ makeGraphWriterHandler,
910
+ makeGraphWriterToolkit,
911
+ sanitizeObjects,
912
+ syncObjects
913
+ };
914
+ //# sourceMappingURL=index.mjs.map