@graphrefly/graphrefly 0.44.0 → 0.46.0

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 (720) hide show
  1. package/README.md +22 -19
  2. package/dist/_internal-B23BagFd.d.cts +33 -0
  3. package/dist/_internal-B23BagFd.d.ts +33 -0
  4. package/dist/adaptive-rate-limiter-Dch_xYIi.d.cts +111 -0
  5. package/dist/adaptive-rate-limiter-Dch_xYIi.d.ts +111 -0
  6. package/dist/agents-C0Ji9ldU.d.cts +629 -0
  7. package/dist/agents-C9zexT7I.d.ts +629 -0
  8. package/dist/audit-BAXb3VOg.d.ts +246 -0
  9. package/dist/audit-C_bPfkqS.d.cts +246 -0
  10. package/dist/backoff-7KIK3WQW.js +24 -0
  11. package/dist/backoff-7KIK3WQW.js.map +1 -0
  12. package/dist/backoff-Bnb9OoPh.d.cts +6 -0
  13. package/dist/backoff-Bnb9OoPh.d.ts +6 -0
  14. package/dist/base/composition/index.cjs +811 -0
  15. package/dist/base/composition/index.cjs.map +1 -0
  16. package/dist/base/composition/index.d.cts +469 -0
  17. package/dist/base/composition/index.d.ts +469 -0
  18. package/dist/base/composition/index.js +40 -0
  19. package/dist/base/composition/index.js.map +1 -0
  20. package/dist/base/index.cjs +6336 -0
  21. package/dist/base/index.cjs.map +1 -0
  22. package/dist/base/index.d.cts +22 -0
  23. package/dist/base/index.d.ts +22 -0
  24. package/dist/base/index.js +259 -0
  25. package/dist/base/index.js.map +1 -0
  26. package/dist/base/io/index.cjs +3270 -0
  27. package/dist/base/io/index.cjs.map +1 -0
  28. package/dist/base/io/index.d.cts +2245 -0
  29. package/dist/base/io/index.d.ts +2245 -0
  30. package/dist/base/io/index.js +117 -0
  31. package/dist/base/io/index.js.map +1 -0
  32. package/dist/base/meta/index.cjs +43 -0
  33. package/dist/base/meta/index.cjs.map +1 -0
  34. package/dist/base/meta/index.d.cts +45 -0
  35. package/dist/base/meta/index.d.ts +45 -0
  36. package/dist/base/meta/index.js +13 -0
  37. package/dist/base/meta/index.js.map +1 -0
  38. package/dist/base/mutation/index.cjs +200 -0
  39. package/dist/base/mutation/index.cjs.map +1 -0
  40. package/dist/base/mutation/index.d.cts +177 -0
  41. package/dist/base/mutation/index.d.ts +177 -0
  42. package/dist/base/mutation/index.js +22 -0
  43. package/dist/base/mutation/index.js.map +1 -0
  44. package/dist/base/render/index.cjs +1120 -0
  45. package/dist/base/render/index.cjs.map +1 -0
  46. package/dist/{extra/render/index.d.ts → base/render/index.d.cts} +75 -31
  47. package/dist/{extra/render/index.d.cts → base/render/index.d.ts} +75 -31
  48. package/dist/base/render/index.js +24 -0
  49. package/dist/base/render/index.js.map +1 -0
  50. package/dist/base/sources/browser/index.cjs +172 -0
  51. package/dist/base/sources/browser/index.cjs.map +1 -0
  52. package/dist/base/sources/browser/index.d.cts +84 -0
  53. package/dist/base/sources/browser/index.d.ts +84 -0
  54. package/dist/base/sources/browser/index.js +151 -0
  55. package/dist/base/sources/browser/index.js.map +1 -0
  56. package/dist/base/sources/event/index.cjs +98 -0
  57. package/dist/base/sources/event/index.cjs.map +1 -0
  58. package/dist/base/sources/event/index.d.cts +91 -0
  59. package/dist/base/sources/event/index.d.ts +91 -0
  60. package/dist/base/sources/event/index.js +13 -0
  61. package/dist/base/sources/event/index.js.map +1 -0
  62. package/dist/base/sources/index.cjs +755 -0
  63. package/dist/base/sources/index.cjs.map +1 -0
  64. package/dist/{extra/sources.d.ts → base/sources/index.d.cts} +74 -301
  65. package/dist/{extra/sources.d.cts → base/sources/index.d.ts} +74 -301
  66. package/dist/base/sources/index.js +42 -0
  67. package/dist/base/sources/index.js.map +1 -0
  68. package/dist/base/sources/node/index.cjs +320 -0
  69. package/dist/base/sources/node/index.cjs.map +1 -0
  70. package/dist/{extra/node.d.ts → base/sources/node/index.d.cts} +35 -37
  71. package/dist/{extra/node.d.cts → base/sources/node/index.d.ts} +35 -37
  72. package/dist/base/sources/node/index.js +306 -0
  73. package/dist/base/sources/node/index.js.map +1 -0
  74. package/dist/base/utils/index.cjs +37 -0
  75. package/dist/base/utils/index.cjs.map +1 -0
  76. package/dist/base/utils/index.d.cts +37 -0
  77. package/dist/base/utils/index.d.ts +37 -0
  78. package/dist/base/utils/index.js +11 -0
  79. package/dist/base/utils/index.js.map +1 -0
  80. package/dist/base/worker/index.cjs +548 -0
  81. package/dist/base/worker/index.cjs.map +1 -0
  82. package/dist/base/worker/index.d.cts +207 -0
  83. package/dist/base/worker/index.d.ts +207 -0
  84. package/dist/base/worker/index.js +20 -0
  85. package/dist/base/worker/index.js.map +1 -0
  86. package/dist/breaker-C9skL3d8.d.ts +175 -0
  87. package/dist/breaker-ugSdq54q.d.cts +175 -0
  88. package/dist/{cascading-BglDkMdX.d.cts → cascading-CSSbKGrJ.d.ts} +3 -3
  89. package/dist/{cascading-MFgxu7Yo.d.ts → cascading-baGkiihI.d.cts} +3 -3
  90. package/dist/chunk-255UCBG4.js +58 -0
  91. package/dist/chunk-255UCBG4.js.map +1 -0
  92. package/dist/chunk-2LO3EL4W.js +1 -0
  93. package/dist/chunk-2LO3EL4W.js.map +1 -0
  94. package/dist/chunk-2OB3CEJS.js +1065 -0
  95. package/dist/chunk-2OB3CEJS.js.map +1 -0
  96. package/dist/chunk-36NMM65U.js +144 -0
  97. package/dist/chunk-36NMM65U.js.map +1 -0
  98. package/dist/chunk-3CEXCBN6.js +1 -0
  99. package/dist/chunk-3CEXCBN6.js.map +1 -0
  100. package/dist/chunk-3MUSLI6E.js +105 -0
  101. package/dist/chunk-3MUSLI6E.js.map +1 -0
  102. package/dist/chunk-3PSLNJDU.js +884 -0
  103. package/dist/chunk-3PSLNJDU.js.map +1 -0
  104. package/dist/chunk-3QZY5BI7.js +92 -0
  105. package/dist/chunk-3QZY5BI7.js.map +1 -0
  106. package/dist/chunk-42FQ27MQ.js +594 -0
  107. package/dist/chunk-42FQ27MQ.js.map +1 -0
  108. package/dist/chunk-4GYMCUDZ.js +1085 -0
  109. package/dist/chunk-4GYMCUDZ.js.map +1 -0
  110. package/dist/chunk-4S53H2KR.js +382 -0
  111. package/dist/chunk-4S53H2KR.js.map +1 -0
  112. package/dist/chunk-4XCHZRUJ.js +128 -0
  113. package/dist/chunk-4XCHZRUJ.js.map +1 -0
  114. package/dist/chunk-5THCXDWY.js +725 -0
  115. package/dist/chunk-5THCXDWY.js.map +1 -0
  116. package/dist/chunk-6XZYT4SW.js +256 -0
  117. package/dist/chunk-6XZYT4SW.js.map +1 -0
  118. package/dist/chunk-7EGRP2VX.js +76 -0
  119. package/dist/chunk-7EGRP2VX.js.map +1 -0
  120. package/dist/chunk-A7KV5UK4.js +150 -0
  121. package/dist/chunk-A7KV5UK4.js.map +1 -0
  122. package/dist/chunk-APY2SS5X.js +156 -0
  123. package/dist/chunk-APY2SS5X.js.map +1 -0
  124. package/dist/chunk-AZDQPQ3V.js +66 -0
  125. package/dist/chunk-AZDQPQ3V.js.map +1 -0
  126. package/dist/chunk-BU3SEFA5.js +90 -0
  127. package/dist/chunk-BU3SEFA5.js.map +1 -0
  128. package/dist/chunk-BXGZFGZ4.js +189 -0
  129. package/dist/chunk-BXGZFGZ4.js.map +1 -0
  130. package/dist/chunk-CGHORL6G.js +579 -0
  131. package/dist/chunk-CGHORL6G.js.map +1 -0
  132. package/dist/chunk-CXANAIZU.js +530 -0
  133. package/dist/chunk-CXANAIZU.js.map +1 -0
  134. package/dist/chunk-CZQHCKKG.js +1 -0
  135. package/dist/chunk-CZQHCKKG.js.map +1 -0
  136. package/dist/chunk-DKNHAICT.js +133 -0
  137. package/dist/chunk-DKNHAICT.js.map +1 -0
  138. package/dist/chunk-DM4OMPWK.js +584 -0
  139. package/dist/chunk-DM4OMPWK.js.map +1 -0
  140. package/dist/chunk-DMSNO6ZB.js +452 -0
  141. package/dist/chunk-DMSNO6ZB.js.map +1 -0
  142. package/dist/chunk-E5OZPDIW.js +229 -0
  143. package/dist/chunk-E5OZPDIW.js.map +1 -0
  144. package/dist/chunk-EVYY4X5A.js +509 -0
  145. package/dist/chunk-EVYY4X5A.js.map +1 -0
  146. package/dist/chunk-FDFD67UO.js +1 -0
  147. package/dist/chunk-FDFD67UO.js.map +1 -0
  148. package/dist/chunk-FMPF42Q4.js +13 -0
  149. package/dist/chunk-FMPF42Q4.js.map +1 -0
  150. package/dist/chunk-FR6RGA3B.js +1277 -0
  151. package/dist/chunk-FR6RGA3B.js.map +1 -0
  152. package/dist/chunk-FW23JYNQ.js +454 -0
  153. package/dist/chunk-FW23JYNQ.js.map +1 -0
  154. package/dist/chunk-GBCENOLN.js +1575 -0
  155. package/dist/chunk-GBCENOLN.js.map +1 -0
  156. package/dist/chunk-HL7HUJIX.js +1 -0
  157. package/dist/chunk-HL7HUJIX.js.map +1 -0
  158. package/dist/chunk-HULCUY35.js +2508 -0
  159. package/dist/chunk-HULCUY35.js.map +1 -0
  160. package/dist/chunk-IHTWQEDR.js +169 -0
  161. package/dist/chunk-IHTWQEDR.js.map +1 -0
  162. package/dist/chunk-IJRR6YAI.js +128 -0
  163. package/dist/chunk-IJRR6YAI.js.map +1 -0
  164. package/dist/chunk-JGFRAFDL.js +221 -0
  165. package/dist/chunk-JGFRAFDL.js.map +1 -0
  166. package/dist/chunk-KIIXR252.js +211 -0
  167. package/dist/chunk-KIIXR252.js.map +1 -0
  168. package/dist/chunk-KN3H5CNT.js +11 -0
  169. package/dist/chunk-KN3H5CNT.js.map +1 -0
  170. package/dist/chunk-KPG3DGLA.js +1 -0
  171. package/dist/chunk-KPG3DGLA.js.map +1 -0
  172. package/dist/chunk-KRNQ6RGQ.js +1 -0
  173. package/dist/chunk-KRNQ6RGQ.js.map +1 -0
  174. package/dist/chunk-LBAJK24K.js +1071 -0
  175. package/dist/chunk-LBAJK24K.js.map +1 -0
  176. package/dist/chunk-MLTPJMH6.js +417 -0
  177. package/dist/chunk-MLTPJMH6.js.map +1 -0
  178. package/dist/chunk-N3SZ7BMH.js +95 -0
  179. package/dist/chunk-N3SZ7BMH.js.map +1 -0
  180. package/dist/chunk-NDUD3IMO.js +540 -0
  181. package/dist/chunk-NDUD3IMO.js.map +1 -0
  182. package/dist/chunk-NY2PYHNC.js +873 -0
  183. package/dist/chunk-NY2PYHNC.js.map +1 -0
  184. package/dist/chunk-O3MT7DYI.js +225 -0
  185. package/dist/chunk-O3MT7DYI.js.map +1 -0
  186. package/dist/chunk-OCUDSN63.js +2386 -0
  187. package/dist/chunk-OCUDSN63.js.map +1 -0
  188. package/dist/chunk-OIWU3NYV.js +199 -0
  189. package/dist/chunk-OIWU3NYV.js.map +1 -0
  190. package/dist/chunk-OO5BM6CJ.js +1153 -0
  191. package/dist/chunk-OO5BM6CJ.js.map +1 -0
  192. package/dist/chunk-OQUIJT7A.js +1 -0
  193. package/dist/chunk-OQUIJT7A.js.map +1 -0
  194. package/dist/chunk-P5LBT622.js +105 -0
  195. package/dist/chunk-P5LBT622.js.map +1 -0
  196. package/dist/chunk-PKGQG5QQ.js +519 -0
  197. package/dist/chunk-PKGQG5QQ.js.map +1 -0
  198. package/dist/chunk-PKPO3JTZ.js +561 -0
  199. package/dist/chunk-PKPO3JTZ.js.map +1 -0
  200. package/dist/chunk-PL5UDIQ5.js +118 -0
  201. package/dist/chunk-PL5UDIQ5.js.map +1 -0
  202. package/dist/chunk-PZWISPIQ.js +432 -0
  203. package/dist/chunk-PZWISPIQ.js.map +1 -0
  204. package/dist/chunk-Q3EYOCZB.js +510 -0
  205. package/dist/chunk-Q3EYOCZB.js.map +1 -0
  206. package/dist/chunk-QMBYUVRL.js +15 -0
  207. package/dist/chunk-QMBYUVRL.js.map +1 -0
  208. package/dist/chunk-RAGGHLCV.js +200 -0
  209. package/dist/chunk-RAGGHLCV.js.map +1 -0
  210. package/dist/chunk-RGL53X5G.js +574 -0
  211. package/dist/chunk-RGL53X5G.js.map +1 -0
  212. package/dist/chunk-RJOG4IJU.js +1039 -0
  213. package/dist/chunk-RJOG4IJU.js.map +1 -0
  214. package/dist/chunk-SOOKUYVM.js +403 -0
  215. package/dist/chunk-SOOKUYVM.js.map +1 -0
  216. package/dist/chunk-T5BN5KG7.js +1 -0
  217. package/dist/chunk-T5BN5KG7.js.map +1 -0
  218. package/dist/chunk-TP7244Y6.js +207 -0
  219. package/dist/chunk-TP7244Y6.js.map +1 -0
  220. package/dist/chunk-TSBFTJKM.js +57 -0
  221. package/dist/chunk-TSBFTJKM.js.map +1 -0
  222. package/dist/chunk-URQ2CBBF.js +143 -0
  223. package/dist/chunk-URQ2CBBF.js.map +1 -0
  224. package/dist/chunk-W2BOPXTI.js +1 -0
  225. package/dist/chunk-W2BOPXTI.js.map +1 -0
  226. package/dist/chunk-WKSWLSCX.js +207 -0
  227. package/dist/chunk-WKSWLSCX.js.map +1 -0
  228. package/dist/chunk-Y52CS6YA.js +88 -0
  229. package/dist/chunk-Y52CS6YA.js.map +1 -0
  230. package/dist/chunk-YCBUWK77.js +92 -0
  231. package/dist/chunk-YCBUWK77.js.map +1 -0
  232. package/dist/chunk-YJ4U2D2C.js +314 -0
  233. package/dist/chunk-YJ4U2D2C.js.map +1 -0
  234. package/dist/chunk-Z4YXAUDN.js +239 -0
  235. package/dist/chunk-Z4YXAUDN.js.map +1 -0
  236. package/dist/chunk-Z6EGP5D7.js +92 -0
  237. package/dist/chunk-Z6EGP5D7.js.map +1 -0
  238. package/dist/compat/index.cjs +3100 -9
  239. package/dist/compat/index.cjs.map +1 -0
  240. package/dist/compat/index.d.cts +112 -18
  241. package/dist/compat/index.d.ts +112 -18
  242. package/dist/compat/index.js +176 -1
  243. package/dist/compat/index.js.map +1 -0
  244. package/dist/compat/jotai/index.cjs +149 -1
  245. package/dist/compat/jotai/index.cjs.map +1 -0
  246. package/dist/compat/jotai/index.d.cts +2 -2
  247. package/dist/compat/jotai/index.d.ts +2 -2
  248. package/dist/compat/jotai/index.js +8 -1
  249. package/dist/compat/jotai/index.js.map +1 -0
  250. package/dist/compat/nanostores/index.cjs +205 -1
  251. package/dist/compat/nanostores/index.cjs.map +1 -0
  252. package/dist/compat/nanostores/index.d.cts +2 -2
  253. package/dist/compat/nanostores/index.d.ts +2 -2
  254. package/dist/compat/nanostores/index.js +22 -1
  255. package/dist/compat/nanostores/index.js.map +1 -0
  256. package/dist/compat/nestjs/index.cjs +2241 -9
  257. package/dist/compat/nestjs/index.cjs.map +1 -0
  258. package/dist/compat/nestjs/index.d.cts +7 -10
  259. package/dist/compat/nestjs/index.d.ts +7 -10
  260. package/dist/compat/nestjs/index.js +78 -1
  261. package/dist/compat/nestjs/index.js.map +1 -0
  262. package/dist/compat/react/index.cjs +114 -1
  263. package/dist/compat/react/index.cjs.map +1 -0
  264. package/dist/compat/react/index.d.cts +2 -2
  265. package/dist/compat/react/index.d.ts +2 -2
  266. package/dist/compat/react/index.js +12 -1
  267. package/dist/compat/react/index.js.map +1 -0
  268. package/dist/compat/solid/index.cjs +101 -1
  269. package/dist/compat/solid/index.cjs.map +1 -0
  270. package/dist/compat/solid/index.d.cts +2 -2
  271. package/dist/compat/solid/index.d.ts +2 -2
  272. package/dist/compat/solid/index.js +12 -1
  273. package/dist/compat/solid/index.js.map +1 -0
  274. package/dist/compat/svelte/index.cjs +104 -1
  275. package/dist/compat/svelte/index.cjs.map +1 -0
  276. package/dist/compat/svelte/index.d.cts +2 -2
  277. package/dist/compat/svelte/index.d.ts +2 -2
  278. package/dist/compat/svelte/index.js +12 -1
  279. package/dist/compat/svelte/index.js.map +1 -0
  280. package/dist/compat/vue/index.cjs +119 -1
  281. package/dist/compat/vue/index.cjs.map +1 -0
  282. package/dist/compat/vue/index.d.cts +2 -2
  283. package/dist/compat/vue/index.d.ts +2 -2
  284. package/dist/compat/vue/index.js +12 -1
  285. package/dist/compat/vue/index.js.map +1 -0
  286. package/dist/compat/zustand/index.cjs +69 -3
  287. package/dist/compat/zustand/index.cjs.map +1 -0
  288. package/dist/compat/zustand/index.d.cts +2 -6
  289. package/dist/compat/zustand/index.d.ts +2 -6
  290. package/dist/compat/zustand/index.js +8 -1
  291. package/dist/compat/zustand/index.js.map +1 -0
  292. package/dist/distill-De6Rnn15.d.cts +48 -0
  293. package/dist/distill-De6Rnn15.d.ts +48 -0
  294. package/dist/external-register-CWyroXb_.d.cts +138 -0
  295. package/dist/external-register-CWyroXb_.d.ts +138 -0
  296. package/dist/{fallback-74oxi34l.d.cts → fallback-Bx46zqky.d.cts} +3 -10
  297. package/dist/{fallback-DUyyBTBK.d.ts → fallback-pIWW8A2d.d.ts} +3 -10
  298. package/dist/guarded-execution-BcdtxeBk.d.ts +207 -0
  299. package/dist/guarded-execution-C-3hnP6A.d.cts +207 -0
  300. package/dist/{index-CBGUK09R.d.ts → index-5SU_O78r.d.cts} +5 -5
  301. package/dist/{index-BmZXHqkE.d.ts → index-B6pxYJzO.d.cts} +1 -1
  302. package/dist/{index-hcDJ8PSI.d.cts → index-B6pxYJzO.d.ts} +1 -1
  303. package/dist/{index-C5stwKcw.d.cts → index-BFsng6v1.d.cts} +1 -1
  304. package/dist/{index-CdAlHFEt.d.ts → index-BFsng6v1.d.ts} +1 -1
  305. package/dist/{index-_6ODbuOu.d.cts → index-Bg-LwEt-.d.cts} +1 -1
  306. package/dist/{index-CviRnE4K.d.ts → index-Bg-LwEt-.d.ts} +1 -1
  307. package/dist/{index-CBBLl_rc.d.ts → index-Brp888t0.d.cts} +1 -1
  308. package/dist/{index-BQSKmbuG.d.cts → index-Brp888t0.d.ts} +1 -1
  309. package/dist/{index-sqkqlb1p.d.ts → index-CDfk6jHN.d.cts} +1 -1
  310. package/dist/{index-ZVQhLa2i.d.cts → index-CDfk6jHN.d.ts} +1 -1
  311. package/dist/{index-Climxqsu.d.cts → index-CEXCtYYJ.d.ts} +5 -5
  312. package/dist/index-DLAxYaN5.d.cts +169 -0
  313. package/dist/index-DLAxYaN5.d.ts +169 -0
  314. package/dist/{index-CK29LV56.d.cts → index-DeWbQzMe.d.cts} +1 -1
  315. package/dist/{index-CPQlGA29.d.ts → index-DeWbQzMe.d.ts} +1 -1
  316. package/dist/{index-BrPrLl4e.d.cts → index-dX9IzPqj.d.cts} +1 -1
  317. package/dist/{index-Dgl1HpPn.d.ts → index-dX9IzPqj.d.ts} +1 -1
  318. package/dist/index.cjs +25934 -191
  319. package/dist/index.cjs.map +1 -0
  320. package/dist/index.d.cts +58 -94
  321. package/dist/index.d.ts +58 -94
  322. package/dist/index.js +852 -1
  323. package/dist/index.js.map +1 -0
  324. package/dist/layout-types-B5aiHYgk.d.cts +72 -0
  325. package/dist/layout-types-B5aiHYgk.d.ts +72 -0
  326. package/dist/memory-composers-BryDrRBX.d.cts +529 -0
  327. package/dist/memory-composers-CVQqPYEV.d.ts +529 -0
  328. package/dist/{observable-DWjNfLvC.d.ts → observable-BXQoW1P-.d.cts} +1 -1
  329. package/dist/{observable-e3eiPPFy.d.cts → observable-BXQoW1P-.d.ts} +1 -1
  330. package/dist/{pipeline-graph-Sgj0gCwn.d.ts → pipeline-graph-Ce47CB6Y.d.cts} +13 -10
  331. package/dist/{pipeline-graph-CIKhynsF.d.cts → pipeline-graph-DXCwY9vG.d.ts} +13 -10
  332. package/dist/presets/ai/index.cjs +4377 -0
  333. package/dist/presets/ai/index.cjs.map +1 -0
  334. package/dist/presets/ai/index.d.cts +98 -0
  335. package/dist/presets/ai/index.d.ts +98 -0
  336. package/dist/presets/ai/index.js +54 -0
  337. package/dist/presets/ai/index.js.map +1 -0
  338. package/dist/presets/harness/index.cjs +5929 -0
  339. package/dist/presets/harness/index.cjs.map +1 -0
  340. package/dist/presets/harness/index.d.cts +566 -0
  341. package/dist/presets/harness/index.d.ts +566 -0
  342. package/dist/presets/harness/index.js +71 -0
  343. package/dist/presets/harness/index.js.map +1 -0
  344. package/dist/presets/index.cjs +9782 -0
  345. package/dist/presets/index.cjs.map +1 -0
  346. package/dist/presets/index.d.cts +28 -0
  347. package/dist/presets/index.d.ts +28 -0
  348. package/dist/presets/index.js +129 -0
  349. package/dist/presets/index.js.map +1 -0
  350. package/dist/presets/inspect/index.cjs +1087 -0
  351. package/dist/presets/inspect/index.cjs.map +1 -0
  352. package/dist/presets/inspect/index.d.cts +172 -0
  353. package/dist/presets/inspect/index.d.ts +172 -0
  354. package/dist/presets/inspect/index.js +21 -0
  355. package/dist/presets/inspect/index.js.map +1 -0
  356. package/dist/presets/resilience/index.cjs +1593 -0
  357. package/dist/presets/resilience/index.cjs.map +1 -0
  358. package/dist/presets/resilience/index.d.cts +205 -0
  359. package/dist/presets/resilience/index.d.ts +205 -0
  360. package/dist/presets/resilience/index.js +18 -0
  361. package/dist/presets/resilience/index.js.map +1 -0
  362. package/dist/rate-limiter-CEALq4N1.d.ts +559 -0
  363. package/dist/rate-limiter-DpVbSYdH.d.cts +559 -0
  364. package/dist/{reactive-layout-DOTs9P3X.d.ts → reactive-layout-fswlBUvX.d.cts} +19 -7
  365. package/dist/{reactive-layout-DgctbqZo.d.cts → reactive-layout-fswlBUvX.d.ts} +19 -7
  366. package/dist/retry-BDbRZ_gx.d.ts +125 -0
  367. package/dist/retry-DWuhjvsA.d.cts +125 -0
  368. package/dist/solutions/index.cjs +8200 -0
  369. package/dist/solutions/index.cjs.map +1 -0
  370. package/dist/solutions/index.d.cts +23 -0
  371. package/dist/solutions/index.d.ts +23 -0
  372. package/dist/solutions/index.js +55 -0
  373. package/dist/solutions/index.js.map +1 -0
  374. package/dist/spawnable-5mDY501F.d.cts +746 -0
  375. package/dist/spawnable-D3lR0oQu.d.ts +746 -0
  376. package/dist/status-U-rUI79b.d.cts +84 -0
  377. package/dist/status-U-rUI79b.d.ts +84 -0
  378. package/dist/timeout-U5O4ESK3.js +12 -0
  379. package/dist/timeout-U5O4ESK3.js.map +1 -0
  380. package/dist/{types-CWFysE9E.d.ts → types-BB5Lw-pB.d.cts} +3 -3
  381. package/dist/{types-C0_yquda.d.cts → types-BB5Lw-pB.d.ts} +3 -3
  382. package/dist/types-CJWIMJiZ.d.ts +548 -0
  383. package/dist/types-vCq7ShIm.d.cts +548 -0
  384. package/dist/utils/ai/browser.cjs +2169 -0
  385. package/dist/utils/ai/browser.cjs.map +1 -0
  386. package/dist/{patterns → utils}/ai/browser.d.cts +7 -5
  387. package/dist/{patterns → utils}/ai/browser.d.ts +7 -5
  388. package/dist/utils/ai/browser.js +255 -0
  389. package/dist/utils/ai/browser.js.map +1 -0
  390. package/dist/utils/ai/index.cjs +8468 -0
  391. package/dist/utils/ai/index.cjs.map +1 -0
  392. package/dist/{index-CR8QpwX8.d.ts → utils/ai/index.d.cts} +73 -976
  393. package/dist/{index-UPSiS-X7.d.cts → utils/ai/index.d.ts} +73 -976
  394. package/dist/utils/ai/index.js +173 -0
  395. package/dist/utils/ai/index.js.map +1 -0
  396. package/dist/utils/ai/node.cjs +648 -0
  397. package/dist/utils/ai/node.cjs.map +1 -0
  398. package/dist/{patterns → utils}/ai/node.d.cts +5 -7
  399. package/dist/{patterns → utils}/ai/node.d.ts +5 -7
  400. package/dist/utils/ai/node.js +84 -0
  401. package/dist/utils/ai/node.js.map +1 -0
  402. package/dist/utils/cqrs/index.cjs +1036 -0
  403. package/dist/utils/cqrs/index.cjs.map +1 -0
  404. package/dist/{index-CeFiHtAg.d.ts → utils/cqrs/index.d.cts} +7 -37
  405. package/dist/{index-B-_tFaqV.d.cts → utils/cqrs/index.d.ts} +7 -37
  406. package/dist/utils/cqrs/index.js +18 -0
  407. package/dist/utils/cqrs/index.js.map +1 -0
  408. package/dist/utils/demo-shell/index.cjs +865 -0
  409. package/dist/utils/demo-shell/index.cjs.map +1 -0
  410. package/dist/{index-B8YnZpIR.d.ts → utils/demo-shell/index.d.cts} +4 -16
  411. package/dist/{index-Cwv0KWcU.d.cts → utils/demo-shell/index.d.ts} +4 -16
  412. package/dist/utils/demo-shell/index.js +13 -0
  413. package/dist/utils/demo-shell/index.js.map +1 -0
  414. package/dist/utils/domain-templates/index.cjs +732 -0
  415. package/dist/utils/domain-templates/index.cjs.map +1 -0
  416. package/dist/{index-CzLVrjxn.d.ts → utils/domain-templates/index.d.cts} +3 -20
  417. package/dist/{index-BaQaY_IQ.d.cts → utils/domain-templates/index.d.ts} +3 -20
  418. package/dist/utils/domain-templates/index.js +17 -0
  419. package/dist/utils/domain-templates/index.js.map +1 -0
  420. package/dist/utils/graphspec/index.cjs +1174 -0
  421. package/dist/utils/graphspec/index.cjs.map +1 -0
  422. package/dist/{index-CMh5Rz1y.d.ts → utils/graphspec/index.d.cts} +106 -42
  423. package/dist/{index-CS0LTlB8.d.cts → utils/graphspec/index.d.ts} +106 -42
  424. package/dist/utils/graphspec/index.js +35 -0
  425. package/dist/utils/graphspec/index.js.map +1 -0
  426. package/dist/utils/harness/index.cjs +656 -0
  427. package/dist/utils/harness/index.cjs.map +1 -0
  428. package/dist/utils/harness/index.d.cts +542 -0
  429. package/dist/utils/harness/index.d.ts +542 -0
  430. package/dist/utils/harness/index.js +56 -0
  431. package/dist/utils/harness/index.js.map +1 -0
  432. package/dist/utils/index.cjs +17609 -0
  433. package/dist/utils/index.cjs.map +1 -0
  434. package/dist/utils/index.d.cts +96 -0
  435. package/dist/utils/index.d.ts +96 -0
  436. package/dist/utils/index.js +514 -0
  437. package/dist/utils/index.js.map +1 -0
  438. package/dist/utils/inspect/index.cjs +807 -0
  439. package/dist/utils/inspect/index.cjs.map +1 -0
  440. package/dist/utils/inspect/index.d.cts +123 -0
  441. package/dist/utils/inspect/index.d.ts +123 -0
  442. package/dist/utils/inspect/index.js +30 -0
  443. package/dist/utils/inspect/index.js.map +1 -0
  444. package/dist/utils/job-queue/index.cjs +717 -0
  445. package/dist/utils/job-queue/index.cjs.map +1 -0
  446. package/dist/{index-DisjX8a-.d.ts → utils/job-queue/index.d.cts} +5 -26
  447. package/dist/{index-DV_1YuVk.d.cts → utils/job-queue/index.d.ts} +5 -26
  448. package/dist/utils/job-queue/index.js +18 -0
  449. package/dist/utils/job-queue/index.js.map +1 -0
  450. package/dist/utils/memory/index.cjs +1451 -0
  451. package/dist/utils/memory/index.cjs.map +1 -0
  452. package/dist/{index-CZ3r5Rxp.d.ts → utils/memory/index.d.cts} +242 -34
  453. package/dist/{index-B17QddL1.d.cts → utils/memory/index.d.ts} +242 -34
  454. package/dist/utils/memory/index.js +19 -0
  455. package/dist/utils/memory/index.js.map +1 -0
  456. package/dist/utils/messaging/index.cjs +666 -0
  457. package/dist/utils/messaging/index.cjs.map +1 -0
  458. package/dist/utils/messaging/index.d.cts +562 -0
  459. package/dist/utils/messaging/index.d.ts +562 -0
  460. package/dist/utils/messaging/index.js +50 -0
  461. package/dist/utils/messaging/index.js.map +1 -0
  462. package/dist/utils/orchestration/index.cjs +876 -0
  463. package/dist/utils/orchestration/index.cjs.map +1 -0
  464. package/dist/utils/orchestration/index.d.cts +233 -0
  465. package/dist/utils/orchestration/index.d.ts +233 -0
  466. package/dist/utils/orchestration/index.js +19 -0
  467. package/dist/utils/orchestration/index.js.map +1 -0
  468. package/dist/utils/process/index.cjs +743 -0
  469. package/dist/utils/process/index.cjs.map +1 -0
  470. package/dist/{index-p09KSrTN.d.ts → utils/process/index.d.cts} +97 -44
  471. package/dist/{index-CasX6Pfq.d.cts → utils/process/index.d.ts} +97 -44
  472. package/dist/utils/process/index.js +14 -0
  473. package/dist/utils/process/index.js.map +1 -0
  474. package/dist/utils/reactive-layout/index.cjs +1607 -0
  475. package/dist/utils/reactive-layout/index.cjs.map +1 -0
  476. package/dist/{index-B5S8ULbU.d.ts → utils/reactive-layout/index.d.cts} +58 -81
  477. package/dist/{index-Dc4AYqrJ.d.cts → utils/reactive-layout/index.d.ts} +58 -81
  478. package/dist/utils/reactive-layout/index.js +52 -0
  479. package/dist/utils/reactive-layout/index.js.map +1 -0
  480. package/dist/utils/reduction/index.cjs +203 -0
  481. package/dist/utils/reduction/index.cjs.map +1 -0
  482. package/dist/{index-Byu-OpX_.d.ts → utils/reduction/index.d.cts} +6 -17
  483. package/dist/{index-tRCxuAXF.d.cts → utils/reduction/index.d.ts} +6 -17
  484. package/dist/utils/reduction/index.js +14 -0
  485. package/dist/utils/reduction/index.js.map +1 -0
  486. package/dist/utils/resilience/index.cjs +1617 -0
  487. package/dist/utils/resilience/index.cjs.map +1 -0
  488. package/dist/utils/resilience/index.d.cts +9 -0
  489. package/dist/utils/resilience/index.d.ts +9 -0
  490. package/dist/utils/resilience/index.js +44 -0
  491. package/dist/utils/resilience/index.js.map +1 -0
  492. package/dist/utils/surface/index.cjs +1070 -0
  493. package/dist/utils/surface/index.cjs.map +1 -0
  494. package/dist/{index-CYq8vAyV.d.ts → utils/surface/index.d.cts} +7 -58
  495. package/dist/{index-CSOmP7xT.d.cts → utils/surface/index.d.ts} +7 -58
  496. package/dist/utils/surface/index.js +30 -0
  497. package/dist/utils/surface/index.js.map +1 -0
  498. package/dist/utils/topology-view/index.cjs +620 -0
  499. package/dist/utils/topology-view/index.cjs.map +1 -0
  500. package/dist/utils/topology-view/index.d.cts +68 -0
  501. package/dist/utils/topology-view/index.d.ts +68 -0
  502. package/dist/utils/topology-view/index.js +11 -0
  503. package/dist/utils/topology-view/index.js.map +1 -0
  504. package/package.json +664 -584
  505. package/dist/backoff-HPZMEZNF.js +0 -1
  506. package/dist/chunk-2T7U5EU6.js +0 -1
  507. package/dist/chunk-3G5U5QNE.js +0 -5
  508. package/dist/chunk-4VVTGLXJ.js +0 -1
  509. package/dist/chunk-5M4CCMMD.js +0 -45
  510. package/dist/chunk-5QDBSZBV.js +0 -1
  511. package/dist/chunk-5XJ6B66J.js +0 -1
  512. package/dist/chunk-6QZNQS5B.js +0 -1
  513. package/dist/chunk-6X7AFUJV.js +0 -9
  514. package/dist/chunk-7K6PWTDQ.js +0 -1
  515. package/dist/chunk-7LIAPXJB.js +0 -1
  516. package/dist/chunk-7WPU3UHQ.js +0 -1
  517. package/dist/chunk-A5WCQ5NO.js +0 -1
  518. package/dist/chunk-APPIWSGD.js +0 -84
  519. package/dist/chunk-BEZWM2SY.js +0 -1
  520. package/dist/chunk-C72GO4IZ.js +0 -1
  521. package/dist/chunk-CB676TKJ.js +0 -1
  522. package/dist/chunk-CE6TI2TL.js +0 -1
  523. package/dist/chunk-CE72X3WO.js +0 -1
  524. package/dist/chunk-CK2E7BTU.js +0 -1
  525. package/dist/chunk-CLVB32RD.js +0 -1
  526. package/dist/chunk-CRVT7D2P.js +0 -1
  527. package/dist/chunk-D5RFJOZ2.js +0 -1
  528. package/dist/chunk-D7GPHKFH.js +0 -1
  529. package/dist/chunk-DHRX7JX4.js +0 -2
  530. package/dist/chunk-ESMPEKEV.js +0 -1
  531. package/dist/chunk-F672GV32.js +0 -1
  532. package/dist/chunk-FZMYDOWV.js +0 -1
  533. package/dist/chunk-GHBWHMRZ.js +0 -1
  534. package/dist/chunk-GLERH466.js +0 -1
  535. package/dist/chunk-GPW2V3RE.js +0 -1
  536. package/dist/chunk-HIDYF36O.js +0 -1
  537. package/dist/chunk-HITNVN6B.js +0 -3
  538. package/dist/chunk-HY4DJBA7.js +0 -5
  539. package/dist/chunk-KZIEYVXN.js +0 -1
  540. package/dist/chunk-L6NSJVJZ.js +0 -1
  541. package/dist/chunk-N4MQX6JU.js +0 -18
  542. package/dist/chunk-N7FHEL4D.js +0 -1
  543. package/dist/chunk-NTEURFZH.js +0 -1
  544. package/dist/chunk-OIVP6KFV.js +0 -1
  545. package/dist/chunk-OPHBU3LG.js +0 -1
  546. package/dist/chunk-OYQOZP2F.js +0 -5
  547. package/dist/chunk-PTZK576G.js +0 -1
  548. package/dist/chunk-QYADASLV.js +0 -1
  549. package/dist/chunk-ST7UXLWR.js +0 -1
  550. package/dist/chunk-SVY7VUYU.js +0 -1
  551. package/dist/chunk-TK3NWWD4.js +0 -1
  552. package/dist/chunk-TSOYJ743.js +0 -1
  553. package/dist/chunk-UNGSTR4X.js +0 -61
  554. package/dist/chunk-VIMF6LGM.js +0 -1
  555. package/dist/chunk-VJLMUKOI.js +0 -1
  556. package/dist/chunk-VN6RDSK2.js +0 -1
  557. package/dist/chunk-VV4N5P64.js +0 -1
  558. package/dist/chunk-W3I423PS.js +0 -1
  559. package/dist/chunk-WJR24TAG.js +0 -1
  560. package/dist/chunk-XTGKMHSW.js +0 -1
  561. package/dist/chunk-YBB7ZGTY.js +0 -1
  562. package/dist/chunk-Z4NPUARF.js +0 -1
  563. package/dist/chunk-ZGNQRPDT.js +0 -1
  564. package/dist/chunk-ZKPSFFKU.js +0 -1
  565. package/dist/chunk-ZLV5SQSX.js +0 -1
  566. package/dist/content-addressed-storage-4-ST1tYk.d.cts +0 -124
  567. package/dist/content-addressed-storage-DuYMjV7o.d.ts +0 -124
  568. package/dist/core/index.cjs +0 -1
  569. package/dist/core/index.d.cts +0 -3
  570. package/dist/core/index.d.ts +0 -3
  571. package/dist/core/index.js +0 -1
  572. package/dist/decay-BvOWTZ00.d.ts +0 -112
  573. package/dist/decay-CFlLvXUT.d.cts +0 -112
  574. package/dist/extra/browser.cjs +0 -1
  575. package/dist/extra/browser.d.cts +0 -4
  576. package/dist/extra/browser.d.ts +0 -4
  577. package/dist/extra/browser.js +0 -1
  578. package/dist/extra/index.cjs +0 -20
  579. package/dist/extra/index.d.cts +0 -17
  580. package/dist/extra/index.d.ts +0 -17
  581. package/dist/extra/index.js +0 -1
  582. package/dist/extra/node.cjs +0 -2
  583. package/dist/extra/node.js +0 -2
  584. package/dist/extra/operators.cjs +0 -1
  585. package/dist/extra/operators.d.cts +0 -958
  586. package/dist/extra/operators.d.ts +0 -958
  587. package/dist/extra/operators.js +0 -1
  588. package/dist/extra/reactive.cjs +0 -1
  589. package/dist/extra/reactive.d.cts +0 -353
  590. package/dist/extra/reactive.d.ts +0 -353
  591. package/dist/extra/reactive.js +0 -1
  592. package/dist/extra/render/index.cjs +0 -5
  593. package/dist/extra/render/index.js +0 -1
  594. package/dist/extra/sources.cjs +0 -3
  595. package/dist/extra/sources.js +0 -1
  596. package/dist/extra/storage-browser.cjs +0 -1
  597. package/dist/extra/storage-browser.d.cts +0 -37
  598. package/dist/extra/storage-browser.d.ts +0 -37
  599. package/dist/extra/storage-browser.js +0 -1
  600. package/dist/extra/storage-core.cjs +0 -1
  601. package/dist/extra/storage-core.d.cts +0 -28
  602. package/dist/extra/storage-core.d.ts +0 -28
  603. package/dist/extra/storage-core.js +0 -1
  604. package/dist/extra/storage-node.cjs +0 -1
  605. package/dist/extra/storage-node.d.cts +0 -2
  606. package/dist/extra/storage-node.d.ts +0 -2
  607. package/dist/extra/storage-node.js +0 -0
  608. package/dist/extra/storage-tiers-browser.cjs +0 -1
  609. package/dist/extra/storage-tiers-browser.d.cts +0 -120
  610. package/dist/extra/storage-tiers-browser.d.ts +0 -120
  611. package/dist/extra/storage-tiers-browser.js +0 -1
  612. package/dist/extra/storage-tiers-node.cjs +0 -1
  613. package/dist/extra/storage-tiers-node.d.cts +0 -210
  614. package/dist/extra/storage-tiers-node.d.ts +0 -210
  615. package/dist/extra/storage-tiers-node.js +0 -1
  616. package/dist/extra/storage-tiers.cjs +0 -1
  617. package/dist/extra/storage-tiers.d.cts +0 -412
  618. package/dist/extra/storage-tiers.d.ts +0 -412
  619. package/dist/extra/storage-tiers.js +0 -1
  620. package/dist/graph/index.cjs +0 -7
  621. package/dist/graph/index.d.cts +0 -7
  622. package/dist/graph/index.d.ts +0 -7
  623. package/dist/graph/index.js +0 -1
  624. package/dist/graph-CWvEUQAq.d.cts +0 -1861
  625. package/dist/graph-D9LFnda9.d.ts +0 -1861
  626. package/dist/index-5k1T6jl0.d.cts +0 -121
  627. package/dist/index-9770hRuQ.d.cts +0 -779
  628. package/dist/index-B1F8Enjf.d.ts +0 -704
  629. package/dist/index-BHskSB8v.d.ts +0 -3413
  630. package/dist/index-BIYAkbAi.d.cts +0 -26
  631. package/dist/index-BoJ5JHxI.d.ts +0 -557
  632. package/dist/index-BocU7pqs.d.ts +0 -779
  633. package/dist/index-BxNs2HB9.d.cts +0 -1858
  634. package/dist/index-C1T3d7V-.d.cts +0 -704
  635. package/dist/index-C5ri2Axc.d.cts +0 -301
  636. package/dist/index-C9l6OEBL.d.ts +0 -26
  637. package/dist/index-CC-AvFTy.d.cts +0 -557
  638. package/dist/index-CJF1URuX.d.ts +0 -121
  639. package/dist/index-CdTelp1M.d.ts +0 -202
  640. package/dist/index-Cj3WohTd.d.cts +0 -202
  641. package/dist/index-Co7uli2l.d.cts +0 -3413
  642. package/dist/index-D0aciIex.d.cts +0 -209
  643. package/dist/index-DHen9Klo.d.ts +0 -1858
  644. package/dist/index-Yq60JP3s.d.ts +0 -209
  645. package/dist/index-nozs3fFC.d.ts +0 -301
  646. package/dist/node-kK3CvTrR.d.cts +0 -1347
  647. package/dist/node-kK3CvTrR.d.ts +0 -1347
  648. package/dist/patterns/ai/browser.cjs +0 -8
  649. package/dist/patterns/ai/browser.js +0 -3
  650. package/dist/patterns/ai/index.cjs +0 -74
  651. package/dist/patterns/ai/index.d.cts +0 -20
  652. package/dist/patterns/ai/index.d.ts +0 -20
  653. package/dist/patterns/ai/index.js +0 -1
  654. package/dist/patterns/ai/node.cjs +0 -1
  655. package/dist/patterns/ai/node.js +0 -1
  656. package/dist/patterns/cqrs/index.cjs +0 -3
  657. package/dist/patterns/cqrs/index.d.cts +0 -8
  658. package/dist/patterns/cqrs/index.d.ts +0 -8
  659. package/dist/patterns/cqrs/index.js +0 -1
  660. package/dist/patterns/demo-shell/index.cjs +0 -5
  661. package/dist/patterns/demo-shell/index.d.cts +0 -7
  662. package/dist/patterns/demo-shell/index.d.ts +0 -7
  663. package/dist/patterns/demo-shell/index.js +0 -1
  664. package/dist/patterns/domain-templates/index.cjs +0 -3
  665. package/dist/patterns/domain-templates/index.d.cts +0 -6
  666. package/dist/patterns/domain-templates/index.d.ts +0 -6
  667. package/dist/patterns/domain-templates/index.js +0 -1
  668. package/dist/patterns/graphspec/index.cjs +0 -86
  669. package/dist/patterns/graphspec/index.d.cts +0 -8
  670. package/dist/patterns/graphspec/index.d.ts +0 -8
  671. package/dist/patterns/graphspec/index.js +0 -1
  672. package/dist/patterns/harness/index.cjs +0 -48
  673. package/dist/patterns/harness/index.d.cts +0 -13
  674. package/dist/patterns/harness/index.d.ts +0 -13
  675. package/dist/patterns/harness/index.js +0 -1
  676. package/dist/patterns/inspect/index.cjs +0 -3
  677. package/dist/patterns/inspect/index.d.cts +0 -9
  678. package/dist/patterns/inspect/index.d.ts +0 -9
  679. package/dist/patterns/inspect/index.js +0 -1
  680. package/dist/patterns/job-queue/index.cjs +0 -3
  681. package/dist/patterns/job-queue/index.d.cts +0 -9
  682. package/dist/patterns/job-queue/index.d.ts +0 -9
  683. package/dist/patterns/job-queue/index.js +0 -1
  684. package/dist/patterns/memory/index.cjs +0 -3
  685. package/dist/patterns/memory/index.d.cts +0 -8
  686. package/dist/patterns/memory/index.d.ts +0 -8
  687. package/dist/patterns/memory/index.js +0 -1
  688. package/dist/patterns/messaging/index.cjs +0 -3
  689. package/dist/patterns/messaging/index.d.cts +0 -7
  690. package/dist/patterns/messaging/index.d.ts +0 -7
  691. package/dist/patterns/messaging/index.js +0 -1
  692. package/dist/patterns/orchestration/index.cjs +0 -3
  693. package/dist/patterns/orchestration/index.d.cts +0 -8
  694. package/dist/patterns/orchestration/index.d.ts +0 -8
  695. package/dist/patterns/orchestration/index.js +0 -1
  696. package/dist/patterns/process/index.cjs +0 -3
  697. package/dist/patterns/process/index.d.cts +0 -10
  698. package/dist/patterns/process/index.d.ts +0 -10
  699. package/dist/patterns/process/index.js +0 -1
  700. package/dist/patterns/reactive-layout/index.cjs +0 -4
  701. package/dist/patterns/reactive-layout/index.d.cts +0 -7
  702. package/dist/patterns/reactive-layout/index.d.ts +0 -7
  703. package/dist/patterns/reactive-layout/index.js +0 -1
  704. package/dist/patterns/reduction/index.cjs +0 -3
  705. package/dist/patterns/reduction/index.d.cts +0 -6
  706. package/dist/patterns/reduction/index.d.ts +0 -6
  707. package/dist/patterns/reduction/index.js +0 -1
  708. package/dist/patterns/surface/index.cjs +0 -13
  709. package/dist/patterns/surface/index.d.cts +0 -9
  710. package/dist/patterns/surface/index.d.ts +0 -9
  711. package/dist/patterns/surface/index.js +0 -1
  712. package/dist/reactive-log-BKALbfal.d.ts +0 -223
  713. package/dist/reactive-log-DIGdYqQ6.d.cts +0 -223
  714. package/dist/reactive-map-CEFGp8TK.d.cts +0 -296
  715. package/dist/reactive-map-DS_SIAxv.d.ts +0 -296
  716. package/dist/resilience-6LYQJAC5.js +0 -1
  717. package/dist/sugar-DQjFmVqb.d.cts +0 -399
  718. package/dist/sugar-fhLIE7TT.d.ts +0 -399
  719. package/dist/topology-tree-Bcz27hpF.d.cts +0 -25
  720. package/dist/topology-tree-xvaD0fOX.d.ts +0 -25
@@ -0,0 +1,1071 @@
1
+ import {
2
+ fromCron
3
+ } from "./chunk-7EGRP2VX.js";
4
+ import {
5
+ cqrs
6
+ } from "./chunk-NY2PYHNC.js";
7
+ import {
8
+ createWatermarkController,
9
+ toObservable
10
+ } from "./chunk-3QZY5BI7.js";
11
+ import {
12
+ __decorateElement,
13
+ __decoratorStart,
14
+ __export,
15
+ __runInitializers
16
+ } from "./chunk-AZDQPQ3V.js";
17
+
18
+ // src/compat/nestjs/index.ts
19
+ var nestjs_exports = {};
20
+ __export(nestjs_exports, {
21
+ ACTOR_KEY: () => ACTOR_KEY,
22
+ COMMAND_HANDLERS: () => COMMAND_HANDLERS,
23
+ CQRS_EVENT_HANDLERS: () => CQRS_EVENT_HANDLERS,
24
+ CRON_HANDLERS: () => CRON_HANDLERS,
25
+ CommandHandler: () => CommandHandler,
26
+ EVENT_HANDLERS: () => EVENT_HANDLERS,
27
+ EventHandler: () => EventHandler,
28
+ GRAPHREFLY_REQUEST_GRAPH: () => GRAPHREFLY_REQUEST_GRAPH,
29
+ GRAPHREFLY_ROOT_GRAPH: () => GRAPHREFLY_ROOT_GRAPH,
30
+ GraphCron: () => GraphCron,
31
+ GraphInterval: () => GraphInterval,
32
+ GraphReflyEventExplorer: () => GraphReflyEventExplorer,
33
+ GraphReflyGuard: () => GraphReflyGuard,
34
+ GraphReflyGuardImpl: () => GraphReflyGuardImpl,
35
+ GraphReflyModule: () => GraphReflyModule,
36
+ INTERVAL_HANDLERS: () => INTERVAL_HANDLERS,
37
+ InjectCqrsGraph: () => InjectCqrsGraph,
38
+ InjectGraph: () => InjectGraph,
39
+ InjectNode: () => InjectNode,
40
+ ObserveGateway: () => ObserveGateway,
41
+ OnGraphEvent: () => OnGraphEvent,
42
+ QUERY_HANDLERS: () => QUERY_HANDLERS,
43
+ QueryHandler: () => QueryHandler,
44
+ SAGA_HANDLERS: () => SAGA_HANDLERS,
45
+ SagaHandler: () => SagaHandler,
46
+ fromHeader: () => fromHeader,
47
+ fromJwtPayload: () => fromJwtPayload,
48
+ getActor: () => getActor,
49
+ getGraphToken: () => getGraphToken,
50
+ getNodeToken: () => getNodeToken,
51
+ observeSSE: () => observeSSE,
52
+ observeSubscription: () => observeSubscription,
53
+ toObservable: () => toObservable
54
+ });
55
+
56
+ // src/compat/nestjs/decorators.ts
57
+ import { Inject } from "@nestjs/common";
58
+
59
+ // src/compat/nestjs/tokens.ts
60
+ var GRAPHREFLY_ROOT_GRAPH = /* @__PURE__ */ Symbol.for("graphrefly:root-graph");
61
+ var GRAPHREFLY_REQUEST_GRAPH = /* @__PURE__ */ Symbol.for("graphrefly:request-graph");
62
+ function getGraphToken(name) {
63
+ return /* @__PURE__ */ Symbol.for(`graphrefly:graph:${name}`);
64
+ }
65
+ function getNodeToken(path) {
66
+ return /* @__PURE__ */ Symbol.for(`graphrefly:node:${path}`);
67
+ }
68
+
69
+ // src/compat/nestjs/decorators.ts
70
+ var EVENT_HANDLERS = /* @__PURE__ */ new Map();
71
+ var INTERVAL_HANDLERS = /* @__PURE__ */ new Map();
72
+ var CRON_HANDLERS = /* @__PURE__ */ new Map();
73
+ var COMMAND_HANDLERS = /* @__PURE__ */ new Map();
74
+ var CQRS_EVENT_HANDLERS = /* @__PURE__ */ new Map();
75
+ var QUERY_HANDLERS = /* @__PURE__ */ new Map();
76
+ var SAGA_HANDLERS = /* @__PURE__ */ new Map();
77
+ function InjectGraph(name) {
78
+ if (name === "request") return Inject(GRAPHREFLY_REQUEST_GRAPH);
79
+ return Inject(name ? getGraphToken(name) : GRAPHREFLY_ROOT_GRAPH);
80
+ }
81
+ function InjectCqrsGraph(name) {
82
+ return Inject(getGraphToken(name));
83
+ }
84
+ function InjectNode(path) {
85
+ return Inject(getNodeToken(path));
86
+ }
87
+ function OnGraphEvent(nodeName) {
88
+ return (_value, context) => {
89
+ const methodKey = context.name;
90
+ context.addInitializer(function() {
91
+ const ctor = this.constructor;
92
+ const existing = EVENT_HANDLERS.get(ctor) ?? [];
93
+ existing.push({ nodeName, methodKey });
94
+ EVENT_HANDLERS.set(ctor, existing);
95
+ });
96
+ };
97
+ }
98
+ function GraphInterval(ms) {
99
+ return (_value, context) => {
100
+ const methodKey = context.name;
101
+ context.addInitializer(function() {
102
+ const ctor = this.constructor;
103
+ const existing = INTERVAL_HANDLERS.get(ctor) ?? [];
104
+ existing.push({ ms, methodKey });
105
+ INTERVAL_HANDLERS.set(ctor, existing);
106
+ });
107
+ };
108
+ }
109
+ function GraphCron(expr) {
110
+ return (_value, context) => {
111
+ const methodKey = context.name;
112
+ context.addInitializer(function() {
113
+ const ctor = this.constructor;
114
+ const existing = CRON_HANDLERS.get(ctor) ?? [];
115
+ existing.push({ expr, methodKey });
116
+ CRON_HANDLERS.set(ctor, existing);
117
+ });
118
+ };
119
+ }
120
+ function CommandHandler(cqrsName, commandName) {
121
+ return (_value, context) => {
122
+ const methodKey = context.name;
123
+ context.addInitializer(function() {
124
+ const ctor = this.constructor;
125
+ const existing = COMMAND_HANDLERS.get(ctor) ?? [];
126
+ existing.push({ cqrsName, commandName, methodKey });
127
+ COMMAND_HANDLERS.set(ctor, existing);
128
+ });
129
+ };
130
+ }
131
+ function EventHandler(cqrsName, eventName) {
132
+ return (_value, context) => {
133
+ const methodKey = context.name;
134
+ context.addInitializer(function() {
135
+ const ctor = this.constructor;
136
+ const existing = CQRS_EVENT_HANDLERS.get(ctor) ?? [];
137
+ existing.push({ cqrsName, eventName, methodKey });
138
+ CQRS_EVENT_HANDLERS.set(ctor, existing);
139
+ });
140
+ };
141
+ }
142
+ function QueryHandler(cqrsName, projectionName) {
143
+ return (_value, context) => {
144
+ const methodKey = context.name;
145
+ context.addInitializer(function() {
146
+ const ctor = this.constructor;
147
+ const existing = QUERY_HANDLERS.get(ctor) ?? [];
148
+ existing.push({ cqrsName, projectionName, methodKey });
149
+ QUERY_HANDLERS.set(ctor, existing);
150
+ });
151
+ };
152
+ }
153
+ function SagaHandler(cqrsName, sagaName, eventNames) {
154
+ return (_value, context) => {
155
+ const methodKey = context.name;
156
+ context.addInitializer(function() {
157
+ const ctor = this.constructor;
158
+ const existing = SAGA_HANDLERS.get(ctor) ?? [];
159
+ existing.push({ cqrsName, eventNames, sagaName, methodKey });
160
+ SAGA_HANDLERS.set(ctor, existing);
161
+ });
162
+ };
163
+ }
164
+
165
+ // src/compat/nestjs/explorer.ts
166
+ import { DATA } from "@graphrefly/pure-ts/core";
167
+ import { fromTimer } from "@graphrefly/pure-ts/extra";
168
+ var scheduleSeq = 0;
169
+ var GraphReflyEventExplorer = class {
170
+ constructor(graph, moduleRef) {
171
+ this.graph = graph;
172
+ this.moduleRef = moduleRef;
173
+ }
174
+ disposers = [];
175
+ scheduleNodeNames = [];
176
+ onModuleInit() {
177
+ this.wireEvents();
178
+ this.wireIntervals();
179
+ this.wireCrons();
180
+ this.wireCqrsCommands();
181
+ this.wireCqrsEvents();
182
+ this.wireCqrsQueries();
183
+ this.wireCqrsSagas();
184
+ }
185
+ onModuleDestroy() {
186
+ for (const dispose of this.disposers) dispose();
187
+ this.disposers.length = 0;
188
+ for (const name of this.scheduleNodeNames) {
189
+ try {
190
+ this.graph.remove(name);
191
+ } catch {
192
+ }
193
+ }
194
+ this.scheduleNodeNames.length = 0;
195
+ }
196
+ // -----------------------------------------------------------------------
197
+ // @OnGraphEvent — reactive subscription via graph.observe()
198
+ // -----------------------------------------------------------------------
199
+ wireEvents() {
200
+ for (const [ctor, metas] of EVENT_HANDLERS) {
201
+ const instance = this.resolveInstance(ctor);
202
+ if (!instance) continue;
203
+ for (const meta of metas) {
204
+ this.wireEventHandler(instance, meta);
205
+ }
206
+ }
207
+ }
208
+ wireEventHandler(instance, meta) {
209
+ const method = instance[meta.methodKey];
210
+ if (typeof method !== "function") return;
211
+ const bound = method.bind(instance);
212
+ const handle = this.observeNode(meta.nodeName);
213
+ const unsub = handle.subscribe((msgs) => {
214
+ for (const m of msgs) {
215
+ if (m[0] === DATA) {
216
+ bound(m[1]);
217
+ }
218
+ }
219
+ });
220
+ this.disposers.push(unsub);
221
+ }
222
+ // -----------------------------------------------------------------------
223
+ // @GraphInterval — reactive via fromTimer central timer primitive
224
+ // -----------------------------------------------------------------------
225
+ wireIntervals() {
226
+ for (const [ctor, metas] of INTERVAL_HANDLERS) {
227
+ const instance = this.resolveInstance(ctor);
228
+ if (!instance) continue;
229
+ for (const meta of metas) {
230
+ this.wireIntervalHandler(instance, ctor, meta);
231
+ }
232
+ }
233
+ }
234
+ wireIntervalHandler(instance, ctor, meta) {
235
+ const method = instance[meta.methodKey];
236
+ if (typeof method !== "function") return;
237
+ const bound = method.bind(instance);
238
+ const className = ctor.name ?? "anonymous";
239
+ const nodeName = `__schedule__.${className}.${String(meta.methodKey)}.${scheduleSeq++}`;
240
+ const timerNode = fromTimer(meta.ms, { period: meta.ms, name: nodeName });
241
+ this.graph.add(timerNode);
242
+ this.scheduleNodeNames.push(nodeName);
243
+ const handle = this.observeNode(nodeName);
244
+ const unsub = handle.subscribe((msgs) => {
245
+ for (const m of msgs) {
246
+ if (m[0] === DATA) bound(m[1]);
247
+ }
248
+ });
249
+ this.disposers.push(unsub);
250
+ }
251
+ // -----------------------------------------------------------------------
252
+ // @GraphCron — reactive via fromCron central timer primitive
253
+ // -----------------------------------------------------------------------
254
+ wireCrons() {
255
+ for (const [ctor, metas] of CRON_HANDLERS) {
256
+ const instance = this.resolveInstance(ctor);
257
+ if (!instance) continue;
258
+ for (const meta of metas) {
259
+ this.wireCronHandler(instance, ctor, meta);
260
+ }
261
+ }
262
+ }
263
+ wireCronHandler(instance, ctor, meta) {
264
+ const method = instance[meta.methodKey];
265
+ if (typeof method !== "function") return;
266
+ const bound = method.bind(instance);
267
+ const className = ctor.name ?? "anonymous";
268
+ const nodeName = `__schedule__.${className}.${String(meta.methodKey)}.${scheduleSeq++}`;
269
+ const cronNode = fromCron(meta.expr, { name: nodeName });
270
+ this.graph.add(cronNode);
271
+ this.scheduleNodeNames.push(nodeName);
272
+ const handle = this.observeNode(nodeName);
273
+ const unsub = handle.subscribe((msgs) => {
274
+ for (const m of msgs) {
275
+ if (m[0] === DATA) bound(m[1]);
276
+ }
277
+ });
278
+ this.disposers.push(unsub);
279
+ }
280
+ // -----------------------------------------------------------------------
281
+ // @CommandHandler — register method as CqrsGraph command handler
282
+ // -----------------------------------------------------------------------
283
+ wireCqrsCommands() {
284
+ for (const [ctor, metas] of COMMAND_HANDLERS) {
285
+ const instance = this.resolveInstance(ctor);
286
+ if (!instance) continue;
287
+ for (const meta of metas) {
288
+ this.wireCqrsCommand(instance, meta);
289
+ }
290
+ }
291
+ }
292
+ wireCqrsCommand(instance, meta) {
293
+ const method = instance[meta.methodKey];
294
+ if (typeof method !== "function") return;
295
+ const bound = method.bind(instance);
296
+ const cqrsGraph = this.resolveCqrsGraph(meta.cqrsName);
297
+ if (!cqrsGraph) return;
298
+ cqrsGraph.command(meta.commandName, bound);
299
+ }
300
+ // -----------------------------------------------------------------------
301
+ // @EventHandler — subscribe method to CQRS event stream
302
+ // -----------------------------------------------------------------------
303
+ wireCqrsEvents() {
304
+ for (const [ctor, metas] of CQRS_EVENT_HANDLERS) {
305
+ const instance = this.resolveInstance(ctor);
306
+ if (!instance) continue;
307
+ for (const meta of metas) {
308
+ this.wireCqrsEventHandler(instance, meta);
309
+ }
310
+ }
311
+ }
312
+ wireCqrsEventHandler(instance, meta) {
313
+ const method = instance[meta.methodKey];
314
+ if (typeof method !== "function") return;
315
+ const bound = method.bind(instance);
316
+ const cqrsGraph = this.resolveCqrsGraph(meta.cqrsName);
317
+ if (!cqrsGraph) return;
318
+ cqrsGraph.event(meta.eventName);
319
+ const eventNode = cqrsGraph.resolve(meta.eventName);
320
+ const existingEntries = eventNode.cache;
321
+ let lastSeq = existingEntries && existingEntries.length > 0 ? existingEntries[existingEntries.length - 1].seq : 0;
322
+ const handle = this.observeNodeOn(cqrsGraph, meta.eventName);
323
+ const unsub = handle.subscribe((msgs) => {
324
+ for (const m of msgs) {
325
+ if (m[0] === DATA) {
326
+ const entries = m[1];
327
+ for (const entry of entries) {
328
+ if (entry.seq > lastSeq) {
329
+ bound(entry);
330
+ lastSeq = entry.seq;
331
+ }
332
+ }
333
+ }
334
+ }
335
+ });
336
+ this.disposers.push(unsub);
337
+ }
338
+ // -----------------------------------------------------------------------
339
+ // @QueryHandler — subscribe method to CQRS projection changes
340
+ // -----------------------------------------------------------------------
341
+ wireCqrsQueries() {
342
+ for (const [ctor, metas] of QUERY_HANDLERS) {
343
+ const instance = this.resolveInstance(ctor);
344
+ if (!instance) continue;
345
+ for (const meta of metas) {
346
+ this.wireCqrsQuery(instance, meta);
347
+ }
348
+ }
349
+ }
350
+ wireCqrsQuery(instance, meta) {
351
+ const method = instance[meta.methodKey];
352
+ if (typeof method !== "function") return;
353
+ const bound = method.bind(instance);
354
+ const cqrsGraph = this.resolveCqrsGraph(meta.cqrsName);
355
+ if (!cqrsGraph) return;
356
+ const handle = this.observeNodeOn(cqrsGraph, meta.projectionName);
357
+ const unsub = handle.subscribe((msgs) => {
358
+ for (const m of msgs) {
359
+ if (m[0] === DATA) {
360
+ bound(m[1]);
361
+ }
362
+ }
363
+ });
364
+ this.disposers.push(unsub);
365
+ }
366
+ // -----------------------------------------------------------------------
367
+ // @SagaHandler — register method as CqrsGraph saga (subgraph side effect)
368
+ // -----------------------------------------------------------------------
369
+ wireCqrsSagas() {
370
+ for (const [ctor, metas] of SAGA_HANDLERS) {
371
+ const instance = this.resolveInstance(ctor);
372
+ if (!instance) continue;
373
+ for (const meta of metas) {
374
+ this.wireCqrsSaga(instance, meta);
375
+ }
376
+ }
377
+ }
378
+ wireCqrsSaga(instance, meta) {
379
+ const method = instance[meta.methodKey];
380
+ if (typeof method !== "function") return;
381
+ const bound = method.bind(instance);
382
+ const cqrsGraph = this.resolveCqrsGraph(meta.cqrsName);
383
+ if (!cqrsGraph) return;
384
+ cqrsGraph.saga(meta.sagaName, meta.eventNames, bound);
385
+ }
386
+ // -----------------------------------------------------------------------
387
+ // Helpers
388
+ // -----------------------------------------------------------------------
389
+ observeNode(name) {
390
+ return this.graph.observe(name);
391
+ }
392
+ observeNodeOn(graph, name) {
393
+ return graph.observe(name);
394
+ }
395
+ resolveCqrsGraph(name) {
396
+ try {
397
+ return this.moduleRef.get(getGraphToken(name), { strict: false });
398
+ } catch {
399
+ console.warn(
400
+ `[GraphReFly] CqrsGraph "${name}" not found in DI \u2014 did you import GraphReflyModule.forCqrs({ name: "${name}" })?`
401
+ );
402
+ return null;
403
+ }
404
+ }
405
+ resolveInstance(ctor) {
406
+ try {
407
+ return this.moduleRef.get(ctor, { strict: false });
408
+ } catch {
409
+ return null;
410
+ }
411
+ }
412
+ };
413
+
414
+ // src/compat/nestjs/gateway.ts
415
+ import {
416
+ COMPLETE,
417
+ DATA as DATA2,
418
+ ERROR,
419
+ TEARDOWN
420
+ } from "@graphrefly/pure-ts/core";
421
+ function observeSSE(graph, path, opts) {
422
+ const { actor, serialize = defaultSerialize, keepAliveMs, signal } = opts ?? {};
423
+ const encoder = new TextEncoder();
424
+ let stop;
425
+ const useBackpressure = opts?.highWaterMark != null;
426
+ let wm;
427
+ let pullResolve;
428
+ const taggedBuf = [];
429
+ let closed = false;
430
+ return new ReadableStream({
431
+ start(controller) {
432
+ let keepAlive;
433
+ let unsub = () => {
434
+ };
435
+ const close = () => {
436
+ if (closed) return;
437
+ closed = true;
438
+ if (keepAlive !== void 0) clearInterval(keepAlive);
439
+ signal?.removeEventListener("abort", onAbort);
440
+ unsub();
441
+ wm?.dispose();
442
+ pullResolve?.();
443
+ pullResolve = void 0;
444
+ for (const entry of taggedBuf) controller.enqueue(entry.frame);
445
+ taggedBuf.length = 0;
446
+ controller.close();
447
+ };
448
+ stop = close;
449
+ const onAbort = () => close();
450
+ const handle = graph.observe(path, { actor });
451
+ if (useBackpressure) {
452
+ wm = createWatermarkController((msgs) => handle.up(msgs), {
453
+ highWaterMark: opts.highWaterMark,
454
+ lowWaterMark: opts.lowWaterMark ?? Math.floor(opts.highWaterMark / 2)
455
+ });
456
+ }
457
+ unsub = handle.subscribe((msgs) => {
458
+ for (const msg of msgs) {
459
+ if (closed) return;
460
+ const t = msg[0];
461
+ if (t === DATA2) {
462
+ const frame = encoder.encode(sseFrame("data", serialize(msg[1])));
463
+ if (useBackpressure) {
464
+ taggedBuf.push({ frame, counted: true });
465
+ wm.onEnqueue();
466
+ pullResolve?.();
467
+ pullResolve = void 0;
468
+ } else {
469
+ controller.enqueue(frame);
470
+ }
471
+ } else if (t === ERROR) {
472
+ const frame = encoder.encode(sseFrame("error", serialize(msg[1])));
473
+ if (useBackpressure) {
474
+ taggedBuf.push({ frame, counted: false });
475
+ pullResolve?.();
476
+ pullResolve = void 0;
477
+ } else {
478
+ controller.enqueue(frame);
479
+ }
480
+ close();
481
+ return;
482
+ } else if (t === COMPLETE || t === TEARDOWN) {
483
+ if (t === COMPLETE) {
484
+ const frame = encoder.encode(sseFrame("complete"));
485
+ if (useBackpressure) {
486
+ taggedBuf.push({ frame, counted: false });
487
+ pullResolve?.();
488
+ pullResolve = void 0;
489
+ } else {
490
+ controller.enqueue(frame);
491
+ }
492
+ }
493
+ close();
494
+ return;
495
+ }
496
+ }
497
+ });
498
+ if (keepAliveMs !== void 0 && keepAliveMs > 0) {
499
+ keepAlive = setInterval(() => {
500
+ if (closed) return;
501
+ if (useBackpressure) {
502
+ taggedBuf.push({ frame: encoder.encode(": keepalive\n\n"), counted: false });
503
+ pullResolve?.();
504
+ pullResolve = void 0;
505
+ } else {
506
+ controller.enqueue(encoder.encode(": keepalive\n\n"));
507
+ }
508
+ }, keepAliveMs);
509
+ }
510
+ if (signal?.aborted) onAbort();
511
+ else signal?.addEventListener("abort", onAbort, { once: true });
512
+ },
513
+ pull(controller) {
514
+ if (!useBackpressure) return;
515
+ if (closed) return;
516
+ if (taggedBuf.length > 0) {
517
+ const entry = taggedBuf.shift();
518
+ controller.enqueue(entry.frame);
519
+ if (entry.counted) wm.onDequeue();
520
+ return;
521
+ }
522
+ return new Promise((resolve) => {
523
+ pullResolve = resolve;
524
+ });
525
+ },
526
+ cancel() {
527
+ try {
528
+ stop?.();
529
+ } catch {
530
+ }
531
+ }
532
+ });
533
+ }
534
+ function observeSubscription(graph, path, opts) {
535
+ const { actor, filter } = opts ?? {};
536
+ const queue = [];
537
+ const waiters = [];
538
+ let disposed = false;
539
+ const handle = graph.observe(path, { actor });
540
+ const wm = opts?.highWaterMark != null ? createWatermarkController((msgs) => handle.up(msgs), {
541
+ highWaterMark: opts.highWaterMark,
542
+ lowWaterMark: opts.lowWaterMark ?? Math.floor(opts.highWaterMark / 2)
543
+ }) : void 0;
544
+ const dispose = () => {
545
+ if (disposed) return;
546
+ disposed = true;
547
+ wm?.dispose();
548
+ unsub();
549
+ };
550
+ const push = (item) => {
551
+ if (disposed) return;
552
+ if (waiters.length > 0) {
553
+ const w = waiters.shift();
554
+ if (item.done && item.error) w.reject(item.error);
555
+ else if (item.done) w.resolve({ done: true, value: void 0 });
556
+ else w.resolve({ done: false, value: item.value });
557
+ } else {
558
+ queue.push(item);
559
+ if (!item.done) wm?.onEnqueue();
560
+ }
561
+ };
562
+ const unsub = handle.subscribe((msgs) => {
563
+ for (const msg of msgs) {
564
+ const t = msg[0];
565
+ if (t === DATA2) {
566
+ const value = msg[1];
567
+ if (filter && !filter(value)) continue;
568
+ push({ done: false, value });
569
+ } else if (t === ERROR) {
570
+ const err = msg[1] instanceof Error ? msg[1] : new Error(String(msg[1]));
571
+ push({ done: true, error: err });
572
+ dispose();
573
+ return;
574
+ } else if (t === COMPLETE || t === TEARDOWN) {
575
+ push({ done: true });
576
+ dispose();
577
+ return;
578
+ }
579
+ }
580
+ });
581
+ const iterator = {
582
+ next() {
583
+ if (queue.length > 0) {
584
+ const item = queue.shift();
585
+ if (!item.done) wm?.onDequeue();
586
+ if (item.done && item.error) return Promise.reject(item.error);
587
+ return Promise.resolve(
588
+ item.done ? { done: true, value: void 0 } : { done: false, value: item.value }
589
+ );
590
+ }
591
+ if (disposed) return Promise.resolve({ done: true, value: void 0 });
592
+ return new Promise((resolve, reject) => {
593
+ waiters.push({ resolve, reject });
594
+ });
595
+ },
596
+ return() {
597
+ dispose();
598
+ for (const w of waiters) w.resolve({ done: true, value: void 0 });
599
+ waiters.length = 0;
600
+ return Promise.resolve({ done: true, value: void 0 });
601
+ },
602
+ throw(err) {
603
+ dispose();
604
+ return Promise.reject(err);
605
+ },
606
+ [Symbol.asyncIterator]() {
607
+ return this;
608
+ }
609
+ };
610
+ return iterator;
611
+ }
612
+ var ObserveGateway = class {
613
+ constructor(graph, opts) {
614
+ this.graph = graph;
615
+ this.extractActor = opts?.extractActor ?? (() => void 0);
616
+ this.parse = opts?.parse ?? defaultParseCommand;
617
+ this.highWaterMark = opts?.highWaterMark;
618
+ this.lowWaterMark = opts?.lowWaterMark;
619
+ }
620
+ clients = /* @__PURE__ */ new Map();
621
+ extractActor;
622
+ parse;
623
+ highWaterMark;
624
+ lowWaterMark;
625
+ /**
626
+ * Register a new client. Call from `handleConnection`.
627
+ */
628
+ handleConnection(client) {
629
+ if (!this.clients.has(client)) {
630
+ this.clients.set(client, /* @__PURE__ */ new Map());
631
+ }
632
+ }
633
+ /**
634
+ * Unregister a client and dispose all its subscriptions. Call from `handleDisconnect`.
635
+ */
636
+ handleDisconnect(client) {
637
+ const subs = this.clients.get(client);
638
+ if (!subs) return;
639
+ for (const entry of subs.values()) {
640
+ entry.wm?.dispose();
641
+ entry.unsub();
642
+ }
643
+ this.clients.delete(client);
644
+ }
645
+ /**
646
+ * Handle an incoming client message (subscribe/unsubscribe/ack command).
647
+ *
648
+ * @param client - The WebSocket client reference.
649
+ * @param raw - Raw message data (string or parsed object).
650
+ * @param send - Function to send a message back to the client.
651
+ * Defaults to `client.send(JSON.stringify(msg))`.
652
+ */
653
+ handleMessage(client, raw, send) {
654
+ const sender = send ?? defaultSend.bind(null, client);
655
+ let cmd;
656
+ try {
657
+ cmd = typeof raw === "string" ? this.parse(raw) : raw;
658
+ } catch {
659
+ sender({ type: "err", message: "invalid command" });
660
+ return;
661
+ }
662
+ if (cmd.type === "subscribe") {
663
+ this.subscribe(client, cmd.path, sender);
664
+ } else if (cmd.type === "unsubscribe") {
665
+ this.unsubscribe(client, cmd.path, sender);
666
+ } else if (cmd.type === "ack") {
667
+ this.ack(client, cmd.path, cmd.count ?? 1);
668
+ } else {
669
+ sender({ type: "err", message: `unknown command type: ${cmd.type}` });
670
+ }
671
+ }
672
+ /**
673
+ * Number of active subscriptions for a client. Useful for tests.
674
+ */
675
+ subscriptionCount(client) {
676
+ return this.clients.get(client)?.size ?? 0;
677
+ }
678
+ /**
679
+ * Dispose all clients and subscriptions.
680
+ */
681
+ destroy() {
682
+ for (const [client] of this.clients) {
683
+ this.handleDisconnect(client);
684
+ }
685
+ }
686
+ // -----------------------------------------------------------------------
687
+ // Internal
688
+ // -----------------------------------------------------------------------
689
+ subscribe(client, path, send) {
690
+ let subs = this.clients.get(client);
691
+ if (!subs) {
692
+ subs = /* @__PURE__ */ new Map();
693
+ this.clients.set(client, subs);
694
+ }
695
+ if (subs.has(path)) {
696
+ send({ type: "subscribed", path });
697
+ return;
698
+ }
699
+ const actor = this.extractActor(client);
700
+ let handle;
701
+ try {
702
+ handle = this.graph.observe(path, { actor });
703
+ } catch (err) {
704
+ const message = err instanceof Error ? err.message : String(err);
705
+ send({ type: "err", message });
706
+ return;
707
+ }
708
+ const wm = this.highWaterMark != null ? createWatermarkController((msgs) => handle.up(msgs), {
709
+ highWaterMark: this.highWaterMark,
710
+ lowWaterMark: this.lowWaterMark ?? Math.floor(this.highWaterMark / 2)
711
+ }) : void 0;
712
+ const cleanup = () => {
713
+ wm?.dispose();
714
+ unsub();
715
+ subs.delete(path);
716
+ };
717
+ const unsub = handle.subscribe((msgs) => {
718
+ for (const msg of msgs) {
719
+ const t = msg[0];
720
+ if (t === DATA2) {
721
+ wm?.onEnqueue();
722
+ trySend(send, { type: "data", path, value: msg[1] });
723
+ } else if (t === ERROR) {
724
+ const errMsg = msg[1] instanceof Error ? msg[1].message : String(msg[1]);
725
+ trySend(send, { type: "error", path, error: errMsg });
726
+ cleanup();
727
+ return;
728
+ } else if (t === COMPLETE || t === TEARDOWN) {
729
+ trySend(send, { type: "complete", path });
730
+ cleanup();
731
+ return;
732
+ }
733
+ }
734
+ });
735
+ subs.set(path, { unsub, wm });
736
+ send({ type: "subscribed", path });
737
+ }
738
+ unsubscribe(client, path, send) {
739
+ const subs = this.clients.get(client);
740
+ const entry = subs?.get(path);
741
+ if (entry) {
742
+ entry.wm?.dispose();
743
+ entry.unsub();
744
+ subs.delete(path);
745
+ }
746
+ send({ type: "unsubscribed", path });
747
+ }
748
+ ack(client, path, count) {
749
+ const entry = this.clients.get(client)?.get(path);
750
+ if (!entry?.wm) return;
751
+ const n = Math.min(Math.max(0, Math.floor(count)), 1024);
752
+ for (let i = 0; i < n; i++) entry.wm.onDequeue();
753
+ }
754
+ };
755
+ function defaultSerialize(value) {
756
+ if (value instanceof Error) return value.message;
757
+ try {
758
+ return JSON.stringify(value);
759
+ } catch {
760
+ return String(value);
761
+ }
762
+ }
763
+ function sseFrame(event, data) {
764
+ let frame = `event: ${event}
765
+ `;
766
+ if (data !== void 0) {
767
+ for (const line of data.split("\n")) {
768
+ frame += `data: ${line}
769
+ `;
770
+ }
771
+ }
772
+ frame += "\n";
773
+ return frame;
774
+ }
775
+ function defaultParseCommand(data) {
776
+ return JSON.parse(data);
777
+ }
778
+ function defaultSend(client, msg) {
779
+ try {
780
+ client.send(JSON.stringify(msg));
781
+ } catch {
782
+ }
783
+ }
784
+ function trySend(send, msg) {
785
+ try {
786
+ send(msg);
787
+ } catch {
788
+ }
789
+ }
790
+
791
+ // src/compat/nestjs/guard.ts
792
+ import { DEFAULT_ACTOR, normalizeActor } from "@graphrefly/pure-ts/core";
793
+ var ACTOR_KEY = "graphReflyActor";
794
+ function fromJwtPayload(mapping) {
795
+ return (context) => {
796
+ const req = context.switchToHttp().getRequest();
797
+ const user = req?.user;
798
+ if (user == null) return void 0;
799
+ if (mapping) return mapping(user);
800
+ return user;
801
+ };
802
+ }
803
+ function fromHeader(headerName = "x-graphrefly-actor") {
804
+ return (context) => {
805
+ const req = context.switchToHttp().getRequest();
806
+ const raw = req?.headers?.[headerName.toLowerCase()];
807
+ if (typeof raw !== "string" || raw.length === 0) return void 0;
808
+ try {
809
+ return JSON.parse(raw);
810
+ } catch {
811
+ return void 0;
812
+ }
813
+ };
814
+ }
815
+ function getActor(req) {
816
+ const actor = req?.[ACTOR_KEY];
817
+ return actor != null ? normalizeActor(actor) : DEFAULT_ACTOR;
818
+ }
819
+ var GraphReflyGuardImpl = class {
820
+ constructor(extractor) {
821
+ this.extractor = extractor;
822
+ }
823
+ canActivate(context) {
824
+ const actor = normalizeActor(this.extractor(context));
825
+ const req = context.switchToHttp().getRequest();
826
+ if (req != null) {
827
+ req[ACTOR_KEY] = actor;
828
+ }
829
+ return true;
830
+ }
831
+ };
832
+ function GraphReflyGuard(extractor) {
833
+ return new GraphReflyGuardImpl(extractor ?? fromJwtPayload());
834
+ }
835
+
836
+ // src/compat/nestjs/module.ts
837
+ import { Graph } from "@graphrefly/pure-ts/graph";
838
+ import {
839
+ Module,
840
+ Scope
841
+ } from "@nestjs/common";
842
+ import { ModuleRef } from "@nestjs/core";
843
+ var GraphReflyRootLifecycle = class {
844
+ constructor(graph) {
845
+ this.graph = graph;
846
+ }
847
+ onModuleDestroy() {
848
+ this.graph.destroy();
849
+ }
850
+ };
851
+ var GraphReflyRequestLifecycle = class {
852
+ graph = new Graph("request");
853
+ onModuleDestroy() {
854
+ this.graph.destroy();
855
+ }
856
+ };
857
+ var _GraphReflyModule_decorators, _init;
858
+ _GraphReflyModule_decorators = [Module({})];
859
+ var _GraphReflyModule = class _GraphReflyModule {
860
+ /**
861
+ * Register the root `Graph` singleton in the NestJS DI container.
862
+ *
863
+ * The root graph is `@Global()` — injectable everywhere without importing
864
+ * the module again. Use `@InjectGraph()` to inject it.
865
+ *
866
+ * Lifecycle:
867
+ * - **init:** Graph created in factory. If `build` is provided, it runs
868
+ * first (registers nodes/mounts). If `snapshot` is provided, values
869
+ * are restored via `graph.restore()`.
870
+ * - **destroy:** Calls `graph.destroy()` — sends `[[TEARDOWN]]` to all
871
+ * nodes, including mounted feature subgraphs (cascading teardown).
872
+ */
873
+ static forRoot(opts) {
874
+ const options = opts ?? {};
875
+ const graphName = options.name ?? "root";
876
+ const providers = [
877
+ {
878
+ provide: GRAPHREFLY_ROOT_GRAPH,
879
+ useFactory: () => {
880
+ const g = new Graph(graphName);
881
+ if (options.build) options.build(g);
882
+ if (options.snapshot) g.restore(options.snapshot);
883
+ return g;
884
+ }
885
+ },
886
+ {
887
+ provide: /* @__PURE__ */ Symbol.for("graphrefly:root-lifecycle"),
888
+ useFactory: (graph) => new GraphReflyRootLifecycle(graph),
889
+ inject: [GRAPHREFLY_ROOT_GRAPH]
890
+ },
891
+ {
892
+ provide: GraphReflyEventExplorer,
893
+ useFactory: (graph, moduleRef) => new GraphReflyEventExplorer(graph, moduleRef),
894
+ inject: [GRAPHREFLY_ROOT_GRAPH, ModuleRef]
895
+ }
896
+ ];
897
+ if (options.nodes) {
898
+ for (const path of options.nodes) {
899
+ providers.push({
900
+ provide: getNodeToken(path),
901
+ useFactory: (graph) => graph.resolve(path),
902
+ inject: [GRAPHREFLY_ROOT_GRAPH]
903
+ });
904
+ }
905
+ }
906
+ if (options.requestScope) {
907
+ providers.push(
908
+ {
909
+ provide: /* @__PURE__ */ Symbol.for("graphrefly:request-lifecycle"),
910
+ useFactory: () => new GraphReflyRequestLifecycle(),
911
+ scope: Scope.REQUEST
912
+ },
913
+ {
914
+ provide: GRAPHREFLY_REQUEST_GRAPH,
915
+ useFactory: (lifecycle) => lifecycle.graph,
916
+ inject: [/* @__PURE__ */ Symbol.for("graphrefly:request-lifecycle")],
917
+ scope: Scope.REQUEST
918
+ }
919
+ );
920
+ }
921
+ return {
922
+ module: _GraphReflyModule,
923
+ global: true,
924
+ providers,
925
+ exports: [
926
+ GRAPHREFLY_ROOT_GRAPH,
927
+ ...(options.nodes ?? []).map(getNodeToken),
928
+ ...options.requestScope ? [GRAPHREFLY_REQUEST_GRAPH] : []
929
+ ]
930
+ };
931
+ }
932
+ /**
933
+ * Register a feature subgraph that auto-mounts into the root graph.
934
+ *
935
+ * The feature graph is created in the factory, built/restored, then
936
+ * mounted into root via `root.mount(name, featureGraph)`. On app
937
+ * shutdown, root's `graph.destroy()` cascades TEARDOWN through all
938
+ * mounted subgraphs (no explicit remove needed).
939
+ *
940
+ * Node tokens are auto-qualified as `featureName::path` to prevent
941
+ * collisions between features declaring nodes with the same local name.
942
+ *
943
+ * Injectable via `@InjectGraph(name)`.
944
+ */
945
+ static forFeature(opts) {
946
+ const providers = [
947
+ {
948
+ provide: getGraphToken(opts.name),
949
+ useFactory: (rootGraph) => {
950
+ const g = new Graph(opts.name);
951
+ if (opts.build) opts.build(g);
952
+ if (opts.snapshot) g.restore(opts.snapshot);
953
+ rootGraph.mount(opts.name, g);
954
+ return g;
955
+ },
956
+ inject: [GRAPHREFLY_ROOT_GRAPH]
957
+ }
958
+ ];
959
+ if (opts.nodes) {
960
+ for (const path of opts.nodes) {
961
+ providers.push({
962
+ provide: getNodeToken(`${opts.name}::${path}`),
963
+ useFactory: (graph) => graph.resolve(path),
964
+ inject: [getGraphToken(opts.name)]
965
+ });
966
+ }
967
+ }
968
+ return {
969
+ module: _GraphReflyModule,
970
+ providers,
971
+ exports: [
972
+ getGraphToken(opts.name),
973
+ ...(opts.nodes ?? []).map((p) => getNodeToken(`${opts.name}::${p}`))
974
+ ]
975
+ };
976
+ }
977
+ /**
978
+ * Register a CQRS subgraph that auto-mounts into the root graph.
979
+ *
980
+ * Creates a `CqrsGraph` via the `cqrs()` factory (roadmap §4.5), mounts it
981
+ * into the root graph, and exposes it for DI via `@InjectGraph(name)`.
982
+ *
983
+ * CQRS decorators (`@CommandHandler`, `@EventHandler`, `@QueryHandler`,
984
+ * `@SagaHandler`) are discovered by the explorer and wired to this graph
985
+ * on module init.
986
+ *
987
+ * @example
988
+ * ```ts
989
+ * GraphReflyModule.forCqrs({
990
+ * name: "orders",
991
+ * build: (g) => {
992
+ * g.event("orderPlaced");
993
+ * g.projection({ name: "orderCount", events: ["orderPlaced"], reducer: (_s, evts) => evts.length, initial: 0 });
994
+ * },
995
+ * })
996
+ * ```
997
+ */
998
+ static forCqrs(opts) {
999
+ const providers = [
1000
+ {
1001
+ provide: getGraphToken(opts.name),
1002
+ useFactory: (rootGraph) => {
1003
+ const g = cqrs(opts.name, opts.cqrs);
1004
+ if (opts.eventStorage) g.attachEventStorage(opts.eventStorage);
1005
+ if (opts.build) opts.build(g);
1006
+ rootGraph.mount(opts.name, g);
1007
+ return g;
1008
+ },
1009
+ inject: [GRAPHREFLY_ROOT_GRAPH]
1010
+ }
1011
+ ];
1012
+ if (opts.nodes) {
1013
+ for (const path of opts.nodes) {
1014
+ providers.push({
1015
+ provide: getNodeToken(`${opts.name}::${path}`),
1016
+ useFactory: (graph) => graph.resolve(path),
1017
+ inject: [getGraphToken(opts.name)]
1018
+ });
1019
+ }
1020
+ }
1021
+ return {
1022
+ module: _GraphReflyModule,
1023
+ providers,
1024
+ exports: [
1025
+ getGraphToken(opts.name),
1026
+ ...(opts.nodes ?? []).map((p) => getNodeToken(`${opts.name}::${p}`))
1027
+ ]
1028
+ };
1029
+ }
1030
+ };
1031
+ _init = __decoratorStart(null);
1032
+ _GraphReflyModule = __decorateElement(_init, 0, "GraphReflyModule", _GraphReflyModule_decorators, _GraphReflyModule);
1033
+ __runInitializers(_init, 1, _GraphReflyModule);
1034
+ var GraphReflyModule = _GraphReflyModule;
1035
+
1036
+ export {
1037
+ GRAPHREFLY_ROOT_GRAPH,
1038
+ GRAPHREFLY_REQUEST_GRAPH,
1039
+ getGraphToken,
1040
+ getNodeToken,
1041
+ EVENT_HANDLERS,
1042
+ INTERVAL_HANDLERS,
1043
+ CRON_HANDLERS,
1044
+ COMMAND_HANDLERS,
1045
+ CQRS_EVENT_HANDLERS,
1046
+ QUERY_HANDLERS,
1047
+ SAGA_HANDLERS,
1048
+ InjectGraph,
1049
+ InjectCqrsGraph,
1050
+ InjectNode,
1051
+ OnGraphEvent,
1052
+ GraphInterval,
1053
+ GraphCron,
1054
+ CommandHandler,
1055
+ EventHandler,
1056
+ QueryHandler,
1057
+ SagaHandler,
1058
+ GraphReflyEventExplorer,
1059
+ observeSSE,
1060
+ observeSubscription,
1061
+ ObserveGateway,
1062
+ ACTOR_KEY,
1063
+ fromJwtPayload,
1064
+ fromHeader,
1065
+ getActor,
1066
+ GraphReflyGuardImpl,
1067
+ GraphReflyGuard,
1068
+ GraphReflyModule,
1069
+ nestjs_exports
1070
+ };
1071
+ //# sourceMappingURL=chunk-LBAJK24K.js.map