@graphrefly/graphrefly 0.45.0 → 0.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/dist/_internal-B23BagFd.d.cts +33 -0
- package/dist/_internal-B23BagFd.d.ts +33 -0
- package/dist/adaptive-rate-limiter-Dch_xYIi.d.cts +111 -0
- package/dist/adaptive-rate-limiter-Dch_xYIi.d.ts +111 -0
- package/dist/agents-C0Ji9ldU.d.cts +629 -0
- package/dist/agents-C9zexT7I.d.ts +629 -0
- package/dist/audit-BAXb3VOg.d.ts +246 -0
- package/dist/audit-C_bPfkqS.d.cts +246 -0
- package/dist/backoff-7KIK3WQW.js +24 -0
- package/dist/backoff-7KIK3WQW.js.map +1 -0
- package/dist/backoff-Bnb9OoPh.d.cts +6 -0
- package/dist/backoff-Bnb9OoPh.d.ts +6 -0
- package/dist/base/composition/index.cjs +811 -0
- package/dist/base/composition/index.cjs.map +1 -0
- package/dist/base/composition/index.d.cts +469 -0
- package/dist/base/composition/index.d.ts +469 -0
- package/dist/base/composition/index.js +40 -0
- package/dist/base/composition/index.js.map +1 -0
- package/dist/base/index.cjs +6336 -0
- package/dist/base/index.cjs.map +1 -0
- package/dist/base/index.d.cts +22 -0
- package/dist/base/index.d.ts +22 -0
- package/dist/base/index.js +259 -0
- package/dist/base/index.js.map +1 -0
- package/dist/base/io/index.cjs +3270 -0
- package/dist/base/io/index.cjs.map +1 -0
- package/dist/base/io/index.d.cts +2245 -0
- package/dist/base/io/index.d.ts +2245 -0
- package/dist/base/io/index.js +117 -0
- package/dist/base/io/index.js.map +1 -0
- package/dist/base/meta/index.cjs +43 -0
- package/dist/base/meta/index.cjs.map +1 -0
- package/dist/base/meta/index.d.cts +45 -0
- package/dist/base/meta/index.d.ts +45 -0
- package/dist/base/meta/index.js +13 -0
- package/dist/base/meta/index.js.map +1 -0
- package/dist/base/mutation/index.cjs +200 -0
- package/dist/base/mutation/index.cjs.map +1 -0
- package/dist/base/mutation/index.d.cts +177 -0
- package/dist/base/mutation/index.d.ts +177 -0
- package/dist/base/mutation/index.js +22 -0
- package/dist/base/mutation/index.js.map +1 -0
- package/dist/base/render/index.cjs +1120 -0
- package/dist/base/render/index.cjs.map +1 -0
- package/dist/base/render/index.d.cts +227 -0
- package/dist/base/render/index.d.ts +227 -0
- package/dist/base/render/index.js +24 -0
- package/dist/base/render/index.js.map +1 -0
- package/dist/base/sources/browser/index.cjs +172 -0
- package/dist/base/sources/browser/index.cjs.map +1 -0
- package/dist/base/sources/browser/index.d.cts +84 -0
- package/dist/base/sources/browser/index.d.ts +84 -0
- package/dist/base/sources/browser/index.js +151 -0
- package/dist/base/sources/browser/index.js.map +1 -0
- package/dist/base/sources/event/index.cjs +98 -0
- package/dist/base/sources/event/index.cjs.map +1 -0
- package/dist/base/sources/event/index.d.cts +91 -0
- package/dist/base/sources/event/index.d.ts +91 -0
- package/dist/base/sources/event/index.js +13 -0
- package/dist/base/sources/event/index.js.map +1 -0
- package/dist/base/sources/index.cjs +755 -0
- package/dist/base/sources/index.cjs.map +1 -0
- package/dist/base/sources/index.d.cts +357 -0
- package/dist/base/sources/index.d.ts +357 -0
- package/dist/base/sources/index.js +42 -0
- package/dist/base/sources/index.js.map +1 -0
- package/dist/base/sources/node/index.cjs +320 -0
- package/dist/base/sources/node/index.cjs.map +1 -0
- package/dist/base/sources/node/index.d.cts +185 -0
- package/dist/base/sources/node/index.d.ts +185 -0
- package/dist/base/sources/node/index.js +306 -0
- package/dist/base/sources/node/index.js.map +1 -0
- package/dist/base/utils/index.cjs +37 -0
- package/dist/base/utils/index.cjs.map +1 -0
- package/dist/base/utils/index.d.cts +37 -0
- package/dist/base/utils/index.d.ts +37 -0
- package/dist/base/utils/index.js +11 -0
- package/dist/base/utils/index.js.map +1 -0
- package/dist/base/worker/index.cjs +548 -0
- package/dist/base/worker/index.cjs.map +1 -0
- package/dist/base/worker/index.d.cts +207 -0
- package/dist/base/worker/index.d.ts +207 -0
- package/dist/base/worker/index.js +20 -0
- package/dist/base/worker/index.js.map +1 -0
- package/dist/breaker-C9skL3d8.d.ts +175 -0
- package/dist/breaker-ugSdq54q.d.cts +175 -0
- package/dist/cascading-CSSbKGrJ.d.ts +199 -0
- package/dist/cascading-baGkiihI.d.cts +199 -0
- package/dist/chunk-255UCBG4.js +58 -0
- package/dist/chunk-255UCBG4.js.map +1 -0
- package/dist/chunk-2LO3EL4W.js +1 -0
- package/dist/chunk-2LO3EL4W.js.map +1 -0
- package/dist/chunk-2OB3CEJS.js +1065 -0
- package/dist/chunk-2OB3CEJS.js.map +1 -0
- package/dist/chunk-36NMM65U.js +144 -0
- package/dist/chunk-36NMM65U.js.map +1 -0
- package/dist/chunk-3CEXCBN6.js +1 -0
- package/dist/chunk-3CEXCBN6.js.map +1 -0
- package/dist/chunk-3MUSLI6E.js +105 -0
- package/dist/chunk-3MUSLI6E.js.map +1 -0
- package/dist/chunk-3PSLNJDU.js +884 -0
- package/dist/chunk-3PSLNJDU.js.map +1 -0
- package/dist/chunk-3QZY5BI7.js +92 -0
- package/dist/chunk-3QZY5BI7.js.map +1 -0
- package/dist/chunk-42FQ27MQ.js +594 -0
- package/dist/chunk-42FQ27MQ.js.map +1 -0
- package/dist/chunk-4GYMCUDZ.js +1085 -0
- package/dist/chunk-4GYMCUDZ.js.map +1 -0
- package/dist/chunk-4S53H2KR.js +382 -0
- package/dist/chunk-4S53H2KR.js.map +1 -0
- package/dist/chunk-4XCHZRUJ.js +128 -0
- package/dist/chunk-4XCHZRUJ.js.map +1 -0
- package/dist/chunk-5THCXDWY.js +725 -0
- package/dist/chunk-5THCXDWY.js.map +1 -0
- package/dist/chunk-6XZYT4SW.js +256 -0
- package/dist/chunk-6XZYT4SW.js.map +1 -0
- package/dist/chunk-7EGRP2VX.js +76 -0
- package/dist/chunk-7EGRP2VX.js.map +1 -0
- package/dist/chunk-A7KV5UK4.js +150 -0
- package/dist/chunk-A7KV5UK4.js.map +1 -0
- package/dist/chunk-APY2SS5X.js +156 -0
- package/dist/chunk-APY2SS5X.js.map +1 -0
- package/dist/chunk-AZDQPQ3V.js +66 -0
- package/dist/chunk-AZDQPQ3V.js.map +1 -0
- package/dist/chunk-BU3SEFA5.js +90 -0
- package/dist/chunk-BU3SEFA5.js.map +1 -0
- package/dist/chunk-BXGZFGZ4.js +189 -0
- package/dist/chunk-BXGZFGZ4.js.map +1 -0
- package/dist/chunk-CGHORL6G.js +579 -0
- package/dist/chunk-CGHORL6G.js.map +1 -0
- package/dist/chunk-CXANAIZU.js +530 -0
- package/dist/chunk-CXANAIZU.js.map +1 -0
- package/dist/chunk-CZQHCKKG.js +1 -0
- package/dist/chunk-CZQHCKKG.js.map +1 -0
- package/dist/chunk-DKNHAICT.js +133 -0
- package/dist/chunk-DKNHAICT.js.map +1 -0
- package/dist/chunk-DM4OMPWK.js +584 -0
- package/dist/chunk-DM4OMPWK.js.map +1 -0
- package/dist/chunk-DMSNO6ZB.js +452 -0
- package/dist/chunk-DMSNO6ZB.js.map +1 -0
- package/dist/chunk-E5OZPDIW.js +229 -0
- package/dist/chunk-E5OZPDIW.js.map +1 -0
- package/dist/chunk-EVYY4X5A.js +509 -0
- package/dist/chunk-EVYY4X5A.js.map +1 -0
- package/dist/chunk-FDFD67UO.js +1 -0
- package/dist/chunk-FDFD67UO.js.map +1 -0
- package/dist/chunk-FMPF42Q4.js +13 -0
- package/dist/chunk-FMPF42Q4.js.map +1 -0
- package/dist/chunk-FR6RGA3B.js +1277 -0
- package/dist/chunk-FR6RGA3B.js.map +1 -0
- package/dist/chunk-FW23JYNQ.js +454 -0
- package/dist/chunk-FW23JYNQ.js.map +1 -0
- package/dist/chunk-GBCENOLN.js +1575 -0
- package/dist/chunk-GBCENOLN.js.map +1 -0
- package/dist/chunk-HL7HUJIX.js +1 -0
- package/dist/chunk-HL7HUJIX.js.map +1 -0
- package/dist/chunk-HULCUY35.js +2508 -0
- package/dist/chunk-HULCUY35.js.map +1 -0
- package/dist/chunk-IHTWQEDR.js +169 -0
- package/dist/chunk-IHTWQEDR.js.map +1 -0
- package/dist/chunk-IJRR6YAI.js +128 -0
- package/dist/chunk-IJRR6YAI.js.map +1 -0
- package/dist/chunk-JGFRAFDL.js +221 -0
- package/dist/chunk-JGFRAFDL.js.map +1 -0
- package/dist/chunk-KIIXR252.js +211 -0
- package/dist/chunk-KIIXR252.js.map +1 -0
- package/dist/chunk-KN3H5CNT.js +11 -0
- package/dist/chunk-KN3H5CNT.js.map +1 -0
- package/dist/chunk-KPG3DGLA.js +1 -0
- package/dist/chunk-KPG3DGLA.js.map +1 -0
- package/dist/chunk-KRNQ6RGQ.js +1 -0
- package/dist/chunk-KRNQ6RGQ.js.map +1 -0
- package/dist/chunk-LBAJK24K.js +1071 -0
- package/dist/chunk-LBAJK24K.js.map +1 -0
- package/dist/chunk-MLTPJMH6.js +417 -0
- package/dist/chunk-MLTPJMH6.js.map +1 -0
- package/dist/chunk-N3SZ7BMH.js +95 -0
- package/dist/chunk-N3SZ7BMH.js.map +1 -0
- package/dist/chunk-NDUD3IMO.js +540 -0
- package/dist/chunk-NDUD3IMO.js.map +1 -0
- package/dist/chunk-NY2PYHNC.js +873 -0
- package/dist/chunk-NY2PYHNC.js.map +1 -0
- package/dist/chunk-O3MT7DYI.js +225 -0
- package/dist/chunk-O3MT7DYI.js.map +1 -0
- package/dist/chunk-OCUDSN63.js +2386 -0
- package/dist/chunk-OCUDSN63.js.map +1 -0
- package/dist/chunk-OIWU3NYV.js +199 -0
- package/dist/chunk-OIWU3NYV.js.map +1 -0
- package/dist/chunk-OO5BM6CJ.js +1153 -0
- package/dist/chunk-OO5BM6CJ.js.map +1 -0
- package/dist/chunk-OQUIJT7A.js +1 -0
- package/dist/chunk-OQUIJT7A.js.map +1 -0
- package/dist/chunk-P5LBT622.js +105 -0
- package/dist/chunk-P5LBT622.js.map +1 -0
- package/dist/chunk-PKGQG5QQ.js +519 -0
- package/dist/chunk-PKGQG5QQ.js.map +1 -0
- package/dist/chunk-PKPO3JTZ.js +561 -0
- package/dist/chunk-PKPO3JTZ.js.map +1 -0
- package/dist/chunk-PL5UDIQ5.js +118 -0
- package/dist/chunk-PL5UDIQ5.js.map +1 -0
- package/dist/chunk-PZWISPIQ.js +432 -0
- package/dist/chunk-PZWISPIQ.js.map +1 -0
- package/dist/chunk-Q3EYOCZB.js +510 -0
- package/dist/chunk-Q3EYOCZB.js.map +1 -0
- package/dist/chunk-QMBYUVRL.js +15 -0
- package/dist/chunk-QMBYUVRL.js.map +1 -0
- package/dist/chunk-RAGGHLCV.js +200 -0
- package/dist/chunk-RAGGHLCV.js.map +1 -0
- package/dist/chunk-RGL53X5G.js +574 -0
- package/dist/chunk-RGL53X5G.js.map +1 -0
- package/dist/chunk-RJOG4IJU.js +1039 -0
- package/dist/chunk-RJOG4IJU.js.map +1 -0
- package/dist/chunk-SOOKUYVM.js +403 -0
- package/dist/chunk-SOOKUYVM.js.map +1 -0
- package/dist/chunk-T5BN5KG7.js +1 -0
- package/dist/chunk-T5BN5KG7.js.map +1 -0
- package/dist/chunk-TP7244Y6.js +207 -0
- package/dist/chunk-TP7244Y6.js.map +1 -0
- package/dist/chunk-TSBFTJKM.js +57 -0
- package/dist/chunk-TSBFTJKM.js.map +1 -0
- package/dist/chunk-URQ2CBBF.js +143 -0
- package/dist/chunk-URQ2CBBF.js.map +1 -0
- package/dist/chunk-W2BOPXTI.js +1 -0
- package/dist/chunk-W2BOPXTI.js.map +1 -0
- package/dist/chunk-WKSWLSCX.js +207 -0
- package/dist/chunk-WKSWLSCX.js.map +1 -0
- package/dist/chunk-Y52CS6YA.js +88 -0
- package/dist/chunk-Y52CS6YA.js.map +1 -0
- package/dist/chunk-YCBUWK77.js +92 -0
- package/dist/chunk-YCBUWK77.js.map +1 -0
- package/dist/chunk-YJ4U2D2C.js +314 -0
- package/dist/chunk-YJ4U2D2C.js.map +1 -0
- package/dist/chunk-Z4YXAUDN.js +239 -0
- package/dist/chunk-Z4YXAUDN.js.map +1 -0
- package/dist/chunk-Z6EGP5D7.js +92 -0
- package/dist/chunk-Z6EGP5D7.js.map +1 -0
- package/dist/compat/index.cjs +3083 -2
- package/dist/compat/index.cjs.map +1 -1
- package/dist/compat/index.d.cts +116 -1
- package/dist/compat/index.d.ts +116 -1
- package/dist/compat/index.js +175 -2
- package/dist/compat/index.js.map +1 -1
- package/dist/compat/jotai/index.cjs +130 -2
- package/dist/compat/jotai/index.cjs.map +1 -1
- package/dist/compat/jotai/index.d.cts +2 -1
- package/dist/compat/jotai/index.d.ts +2 -1
- package/dist/compat/jotai/index.js +7 -2
- package/dist/compat/jotai/index.js.map +1 -1
- package/dist/compat/nanostores/index.cjs +186 -2
- package/dist/compat/nanostores/index.cjs.map +1 -1
- package/dist/compat/nanostores/index.d.cts +2 -1
- package/dist/compat/nanostores/index.d.ts +2 -1
- package/dist/compat/nanostores/index.js +21 -2
- package/dist/compat/nanostores/index.js.map +1 -1
- package/dist/compat/nestjs/index.cjs +2224 -2
- package/dist/compat/nestjs/index.cjs.map +1 -1
- package/dist/compat/nestjs/index.d.cts +10 -1
- package/dist/compat/nestjs/index.d.ts +10 -1
- package/dist/compat/nestjs/index.js +77 -2
- package/dist/compat/nestjs/index.js.map +1 -1
- package/dist/compat/react/index.cjs +95 -2
- package/dist/compat/react/index.cjs.map +1 -1
- package/dist/compat/react/index.d.cts +2 -1
- package/dist/compat/react/index.d.ts +2 -1
- package/dist/compat/react/index.js +11 -2
- package/dist/compat/react/index.js.map +1 -1
- package/dist/compat/solid/index.cjs +82 -2
- package/dist/compat/solid/index.cjs.map +1 -1
- package/dist/compat/solid/index.d.cts +2 -1
- package/dist/compat/solid/index.d.ts +2 -1
- package/dist/compat/solid/index.js +11 -2
- package/dist/compat/solid/index.js.map +1 -1
- package/dist/compat/svelte/index.cjs +85 -2
- package/dist/compat/svelte/index.cjs.map +1 -1
- package/dist/compat/svelte/index.d.cts +2 -1
- package/dist/compat/svelte/index.d.ts +2 -1
- package/dist/compat/svelte/index.js +11 -2
- package/dist/compat/svelte/index.js.map +1 -1
- package/dist/compat/vue/index.cjs +100 -2
- package/dist/compat/vue/index.cjs.map +1 -1
- package/dist/compat/vue/index.d.cts +3 -1
- package/dist/compat/vue/index.d.ts +3 -1
- package/dist/compat/vue/index.js +11 -2
- package/dist/compat/vue/index.js.map +1 -1
- package/dist/compat/zustand/index.cjs +50 -2
- package/dist/compat/zustand/index.cjs.map +1 -1
- package/dist/compat/zustand/index.d.cts +2 -1
- package/dist/compat/zustand/index.d.ts +2 -1
- package/dist/compat/zustand/index.js +7 -2
- package/dist/compat/zustand/index.js.map +1 -1
- package/dist/distill-De6Rnn15.d.cts +48 -0
- package/dist/distill-De6Rnn15.d.ts +48 -0
- package/dist/external-register-CWyroXb_.d.cts +138 -0
- package/dist/external-register-CWyroXb_.d.ts +138 -0
- package/dist/fallback-Bx46zqky.d.cts +243 -0
- package/dist/fallback-pIWW8A2d.d.ts +243 -0
- package/dist/guarded-execution-BcdtxeBk.d.ts +207 -0
- package/dist/guarded-execution-C-3hnP6A.d.cts +207 -0
- package/dist/index-5SU_O78r.d.cts +754 -0
- package/dist/index-B6pxYJzO.d.cts +36 -0
- package/dist/index-B6pxYJzO.d.ts +36 -0
- package/dist/index-BFsng6v1.d.cts +44 -0
- package/dist/index-BFsng6v1.d.ts +44 -0
- package/dist/index-Bg-LwEt-.d.cts +45 -0
- package/dist/index-Bg-LwEt-.d.ts +45 -0
- package/dist/index-Brp888t0.d.cts +127 -0
- package/dist/index-Brp888t0.d.ts +127 -0
- package/dist/index-CDfk6jHN.d.cts +37 -0
- package/dist/index-CDfk6jHN.d.ts +37 -0
- package/dist/index-CEXCtYYJ.d.ts +754 -0
- package/dist/index-DLAxYaN5.d.cts +169 -0
- package/dist/index-DLAxYaN5.d.ts +169 -0
- package/dist/index-DeWbQzMe.d.cts +34 -0
- package/dist/index-DeWbQzMe.d.ts +34 -0
- package/dist/index-dX9IzPqj.d.cts +86 -0
- package/dist/index-dX9IzPqj.d.ts +86 -0
- package/dist/index.cjs +25950 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +56 -42
- package/dist/index.d.ts +56 -42
- package/dist/index.js +849 -0
- package/dist/index.js.map +1 -1
- package/dist/layout-types-B5aiHYgk.d.cts +72 -0
- package/dist/layout-types-B5aiHYgk.d.ts +72 -0
- package/dist/memory-composers-BryDrRBX.d.cts +529 -0
- package/dist/memory-composers-CVQqPYEV.d.ts +529 -0
- package/dist/observable-BXQoW1P-.d.cts +36 -0
- package/dist/observable-BXQoW1P-.d.ts +36 -0
- package/dist/pipeline-graph-Ce47CB6Y.d.cts +145 -0
- package/dist/pipeline-graph-DXCwY9vG.d.ts +145 -0
- package/dist/presets/ai/index.cjs +4377 -0
- package/dist/presets/ai/index.cjs.map +1 -0
- package/dist/presets/ai/index.d.cts +98 -0
- package/dist/presets/ai/index.d.ts +98 -0
- package/dist/presets/ai/index.js +54 -0
- package/dist/presets/ai/index.js.map +1 -0
- package/dist/presets/harness/index.cjs +5929 -0
- package/dist/presets/harness/index.cjs.map +1 -0
- package/dist/presets/harness/index.d.cts +566 -0
- package/dist/presets/harness/index.d.ts +566 -0
- package/dist/presets/harness/index.js +71 -0
- package/dist/presets/harness/index.js.map +1 -0
- package/dist/presets/index.cjs +9782 -0
- package/dist/presets/index.cjs.map +1 -0
- package/dist/presets/index.d.cts +28 -0
- package/dist/presets/index.d.ts +28 -0
- package/dist/presets/index.js +129 -0
- package/dist/presets/index.js.map +1 -0
- package/dist/presets/inspect/index.cjs +1087 -0
- package/dist/presets/inspect/index.cjs.map +1 -0
- package/dist/presets/inspect/index.d.cts +172 -0
- package/dist/presets/inspect/index.d.ts +172 -0
- package/dist/presets/inspect/index.js +21 -0
- package/dist/presets/inspect/index.js.map +1 -0
- package/dist/presets/resilience/index.cjs +1593 -0
- package/dist/presets/resilience/index.cjs.map +1 -0
- package/dist/presets/resilience/index.d.cts +205 -0
- package/dist/presets/resilience/index.d.ts +205 -0
- package/dist/presets/resilience/index.js +18 -0
- package/dist/presets/resilience/index.js.map +1 -0
- package/dist/rate-limiter-CEALq4N1.d.ts +559 -0
- package/dist/rate-limiter-DpVbSYdH.d.cts +559 -0
- package/dist/reactive-layout-fswlBUvX.d.cts +195 -0
- package/dist/reactive-layout-fswlBUvX.d.ts +195 -0
- package/dist/retry-BDbRZ_gx.d.ts +125 -0
- package/dist/retry-DWuhjvsA.d.cts +125 -0
- package/dist/solutions/index.cjs +8200 -0
- package/dist/solutions/index.cjs.map +1 -0
- package/dist/solutions/index.d.cts +23 -0
- package/dist/solutions/index.d.ts +23 -0
- package/dist/solutions/index.js +55 -0
- package/dist/solutions/index.js.map +1 -0
- package/dist/spawnable-5mDY501F.d.cts +746 -0
- package/dist/spawnable-D3lR0oQu.d.ts +746 -0
- package/dist/status-U-rUI79b.d.cts +84 -0
- package/dist/status-U-rUI79b.d.ts +84 -0
- package/dist/timeout-U5O4ESK3.js +12 -0
- package/dist/timeout-U5O4ESK3.js.map +1 -0
- package/dist/types-BB5Lw-pB.d.cts +442 -0
- package/dist/types-BB5Lw-pB.d.ts +442 -0
- package/dist/types-CJWIMJiZ.d.ts +548 -0
- package/dist/types-vCq7ShIm.d.cts +548 -0
- package/dist/utils/ai/browser.cjs +2169 -0
- package/dist/utils/ai/browser.cjs.map +1 -0
- package/dist/utils/ai/browser.d.cts +129 -0
- package/dist/utils/ai/browser.d.ts +129 -0
- package/dist/utils/ai/browser.js +255 -0
- package/dist/utils/ai/browser.js.map +1 -0
- package/dist/utils/ai/index.cjs +8468 -0
- package/dist/utils/ai/index.cjs.map +1 -0
- package/dist/utils/ai/index.d.cts +1777 -0
- package/dist/utils/ai/index.d.ts +1777 -0
- package/dist/utils/ai/index.js +173 -0
- package/dist/utils/ai/index.js.map +1 -0
- package/dist/utils/ai/node.cjs +648 -0
- package/dist/utils/ai/node.cjs.map +1 -0
- package/dist/utils/ai/node.d.cts +57 -0
- package/dist/utils/ai/node.d.ts +57 -0
- package/dist/utils/ai/node.js +84 -0
- package/dist/utils/ai/node.js.map +1 -0
- package/dist/utils/cqrs/index.cjs +1036 -0
- package/dist/utils/cqrs/index.cjs.map +1 -0
- package/dist/utils/cqrs/index.d.cts +438 -0
- package/dist/utils/cqrs/index.d.ts +438 -0
- package/dist/utils/cqrs/index.js +18 -0
- package/dist/utils/cqrs/index.js.map +1 -0
- package/dist/utils/demo-shell/index.cjs +865 -0
- package/dist/utils/demo-shell/index.cjs.map +1 -0
- package/dist/utils/demo-shell/index.d.cts +90 -0
- package/dist/utils/demo-shell/index.d.ts +90 -0
- package/dist/utils/demo-shell/index.js +13 -0
- package/dist/utils/demo-shell/index.js.map +1 -0
- package/dist/utils/domain-templates/index.cjs +732 -0
- package/dist/utils/domain-templates/index.cjs.map +1 -0
- package/dist/utils/domain-templates/index.d.cts +214 -0
- package/dist/utils/domain-templates/index.d.ts +214 -0
- package/dist/utils/domain-templates/index.js +17 -0
- package/dist/utils/domain-templates/index.js.map +1 -0
- package/dist/utils/graphspec/index.cjs +1174 -0
- package/dist/utils/graphspec/index.cjs.map +1 -0
- package/dist/utils/graphspec/index.d.cts +449 -0
- package/dist/utils/graphspec/index.d.ts +449 -0
- package/dist/utils/graphspec/index.js +35 -0
- package/dist/utils/graphspec/index.js.map +1 -0
- package/dist/utils/harness/index.cjs +656 -0
- package/dist/utils/harness/index.cjs.map +1 -0
- package/dist/utils/harness/index.d.cts +542 -0
- package/dist/utils/harness/index.d.ts +542 -0
- package/dist/utils/harness/index.js +56 -0
- package/dist/utils/harness/index.js.map +1 -0
- package/dist/utils/index.cjs +17609 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +96 -0
- package/dist/utils/index.d.ts +96 -0
- package/dist/utils/index.js +514 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/inspect/index.cjs +807 -0
- package/dist/utils/inspect/index.cjs.map +1 -0
- package/dist/utils/inspect/index.d.cts +123 -0
- package/dist/utils/inspect/index.d.ts +123 -0
- package/dist/utils/inspect/index.js +30 -0
- package/dist/utils/inspect/index.js.map +1 -0
- package/dist/utils/job-queue/index.cjs +717 -0
- package/dist/utils/job-queue/index.cjs.map +1 -0
- package/dist/utils/job-queue/index.d.cts +200 -0
- package/dist/utils/job-queue/index.d.ts +200 -0
- package/dist/utils/job-queue/index.js +18 -0
- package/dist/utils/job-queue/index.js.map +1 -0
- package/dist/utils/memory/index.cjs +1451 -0
- package/dist/utils/memory/index.cjs.map +1 -0
- package/dist/utils/memory/index.d.cts +582 -0
- package/dist/utils/memory/index.d.ts +582 -0
- package/dist/utils/memory/index.js +19 -0
- package/dist/utils/memory/index.js.map +1 -0
- package/dist/utils/messaging/index.cjs +666 -0
- package/dist/utils/messaging/index.cjs.map +1 -0
- package/dist/utils/messaging/index.d.cts +562 -0
- package/dist/utils/messaging/index.d.ts +562 -0
- package/dist/utils/messaging/index.js +50 -0
- package/dist/utils/messaging/index.js.map +1 -0
- package/dist/utils/orchestration/index.cjs +876 -0
- package/dist/utils/orchestration/index.cjs.map +1 -0
- package/dist/utils/orchestration/index.d.cts +233 -0
- package/dist/utils/orchestration/index.d.ts +233 -0
- package/dist/utils/orchestration/index.js +19 -0
- package/dist/utils/orchestration/index.js.map +1 -0
- package/dist/utils/process/index.cjs +743 -0
- package/dist/utils/process/index.cjs.map +1 -0
- package/dist/utils/process/index.d.cts +411 -0
- package/dist/utils/process/index.d.ts +411 -0
- package/dist/utils/process/index.js +14 -0
- package/dist/utils/process/index.js.map +1 -0
- package/dist/utils/reactive-layout/index.cjs +1607 -0
- package/dist/utils/reactive-layout/index.cjs.map +1 -0
- package/dist/utils/reactive-layout/index.d.cts +492 -0
- package/dist/utils/reactive-layout/index.d.ts +492 -0
- package/dist/utils/reactive-layout/index.js +52 -0
- package/dist/utils/reactive-layout/index.js.map +1 -0
- package/dist/utils/reduction/index.cjs +203 -0
- package/dist/utils/reduction/index.cjs.map +1 -0
- package/dist/utils/reduction/index.d.cts +102 -0
- package/dist/utils/reduction/index.d.ts +102 -0
- package/dist/utils/reduction/index.js +14 -0
- package/dist/utils/reduction/index.js.map +1 -0
- package/dist/utils/resilience/index.cjs +1617 -0
- package/dist/utils/resilience/index.cjs.map +1 -0
- package/dist/utils/resilience/index.d.cts +9 -0
- package/dist/utils/resilience/index.d.ts +9 -0
- package/dist/utils/resilience/index.js +44 -0
- package/dist/utils/resilience/index.js.map +1 -0
- package/dist/utils/surface/index.cjs +1070 -0
- package/dist/utils/surface/index.cjs.map +1 -0
- package/dist/utils/surface/index.d.cts +240 -0
- package/dist/utils/surface/index.d.ts +240 -0
- package/dist/utils/surface/index.js +30 -0
- package/dist/utils/surface/index.js.map +1 -0
- package/dist/utils/topology-view/index.cjs +620 -0
- package/dist/utils/topology-view/index.cjs.map +1 -0
- package/dist/utils/topology-view/index.d.cts +68 -0
- package/dist/utils/topology-view/index.d.ts +68 -0
- package/dist/utils/topology-view/index.js +11 -0
- package/dist/utils/topology-view/index.js.map +1 -0
- package/package.json +293 -237
- package/dist/core/index.cjs +0 -21
- package/dist/core/index.cjs.map +0 -1
- package/dist/core/index.d.cts +0 -1
- package/dist/core/index.d.ts +0 -1
- package/dist/core/index.js +0 -3
- package/dist/core/index.js.map +0 -1
- package/dist/extra/browser.cjs +0 -21
- package/dist/extra/browser.cjs.map +0 -1
- package/dist/extra/browser.d.cts +0 -1
- package/dist/extra/browser.d.ts +0 -1
- package/dist/extra/browser.js +0 -3
- package/dist/extra/browser.js.map +0 -1
- package/dist/extra/index.cjs +0 -21
- package/dist/extra/index.cjs.map +0 -1
- package/dist/extra/index.d.cts +0 -1
- package/dist/extra/index.d.ts +0 -1
- package/dist/extra/index.js +0 -3
- package/dist/extra/index.js.map +0 -1
- package/dist/extra/node.cjs +0 -21
- package/dist/extra/node.cjs.map +0 -1
- package/dist/extra/node.d.cts +0 -1
- package/dist/extra/node.d.ts +0 -1
- package/dist/extra/node.js +0 -3
- package/dist/extra/node.js.map +0 -1
- package/dist/extra/operators.cjs +0 -21
- package/dist/extra/operators.cjs.map +0 -1
- package/dist/extra/operators.d.cts +0 -1
- package/dist/extra/operators.d.ts +0 -1
- package/dist/extra/operators.js +0 -3
- package/dist/extra/operators.js.map +0 -1
- package/dist/extra/reactive.cjs +0 -21
- package/dist/extra/reactive.cjs.map +0 -1
- package/dist/extra/reactive.d.cts +0 -1
- package/dist/extra/reactive.d.ts +0 -1
- package/dist/extra/reactive.js +0 -3
- package/dist/extra/reactive.js.map +0 -1
- package/dist/extra/render/index.cjs +0 -21
- package/dist/extra/render/index.cjs.map +0 -1
- package/dist/extra/render/index.d.cts +0 -1
- package/dist/extra/render/index.d.ts +0 -1
- package/dist/extra/render/index.js +0 -3
- package/dist/extra/render/index.js.map +0 -1
- package/dist/extra/sources.cjs +0 -21
- package/dist/extra/sources.cjs.map +0 -1
- package/dist/extra/sources.d.cts +0 -1
- package/dist/extra/sources.d.ts +0 -1
- package/dist/extra/sources.js +0 -3
- package/dist/extra/sources.js.map +0 -1
- package/dist/extra/storage-browser.cjs +0 -21
- package/dist/extra/storage-browser.cjs.map +0 -1
- package/dist/extra/storage-browser.d.cts +0 -1
- package/dist/extra/storage-browser.d.ts +0 -1
- package/dist/extra/storage-browser.js +0 -3
- package/dist/extra/storage-browser.js.map +0 -1
- package/dist/extra/storage-core.cjs +0 -21
- package/dist/extra/storage-core.cjs.map +0 -1
- package/dist/extra/storage-core.d.cts +0 -1
- package/dist/extra/storage-core.d.ts +0 -1
- package/dist/extra/storage-core.js +0 -3
- package/dist/extra/storage-core.js.map +0 -1
- package/dist/extra/storage-node.cjs +0 -21
- package/dist/extra/storage-node.cjs.map +0 -1
- package/dist/extra/storage-node.d.cts +0 -1
- package/dist/extra/storage-node.d.ts +0 -1
- package/dist/extra/storage-node.js +0 -3
- package/dist/extra/storage-node.js.map +0 -1
- package/dist/extra/storage-tiers-browser.cjs +0 -21
- package/dist/extra/storage-tiers-browser.cjs.map +0 -1
- package/dist/extra/storage-tiers-browser.d.cts +0 -1
- package/dist/extra/storage-tiers-browser.d.ts +0 -1
- package/dist/extra/storage-tiers-browser.js +0 -3
- package/dist/extra/storage-tiers-browser.js.map +0 -1
- package/dist/extra/storage-tiers-node.cjs +0 -21
- package/dist/extra/storage-tiers-node.cjs.map +0 -1
- package/dist/extra/storage-tiers-node.d.cts +0 -1
- package/dist/extra/storage-tiers-node.d.ts +0 -1
- package/dist/extra/storage-tiers-node.js +0 -3
- package/dist/extra/storage-tiers-node.js.map +0 -1
- package/dist/extra/storage-tiers.cjs +0 -21
- package/dist/extra/storage-tiers.cjs.map +0 -1
- package/dist/extra/storage-tiers.d.cts +0 -1
- package/dist/extra/storage-tiers.d.ts +0 -1
- package/dist/extra/storage-tiers.js +0 -3
- package/dist/extra/storage-tiers.js.map +0 -1
- package/dist/extra/storage-wal.cjs +0 -21
- package/dist/extra/storage-wal.cjs.map +0 -1
- package/dist/extra/storage-wal.d.cts +0 -1
- package/dist/extra/storage-wal.d.ts +0 -1
- package/dist/extra/storage-wal.js +0 -3
- package/dist/extra/storage-wal.js.map +0 -1
- package/dist/graph/index.cjs +0 -21
- package/dist/graph/index.cjs.map +0 -1
- package/dist/graph/index.d.cts +0 -1
- package/dist/graph/index.d.ts +0 -1
- package/dist/graph/index.js +0 -3
- package/dist/graph/index.js.map +0 -1
- package/dist/patterns/ai/browser.cjs +0 -21
- package/dist/patterns/ai/browser.cjs.map +0 -1
- package/dist/patterns/ai/browser.d.cts +0 -1
- package/dist/patterns/ai/browser.d.ts +0 -1
- package/dist/patterns/ai/browser.js +0 -3
- package/dist/patterns/ai/browser.js.map +0 -1
- package/dist/patterns/ai/index.cjs +0 -21
- package/dist/patterns/ai/index.cjs.map +0 -1
- package/dist/patterns/ai/index.d.cts +0 -1
- package/dist/patterns/ai/index.d.ts +0 -1
- package/dist/patterns/ai/index.js +0 -3
- package/dist/patterns/ai/index.js.map +0 -1
- package/dist/patterns/ai/node.cjs +0 -21
- package/dist/patterns/ai/node.cjs.map +0 -1
- package/dist/patterns/ai/node.d.cts +0 -1
- package/dist/patterns/ai/node.d.ts +0 -1
- package/dist/patterns/ai/node.js +0 -3
- package/dist/patterns/ai/node.js.map +0 -1
- package/dist/patterns/cqrs/index.cjs +0 -21
- package/dist/patterns/cqrs/index.cjs.map +0 -1
- package/dist/patterns/cqrs/index.d.cts +0 -1
- package/dist/patterns/cqrs/index.d.ts +0 -1
- package/dist/patterns/cqrs/index.js +0 -3
- package/dist/patterns/cqrs/index.js.map +0 -1
- package/dist/patterns/demo-shell/index.cjs +0 -21
- package/dist/patterns/demo-shell/index.cjs.map +0 -1
- package/dist/patterns/demo-shell/index.d.cts +0 -1
- package/dist/patterns/demo-shell/index.d.ts +0 -1
- package/dist/patterns/demo-shell/index.js +0 -3
- package/dist/patterns/demo-shell/index.js.map +0 -1
- package/dist/patterns/domain-templates/index.cjs +0 -21
- package/dist/patterns/domain-templates/index.cjs.map +0 -1
- package/dist/patterns/domain-templates/index.d.cts +0 -1
- package/dist/patterns/domain-templates/index.d.ts +0 -1
- package/dist/patterns/domain-templates/index.js +0 -3
- package/dist/patterns/domain-templates/index.js.map +0 -1
- package/dist/patterns/graphspec/index.cjs +0 -21
- package/dist/patterns/graphspec/index.cjs.map +0 -1
- package/dist/patterns/graphspec/index.d.cts +0 -1
- package/dist/patterns/graphspec/index.d.ts +0 -1
- package/dist/patterns/graphspec/index.js +0 -3
- package/dist/patterns/graphspec/index.js.map +0 -1
- package/dist/patterns/harness/index.cjs +0 -21
- package/dist/patterns/harness/index.cjs.map +0 -1
- package/dist/patterns/harness/index.d.cts +0 -1
- package/dist/patterns/harness/index.d.ts +0 -1
- package/dist/patterns/harness/index.js +0 -3
- package/dist/patterns/harness/index.js.map +0 -1
- package/dist/patterns/inspect/index.cjs +0 -21
- package/dist/patterns/inspect/index.cjs.map +0 -1
- package/dist/patterns/inspect/index.d.cts +0 -1
- package/dist/patterns/inspect/index.d.ts +0 -1
- package/dist/patterns/inspect/index.js +0 -3
- package/dist/patterns/inspect/index.js.map +0 -1
- package/dist/patterns/job-queue/index.cjs +0 -21
- package/dist/patterns/job-queue/index.cjs.map +0 -1
- package/dist/patterns/job-queue/index.d.cts +0 -1
- package/dist/patterns/job-queue/index.d.ts +0 -1
- package/dist/patterns/job-queue/index.js +0 -3
- package/dist/patterns/job-queue/index.js.map +0 -1
- package/dist/patterns/memory/index.cjs +0 -21
- package/dist/patterns/memory/index.cjs.map +0 -1
- package/dist/patterns/memory/index.d.cts +0 -1
- package/dist/patterns/memory/index.d.ts +0 -1
- package/dist/patterns/memory/index.js +0 -3
- package/dist/patterns/memory/index.js.map +0 -1
- package/dist/patterns/messaging/index.cjs +0 -21
- package/dist/patterns/messaging/index.cjs.map +0 -1
- package/dist/patterns/messaging/index.d.cts +0 -1
- package/dist/patterns/messaging/index.d.ts +0 -1
- package/dist/patterns/messaging/index.js +0 -3
- package/dist/patterns/messaging/index.js.map +0 -1
- package/dist/patterns/orchestration/index.cjs +0 -21
- package/dist/patterns/orchestration/index.cjs.map +0 -1
- package/dist/patterns/orchestration/index.d.cts +0 -1
- package/dist/patterns/orchestration/index.d.ts +0 -1
- package/dist/patterns/orchestration/index.js +0 -3
- package/dist/patterns/orchestration/index.js.map +0 -1
- package/dist/patterns/process/index.cjs +0 -21
- package/dist/patterns/process/index.cjs.map +0 -1
- package/dist/patterns/process/index.d.cts +0 -1
- package/dist/patterns/process/index.d.ts +0 -1
- package/dist/patterns/process/index.js +0 -3
- package/dist/patterns/process/index.js.map +0 -1
- package/dist/patterns/reactive-layout/index.cjs +0 -21
- package/dist/patterns/reactive-layout/index.cjs.map +0 -1
- package/dist/patterns/reactive-layout/index.d.cts +0 -1
- package/dist/patterns/reactive-layout/index.d.ts +0 -1
- package/dist/patterns/reactive-layout/index.js +0 -3
- package/dist/patterns/reactive-layout/index.js.map +0 -1
- package/dist/patterns/reduction/index.cjs +0 -21
- package/dist/patterns/reduction/index.cjs.map +0 -1
- package/dist/patterns/reduction/index.d.cts +0 -1
- package/dist/patterns/reduction/index.d.ts +0 -1
- package/dist/patterns/reduction/index.js +0 -3
- package/dist/patterns/reduction/index.js.map +0 -1
- package/dist/patterns/surface/index.cjs +0 -21
- package/dist/patterns/surface/index.cjs.map +0 -1
- package/dist/patterns/surface/index.d.cts +0 -1
- package/dist/patterns/surface/index.d.ts +0 -1
- package/dist/patterns/surface/index.js +0 -3
- package/dist/patterns/surface/index.js.map +0 -1
- package/dist/patterns/topology-view/index.cjs +0 -21
- package/dist/patterns/topology-view/index.cjs.map +0 -1
- package/dist/patterns/topology-view/index.d.cts +0 -1
- package/dist/patterns/topology-view/index.d.ts +0 -1
- package/dist/patterns/topology-view/index.js +0 -3
- package/dist/patterns/topology-view/index.js.map +0 -1
- package/dist/testing/index.cjs +0 -21
- package/dist/testing/index.cjs.map +0 -1
- package/dist/testing/index.d.cts +0 -1
- package/dist/testing/index.d.ts +0 -1
- package/dist/testing/index.js +0 -3
- package/dist/testing/index.js.map +0 -1
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { Actor, Node, PolicyRuleData, GuardAction } from '@graphrefly/pure-ts/core';
|
|
2
|
+
import { Graph, GraphOptions, GraphPersistSnapshot } from '@graphrefly/pure-ts/graph';
|
|
3
|
+
import { TopicGraph } from './utils/messaging/index.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Audit, policy enforcement, and compliance export (roadmap §9.2).
|
|
7
|
+
*
|
|
8
|
+
* Three composed factories that wrap any {@link Graph} with the harness
|
|
9
|
+
* accountability layer:
|
|
10
|
+
*
|
|
11
|
+
* - {@link auditTrail} — reactive mutation log with by-node/by-actor/by-time
|
|
12
|
+
* queries.
|
|
13
|
+
* - {@link policyGate} — reactive ABAC gate (Tier 2.3 rename of
|
|
14
|
+
* `policyEnforcer`); in `"audit"` mode records would-be denials, in
|
|
15
|
+
* `"enforce"` mode pushes guards onto target nodes so subsequent writes
|
|
16
|
+
* throw {@link GuardDenied}.
|
|
17
|
+
* - {@link complianceSnapshot} — point-in-time export of graph state +
|
|
18
|
+
* audit trail + policies for regulatory archival.
|
|
19
|
+
*
|
|
20
|
+
* @module
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/** A single recorded mutation/event in an {@link AuditTrailGraph}. */
|
|
24
|
+
interface AuditEntry {
|
|
25
|
+
seq: number;
|
|
26
|
+
timestamp_ns: number;
|
|
27
|
+
wall_clock_ns: number;
|
|
28
|
+
path: string;
|
|
29
|
+
type: "data" | "dirty" | "resolved" | "invalidate" | "pause" | "resume" | "complete" | "error" | "teardown";
|
|
30
|
+
actor?: Actor;
|
|
31
|
+
value?: unknown;
|
|
32
|
+
error?: unknown;
|
|
33
|
+
annotation?: string;
|
|
34
|
+
}
|
|
35
|
+
/** Options for {@link auditTrail}. */
|
|
36
|
+
interface AuditTrailOptions {
|
|
37
|
+
name?: string;
|
|
38
|
+
graph?: GraphOptions;
|
|
39
|
+
/** Ring-buffer cap for the underlying `reactiveLog`. Default: unbounded. */
|
|
40
|
+
maxSize?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Which event types to record. Default: `["data", "error", "complete",
|
|
43
|
+
* "teardown"]` — the user-meaningful set. Opt in to mid-wave protocol
|
|
44
|
+
* events (`"dirty"`, `"resolved"`, `"invalidate"`, `"pause"`, `"resume"`)
|
|
45
|
+
* by listing them explicitly. Note: those tier-1/tier-2 events do not
|
|
46
|
+
* carry an `actor` (no `lastMutation` populated) — record them only for
|
|
47
|
+
* protocol-level diagnostics.
|
|
48
|
+
*/
|
|
49
|
+
includeTypes?: readonly AuditEntry["type"][];
|
|
50
|
+
/** Per-event filter; return false to skip. */
|
|
51
|
+
filter?: (entry: AuditEntry) => boolean;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Mounted audit log — `entries` exposes the reactive `AuditEntry[]`; query
|
|
55
|
+
* helpers are sync convenience wrappers over the cached snapshot.
|
|
56
|
+
*/
|
|
57
|
+
declare class AuditTrailGraph extends Graph {
|
|
58
|
+
readonly entries: Node<readonly AuditEntry[]>;
|
|
59
|
+
readonly count: Node<number>;
|
|
60
|
+
/**
|
|
61
|
+
* Effective set of event types this trail records (EH-18). Reflects
|
|
62
|
+
* either the caller-supplied `opts.includeTypes` or the default set
|
|
63
|
+
* (`["data", "error", "complete", "teardown"]`). Captured at construction
|
|
64
|
+
* — each instance owns its own clone, so a default-using trail can never
|
|
65
|
+
* leak mutations into the module-level default set.
|
|
66
|
+
*
|
|
67
|
+
* **Mutation contract.** Type-system read-only via `ReadonlySet`. Runtime
|
|
68
|
+
* mutation through an unsafe cast (`(audit.includeTypes as Set<...>)
|
|
69
|
+
* .add(...)`) is unsupported — it would desync the field from the
|
|
70
|
+
* recording closure, which captured the original `Set` reference at
|
|
71
|
+
* construction. The runtime does NOT enforce immutability beyond the
|
|
72
|
+
* type contract; consumers must respect it.
|
|
73
|
+
*
|
|
74
|
+
* Use this to validate that a `complianceSnapshot.fingerprint` was
|
|
75
|
+
* computed against the same recording surface — fingerprints are stable
|
|
76
|
+
* only when the recording set is identical across snapshots.
|
|
77
|
+
*/
|
|
78
|
+
readonly includeTypes: ReadonlySet<AuditEntry["type"]>;
|
|
79
|
+
private readonly _log;
|
|
80
|
+
private readonly _target;
|
|
81
|
+
constructor(target: Graph, opts: AuditTrailOptions);
|
|
82
|
+
/** All entries currently in the ring (snapshot). */
|
|
83
|
+
all(): readonly AuditEntry[];
|
|
84
|
+
/** Entries matching `path`. Order preserved. */
|
|
85
|
+
byNode(path: string): readonly AuditEntry[];
|
|
86
|
+
/** Entries whose `actor.id` matches. Use `byActorType` for type filtering. */
|
|
87
|
+
byActor(actorId: string): readonly AuditEntry[];
|
|
88
|
+
/** Entries whose `actor.type` matches (e.g. `"llm"`, `"human"`). */
|
|
89
|
+
byActorType(type: string): readonly AuditEntry[];
|
|
90
|
+
/**
|
|
91
|
+
* Entries with `timestamp_ns` in `[start_ns, end_ns)` (end exclusive).
|
|
92
|
+
* Omit `end_ns` to query open-ended.
|
|
93
|
+
*/
|
|
94
|
+
byTimeRange(start_ns: number, end_ns?: number): readonly AuditEntry[];
|
|
95
|
+
/** Reference to the audited graph (escape hatch for tooling). */
|
|
96
|
+
get target(): Graph;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Wraps any {@link Graph} with a reactive audit trail recording every event
|
|
100
|
+
* matching `includeTypes` (default: data + error + complete + teardown).
|
|
101
|
+
*
|
|
102
|
+
* Each entry carries `seq`, `timestamp_ns` (monotonic), `wall_clock_ns`,
|
|
103
|
+
* `path`, `type`, and — when available — `actor`, `value`, `error`, and the
|
|
104
|
+
* `graph.trace()` reasoning annotation for the path.
|
|
105
|
+
*
|
|
106
|
+
* The returned graph mounts an `entries` node + `count` derived. Query
|
|
107
|
+
* helpers (`byNode`, `byActor`, `byTimeRange`) operate on the cached
|
|
108
|
+
* snapshot synchronously.
|
|
109
|
+
*/
|
|
110
|
+
declare function auditTrail(target: Graph, opts?: AuditTrailOptions): AuditTrailGraph;
|
|
111
|
+
/** A single policy denial recorded by {@link PolicyGateGraph}. */
|
|
112
|
+
interface PolicyViolation {
|
|
113
|
+
timestamp_ns: number;
|
|
114
|
+
wall_clock_ns: number;
|
|
115
|
+
path: string;
|
|
116
|
+
actor: Actor;
|
|
117
|
+
action: GuardAction;
|
|
118
|
+
mode: "audit" | "enforce";
|
|
119
|
+
/** `"observed"` (audit mode after-the-fact) or `"blocked"` (enforce mode pre-write). */
|
|
120
|
+
result: "observed" | "blocked";
|
|
121
|
+
}
|
|
122
|
+
/** Options for {@link policyGate}. */
|
|
123
|
+
interface PolicyGateOptions {
|
|
124
|
+
name?: string;
|
|
125
|
+
graph?: GraphOptions;
|
|
126
|
+
/**
|
|
127
|
+
* `"audit"` (default) — observe events and record would-be denials;
|
|
128
|
+
* does not block writes. Audit mode requires `lastMutation` attribution
|
|
129
|
+
* on the audited node — anonymous/internal writes (no `actor` passed,
|
|
130
|
+
* unguarded node) are skipped silently because the policy cannot be
|
|
131
|
+
* evaluated without an actor.
|
|
132
|
+
*
|
|
133
|
+
* `"enforce"` — push guards onto target nodes so disallowed writes
|
|
134
|
+
* throw {@link GuardDenied}. Reverted on dispose.
|
|
135
|
+
*/
|
|
136
|
+
mode?: "audit" | "enforce";
|
|
137
|
+
/**
|
|
138
|
+
* Restrict enforcement to specific node paths (qualified). When omitted,
|
|
139
|
+
* applies to every node visible in `target.describe()` at construction
|
|
140
|
+
* time (subgraphs are walked transitively) AND subscribes to the full
|
|
141
|
+
* topology tree via {@link watchTopologyTree}, so nodes added to
|
|
142
|
+
* `target` OR any transitively-mounted subgraph after construction are
|
|
143
|
+
* guarded automatically (enforce mode only).
|
|
144
|
+
*
|
|
145
|
+
* Accepts a static `readonly string[]` or a reactive
|
|
146
|
+
* `Node<readonly string[]>` (Tier 3.4 — F.9 reactive primitive carve-out).
|
|
147
|
+
* When a `Node` is passed, the enforcer rebinds the guarded path set on
|
|
148
|
+
* every emission: paths added to the new set get wrapped, paths removed
|
|
149
|
+
* from the new set get released, and the audit-mode allow-list filter
|
|
150
|
+
* uses the latest cached value. Static-array callers retain the current
|
|
151
|
+
* "caller owns the path set" semantics.
|
|
152
|
+
*
|
|
153
|
+
* **Cost:** unrestricted mode runs `describe({detail:"minimal"})` once
|
|
154
|
+
* at construction (O(N) over the graph tree) plus one topology
|
|
155
|
+
* subscription per graph instance in the mount tree. Restricted mode
|
|
156
|
+
* (static or reactive) skips both and disables `watchTopologyTree`
|
|
157
|
+
* dynamic coverage — for reactive callers, the path-set Node is the
|
|
158
|
+
* single source of truth for which paths are guarded.
|
|
159
|
+
*/
|
|
160
|
+
paths?: readonly string[] | Node<readonly string[]>;
|
|
161
|
+
/**
|
|
162
|
+
* Ring-buffer cap for the violations topic. Default: 1000. Static
|
|
163
|
+
* number only — reactive form is deferred pending TopicGraph reactive
|
|
164
|
+
* `retainedLimit` support (see Tier 10.8 design follow-up in
|
|
165
|
+
* `docs/optimizations.md`).
|
|
166
|
+
*/
|
|
167
|
+
violationsLimit?: number;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Reactive ABAC enforcement layer. Policies are reactive — pass a
|
|
171
|
+
* `Node<readonly PolicyRuleData[]>` to allow LLMs (or any reactive source)
|
|
172
|
+
* to update them at runtime; the enforcer rebinds its internal
|
|
173
|
+
* {@link NodeGuard} on every push.
|
|
174
|
+
*/
|
|
175
|
+
declare class PolicyGateGraph extends Graph {
|
|
176
|
+
readonly policies: Node<readonly PolicyRuleData[]>;
|
|
177
|
+
readonly violations: TopicGraph<PolicyViolation>;
|
|
178
|
+
readonly violationCount: Node<number>;
|
|
179
|
+
private readonly _target;
|
|
180
|
+
private readonly _mode;
|
|
181
|
+
private _currentGuard;
|
|
182
|
+
constructor(target: Graph, policies: readonly PolicyRuleData[] | Node<readonly PolicyRuleData[]>, opts: PolicyGateOptions);
|
|
183
|
+
private _publishViolation;
|
|
184
|
+
/** Snapshot of recorded violations. */
|
|
185
|
+
all(): readonly PolicyViolation[];
|
|
186
|
+
get mode(): "audit" | "enforce";
|
|
187
|
+
get target(): Graph;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Wraps a {@link Graph} with reactive policy enforcement. Pass either a
|
|
191
|
+
* static rule list or a {@link Node} of rules (LLM-updatable). Records
|
|
192
|
+
* `PolicyViolation` entries to `violations` topic; in `"enforce"` mode also
|
|
193
|
+
* pushes guards onto target nodes so disallowed writes throw.
|
|
194
|
+
*
|
|
195
|
+
* Self-tags via `g.tagFactory("policyGate", placeholderArgs(opts))` so
|
|
196
|
+
* `graph.describe()` surfaces `factory: "policyGate"` provenance (Phase 2.5
|
|
197
|
+
* DT5 ride-along, locked with the Tier 2.3 rename).
|
|
198
|
+
*/
|
|
199
|
+
declare function policyGate(target: Graph, policies: readonly PolicyRuleData[] | Node<readonly PolicyRuleData[]>, opts?: PolicyGateOptions): PolicyGateGraph;
|
|
200
|
+
/** Options for {@link complianceSnapshot}. */
|
|
201
|
+
interface ComplianceSnapshotOptions {
|
|
202
|
+
audit?: AuditTrailGraph;
|
|
203
|
+
policies?: PolicyGateGraph;
|
|
204
|
+
/** Actor recorded as the snapshot taker. */
|
|
205
|
+
actor?: Actor;
|
|
206
|
+
}
|
|
207
|
+
/** Output of {@link complianceSnapshot}. JSON-serializable. */
|
|
208
|
+
interface ComplianceSnapshotResult {
|
|
209
|
+
format_version: 1;
|
|
210
|
+
timestamp_ns: number;
|
|
211
|
+
wall_clock_ns: number;
|
|
212
|
+
actor?: Actor;
|
|
213
|
+
graph: GraphPersistSnapshot;
|
|
214
|
+
audit?: {
|
|
215
|
+
count: number;
|
|
216
|
+
entries: AuditEntry[];
|
|
217
|
+
};
|
|
218
|
+
policies?: {
|
|
219
|
+
mode: "audit" | "enforce";
|
|
220
|
+
rules: readonly PolicyRuleData[];
|
|
221
|
+
violations: readonly PolicyViolation[];
|
|
222
|
+
};
|
|
223
|
+
/**
|
|
224
|
+
* Truncated SHA-256 hex (16 chars / ~64 bits) over a canonical encoding
|
|
225
|
+
* of every field above (excluding `fingerprint` itself). Deterministic
|
|
226
|
+
* across runs given identical inputs. Suitable for casual tamper-evidence
|
|
227
|
+
* and content-addressed dedup; for full cryptographic strength, hash the
|
|
228
|
+
* canonical JSON externally with Web Crypto / Node `crypto`.
|
|
229
|
+
*/
|
|
230
|
+
fingerprint: string;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* One-shot point-in-time export of a {@link Graph}'s state plus optional
|
|
234
|
+
* audit + policy bundles. Returns a JSON-serializable object with a
|
|
235
|
+
* deterministic truncated-SHA-256 {@link ComplianceSnapshotResult.fingerprint}
|
|
236
|
+
* over the canonical payload for tamper-evidence in regulatory archival.
|
|
237
|
+
*
|
|
238
|
+
* **Cryptographic strength:** the fingerprint is truncated to 64 bits for
|
|
239
|
+
* compact archival. Collision-resistant for casual integrity checks but NOT
|
|
240
|
+
* sufficient for adversarial tamper-evidence — pair with a full SHA-256
|
|
241
|
+
* (or stronger) over the canonical JSON when regulatory requirements demand
|
|
242
|
+
* collision resistance.
|
|
243
|
+
*/
|
|
244
|
+
declare function complianceSnapshot(target: Graph, opts?: ComplianceSnapshotOptions): ComplianceSnapshotResult;
|
|
245
|
+
|
|
246
|
+
export { type AuditEntry as A, type ComplianceSnapshotOptions as C, PolicyGateGraph as P, AuditTrailGraph as a, type AuditTrailOptions as b, type ComplianceSnapshotResult as c, type PolicyGateOptions as d, type PolicyViolation as e, auditTrail as f, complianceSnapshot as g, policyGate as p };
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { Actor, Node, PolicyRuleData, GuardAction } from '@graphrefly/pure-ts/core';
|
|
2
|
+
import { Graph, GraphOptions, GraphPersistSnapshot } from '@graphrefly/pure-ts/graph';
|
|
3
|
+
import { TopicGraph } from './utils/messaging/index.cjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Audit, policy enforcement, and compliance export (roadmap §9.2).
|
|
7
|
+
*
|
|
8
|
+
* Three composed factories that wrap any {@link Graph} with the harness
|
|
9
|
+
* accountability layer:
|
|
10
|
+
*
|
|
11
|
+
* - {@link auditTrail} — reactive mutation log with by-node/by-actor/by-time
|
|
12
|
+
* queries.
|
|
13
|
+
* - {@link policyGate} — reactive ABAC gate (Tier 2.3 rename of
|
|
14
|
+
* `policyEnforcer`); in `"audit"` mode records would-be denials, in
|
|
15
|
+
* `"enforce"` mode pushes guards onto target nodes so subsequent writes
|
|
16
|
+
* throw {@link GuardDenied}.
|
|
17
|
+
* - {@link complianceSnapshot} — point-in-time export of graph state +
|
|
18
|
+
* audit trail + policies for regulatory archival.
|
|
19
|
+
*
|
|
20
|
+
* @module
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/** A single recorded mutation/event in an {@link AuditTrailGraph}. */
|
|
24
|
+
interface AuditEntry {
|
|
25
|
+
seq: number;
|
|
26
|
+
timestamp_ns: number;
|
|
27
|
+
wall_clock_ns: number;
|
|
28
|
+
path: string;
|
|
29
|
+
type: "data" | "dirty" | "resolved" | "invalidate" | "pause" | "resume" | "complete" | "error" | "teardown";
|
|
30
|
+
actor?: Actor;
|
|
31
|
+
value?: unknown;
|
|
32
|
+
error?: unknown;
|
|
33
|
+
annotation?: string;
|
|
34
|
+
}
|
|
35
|
+
/** Options for {@link auditTrail}. */
|
|
36
|
+
interface AuditTrailOptions {
|
|
37
|
+
name?: string;
|
|
38
|
+
graph?: GraphOptions;
|
|
39
|
+
/** Ring-buffer cap for the underlying `reactiveLog`. Default: unbounded. */
|
|
40
|
+
maxSize?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Which event types to record. Default: `["data", "error", "complete",
|
|
43
|
+
* "teardown"]` — the user-meaningful set. Opt in to mid-wave protocol
|
|
44
|
+
* events (`"dirty"`, `"resolved"`, `"invalidate"`, `"pause"`, `"resume"`)
|
|
45
|
+
* by listing them explicitly. Note: those tier-1/tier-2 events do not
|
|
46
|
+
* carry an `actor` (no `lastMutation` populated) — record them only for
|
|
47
|
+
* protocol-level diagnostics.
|
|
48
|
+
*/
|
|
49
|
+
includeTypes?: readonly AuditEntry["type"][];
|
|
50
|
+
/** Per-event filter; return false to skip. */
|
|
51
|
+
filter?: (entry: AuditEntry) => boolean;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Mounted audit log — `entries` exposes the reactive `AuditEntry[]`; query
|
|
55
|
+
* helpers are sync convenience wrappers over the cached snapshot.
|
|
56
|
+
*/
|
|
57
|
+
declare class AuditTrailGraph extends Graph {
|
|
58
|
+
readonly entries: Node<readonly AuditEntry[]>;
|
|
59
|
+
readonly count: Node<number>;
|
|
60
|
+
/**
|
|
61
|
+
* Effective set of event types this trail records (EH-18). Reflects
|
|
62
|
+
* either the caller-supplied `opts.includeTypes` or the default set
|
|
63
|
+
* (`["data", "error", "complete", "teardown"]`). Captured at construction
|
|
64
|
+
* — each instance owns its own clone, so a default-using trail can never
|
|
65
|
+
* leak mutations into the module-level default set.
|
|
66
|
+
*
|
|
67
|
+
* **Mutation contract.** Type-system read-only via `ReadonlySet`. Runtime
|
|
68
|
+
* mutation through an unsafe cast (`(audit.includeTypes as Set<...>)
|
|
69
|
+
* .add(...)`) is unsupported — it would desync the field from the
|
|
70
|
+
* recording closure, which captured the original `Set` reference at
|
|
71
|
+
* construction. The runtime does NOT enforce immutability beyond the
|
|
72
|
+
* type contract; consumers must respect it.
|
|
73
|
+
*
|
|
74
|
+
* Use this to validate that a `complianceSnapshot.fingerprint` was
|
|
75
|
+
* computed against the same recording surface — fingerprints are stable
|
|
76
|
+
* only when the recording set is identical across snapshots.
|
|
77
|
+
*/
|
|
78
|
+
readonly includeTypes: ReadonlySet<AuditEntry["type"]>;
|
|
79
|
+
private readonly _log;
|
|
80
|
+
private readonly _target;
|
|
81
|
+
constructor(target: Graph, opts: AuditTrailOptions);
|
|
82
|
+
/** All entries currently in the ring (snapshot). */
|
|
83
|
+
all(): readonly AuditEntry[];
|
|
84
|
+
/** Entries matching `path`. Order preserved. */
|
|
85
|
+
byNode(path: string): readonly AuditEntry[];
|
|
86
|
+
/** Entries whose `actor.id` matches. Use `byActorType` for type filtering. */
|
|
87
|
+
byActor(actorId: string): readonly AuditEntry[];
|
|
88
|
+
/** Entries whose `actor.type` matches (e.g. `"llm"`, `"human"`). */
|
|
89
|
+
byActorType(type: string): readonly AuditEntry[];
|
|
90
|
+
/**
|
|
91
|
+
* Entries with `timestamp_ns` in `[start_ns, end_ns)` (end exclusive).
|
|
92
|
+
* Omit `end_ns` to query open-ended.
|
|
93
|
+
*/
|
|
94
|
+
byTimeRange(start_ns: number, end_ns?: number): readonly AuditEntry[];
|
|
95
|
+
/** Reference to the audited graph (escape hatch for tooling). */
|
|
96
|
+
get target(): Graph;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Wraps any {@link Graph} with a reactive audit trail recording every event
|
|
100
|
+
* matching `includeTypes` (default: data + error + complete + teardown).
|
|
101
|
+
*
|
|
102
|
+
* Each entry carries `seq`, `timestamp_ns` (monotonic), `wall_clock_ns`,
|
|
103
|
+
* `path`, `type`, and — when available — `actor`, `value`, `error`, and the
|
|
104
|
+
* `graph.trace()` reasoning annotation for the path.
|
|
105
|
+
*
|
|
106
|
+
* The returned graph mounts an `entries` node + `count` derived. Query
|
|
107
|
+
* helpers (`byNode`, `byActor`, `byTimeRange`) operate on the cached
|
|
108
|
+
* snapshot synchronously.
|
|
109
|
+
*/
|
|
110
|
+
declare function auditTrail(target: Graph, opts?: AuditTrailOptions): AuditTrailGraph;
|
|
111
|
+
/** A single policy denial recorded by {@link PolicyGateGraph}. */
|
|
112
|
+
interface PolicyViolation {
|
|
113
|
+
timestamp_ns: number;
|
|
114
|
+
wall_clock_ns: number;
|
|
115
|
+
path: string;
|
|
116
|
+
actor: Actor;
|
|
117
|
+
action: GuardAction;
|
|
118
|
+
mode: "audit" | "enforce";
|
|
119
|
+
/** `"observed"` (audit mode after-the-fact) or `"blocked"` (enforce mode pre-write). */
|
|
120
|
+
result: "observed" | "blocked";
|
|
121
|
+
}
|
|
122
|
+
/** Options for {@link policyGate}. */
|
|
123
|
+
interface PolicyGateOptions {
|
|
124
|
+
name?: string;
|
|
125
|
+
graph?: GraphOptions;
|
|
126
|
+
/**
|
|
127
|
+
* `"audit"` (default) — observe events and record would-be denials;
|
|
128
|
+
* does not block writes. Audit mode requires `lastMutation` attribution
|
|
129
|
+
* on the audited node — anonymous/internal writes (no `actor` passed,
|
|
130
|
+
* unguarded node) are skipped silently because the policy cannot be
|
|
131
|
+
* evaluated without an actor.
|
|
132
|
+
*
|
|
133
|
+
* `"enforce"` — push guards onto target nodes so disallowed writes
|
|
134
|
+
* throw {@link GuardDenied}. Reverted on dispose.
|
|
135
|
+
*/
|
|
136
|
+
mode?: "audit" | "enforce";
|
|
137
|
+
/**
|
|
138
|
+
* Restrict enforcement to specific node paths (qualified). When omitted,
|
|
139
|
+
* applies to every node visible in `target.describe()` at construction
|
|
140
|
+
* time (subgraphs are walked transitively) AND subscribes to the full
|
|
141
|
+
* topology tree via {@link watchTopologyTree}, so nodes added to
|
|
142
|
+
* `target` OR any transitively-mounted subgraph after construction are
|
|
143
|
+
* guarded automatically (enforce mode only).
|
|
144
|
+
*
|
|
145
|
+
* Accepts a static `readonly string[]` or a reactive
|
|
146
|
+
* `Node<readonly string[]>` (Tier 3.4 — F.9 reactive primitive carve-out).
|
|
147
|
+
* When a `Node` is passed, the enforcer rebinds the guarded path set on
|
|
148
|
+
* every emission: paths added to the new set get wrapped, paths removed
|
|
149
|
+
* from the new set get released, and the audit-mode allow-list filter
|
|
150
|
+
* uses the latest cached value. Static-array callers retain the current
|
|
151
|
+
* "caller owns the path set" semantics.
|
|
152
|
+
*
|
|
153
|
+
* **Cost:** unrestricted mode runs `describe({detail:"minimal"})` once
|
|
154
|
+
* at construction (O(N) over the graph tree) plus one topology
|
|
155
|
+
* subscription per graph instance in the mount tree. Restricted mode
|
|
156
|
+
* (static or reactive) skips both and disables `watchTopologyTree`
|
|
157
|
+
* dynamic coverage — for reactive callers, the path-set Node is the
|
|
158
|
+
* single source of truth for which paths are guarded.
|
|
159
|
+
*/
|
|
160
|
+
paths?: readonly string[] | Node<readonly string[]>;
|
|
161
|
+
/**
|
|
162
|
+
* Ring-buffer cap for the violations topic. Default: 1000. Static
|
|
163
|
+
* number only — reactive form is deferred pending TopicGraph reactive
|
|
164
|
+
* `retainedLimit` support (see Tier 10.8 design follow-up in
|
|
165
|
+
* `docs/optimizations.md`).
|
|
166
|
+
*/
|
|
167
|
+
violationsLimit?: number;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Reactive ABAC enforcement layer. Policies are reactive — pass a
|
|
171
|
+
* `Node<readonly PolicyRuleData[]>` to allow LLMs (or any reactive source)
|
|
172
|
+
* to update them at runtime; the enforcer rebinds its internal
|
|
173
|
+
* {@link NodeGuard} on every push.
|
|
174
|
+
*/
|
|
175
|
+
declare class PolicyGateGraph extends Graph {
|
|
176
|
+
readonly policies: Node<readonly PolicyRuleData[]>;
|
|
177
|
+
readonly violations: TopicGraph<PolicyViolation>;
|
|
178
|
+
readonly violationCount: Node<number>;
|
|
179
|
+
private readonly _target;
|
|
180
|
+
private readonly _mode;
|
|
181
|
+
private _currentGuard;
|
|
182
|
+
constructor(target: Graph, policies: readonly PolicyRuleData[] | Node<readonly PolicyRuleData[]>, opts: PolicyGateOptions);
|
|
183
|
+
private _publishViolation;
|
|
184
|
+
/** Snapshot of recorded violations. */
|
|
185
|
+
all(): readonly PolicyViolation[];
|
|
186
|
+
get mode(): "audit" | "enforce";
|
|
187
|
+
get target(): Graph;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Wraps a {@link Graph} with reactive policy enforcement. Pass either a
|
|
191
|
+
* static rule list or a {@link Node} of rules (LLM-updatable). Records
|
|
192
|
+
* `PolicyViolation` entries to `violations` topic; in `"enforce"` mode also
|
|
193
|
+
* pushes guards onto target nodes so disallowed writes throw.
|
|
194
|
+
*
|
|
195
|
+
* Self-tags via `g.tagFactory("policyGate", placeholderArgs(opts))` so
|
|
196
|
+
* `graph.describe()` surfaces `factory: "policyGate"` provenance (Phase 2.5
|
|
197
|
+
* DT5 ride-along, locked with the Tier 2.3 rename).
|
|
198
|
+
*/
|
|
199
|
+
declare function policyGate(target: Graph, policies: readonly PolicyRuleData[] | Node<readonly PolicyRuleData[]>, opts?: PolicyGateOptions): PolicyGateGraph;
|
|
200
|
+
/** Options for {@link complianceSnapshot}. */
|
|
201
|
+
interface ComplianceSnapshotOptions {
|
|
202
|
+
audit?: AuditTrailGraph;
|
|
203
|
+
policies?: PolicyGateGraph;
|
|
204
|
+
/** Actor recorded as the snapshot taker. */
|
|
205
|
+
actor?: Actor;
|
|
206
|
+
}
|
|
207
|
+
/** Output of {@link complianceSnapshot}. JSON-serializable. */
|
|
208
|
+
interface ComplianceSnapshotResult {
|
|
209
|
+
format_version: 1;
|
|
210
|
+
timestamp_ns: number;
|
|
211
|
+
wall_clock_ns: number;
|
|
212
|
+
actor?: Actor;
|
|
213
|
+
graph: GraphPersistSnapshot;
|
|
214
|
+
audit?: {
|
|
215
|
+
count: number;
|
|
216
|
+
entries: AuditEntry[];
|
|
217
|
+
};
|
|
218
|
+
policies?: {
|
|
219
|
+
mode: "audit" | "enforce";
|
|
220
|
+
rules: readonly PolicyRuleData[];
|
|
221
|
+
violations: readonly PolicyViolation[];
|
|
222
|
+
};
|
|
223
|
+
/**
|
|
224
|
+
* Truncated SHA-256 hex (16 chars / ~64 bits) over a canonical encoding
|
|
225
|
+
* of every field above (excluding `fingerprint` itself). Deterministic
|
|
226
|
+
* across runs given identical inputs. Suitable for casual tamper-evidence
|
|
227
|
+
* and content-addressed dedup; for full cryptographic strength, hash the
|
|
228
|
+
* canonical JSON externally with Web Crypto / Node `crypto`.
|
|
229
|
+
*/
|
|
230
|
+
fingerprint: string;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* One-shot point-in-time export of a {@link Graph}'s state plus optional
|
|
234
|
+
* audit + policy bundles. Returns a JSON-serializable object with a
|
|
235
|
+
* deterministic truncated-SHA-256 {@link ComplianceSnapshotResult.fingerprint}
|
|
236
|
+
* over the canonical payload for tamper-evidence in regulatory archival.
|
|
237
|
+
*
|
|
238
|
+
* **Cryptographic strength:** the fingerprint is truncated to 64 bits for
|
|
239
|
+
* compact archival. Collision-resistant for casual integrity checks but NOT
|
|
240
|
+
* sufficient for adversarial tamper-evidence — pair with a full SHA-256
|
|
241
|
+
* (or stronger) over the canonical JSON when regulatory requirements demand
|
|
242
|
+
* collision resistance.
|
|
243
|
+
*/
|
|
244
|
+
declare function complianceSnapshot(target: Graph, opts?: ComplianceSnapshotOptions): ComplianceSnapshotResult;
|
|
245
|
+
|
|
246
|
+
export { type AuditEntry as A, type ComplianceSnapshotOptions as C, PolicyGateGraph as P, AuditTrailGraph as a, type AuditTrailOptions as b, type ComplianceSnapshotResult as c, type PolicyGateOptions as d, type PolicyViolation as e, auditTrail as f, complianceSnapshot as g, policyGate as p };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NS_PER_MS,
|
|
3
|
+
NS_PER_SEC,
|
|
4
|
+
constant,
|
|
5
|
+
decorrelatedJitter,
|
|
6
|
+
exponential,
|
|
7
|
+
fibonacci,
|
|
8
|
+
linear,
|
|
9
|
+
resolveBackoffPreset,
|
|
10
|
+
withMaxAttempts
|
|
11
|
+
} from "./chunk-P5LBT622.js";
|
|
12
|
+
import "./chunk-AZDQPQ3V.js";
|
|
13
|
+
export {
|
|
14
|
+
NS_PER_MS,
|
|
15
|
+
NS_PER_SEC,
|
|
16
|
+
constant,
|
|
17
|
+
decorrelatedJitter,
|
|
18
|
+
exponential,
|
|
19
|
+
fibonacci,
|
|
20
|
+
linear,
|
|
21
|
+
resolveBackoffPreset,
|
|
22
|
+
withMaxAttempts
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=backoff-7KIK3WQW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const NS_PER_SEC = 1000000000;
|
|
2
|
+
type BackoffPreset = "constant" | "linear" | "exponential" | "fibonacci" | "decorrelatedJitter";
|
|
3
|
+
/** `(attempt, error?, previousDelayNs?) => delayNs | null` — `null` means zero delay. */
|
|
4
|
+
type BackoffStrategy = (attempt: number, error?: unknown, prevDelayNs?: number | null) => number | null;
|
|
5
|
+
|
|
6
|
+
export { type BackoffStrategy as B, NS_PER_SEC as N, type BackoffPreset as a };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const NS_PER_SEC = 1000000000;
|
|
2
|
+
type BackoffPreset = "constant" | "linear" | "exponential" | "fibonacci" | "decorrelatedJitter";
|
|
3
|
+
/** `(attempt, error?, previousDelayNs?) => delayNs | null` — `null` means zero delay. */
|
|
4
|
+
type BackoffStrategy = (attempt: number, error?: unknown, prevDelayNs?: number | null) => number | null;
|
|
5
|
+
|
|
6
|
+
export { type BackoffStrategy as B, NS_PER_SEC as N, type BackoffPreset as a };
|