@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
|
@@ -1,7 +1,242 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Node } from '@graphrefly/pure-ts/core';
|
|
2
|
+
import { ReactiveLogBundle } from '@graphrefly/pure-ts/extra';
|
|
3
|
+
import { Graph } from '@graphrefly/pure-ts/graph';
|
|
4
|
+
import { BaseAuditRecord } from '../../base/mutation/index.cjs';
|
|
5
|
+
import { N as NodeOrValue } from '../../_internal-B23BagFd.cjs';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* DS-14.7 — Reactive Fact Store / Live Knowledge Graph (locked 2026-05-13).
|
|
9
|
+
*
|
|
10
|
+
* Static-topology agent-memory substrate that satisfies MEME L2 (cascade
|
|
11
|
+
* invalidation) and L3 (obsolescence reasoning) plus Hassabis's
|
|
12
|
+
* filter/consolidate/continual-learning frame, **without** materializing one
|
|
13
|
+
* reactive node per fact. ~12 fixed operator nodes never grow regardless of how
|
|
14
|
+
* many facts the store holds; facts live as columnar DATA inside an indexed
|
|
15
|
+
* `state<FactStore>` (optionally sharded), and cascade is implemented as
|
|
16
|
+
* bounded recursive message emission. Termination rests on a per-root
|
|
17
|
+
* semantic contract — a fact only drives the cascade when it transitions to
|
|
18
|
+
* obsolete (`validTo` set), and each obsolete root emits its cascade exactly
|
|
19
|
+
* once across all waves — plus an empty-array fixpoint short-circuit. The
|
|
20
|
+
* cascade is modeled as DATA arrays (NOT INVALIDATE messages), so spec §1.4's
|
|
21
|
+
* idempotent-within-a-wave INVALIDATE guarantee does NOT govern this loop;
|
|
22
|
+
* convergence is the per-root contract, not a spec §1.4 diamond-merge.
|
|
23
|
+
*
|
|
24
|
+
* Canonical design: `archive/docs/SESSION-DS-14.7-reactive-fact-store.md`
|
|
25
|
+
* (9Q walk complete; Q9-open items 1–9 all resolved).
|
|
26
|
+
*
|
|
27
|
+
* Locked decisions baked in here:
|
|
28
|
+
* - `cascadeMaxIterations` default **8**; overflow emits a per-batch summary
|
|
29
|
+
* `{ droppedCount, sample, rootFactId }` to `cascadeOverflow` (Q9-open-4).
|
|
30
|
+
* The overflow `sample` is capped at `OVERFLOW_SAMPLE_SIZE` (8),
|
|
31
|
+
* independent of `cascadeMaxIterations`.
|
|
32
|
+
* - `shardBy` default hash-mod **4**; caller override; `dependentsIndex`
|
|
33
|
+
* unsharded for v1 (Q9-open-1).
|
|
34
|
+
* - `MemoryFragment` adds `embedding? / parent_fragment_id? / provenance?`
|
|
35
|
+
* (Q9-open-3).
|
|
36
|
+
* - `dependentsIndex` updates synchronous + atomic with `factStore` commit
|
|
37
|
+
* (Q9-open-2).
|
|
38
|
+
* - Scoring contract `(fragment, storeReadHandle) => number` — read-only
|
|
39
|
+
* handle, no mutation exposure (Q9-open-5).
|
|
40
|
+
* - Consolidator emits to a dedicated `consolidated` topic that the pattern
|
|
41
|
+
* default-wires back to `ingest`; caller can intercept (Q9-open-6).
|
|
42
|
+
* - Query surface = structured `MemoryQuery` via the `query` topic (default);
|
|
43
|
+
* function-shaped is caller-side `derived` over `factStore` (Q9-open-7).
|
|
44
|
+
* - Bi-temporal is pattern-layer only — no DS-14 envelope shape change
|
|
45
|
+
* (Q9-open-9); `simpleFactStore()` deferred to v1.1 (Q9-open-8 — NOT built).
|
|
46
|
+
*
|
|
47
|
+
* **Cascade cycle visibility.** `cascadeProcessor` stays synchronous (preserves
|
|
48
|
+
* spec §1.4 batch-dedupe — LLM-driven dependency extraction lives UPSTREAM of
|
|
49
|
+
* the cascade topic, never inside the recursion). Every cascade message carries
|
|
50
|
+
* a `causalReason` field and the cycle nodes are tagged `meta.cycle:"cascade"`
|
|
51
|
+
* so `describe()` / `explain()` surface the otherwise-invisible
|
|
52
|
+
* `dependentsIndex` fn-body lookup.
|
|
53
|
+
*
|
|
54
|
+
* @module
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
/** Stable identity for a stored fact. */
|
|
58
|
+
type FactId = string;
|
|
59
|
+
/** Shard partition key (string | number — any hashable scalar). */
|
|
60
|
+
type ShardKey = string | number;
|
|
61
|
+
/**
|
|
62
|
+
* A single stored memory fact. Pattern convention only — NOT a spec primitive
|
|
63
|
+
* and NOT a DS-14 envelope field (bi-temporal stays pattern-layer per
|
|
64
|
+
* Q9-open-9). Each field is a reactive lever (see design PART 2.3):
|
|
65
|
+
* `validTo` set → cascade fires; `confidence < θ` → review; `sources` →
|
|
66
|
+
* `dependentsIndex` edges feeding cascade.
|
|
67
|
+
*/
|
|
68
|
+
interface MemoryFragment<T> {
|
|
69
|
+
readonly id: FactId;
|
|
70
|
+
readonly payload: T;
|
|
71
|
+
/** Transaction time (when learned). `bigint` ns (e.g. `BigInt(monotonicNs())`). */
|
|
72
|
+
readonly t_ns: bigint;
|
|
73
|
+
/** Valid-time start. `undefined` = unbounded past. */
|
|
74
|
+
readonly validFrom?: bigint;
|
|
75
|
+
/** Valid-time end. Setting this is the MEME L3 obsolescence lever. */
|
|
76
|
+
readonly validTo?: bigint;
|
|
77
|
+
/** Confidence 0..1. Dropping below the review threshold emits a review. */
|
|
78
|
+
readonly confidence: number;
|
|
79
|
+
readonly tags: readonly string[];
|
|
80
|
+
/** Dependency edges — fact IDs this fact is derived from / depends on. */
|
|
81
|
+
readonly sources: readonly FactId[];
|
|
82
|
+
/** Optional dense embedding (recipes use it for retrieval). */
|
|
83
|
+
readonly embedding?: readonly number[];
|
|
84
|
+
/** Version-chain pointer — consolidator emits successor fragments. */
|
|
85
|
+
readonly parent_fragment_id?: FactId;
|
|
86
|
+
/** Free-form provenance string for audit. */
|
|
87
|
+
readonly provenance?: string;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Columnar in-memory store. Held as DATA inside a `state<FactStore<T>>` node
|
|
91
|
+
* (one per shard). `byId` is the authoritative map; the typed companions are
|
|
92
|
+
* kept for the recipe layer (`bitemporal-query`, `influence-analysis`) — v1
|
|
93
|
+
* stores fragments directly and lazily projects columns on demand.
|
|
94
|
+
*/
|
|
95
|
+
interface FactStore<T> {
|
|
96
|
+
readonly byId: ReadonlyMap<FactId, MemoryFragment<T>>;
|
|
97
|
+
}
|
|
98
|
+
/** Reverse dependency index: fact → IDs that depend on it. Unsharded (v1). */
|
|
99
|
+
type DependentsIndex = ReadonlyMap<FactId, readonly FactId[]>;
|
|
100
|
+
/** Read-only projection passed to scoring policies (no mutation surface). */
|
|
101
|
+
interface StoreReadHandle<T> {
|
|
102
|
+
get(id: FactId): MemoryFragment<T> | undefined;
|
|
103
|
+
has(id: FactId): boolean;
|
|
104
|
+
readonly size: number;
|
|
105
|
+
values(): IterableIterator<MemoryFragment<T>>;
|
|
106
|
+
}
|
|
107
|
+
type ScoringPolicy<T> = (fragment: MemoryFragment<T>, store: StoreReadHandle<T>) => number;
|
|
108
|
+
type DecayPolicy = (confidence: number, ageNs: bigint) => number;
|
|
109
|
+
type AdmissionFilter<T> = (fragment: MemoryFragment<T>) => boolean;
|
|
110
|
+
/** Outcome / RL signal — write-back lever for continual learning. */
|
|
111
|
+
interface OutcomeSignal {
|
|
112
|
+
readonly factId: FactId;
|
|
113
|
+
readonly reward: number;
|
|
114
|
+
}
|
|
115
|
+
/** Structured query (Q9-open-7 default surface). Serializable + inspectable. */
|
|
116
|
+
interface MemoryQuery {
|
|
117
|
+
/** Match any of these tags (OR). Omit for no tag filter. */
|
|
118
|
+
readonly tags?: readonly string[];
|
|
119
|
+
/** Bi-temporal "as of" — only facts valid at this instant. */
|
|
120
|
+
readonly asOf?: bigint;
|
|
121
|
+
/** Minimum confidence (inclusive). */
|
|
122
|
+
readonly minConfidence?: number;
|
|
123
|
+
/** Cap results (sorted by confidence desc, then t_ns desc). */
|
|
124
|
+
readonly limit?: number;
|
|
125
|
+
}
|
|
126
|
+
interface MemoryAnswer<T> {
|
|
127
|
+
readonly query: MemoryQuery;
|
|
128
|
+
readonly results: readonly MemoryFragment<T>[];
|
|
129
|
+
}
|
|
130
|
+
type CascadeReason = "cascade" | "obsolete" | "manual";
|
|
131
|
+
/** A single cascade invalidation message flowing through the cascade cycle. */
|
|
132
|
+
interface CascadeEvent {
|
|
133
|
+
readonly factId: FactId;
|
|
134
|
+
readonly rootFactId: FactId;
|
|
135
|
+
readonly reason: CascadeReason;
|
|
136
|
+
/** Cascade recursion depth (1 = first wave). Bounded by `cascadeMaxIterations`. */
|
|
137
|
+
readonly iteration: number;
|
|
138
|
+
/**
|
|
139
|
+
* Human-readable causal chain — makes the `dependentsIndex` fn-body lookup
|
|
140
|
+
* visible in `explain()` output even though it is not a topology edge
|
|
141
|
+
* (design Q3 / COMPOSITION-GUIDE §24 mitigation).
|
|
142
|
+
*/
|
|
143
|
+
readonly causalReason: string;
|
|
144
|
+
}
|
|
145
|
+
/** Per-batch overflow summary (Q9-open-4 — never per-message). */
|
|
146
|
+
interface CascadeOverflow {
|
|
147
|
+
readonly droppedCount: number;
|
|
148
|
+
readonly sample: readonly FactId[];
|
|
149
|
+
readonly rootFactId: FactId;
|
|
150
|
+
}
|
|
151
|
+
interface ReviewRequest {
|
|
152
|
+
readonly factId: FactId;
|
|
153
|
+
readonly confidence: number;
|
|
154
|
+
readonly threshold: number;
|
|
155
|
+
}
|
|
156
|
+
interface FactStoreAuditRecord extends BaseAuditRecord {
|
|
157
|
+
readonly action: "ingest" | "invalidate" | "outcome" | "consolidate" | "overflow";
|
|
158
|
+
readonly id?: FactId;
|
|
159
|
+
readonly reason?: CascadeReason;
|
|
160
|
+
}
|
|
161
|
+
interface ReactiveFactStoreConfig<T> {
|
|
162
|
+
readonly extractDependencies: (f: MemoryFragment<T>) => readonly FactId[];
|
|
163
|
+
/** Shard partition fn. Default: FNV-1a hash of `id` mod `shardCount`. */
|
|
164
|
+
readonly shardBy?: (f: MemoryFragment<T>) => ShardKey;
|
|
165
|
+
/** Shard count for the default hash-mod sharder. Default 4 (§3.2). */
|
|
166
|
+
readonly shardCount?: number;
|
|
167
|
+
readonly scoring?: Node<ScoringPolicy<T>>;
|
|
168
|
+
readonly decay?: Node<DecayPolicy>;
|
|
169
|
+
readonly admissionFilter?: Node<AdmissionFilter<T>>;
|
|
170
|
+
readonly ingest: Node<MemoryFragment<T>>;
|
|
171
|
+
readonly outcome?: Node<OutcomeSignal>;
|
|
172
|
+
readonly query?: Node<MemoryQuery>;
|
|
173
|
+
/**
|
|
174
|
+
* Consolidator trigger — a reactive timer/cron Node (e.g. `fromCron(...)`).
|
|
175
|
+
* When supplied, the `consolidated` node maps each tick to summarized
|
|
176
|
+
* fragments emitted on the `consolidated` topic and default-wired back to
|
|
177
|
+
* the internal ingest path.
|
|
178
|
+
*/
|
|
179
|
+
readonly consolidateTrigger?: Node<unknown>;
|
|
180
|
+
/**
|
|
181
|
+
* Consolidation summarizer. Reads a store snapshot, returns successor
|
|
182
|
+
* fragments (typically with `parent_fragment_id` set). Default: no-op
|
|
183
|
+
* (emits nothing) so the cron tick is observable without forcing a policy.
|
|
184
|
+
*/
|
|
185
|
+
readonly consolidate?: (store: StoreReadHandle<T>) => readonly MemoryFragment<T>[];
|
|
186
|
+
/** Cascade recursion cap (§3.1). Default 8. */
|
|
187
|
+
readonly cascadeMaxIterations?: number;
|
|
188
|
+
/** Confidence below which a {@link ReviewRequest} is emitted. Default 0.3. */
|
|
189
|
+
readonly reviewThreshold?: number;
|
|
190
|
+
}
|
|
191
|
+
interface ReactiveFactStoreGraph<T> extends Graph {
|
|
192
|
+
/** Per-shard `state<FactStore<T>>` nodes (length = shard count). */
|
|
193
|
+
readonly shards: readonly Node<FactStore<T>>[];
|
|
194
|
+
/** Unified read view across all shards (derived). */
|
|
195
|
+
readonly factStore: Node<FactStore<T>>;
|
|
196
|
+
readonly dependentsIndex: Node<DependentsIndex>;
|
|
197
|
+
readonly answer: Node<MemoryAnswer<T> | null>;
|
|
198
|
+
readonly cascade: Node<readonly CascadeEvent[]>;
|
|
199
|
+
readonly cascadeOverflow: Node<CascadeOverflow | null>;
|
|
200
|
+
readonly review: Node<ReviewRequest | null>;
|
|
201
|
+
readonly consolidated: Node<readonly MemoryFragment<T>[]>;
|
|
202
|
+
readonly events: ReactiveLogBundle<FactStoreAuditRecord>;
|
|
203
|
+
/** Reactive read: a single fact by id (SENTINEL until the fact exists). */
|
|
204
|
+
itemNode(id: FactId): Node<MemoryFragment<T> | undefined>;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Build a static-topology reactive fact store (DS-14.7 architecture C).
|
|
208
|
+
*
|
|
209
|
+
* Topology (~12 fixed nodes — never grows with fact count):
|
|
210
|
+
* - `shards[0..N]` — `state<FactStore<T>>` columnar stores (default 4 shards).
|
|
211
|
+
* - `factStore` — derived union read view across shards.
|
|
212
|
+
* - `dependentsIndex` — `state<DependentsIndex>` reverse-dep map, unsharded,
|
|
213
|
+
* updated synchronously + atomically with each commit (Q9-open-2).
|
|
214
|
+
* - `extractOp` — derived: ingest → admission-filtered fragment + dep edges.
|
|
215
|
+
* - `invalidationDetector` — derived: scans committed store for `validTo`-set
|
|
216
|
+
* / low-confidence facts, resolves dependents via `dependentsIndex`, emits
|
|
217
|
+
* cascade messages.
|
|
218
|
+
* - `cascade` — topic node carrying `CascadeEvent[]`.
|
|
219
|
+
* - `cascadeProcessor` — derived, **synchronous**, `meta.cycle:"cascade"`:
|
|
220
|
+
* dedupes by factId, writes invalidations back to shards, recurses until
|
|
221
|
+
* fixpoint OR `cascadeMaxIterations` → `cascadeOverflow`.
|
|
222
|
+
* - `cascadeOverflow` — per-batch overflow summary node.
|
|
223
|
+
* - `queryOp` / `answer` — structured `MemoryQuery` → results (SENTINEL-safe).
|
|
224
|
+
* - `outcomeProcessor` — outcome signal → confidence write-back.
|
|
225
|
+
* - `consolidated` — cron-tick → summarized fragments on the
|
|
226
|
+
* `consolidated` topic,
|
|
227
|
+
* default-wired back into the ingest path.
|
|
228
|
+
* - `review` — low-confidence proactive-verification requests.
|
|
229
|
+
*
|
|
230
|
+
* The cascade cycle (`invalidationDetector → cascade → cascadeProcessor →
|
|
231
|
+
* shards → invalidationDetector`) is a real, bounded reactive cycle. Both
|
|
232
|
+
* `invalidationDetector` and `cascadeProcessor` are tagged
|
|
233
|
+
* `meta.cycle:"cascade"` and every cascade message carries `causalReason`, so
|
|
234
|
+
* `describe()` / `explain()` surface the otherwise-invisible
|
|
235
|
+
* `dependentsIndex` lookup (COMPOSITION-GUIDE §24).
|
|
236
|
+
*
|
|
237
|
+
* @category memory
|
|
238
|
+
*/
|
|
239
|
+
declare function reactiveFactStore<T>(config: ReactiveFactStoreConfig<T>): ReactiveFactStoreGraph<T>;
|
|
5
240
|
|
|
6
241
|
/**
|
|
7
242
|
* Memory patterns (roadmap §4.3) — public-face Phase-4 primitives audited under
|
|
@@ -25,7 +260,7 @@ import { G as Graph } from './graph-D9LFnda9.js';
|
|
|
25
260
|
* `firstValueFrom(node)`.
|
|
26
261
|
*
|
|
27
262
|
* **Audit logs.** Every imperative mutation (`upsert / remove / clear / link /
|
|
28
|
-
* unlink / rescore / reindex`) is wrapped via {@link
|
|
263
|
+
* unlink / rescore / reindex`) is wrapped via {@link mutate} and appends a
|
|
29
264
|
* typed record to a public `events` log on the bundle / graph.
|
|
30
265
|
*
|
|
31
266
|
* @module
|
|
@@ -49,8 +284,7 @@ import { G as Graph } from './graph-D9LFnda9.js';
|
|
|
49
284
|
* @category memory
|
|
50
285
|
*/
|
|
51
286
|
declare function cosineSimilarity(a: readonly number[], b: readonly number[]): number;
|
|
52
|
-
|
|
53
|
-
type NodeOrValue<T> = T | Node<T>;
|
|
287
|
+
|
|
54
288
|
type CollectionEntry<T> = {
|
|
55
289
|
readonly id: string;
|
|
56
290
|
readonly value: T;
|
|
@@ -345,30 +579,4 @@ type KnowledgeGraph<TEntity, TRelation extends string = string> = Graph & {
|
|
|
345
579
|
*/
|
|
346
580
|
declare function knowledgeGraph<TEntity, TRelation extends string = string>(name: string, opts?: KnowledgeGraphOptions): KnowledgeGraph<TEntity, TRelation>;
|
|
347
581
|
|
|
348
|
-
type
|
|
349
|
-
type index_CollectionEntry<T> = CollectionEntry<T>;
|
|
350
|
-
type index_CollectionGraph<T> = CollectionGraph<T>;
|
|
351
|
-
type index_CollectionOptions<T> = CollectionOptions<T>;
|
|
352
|
-
type index_CollectionScoreFn<T> = CollectionScoreFn<T>;
|
|
353
|
-
type index_HnswAdapter<TMeta> = HnswAdapter<TMeta>;
|
|
354
|
-
type index_KnowledgeEdge<TRelation extends string = string> = KnowledgeEdge<TRelation>;
|
|
355
|
-
type index_KnowledgeGraph<TEntity, TRelation extends string = string> = KnowledgeGraph<TEntity, TRelation>;
|
|
356
|
-
type index_KnowledgeGraphAuditRecord = KnowledgeGraphAuditRecord;
|
|
357
|
-
type index_KnowledgeGraphOptions = KnowledgeGraphOptions;
|
|
358
|
-
type index_NodeOrValue<T> = NodeOrValue<T>;
|
|
359
|
-
type index_RankedCollectionEntry<T> = RankedCollectionEntry<T>;
|
|
360
|
-
type index_VectorBackend = VectorBackend;
|
|
361
|
-
type index_VectorIndexAuditRecord = VectorIndexAuditRecord;
|
|
362
|
-
type index_VectorIndexGraph<TMeta> = VectorIndexGraph<TMeta>;
|
|
363
|
-
type index_VectorIndexOptions<TMeta> = VectorIndexOptions<TMeta>;
|
|
364
|
-
type index_VectorRecord<TMeta> = VectorRecord<TMeta>;
|
|
365
|
-
type index_VectorSearchResult<TMeta> = VectorSearchResult<TMeta>;
|
|
366
|
-
declare const index_collection: typeof collection;
|
|
367
|
-
declare const index_cosineSimilarity: typeof cosineSimilarity;
|
|
368
|
-
declare const index_knowledgeGraph: typeof knowledgeGraph;
|
|
369
|
-
declare const index_vectorIndex: typeof vectorIndex;
|
|
370
|
-
declare namespace index {
|
|
371
|
-
export { type index_CollectionAuditRecord as CollectionAuditRecord, type index_CollectionEntry as CollectionEntry, type index_CollectionGraph as CollectionGraph, type index_CollectionOptions as CollectionOptions, type index_CollectionScoreFn as CollectionScoreFn, type index_HnswAdapter as HnswAdapter, type index_KnowledgeEdge as KnowledgeEdge, type index_KnowledgeGraph as KnowledgeGraph, type index_KnowledgeGraphAuditRecord as KnowledgeGraphAuditRecord, type index_KnowledgeGraphOptions as KnowledgeGraphOptions, type index_NodeOrValue as NodeOrValue, type index_RankedCollectionEntry as RankedCollectionEntry, type index_VectorBackend as VectorBackend, type index_VectorIndexAuditRecord as VectorIndexAuditRecord, type index_VectorIndexGraph as VectorIndexGraph, type index_VectorIndexOptions as VectorIndexOptions, type index_VectorRecord as VectorRecord, type index_VectorSearchResult as VectorSearchResult, index_collection as collection, index_cosineSimilarity as cosineSimilarity, index_knowledgeGraph as knowledgeGraph, index_vectorIndex as vectorIndex };
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
export { type CollectionGraph as C, type HnswAdapter as H, type KnowledgeGraph as K, type NodeOrValue as N, type RankedCollectionEntry as R, type VectorSearchResult as V, type VectorIndexGraph as a, type CollectionAuditRecord as b, type CollectionEntry as c, type CollectionOptions as d, type CollectionScoreFn as e, type KnowledgeEdge as f, type KnowledgeGraphAuditRecord as g, type KnowledgeGraphOptions as h, index as i, type VectorBackend as j, type VectorIndexAuditRecord as k, type VectorIndexOptions as l, type VectorRecord as m, collection as n, cosineSimilarity as o, knowledgeGraph as p, vectorIndex as v };
|
|
582
|
+
export { type AdmissionFilter, type CascadeEvent, type CascadeOverflow, type CascadeReason, type CollectionAuditRecord, type CollectionEntry, type CollectionGraph, type CollectionOptions, type CollectionScoreFn, type DecayPolicy, type DependentsIndex, type FactId, type FactStore, type FactStoreAuditRecord, type HnswAdapter, type KnowledgeEdge, type KnowledgeGraph, type KnowledgeGraphAuditRecord, type KnowledgeGraphOptions, type MemoryAnswer, type MemoryFragment, type MemoryQuery, NodeOrValue, type OutcomeSignal, type RankedCollectionEntry, type ReactiveFactStoreConfig, type ReactiveFactStoreGraph, type ReviewRequest, type ScoringPolicy, type ShardKey, type StoreReadHandle, type VectorBackend, type VectorIndexAuditRecord, type VectorIndexGraph, type VectorIndexOptions, type VectorRecord, type VectorSearchResult, collection, cosineSimilarity, knowledgeGraph, reactiveFactStore, vectorIndex };
|
|
@@ -1,7 +1,242 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Node } from '@graphrefly/pure-ts/core';
|
|
2
|
+
import { ReactiveLogBundle } from '@graphrefly/pure-ts/extra';
|
|
3
|
+
import { Graph } from '@graphrefly/pure-ts/graph';
|
|
4
|
+
import { BaseAuditRecord } from '../../base/mutation/index.js';
|
|
5
|
+
import { N as NodeOrValue } from '../../_internal-B23BagFd.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* DS-14.7 — Reactive Fact Store / Live Knowledge Graph (locked 2026-05-13).
|
|
9
|
+
*
|
|
10
|
+
* Static-topology agent-memory substrate that satisfies MEME L2 (cascade
|
|
11
|
+
* invalidation) and L3 (obsolescence reasoning) plus Hassabis's
|
|
12
|
+
* filter/consolidate/continual-learning frame, **without** materializing one
|
|
13
|
+
* reactive node per fact. ~12 fixed operator nodes never grow regardless of how
|
|
14
|
+
* many facts the store holds; facts live as columnar DATA inside an indexed
|
|
15
|
+
* `state<FactStore>` (optionally sharded), and cascade is implemented as
|
|
16
|
+
* bounded recursive message emission. Termination rests on a per-root
|
|
17
|
+
* semantic contract — a fact only drives the cascade when it transitions to
|
|
18
|
+
* obsolete (`validTo` set), and each obsolete root emits its cascade exactly
|
|
19
|
+
* once across all waves — plus an empty-array fixpoint short-circuit. The
|
|
20
|
+
* cascade is modeled as DATA arrays (NOT INVALIDATE messages), so spec §1.4's
|
|
21
|
+
* idempotent-within-a-wave INVALIDATE guarantee does NOT govern this loop;
|
|
22
|
+
* convergence is the per-root contract, not a spec §1.4 diamond-merge.
|
|
23
|
+
*
|
|
24
|
+
* Canonical design: `archive/docs/SESSION-DS-14.7-reactive-fact-store.md`
|
|
25
|
+
* (9Q walk complete; Q9-open items 1–9 all resolved).
|
|
26
|
+
*
|
|
27
|
+
* Locked decisions baked in here:
|
|
28
|
+
* - `cascadeMaxIterations` default **8**; overflow emits a per-batch summary
|
|
29
|
+
* `{ droppedCount, sample, rootFactId }` to `cascadeOverflow` (Q9-open-4).
|
|
30
|
+
* The overflow `sample` is capped at `OVERFLOW_SAMPLE_SIZE` (8),
|
|
31
|
+
* independent of `cascadeMaxIterations`.
|
|
32
|
+
* - `shardBy` default hash-mod **4**; caller override; `dependentsIndex`
|
|
33
|
+
* unsharded for v1 (Q9-open-1).
|
|
34
|
+
* - `MemoryFragment` adds `embedding? / parent_fragment_id? / provenance?`
|
|
35
|
+
* (Q9-open-3).
|
|
36
|
+
* - `dependentsIndex` updates synchronous + atomic with `factStore` commit
|
|
37
|
+
* (Q9-open-2).
|
|
38
|
+
* - Scoring contract `(fragment, storeReadHandle) => number` — read-only
|
|
39
|
+
* handle, no mutation exposure (Q9-open-5).
|
|
40
|
+
* - Consolidator emits to a dedicated `consolidated` topic that the pattern
|
|
41
|
+
* default-wires back to `ingest`; caller can intercept (Q9-open-6).
|
|
42
|
+
* - Query surface = structured `MemoryQuery` via the `query` topic (default);
|
|
43
|
+
* function-shaped is caller-side `derived` over `factStore` (Q9-open-7).
|
|
44
|
+
* - Bi-temporal is pattern-layer only — no DS-14 envelope shape change
|
|
45
|
+
* (Q9-open-9); `simpleFactStore()` deferred to v1.1 (Q9-open-8 — NOT built).
|
|
46
|
+
*
|
|
47
|
+
* **Cascade cycle visibility.** `cascadeProcessor` stays synchronous (preserves
|
|
48
|
+
* spec §1.4 batch-dedupe — LLM-driven dependency extraction lives UPSTREAM of
|
|
49
|
+
* the cascade topic, never inside the recursion). Every cascade message carries
|
|
50
|
+
* a `causalReason` field and the cycle nodes are tagged `meta.cycle:"cascade"`
|
|
51
|
+
* so `describe()` / `explain()` surface the otherwise-invisible
|
|
52
|
+
* `dependentsIndex` fn-body lookup.
|
|
53
|
+
*
|
|
54
|
+
* @module
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
/** Stable identity for a stored fact. */
|
|
58
|
+
type FactId = string;
|
|
59
|
+
/** Shard partition key (string | number — any hashable scalar). */
|
|
60
|
+
type ShardKey = string | number;
|
|
61
|
+
/**
|
|
62
|
+
* A single stored memory fact. Pattern convention only — NOT a spec primitive
|
|
63
|
+
* and NOT a DS-14 envelope field (bi-temporal stays pattern-layer per
|
|
64
|
+
* Q9-open-9). Each field is a reactive lever (see design PART 2.3):
|
|
65
|
+
* `validTo` set → cascade fires; `confidence < θ` → review; `sources` →
|
|
66
|
+
* `dependentsIndex` edges feeding cascade.
|
|
67
|
+
*/
|
|
68
|
+
interface MemoryFragment<T> {
|
|
69
|
+
readonly id: FactId;
|
|
70
|
+
readonly payload: T;
|
|
71
|
+
/** Transaction time (when learned). `bigint` ns (e.g. `BigInt(monotonicNs())`). */
|
|
72
|
+
readonly t_ns: bigint;
|
|
73
|
+
/** Valid-time start. `undefined` = unbounded past. */
|
|
74
|
+
readonly validFrom?: bigint;
|
|
75
|
+
/** Valid-time end. Setting this is the MEME L3 obsolescence lever. */
|
|
76
|
+
readonly validTo?: bigint;
|
|
77
|
+
/** Confidence 0..1. Dropping below the review threshold emits a review. */
|
|
78
|
+
readonly confidence: number;
|
|
79
|
+
readonly tags: readonly string[];
|
|
80
|
+
/** Dependency edges — fact IDs this fact is derived from / depends on. */
|
|
81
|
+
readonly sources: readonly FactId[];
|
|
82
|
+
/** Optional dense embedding (recipes use it for retrieval). */
|
|
83
|
+
readonly embedding?: readonly number[];
|
|
84
|
+
/** Version-chain pointer — consolidator emits successor fragments. */
|
|
85
|
+
readonly parent_fragment_id?: FactId;
|
|
86
|
+
/** Free-form provenance string for audit. */
|
|
87
|
+
readonly provenance?: string;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Columnar in-memory store. Held as DATA inside a `state<FactStore<T>>` node
|
|
91
|
+
* (one per shard). `byId` is the authoritative map; the typed companions are
|
|
92
|
+
* kept for the recipe layer (`bitemporal-query`, `influence-analysis`) — v1
|
|
93
|
+
* stores fragments directly and lazily projects columns on demand.
|
|
94
|
+
*/
|
|
95
|
+
interface FactStore<T> {
|
|
96
|
+
readonly byId: ReadonlyMap<FactId, MemoryFragment<T>>;
|
|
97
|
+
}
|
|
98
|
+
/** Reverse dependency index: fact → IDs that depend on it. Unsharded (v1). */
|
|
99
|
+
type DependentsIndex = ReadonlyMap<FactId, readonly FactId[]>;
|
|
100
|
+
/** Read-only projection passed to scoring policies (no mutation surface). */
|
|
101
|
+
interface StoreReadHandle<T> {
|
|
102
|
+
get(id: FactId): MemoryFragment<T> | undefined;
|
|
103
|
+
has(id: FactId): boolean;
|
|
104
|
+
readonly size: number;
|
|
105
|
+
values(): IterableIterator<MemoryFragment<T>>;
|
|
106
|
+
}
|
|
107
|
+
type ScoringPolicy<T> = (fragment: MemoryFragment<T>, store: StoreReadHandle<T>) => number;
|
|
108
|
+
type DecayPolicy = (confidence: number, ageNs: bigint) => number;
|
|
109
|
+
type AdmissionFilter<T> = (fragment: MemoryFragment<T>) => boolean;
|
|
110
|
+
/** Outcome / RL signal — write-back lever for continual learning. */
|
|
111
|
+
interface OutcomeSignal {
|
|
112
|
+
readonly factId: FactId;
|
|
113
|
+
readonly reward: number;
|
|
114
|
+
}
|
|
115
|
+
/** Structured query (Q9-open-7 default surface). Serializable + inspectable. */
|
|
116
|
+
interface MemoryQuery {
|
|
117
|
+
/** Match any of these tags (OR). Omit for no tag filter. */
|
|
118
|
+
readonly tags?: readonly string[];
|
|
119
|
+
/** Bi-temporal "as of" — only facts valid at this instant. */
|
|
120
|
+
readonly asOf?: bigint;
|
|
121
|
+
/** Minimum confidence (inclusive). */
|
|
122
|
+
readonly minConfidence?: number;
|
|
123
|
+
/** Cap results (sorted by confidence desc, then t_ns desc). */
|
|
124
|
+
readonly limit?: number;
|
|
125
|
+
}
|
|
126
|
+
interface MemoryAnswer<T> {
|
|
127
|
+
readonly query: MemoryQuery;
|
|
128
|
+
readonly results: readonly MemoryFragment<T>[];
|
|
129
|
+
}
|
|
130
|
+
type CascadeReason = "cascade" | "obsolete" | "manual";
|
|
131
|
+
/** A single cascade invalidation message flowing through the cascade cycle. */
|
|
132
|
+
interface CascadeEvent {
|
|
133
|
+
readonly factId: FactId;
|
|
134
|
+
readonly rootFactId: FactId;
|
|
135
|
+
readonly reason: CascadeReason;
|
|
136
|
+
/** Cascade recursion depth (1 = first wave). Bounded by `cascadeMaxIterations`. */
|
|
137
|
+
readonly iteration: number;
|
|
138
|
+
/**
|
|
139
|
+
* Human-readable causal chain — makes the `dependentsIndex` fn-body lookup
|
|
140
|
+
* visible in `explain()` output even though it is not a topology edge
|
|
141
|
+
* (design Q3 / COMPOSITION-GUIDE §24 mitigation).
|
|
142
|
+
*/
|
|
143
|
+
readonly causalReason: string;
|
|
144
|
+
}
|
|
145
|
+
/** Per-batch overflow summary (Q9-open-4 — never per-message). */
|
|
146
|
+
interface CascadeOverflow {
|
|
147
|
+
readonly droppedCount: number;
|
|
148
|
+
readonly sample: readonly FactId[];
|
|
149
|
+
readonly rootFactId: FactId;
|
|
150
|
+
}
|
|
151
|
+
interface ReviewRequest {
|
|
152
|
+
readonly factId: FactId;
|
|
153
|
+
readonly confidence: number;
|
|
154
|
+
readonly threshold: number;
|
|
155
|
+
}
|
|
156
|
+
interface FactStoreAuditRecord extends BaseAuditRecord {
|
|
157
|
+
readonly action: "ingest" | "invalidate" | "outcome" | "consolidate" | "overflow";
|
|
158
|
+
readonly id?: FactId;
|
|
159
|
+
readonly reason?: CascadeReason;
|
|
160
|
+
}
|
|
161
|
+
interface ReactiveFactStoreConfig<T> {
|
|
162
|
+
readonly extractDependencies: (f: MemoryFragment<T>) => readonly FactId[];
|
|
163
|
+
/** Shard partition fn. Default: FNV-1a hash of `id` mod `shardCount`. */
|
|
164
|
+
readonly shardBy?: (f: MemoryFragment<T>) => ShardKey;
|
|
165
|
+
/** Shard count for the default hash-mod sharder. Default 4 (§3.2). */
|
|
166
|
+
readonly shardCount?: number;
|
|
167
|
+
readonly scoring?: Node<ScoringPolicy<T>>;
|
|
168
|
+
readonly decay?: Node<DecayPolicy>;
|
|
169
|
+
readonly admissionFilter?: Node<AdmissionFilter<T>>;
|
|
170
|
+
readonly ingest: Node<MemoryFragment<T>>;
|
|
171
|
+
readonly outcome?: Node<OutcomeSignal>;
|
|
172
|
+
readonly query?: Node<MemoryQuery>;
|
|
173
|
+
/**
|
|
174
|
+
* Consolidator trigger — a reactive timer/cron Node (e.g. `fromCron(...)`).
|
|
175
|
+
* When supplied, the `consolidated` node maps each tick to summarized
|
|
176
|
+
* fragments emitted on the `consolidated` topic and default-wired back to
|
|
177
|
+
* the internal ingest path.
|
|
178
|
+
*/
|
|
179
|
+
readonly consolidateTrigger?: Node<unknown>;
|
|
180
|
+
/**
|
|
181
|
+
* Consolidation summarizer. Reads a store snapshot, returns successor
|
|
182
|
+
* fragments (typically with `parent_fragment_id` set). Default: no-op
|
|
183
|
+
* (emits nothing) so the cron tick is observable without forcing a policy.
|
|
184
|
+
*/
|
|
185
|
+
readonly consolidate?: (store: StoreReadHandle<T>) => readonly MemoryFragment<T>[];
|
|
186
|
+
/** Cascade recursion cap (§3.1). Default 8. */
|
|
187
|
+
readonly cascadeMaxIterations?: number;
|
|
188
|
+
/** Confidence below which a {@link ReviewRequest} is emitted. Default 0.3. */
|
|
189
|
+
readonly reviewThreshold?: number;
|
|
190
|
+
}
|
|
191
|
+
interface ReactiveFactStoreGraph<T> extends Graph {
|
|
192
|
+
/** Per-shard `state<FactStore<T>>` nodes (length = shard count). */
|
|
193
|
+
readonly shards: readonly Node<FactStore<T>>[];
|
|
194
|
+
/** Unified read view across all shards (derived). */
|
|
195
|
+
readonly factStore: Node<FactStore<T>>;
|
|
196
|
+
readonly dependentsIndex: Node<DependentsIndex>;
|
|
197
|
+
readonly answer: Node<MemoryAnswer<T> | null>;
|
|
198
|
+
readonly cascade: Node<readonly CascadeEvent[]>;
|
|
199
|
+
readonly cascadeOverflow: Node<CascadeOverflow | null>;
|
|
200
|
+
readonly review: Node<ReviewRequest | null>;
|
|
201
|
+
readonly consolidated: Node<readonly MemoryFragment<T>[]>;
|
|
202
|
+
readonly events: ReactiveLogBundle<FactStoreAuditRecord>;
|
|
203
|
+
/** Reactive read: a single fact by id (SENTINEL until the fact exists). */
|
|
204
|
+
itemNode(id: FactId): Node<MemoryFragment<T> | undefined>;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Build a static-topology reactive fact store (DS-14.7 architecture C).
|
|
208
|
+
*
|
|
209
|
+
* Topology (~12 fixed nodes — never grows with fact count):
|
|
210
|
+
* - `shards[0..N]` — `state<FactStore<T>>` columnar stores (default 4 shards).
|
|
211
|
+
* - `factStore` — derived union read view across shards.
|
|
212
|
+
* - `dependentsIndex` — `state<DependentsIndex>` reverse-dep map, unsharded,
|
|
213
|
+
* updated synchronously + atomically with each commit (Q9-open-2).
|
|
214
|
+
* - `extractOp` — derived: ingest → admission-filtered fragment + dep edges.
|
|
215
|
+
* - `invalidationDetector` — derived: scans committed store for `validTo`-set
|
|
216
|
+
* / low-confidence facts, resolves dependents via `dependentsIndex`, emits
|
|
217
|
+
* cascade messages.
|
|
218
|
+
* - `cascade` — topic node carrying `CascadeEvent[]`.
|
|
219
|
+
* - `cascadeProcessor` — derived, **synchronous**, `meta.cycle:"cascade"`:
|
|
220
|
+
* dedupes by factId, writes invalidations back to shards, recurses until
|
|
221
|
+
* fixpoint OR `cascadeMaxIterations` → `cascadeOverflow`.
|
|
222
|
+
* - `cascadeOverflow` — per-batch overflow summary node.
|
|
223
|
+
* - `queryOp` / `answer` — structured `MemoryQuery` → results (SENTINEL-safe).
|
|
224
|
+
* - `outcomeProcessor` — outcome signal → confidence write-back.
|
|
225
|
+
* - `consolidated` — cron-tick → summarized fragments on the
|
|
226
|
+
* `consolidated` topic,
|
|
227
|
+
* default-wired back into the ingest path.
|
|
228
|
+
* - `review` — low-confidence proactive-verification requests.
|
|
229
|
+
*
|
|
230
|
+
* The cascade cycle (`invalidationDetector → cascade → cascadeProcessor →
|
|
231
|
+
* shards → invalidationDetector`) is a real, bounded reactive cycle. Both
|
|
232
|
+
* `invalidationDetector` and `cascadeProcessor` are tagged
|
|
233
|
+
* `meta.cycle:"cascade"` and every cascade message carries `causalReason`, so
|
|
234
|
+
* `describe()` / `explain()` surface the otherwise-invisible
|
|
235
|
+
* `dependentsIndex` lookup (COMPOSITION-GUIDE §24).
|
|
236
|
+
*
|
|
237
|
+
* @category memory
|
|
238
|
+
*/
|
|
239
|
+
declare function reactiveFactStore<T>(config: ReactiveFactStoreConfig<T>): ReactiveFactStoreGraph<T>;
|
|
5
240
|
|
|
6
241
|
/**
|
|
7
242
|
* Memory patterns (roadmap §4.3) — public-face Phase-4 primitives audited under
|
|
@@ -25,7 +260,7 @@ import { G as Graph } from './graph-CWvEUQAq.cjs';
|
|
|
25
260
|
* `firstValueFrom(node)`.
|
|
26
261
|
*
|
|
27
262
|
* **Audit logs.** Every imperative mutation (`upsert / remove / clear / link /
|
|
28
|
-
* unlink / rescore / reindex`) is wrapped via {@link
|
|
263
|
+
* unlink / rescore / reindex`) is wrapped via {@link mutate} and appends a
|
|
29
264
|
* typed record to a public `events` log on the bundle / graph.
|
|
30
265
|
*
|
|
31
266
|
* @module
|
|
@@ -49,8 +284,7 @@ import { G as Graph } from './graph-CWvEUQAq.cjs';
|
|
|
49
284
|
* @category memory
|
|
50
285
|
*/
|
|
51
286
|
declare function cosineSimilarity(a: readonly number[], b: readonly number[]): number;
|
|
52
|
-
|
|
53
|
-
type NodeOrValue<T> = T | Node<T>;
|
|
287
|
+
|
|
54
288
|
type CollectionEntry<T> = {
|
|
55
289
|
readonly id: string;
|
|
56
290
|
readonly value: T;
|
|
@@ -345,30 +579,4 @@ type KnowledgeGraph<TEntity, TRelation extends string = string> = Graph & {
|
|
|
345
579
|
*/
|
|
346
580
|
declare function knowledgeGraph<TEntity, TRelation extends string = string>(name: string, opts?: KnowledgeGraphOptions): KnowledgeGraph<TEntity, TRelation>;
|
|
347
581
|
|
|
348
|
-
type
|
|
349
|
-
type index_CollectionEntry<T> = CollectionEntry<T>;
|
|
350
|
-
type index_CollectionGraph<T> = CollectionGraph<T>;
|
|
351
|
-
type index_CollectionOptions<T> = CollectionOptions<T>;
|
|
352
|
-
type index_CollectionScoreFn<T> = CollectionScoreFn<T>;
|
|
353
|
-
type index_HnswAdapter<TMeta> = HnswAdapter<TMeta>;
|
|
354
|
-
type index_KnowledgeEdge<TRelation extends string = string> = KnowledgeEdge<TRelation>;
|
|
355
|
-
type index_KnowledgeGraph<TEntity, TRelation extends string = string> = KnowledgeGraph<TEntity, TRelation>;
|
|
356
|
-
type index_KnowledgeGraphAuditRecord = KnowledgeGraphAuditRecord;
|
|
357
|
-
type index_KnowledgeGraphOptions = KnowledgeGraphOptions;
|
|
358
|
-
type index_NodeOrValue<T> = NodeOrValue<T>;
|
|
359
|
-
type index_RankedCollectionEntry<T> = RankedCollectionEntry<T>;
|
|
360
|
-
type index_VectorBackend = VectorBackend;
|
|
361
|
-
type index_VectorIndexAuditRecord = VectorIndexAuditRecord;
|
|
362
|
-
type index_VectorIndexGraph<TMeta> = VectorIndexGraph<TMeta>;
|
|
363
|
-
type index_VectorIndexOptions<TMeta> = VectorIndexOptions<TMeta>;
|
|
364
|
-
type index_VectorRecord<TMeta> = VectorRecord<TMeta>;
|
|
365
|
-
type index_VectorSearchResult<TMeta> = VectorSearchResult<TMeta>;
|
|
366
|
-
declare const index_collection: typeof collection;
|
|
367
|
-
declare const index_cosineSimilarity: typeof cosineSimilarity;
|
|
368
|
-
declare const index_knowledgeGraph: typeof knowledgeGraph;
|
|
369
|
-
declare const index_vectorIndex: typeof vectorIndex;
|
|
370
|
-
declare namespace index {
|
|
371
|
-
export { type index_CollectionAuditRecord as CollectionAuditRecord, type index_CollectionEntry as CollectionEntry, type index_CollectionGraph as CollectionGraph, type index_CollectionOptions as CollectionOptions, type index_CollectionScoreFn as CollectionScoreFn, type index_HnswAdapter as HnswAdapter, type index_KnowledgeEdge as KnowledgeEdge, type index_KnowledgeGraph as KnowledgeGraph, type index_KnowledgeGraphAuditRecord as KnowledgeGraphAuditRecord, type index_KnowledgeGraphOptions as KnowledgeGraphOptions, type index_NodeOrValue as NodeOrValue, type index_RankedCollectionEntry as RankedCollectionEntry, type index_VectorBackend as VectorBackend, type index_VectorIndexAuditRecord as VectorIndexAuditRecord, type index_VectorIndexGraph as VectorIndexGraph, type index_VectorIndexOptions as VectorIndexOptions, type index_VectorRecord as VectorRecord, type index_VectorSearchResult as VectorSearchResult, index_collection as collection, index_cosineSimilarity as cosineSimilarity, index_knowledgeGraph as knowledgeGraph, index_vectorIndex as vectorIndex };
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
export { type CollectionGraph as C, type HnswAdapter as H, type KnowledgeGraph as K, type NodeOrValue as N, type RankedCollectionEntry as R, type VectorSearchResult as V, type VectorIndexGraph as a, type CollectionAuditRecord as b, type CollectionEntry as c, type CollectionOptions as d, type CollectionScoreFn as e, type KnowledgeEdge as f, type KnowledgeGraphAuditRecord as g, type KnowledgeGraphOptions as h, index as i, type VectorBackend as j, type VectorIndexAuditRecord as k, type VectorIndexOptions as l, type VectorRecord as m, collection as n, cosineSimilarity as o, knowledgeGraph as p, vectorIndex as v };
|
|
582
|
+
export { type AdmissionFilter, type CascadeEvent, type CascadeOverflow, type CascadeReason, type CollectionAuditRecord, type CollectionEntry, type CollectionGraph, type CollectionOptions, type CollectionScoreFn, type DecayPolicy, type DependentsIndex, type FactId, type FactStore, type FactStoreAuditRecord, type HnswAdapter, type KnowledgeEdge, type KnowledgeGraph, type KnowledgeGraphAuditRecord, type KnowledgeGraphOptions, type MemoryAnswer, type MemoryFragment, type MemoryQuery, NodeOrValue, type OutcomeSignal, type RankedCollectionEntry, type ReactiveFactStoreConfig, type ReactiveFactStoreGraph, type ReviewRequest, type ScoringPolicy, type ShardKey, type StoreReadHandle, type VectorBackend, type VectorIndexAuditRecord, type VectorIndexGraph, type VectorIndexOptions, type VectorRecord, type VectorSearchResult, collection, cosineSimilarity, knowledgeGraph, reactiveFactStore, vectorIndex };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
collection,
|
|
3
|
+
cosineSimilarity,
|
|
4
|
+
knowledgeGraph,
|
|
5
|
+
reactiveFactStore,
|
|
6
|
+
vectorIndex
|
|
7
|
+
} from "../../chunk-FR6RGA3B.js";
|
|
8
|
+
import "../../chunk-QMBYUVRL.js";
|
|
9
|
+
import "../../chunk-FMPF42Q4.js";
|
|
10
|
+
import "../../chunk-BXGZFGZ4.js";
|
|
11
|
+
import "../../chunk-AZDQPQ3V.js";
|
|
12
|
+
export {
|
|
13
|
+
collection,
|
|
14
|
+
cosineSimilarity,
|
|
15
|
+
knowledgeGraph,
|
|
16
|
+
reactiveFactStore,
|
|
17
|
+
vectorIndex
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|