@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.
- package/README.md +22 -19
- 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/{extra/render/index.d.ts → base/render/index.d.cts} +75 -31
- package/dist/{extra/render/index.d.cts → base/render/index.d.ts} +75 -31
- 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/{extra/sources.d.ts → base/sources/index.d.cts} +74 -301
- package/dist/{extra/sources.d.cts → base/sources/index.d.ts} +74 -301
- 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/{extra/node.d.ts → base/sources/node/index.d.cts} +35 -37
- package/dist/{extra/node.d.cts → base/sources/node/index.d.ts} +35 -37
- 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-BglDkMdX.d.cts → cascading-CSSbKGrJ.d.ts} +3 -3
- package/dist/{cascading-MFgxu7Yo.d.ts → cascading-baGkiihI.d.cts} +3 -3
- 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 +3100 -9
- package/dist/compat/index.cjs.map +1 -0
- package/dist/compat/index.d.cts +112 -18
- package/dist/compat/index.d.ts +112 -18
- package/dist/compat/index.js +176 -1
- package/dist/compat/index.js.map +1 -0
- package/dist/compat/jotai/index.cjs +149 -1
- package/dist/compat/jotai/index.cjs.map +1 -0
- package/dist/compat/jotai/index.d.cts +2 -2
- package/dist/compat/jotai/index.d.ts +2 -2
- package/dist/compat/jotai/index.js +8 -1
- package/dist/compat/jotai/index.js.map +1 -0
- package/dist/compat/nanostores/index.cjs +205 -1
- package/dist/compat/nanostores/index.cjs.map +1 -0
- package/dist/compat/nanostores/index.d.cts +2 -2
- package/dist/compat/nanostores/index.d.ts +2 -2
- package/dist/compat/nanostores/index.js +22 -1
- package/dist/compat/nanostores/index.js.map +1 -0
- package/dist/compat/nestjs/index.cjs +2241 -9
- package/dist/compat/nestjs/index.cjs.map +1 -0
- package/dist/compat/nestjs/index.d.cts +7 -10
- package/dist/compat/nestjs/index.d.ts +7 -10
- package/dist/compat/nestjs/index.js +78 -1
- package/dist/compat/nestjs/index.js.map +1 -0
- package/dist/compat/react/index.cjs +114 -1
- package/dist/compat/react/index.cjs.map +1 -0
- package/dist/compat/react/index.d.cts +2 -2
- package/dist/compat/react/index.d.ts +2 -2
- package/dist/compat/react/index.js +12 -1
- package/dist/compat/react/index.js.map +1 -0
- package/dist/compat/solid/index.cjs +101 -1
- package/dist/compat/solid/index.cjs.map +1 -0
- package/dist/compat/solid/index.d.cts +2 -2
- package/dist/compat/solid/index.d.ts +2 -2
- package/dist/compat/solid/index.js +12 -1
- package/dist/compat/solid/index.js.map +1 -0
- package/dist/compat/svelte/index.cjs +104 -1
- package/dist/compat/svelte/index.cjs.map +1 -0
- package/dist/compat/svelte/index.d.cts +2 -2
- package/dist/compat/svelte/index.d.ts +2 -2
- package/dist/compat/svelte/index.js +12 -1
- package/dist/compat/svelte/index.js.map +1 -0
- package/dist/compat/vue/index.cjs +119 -1
- package/dist/compat/vue/index.cjs.map +1 -0
- package/dist/compat/vue/index.d.cts +2 -2
- package/dist/compat/vue/index.d.ts +2 -2
- package/dist/compat/vue/index.js +12 -1
- package/dist/compat/vue/index.js.map +1 -0
- package/dist/compat/zustand/index.cjs +69 -3
- package/dist/compat/zustand/index.cjs.map +1 -0
- package/dist/compat/zustand/index.d.cts +2 -6
- package/dist/compat/zustand/index.d.ts +2 -6
- package/dist/compat/zustand/index.js +8 -1
- package/dist/compat/zustand/index.js.map +1 -0
- 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-74oxi34l.d.cts → fallback-Bx46zqky.d.cts} +3 -10
- package/dist/{fallback-DUyyBTBK.d.ts → fallback-pIWW8A2d.d.ts} +3 -10
- package/dist/guarded-execution-BcdtxeBk.d.ts +207 -0
- package/dist/guarded-execution-C-3hnP6A.d.cts +207 -0
- package/dist/{index-CBGUK09R.d.ts → index-5SU_O78r.d.cts} +5 -5
- package/dist/{index-BmZXHqkE.d.ts → index-B6pxYJzO.d.cts} +1 -1
- package/dist/{index-hcDJ8PSI.d.cts → index-B6pxYJzO.d.ts} +1 -1
- package/dist/{index-C5stwKcw.d.cts → index-BFsng6v1.d.cts} +1 -1
- package/dist/{index-CdAlHFEt.d.ts → index-BFsng6v1.d.ts} +1 -1
- package/dist/{index-_6ODbuOu.d.cts → index-Bg-LwEt-.d.cts} +1 -1
- package/dist/{index-CviRnE4K.d.ts → index-Bg-LwEt-.d.ts} +1 -1
- package/dist/{index-CBBLl_rc.d.ts → index-Brp888t0.d.cts} +1 -1
- package/dist/{index-BQSKmbuG.d.cts → index-Brp888t0.d.ts} +1 -1
- package/dist/{index-sqkqlb1p.d.ts → index-CDfk6jHN.d.cts} +1 -1
- package/dist/{index-ZVQhLa2i.d.cts → index-CDfk6jHN.d.ts} +1 -1
- package/dist/{index-Climxqsu.d.cts → index-CEXCtYYJ.d.ts} +5 -5
- package/dist/index-DLAxYaN5.d.cts +169 -0
- package/dist/index-DLAxYaN5.d.ts +169 -0
- package/dist/{index-CK29LV56.d.cts → index-DeWbQzMe.d.cts} +1 -1
- package/dist/{index-CPQlGA29.d.ts → index-DeWbQzMe.d.ts} +1 -1
- package/dist/{index-BrPrLl4e.d.cts → index-dX9IzPqj.d.cts} +1 -1
- package/dist/{index-Dgl1HpPn.d.ts → index-dX9IzPqj.d.ts} +1 -1
- package/dist/index.cjs +25934 -191
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +58 -94
- package/dist/index.d.ts +58 -94
- package/dist/index.js +852 -1
- package/dist/index.js.map +1 -0
- 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-DWjNfLvC.d.ts → observable-BXQoW1P-.d.cts} +1 -1
- package/dist/{observable-e3eiPPFy.d.cts → observable-BXQoW1P-.d.ts} +1 -1
- package/dist/{pipeline-graph-Sgj0gCwn.d.ts → pipeline-graph-Ce47CB6Y.d.cts} +13 -10
- package/dist/{pipeline-graph-CIKhynsF.d.cts → pipeline-graph-DXCwY9vG.d.ts} +13 -10
- 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-DOTs9P3X.d.ts → reactive-layout-fswlBUvX.d.cts} +19 -7
- package/dist/{reactive-layout-DgctbqZo.d.cts → reactive-layout-fswlBUvX.d.ts} +19 -7
- 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-CWFysE9E.d.ts → types-BB5Lw-pB.d.cts} +3 -3
- package/dist/{types-C0_yquda.d.cts → types-BB5Lw-pB.d.ts} +3 -3
- 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/{patterns → utils}/ai/browser.d.cts +7 -5
- package/dist/{patterns → utils}/ai/browser.d.ts +7 -5
- 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/{index-CR8QpwX8.d.ts → utils/ai/index.d.cts} +73 -976
- package/dist/{index-UPSiS-X7.d.cts → utils/ai/index.d.ts} +73 -976
- 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/{patterns → utils}/ai/node.d.cts +5 -7
- package/dist/{patterns → utils}/ai/node.d.ts +5 -7
- 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/{index-CeFiHtAg.d.ts → utils/cqrs/index.d.cts} +7 -37
- package/dist/{index-B-_tFaqV.d.cts → utils/cqrs/index.d.ts} +7 -37
- 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/{index-B8YnZpIR.d.ts → utils/demo-shell/index.d.cts} +4 -16
- package/dist/{index-Cwv0KWcU.d.cts → utils/demo-shell/index.d.ts} +4 -16
- 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/{index-CzLVrjxn.d.ts → utils/domain-templates/index.d.cts} +3 -20
- package/dist/{index-BaQaY_IQ.d.cts → utils/domain-templates/index.d.ts} +3 -20
- 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/{index-CMh5Rz1y.d.ts → utils/graphspec/index.d.cts} +106 -42
- package/dist/{index-CS0LTlB8.d.cts → utils/graphspec/index.d.ts} +106 -42
- 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/{index-DisjX8a-.d.ts → utils/job-queue/index.d.cts} +5 -26
- package/dist/{index-DV_1YuVk.d.cts → utils/job-queue/index.d.ts} +5 -26
- 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/{index-CZ3r5Rxp.d.ts → utils/memory/index.d.cts} +242 -34
- package/dist/{index-B17QddL1.d.cts → utils/memory/index.d.ts} +242 -34
- 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/{index-p09KSrTN.d.ts → utils/process/index.d.cts} +97 -44
- package/dist/{index-CasX6Pfq.d.cts → utils/process/index.d.ts} +97 -44
- 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/{index-B5S8ULbU.d.ts → utils/reactive-layout/index.d.cts} +58 -81
- package/dist/{index-Dc4AYqrJ.d.cts → utils/reactive-layout/index.d.ts} +58 -81
- 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/{index-Byu-OpX_.d.ts → utils/reduction/index.d.cts} +6 -17
- package/dist/{index-tRCxuAXF.d.cts → utils/reduction/index.d.ts} +6 -17
- 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/{index-CYq8vAyV.d.ts → utils/surface/index.d.cts} +7 -58
- package/dist/{index-CSOmP7xT.d.cts → utils/surface/index.d.ts} +7 -58
- 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 +664 -584
- package/dist/backoff-HPZMEZNF.js +0 -1
- package/dist/chunk-2T7U5EU6.js +0 -1
- package/dist/chunk-3G5U5QNE.js +0 -5
- package/dist/chunk-4VVTGLXJ.js +0 -1
- package/dist/chunk-5M4CCMMD.js +0 -45
- package/dist/chunk-5QDBSZBV.js +0 -1
- package/dist/chunk-5XJ6B66J.js +0 -1
- package/dist/chunk-6QZNQS5B.js +0 -1
- package/dist/chunk-6X7AFUJV.js +0 -9
- package/dist/chunk-7K6PWTDQ.js +0 -1
- package/dist/chunk-7LIAPXJB.js +0 -1
- package/dist/chunk-7WPU3UHQ.js +0 -1
- package/dist/chunk-A5WCQ5NO.js +0 -1
- package/dist/chunk-APPIWSGD.js +0 -84
- package/dist/chunk-BEZWM2SY.js +0 -1
- package/dist/chunk-C72GO4IZ.js +0 -1
- package/dist/chunk-CB676TKJ.js +0 -1
- package/dist/chunk-CE6TI2TL.js +0 -1
- package/dist/chunk-CE72X3WO.js +0 -1
- package/dist/chunk-CK2E7BTU.js +0 -1
- package/dist/chunk-CLVB32RD.js +0 -1
- package/dist/chunk-CRVT7D2P.js +0 -1
- package/dist/chunk-D5RFJOZ2.js +0 -1
- package/dist/chunk-D7GPHKFH.js +0 -1
- package/dist/chunk-DHRX7JX4.js +0 -2
- package/dist/chunk-ESMPEKEV.js +0 -1
- package/dist/chunk-F672GV32.js +0 -1
- package/dist/chunk-FZMYDOWV.js +0 -1
- package/dist/chunk-GHBWHMRZ.js +0 -1
- package/dist/chunk-GLERH466.js +0 -1
- package/dist/chunk-GPW2V3RE.js +0 -1
- package/dist/chunk-HIDYF36O.js +0 -1
- package/dist/chunk-HITNVN6B.js +0 -3
- package/dist/chunk-HY4DJBA7.js +0 -5
- package/dist/chunk-KZIEYVXN.js +0 -1
- package/dist/chunk-L6NSJVJZ.js +0 -1
- package/dist/chunk-N4MQX6JU.js +0 -18
- package/dist/chunk-N7FHEL4D.js +0 -1
- package/dist/chunk-NTEURFZH.js +0 -1
- package/dist/chunk-OIVP6KFV.js +0 -1
- package/dist/chunk-OPHBU3LG.js +0 -1
- package/dist/chunk-OYQOZP2F.js +0 -5
- package/dist/chunk-PTZK576G.js +0 -1
- package/dist/chunk-QYADASLV.js +0 -1
- package/dist/chunk-ST7UXLWR.js +0 -1
- package/dist/chunk-SVY7VUYU.js +0 -1
- package/dist/chunk-TK3NWWD4.js +0 -1
- package/dist/chunk-TSOYJ743.js +0 -1
- package/dist/chunk-UNGSTR4X.js +0 -61
- package/dist/chunk-VIMF6LGM.js +0 -1
- package/dist/chunk-VJLMUKOI.js +0 -1
- package/dist/chunk-VN6RDSK2.js +0 -1
- package/dist/chunk-VV4N5P64.js +0 -1
- package/dist/chunk-W3I423PS.js +0 -1
- package/dist/chunk-WJR24TAG.js +0 -1
- package/dist/chunk-XTGKMHSW.js +0 -1
- package/dist/chunk-YBB7ZGTY.js +0 -1
- package/dist/chunk-Z4NPUARF.js +0 -1
- package/dist/chunk-ZGNQRPDT.js +0 -1
- package/dist/chunk-ZKPSFFKU.js +0 -1
- package/dist/chunk-ZLV5SQSX.js +0 -1
- package/dist/content-addressed-storage-4-ST1tYk.d.cts +0 -124
- package/dist/content-addressed-storage-DuYMjV7o.d.ts +0 -124
- package/dist/core/index.cjs +0 -1
- package/dist/core/index.d.cts +0 -3
- package/dist/core/index.d.ts +0 -3
- package/dist/core/index.js +0 -1
- package/dist/decay-BvOWTZ00.d.ts +0 -112
- package/dist/decay-CFlLvXUT.d.cts +0 -112
- package/dist/extra/browser.cjs +0 -1
- package/dist/extra/browser.d.cts +0 -4
- package/dist/extra/browser.d.ts +0 -4
- package/dist/extra/browser.js +0 -1
- package/dist/extra/index.cjs +0 -20
- package/dist/extra/index.d.cts +0 -17
- package/dist/extra/index.d.ts +0 -17
- package/dist/extra/index.js +0 -1
- package/dist/extra/node.cjs +0 -2
- package/dist/extra/node.js +0 -2
- package/dist/extra/operators.cjs +0 -1
- package/dist/extra/operators.d.cts +0 -958
- package/dist/extra/operators.d.ts +0 -958
- package/dist/extra/operators.js +0 -1
- package/dist/extra/reactive.cjs +0 -1
- package/dist/extra/reactive.d.cts +0 -353
- package/dist/extra/reactive.d.ts +0 -353
- package/dist/extra/reactive.js +0 -1
- package/dist/extra/render/index.cjs +0 -5
- package/dist/extra/render/index.js +0 -1
- package/dist/extra/sources.cjs +0 -3
- package/dist/extra/sources.js +0 -1
- package/dist/extra/storage-browser.cjs +0 -1
- package/dist/extra/storage-browser.d.cts +0 -37
- package/dist/extra/storage-browser.d.ts +0 -37
- package/dist/extra/storage-browser.js +0 -1
- package/dist/extra/storage-core.cjs +0 -1
- package/dist/extra/storage-core.d.cts +0 -28
- package/dist/extra/storage-core.d.ts +0 -28
- package/dist/extra/storage-core.js +0 -1
- package/dist/extra/storage-node.cjs +0 -1
- package/dist/extra/storage-node.d.cts +0 -2
- package/dist/extra/storage-node.d.ts +0 -2
- package/dist/extra/storage-node.js +0 -0
- package/dist/extra/storage-tiers-browser.cjs +0 -1
- package/dist/extra/storage-tiers-browser.d.cts +0 -120
- package/dist/extra/storage-tiers-browser.d.ts +0 -120
- package/dist/extra/storage-tiers-browser.js +0 -1
- package/dist/extra/storage-tiers-node.cjs +0 -1
- package/dist/extra/storage-tiers-node.d.cts +0 -210
- package/dist/extra/storage-tiers-node.d.ts +0 -210
- package/dist/extra/storage-tiers-node.js +0 -1
- package/dist/extra/storage-tiers.cjs +0 -1
- package/dist/extra/storage-tiers.d.cts +0 -412
- package/dist/extra/storage-tiers.d.ts +0 -412
- package/dist/extra/storage-tiers.js +0 -1
- package/dist/graph/index.cjs +0 -7
- package/dist/graph/index.d.cts +0 -7
- package/dist/graph/index.d.ts +0 -7
- package/dist/graph/index.js +0 -1
- package/dist/graph-CWvEUQAq.d.cts +0 -1861
- package/dist/graph-D9LFnda9.d.ts +0 -1861
- package/dist/index-5k1T6jl0.d.cts +0 -121
- package/dist/index-9770hRuQ.d.cts +0 -779
- package/dist/index-B1F8Enjf.d.ts +0 -704
- package/dist/index-BHskSB8v.d.ts +0 -3413
- package/dist/index-BIYAkbAi.d.cts +0 -26
- package/dist/index-BoJ5JHxI.d.ts +0 -557
- package/dist/index-BocU7pqs.d.ts +0 -779
- package/dist/index-BxNs2HB9.d.cts +0 -1858
- package/dist/index-C1T3d7V-.d.cts +0 -704
- package/dist/index-C5ri2Axc.d.cts +0 -301
- package/dist/index-C9l6OEBL.d.ts +0 -26
- package/dist/index-CC-AvFTy.d.cts +0 -557
- package/dist/index-CJF1URuX.d.ts +0 -121
- package/dist/index-CdTelp1M.d.ts +0 -202
- package/dist/index-Cj3WohTd.d.cts +0 -202
- package/dist/index-Co7uli2l.d.cts +0 -3413
- package/dist/index-D0aciIex.d.cts +0 -209
- package/dist/index-DHen9Klo.d.ts +0 -1858
- package/dist/index-Yq60JP3s.d.ts +0 -209
- package/dist/index-nozs3fFC.d.ts +0 -301
- package/dist/node-kK3CvTrR.d.cts +0 -1347
- package/dist/node-kK3CvTrR.d.ts +0 -1347
- package/dist/patterns/ai/browser.cjs +0 -8
- package/dist/patterns/ai/browser.js +0 -3
- package/dist/patterns/ai/index.cjs +0 -74
- package/dist/patterns/ai/index.d.cts +0 -20
- package/dist/patterns/ai/index.d.ts +0 -20
- package/dist/patterns/ai/index.js +0 -1
- package/dist/patterns/ai/node.cjs +0 -1
- package/dist/patterns/ai/node.js +0 -1
- package/dist/patterns/cqrs/index.cjs +0 -3
- package/dist/patterns/cqrs/index.d.cts +0 -8
- package/dist/patterns/cqrs/index.d.ts +0 -8
- package/dist/patterns/cqrs/index.js +0 -1
- package/dist/patterns/demo-shell/index.cjs +0 -5
- package/dist/patterns/demo-shell/index.d.cts +0 -7
- package/dist/patterns/demo-shell/index.d.ts +0 -7
- package/dist/patterns/demo-shell/index.js +0 -1
- package/dist/patterns/domain-templates/index.cjs +0 -3
- package/dist/patterns/domain-templates/index.d.cts +0 -6
- package/dist/patterns/domain-templates/index.d.ts +0 -6
- package/dist/patterns/domain-templates/index.js +0 -1
- package/dist/patterns/graphspec/index.cjs +0 -86
- package/dist/patterns/graphspec/index.d.cts +0 -8
- package/dist/patterns/graphspec/index.d.ts +0 -8
- package/dist/patterns/graphspec/index.js +0 -1
- package/dist/patterns/harness/index.cjs +0 -48
- package/dist/patterns/harness/index.d.cts +0 -13
- package/dist/patterns/harness/index.d.ts +0 -13
- package/dist/patterns/harness/index.js +0 -1
- package/dist/patterns/inspect/index.cjs +0 -3
- package/dist/patterns/inspect/index.d.cts +0 -9
- package/dist/patterns/inspect/index.d.ts +0 -9
- package/dist/patterns/inspect/index.js +0 -1
- package/dist/patterns/job-queue/index.cjs +0 -3
- package/dist/patterns/job-queue/index.d.cts +0 -9
- package/dist/patterns/job-queue/index.d.ts +0 -9
- package/dist/patterns/job-queue/index.js +0 -1
- package/dist/patterns/memory/index.cjs +0 -3
- package/dist/patterns/memory/index.d.cts +0 -8
- package/dist/patterns/memory/index.d.ts +0 -8
- package/dist/patterns/memory/index.js +0 -1
- package/dist/patterns/messaging/index.cjs +0 -3
- package/dist/patterns/messaging/index.d.cts +0 -7
- package/dist/patterns/messaging/index.d.ts +0 -7
- package/dist/patterns/messaging/index.js +0 -1
- package/dist/patterns/orchestration/index.cjs +0 -3
- package/dist/patterns/orchestration/index.d.cts +0 -8
- package/dist/patterns/orchestration/index.d.ts +0 -8
- package/dist/patterns/orchestration/index.js +0 -1
- package/dist/patterns/process/index.cjs +0 -3
- package/dist/patterns/process/index.d.cts +0 -10
- package/dist/patterns/process/index.d.ts +0 -10
- package/dist/patterns/process/index.js +0 -1
- package/dist/patterns/reactive-layout/index.cjs +0 -4
- package/dist/patterns/reactive-layout/index.d.cts +0 -7
- package/dist/patterns/reactive-layout/index.d.ts +0 -7
- package/dist/patterns/reactive-layout/index.js +0 -1
- package/dist/patterns/reduction/index.cjs +0 -3
- package/dist/patterns/reduction/index.d.cts +0 -6
- package/dist/patterns/reduction/index.d.ts +0 -6
- package/dist/patterns/reduction/index.js +0 -1
- package/dist/patterns/surface/index.cjs +0 -13
- package/dist/patterns/surface/index.d.cts +0 -9
- package/dist/patterns/surface/index.d.ts +0 -9
- package/dist/patterns/surface/index.js +0 -1
- package/dist/reactive-log-BKALbfal.d.ts +0 -223
- package/dist/reactive-log-DIGdYqQ6.d.cts +0 -223
- package/dist/reactive-map-CEFGp8TK.d.cts +0 -296
- package/dist/reactive-map-DS_SIAxv.d.ts +0 -296
- package/dist/resilience-6LYQJAC5.js +0 -1
- package/dist/sugar-DQjFmVqb.d.cts +0 -399
- package/dist/sugar-fhLIE7TT.d.ts +0 -399
- package/dist/topology-tree-Bcz27hpF.d.cts +0 -25
- package/dist/topology-tree-xvaD0fOX.d.ts +0 -25
|
@@ -0,0 +1,562 @@
|
|
|
1
|
+
import * as _graphrefly_pure_ts_extra from '@graphrefly/pure-ts/extra';
|
|
2
|
+
import { BaseAuditRecord } from '../../base/mutation/index.js';
|
|
3
|
+
import { Node } from '@graphrefly/pure-ts/core';
|
|
4
|
+
import { Graph, GraphOptions } from '@graphrefly/pure-ts/graph';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Messaging audit-record schemas (DS-13.5.E, locked 2026-05-01 alt A).
|
|
8
|
+
*
|
|
9
|
+
* Per-site discriminated-union audit records for the four messaging mutation
|
|
10
|
+
* sites that route through `mutate`:
|
|
11
|
+
*
|
|
12
|
+
* - {@link TopicPublishRecord} — `Topic.publish`
|
|
13
|
+
* - {@link SubscriptionAckRecord} — `Subscription.ack`
|
|
14
|
+
* - {@link SubscriptionPullAndAckRecord} — `Subscription.pullAndAck`
|
|
15
|
+
* - {@link HubRemoveTopicRecord} — `Hub.removeTopic`
|
|
16
|
+
*
|
|
17
|
+
* **Opt-in usage.** None of the four mutation sites enable an audit log by
|
|
18
|
+
* default — caller wires audit visibility by composing `mutate` with
|
|
19
|
+
* an audit `ReactiveLogBundle<R>` of the matching record type and an
|
|
20
|
+
* `onSuccess`/`onFailure` builder:
|
|
21
|
+
*
|
|
22
|
+
* ```ts
|
|
23
|
+
* import { createAuditLog, mutate } from "@graphrefly/graphrefly/extra";
|
|
24
|
+
* import {
|
|
25
|
+
* type TopicPublishRecord,
|
|
26
|
+
* topicPublishKeyOf,
|
|
27
|
+
* } from "@graphrefly/graphrefly/patterns/messaging";
|
|
28
|
+
*
|
|
29
|
+
* const audit = createAuditLog<TopicPublishRecord>({ name: "publishes" });
|
|
30
|
+
* const publish = mutate(
|
|
31
|
+
* (item: MyMessage) => topic.publish(item),
|
|
32
|
+
* {
|
|
33
|
+
* frame: "inline",
|
|
34
|
+
* log: audit,
|
|
35
|
+
* onSuccessRecord: ([item], _r, m) => ({
|
|
36
|
+
* t_ns: m.t_ns,
|
|
37
|
+
* seq: m.seq,
|
|
38
|
+
* kind: "topic.publish",
|
|
39
|
+
* topicName: topic.name,
|
|
40
|
+
* itemKey: keyOf(item),
|
|
41
|
+
* }),
|
|
42
|
+
* },
|
|
43
|
+
* );
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* **Stability.** The `kind` discriminator strings are pre-1.0 stable;
|
|
47
|
+
* renaming downstream breaks external auditors.
|
|
48
|
+
*
|
|
49
|
+
* **Composability.** All four records extend {@link BaseAuditRecord} so they
|
|
50
|
+
* carry the cross-cutting `t_ns` / `seq?` / `handlerVersion?` fields stamped
|
|
51
|
+
* by `mutate` (Audit 2 / Audit 5).
|
|
52
|
+
*
|
|
53
|
+
* **Per-record keyOf.** Each record exports a recommended `keyOf` for
|
|
54
|
+
* keyed-storage adapters (Rule G.27-keyOf-recommended) — partition the audit
|
|
55
|
+
* log by the most natural identity (`topicName::itemKey`,
|
|
56
|
+
* `subscriptionId::cursor`, etc.).
|
|
57
|
+
*
|
|
58
|
+
* **Hub.addTopic deferred.** No `HubAddTopicRecord` ships now; the lazy
|
|
59
|
+
* topic-creation site has no caller signal asking for an audit record.
|
|
60
|
+
* Re-add when a consumer surfaces.
|
|
61
|
+
*
|
|
62
|
+
* @category patterns
|
|
63
|
+
* @module patterns/messaging/audit-records
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Audit record for a single {@link TopicGraph.publish} call.
|
|
68
|
+
*
|
|
69
|
+
* - `topicName` — the topic the publish targeted.
|
|
70
|
+
* - `itemKey` — caller-supplied identity for the published item (typically
|
|
71
|
+
* the result of the topic's own `keyOf` derivation, when one exists).
|
|
72
|
+
*/
|
|
73
|
+
interface TopicPublishRecord extends BaseAuditRecord {
|
|
74
|
+
readonly kind: "topic.publish";
|
|
75
|
+
readonly topicName: string;
|
|
76
|
+
readonly itemKey: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Recommended `keyOf` for {@link TopicPublishRecord} — formats as
|
|
80
|
+
* `${topicName}::${itemKey}` for keyed-storage partitioning. Caller may
|
|
81
|
+
* override per Rule G.27-keyOf-recommended.
|
|
82
|
+
*/
|
|
83
|
+
declare const topicPublishKeyOf: (r: TopicPublishRecord) => string;
|
|
84
|
+
/**
|
|
85
|
+
* Audit record for a single {@link SubscriptionGraph.ack} call.
|
|
86
|
+
*
|
|
87
|
+
* - `subscriptionId` — the subscription the ack advanced.
|
|
88
|
+
* - `cursor` — the post-ack cursor position.
|
|
89
|
+
*/
|
|
90
|
+
interface SubscriptionAckRecord extends BaseAuditRecord {
|
|
91
|
+
readonly kind: "subscription.ack";
|
|
92
|
+
readonly subscriptionId: string;
|
|
93
|
+
readonly cursor: number;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Recommended `keyOf` for {@link SubscriptionAckRecord} — formats as
|
|
97
|
+
* `${subscriptionId}::${cursor}`.
|
|
98
|
+
*/
|
|
99
|
+
declare const subscriptionAckKeyOf: (r: SubscriptionAckRecord) => string;
|
|
100
|
+
/**
|
|
101
|
+
* Audit record for a single {@link SubscriptionGraph.pullAndAck} call.
|
|
102
|
+
*
|
|
103
|
+
* - `subscriptionId` — the subscription the pullAndAck advanced.
|
|
104
|
+
* - `cursor` — the post-pullAndAck cursor position.
|
|
105
|
+
* - `itemCount` — number of items returned to the caller in this call.
|
|
106
|
+
*/
|
|
107
|
+
interface SubscriptionPullAndAckRecord extends BaseAuditRecord {
|
|
108
|
+
readonly kind: "subscription.pullAndAck";
|
|
109
|
+
readonly subscriptionId: string;
|
|
110
|
+
readonly cursor: number;
|
|
111
|
+
readonly itemCount: number;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Recommended `keyOf` for {@link SubscriptionPullAndAckRecord} — formats as
|
|
115
|
+
* `${subscriptionId}::${cursor}` (identical shape to ack records so the
|
|
116
|
+
* combined audit-log partitioning matches a per-cursor-frame view).
|
|
117
|
+
*/
|
|
118
|
+
declare const subscriptionPullAndAckKeyOf: (r: SubscriptionPullAndAckRecord) => string;
|
|
119
|
+
/**
|
|
120
|
+
* Audit record for a single {@link MessagingHubGraph.removeTopic} call.
|
|
121
|
+
*
|
|
122
|
+
* - `topicName` — the topic that was unmounted from the hub.
|
|
123
|
+
*/
|
|
124
|
+
interface HubRemoveTopicRecord extends BaseAuditRecord {
|
|
125
|
+
readonly kind: "hub.removeTopic";
|
|
126
|
+
readonly topicName: string;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Recommended `keyOf` for {@link HubRemoveTopicRecord} — the topic name itself
|
|
130
|
+
* is already the natural identity.
|
|
131
|
+
*/
|
|
132
|
+
declare const hubRemoveTopicKeyOf: (r: HubRemoveTopicRecord) => string;
|
|
133
|
+
/**
|
|
134
|
+
* Discriminated union over every messaging audit record. Useful for callers
|
|
135
|
+
* that aggregate records from multiple sites into one log; switch on
|
|
136
|
+
* `record.kind` to narrow.
|
|
137
|
+
*/
|
|
138
|
+
type MessagingAuditRecord = TopicPublishRecord | SubscriptionAckRecord | SubscriptionPullAndAckRecord | HubRemoveTopicRecord;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Standard `TopicMessage<T>` envelope for hub topics + well-known topic name
|
|
142
|
+
* constants (Phase 13.B; spec source: archive/docs/SESSION-human-llm-intervention-primitives.md
|
|
143
|
+
* §6 + archive/docs/SESSION-multi-agent-gap-analysis.md §6 cross-cut).
|
|
144
|
+
*
|
|
145
|
+
* `TopicMessage<T>` is the **recommended** wrapper for cross-agent / cross-graph
|
|
146
|
+
* topic payloads — it carries identity, schema, deadline, and correlation
|
|
147
|
+
* metadata alongside the typed `payload`. It is NOT a required protocol
|
|
148
|
+
* type; raw `topic<T>` continues to work for in-process payloads where the
|
|
149
|
+
* envelope fields would be noise.
|
|
150
|
+
*
|
|
151
|
+
* Use the envelope when:
|
|
152
|
+
* - Two or more graphs (or human + LLM consumers) communicate over a topic
|
|
153
|
+
* and need a stable wire shape — `correlationId` is the join key, `schema`
|
|
154
|
+
* gates payload validation, `expiresAt` enables TTL enforcement.
|
|
155
|
+
* - A topic carries multiple payload kinds and consumers need to discriminate
|
|
156
|
+
* without parsing structurally.
|
|
157
|
+
*
|
|
158
|
+
* The standard well-known topic constants below are **conventions** — string
|
|
159
|
+
* literals callers can pass to `messagingHub().topic(NAME)` to get a
|
|
160
|
+
* predictable lookup. The hub does not enforce any topic to actually exist;
|
|
161
|
+
* topics are still lazy on first access.
|
|
162
|
+
*/
|
|
163
|
+
/**
|
|
164
|
+
* Minimal JSON Schema shape, scoped to what `TopicMessage<T>` validates against.
|
|
165
|
+
* Locked DS-13.B (2026-04-30): zero-dep posture, structural shape only — no
|
|
166
|
+
* full validator shipped. Callers that want full validation supply their own
|
|
167
|
+
* (e.g. `ajv`, `zod`, `valibot`) and read `Message.schema` as the rule
|
|
168
|
+
* source. The shape covers the JSON-Schema-7 subset that hub-topic payload
|
|
169
|
+
* descriptions actually need:
|
|
170
|
+
* - `type` / `properties` / `required` / `additionalProperties` for objects.
|
|
171
|
+
* - `items` for arrays.
|
|
172
|
+
* - `enum` / `const` for value constraints.
|
|
173
|
+
* - `$ref` / `definitions` for shared sub-schemas.
|
|
174
|
+
*
|
|
175
|
+
* If a concrete consumer needs a richer shape (oneOf, allOf, format, etc.),
|
|
176
|
+
* extend this type — it's a structural contract, not a tagged union, so
|
|
177
|
+
* additive fields don't break existing producers.
|
|
178
|
+
*/
|
|
179
|
+
interface JsonSchema {
|
|
180
|
+
readonly type?: "string" | "number" | "integer" | "boolean" | "object" | "array" | "null" | readonly ("string" | "number" | "integer" | "boolean" | "object" | "array" | "null")[];
|
|
181
|
+
readonly properties?: Readonly<Record<string, JsonSchema>>;
|
|
182
|
+
readonly required?: readonly string[];
|
|
183
|
+
readonly additionalProperties?: boolean | JsonSchema;
|
|
184
|
+
readonly items?: JsonSchema | readonly JsonSchema[];
|
|
185
|
+
readonly enum?: readonly unknown[];
|
|
186
|
+
readonly const?: unknown;
|
|
187
|
+
readonly $ref?: string;
|
|
188
|
+
readonly definitions?: Readonly<Record<string, JsonSchema>>;
|
|
189
|
+
readonly description?: string;
|
|
190
|
+
readonly title?: string;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Recommended envelope for hub topic payloads. Carries identity, optional
|
|
194
|
+
* schema reference, optional expiry, optional correlation, and the typed
|
|
195
|
+
* payload itself.
|
|
196
|
+
*
|
|
197
|
+
* - `id` — globally-unique identifier for this message instance. Producers
|
|
198
|
+
* mint it (UUID, ULID, hash, etc.); consumers use it for deduplication and
|
|
199
|
+
* trace correlation. **Required.**
|
|
200
|
+
* - `schema` — optional structural description of `payload`. Validators
|
|
201
|
+
* (caller-supplied) read this to gate or shape consumption. Writers MAY
|
|
202
|
+
* include the schema inline for self-describing topics, or omit when the
|
|
203
|
+
* payload type is statically known to all consumers.
|
|
204
|
+
* - `expiresAt` — ISO 8601 timestamp; consumers SHOULD drop / fallback past
|
|
205
|
+
* this point. Substrate enforcement is via composition (`timeout(source,
|
|
206
|
+
* ms)` + `fallback`), not a hub-level rule.
|
|
207
|
+
* - `correlationId` — links related messages across topics (request /
|
|
208
|
+
* response pairs, conversation threads, multi-agent handoffs). Producers
|
|
209
|
+
* propagate it; consumers filter / group on it.
|
|
210
|
+
* - `payload` — the typed body. Type parameter `T` is the consumer-agreed
|
|
211
|
+
* shape; the envelope adds metadata around it without coupling consumers
|
|
212
|
+
* to a concrete payload type.
|
|
213
|
+
*
|
|
214
|
+
* Reactive composition with the envelope:
|
|
215
|
+
*
|
|
216
|
+
* ```ts
|
|
217
|
+
* const requests = hub.topic<TopicMessage<RequestBody>>(PROMPTS_TOPIC);
|
|
218
|
+
* const responses = hub.topic<TopicMessage<ResponseBody>>(RESPONSES_TOPIC);
|
|
219
|
+
*
|
|
220
|
+
* // Filter responses to one correlation
|
|
221
|
+
* const myResponse = derived([responses.latest], ([msg]) =>
|
|
222
|
+
* msg?.correlationId === requestId ? [msg.payload] : [],
|
|
223
|
+
* );
|
|
224
|
+
* ```
|
|
225
|
+
*/
|
|
226
|
+
interface TopicMessage<T> {
|
|
227
|
+
readonly id: string;
|
|
228
|
+
readonly schema?: JsonSchema;
|
|
229
|
+
readonly expiresAt?: string;
|
|
230
|
+
readonly correlationId?: string;
|
|
231
|
+
readonly payload: T;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Well-known topic name for human / LLM prompts directed at the harness.
|
|
235
|
+
* Example payload: `TopicMessage<{ prompt: string; context?: object }>`.
|
|
236
|
+
*
|
|
237
|
+
* Co-locked with {@link RESPONSES_TOPIC} per the human-LLM intervention
|
|
238
|
+
* session §6 #4 (paired request / response convention).
|
|
239
|
+
*/
|
|
240
|
+
declare const PROMPTS_TOPIC = "prompts";
|
|
241
|
+
/**
|
|
242
|
+
* Well-known topic name for responses to {@link PROMPTS_TOPIC} entries.
|
|
243
|
+
* Producers pair the response to its prompt via `correlationId`. Example
|
|
244
|
+
* payload: `TopicMessage<{ content: string; finishReason?: string }>`.
|
|
245
|
+
*/
|
|
246
|
+
declare const RESPONSES_TOPIC = "responses";
|
|
247
|
+
/**
|
|
248
|
+
* Well-known topic name for out-of-band injections — runtime overrides /
|
|
249
|
+
* hot-fixes / human nudges that bypass the normal request flow. Example
|
|
250
|
+
* payload: `TopicMessage<{ kind: "context-patch" | "policy-override" | ...;
|
|
251
|
+
* data: unknown }>`. Per-injection consumers decide how (and whether) to
|
|
252
|
+
* apply.
|
|
253
|
+
*/
|
|
254
|
+
declare const INJECTIONS_TOPIC = "injections";
|
|
255
|
+
/**
|
|
256
|
+
* Well-known topic name for items the harness deferred for later attention
|
|
257
|
+
* (parked queue, follow-up tracker, "I'll get back to this"). Producer is
|
|
258
|
+
* usually the harness itself; consumer is a tracker / dashboard / human.
|
|
259
|
+
* Example payload: `TopicMessage<{ reason: string; original: unknown }>`.
|
|
260
|
+
*/
|
|
261
|
+
declare const DEFERRED_TOPIC = "deferred";
|
|
262
|
+
/**
|
|
263
|
+
* Well-known topic name for spawn requests (Phase 13.I `spawnable()`
|
|
264
|
+
* surface). Producer emits a `TopicMessage<SpawnRequest>` to request a child
|
|
265
|
+
* agent / subgraph; consumer is the materializer that mints the slot.
|
|
266
|
+
* Example payload: `TopicMessage<{ presetId: string; taskInput: unknown;
|
|
267
|
+
* depth?: number }>`. `correlationId` links the spawn to its parent
|
|
268
|
+
* conversation; `expiresAt` enforces TTL on long-lived requests.
|
|
269
|
+
*/
|
|
270
|
+
declare const SPAWNS_TOPIC = "spawns";
|
|
271
|
+
/**
|
|
272
|
+
* DS-14.6.A D-B3 — well-known topic for the dynamic `actorPool()` shared
|
|
273
|
+
* tagged-context pool. Actors publish `ContextEntry` here; per-actor views
|
|
274
|
+
* render their own compressed slice.
|
|
275
|
+
*/
|
|
276
|
+
declare const CONTEXT_TOPIC = "context";
|
|
277
|
+
/**
|
|
278
|
+
* DS-14.6.A D-B3 — well-known topic for the `actorPool()` shared todo list.
|
|
279
|
+
* Any actor may `enqueueTodo`; actors pull assigned todos via their cursor.
|
|
280
|
+
*/
|
|
281
|
+
declare const TODOS_TOPIC = "todos";
|
|
282
|
+
/**
|
|
283
|
+
* Tuple of all well-known topic constants — useful for "register all
|
|
284
|
+
* standard topics on a hub" patterns and for compile-time exhaustiveness
|
|
285
|
+
* checks.
|
|
286
|
+
*/
|
|
287
|
+
declare const STANDARD_TOPICS: readonly ["prompts", "responses", "injections", "deferred", "spawns", "context", "todos"];
|
|
288
|
+
/**
|
|
289
|
+
* Union of all well-known topic name string literals.
|
|
290
|
+
*/
|
|
291
|
+
type StandardTopic = (typeof STANDARD_TOPICS)[number];
|
|
292
|
+
|
|
293
|
+
type TopicOptions = {
|
|
294
|
+
graph?: GraphOptions;
|
|
295
|
+
/** Bounded retention; default 1024 per cross-cutting policy (Audit 2/4). */
|
|
296
|
+
retainedLimit?: number;
|
|
297
|
+
};
|
|
298
|
+
declare class TopicGraph<T> extends Graph {
|
|
299
|
+
private readonly _log;
|
|
300
|
+
private readonly _publishImpl;
|
|
301
|
+
readonly events: Node<readonly T[]>;
|
|
302
|
+
/**
|
|
303
|
+
* Most recently published value. Stays in the protocol SENTINEL state
|
|
304
|
+
* (`cache === undefined`, no DATA emitted) until the first publish, then
|
|
305
|
+
* tracks the latest entry. Spec §5.12 reserves `undefined` as the
|
|
306
|
+
* "never sent DATA" sentinel — and `TopicGraph.publish(undefined)` is
|
|
307
|
+
* rejected — so `cache === undefined` unambiguously signals "empty topic"
|
|
308
|
+
* even when `T` itself includes `null` (i.e., `topic<number | null>`).
|
|
309
|
+
*
|
|
310
|
+
* **Within a reactive fn:** detect the empty-topic case via
|
|
311
|
+
* `ctx.prevData[i] === undefined` for the dep slot holding `topic.latest`,
|
|
312
|
+
* or check `latest.cache === undefined` outside reactive code. No
|
|
313
|
+
* separate `hasLatest` companion needed — the SENTINEL is the answer.
|
|
314
|
+
*/
|
|
315
|
+
readonly latest: Node<T>;
|
|
316
|
+
constructor(name: string, opts?: TopicOptions);
|
|
317
|
+
publish(value: T): void;
|
|
318
|
+
/**
|
|
319
|
+
* Wire one or more append-log storage tiers (Audit 4). Each tier receives
|
|
320
|
+
* appended events per wave; rollback honors the wave-as-transaction model.
|
|
321
|
+
*
|
|
322
|
+
* Named `attachEventStorage` (not `attachStorage`) to avoid colliding with
|
|
323
|
+
* the inherited {@link Graph.attachSnapshotStorage} which takes the
|
|
324
|
+
* paired `AttachSnapshotTierPair[]` shape (Phase 14.6) — distinct
|
|
325
|
+
* concerns, distinct surfaces.
|
|
326
|
+
*
|
|
327
|
+
* @returns Disposer.
|
|
328
|
+
*/
|
|
329
|
+
attachEventStorage(tiers: readonly _graphrefly_pure_ts_extra.AppendLogStorageTier<T>[]): () => void;
|
|
330
|
+
retained(): readonly T[];
|
|
331
|
+
/** Internal log bundle — used by TopicBridgeGraph for `attach`. */
|
|
332
|
+
get _logBundle(): _graphrefly_pure_ts_extra.ReactiveLogBundle<T>;
|
|
333
|
+
}
|
|
334
|
+
type SubscriptionOptions = {
|
|
335
|
+
graph?: GraphOptions;
|
|
336
|
+
/**
|
|
337
|
+
* Starting cursor position.
|
|
338
|
+
* @deprecated Use `from` instead.
|
|
339
|
+
*/
|
|
340
|
+
cursor?: number;
|
|
341
|
+
/**
|
|
342
|
+
* Starting position for the subscription.
|
|
343
|
+
* - `"retained"` (default) — cursor starts at 0; consumer sees all retained history.
|
|
344
|
+
* - `"now"` — cursor starts at current topic length; consumer ignores history.
|
|
345
|
+
* - `number` — explicit cursor position.
|
|
346
|
+
*/
|
|
347
|
+
from?: "now" | "retained" | number;
|
|
348
|
+
/**
|
|
349
|
+
* When this signal node emits DATA, the subscription auto-advances cursor
|
|
350
|
+
* to current `available.length`. Useful for "ack everything when X happens"
|
|
351
|
+
* patterns. The reactive edge `advanceOn → cursor` is visible in `explain()`.
|
|
352
|
+
*/
|
|
353
|
+
advanceOn?: Node<unknown>;
|
|
354
|
+
};
|
|
355
|
+
/** Result of {@link SubscriptionGraph.pullAndAck}. */
|
|
356
|
+
type PullAndAckResult<T> = {
|
|
357
|
+
items: readonly T[];
|
|
358
|
+
cursor: number;
|
|
359
|
+
};
|
|
360
|
+
declare class SubscriptionGraph<T> extends Graph {
|
|
361
|
+
readonly cursor: Node<number>;
|
|
362
|
+
readonly available: Node<readonly T[]>;
|
|
363
|
+
/**
|
|
364
|
+
* Reference to the upstream topic graph. Intentionally NOT mounted
|
|
365
|
+
* under this subscription: a subscription is a VIEW over an
|
|
366
|
+
* externally-owned topic. Double-mounting (e.g. hub-owned topic +
|
|
367
|
+
* sub-mount here) would make either-side teardown leave the other
|
|
368
|
+
* holding a dead reference. Node-level `derived([topicEvents], …)`
|
|
369
|
+
* still wires the data dependency across graph boundaries. D1(e).
|
|
370
|
+
*/
|
|
371
|
+
readonly topic: TopicGraph<T>;
|
|
372
|
+
private _disposed;
|
|
373
|
+
private readonly _ackImpl;
|
|
374
|
+
private readonly _pullAndAckImpl;
|
|
375
|
+
constructor(name: string, topicGraph: TopicGraph<T>, opts?: SubscriptionOptions);
|
|
376
|
+
ack(count?: number): number;
|
|
377
|
+
pull(limit?: number): readonly T[];
|
|
378
|
+
/**
|
|
379
|
+
* Atomic pull-and-acknowledge. Returns `{ items, cursor }` where `cursor`
|
|
380
|
+
* is the new cursor position after advancing. Under single-threaded JS the
|
|
381
|
+
* snapshot and advance are atomic; PY callers use a per-subscription Lock.
|
|
382
|
+
*
|
|
383
|
+
* Replaces `pull(limit, { ack: true })`.
|
|
384
|
+
*/
|
|
385
|
+
pullAndAck(limit?: number): PullAndAckResult<T>;
|
|
386
|
+
/**
|
|
387
|
+
* Release internal subscriptions and mark the subscription torn-down.
|
|
388
|
+
* Subsequent `pull`, `pullAndAck`, `ack` return empty / current cursor.
|
|
389
|
+
* Emits COMPLETE on `cursor` so derived consumers (e.g. `available`) see
|
|
390
|
+
* the termination signal. Also drains `addDisposer` callbacks (including
|
|
391
|
+
* the `keepalive(advancePump)` subscription) so no keepalive leak occurs.
|
|
392
|
+
*/
|
|
393
|
+
dispose(): void;
|
|
394
|
+
}
|
|
395
|
+
type TopicBridgeOptions<TIn, TOut> = {
|
|
396
|
+
graph?: GraphOptions;
|
|
397
|
+
cursor?: number;
|
|
398
|
+
maxPerPump?: number;
|
|
399
|
+
/**
|
|
400
|
+
* Optional transform/filter applied to each item before republishing.
|
|
401
|
+
*
|
|
402
|
+
* **At-most-once with silent drop:** when `map` returns `undefined`, the
|
|
403
|
+
* input is consumed from the source cursor but NOT republished. Filtered
|
|
404
|
+
* items are not retained for retry. If you need filter-with-retry
|
|
405
|
+
* semantics, do the filtering in a downstream subscription on the bridged
|
|
406
|
+
* output rather than in the `map` function.
|
|
407
|
+
*/
|
|
408
|
+
map?: (value: TIn) => TOut | undefined;
|
|
409
|
+
};
|
|
410
|
+
declare class TopicBridgeGraph<TIn, TOut = TIn> extends Graph {
|
|
411
|
+
private readonly _sourceSub;
|
|
412
|
+
readonly bridgedCount: Node<number>;
|
|
413
|
+
/**
|
|
414
|
+
* Emits each mapped batch as DATA — gives downstream observers a reactive
|
|
415
|
+
* stream of bridged values. Also the link target for `target._log.attach`.
|
|
416
|
+
*/
|
|
417
|
+
readonly output: Node<readonly TOut[]>;
|
|
418
|
+
constructor(name: string, sourceTopic: TopicGraph<TIn>, targetTopic: TopicGraph<TOut>, opts?: TopicBridgeOptions<TIn, TOut>);
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Private pure data structure managing a named set of {@link TopicGraph}
|
|
422
|
+
* instances. Extracted from {@link MessagingHubGraph} for separation of
|
|
423
|
+
* concerns (B.2 Unit 14 lock: D — split into TopicRegistry + facade).
|
|
424
|
+
*
|
|
425
|
+
* Reusable if other domain consumers (e.g. cqrs.eventLogs) want a shared
|
|
426
|
+
* topic registry later.
|
|
427
|
+
*
|
|
428
|
+
* @internal
|
|
429
|
+
*/
|
|
430
|
+
declare class TopicRegistry {
|
|
431
|
+
private readonly _map;
|
|
432
|
+
/** Reactive monotonic version counter. Advances on topic create/remove. */
|
|
433
|
+
readonly version: Node<number>;
|
|
434
|
+
constructor(versionNode: Node<number>);
|
|
435
|
+
get size(): number;
|
|
436
|
+
has(name: string): boolean;
|
|
437
|
+
get<T>(name: string): TopicGraph<T> | undefined;
|
|
438
|
+
set<T>(name: string, t: TopicGraph<T>): void;
|
|
439
|
+
delete(name: string): boolean;
|
|
440
|
+
keys(): IterableIterator<string>;
|
|
441
|
+
}
|
|
442
|
+
type MessagingHubOptions = {
|
|
443
|
+
graph?: GraphOptions;
|
|
444
|
+
/**
|
|
445
|
+
* Default `TopicOptions` applied to every topic created via `topic(name)`
|
|
446
|
+
* without explicit options. Per-call opts override. Default: `{}`
|
|
447
|
+
* (unbounded retention per topic unless `retainedLimit` is set per call).
|
|
448
|
+
*/
|
|
449
|
+
defaultTopicOptions?: TopicOptions;
|
|
450
|
+
};
|
|
451
|
+
/**
|
|
452
|
+
* Lazy Pulsar-inspired topic registry. Manages a named set of {@link TopicGraph}
|
|
453
|
+
* instances with retention + cursor semantics. Topics are created on first
|
|
454
|
+
* access; `removeTopic(name)` unmounts and tears down via {@link Graph.remove}.
|
|
455
|
+
*
|
|
456
|
+
* Internally delegates to {@link TopicRegistry} for topic map management
|
|
457
|
+
* (B.2 Unit 14 lock: D facade split).
|
|
458
|
+
*
|
|
459
|
+
* **Relationship to `pubsub()` in `src/extra/pubsub.ts`:** `pubsub` is a
|
|
460
|
+
* lightweight last-value state hub (no retention, no cursors). `MessagingHubGraph`
|
|
461
|
+
* is the full messaging hub — retained message logs, cursor-based subscriptions,
|
|
462
|
+
* and pattern-layer lifecycle management.
|
|
463
|
+
*
|
|
464
|
+
* @category patterns
|
|
465
|
+
*/
|
|
466
|
+
declare class MessagingHubGraph extends Graph {
|
|
467
|
+
private readonly _registry;
|
|
468
|
+
/** Reactive monotonic version counter — advances on topic create/remove. */
|
|
469
|
+
readonly version: Node<number>;
|
|
470
|
+
private readonly _defaultTopicOptions;
|
|
471
|
+
private readonly _removeTopicImpl;
|
|
472
|
+
constructor(name: string, opts?: MessagingHubOptions);
|
|
473
|
+
/** Number of topics currently in the hub. */
|
|
474
|
+
get size(): number;
|
|
475
|
+
/** Checks topic existence without creating. */
|
|
476
|
+
has(name: string): boolean;
|
|
477
|
+
/** Iterator over topic names. */
|
|
478
|
+
topicNames(): IterableIterator<string>;
|
|
479
|
+
/**
|
|
480
|
+
* Returns the {@link TopicGraph} for `name`, creating lazily on first call.
|
|
481
|
+
* Subsequent calls with the same name return the same instance (options on
|
|
482
|
+
* repeat calls are ignored — the topic is already configured).
|
|
483
|
+
*/
|
|
484
|
+
topic<T = unknown>(name: string, opts?: TopicOptions): TopicGraph<T>;
|
|
485
|
+
/**
|
|
486
|
+
* Publishes a value to the topic, lazily creating it on first publish.
|
|
487
|
+
*
|
|
488
|
+
* **Late-subscriber caveat:** the topic is created lazily, so subscribers
|
|
489
|
+
* that attach AFTER a publish only see the retained window (governed by
|
|
490
|
+
* `retainedLimit` on `TopicOptions` / `defaultTopicOptions`). If
|
|
491
|
+
* `retainedLimit === 0` is set explicitly, early publishes are
|
|
492
|
+
* effectively dropped — prefer an unset `retainedLimit` (unbounded
|
|
493
|
+
* retention) or subscribe before publishing when late-subscribers matter.
|
|
494
|
+
*/
|
|
495
|
+
publish<T = unknown>(name: string, value: T): void;
|
|
496
|
+
/**
|
|
497
|
+
* Bulk publish — issues all publishes inside one outer batch. New topics
|
|
498
|
+
* are created on demand. No-op if `entries` yields nothing.
|
|
499
|
+
*
|
|
500
|
+
* **Iterable consumption (F6):** `entries` is consumed once (single-pass)
|
|
501
|
+
* INSIDE the batch frame. If the iterator throws mid-way, the batch is
|
|
502
|
+
* discarded and NO publishes are visible to subscribers (all-or-nothing).
|
|
503
|
+
* Pass an array or `Set` for multi-shot callers.
|
|
504
|
+
*/
|
|
505
|
+
publishMany(entries: Iterable<[string, unknown]>): void;
|
|
506
|
+
/**
|
|
507
|
+
* Creates a {@link SubscriptionGraph} over a named topic. The topic is
|
|
508
|
+
* lazily created if missing. Subscription lifecycle is owned by the caller —
|
|
509
|
+
* the hub does NOT mount the subscription.
|
|
510
|
+
*
|
|
511
|
+
* @param subName - Local name for the subscription graph.
|
|
512
|
+
* @param topicName - Hub topic to subscribe to.
|
|
513
|
+
* @param opts - `SubscriptionOptions` (initial cursor, etc.).
|
|
514
|
+
*/
|
|
515
|
+
subscribe<T = unknown>(subName: string, topicName: string, opts?: SubscriptionOptions): SubscriptionGraph<T>;
|
|
516
|
+
/**
|
|
517
|
+
* Unmounts and tears down the topic's graph. Returns `true` if the topic
|
|
518
|
+
* existed. Subscribers receive `TEARDOWN` via {@link Graph.remove}.
|
|
519
|
+
*
|
|
520
|
+
* **Closure-state caveat:** the registry mutation (`_registry.delete`) and
|
|
521
|
+
* version bump happen in a `try/finally`, so registry/version converge to
|
|
522
|
+
* a consistent state even when {@link Graph.remove} throws. `mutate`
|
|
523
|
+
* does not roll back this mutation on throw — `Map.delete` on closure
|
|
524
|
+
* state is invisible to any batch frame. The pre-existing try/finally is
|
|
525
|
+
* load-bearing for that invariant.
|
|
526
|
+
*/
|
|
527
|
+
removeTopic(name: string): boolean;
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Creates a Pulsar-inspired topic graph (append-only retained stream + latest value).
|
|
531
|
+
*/
|
|
532
|
+
declare function topic<T>(name: string, opts?: TopicOptions): TopicGraph<T>;
|
|
533
|
+
/**
|
|
534
|
+
* Creates a lazy Pulsar-inspired messaging hub. Topics are created on first access
|
|
535
|
+
* via `hub.topic(name)`; `hub.publish(name, value)` shortcuts through the registry.
|
|
536
|
+
*
|
|
537
|
+
* @example
|
|
538
|
+
* ```ts
|
|
539
|
+
* import { messagingHub } from "@graphrefly/graphrefly/patterns/messaging";
|
|
540
|
+
*
|
|
541
|
+
* const hub = messagingHub("main", { defaultTopicOptions: { retainedLimit: 256 } });
|
|
542
|
+
* hub.publish("orders", { id: 1 });
|
|
543
|
+
* hub.publishMany([["shipments", { id: 1 }], ["orders", { id: 2 }]]);
|
|
544
|
+
* const sub = hub.subscribe("orders-worker", "orders", { cursor: 0 });
|
|
545
|
+
* ```
|
|
546
|
+
*/
|
|
547
|
+
declare function messagingHub(name: string, opts?: MessagingHubOptions): MessagingHubGraph;
|
|
548
|
+
/**
|
|
549
|
+
* Creates a cursor-based subscription graph over a topic.
|
|
550
|
+
*/
|
|
551
|
+
declare function subscription<T>(name: string, topicGraph: TopicGraph<T>, opts?: SubscriptionOptions): SubscriptionGraph<T>;
|
|
552
|
+
/**
|
|
553
|
+
* Creates an autonomous cursor-based topic relay graph.
|
|
554
|
+
*
|
|
555
|
+
* When `opts.map` is provided, items where `map` returns `undefined` are
|
|
556
|
+
* consumed from the source cursor but NOT republished (at-most-once with
|
|
557
|
+
* silent drop). For filter-with-retry semantics, apply the filter in a
|
|
558
|
+
* downstream subscription on the bridge's `output` node instead.
|
|
559
|
+
*/
|
|
560
|
+
declare function topicBridge<TIn, TOut = TIn>(name: string, sourceTopic: TopicGraph<TIn>, targetTopic: TopicGraph<TOut>, opts?: TopicBridgeOptions<TIn, TOut>): TopicBridgeGraph<TIn, TOut>;
|
|
561
|
+
|
|
562
|
+
export { CONTEXT_TOPIC, DEFERRED_TOPIC, type HubRemoveTopicRecord, INJECTIONS_TOPIC, type JsonSchema, type MessagingAuditRecord, MessagingHubGraph, type MessagingHubOptions, PROMPTS_TOPIC, type PullAndAckResult, RESPONSES_TOPIC, SPAWNS_TOPIC, STANDARD_TOPICS, type StandardTopic, type SubscriptionAckRecord, SubscriptionGraph, type SubscriptionOptions, type SubscriptionPullAndAckRecord, TODOS_TOPIC, TopicBridgeGraph, type TopicBridgeOptions, TopicGraph, type TopicMessage, type TopicOptions, type TopicPublishRecord, TopicRegistry, hubRemoveTopicKeyOf, messagingHub, subscription, subscriptionAckKeyOf, subscriptionPullAndAckKeyOf, topic, topicBridge, topicPublishKeyOf };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CONTEXT_TOPIC,
|
|
3
|
+
DEFERRED_TOPIC,
|
|
4
|
+
INJECTIONS_TOPIC,
|
|
5
|
+
MessagingHubGraph,
|
|
6
|
+
PROMPTS_TOPIC,
|
|
7
|
+
RESPONSES_TOPIC,
|
|
8
|
+
SPAWNS_TOPIC,
|
|
9
|
+
STANDARD_TOPICS,
|
|
10
|
+
SubscriptionGraph,
|
|
11
|
+
TODOS_TOPIC,
|
|
12
|
+
TopicBridgeGraph,
|
|
13
|
+
TopicGraph,
|
|
14
|
+
TopicRegistry,
|
|
15
|
+
hubRemoveTopicKeyOf,
|
|
16
|
+
messagingHub,
|
|
17
|
+
subscription,
|
|
18
|
+
subscriptionAckKeyOf,
|
|
19
|
+
subscriptionPullAndAckKeyOf,
|
|
20
|
+
topic,
|
|
21
|
+
topicBridge,
|
|
22
|
+
topicPublishKeyOf
|
|
23
|
+
} from "../../chunk-Q3EYOCZB.js";
|
|
24
|
+
import "../../chunk-FMPF42Q4.js";
|
|
25
|
+
import "../../chunk-BXGZFGZ4.js";
|
|
26
|
+
import "../../chunk-AZDQPQ3V.js";
|
|
27
|
+
export {
|
|
28
|
+
CONTEXT_TOPIC,
|
|
29
|
+
DEFERRED_TOPIC,
|
|
30
|
+
INJECTIONS_TOPIC,
|
|
31
|
+
MessagingHubGraph,
|
|
32
|
+
PROMPTS_TOPIC,
|
|
33
|
+
RESPONSES_TOPIC,
|
|
34
|
+
SPAWNS_TOPIC,
|
|
35
|
+
STANDARD_TOPICS,
|
|
36
|
+
SubscriptionGraph,
|
|
37
|
+
TODOS_TOPIC,
|
|
38
|
+
TopicBridgeGraph,
|
|
39
|
+
TopicGraph,
|
|
40
|
+
TopicRegistry,
|
|
41
|
+
hubRemoveTopicKeyOf,
|
|
42
|
+
messagingHub,
|
|
43
|
+
subscription,
|
|
44
|
+
subscriptionAckKeyOf,
|
|
45
|
+
subscriptionPullAndAckKeyOf,
|
|
46
|
+
topic,
|
|
47
|
+
topicBridge,
|
|
48
|
+
topicPublishKeyOf
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|