@graphrefly/graphrefly 0.45.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.
- package/README.md +1 -2
- package/dist/_internal-B23BagFd.d.cts +33 -0
- package/dist/_internal-B23BagFd.d.ts +33 -0
- package/dist/adaptive-rate-limiter-Dch_xYIi.d.cts +111 -0
- package/dist/adaptive-rate-limiter-Dch_xYIi.d.ts +111 -0
- package/dist/agents-C0Ji9ldU.d.cts +629 -0
- package/dist/agents-C9zexT7I.d.ts +629 -0
- package/dist/audit-BAXb3VOg.d.ts +246 -0
- package/dist/audit-C_bPfkqS.d.cts +246 -0
- package/dist/backoff-7KIK3WQW.js +24 -0
- package/dist/backoff-7KIK3WQW.js.map +1 -0
- package/dist/backoff-Bnb9OoPh.d.cts +6 -0
- package/dist/backoff-Bnb9OoPh.d.ts +6 -0
- package/dist/base/composition/index.cjs +811 -0
- package/dist/base/composition/index.cjs.map +1 -0
- package/dist/base/composition/index.d.cts +469 -0
- package/dist/base/composition/index.d.ts +469 -0
- package/dist/base/composition/index.js +40 -0
- package/dist/base/composition/index.js.map +1 -0
- package/dist/base/index.cjs +6336 -0
- package/dist/base/index.cjs.map +1 -0
- package/dist/base/index.d.cts +22 -0
- package/dist/base/index.d.ts +22 -0
- package/dist/base/index.js +259 -0
- package/dist/base/index.js.map +1 -0
- package/dist/base/io/index.cjs +3270 -0
- package/dist/base/io/index.cjs.map +1 -0
- package/dist/base/io/index.d.cts +2245 -0
- package/dist/base/io/index.d.ts +2245 -0
- package/dist/base/io/index.js +117 -0
- package/dist/base/io/index.js.map +1 -0
- package/dist/base/meta/index.cjs +43 -0
- package/dist/base/meta/index.cjs.map +1 -0
- package/dist/base/meta/index.d.cts +45 -0
- package/dist/base/meta/index.d.ts +45 -0
- package/dist/base/meta/index.js +13 -0
- package/dist/base/meta/index.js.map +1 -0
- package/dist/base/mutation/index.cjs +200 -0
- package/dist/base/mutation/index.cjs.map +1 -0
- package/dist/base/mutation/index.d.cts +177 -0
- package/dist/base/mutation/index.d.ts +177 -0
- package/dist/base/mutation/index.js +22 -0
- package/dist/base/mutation/index.js.map +1 -0
- package/dist/base/render/index.cjs +1120 -0
- package/dist/base/render/index.cjs.map +1 -0
- package/dist/base/render/index.d.cts +227 -0
- package/dist/base/render/index.d.ts +227 -0
- package/dist/base/render/index.js +24 -0
- package/dist/base/render/index.js.map +1 -0
- package/dist/base/sources/browser/index.cjs +172 -0
- package/dist/base/sources/browser/index.cjs.map +1 -0
- package/dist/base/sources/browser/index.d.cts +84 -0
- package/dist/base/sources/browser/index.d.ts +84 -0
- package/dist/base/sources/browser/index.js +151 -0
- package/dist/base/sources/browser/index.js.map +1 -0
- package/dist/base/sources/event/index.cjs +98 -0
- package/dist/base/sources/event/index.cjs.map +1 -0
- package/dist/base/sources/event/index.d.cts +91 -0
- package/dist/base/sources/event/index.d.ts +91 -0
- package/dist/base/sources/event/index.js +13 -0
- package/dist/base/sources/event/index.js.map +1 -0
- package/dist/base/sources/index.cjs +755 -0
- package/dist/base/sources/index.cjs.map +1 -0
- package/dist/base/sources/index.d.cts +357 -0
- package/dist/base/sources/index.d.ts +357 -0
- package/dist/base/sources/index.js +42 -0
- package/dist/base/sources/index.js.map +1 -0
- package/dist/base/sources/node/index.cjs +320 -0
- package/dist/base/sources/node/index.cjs.map +1 -0
- package/dist/base/sources/node/index.d.cts +185 -0
- package/dist/base/sources/node/index.d.ts +185 -0
- package/dist/base/sources/node/index.js +306 -0
- package/dist/base/sources/node/index.js.map +1 -0
- package/dist/base/utils/index.cjs +37 -0
- package/dist/base/utils/index.cjs.map +1 -0
- package/dist/base/utils/index.d.cts +37 -0
- package/dist/base/utils/index.d.ts +37 -0
- package/dist/base/utils/index.js +11 -0
- package/dist/base/utils/index.js.map +1 -0
- package/dist/base/worker/index.cjs +548 -0
- package/dist/base/worker/index.cjs.map +1 -0
- package/dist/base/worker/index.d.cts +207 -0
- package/dist/base/worker/index.d.ts +207 -0
- package/dist/base/worker/index.js +20 -0
- package/dist/base/worker/index.js.map +1 -0
- package/dist/breaker-C9skL3d8.d.ts +175 -0
- package/dist/breaker-ugSdq54q.d.cts +175 -0
- package/dist/cascading-CSSbKGrJ.d.ts +199 -0
- package/dist/cascading-baGkiihI.d.cts +199 -0
- package/dist/chunk-255UCBG4.js +58 -0
- package/dist/chunk-255UCBG4.js.map +1 -0
- package/dist/chunk-2LO3EL4W.js +1 -0
- package/dist/chunk-2LO3EL4W.js.map +1 -0
- package/dist/chunk-2OB3CEJS.js +1065 -0
- package/dist/chunk-2OB3CEJS.js.map +1 -0
- package/dist/chunk-36NMM65U.js +144 -0
- package/dist/chunk-36NMM65U.js.map +1 -0
- package/dist/chunk-3CEXCBN6.js +1 -0
- package/dist/chunk-3CEXCBN6.js.map +1 -0
- package/dist/chunk-3MUSLI6E.js +105 -0
- package/dist/chunk-3MUSLI6E.js.map +1 -0
- package/dist/chunk-3PSLNJDU.js +884 -0
- package/dist/chunk-3PSLNJDU.js.map +1 -0
- package/dist/chunk-3QZY5BI7.js +92 -0
- package/dist/chunk-3QZY5BI7.js.map +1 -0
- package/dist/chunk-42FQ27MQ.js +594 -0
- package/dist/chunk-42FQ27MQ.js.map +1 -0
- package/dist/chunk-4GYMCUDZ.js +1085 -0
- package/dist/chunk-4GYMCUDZ.js.map +1 -0
- package/dist/chunk-4S53H2KR.js +382 -0
- package/dist/chunk-4S53H2KR.js.map +1 -0
- package/dist/chunk-4XCHZRUJ.js +128 -0
- package/dist/chunk-4XCHZRUJ.js.map +1 -0
- package/dist/chunk-5THCXDWY.js +725 -0
- package/dist/chunk-5THCXDWY.js.map +1 -0
- package/dist/chunk-6XZYT4SW.js +256 -0
- package/dist/chunk-6XZYT4SW.js.map +1 -0
- package/dist/chunk-7EGRP2VX.js +76 -0
- package/dist/chunk-7EGRP2VX.js.map +1 -0
- package/dist/chunk-A7KV5UK4.js +150 -0
- package/dist/chunk-A7KV5UK4.js.map +1 -0
- package/dist/chunk-APY2SS5X.js +156 -0
- package/dist/chunk-APY2SS5X.js.map +1 -0
- package/dist/chunk-AZDQPQ3V.js +66 -0
- package/dist/chunk-AZDQPQ3V.js.map +1 -0
- package/dist/chunk-BU3SEFA5.js +90 -0
- package/dist/chunk-BU3SEFA5.js.map +1 -0
- package/dist/chunk-BXGZFGZ4.js +189 -0
- package/dist/chunk-BXGZFGZ4.js.map +1 -0
- package/dist/chunk-CGHORL6G.js +579 -0
- package/dist/chunk-CGHORL6G.js.map +1 -0
- package/dist/chunk-CXANAIZU.js +530 -0
- package/dist/chunk-CXANAIZU.js.map +1 -0
- package/dist/chunk-CZQHCKKG.js +1 -0
- package/dist/chunk-CZQHCKKG.js.map +1 -0
- package/dist/chunk-DKNHAICT.js +133 -0
- package/dist/chunk-DKNHAICT.js.map +1 -0
- package/dist/chunk-DM4OMPWK.js +584 -0
- package/dist/chunk-DM4OMPWK.js.map +1 -0
- package/dist/chunk-DMSNO6ZB.js +452 -0
- package/dist/chunk-DMSNO6ZB.js.map +1 -0
- package/dist/chunk-E5OZPDIW.js +229 -0
- package/dist/chunk-E5OZPDIW.js.map +1 -0
- package/dist/chunk-EVYY4X5A.js +509 -0
- package/dist/chunk-EVYY4X5A.js.map +1 -0
- package/dist/chunk-FDFD67UO.js +1 -0
- package/dist/chunk-FDFD67UO.js.map +1 -0
- package/dist/chunk-FMPF42Q4.js +13 -0
- package/dist/chunk-FMPF42Q4.js.map +1 -0
- package/dist/chunk-FR6RGA3B.js +1277 -0
- package/dist/chunk-FR6RGA3B.js.map +1 -0
- package/dist/chunk-FW23JYNQ.js +454 -0
- package/dist/chunk-FW23JYNQ.js.map +1 -0
- package/dist/chunk-GBCENOLN.js +1575 -0
- package/dist/chunk-GBCENOLN.js.map +1 -0
- package/dist/chunk-HL7HUJIX.js +1 -0
- package/dist/chunk-HL7HUJIX.js.map +1 -0
- package/dist/chunk-HULCUY35.js +2508 -0
- package/dist/chunk-HULCUY35.js.map +1 -0
- package/dist/chunk-IHTWQEDR.js +169 -0
- package/dist/chunk-IHTWQEDR.js.map +1 -0
- package/dist/chunk-IJRR6YAI.js +128 -0
- package/dist/chunk-IJRR6YAI.js.map +1 -0
- package/dist/chunk-JGFRAFDL.js +221 -0
- package/dist/chunk-JGFRAFDL.js.map +1 -0
- package/dist/chunk-KIIXR252.js +211 -0
- package/dist/chunk-KIIXR252.js.map +1 -0
- package/dist/chunk-KN3H5CNT.js +11 -0
- package/dist/chunk-KN3H5CNT.js.map +1 -0
- package/dist/chunk-KPG3DGLA.js +1 -0
- package/dist/chunk-KPG3DGLA.js.map +1 -0
- package/dist/chunk-KRNQ6RGQ.js +1 -0
- package/dist/chunk-KRNQ6RGQ.js.map +1 -0
- package/dist/chunk-LBAJK24K.js +1071 -0
- package/dist/chunk-LBAJK24K.js.map +1 -0
- package/dist/chunk-MLTPJMH6.js +417 -0
- package/dist/chunk-MLTPJMH6.js.map +1 -0
- package/dist/chunk-N3SZ7BMH.js +95 -0
- package/dist/chunk-N3SZ7BMH.js.map +1 -0
- package/dist/chunk-NDUD3IMO.js +540 -0
- package/dist/chunk-NDUD3IMO.js.map +1 -0
- package/dist/chunk-NY2PYHNC.js +873 -0
- package/dist/chunk-NY2PYHNC.js.map +1 -0
- package/dist/chunk-O3MT7DYI.js +225 -0
- package/dist/chunk-O3MT7DYI.js.map +1 -0
- package/dist/chunk-OCUDSN63.js +2386 -0
- package/dist/chunk-OCUDSN63.js.map +1 -0
- package/dist/chunk-OIWU3NYV.js +199 -0
- package/dist/chunk-OIWU3NYV.js.map +1 -0
- package/dist/chunk-OO5BM6CJ.js +1153 -0
- package/dist/chunk-OO5BM6CJ.js.map +1 -0
- package/dist/chunk-OQUIJT7A.js +1 -0
- package/dist/chunk-OQUIJT7A.js.map +1 -0
- package/dist/chunk-P5LBT622.js +105 -0
- package/dist/chunk-P5LBT622.js.map +1 -0
- package/dist/chunk-PKGQG5QQ.js +519 -0
- package/dist/chunk-PKGQG5QQ.js.map +1 -0
- package/dist/chunk-PKPO3JTZ.js +561 -0
- package/dist/chunk-PKPO3JTZ.js.map +1 -0
- package/dist/chunk-PL5UDIQ5.js +118 -0
- package/dist/chunk-PL5UDIQ5.js.map +1 -0
- package/dist/chunk-PZWISPIQ.js +432 -0
- package/dist/chunk-PZWISPIQ.js.map +1 -0
- package/dist/chunk-Q3EYOCZB.js +510 -0
- package/dist/chunk-Q3EYOCZB.js.map +1 -0
- package/dist/chunk-QMBYUVRL.js +15 -0
- package/dist/chunk-QMBYUVRL.js.map +1 -0
- package/dist/chunk-RAGGHLCV.js +200 -0
- package/dist/chunk-RAGGHLCV.js.map +1 -0
- package/dist/chunk-RGL53X5G.js +574 -0
- package/dist/chunk-RGL53X5G.js.map +1 -0
- package/dist/chunk-RJOG4IJU.js +1039 -0
- package/dist/chunk-RJOG4IJU.js.map +1 -0
- package/dist/chunk-SOOKUYVM.js +403 -0
- package/dist/chunk-SOOKUYVM.js.map +1 -0
- package/dist/chunk-T5BN5KG7.js +1 -0
- package/dist/chunk-T5BN5KG7.js.map +1 -0
- package/dist/chunk-TP7244Y6.js +207 -0
- package/dist/chunk-TP7244Y6.js.map +1 -0
- package/dist/chunk-TSBFTJKM.js +57 -0
- package/dist/chunk-TSBFTJKM.js.map +1 -0
- package/dist/chunk-URQ2CBBF.js +143 -0
- package/dist/chunk-URQ2CBBF.js.map +1 -0
- package/dist/chunk-W2BOPXTI.js +1 -0
- package/dist/chunk-W2BOPXTI.js.map +1 -0
- package/dist/chunk-WKSWLSCX.js +207 -0
- package/dist/chunk-WKSWLSCX.js.map +1 -0
- package/dist/chunk-Y52CS6YA.js +88 -0
- package/dist/chunk-Y52CS6YA.js.map +1 -0
- package/dist/chunk-YCBUWK77.js +92 -0
- package/dist/chunk-YCBUWK77.js.map +1 -0
- package/dist/chunk-YJ4U2D2C.js +314 -0
- package/dist/chunk-YJ4U2D2C.js.map +1 -0
- package/dist/chunk-Z4YXAUDN.js +239 -0
- package/dist/chunk-Z4YXAUDN.js.map +1 -0
- package/dist/chunk-Z6EGP5D7.js +92 -0
- package/dist/chunk-Z6EGP5D7.js.map +1 -0
- package/dist/compat/index.cjs +3083 -2
- package/dist/compat/index.cjs.map +1 -1
- package/dist/compat/index.d.cts +116 -1
- package/dist/compat/index.d.ts +116 -1
- package/dist/compat/index.js +175 -2
- package/dist/compat/index.js.map +1 -1
- package/dist/compat/jotai/index.cjs +130 -2
- package/dist/compat/jotai/index.cjs.map +1 -1
- package/dist/compat/jotai/index.d.cts +2 -1
- package/dist/compat/jotai/index.d.ts +2 -1
- package/dist/compat/jotai/index.js +7 -2
- package/dist/compat/jotai/index.js.map +1 -1
- package/dist/compat/nanostores/index.cjs +186 -2
- package/dist/compat/nanostores/index.cjs.map +1 -1
- package/dist/compat/nanostores/index.d.cts +2 -1
- package/dist/compat/nanostores/index.d.ts +2 -1
- package/dist/compat/nanostores/index.js +21 -2
- package/dist/compat/nanostores/index.js.map +1 -1
- package/dist/compat/nestjs/index.cjs +2224 -2
- package/dist/compat/nestjs/index.cjs.map +1 -1
- package/dist/compat/nestjs/index.d.cts +10 -1
- package/dist/compat/nestjs/index.d.ts +10 -1
- package/dist/compat/nestjs/index.js +77 -2
- package/dist/compat/nestjs/index.js.map +1 -1
- package/dist/compat/react/index.cjs +95 -2
- package/dist/compat/react/index.cjs.map +1 -1
- package/dist/compat/react/index.d.cts +2 -1
- package/dist/compat/react/index.d.ts +2 -1
- package/dist/compat/react/index.js +11 -2
- package/dist/compat/react/index.js.map +1 -1
- package/dist/compat/solid/index.cjs +82 -2
- package/dist/compat/solid/index.cjs.map +1 -1
- package/dist/compat/solid/index.d.cts +2 -1
- package/dist/compat/solid/index.d.ts +2 -1
- package/dist/compat/solid/index.js +11 -2
- package/dist/compat/solid/index.js.map +1 -1
- package/dist/compat/svelte/index.cjs +85 -2
- package/dist/compat/svelte/index.cjs.map +1 -1
- package/dist/compat/svelte/index.d.cts +2 -1
- package/dist/compat/svelte/index.d.ts +2 -1
- package/dist/compat/svelte/index.js +11 -2
- package/dist/compat/svelte/index.js.map +1 -1
- package/dist/compat/vue/index.cjs +100 -2
- package/dist/compat/vue/index.cjs.map +1 -1
- package/dist/compat/vue/index.d.cts +3 -1
- package/dist/compat/vue/index.d.ts +3 -1
- package/dist/compat/vue/index.js +11 -2
- package/dist/compat/vue/index.js.map +1 -1
- package/dist/compat/zustand/index.cjs +50 -2
- package/dist/compat/zustand/index.cjs.map +1 -1
- package/dist/compat/zustand/index.d.cts +2 -1
- package/dist/compat/zustand/index.d.ts +2 -1
- package/dist/compat/zustand/index.js +7 -2
- package/dist/compat/zustand/index.js.map +1 -1
- package/dist/distill-De6Rnn15.d.cts +48 -0
- package/dist/distill-De6Rnn15.d.ts +48 -0
- package/dist/external-register-CWyroXb_.d.cts +138 -0
- package/dist/external-register-CWyroXb_.d.ts +138 -0
- package/dist/fallback-Bx46zqky.d.cts +243 -0
- package/dist/fallback-pIWW8A2d.d.ts +243 -0
- package/dist/guarded-execution-BcdtxeBk.d.ts +207 -0
- package/dist/guarded-execution-C-3hnP6A.d.cts +207 -0
- package/dist/index-5SU_O78r.d.cts +754 -0
- package/dist/index-B6pxYJzO.d.cts +36 -0
- package/dist/index-B6pxYJzO.d.ts +36 -0
- package/dist/index-BFsng6v1.d.cts +44 -0
- package/dist/index-BFsng6v1.d.ts +44 -0
- package/dist/index-Bg-LwEt-.d.cts +45 -0
- package/dist/index-Bg-LwEt-.d.ts +45 -0
- package/dist/index-Brp888t0.d.cts +127 -0
- package/dist/index-Brp888t0.d.ts +127 -0
- package/dist/index-CDfk6jHN.d.cts +37 -0
- package/dist/index-CDfk6jHN.d.ts +37 -0
- package/dist/index-CEXCtYYJ.d.ts +754 -0
- package/dist/index-DLAxYaN5.d.cts +169 -0
- package/dist/index-DLAxYaN5.d.ts +169 -0
- package/dist/index-DeWbQzMe.d.cts +34 -0
- package/dist/index-DeWbQzMe.d.ts +34 -0
- package/dist/index-dX9IzPqj.d.cts +86 -0
- package/dist/index-dX9IzPqj.d.ts +86 -0
- package/dist/index.cjs +25950 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +56 -42
- package/dist/index.d.ts +56 -42
- package/dist/index.js +849 -0
- package/dist/index.js.map +1 -1
- package/dist/layout-types-B5aiHYgk.d.cts +72 -0
- package/dist/layout-types-B5aiHYgk.d.ts +72 -0
- package/dist/memory-composers-BryDrRBX.d.cts +529 -0
- package/dist/memory-composers-CVQqPYEV.d.ts +529 -0
- package/dist/observable-BXQoW1P-.d.cts +36 -0
- package/dist/observable-BXQoW1P-.d.ts +36 -0
- package/dist/pipeline-graph-Ce47CB6Y.d.cts +145 -0
- package/dist/pipeline-graph-DXCwY9vG.d.ts +145 -0
- package/dist/presets/ai/index.cjs +4377 -0
- package/dist/presets/ai/index.cjs.map +1 -0
- package/dist/presets/ai/index.d.cts +98 -0
- package/dist/presets/ai/index.d.ts +98 -0
- package/dist/presets/ai/index.js +54 -0
- package/dist/presets/ai/index.js.map +1 -0
- package/dist/presets/harness/index.cjs +5929 -0
- package/dist/presets/harness/index.cjs.map +1 -0
- package/dist/presets/harness/index.d.cts +566 -0
- package/dist/presets/harness/index.d.ts +566 -0
- package/dist/presets/harness/index.js +71 -0
- package/dist/presets/harness/index.js.map +1 -0
- package/dist/presets/index.cjs +9782 -0
- package/dist/presets/index.cjs.map +1 -0
- package/dist/presets/index.d.cts +28 -0
- package/dist/presets/index.d.ts +28 -0
- package/dist/presets/index.js +129 -0
- package/dist/presets/index.js.map +1 -0
- package/dist/presets/inspect/index.cjs +1087 -0
- package/dist/presets/inspect/index.cjs.map +1 -0
- package/dist/presets/inspect/index.d.cts +172 -0
- package/dist/presets/inspect/index.d.ts +172 -0
- package/dist/presets/inspect/index.js +21 -0
- package/dist/presets/inspect/index.js.map +1 -0
- package/dist/presets/resilience/index.cjs +1593 -0
- package/dist/presets/resilience/index.cjs.map +1 -0
- package/dist/presets/resilience/index.d.cts +205 -0
- package/dist/presets/resilience/index.d.ts +205 -0
- package/dist/presets/resilience/index.js +18 -0
- package/dist/presets/resilience/index.js.map +1 -0
- package/dist/rate-limiter-CEALq4N1.d.ts +559 -0
- package/dist/rate-limiter-DpVbSYdH.d.cts +559 -0
- package/dist/reactive-layout-fswlBUvX.d.cts +195 -0
- package/dist/reactive-layout-fswlBUvX.d.ts +195 -0
- package/dist/retry-BDbRZ_gx.d.ts +125 -0
- package/dist/retry-DWuhjvsA.d.cts +125 -0
- package/dist/solutions/index.cjs +8200 -0
- package/dist/solutions/index.cjs.map +1 -0
- package/dist/solutions/index.d.cts +23 -0
- package/dist/solutions/index.d.ts +23 -0
- package/dist/solutions/index.js +55 -0
- package/dist/solutions/index.js.map +1 -0
- package/dist/spawnable-5mDY501F.d.cts +746 -0
- package/dist/spawnable-D3lR0oQu.d.ts +746 -0
- package/dist/status-U-rUI79b.d.cts +84 -0
- package/dist/status-U-rUI79b.d.ts +84 -0
- package/dist/timeout-U5O4ESK3.js +12 -0
- package/dist/timeout-U5O4ESK3.js.map +1 -0
- package/dist/types-BB5Lw-pB.d.cts +442 -0
- package/dist/types-BB5Lw-pB.d.ts +442 -0
- package/dist/types-CJWIMJiZ.d.ts +548 -0
- package/dist/types-vCq7ShIm.d.cts +548 -0
- package/dist/utils/ai/browser.cjs +2169 -0
- package/dist/utils/ai/browser.cjs.map +1 -0
- package/dist/utils/ai/browser.d.cts +129 -0
- package/dist/utils/ai/browser.d.ts +129 -0
- package/dist/utils/ai/browser.js +255 -0
- package/dist/utils/ai/browser.js.map +1 -0
- package/dist/utils/ai/index.cjs +8468 -0
- package/dist/utils/ai/index.cjs.map +1 -0
- package/dist/utils/ai/index.d.cts +1777 -0
- package/dist/utils/ai/index.d.ts +1777 -0
- package/dist/utils/ai/index.js +173 -0
- package/dist/utils/ai/index.js.map +1 -0
- package/dist/utils/ai/node.cjs +648 -0
- package/dist/utils/ai/node.cjs.map +1 -0
- package/dist/utils/ai/node.d.cts +57 -0
- package/dist/utils/ai/node.d.ts +57 -0
- package/dist/utils/ai/node.js +84 -0
- package/dist/utils/ai/node.js.map +1 -0
- package/dist/utils/cqrs/index.cjs +1036 -0
- package/dist/utils/cqrs/index.cjs.map +1 -0
- package/dist/utils/cqrs/index.d.cts +438 -0
- package/dist/utils/cqrs/index.d.ts +438 -0
- package/dist/utils/cqrs/index.js +18 -0
- package/dist/utils/cqrs/index.js.map +1 -0
- package/dist/utils/demo-shell/index.cjs +865 -0
- package/dist/utils/demo-shell/index.cjs.map +1 -0
- package/dist/utils/demo-shell/index.d.cts +90 -0
- package/dist/utils/demo-shell/index.d.ts +90 -0
- package/dist/utils/demo-shell/index.js +13 -0
- package/dist/utils/demo-shell/index.js.map +1 -0
- package/dist/utils/domain-templates/index.cjs +732 -0
- package/dist/utils/domain-templates/index.cjs.map +1 -0
- package/dist/utils/domain-templates/index.d.cts +214 -0
- package/dist/utils/domain-templates/index.d.ts +214 -0
- package/dist/utils/domain-templates/index.js +17 -0
- package/dist/utils/domain-templates/index.js.map +1 -0
- package/dist/utils/graphspec/index.cjs +1174 -0
- package/dist/utils/graphspec/index.cjs.map +1 -0
- package/dist/utils/graphspec/index.d.cts +449 -0
- package/dist/utils/graphspec/index.d.ts +449 -0
- package/dist/utils/graphspec/index.js +35 -0
- package/dist/utils/graphspec/index.js.map +1 -0
- package/dist/utils/harness/index.cjs +656 -0
- package/dist/utils/harness/index.cjs.map +1 -0
- package/dist/utils/harness/index.d.cts +542 -0
- package/dist/utils/harness/index.d.ts +542 -0
- package/dist/utils/harness/index.js +56 -0
- package/dist/utils/harness/index.js.map +1 -0
- package/dist/utils/index.cjs +17609 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +96 -0
- package/dist/utils/index.d.ts +96 -0
- package/dist/utils/index.js +514 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/inspect/index.cjs +807 -0
- package/dist/utils/inspect/index.cjs.map +1 -0
- package/dist/utils/inspect/index.d.cts +123 -0
- package/dist/utils/inspect/index.d.ts +123 -0
- package/dist/utils/inspect/index.js +30 -0
- package/dist/utils/inspect/index.js.map +1 -0
- package/dist/utils/job-queue/index.cjs +717 -0
- package/dist/utils/job-queue/index.cjs.map +1 -0
- package/dist/utils/job-queue/index.d.cts +200 -0
- package/dist/utils/job-queue/index.d.ts +200 -0
- package/dist/utils/job-queue/index.js +18 -0
- package/dist/utils/job-queue/index.js.map +1 -0
- package/dist/utils/memory/index.cjs +1451 -0
- package/dist/utils/memory/index.cjs.map +1 -0
- package/dist/utils/memory/index.d.cts +582 -0
- package/dist/utils/memory/index.d.ts +582 -0
- package/dist/utils/memory/index.js +19 -0
- package/dist/utils/memory/index.js.map +1 -0
- package/dist/utils/messaging/index.cjs +666 -0
- package/dist/utils/messaging/index.cjs.map +1 -0
- package/dist/utils/messaging/index.d.cts +562 -0
- package/dist/utils/messaging/index.d.ts +562 -0
- package/dist/utils/messaging/index.js +50 -0
- package/dist/utils/messaging/index.js.map +1 -0
- package/dist/utils/orchestration/index.cjs +876 -0
- package/dist/utils/orchestration/index.cjs.map +1 -0
- package/dist/utils/orchestration/index.d.cts +233 -0
- package/dist/utils/orchestration/index.d.ts +233 -0
- package/dist/utils/orchestration/index.js +19 -0
- package/dist/utils/orchestration/index.js.map +1 -0
- package/dist/utils/process/index.cjs +743 -0
- package/dist/utils/process/index.cjs.map +1 -0
- package/dist/utils/process/index.d.cts +411 -0
- package/dist/utils/process/index.d.ts +411 -0
- package/dist/utils/process/index.js +14 -0
- package/dist/utils/process/index.js.map +1 -0
- package/dist/utils/reactive-layout/index.cjs +1607 -0
- package/dist/utils/reactive-layout/index.cjs.map +1 -0
- package/dist/utils/reactive-layout/index.d.cts +492 -0
- package/dist/utils/reactive-layout/index.d.ts +492 -0
- package/dist/utils/reactive-layout/index.js +52 -0
- package/dist/utils/reactive-layout/index.js.map +1 -0
- package/dist/utils/reduction/index.cjs +203 -0
- package/dist/utils/reduction/index.cjs.map +1 -0
- package/dist/utils/reduction/index.d.cts +102 -0
- package/dist/utils/reduction/index.d.ts +102 -0
- package/dist/utils/reduction/index.js +14 -0
- package/dist/utils/reduction/index.js.map +1 -0
- package/dist/utils/resilience/index.cjs +1617 -0
- package/dist/utils/resilience/index.cjs.map +1 -0
- package/dist/utils/resilience/index.d.cts +9 -0
- package/dist/utils/resilience/index.d.ts +9 -0
- package/dist/utils/resilience/index.js +44 -0
- package/dist/utils/resilience/index.js.map +1 -0
- package/dist/utils/surface/index.cjs +1070 -0
- package/dist/utils/surface/index.cjs.map +1 -0
- package/dist/utils/surface/index.d.cts +240 -0
- package/dist/utils/surface/index.d.ts +240 -0
- package/dist/utils/surface/index.js +30 -0
- package/dist/utils/surface/index.js.map +1 -0
- package/dist/utils/topology-view/index.cjs +620 -0
- package/dist/utils/topology-view/index.cjs.map +1 -0
- package/dist/utils/topology-view/index.d.cts +68 -0
- package/dist/utils/topology-view/index.d.ts +68 -0
- package/dist/utils/topology-view/index.js +11 -0
- package/dist/utils/topology-view/index.js.map +1 -0
- package/package.json +293 -237
- package/dist/core/index.cjs +0 -21
- package/dist/core/index.cjs.map +0 -1
- package/dist/core/index.d.cts +0 -1
- package/dist/core/index.d.ts +0 -1
- package/dist/core/index.js +0 -3
- package/dist/core/index.js.map +0 -1
- package/dist/extra/browser.cjs +0 -21
- package/dist/extra/browser.cjs.map +0 -1
- package/dist/extra/browser.d.cts +0 -1
- package/dist/extra/browser.d.ts +0 -1
- package/dist/extra/browser.js +0 -3
- package/dist/extra/browser.js.map +0 -1
- package/dist/extra/index.cjs +0 -21
- package/dist/extra/index.cjs.map +0 -1
- package/dist/extra/index.d.cts +0 -1
- package/dist/extra/index.d.ts +0 -1
- package/dist/extra/index.js +0 -3
- package/dist/extra/index.js.map +0 -1
- package/dist/extra/node.cjs +0 -21
- package/dist/extra/node.cjs.map +0 -1
- package/dist/extra/node.d.cts +0 -1
- package/dist/extra/node.d.ts +0 -1
- package/dist/extra/node.js +0 -3
- package/dist/extra/node.js.map +0 -1
- package/dist/extra/operators.cjs +0 -21
- package/dist/extra/operators.cjs.map +0 -1
- package/dist/extra/operators.d.cts +0 -1
- package/dist/extra/operators.d.ts +0 -1
- package/dist/extra/operators.js +0 -3
- package/dist/extra/operators.js.map +0 -1
- package/dist/extra/reactive.cjs +0 -21
- package/dist/extra/reactive.cjs.map +0 -1
- package/dist/extra/reactive.d.cts +0 -1
- package/dist/extra/reactive.d.ts +0 -1
- package/dist/extra/reactive.js +0 -3
- package/dist/extra/reactive.js.map +0 -1
- package/dist/extra/render/index.cjs +0 -21
- package/dist/extra/render/index.cjs.map +0 -1
- package/dist/extra/render/index.d.cts +0 -1
- package/dist/extra/render/index.d.ts +0 -1
- package/dist/extra/render/index.js +0 -3
- package/dist/extra/render/index.js.map +0 -1
- package/dist/extra/sources.cjs +0 -21
- package/dist/extra/sources.cjs.map +0 -1
- package/dist/extra/sources.d.cts +0 -1
- package/dist/extra/sources.d.ts +0 -1
- package/dist/extra/sources.js +0 -3
- package/dist/extra/sources.js.map +0 -1
- package/dist/extra/storage-browser.cjs +0 -21
- package/dist/extra/storage-browser.cjs.map +0 -1
- package/dist/extra/storage-browser.d.cts +0 -1
- package/dist/extra/storage-browser.d.ts +0 -1
- package/dist/extra/storage-browser.js +0 -3
- package/dist/extra/storage-browser.js.map +0 -1
- package/dist/extra/storage-core.cjs +0 -21
- package/dist/extra/storage-core.cjs.map +0 -1
- package/dist/extra/storage-core.d.cts +0 -1
- package/dist/extra/storage-core.d.ts +0 -1
- package/dist/extra/storage-core.js +0 -3
- package/dist/extra/storage-core.js.map +0 -1
- package/dist/extra/storage-node.cjs +0 -21
- package/dist/extra/storage-node.cjs.map +0 -1
- package/dist/extra/storage-node.d.cts +0 -1
- package/dist/extra/storage-node.d.ts +0 -1
- package/dist/extra/storage-node.js +0 -3
- package/dist/extra/storage-node.js.map +0 -1
- package/dist/extra/storage-tiers-browser.cjs +0 -21
- package/dist/extra/storage-tiers-browser.cjs.map +0 -1
- package/dist/extra/storage-tiers-browser.d.cts +0 -1
- package/dist/extra/storage-tiers-browser.d.ts +0 -1
- package/dist/extra/storage-tiers-browser.js +0 -3
- package/dist/extra/storage-tiers-browser.js.map +0 -1
- package/dist/extra/storage-tiers-node.cjs +0 -21
- package/dist/extra/storage-tiers-node.cjs.map +0 -1
- package/dist/extra/storage-tiers-node.d.cts +0 -1
- package/dist/extra/storage-tiers-node.d.ts +0 -1
- package/dist/extra/storage-tiers-node.js +0 -3
- package/dist/extra/storage-tiers-node.js.map +0 -1
- package/dist/extra/storage-tiers.cjs +0 -21
- package/dist/extra/storage-tiers.cjs.map +0 -1
- package/dist/extra/storage-tiers.d.cts +0 -1
- package/dist/extra/storage-tiers.d.ts +0 -1
- package/dist/extra/storage-tiers.js +0 -3
- package/dist/extra/storage-tiers.js.map +0 -1
- package/dist/extra/storage-wal.cjs +0 -21
- package/dist/extra/storage-wal.cjs.map +0 -1
- package/dist/extra/storage-wal.d.cts +0 -1
- package/dist/extra/storage-wal.d.ts +0 -1
- package/dist/extra/storage-wal.js +0 -3
- package/dist/extra/storage-wal.js.map +0 -1
- package/dist/graph/index.cjs +0 -21
- package/dist/graph/index.cjs.map +0 -1
- package/dist/graph/index.d.cts +0 -1
- package/dist/graph/index.d.ts +0 -1
- package/dist/graph/index.js +0 -3
- package/dist/graph/index.js.map +0 -1
- package/dist/patterns/ai/browser.cjs +0 -21
- package/dist/patterns/ai/browser.cjs.map +0 -1
- package/dist/patterns/ai/browser.d.cts +0 -1
- package/dist/patterns/ai/browser.d.ts +0 -1
- package/dist/patterns/ai/browser.js +0 -3
- package/dist/patterns/ai/browser.js.map +0 -1
- package/dist/patterns/ai/index.cjs +0 -21
- package/dist/patterns/ai/index.cjs.map +0 -1
- package/dist/patterns/ai/index.d.cts +0 -1
- package/dist/patterns/ai/index.d.ts +0 -1
- package/dist/patterns/ai/index.js +0 -3
- package/dist/patterns/ai/index.js.map +0 -1
- package/dist/patterns/ai/node.cjs +0 -21
- package/dist/patterns/ai/node.cjs.map +0 -1
- package/dist/patterns/ai/node.d.cts +0 -1
- package/dist/patterns/ai/node.d.ts +0 -1
- package/dist/patterns/ai/node.js +0 -3
- package/dist/patterns/ai/node.js.map +0 -1
- package/dist/patterns/cqrs/index.cjs +0 -21
- package/dist/patterns/cqrs/index.cjs.map +0 -1
- package/dist/patterns/cqrs/index.d.cts +0 -1
- package/dist/patterns/cqrs/index.d.ts +0 -1
- package/dist/patterns/cqrs/index.js +0 -3
- package/dist/patterns/cqrs/index.js.map +0 -1
- package/dist/patterns/demo-shell/index.cjs +0 -21
- package/dist/patterns/demo-shell/index.cjs.map +0 -1
- package/dist/patterns/demo-shell/index.d.cts +0 -1
- package/dist/patterns/demo-shell/index.d.ts +0 -1
- package/dist/patterns/demo-shell/index.js +0 -3
- package/dist/patterns/demo-shell/index.js.map +0 -1
- package/dist/patterns/domain-templates/index.cjs +0 -21
- package/dist/patterns/domain-templates/index.cjs.map +0 -1
- package/dist/patterns/domain-templates/index.d.cts +0 -1
- package/dist/patterns/domain-templates/index.d.ts +0 -1
- package/dist/patterns/domain-templates/index.js +0 -3
- package/dist/patterns/domain-templates/index.js.map +0 -1
- package/dist/patterns/graphspec/index.cjs +0 -21
- package/dist/patterns/graphspec/index.cjs.map +0 -1
- package/dist/patterns/graphspec/index.d.cts +0 -1
- package/dist/patterns/graphspec/index.d.ts +0 -1
- package/dist/patterns/graphspec/index.js +0 -3
- package/dist/patterns/graphspec/index.js.map +0 -1
- package/dist/patterns/harness/index.cjs +0 -21
- package/dist/patterns/harness/index.cjs.map +0 -1
- package/dist/patterns/harness/index.d.cts +0 -1
- package/dist/patterns/harness/index.d.ts +0 -1
- package/dist/patterns/harness/index.js +0 -3
- package/dist/patterns/harness/index.js.map +0 -1
- package/dist/patterns/inspect/index.cjs +0 -21
- package/dist/patterns/inspect/index.cjs.map +0 -1
- package/dist/patterns/inspect/index.d.cts +0 -1
- package/dist/patterns/inspect/index.d.ts +0 -1
- package/dist/patterns/inspect/index.js +0 -3
- package/dist/patterns/inspect/index.js.map +0 -1
- package/dist/patterns/job-queue/index.cjs +0 -21
- package/dist/patterns/job-queue/index.cjs.map +0 -1
- package/dist/patterns/job-queue/index.d.cts +0 -1
- package/dist/patterns/job-queue/index.d.ts +0 -1
- package/dist/patterns/job-queue/index.js +0 -3
- package/dist/patterns/job-queue/index.js.map +0 -1
- package/dist/patterns/memory/index.cjs +0 -21
- package/dist/patterns/memory/index.cjs.map +0 -1
- package/dist/patterns/memory/index.d.cts +0 -1
- package/dist/patterns/memory/index.d.ts +0 -1
- package/dist/patterns/memory/index.js +0 -3
- package/dist/patterns/memory/index.js.map +0 -1
- package/dist/patterns/messaging/index.cjs +0 -21
- package/dist/patterns/messaging/index.cjs.map +0 -1
- package/dist/patterns/messaging/index.d.cts +0 -1
- package/dist/patterns/messaging/index.d.ts +0 -1
- package/dist/patterns/messaging/index.js +0 -3
- package/dist/patterns/messaging/index.js.map +0 -1
- package/dist/patterns/orchestration/index.cjs +0 -21
- package/dist/patterns/orchestration/index.cjs.map +0 -1
- package/dist/patterns/orchestration/index.d.cts +0 -1
- package/dist/patterns/orchestration/index.d.ts +0 -1
- package/dist/patterns/orchestration/index.js +0 -3
- package/dist/patterns/orchestration/index.js.map +0 -1
- package/dist/patterns/process/index.cjs +0 -21
- package/dist/patterns/process/index.cjs.map +0 -1
- package/dist/patterns/process/index.d.cts +0 -1
- package/dist/patterns/process/index.d.ts +0 -1
- package/dist/patterns/process/index.js +0 -3
- package/dist/patterns/process/index.js.map +0 -1
- package/dist/patterns/reactive-layout/index.cjs +0 -21
- package/dist/patterns/reactive-layout/index.cjs.map +0 -1
- package/dist/patterns/reactive-layout/index.d.cts +0 -1
- package/dist/patterns/reactive-layout/index.d.ts +0 -1
- package/dist/patterns/reactive-layout/index.js +0 -3
- package/dist/patterns/reactive-layout/index.js.map +0 -1
- package/dist/patterns/reduction/index.cjs +0 -21
- package/dist/patterns/reduction/index.cjs.map +0 -1
- package/dist/patterns/reduction/index.d.cts +0 -1
- package/dist/patterns/reduction/index.d.ts +0 -1
- package/dist/patterns/reduction/index.js +0 -3
- package/dist/patterns/reduction/index.js.map +0 -1
- package/dist/patterns/surface/index.cjs +0 -21
- package/dist/patterns/surface/index.cjs.map +0 -1
- package/dist/patterns/surface/index.d.cts +0 -1
- package/dist/patterns/surface/index.d.ts +0 -1
- package/dist/patterns/surface/index.js +0 -3
- package/dist/patterns/surface/index.js.map +0 -1
- package/dist/patterns/topology-view/index.cjs +0 -21
- package/dist/patterns/topology-view/index.cjs.map +0 -1
- package/dist/patterns/topology-view/index.d.cts +0 -1
- package/dist/patterns/topology-view/index.d.ts +0 -1
- package/dist/patterns/topology-view/index.js +0 -3
- package/dist/patterns/topology-view/index.js.map +0 -1
- package/dist/testing/index.cjs +0 -21
- package/dist/testing/index.cjs.map +0 -1
- package/dist/testing/index.d.cts +0 -1
- package/dist/testing/index.d.ts +0 -1
- package/dist/testing/index.js +0 -3
- package/dist/testing/index.js.map +0 -1
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
import { Messages, NodeOptions, Node } from '@graphrefly/pure-ts/core';
|
|
2
|
+
export { D as DistillBundle, a as DistillOptions, E as Extraction, d as distill } from '../../distill-De6Rnn15.cjs';
|
|
3
|
+
export { B as BundleTriad, E as EmitTriad, a as ExternalBundleOptions, b as ExternalRegister, e as externalBundle, c as externalProducer } from '../../external-register-CWyroXb_.cjs';
|
|
4
|
+
import { Graph } from '@graphrefly/pure-ts/graph';
|
|
5
|
+
export { T as ToObservableOptions, t as toObservable } from '../../observable-BXQoW1P-.cjs';
|
|
6
|
+
import { ReactiveLogBundle, PubSubChange, NodeInput } from '@graphrefly/pure-ts/extra';
|
|
7
|
+
import 'rxjs';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Watermark-based backpressure controller — reactive PAUSE/RESUME flow control.
|
|
11
|
+
*
|
|
12
|
+
* Purely synchronous, event-driven. No timers, no polling, no Promises.
|
|
13
|
+
* Each controller instance uses a unique lockId so multiple controllers
|
|
14
|
+
* on the same upstream node do not collide.
|
|
15
|
+
*
|
|
16
|
+
* @module
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
type WatermarkOptions = {
|
|
20
|
+
/** Pending count at which PAUSE is sent upstream. */
|
|
21
|
+
highWaterMark: number;
|
|
22
|
+
/** Pending count at which RESUME is sent upstream (after being paused). */
|
|
23
|
+
lowWaterMark: number;
|
|
24
|
+
};
|
|
25
|
+
type WatermarkController = {
|
|
26
|
+
/** Call when a DATA message is buffered/enqueued. Returns `true` if PAUSE was just sent. */
|
|
27
|
+
onEnqueue(): boolean;
|
|
28
|
+
/** Call when a buffered item is consumed. Returns `true` if RESUME was just sent. */
|
|
29
|
+
onDequeue(): boolean;
|
|
30
|
+
/** Current un-consumed item count. */
|
|
31
|
+
readonly pending: number;
|
|
32
|
+
/** Whether upstream is currently paused by this controller. */
|
|
33
|
+
readonly paused: boolean;
|
|
34
|
+
/** Dispose: if paused, sends RESUME to unblock upstream. */
|
|
35
|
+
dispose(): void;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Creates a watermark-based backpressure controller.
|
|
39
|
+
*
|
|
40
|
+
* @param sendUp - Callback that delivers messages upstream (typically `handle.up`).
|
|
41
|
+
* @param opts - High/low watermark thresholds (item counts).
|
|
42
|
+
* @returns A {@link WatermarkController}.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const handle = graph.observe("fast-source");
|
|
47
|
+
* const wm = createWatermarkController(
|
|
48
|
+
* (msgs) => handle.up(msgs),
|
|
49
|
+
* { highWaterMark: 64, lowWaterMark: 16 },
|
|
50
|
+
* );
|
|
51
|
+
*
|
|
52
|
+
* // In sink callback:
|
|
53
|
+
* handle.subscribe((msgs) => {
|
|
54
|
+
* for (const msg of msgs) {
|
|
55
|
+
* if (msg[0] === DATA) {
|
|
56
|
+
* buffer.push(msg[1]);
|
|
57
|
+
* wm.onEnqueue();
|
|
58
|
+
* }
|
|
59
|
+
* }
|
|
60
|
+
* });
|
|
61
|
+
*
|
|
62
|
+
* // When consumer drains:
|
|
63
|
+
* const item = buffer.shift();
|
|
64
|
+
* wm.onDequeue();
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @category extra
|
|
68
|
+
*/
|
|
69
|
+
declare function createWatermarkController(sendUp: (messages: Messages) => void, opts: WatermarkOptions): WatermarkController;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Phase 13.C — `selector` + `materialize` composers (DS-13.C / G2 lock C).
|
|
73
|
+
*
|
|
74
|
+
* Two paired primitives for dynamic-mount routing:
|
|
75
|
+
*
|
|
76
|
+
* - {@link selector} — projects an input value to a routing key, deduped.
|
|
77
|
+
* Equivalent to `map + distinctUntilChanged`, but the dedup is the
|
|
78
|
+
* semantic point: the key changes ONLY when the routed-to slot should
|
|
79
|
+
* change. Fires `materialize` re-mounts efficiently.
|
|
80
|
+
*
|
|
81
|
+
* - {@link materialize} — given a reactive `key` and a reactive map of
|
|
82
|
+
* `key → factory` thunks, mounts the matching factory's Graph under
|
|
83
|
+
* `parent` at a stable slot name. When `key` changes, unmounts the old
|
|
84
|
+
* slot and mounts the new factory's output. When `factories` mutates but
|
|
85
|
+
* `key` stays the same, the current slot continues to run on the OLD
|
|
86
|
+
* factory ("current sessions complete on old factory; new sessions use
|
|
87
|
+
* new factory" — full hot-swap correctness deferred to G10, parked).
|
|
88
|
+
*
|
|
89
|
+
* Reusable beyond the agent layer:
|
|
90
|
+
* - `harnessLoop` strategy routing — the strategy node IS a `selector`.
|
|
91
|
+
* - `pipelineGraph` dynamic stage selection.
|
|
92
|
+
* - `refineLoop` strategy swap.
|
|
93
|
+
* - Phase 13.I `spawnable()` mounts agent slots via `materialize`.
|
|
94
|
+
*/
|
|
95
|
+
|
|
96
|
+
/** Options for operator nodes: NodeOptions without `describeKind` (set internally). */
|
|
97
|
+
type ExtraOpts = Omit<NodeOptions<unknown>, "describeKind">;
|
|
98
|
+
/** Options for {@link selector}. */
|
|
99
|
+
type SelectorOpts<TKey> = ExtraOpts & {
|
|
100
|
+
/**
|
|
101
|
+
* Equality comparator for the projected key. Defaults to {@link Object.is}.
|
|
102
|
+
* Used to suppress re-emits when the input changes but the projected key
|
|
103
|
+
* does not — this is the load-bearing behavior that lets downstream
|
|
104
|
+
* `materialize` skip unnecessary unmount/remount cycles.
|
|
105
|
+
*/
|
|
106
|
+
equals?: (a: TKey, b: TKey) => boolean;
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Projects each upstream value to a routing key, deduped on the key. The
|
|
110
|
+
* output node emits a key only when the projected key actually changes —
|
|
111
|
+
* pairs cleanly with {@link materialize}, which re-mounts only on key
|
|
112
|
+
* change.
|
|
113
|
+
*
|
|
114
|
+
* **Differs from `map`:** `map(input, fn)` fires on every upstream wave
|
|
115
|
+
* regardless of output value. `selector(input, fn)` fires only when the
|
|
116
|
+
* projected key CHANGES (under `equals`), so downstream re-mount logic is
|
|
117
|
+
* stable.
|
|
118
|
+
*
|
|
119
|
+
* @param input - Upstream node carrying the value to project.
|
|
120
|
+
* @param fn - Synchronous projection function.
|
|
121
|
+
* @param opts - Optional {@link SelectorOpts}.
|
|
122
|
+
* @returns `Node<TKey>` carrying the latest projected key (deduped).
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* ```ts
|
|
126
|
+
* import { selector, materialize, state } from "@graphrefly/graphrefly-ts";
|
|
127
|
+
*
|
|
128
|
+
* type Request = { kind: "research" | "summarize" | "code"; payload: unknown };
|
|
129
|
+
* const requestNode = state<Request>({ kind: "research", payload: {} });
|
|
130
|
+
*
|
|
131
|
+
* const presetId = selector(requestNode, (req) => req.kind);
|
|
132
|
+
* // presetId is `Node<"research" | "summarize" | "code">`, deduped.
|
|
133
|
+
* // Downstream materialize re-mounts ONLY when the kind axis changes.
|
|
134
|
+
* ```
|
|
135
|
+
*
|
|
136
|
+
* @category extra
|
|
137
|
+
*/
|
|
138
|
+
declare function selector<TIn, TKey>(input: Node<TIn>, fn: (input: TIn) => TKey, opts?: SelectorOpts<TKey>): Node<TKey>;
|
|
139
|
+
/**
|
|
140
|
+
* Factory thunk for a {@link materialize} slot. Called once per mount cycle
|
|
141
|
+
* to mint a fresh `TGraph` instance. The instance is mounted under
|
|
142
|
+
* `parent.mount(slotName, ...)` and unmounted via `parent.remove(slotName)`
|
|
143
|
+
* when `key` next changes.
|
|
144
|
+
*
|
|
145
|
+
* Each invocation MUST return a fresh, never-before-mounted Graph instance —
|
|
146
|
+
* `Graph.mount` rejects re-mounting an instance that is already mounted
|
|
147
|
+
* elsewhere in the tree. Caching factory output is unsafe.
|
|
148
|
+
*/
|
|
149
|
+
type GraphFactory<TGraph extends Graph> = () => TGraph;
|
|
150
|
+
/** Options for {@link materialize}. */
|
|
151
|
+
type MaterializeOpts = ExtraOpts & {
|
|
152
|
+
/**
|
|
153
|
+
* Local mount name on the parent graph. Default `"materialized"`.
|
|
154
|
+
*
|
|
155
|
+
* Two materialize calls on the SAME parent must use distinct `slotName`
|
|
156
|
+
* values, otherwise the second mount throws "mount already exists".
|
|
157
|
+
* For a hub mounting many slots (e.g. {@link spawnable}'s preset
|
|
158
|
+
* registry), use `slotName: \`preset-\${id}\`` or similar.
|
|
159
|
+
*/
|
|
160
|
+
slotName?: string;
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* Reactive dynamic mount: mounts the Graph instance for `key` under
|
|
164
|
+
* `parent.mount(slotName, ...)`, and re-mounts when `key` changes.
|
|
165
|
+
*
|
|
166
|
+
* **Lifecycle.** First DATA on `key` triggers a mount: look up
|
|
167
|
+
* `factories.get(key)`, call the factory thunk, mount the result under
|
|
168
|
+
* `parent`. Each subsequent `key` change unmounts the previous slot and
|
|
169
|
+
* mounts the new one. When this materialize node terminates (subscriber
|
|
170
|
+
* teardown, `COMPLETE` from `key`, `Graph.destroy`), the active slot is
|
|
171
|
+
* unmounted via `parent.remove(slotName)`.
|
|
172
|
+
*
|
|
173
|
+
* **Hot-swap policy (G10 deferred).** When `factories` mutates but `key`
|
|
174
|
+
* stays the same, the currently-mounted slot is NOT re-instantiated —
|
|
175
|
+
* "current sessions complete on old factory; new sessions use new
|
|
176
|
+
* factory." Atomic disconnect/reconnect of an in-flight slot to a new
|
|
177
|
+
* factory is parked under G10 (see `optimizations.md` "G10 atomic
|
|
178
|
+
* registry hot-swap").
|
|
179
|
+
*
|
|
180
|
+
* **Output.** The returned `Node<TGraph>` emits the currently-mounted
|
|
181
|
+
* Graph reference whenever a mount occurs. Consumers can subscribe to
|
|
182
|
+
* watch slot changes, or read `.cache` for the active mount. SENTINEL
|
|
183
|
+
* (no DATA) when no slot is currently mounted (e.g. `key` has no matching
|
|
184
|
+
* factory).
|
|
185
|
+
*
|
|
186
|
+
* **Spec compliance.**
|
|
187
|
+
* - No polling: mount transitions are reactive on `key` / `factories`.
|
|
188
|
+
* - No raw async: factory invocation is synchronous; if a factory needs
|
|
189
|
+
* async setup, it returns a Graph that handles its own setup internally.
|
|
190
|
+
* - Mount/unmount happens as side-effects inside the reactive `subscribe`
|
|
191
|
+
* handler — sanctioned per spec §5.9 (Graph topology mutations are
|
|
192
|
+
* imperative writes at the system boundary, not in-flight reactive
|
|
193
|
+
* triggers).
|
|
194
|
+
*
|
|
195
|
+
* @param key - Reactive routing key. Re-mounts on each key change (deduped
|
|
196
|
+
* by reference; pair with {@link selector} for projection-based dedup).
|
|
197
|
+
* @param factories - Reactive map of `key → factory thunk`. Factory map
|
|
198
|
+
* mutations don't disturb the active slot until the next key change.
|
|
199
|
+
* @param parent - Graph to mount slots under. The `slotName` (default
|
|
200
|
+
* `"materialized"`) must be free on `parent` at construction time.
|
|
201
|
+
* @param opts - Optional {@link MaterializeOpts}.
|
|
202
|
+
* @returns `Node<TGraph>` carrying the active mount.
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* ```ts
|
|
206
|
+
* import { materialize, selector, state, Graph } from "@graphrefly/graphrefly-ts";
|
|
207
|
+
*
|
|
208
|
+
* const parent = new Graph("parent");
|
|
209
|
+
* const factories = state<ReadonlyMap<string, () => Graph>>(new Map([
|
|
210
|
+
* ["researcher", () => new ResearchAgentGraph()],
|
|
211
|
+
* ["coder", () => new CoderAgentGraph()],
|
|
212
|
+
* ]));
|
|
213
|
+
* const key = selector(requestNode, (r) => r.kind);
|
|
214
|
+
* const slot = materialize(key, factories, parent, { slotName: "agent" });
|
|
215
|
+
* // `slot.cache` is the active agent graph; `parent.node("agent::out")`
|
|
216
|
+
* // resolves into whichever agent is currently mounted.
|
|
217
|
+
* ```
|
|
218
|
+
*
|
|
219
|
+
* @category extra
|
|
220
|
+
*/
|
|
221
|
+
declare function materialize<TKey, TGraph extends Graph>(key: Node<TKey>, factories: Node<ReadonlyMap<TKey, GraphFactory<TGraph>>>, parent: Graph, opts?: MaterializeOpts): Node<TGraph>;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Lazy per-topic state hub (roadmap §3.2) — lightweight last-value broadcasts.
|
|
225
|
+
*
|
|
226
|
+
* Each topic is a sentinel `node<unknown>()` with push-on-subscribe replay of
|
|
227
|
+
* the most recent published value (no push until the first `publish`). For
|
|
228
|
+
* Pulsar-inspired retained message logs,
|
|
229
|
+
* cursor-based subscriptions, and job-queue semantics, use `messagingHub()` in
|
|
230
|
+
* `utils/messaging` — built on `TopicGraph` / `SubscriptionGraph` with
|
|
231
|
+
* retention policies, absolute cursor tracking, and per-subscriber state.
|
|
232
|
+
*
|
|
233
|
+
* Presentation layer (base/composition). Moved from pure-ts during cleave A3
|
|
234
|
+
* (no substrate core/graph dependency on pubsub found).
|
|
235
|
+
*/
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Storage contract for {@link pubsub} — registry only.
|
|
239
|
+
*
|
|
240
|
+
* Tracks the set of topic names plus a monotonic `version` counter that
|
|
241
|
+
* advances on topic create/remove. Does NOT own per-topic message storage —
|
|
242
|
+
* per-topic cached last values live in the topic nodes themselves (sentinel
|
|
243
|
+
* until the first publish).
|
|
244
|
+
*
|
|
245
|
+
* For distributed / persistent per-topic storage, use `messagingHub()` in
|
|
246
|
+
* `utils/messaging`, which composes `TopicGraph` under a lazy registry.
|
|
247
|
+
*
|
|
248
|
+
* @category base
|
|
249
|
+
*/
|
|
250
|
+
interface PubSubBackend {
|
|
251
|
+
/** Monotonic counter; advances on topic create/remove. */
|
|
252
|
+
readonly version: number;
|
|
253
|
+
readonly topicCount: number;
|
|
254
|
+
hasTopic(name: string): boolean;
|
|
255
|
+
topicNames(): IterableIterator<string>;
|
|
256
|
+
/** Records topic creation. Returns `true` if newly added (advances `version`). */
|
|
257
|
+
createTopic(name: string): boolean;
|
|
258
|
+
/** Records topic removal. Returns `true` if it existed (advances `version`). */
|
|
259
|
+
removeTopic(name: string): boolean;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Default in-memory registry backend.
|
|
263
|
+
*
|
|
264
|
+
* @category base
|
|
265
|
+
*/
|
|
266
|
+
declare class NativePubSubBackend implements PubSubBackend {
|
|
267
|
+
private _version;
|
|
268
|
+
private readonly _topics;
|
|
269
|
+
get version(): number;
|
|
270
|
+
get topicCount(): number;
|
|
271
|
+
hasTopic(name: string): boolean;
|
|
272
|
+
topicNames(): IterableIterator<string>;
|
|
273
|
+
createTopic(name: string): boolean;
|
|
274
|
+
removeTopic(name: string): boolean;
|
|
275
|
+
}
|
|
276
|
+
type PubSubHubOptions = {
|
|
277
|
+
/**
|
|
278
|
+
* Storage backend. Defaults to `NativePubSubBackend`. Pluggable for audit /
|
|
279
|
+
* monitoring / mirror-to-external-broker use cases.
|
|
280
|
+
*/
|
|
281
|
+
backend?: PubSubBackend;
|
|
282
|
+
/**
|
|
283
|
+
* DS-14 / DS14R2 — opt-in delta companion. When set, the hub appends a
|
|
284
|
+
* typed {@link PubSubChange} record in the **same batch frame** as the
|
|
285
|
+
* topic emission / teardown (same-wave consistency — subscribers reading
|
|
286
|
+
* both a topic and `mutationLog` never see torn state).
|
|
287
|
+
*
|
|
288
|
+
* Records the locked `PubSubChange` verbs that apply to this last-value
|
|
289
|
+
* hub: `publish` (per `publish` / `publishMany`) and `remove` (per
|
|
290
|
+
* `removeTopic`). The `ack` verb is a cursor concern of `messagingHub()`
|
|
291
|
+
* and does not apply here. **Note:** the locked `publish` payload carries
|
|
292
|
+
* `value` only (no topic name) — callers needing per-topic delta
|
|
293
|
+
* correlation should embed identity in the value or use `messagingHub()`.
|
|
294
|
+
*
|
|
295
|
+
* `true` = defaults; object form forwards `maxSize` / `name` to the inner
|
|
296
|
+
* `reactiveLog`.
|
|
297
|
+
*/
|
|
298
|
+
mutationLog?: true | {
|
|
299
|
+
maxSize?: number;
|
|
300
|
+
name?: string;
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
/**
|
|
304
|
+
* Lazy per-topic state hub. Topics are single-value sentinel nodes
|
|
305
|
+
* with push-on-subscribe replay of the most recent publish.
|
|
306
|
+
*
|
|
307
|
+
* @category base
|
|
308
|
+
*/
|
|
309
|
+
interface PubSubHub {
|
|
310
|
+
/**
|
|
311
|
+
* Returns the topic node, creating it on first use.
|
|
312
|
+
*
|
|
313
|
+
* @param name - Topic key.
|
|
314
|
+
* @returns `Node` whose value is the last published payload. Starts in
|
|
315
|
+
* sentinel state — no push-on-subscribe until the first publish.
|
|
316
|
+
*/
|
|
317
|
+
topic(name: string): Node<unknown>;
|
|
318
|
+
/** Publishes a value to the topic (lazily creating the topic if missing). */
|
|
319
|
+
publish(name: string, value: unknown): void;
|
|
320
|
+
/**
|
|
321
|
+
* Bulk publish — single outer batch for all entries. No-op if empty.
|
|
322
|
+
*
|
|
323
|
+
* **Iterable consumption (F6):** `entries` is consumed once (single-pass).
|
|
324
|
+
* Pass an array or `Set` for multi-shot callers. Iteration happens INSIDE
|
|
325
|
+
* the batch frame — if the iterator throws mid-way, the batch is discarded
|
|
326
|
+
* and NO publishes are visible to subscribers (all-or-nothing within one
|
|
327
|
+
* call).
|
|
328
|
+
*/
|
|
329
|
+
publishMany(entries: Iterable<[string, unknown]>): void;
|
|
330
|
+
/** Removes a topic; sends `TEARDOWN` to its node. Returns `true` if it existed. */
|
|
331
|
+
removeTopic(name: string): boolean;
|
|
332
|
+
/** Checks topic existence without creating. O(1). */
|
|
333
|
+
has(name: string): boolean;
|
|
334
|
+
/** Number of topics currently registered. O(1). */
|
|
335
|
+
readonly size: number;
|
|
336
|
+
/** Iterator over topic names. */
|
|
337
|
+
topicNames(): IterableIterator<string>;
|
|
338
|
+
/**
|
|
339
|
+
* DS14R2 — present iff `mutationLog` was configured. Append-only log of
|
|
340
|
+
* `publish` / `remove` deltas, same-wave-consistent with topic emissions.
|
|
341
|
+
*/
|
|
342
|
+
readonly mutationLog?: ReactiveLogBundle<PubSubChange>;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Creates a lazy per-topic state hub.
|
|
346
|
+
*
|
|
347
|
+
* @param options - Optional pluggable `backend` (defaults to `NativePubSubBackend`).
|
|
348
|
+
* @returns Hub with lazy `topic()` / `publish()` / `publishMany()` / `removeTopic()` /
|
|
349
|
+
* `has()` / `size` / `topicNames()`.
|
|
350
|
+
*
|
|
351
|
+
* @remarks
|
|
352
|
+
* **Scope:** Each topic is a sentinel node — retains only the last published
|
|
353
|
+
* value (no push-on-subscribe before the first publish). For Pulsar-inspired
|
|
354
|
+
* retention + cursor reading, use `messagingHub()` in `utils/messaging`.
|
|
355
|
+
*
|
|
356
|
+
* **`removeTopic`:** Sends `TEARDOWN` to the topic node; all subscribers receive
|
|
357
|
+
* the TEARDOWN message. Subsequent `publish(name, value)` silently recreates the
|
|
358
|
+
* topic with a fresh node — existing subscribers to the old node do NOT reconnect.
|
|
359
|
+
*
|
|
360
|
+
* @example
|
|
361
|
+
* ```ts
|
|
362
|
+
* import { pubsub } from "@graphrefly/graphrefly";
|
|
363
|
+
*
|
|
364
|
+
* const hub = pubsub();
|
|
365
|
+
* const t = hub.topic("events");
|
|
366
|
+
* t.subscribe((msgs) => console.log(msgs));
|
|
367
|
+
* hub.publish("events", { ok: true });
|
|
368
|
+
* hub.publishMany([["events", 1], ["status", "ready"]]);
|
|
369
|
+
* ```
|
|
370
|
+
*
|
|
371
|
+
* @category base
|
|
372
|
+
*/
|
|
373
|
+
declare function pubsub(options?: PubSubHubOptions): PubSubHub;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* `singleFromAny` — keyed promise/Node de-duplication ("singleflight").
|
|
377
|
+
*
|
|
378
|
+
* Given a `factory: (key) => NodeInput<T>`, returns a callable that dedupes
|
|
379
|
+
* concurrent invocations sharing the same key — all callers with the same
|
|
380
|
+
* key while a request is in-flight receive the same `Promise<T>`. Once the
|
|
381
|
+
* underlying source settles (DATA, ERROR, or COMPLETE), the cache entry is
|
|
382
|
+
* cleared so the next call re-invokes the factory.
|
|
383
|
+
*
|
|
384
|
+
* This is the classic "singleflight" pattern from Go, generalised over the
|
|
385
|
+
* library's `NodeInput<T>` bridge so callers can pass Promise-returning
|
|
386
|
+
* factories, Node-returning factories, or plain value factories with
|
|
387
|
+
* identical semantics.
|
|
388
|
+
*
|
|
389
|
+
* Use cases:
|
|
390
|
+
* - `withReplayCache` cache-miss thundering-herd dedup
|
|
391
|
+
* - Shared HTTP fetches keyed by URL
|
|
392
|
+
* - Expensive compute keyed by request fingerprint
|
|
393
|
+
*
|
|
394
|
+
* @example
|
|
395
|
+
* ```ts
|
|
396
|
+
* const fetchUser = singleFromAny<string, User>((id) => fetch(`/users/${id}`).then(r => r.json()));
|
|
397
|
+
* // Two concurrent callers with id="42" → one underlying fetch, two Promises resolving to the same User.
|
|
398
|
+
* const [a, b] = await Promise.all([fetchUser("42"), fetchUser("42")]);
|
|
399
|
+
* ```
|
|
400
|
+
*
|
|
401
|
+
* @category extra
|
|
402
|
+
*/
|
|
403
|
+
|
|
404
|
+
interface SingleFromAnyOptions<K> {
|
|
405
|
+
/**
|
|
406
|
+
* Convert a typed key into a cache-string. Defaults to `String(key)`, which
|
|
407
|
+
* works for primitive keys; callers with object keys should provide a
|
|
408
|
+
* stable serializer (e.g., canonical JSON).
|
|
409
|
+
*/
|
|
410
|
+
keyFn?: (key: K) => string;
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Dedupe concurrent `factory(key)` invocations. Returns a bound callable.
|
|
414
|
+
*
|
|
415
|
+
* @param factory - Produces a `NodeInput<T>` for each unique key.
|
|
416
|
+
* @param opts - Optional key-stringification.
|
|
417
|
+
* @returns A function `(key: K) => Promise<T>` whose inflight results are shared per key.
|
|
418
|
+
*/
|
|
419
|
+
declare function singleFromAny<K, T>(factory: (key: K) => NodeInput<T>, opts?: SingleFromAnyOptions<K>): (key: K) => Promise<T>;
|
|
420
|
+
/**
|
|
421
|
+
* Reactive variant: returns a bound callable that hands out `Node<T>` values.
|
|
422
|
+
* All concurrent callers with the same key during an in-flight source share
|
|
423
|
+
* the same Node. When the underlying source **terminally** settles (ERROR
|
|
424
|
+
* or COMPLETE), the Node is removed from the cache so the next call
|
|
425
|
+
* re-invokes `factory`. DATA is NOT terminal — callers subscribing after
|
|
426
|
+
* the first DATA still receive the shared Node (and push-on-subscribe per
|
|
427
|
+
* the spec's cached-DATA contract).
|
|
428
|
+
*
|
|
429
|
+
* Use when downstream wants reactive subscription (not a one-shot Promise).
|
|
430
|
+
*
|
|
431
|
+
* @category extra
|
|
432
|
+
*/
|
|
433
|
+
declare function singleNodeFromAny<K, T>(factory: (key: K) => NodeInput<T>, opts?: SingleFromAnyOptions<K>): (key: K) => Node<T>;
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Composite data patterns (roadmap §3.2b).
|
|
437
|
+
*
|
|
438
|
+
* These helpers compose existing primitives (`node`, `switchMap`, `reactiveMap`,
|
|
439
|
+
* `dynamicNode`, `fromAny`) without introducing new protocol semantics.
|
|
440
|
+
*/
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Verification payload shape is intentionally user-defined.
|
|
444
|
+
*/
|
|
445
|
+
type VerifyValue = unknown;
|
|
446
|
+
type VerifiableOptions<TVerify = VerifyValue> = Omit<NodeOptions, "describeKind" | "initial"> & {
|
|
447
|
+
/** Reactive re-verification trigger. */
|
|
448
|
+
trigger?: NodeInput<unknown>;
|
|
449
|
+
/** Re-run verification whenever `source` settles. */
|
|
450
|
+
autoVerify?: boolean;
|
|
451
|
+
/** Initial verification companion value. */
|
|
452
|
+
initialVerified?: TVerify | null;
|
|
453
|
+
};
|
|
454
|
+
type VerifiableBundle<T, TVerify = VerifyValue> = {
|
|
455
|
+
/** Coerced source node. */
|
|
456
|
+
node: Node<T>;
|
|
457
|
+
/** Latest verification result (`null` before first verification). */
|
|
458
|
+
verified: Node<TVerify | null>;
|
|
459
|
+
/** Effective trigger node used for verification, if any. */
|
|
460
|
+
trigger: Node<unknown> | null;
|
|
461
|
+
};
|
|
462
|
+
/**
|
|
463
|
+
* Composes a value node with a reactive verification companion.
|
|
464
|
+
*
|
|
465
|
+
* Uses `switchMap` so newer triggers cancel stale in-flight verification work.
|
|
466
|
+
*/
|
|
467
|
+
declare function verifiable<T, TVerify = VerifyValue>(source: NodeInput<T>, verifyFn: (value: T) => NodeInput<TVerify>, opts?: VerifiableOptions<TVerify>): VerifiableBundle<T, TVerify>;
|
|
468
|
+
|
|
469
|
+
export { type ExtraOpts, type GraphFactory, type MaterializeOpts, NativePubSubBackend, type PubSubBackend, type PubSubHub, type PubSubHubOptions, type SelectorOpts, type SingleFromAnyOptions, type VerifiableBundle, type VerifiableOptions, type VerifyValue, type WatermarkController, type WatermarkOptions, createWatermarkController, materialize, pubsub, selector, singleFromAny, singleNodeFromAny, verifiable };
|