@graphrefly/graphrefly 0.44.0 → 0.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -19
- package/dist/_internal-B23BagFd.d.cts +33 -0
- package/dist/_internal-B23BagFd.d.ts +33 -0
- package/dist/adaptive-rate-limiter-Dch_xYIi.d.cts +111 -0
- package/dist/adaptive-rate-limiter-Dch_xYIi.d.ts +111 -0
- package/dist/agents-C0Ji9ldU.d.cts +629 -0
- package/dist/agents-C9zexT7I.d.ts +629 -0
- package/dist/audit-BAXb3VOg.d.ts +246 -0
- package/dist/audit-C_bPfkqS.d.cts +246 -0
- package/dist/backoff-7KIK3WQW.js +24 -0
- package/dist/backoff-7KIK3WQW.js.map +1 -0
- package/dist/backoff-Bnb9OoPh.d.cts +6 -0
- package/dist/backoff-Bnb9OoPh.d.ts +6 -0
- package/dist/base/composition/index.cjs +811 -0
- package/dist/base/composition/index.cjs.map +1 -0
- package/dist/base/composition/index.d.cts +469 -0
- package/dist/base/composition/index.d.ts +469 -0
- package/dist/base/composition/index.js +40 -0
- package/dist/base/composition/index.js.map +1 -0
- package/dist/base/index.cjs +6336 -0
- package/dist/base/index.cjs.map +1 -0
- package/dist/base/index.d.cts +22 -0
- package/dist/base/index.d.ts +22 -0
- package/dist/base/index.js +259 -0
- package/dist/base/index.js.map +1 -0
- package/dist/base/io/index.cjs +3270 -0
- package/dist/base/io/index.cjs.map +1 -0
- package/dist/base/io/index.d.cts +2245 -0
- package/dist/base/io/index.d.ts +2245 -0
- package/dist/base/io/index.js +117 -0
- package/dist/base/io/index.js.map +1 -0
- package/dist/base/meta/index.cjs +43 -0
- package/dist/base/meta/index.cjs.map +1 -0
- package/dist/base/meta/index.d.cts +45 -0
- package/dist/base/meta/index.d.ts +45 -0
- package/dist/base/meta/index.js +13 -0
- package/dist/base/meta/index.js.map +1 -0
- package/dist/base/mutation/index.cjs +200 -0
- package/dist/base/mutation/index.cjs.map +1 -0
- package/dist/base/mutation/index.d.cts +177 -0
- package/dist/base/mutation/index.d.ts +177 -0
- package/dist/base/mutation/index.js +22 -0
- package/dist/base/mutation/index.js.map +1 -0
- package/dist/base/render/index.cjs +1120 -0
- package/dist/base/render/index.cjs.map +1 -0
- package/dist/{extra/render/index.d.ts → base/render/index.d.cts} +75 -31
- package/dist/{extra/render/index.d.cts → base/render/index.d.ts} +75 -31
- package/dist/base/render/index.js +24 -0
- package/dist/base/render/index.js.map +1 -0
- package/dist/base/sources/browser/index.cjs +172 -0
- package/dist/base/sources/browser/index.cjs.map +1 -0
- package/dist/base/sources/browser/index.d.cts +84 -0
- package/dist/base/sources/browser/index.d.ts +84 -0
- package/dist/base/sources/browser/index.js +151 -0
- package/dist/base/sources/browser/index.js.map +1 -0
- package/dist/base/sources/event/index.cjs +98 -0
- package/dist/base/sources/event/index.cjs.map +1 -0
- package/dist/base/sources/event/index.d.cts +91 -0
- package/dist/base/sources/event/index.d.ts +91 -0
- package/dist/base/sources/event/index.js +13 -0
- package/dist/base/sources/event/index.js.map +1 -0
- package/dist/base/sources/index.cjs +755 -0
- package/dist/base/sources/index.cjs.map +1 -0
- package/dist/{extra/sources.d.ts → base/sources/index.d.cts} +74 -301
- package/dist/{extra/sources.d.cts → base/sources/index.d.ts} +74 -301
- package/dist/base/sources/index.js +42 -0
- package/dist/base/sources/index.js.map +1 -0
- package/dist/base/sources/node/index.cjs +320 -0
- package/dist/base/sources/node/index.cjs.map +1 -0
- package/dist/{extra/node.d.ts → base/sources/node/index.d.cts} +35 -37
- package/dist/{extra/node.d.cts → base/sources/node/index.d.ts} +35 -37
- package/dist/base/sources/node/index.js +306 -0
- package/dist/base/sources/node/index.js.map +1 -0
- package/dist/base/utils/index.cjs +37 -0
- package/dist/base/utils/index.cjs.map +1 -0
- package/dist/base/utils/index.d.cts +37 -0
- package/dist/base/utils/index.d.ts +37 -0
- package/dist/base/utils/index.js +11 -0
- package/dist/base/utils/index.js.map +1 -0
- package/dist/base/worker/index.cjs +548 -0
- package/dist/base/worker/index.cjs.map +1 -0
- package/dist/base/worker/index.d.cts +207 -0
- package/dist/base/worker/index.d.ts +207 -0
- package/dist/base/worker/index.js +20 -0
- package/dist/base/worker/index.js.map +1 -0
- package/dist/breaker-C9skL3d8.d.ts +175 -0
- package/dist/breaker-ugSdq54q.d.cts +175 -0
- package/dist/{cascading-BglDkMdX.d.cts → cascading-CSSbKGrJ.d.ts} +3 -3
- package/dist/{cascading-MFgxu7Yo.d.ts → cascading-baGkiihI.d.cts} +3 -3
- package/dist/chunk-255UCBG4.js +58 -0
- package/dist/chunk-255UCBG4.js.map +1 -0
- package/dist/chunk-2LO3EL4W.js +1 -0
- package/dist/chunk-2LO3EL4W.js.map +1 -0
- package/dist/chunk-2OB3CEJS.js +1065 -0
- package/dist/chunk-2OB3CEJS.js.map +1 -0
- package/dist/chunk-36NMM65U.js +144 -0
- package/dist/chunk-36NMM65U.js.map +1 -0
- package/dist/chunk-3CEXCBN6.js +1 -0
- package/dist/chunk-3CEXCBN6.js.map +1 -0
- package/dist/chunk-3MUSLI6E.js +105 -0
- package/dist/chunk-3MUSLI6E.js.map +1 -0
- package/dist/chunk-3PSLNJDU.js +884 -0
- package/dist/chunk-3PSLNJDU.js.map +1 -0
- package/dist/chunk-3QZY5BI7.js +92 -0
- package/dist/chunk-3QZY5BI7.js.map +1 -0
- package/dist/chunk-42FQ27MQ.js +594 -0
- package/dist/chunk-42FQ27MQ.js.map +1 -0
- package/dist/chunk-4GYMCUDZ.js +1085 -0
- package/dist/chunk-4GYMCUDZ.js.map +1 -0
- package/dist/chunk-4S53H2KR.js +382 -0
- package/dist/chunk-4S53H2KR.js.map +1 -0
- package/dist/chunk-4XCHZRUJ.js +128 -0
- package/dist/chunk-4XCHZRUJ.js.map +1 -0
- package/dist/chunk-5THCXDWY.js +725 -0
- package/dist/chunk-5THCXDWY.js.map +1 -0
- package/dist/chunk-6XZYT4SW.js +256 -0
- package/dist/chunk-6XZYT4SW.js.map +1 -0
- package/dist/chunk-7EGRP2VX.js +76 -0
- package/dist/chunk-7EGRP2VX.js.map +1 -0
- package/dist/chunk-A7KV5UK4.js +150 -0
- package/dist/chunk-A7KV5UK4.js.map +1 -0
- package/dist/chunk-APY2SS5X.js +156 -0
- package/dist/chunk-APY2SS5X.js.map +1 -0
- package/dist/chunk-AZDQPQ3V.js +66 -0
- package/dist/chunk-AZDQPQ3V.js.map +1 -0
- package/dist/chunk-BU3SEFA5.js +90 -0
- package/dist/chunk-BU3SEFA5.js.map +1 -0
- package/dist/chunk-BXGZFGZ4.js +189 -0
- package/dist/chunk-BXGZFGZ4.js.map +1 -0
- package/dist/chunk-CGHORL6G.js +579 -0
- package/dist/chunk-CGHORL6G.js.map +1 -0
- package/dist/chunk-CXANAIZU.js +530 -0
- package/dist/chunk-CXANAIZU.js.map +1 -0
- package/dist/chunk-CZQHCKKG.js +1 -0
- package/dist/chunk-CZQHCKKG.js.map +1 -0
- package/dist/chunk-DKNHAICT.js +133 -0
- package/dist/chunk-DKNHAICT.js.map +1 -0
- package/dist/chunk-DM4OMPWK.js +584 -0
- package/dist/chunk-DM4OMPWK.js.map +1 -0
- package/dist/chunk-DMSNO6ZB.js +452 -0
- package/dist/chunk-DMSNO6ZB.js.map +1 -0
- package/dist/chunk-E5OZPDIW.js +229 -0
- package/dist/chunk-E5OZPDIW.js.map +1 -0
- package/dist/chunk-EVYY4X5A.js +509 -0
- package/dist/chunk-EVYY4X5A.js.map +1 -0
- package/dist/chunk-FDFD67UO.js +1 -0
- package/dist/chunk-FDFD67UO.js.map +1 -0
- package/dist/chunk-FMPF42Q4.js +13 -0
- package/dist/chunk-FMPF42Q4.js.map +1 -0
- package/dist/chunk-FR6RGA3B.js +1277 -0
- package/dist/chunk-FR6RGA3B.js.map +1 -0
- package/dist/chunk-FW23JYNQ.js +454 -0
- package/dist/chunk-FW23JYNQ.js.map +1 -0
- package/dist/chunk-GBCENOLN.js +1575 -0
- package/dist/chunk-GBCENOLN.js.map +1 -0
- package/dist/chunk-HL7HUJIX.js +1 -0
- package/dist/chunk-HL7HUJIX.js.map +1 -0
- package/dist/chunk-HULCUY35.js +2508 -0
- package/dist/chunk-HULCUY35.js.map +1 -0
- package/dist/chunk-IHTWQEDR.js +169 -0
- package/dist/chunk-IHTWQEDR.js.map +1 -0
- package/dist/chunk-IJRR6YAI.js +128 -0
- package/dist/chunk-IJRR6YAI.js.map +1 -0
- package/dist/chunk-JGFRAFDL.js +221 -0
- package/dist/chunk-JGFRAFDL.js.map +1 -0
- package/dist/chunk-KIIXR252.js +211 -0
- package/dist/chunk-KIIXR252.js.map +1 -0
- package/dist/chunk-KN3H5CNT.js +11 -0
- package/dist/chunk-KN3H5CNT.js.map +1 -0
- package/dist/chunk-KPG3DGLA.js +1 -0
- package/dist/chunk-KPG3DGLA.js.map +1 -0
- package/dist/chunk-KRNQ6RGQ.js +1 -0
- package/dist/chunk-KRNQ6RGQ.js.map +1 -0
- package/dist/chunk-LBAJK24K.js +1071 -0
- package/dist/chunk-LBAJK24K.js.map +1 -0
- package/dist/chunk-MLTPJMH6.js +417 -0
- package/dist/chunk-MLTPJMH6.js.map +1 -0
- package/dist/chunk-N3SZ7BMH.js +95 -0
- package/dist/chunk-N3SZ7BMH.js.map +1 -0
- package/dist/chunk-NDUD3IMO.js +540 -0
- package/dist/chunk-NDUD3IMO.js.map +1 -0
- package/dist/chunk-NY2PYHNC.js +873 -0
- package/dist/chunk-NY2PYHNC.js.map +1 -0
- package/dist/chunk-O3MT7DYI.js +225 -0
- package/dist/chunk-O3MT7DYI.js.map +1 -0
- package/dist/chunk-OCUDSN63.js +2386 -0
- package/dist/chunk-OCUDSN63.js.map +1 -0
- package/dist/chunk-OIWU3NYV.js +199 -0
- package/dist/chunk-OIWU3NYV.js.map +1 -0
- package/dist/chunk-OO5BM6CJ.js +1153 -0
- package/dist/chunk-OO5BM6CJ.js.map +1 -0
- package/dist/chunk-OQUIJT7A.js +1 -0
- package/dist/chunk-OQUIJT7A.js.map +1 -0
- package/dist/chunk-P5LBT622.js +105 -0
- package/dist/chunk-P5LBT622.js.map +1 -0
- package/dist/chunk-PKGQG5QQ.js +519 -0
- package/dist/chunk-PKGQG5QQ.js.map +1 -0
- package/dist/chunk-PKPO3JTZ.js +561 -0
- package/dist/chunk-PKPO3JTZ.js.map +1 -0
- package/dist/chunk-PL5UDIQ5.js +118 -0
- package/dist/chunk-PL5UDIQ5.js.map +1 -0
- package/dist/chunk-PZWISPIQ.js +432 -0
- package/dist/chunk-PZWISPIQ.js.map +1 -0
- package/dist/chunk-Q3EYOCZB.js +510 -0
- package/dist/chunk-Q3EYOCZB.js.map +1 -0
- package/dist/chunk-QMBYUVRL.js +15 -0
- package/dist/chunk-QMBYUVRL.js.map +1 -0
- package/dist/chunk-RAGGHLCV.js +200 -0
- package/dist/chunk-RAGGHLCV.js.map +1 -0
- package/dist/chunk-RGL53X5G.js +574 -0
- package/dist/chunk-RGL53X5G.js.map +1 -0
- package/dist/chunk-RJOG4IJU.js +1039 -0
- package/dist/chunk-RJOG4IJU.js.map +1 -0
- package/dist/chunk-SOOKUYVM.js +403 -0
- package/dist/chunk-SOOKUYVM.js.map +1 -0
- package/dist/chunk-T5BN5KG7.js +1 -0
- package/dist/chunk-T5BN5KG7.js.map +1 -0
- package/dist/chunk-TP7244Y6.js +207 -0
- package/dist/chunk-TP7244Y6.js.map +1 -0
- package/dist/chunk-TSBFTJKM.js +57 -0
- package/dist/chunk-TSBFTJKM.js.map +1 -0
- package/dist/chunk-URQ2CBBF.js +143 -0
- package/dist/chunk-URQ2CBBF.js.map +1 -0
- package/dist/chunk-W2BOPXTI.js +1 -0
- package/dist/chunk-W2BOPXTI.js.map +1 -0
- package/dist/chunk-WKSWLSCX.js +207 -0
- package/dist/chunk-WKSWLSCX.js.map +1 -0
- package/dist/chunk-Y52CS6YA.js +88 -0
- package/dist/chunk-Y52CS6YA.js.map +1 -0
- package/dist/chunk-YCBUWK77.js +92 -0
- package/dist/chunk-YCBUWK77.js.map +1 -0
- package/dist/chunk-YJ4U2D2C.js +314 -0
- package/dist/chunk-YJ4U2D2C.js.map +1 -0
- package/dist/chunk-Z4YXAUDN.js +239 -0
- package/dist/chunk-Z4YXAUDN.js.map +1 -0
- package/dist/chunk-Z6EGP5D7.js +92 -0
- package/dist/chunk-Z6EGP5D7.js.map +1 -0
- package/dist/compat/index.cjs +3100 -9
- package/dist/compat/index.cjs.map +1 -0
- package/dist/compat/index.d.cts +112 -18
- package/dist/compat/index.d.ts +112 -18
- package/dist/compat/index.js +176 -1
- package/dist/compat/index.js.map +1 -0
- package/dist/compat/jotai/index.cjs +149 -1
- package/dist/compat/jotai/index.cjs.map +1 -0
- package/dist/compat/jotai/index.d.cts +2 -2
- package/dist/compat/jotai/index.d.ts +2 -2
- package/dist/compat/jotai/index.js +8 -1
- package/dist/compat/jotai/index.js.map +1 -0
- package/dist/compat/nanostores/index.cjs +205 -1
- package/dist/compat/nanostores/index.cjs.map +1 -0
- package/dist/compat/nanostores/index.d.cts +2 -2
- package/dist/compat/nanostores/index.d.ts +2 -2
- package/dist/compat/nanostores/index.js +22 -1
- package/dist/compat/nanostores/index.js.map +1 -0
- package/dist/compat/nestjs/index.cjs +2241 -9
- package/dist/compat/nestjs/index.cjs.map +1 -0
- package/dist/compat/nestjs/index.d.cts +7 -10
- package/dist/compat/nestjs/index.d.ts +7 -10
- package/dist/compat/nestjs/index.js +78 -1
- package/dist/compat/nestjs/index.js.map +1 -0
- package/dist/compat/react/index.cjs +114 -1
- package/dist/compat/react/index.cjs.map +1 -0
- package/dist/compat/react/index.d.cts +2 -2
- package/dist/compat/react/index.d.ts +2 -2
- package/dist/compat/react/index.js +12 -1
- package/dist/compat/react/index.js.map +1 -0
- package/dist/compat/solid/index.cjs +101 -1
- package/dist/compat/solid/index.cjs.map +1 -0
- package/dist/compat/solid/index.d.cts +2 -2
- package/dist/compat/solid/index.d.ts +2 -2
- package/dist/compat/solid/index.js +12 -1
- package/dist/compat/solid/index.js.map +1 -0
- package/dist/compat/svelte/index.cjs +104 -1
- package/dist/compat/svelte/index.cjs.map +1 -0
- package/dist/compat/svelte/index.d.cts +2 -2
- package/dist/compat/svelte/index.d.ts +2 -2
- package/dist/compat/svelte/index.js +12 -1
- package/dist/compat/svelte/index.js.map +1 -0
- package/dist/compat/vue/index.cjs +119 -1
- package/dist/compat/vue/index.cjs.map +1 -0
- package/dist/compat/vue/index.d.cts +2 -2
- package/dist/compat/vue/index.d.ts +2 -2
- package/dist/compat/vue/index.js +12 -1
- package/dist/compat/vue/index.js.map +1 -0
- package/dist/compat/zustand/index.cjs +69 -3
- package/dist/compat/zustand/index.cjs.map +1 -0
- package/dist/compat/zustand/index.d.cts +2 -6
- package/dist/compat/zustand/index.d.ts +2 -6
- package/dist/compat/zustand/index.js +8 -1
- package/dist/compat/zustand/index.js.map +1 -0
- package/dist/distill-De6Rnn15.d.cts +48 -0
- package/dist/distill-De6Rnn15.d.ts +48 -0
- package/dist/external-register-CWyroXb_.d.cts +138 -0
- package/dist/external-register-CWyroXb_.d.ts +138 -0
- package/dist/{fallback-74oxi34l.d.cts → fallback-Bx46zqky.d.cts} +3 -10
- package/dist/{fallback-DUyyBTBK.d.ts → fallback-pIWW8A2d.d.ts} +3 -10
- package/dist/guarded-execution-BcdtxeBk.d.ts +207 -0
- package/dist/guarded-execution-C-3hnP6A.d.cts +207 -0
- package/dist/{index-CBGUK09R.d.ts → index-5SU_O78r.d.cts} +5 -5
- package/dist/{index-BmZXHqkE.d.ts → index-B6pxYJzO.d.cts} +1 -1
- package/dist/{index-hcDJ8PSI.d.cts → index-B6pxYJzO.d.ts} +1 -1
- package/dist/{index-C5stwKcw.d.cts → index-BFsng6v1.d.cts} +1 -1
- package/dist/{index-CdAlHFEt.d.ts → index-BFsng6v1.d.ts} +1 -1
- package/dist/{index-_6ODbuOu.d.cts → index-Bg-LwEt-.d.cts} +1 -1
- package/dist/{index-CviRnE4K.d.ts → index-Bg-LwEt-.d.ts} +1 -1
- package/dist/{index-CBBLl_rc.d.ts → index-Brp888t0.d.cts} +1 -1
- package/dist/{index-BQSKmbuG.d.cts → index-Brp888t0.d.ts} +1 -1
- package/dist/{index-sqkqlb1p.d.ts → index-CDfk6jHN.d.cts} +1 -1
- package/dist/{index-ZVQhLa2i.d.cts → index-CDfk6jHN.d.ts} +1 -1
- package/dist/{index-Climxqsu.d.cts → index-CEXCtYYJ.d.ts} +5 -5
- package/dist/index-DLAxYaN5.d.cts +169 -0
- package/dist/index-DLAxYaN5.d.ts +169 -0
- package/dist/{index-CK29LV56.d.cts → index-DeWbQzMe.d.cts} +1 -1
- package/dist/{index-CPQlGA29.d.ts → index-DeWbQzMe.d.ts} +1 -1
- package/dist/{index-BrPrLl4e.d.cts → index-dX9IzPqj.d.cts} +1 -1
- package/dist/{index-Dgl1HpPn.d.ts → index-dX9IzPqj.d.ts} +1 -1
- package/dist/index.cjs +25934 -191
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +58 -94
- package/dist/index.d.ts +58 -94
- package/dist/index.js +852 -1
- package/dist/index.js.map +1 -0
- package/dist/layout-types-B5aiHYgk.d.cts +72 -0
- package/dist/layout-types-B5aiHYgk.d.ts +72 -0
- package/dist/memory-composers-BryDrRBX.d.cts +529 -0
- package/dist/memory-composers-CVQqPYEV.d.ts +529 -0
- package/dist/{observable-DWjNfLvC.d.ts → observable-BXQoW1P-.d.cts} +1 -1
- package/dist/{observable-e3eiPPFy.d.cts → observable-BXQoW1P-.d.ts} +1 -1
- package/dist/{pipeline-graph-Sgj0gCwn.d.ts → pipeline-graph-Ce47CB6Y.d.cts} +13 -10
- package/dist/{pipeline-graph-CIKhynsF.d.cts → pipeline-graph-DXCwY9vG.d.ts} +13 -10
- package/dist/presets/ai/index.cjs +4377 -0
- package/dist/presets/ai/index.cjs.map +1 -0
- package/dist/presets/ai/index.d.cts +98 -0
- package/dist/presets/ai/index.d.ts +98 -0
- package/dist/presets/ai/index.js +54 -0
- package/dist/presets/ai/index.js.map +1 -0
- package/dist/presets/harness/index.cjs +5929 -0
- package/dist/presets/harness/index.cjs.map +1 -0
- package/dist/presets/harness/index.d.cts +566 -0
- package/dist/presets/harness/index.d.ts +566 -0
- package/dist/presets/harness/index.js +71 -0
- package/dist/presets/harness/index.js.map +1 -0
- package/dist/presets/index.cjs +9782 -0
- package/dist/presets/index.cjs.map +1 -0
- package/dist/presets/index.d.cts +28 -0
- package/dist/presets/index.d.ts +28 -0
- package/dist/presets/index.js +129 -0
- package/dist/presets/index.js.map +1 -0
- package/dist/presets/inspect/index.cjs +1087 -0
- package/dist/presets/inspect/index.cjs.map +1 -0
- package/dist/presets/inspect/index.d.cts +172 -0
- package/dist/presets/inspect/index.d.ts +172 -0
- package/dist/presets/inspect/index.js +21 -0
- package/dist/presets/inspect/index.js.map +1 -0
- package/dist/presets/resilience/index.cjs +1593 -0
- package/dist/presets/resilience/index.cjs.map +1 -0
- package/dist/presets/resilience/index.d.cts +205 -0
- package/dist/presets/resilience/index.d.ts +205 -0
- package/dist/presets/resilience/index.js +18 -0
- package/dist/presets/resilience/index.js.map +1 -0
- package/dist/rate-limiter-CEALq4N1.d.ts +559 -0
- package/dist/rate-limiter-DpVbSYdH.d.cts +559 -0
- package/dist/{reactive-layout-DOTs9P3X.d.ts → reactive-layout-fswlBUvX.d.cts} +19 -7
- package/dist/{reactive-layout-DgctbqZo.d.cts → reactive-layout-fswlBUvX.d.ts} +19 -7
- package/dist/retry-BDbRZ_gx.d.ts +125 -0
- package/dist/retry-DWuhjvsA.d.cts +125 -0
- package/dist/solutions/index.cjs +8200 -0
- package/dist/solutions/index.cjs.map +1 -0
- package/dist/solutions/index.d.cts +23 -0
- package/dist/solutions/index.d.ts +23 -0
- package/dist/solutions/index.js +55 -0
- package/dist/solutions/index.js.map +1 -0
- package/dist/spawnable-5mDY501F.d.cts +746 -0
- package/dist/spawnable-D3lR0oQu.d.ts +746 -0
- package/dist/status-U-rUI79b.d.cts +84 -0
- package/dist/status-U-rUI79b.d.ts +84 -0
- package/dist/timeout-U5O4ESK3.js +12 -0
- package/dist/timeout-U5O4ESK3.js.map +1 -0
- package/dist/{types-CWFysE9E.d.ts → types-BB5Lw-pB.d.cts} +3 -3
- package/dist/{types-C0_yquda.d.cts → types-BB5Lw-pB.d.ts} +3 -3
- package/dist/types-CJWIMJiZ.d.ts +548 -0
- package/dist/types-vCq7ShIm.d.cts +548 -0
- package/dist/utils/ai/browser.cjs +2169 -0
- package/dist/utils/ai/browser.cjs.map +1 -0
- package/dist/{patterns → utils}/ai/browser.d.cts +7 -5
- package/dist/{patterns → utils}/ai/browser.d.ts +7 -5
- package/dist/utils/ai/browser.js +255 -0
- package/dist/utils/ai/browser.js.map +1 -0
- package/dist/utils/ai/index.cjs +8468 -0
- package/dist/utils/ai/index.cjs.map +1 -0
- package/dist/{index-CR8QpwX8.d.ts → utils/ai/index.d.cts} +73 -976
- package/dist/{index-UPSiS-X7.d.cts → utils/ai/index.d.ts} +73 -976
- package/dist/utils/ai/index.js +173 -0
- package/dist/utils/ai/index.js.map +1 -0
- package/dist/utils/ai/node.cjs +648 -0
- package/dist/utils/ai/node.cjs.map +1 -0
- package/dist/{patterns → utils}/ai/node.d.cts +5 -7
- package/dist/{patterns → utils}/ai/node.d.ts +5 -7
- package/dist/utils/ai/node.js +84 -0
- package/dist/utils/ai/node.js.map +1 -0
- package/dist/utils/cqrs/index.cjs +1036 -0
- package/dist/utils/cqrs/index.cjs.map +1 -0
- package/dist/{index-CeFiHtAg.d.ts → utils/cqrs/index.d.cts} +7 -37
- package/dist/{index-B-_tFaqV.d.cts → utils/cqrs/index.d.ts} +7 -37
- package/dist/utils/cqrs/index.js +18 -0
- package/dist/utils/cqrs/index.js.map +1 -0
- package/dist/utils/demo-shell/index.cjs +865 -0
- package/dist/utils/demo-shell/index.cjs.map +1 -0
- package/dist/{index-B8YnZpIR.d.ts → utils/demo-shell/index.d.cts} +4 -16
- package/dist/{index-Cwv0KWcU.d.cts → utils/demo-shell/index.d.ts} +4 -16
- package/dist/utils/demo-shell/index.js +13 -0
- package/dist/utils/demo-shell/index.js.map +1 -0
- package/dist/utils/domain-templates/index.cjs +732 -0
- package/dist/utils/domain-templates/index.cjs.map +1 -0
- package/dist/{index-CzLVrjxn.d.ts → utils/domain-templates/index.d.cts} +3 -20
- package/dist/{index-BaQaY_IQ.d.cts → utils/domain-templates/index.d.ts} +3 -20
- package/dist/utils/domain-templates/index.js +17 -0
- package/dist/utils/domain-templates/index.js.map +1 -0
- package/dist/utils/graphspec/index.cjs +1174 -0
- package/dist/utils/graphspec/index.cjs.map +1 -0
- package/dist/{index-CMh5Rz1y.d.ts → utils/graphspec/index.d.cts} +106 -42
- package/dist/{index-CS0LTlB8.d.cts → utils/graphspec/index.d.ts} +106 -42
- package/dist/utils/graphspec/index.js +35 -0
- package/dist/utils/graphspec/index.js.map +1 -0
- package/dist/utils/harness/index.cjs +656 -0
- package/dist/utils/harness/index.cjs.map +1 -0
- package/dist/utils/harness/index.d.cts +542 -0
- package/dist/utils/harness/index.d.ts +542 -0
- package/dist/utils/harness/index.js +56 -0
- package/dist/utils/harness/index.js.map +1 -0
- package/dist/utils/index.cjs +17609 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +96 -0
- package/dist/utils/index.d.ts +96 -0
- package/dist/utils/index.js +514 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/inspect/index.cjs +807 -0
- package/dist/utils/inspect/index.cjs.map +1 -0
- package/dist/utils/inspect/index.d.cts +123 -0
- package/dist/utils/inspect/index.d.ts +123 -0
- package/dist/utils/inspect/index.js +30 -0
- package/dist/utils/inspect/index.js.map +1 -0
- package/dist/utils/job-queue/index.cjs +717 -0
- package/dist/utils/job-queue/index.cjs.map +1 -0
- package/dist/{index-DisjX8a-.d.ts → utils/job-queue/index.d.cts} +5 -26
- package/dist/{index-DV_1YuVk.d.cts → utils/job-queue/index.d.ts} +5 -26
- package/dist/utils/job-queue/index.js +18 -0
- package/dist/utils/job-queue/index.js.map +1 -0
- package/dist/utils/memory/index.cjs +1451 -0
- package/dist/utils/memory/index.cjs.map +1 -0
- package/dist/{index-CZ3r5Rxp.d.ts → utils/memory/index.d.cts} +242 -34
- package/dist/{index-B17QddL1.d.cts → utils/memory/index.d.ts} +242 -34
- package/dist/utils/memory/index.js +19 -0
- package/dist/utils/memory/index.js.map +1 -0
- package/dist/utils/messaging/index.cjs +666 -0
- package/dist/utils/messaging/index.cjs.map +1 -0
- package/dist/utils/messaging/index.d.cts +562 -0
- package/dist/utils/messaging/index.d.ts +562 -0
- package/dist/utils/messaging/index.js +50 -0
- package/dist/utils/messaging/index.js.map +1 -0
- package/dist/utils/orchestration/index.cjs +876 -0
- package/dist/utils/orchestration/index.cjs.map +1 -0
- package/dist/utils/orchestration/index.d.cts +233 -0
- package/dist/utils/orchestration/index.d.ts +233 -0
- package/dist/utils/orchestration/index.js +19 -0
- package/dist/utils/orchestration/index.js.map +1 -0
- package/dist/utils/process/index.cjs +743 -0
- package/dist/utils/process/index.cjs.map +1 -0
- package/dist/{index-p09KSrTN.d.ts → utils/process/index.d.cts} +97 -44
- package/dist/{index-CasX6Pfq.d.cts → utils/process/index.d.ts} +97 -44
- package/dist/utils/process/index.js +14 -0
- package/dist/utils/process/index.js.map +1 -0
- package/dist/utils/reactive-layout/index.cjs +1607 -0
- package/dist/utils/reactive-layout/index.cjs.map +1 -0
- package/dist/{index-B5S8ULbU.d.ts → utils/reactive-layout/index.d.cts} +58 -81
- package/dist/{index-Dc4AYqrJ.d.cts → utils/reactive-layout/index.d.ts} +58 -81
- package/dist/utils/reactive-layout/index.js +52 -0
- package/dist/utils/reactive-layout/index.js.map +1 -0
- package/dist/utils/reduction/index.cjs +203 -0
- package/dist/utils/reduction/index.cjs.map +1 -0
- package/dist/{index-Byu-OpX_.d.ts → utils/reduction/index.d.cts} +6 -17
- package/dist/{index-tRCxuAXF.d.cts → utils/reduction/index.d.ts} +6 -17
- package/dist/utils/reduction/index.js +14 -0
- package/dist/utils/reduction/index.js.map +1 -0
- package/dist/utils/resilience/index.cjs +1617 -0
- package/dist/utils/resilience/index.cjs.map +1 -0
- package/dist/utils/resilience/index.d.cts +9 -0
- package/dist/utils/resilience/index.d.ts +9 -0
- package/dist/utils/resilience/index.js +44 -0
- package/dist/utils/resilience/index.js.map +1 -0
- package/dist/utils/surface/index.cjs +1070 -0
- package/dist/utils/surface/index.cjs.map +1 -0
- package/dist/{index-CYq8vAyV.d.ts → utils/surface/index.d.cts} +7 -58
- package/dist/{index-CSOmP7xT.d.cts → utils/surface/index.d.ts} +7 -58
- package/dist/utils/surface/index.js +30 -0
- package/dist/utils/surface/index.js.map +1 -0
- package/dist/utils/topology-view/index.cjs +620 -0
- package/dist/utils/topology-view/index.cjs.map +1 -0
- package/dist/utils/topology-view/index.d.cts +68 -0
- package/dist/utils/topology-view/index.d.ts +68 -0
- package/dist/utils/topology-view/index.js +11 -0
- package/dist/utils/topology-view/index.js.map +1 -0
- package/package.json +664 -584
- package/dist/backoff-HPZMEZNF.js +0 -1
- package/dist/chunk-2T7U5EU6.js +0 -1
- package/dist/chunk-3G5U5QNE.js +0 -5
- package/dist/chunk-4VVTGLXJ.js +0 -1
- package/dist/chunk-5M4CCMMD.js +0 -45
- package/dist/chunk-5QDBSZBV.js +0 -1
- package/dist/chunk-5XJ6B66J.js +0 -1
- package/dist/chunk-6QZNQS5B.js +0 -1
- package/dist/chunk-6X7AFUJV.js +0 -9
- package/dist/chunk-7K6PWTDQ.js +0 -1
- package/dist/chunk-7LIAPXJB.js +0 -1
- package/dist/chunk-7WPU3UHQ.js +0 -1
- package/dist/chunk-A5WCQ5NO.js +0 -1
- package/dist/chunk-APPIWSGD.js +0 -84
- package/dist/chunk-BEZWM2SY.js +0 -1
- package/dist/chunk-C72GO4IZ.js +0 -1
- package/dist/chunk-CB676TKJ.js +0 -1
- package/dist/chunk-CE6TI2TL.js +0 -1
- package/dist/chunk-CE72X3WO.js +0 -1
- package/dist/chunk-CK2E7BTU.js +0 -1
- package/dist/chunk-CLVB32RD.js +0 -1
- package/dist/chunk-CRVT7D2P.js +0 -1
- package/dist/chunk-D5RFJOZ2.js +0 -1
- package/dist/chunk-D7GPHKFH.js +0 -1
- package/dist/chunk-DHRX7JX4.js +0 -2
- package/dist/chunk-ESMPEKEV.js +0 -1
- package/dist/chunk-F672GV32.js +0 -1
- package/dist/chunk-FZMYDOWV.js +0 -1
- package/dist/chunk-GHBWHMRZ.js +0 -1
- package/dist/chunk-GLERH466.js +0 -1
- package/dist/chunk-GPW2V3RE.js +0 -1
- package/dist/chunk-HIDYF36O.js +0 -1
- package/dist/chunk-HITNVN6B.js +0 -3
- package/dist/chunk-HY4DJBA7.js +0 -5
- package/dist/chunk-KZIEYVXN.js +0 -1
- package/dist/chunk-L6NSJVJZ.js +0 -1
- package/dist/chunk-N4MQX6JU.js +0 -18
- package/dist/chunk-N7FHEL4D.js +0 -1
- package/dist/chunk-NTEURFZH.js +0 -1
- package/dist/chunk-OIVP6KFV.js +0 -1
- package/dist/chunk-OPHBU3LG.js +0 -1
- package/dist/chunk-OYQOZP2F.js +0 -5
- package/dist/chunk-PTZK576G.js +0 -1
- package/dist/chunk-QYADASLV.js +0 -1
- package/dist/chunk-ST7UXLWR.js +0 -1
- package/dist/chunk-SVY7VUYU.js +0 -1
- package/dist/chunk-TK3NWWD4.js +0 -1
- package/dist/chunk-TSOYJ743.js +0 -1
- package/dist/chunk-UNGSTR4X.js +0 -61
- package/dist/chunk-VIMF6LGM.js +0 -1
- package/dist/chunk-VJLMUKOI.js +0 -1
- package/dist/chunk-VN6RDSK2.js +0 -1
- package/dist/chunk-VV4N5P64.js +0 -1
- package/dist/chunk-W3I423PS.js +0 -1
- package/dist/chunk-WJR24TAG.js +0 -1
- package/dist/chunk-XTGKMHSW.js +0 -1
- package/dist/chunk-YBB7ZGTY.js +0 -1
- package/dist/chunk-Z4NPUARF.js +0 -1
- package/dist/chunk-ZGNQRPDT.js +0 -1
- package/dist/chunk-ZKPSFFKU.js +0 -1
- package/dist/chunk-ZLV5SQSX.js +0 -1
- package/dist/content-addressed-storage-4-ST1tYk.d.cts +0 -124
- package/dist/content-addressed-storage-DuYMjV7o.d.ts +0 -124
- package/dist/core/index.cjs +0 -1
- package/dist/core/index.d.cts +0 -3
- package/dist/core/index.d.ts +0 -3
- package/dist/core/index.js +0 -1
- package/dist/decay-BvOWTZ00.d.ts +0 -112
- package/dist/decay-CFlLvXUT.d.cts +0 -112
- package/dist/extra/browser.cjs +0 -1
- package/dist/extra/browser.d.cts +0 -4
- package/dist/extra/browser.d.ts +0 -4
- package/dist/extra/browser.js +0 -1
- package/dist/extra/index.cjs +0 -20
- package/dist/extra/index.d.cts +0 -17
- package/dist/extra/index.d.ts +0 -17
- package/dist/extra/index.js +0 -1
- package/dist/extra/node.cjs +0 -2
- package/dist/extra/node.js +0 -2
- package/dist/extra/operators.cjs +0 -1
- package/dist/extra/operators.d.cts +0 -958
- package/dist/extra/operators.d.ts +0 -958
- package/dist/extra/operators.js +0 -1
- package/dist/extra/reactive.cjs +0 -1
- package/dist/extra/reactive.d.cts +0 -353
- package/dist/extra/reactive.d.ts +0 -353
- package/dist/extra/reactive.js +0 -1
- package/dist/extra/render/index.cjs +0 -5
- package/dist/extra/render/index.js +0 -1
- package/dist/extra/sources.cjs +0 -3
- package/dist/extra/sources.js +0 -1
- package/dist/extra/storage-browser.cjs +0 -1
- package/dist/extra/storage-browser.d.cts +0 -37
- package/dist/extra/storage-browser.d.ts +0 -37
- package/dist/extra/storage-browser.js +0 -1
- package/dist/extra/storage-core.cjs +0 -1
- package/dist/extra/storage-core.d.cts +0 -28
- package/dist/extra/storage-core.d.ts +0 -28
- package/dist/extra/storage-core.js +0 -1
- package/dist/extra/storage-node.cjs +0 -1
- package/dist/extra/storage-node.d.cts +0 -2
- package/dist/extra/storage-node.d.ts +0 -2
- package/dist/extra/storage-node.js +0 -0
- package/dist/extra/storage-tiers-browser.cjs +0 -1
- package/dist/extra/storage-tiers-browser.d.cts +0 -120
- package/dist/extra/storage-tiers-browser.d.ts +0 -120
- package/dist/extra/storage-tiers-browser.js +0 -1
- package/dist/extra/storage-tiers-node.cjs +0 -1
- package/dist/extra/storage-tiers-node.d.cts +0 -210
- package/dist/extra/storage-tiers-node.d.ts +0 -210
- package/dist/extra/storage-tiers-node.js +0 -1
- package/dist/extra/storage-tiers.cjs +0 -1
- package/dist/extra/storage-tiers.d.cts +0 -412
- package/dist/extra/storage-tiers.d.ts +0 -412
- package/dist/extra/storage-tiers.js +0 -1
- package/dist/graph/index.cjs +0 -7
- package/dist/graph/index.d.cts +0 -7
- package/dist/graph/index.d.ts +0 -7
- package/dist/graph/index.js +0 -1
- package/dist/graph-CWvEUQAq.d.cts +0 -1861
- package/dist/graph-D9LFnda9.d.ts +0 -1861
- package/dist/index-5k1T6jl0.d.cts +0 -121
- package/dist/index-9770hRuQ.d.cts +0 -779
- package/dist/index-B1F8Enjf.d.ts +0 -704
- package/dist/index-BHskSB8v.d.ts +0 -3413
- package/dist/index-BIYAkbAi.d.cts +0 -26
- package/dist/index-BoJ5JHxI.d.ts +0 -557
- package/dist/index-BocU7pqs.d.ts +0 -779
- package/dist/index-BxNs2HB9.d.cts +0 -1858
- package/dist/index-C1T3d7V-.d.cts +0 -704
- package/dist/index-C5ri2Axc.d.cts +0 -301
- package/dist/index-C9l6OEBL.d.ts +0 -26
- package/dist/index-CC-AvFTy.d.cts +0 -557
- package/dist/index-CJF1URuX.d.ts +0 -121
- package/dist/index-CdTelp1M.d.ts +0 -202
- package/dist/index-Cj3WohTd.d.cts +0 -202
- package/dist/index-Co7uli2l.d.cts +0 -3413
- package/dist/index-D0aciIex.d.cts +0 -209
- package/dist/index-DHen9Klo.d.ts +0 -1858
- package/dist/index-Yq60JP3s.d.ts +0 -209
- package/dist/index-nozs3fFC.d.ts +0 -301
- package/dist/node-kK3CvTrR.d.cts +0 -1347
- package/dist/node-kK3CvTrR.d.ts +0 -1347
- package/dist/patterns/ai/browser.cjs +0 -8
- package/dist/patterns/ai/browser.js +0 -3
- package/dist/patterns/ai/index.cjs +0 -74
- package/dist/patterns/ai/index.d.cts +0 -20
- package/dist/patterns/ai/index.d.ts +0 -20
- package/dist/patterns/ai/index.js +0 -1
- package/dist/patterns/ai/node.cjs +0 -1
- package/dist/patterns/ai/node.js +0 -1
- package/dist/patterns/cqrs/index.cjs +0 -3
- package/dist/patterns/cqrs/index.d.cts +0 -8
- package/dist/patterns/cqrs/index.d.ts +0 -8
- package/dist/patterns/cqrs/index.js +0 -1
- package/dist/patterns/demo-shell/index.cjs +0 -5
- package/dist/patterns/demo-shell/index.d.cts +0 -7
- package/dist/patterns/demo-shell/index.d.ts +0 -7
- package/dist/patterns/demo-shell/index.js +0 -1
- package/dist/patterns/domain-templates/index.cjs +0 -3
- package/dist/patterns/domain-templates/index.d.cts +0 -6
- package/dist/patterns/domain-templates/index.d.ts +0 -6
- package/dist/patterns/domain-templates/index.js +0 -1
- package/dist/patterns/graphspec/index.cjs +0 -86
- package/dist/patterns/graphspec/index.d.cts +0 -8
- package/dist/patterns/graphspec/index.d.ts +0 -8
- package/dist/patterns/graphspec/index.js +0 -1
- package/dist/patterns/harness/index.cjs +0 -48
- package/dist/patterns/harness/index.d.cts +0 -13
- package/dist/patterns/harness/index.d.ts +0 -13
- package/dist/patterns/harness/index.js +0 -1
- package/dist/patterns/inspect/index.cjs +0 -3
- package/dist/patterns/inspect/index.d.cts +0 -9
- package/dist/patterns/inspect/index.d.ts +0 -9
- package/dist/patterns/inspect/index.js +0 -1
- package/dist/patterns/job-queue/index.cjs +0 -3
- package/dist/patterns/job-queue/index.d.cts +0 -9
- package/dist/patterns/job-queue/index.d.ts +0 -9
- package/dist/patterns/job-queue/index.js +0 -1
- package/dist/patterns/memory/index.cjs +0 -3
- package/dist/patterns/memory/index.d.cts +0 -8
- package/dist/patterns/memory/index.d.ts +0 -8
- package/dist/patterns/memory/index.js +0 -1
- package/dist/patterns/messaging/index.cjs +0 -3
- package/dist/patterns/messaging/index.d.cts +0 -7
- package/dist/patterns/messaging/index.d.ts +0 -7
- package/dist/patterns/messaging/index.js +0 -1
- package/dist/patterns/orchestration/index.cjs +0 -3
- package/dist/patterns/orchestration/index.d.cts +0 -8
- package/dist/patterns/orchestration/index.d.ts +0 -8
- package/dist/patterns/orchestration/index.js +0 -1
- package/dist/patterns/process/index.cjs +0 -3
- package/dist/patterns/process/index.d.cts +0 -10
- package/dist/patterns/process/index.d.ts +0 -10
- package/dist/patterns/process/index.js +0 -1
- package/dist/patterns/reactive-layout/index.cjs +0 -4
- package/dist/patterns/reactive-layout/index.d.cts +0 -7
- package/dist/patterns/reactive-layout/index.d.ts +0 -7
- package/dist/patterns/reactive-layout/index.js +0 -1
- package/dist/patterns/reduction/index.cjs +0 -3
- package/dist/patterns/reduction/index.d.cts +0 -6
- package/dist/patterns/reduction/index.d.ts +0 -6
- package/dist/patterns/reduction/index.js +0 -1
- package/dist/patterns/surface/index.cjs +0 -13
- package/dist/patterns/surface/index.d.cts +0 -9
- package/dist/patterns/surface/index.d.ts +0 -9
- package/dist/patterns/surface/index.js +0 -1
- package/dist/reactive-log-BKALbfal.d.ts +0 -223
- package/dist/reactive-log-DIGdYqQ6.d.cts +0 -223
- package/dist/reactive-map-CEFGp8TK.d.cts +0 -296
- package/dist/reactive-map-DS_SIAxv.d.ts +0 -296
- package/dist/resilience-6LYQJAC5.js +0 -1
- package/dist/sugar-DQjFmVqb.d.cts +0 -399
- package/dist/sugar-fhLIE7TT.d.ts +0 -399
- package/dist/topology-tree-Bcz27hpF.d.cts +0 -25
- package/dist/topology-tree-xvaD0fOX.d.ts +0 -25
|
@@ -0,0 +1,807 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/utils/inspect/index.ts
|
|
21
|
+
var inspect_exports = {};
|
|
22
|
+
__export(inspect_exports, {
|
|
23
|
+
AuditTrailGraph: () => AuditTrailGraph,
|
|
24
|
+
PolicyGateGraph: () => PolicyGateGraph,
|
|
25
|
+
auditTrail: () => auditTrail,
|
|
26
|
+
complianceSnapshot: () => complianceSnapshot,
|
|
27
|
+
computeHealthReport: () => computeHealthReport,
|
|
28
|
+
graphLens: () => graphLens,
|
|
29
|
+
healthReportEqual: () => healthReportEqual,
|
|
30
|
+
policyGate: () => policyGate,
|
|
31
|
+
watchTopologyTree: () => import_graph5.watchTopologyTree
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(inspect_exports);
|
|
34
|
+
|
|
35
|
+
// src/utils/inspect/audit.ts
|
|
36
|
+
var import_core3 = require("@graphrefly/pure-ts/core");
|
|
37
|
+
var import_extra3 = require("@graphrefly/pure-ts/extra");
|
|
38
|
+
var import_graph3 = require("@graphrefly/pure-ts/graph");
|
|
39
|
+
|
|
40
|
+
// src/base/meta/domain-meta.ts
|
|
41
|
+
function domainMeta(domain, kind, extra) {
|
|
42
|
+
return {
|
|
43
|
+
[domain]: true,
|
|
44
|
+
[`${domain}_type`]: kind,
|
|
45
|
+
...extra ?? {}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// src/utils/messaging/index.ts
|
|
50
|
+
var import_core2 = require("@graphrefly/pure-ts/core");
|
|
51
|
+
var import_extra2 = require("@graphrefly/pure-ts/extra");
|
|
52
|
+
var import_graph2 = require("@graphrefly/pure-ts/graph");
|
|
53
|
+
|
|
54
|
+
// src/base/mutation/index.ts
|
|
55
|
+
var import_core = require("@graphrefly/pure-ts/core");
|
|
56
|
+
var import_extra = require("@graphrefly/pure-ts/extra");
|
|
57
|
+
var import_graph = require("@graphrefly/pure-ts/graph");
|
|
58
|
+
var DEFAULT_AUDIT_GUARD = (0, import_core.policy)((allow, deny) => {
|
|
59
|
+
allow("observe");
|
|
60
|
+
allow("signal");
|
|
61
|
+
deny("write");
|
|
62
|
+
});
|
|
63
|
+
function deepFreeze(value) {
|
|
64
|
+
if (value === null || typeof value !== "object" || Object.isFrozen(value)) return value;
|
|
65
|
+
for (const k of Object.keys(value)) {
|
|
66
|
+
deepFreeze(value[k]);
|
|
67
|
+
}
|
|
68
|
+
return Object.freeze(value);
|
|
69
|
+
}
|
|
70
|
+
function mutate(act, opts) {
|
|
71
|
+
const { up, down } = typeof act === "function" ? { up: act, down: void 0 } : act;
|
|
72
|
+
const freeze = opts.freeze ?? true;
|
|
73
|
+
if (opts.frame === "inline") {
|
|
74
|
+
return function wrapped(...args) {
|
|
75
|
+
const sealed = freeze ? args.map(deepFreeze) : args;
|
|
76
|
+
const t_ns = (0, import_core.wallClockNs)();
|
|
77
|
+
const seq = opts.seq ? bumpCursor(opts.seq) : void 0;
|
|
78
|
+
try {
|
|
79
|
+
const result = up(...sealed);
|
|
80
|
+
if (opts.log && opts.onSuccessRecord) {
|
|
81
|
+
appendAudit(
|
|
82
|
+
opts.log,
|
|
83
|
+
opts.onSuccessRecord,
|
|
84
|
+
sealed,
|
|
85
|
+
result,
|
|
86
|
+
{ t_ns, seq },
|
|
87
|
+
opts.handlerVersion
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
return result;
|
|
91
|
+
} catch (err) {
|
|
92
|
+
if (opts.log && opts.onFailureRecord) {
|
|
93
|
+
const errorType = err instanceof Error ? err.name : typeof err;
|
|
94
|
+
appendAudit(
|
|
95
|
+
opts.log,
|
|
96
|
+
opts.onFailureRecord,
|
|
97
|
+
sealed,
|
|
98
|
+
err,
|
|
99
|
+
{ t_ns, seq, errorType },
|
|
100
|
+
opts.handlerVersion
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
throw err;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
return function wrapped(...args) {
|
|
108
|
+
const sealed = freeze ? args.map(deepFreeze) : args;
|
|
109
|
+
const t_ns = (0, import_core.wallClockNs)();
|
|
110
|
+
let result;
|
|
111
|
+
let captured;
|
|
112
|
+
let captureSet = false;
|
|
113
|
+
let seq;
|
|
114
|
+
try {
|
|
115
|
+
(0, import_core.batch)(() => {
|
|
116
|
+
if (opts.seq) seq = bumpCursor(opts.seq);
|
|
117
|
+
try {
|
|
118
|
+
result = up(...sealed);
|
|
119
|
+
if (opts.log && opts.onSuccessRecord) {
|
|
120
|
+
appendAudit(
|
|
121
|
+
opts.log,
|
|
122
|
+
opts.onSuccessRecord,
|
|
123
|
+
sealed,
|
|
124
|
+
result,
|
|
125
|
+
{ t_ns, seq },
|
|
126
|
+
opts.handlerVersion
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
} catch (err) {
|
|
130
|
+
captured = err;
|
|
131
|
+
captureSet = true;
|
|
132
|
+
throw err;
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
} catch (outerErr) {
|
|
136
|
+
if (captureSet && down) {
|
|
137
|
+
try {
|
|
138
|
+
down(...sealed);
|
|
139
|
+
} catch (downErr) {
|
|
140
|
+
console.error(
|
|
141
|
+
`mutate: down hook threw \u2014 original action error preserved (${captured instanceof Error ? captured.name : typeof captured}). Down error:`,
|
|
142
|
+
downErr
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
if (captureSet && opts.log && opts.onFailureRecord) {
|
|
147
|
+
const errorType = captured instanceof Error ? captured.name : typeof captured;
|
|
148
|
+
appendAudit(
|
|
149
|
+
opts.log,
|
|
150
|
+
opts.onFailureRecord,
|
|
151
|
+
sealed,
|
|
152
|
+
captured,
|
|
153
|
+
{ t_ns, seq, errorType },
|
|
154
|
+
opts.handlerVersion
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
throw captureSet ? captured : outerErr;
|
|
158
|
+
}
|
|
159
|
+
return result;
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
var _bumpCursorWarned = /* @__PURE__ */ new WeakSet();
|
|
163
|
+
function bumpCursor(seq) {
|
|
164
|
+
const raw = seq.cache;
|
|
165
|
+
const valid = typeof raw === "number" && Number.isFinite(raw);
|
|
166
|
+
if (!valid && raw !== void 0 && !_bumpCursorWarned.has(seq)) {
|
|
167
|
+
_bumpCursorWarned.add(seq);
|
|
168
|
+
console.warn(
|
|
169
|
+
`bumpCursor: cursor cache held a non-numeric value (${String(raw)}); resetting to 0. Causes include: a snapshot codec round-tripping the cursor as a string / null / NaN, OR a malformed initial seed (e.g. state<number>(NaN)). Audit consumers may see colliding seq values after this point.`
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
const cur = valid ? raw : 0;
|
|
173
|
+
const next = cur + 1;
|
|
174
|
+
seq.down([[import_core.DIRTY], [import_core.DATA, next]]);
|
|
175
|
+
return next;
|
|
176
|
+
}
|
|
177
|
+
function appendAudit(audit, builder, args, value, meta, handlerVersion) {
|
|
178
|
+
const record = builder(args, value, meta);
|
|
179
|
+
if (record === void 0) return;
|
|
180
|
+
const stamped = handlerVersion != null ? { ...record, handlerVersion } : record;
|
|
181
|
+
audit.append(stamped);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// src/utils/messaging/index.ts
|
|
185
|
+
function messagingMeta(kind, extra) {
|
|
186
|
+
return domainMeta("messaging", kind, extra);
|
|
187
|
+
}
|
|
188
|
+
var DEFAULT_TOPIC_RETAINED_LIMIT = 1024;
|
|
189
|
+
var TopicGraph = class extends import_graph2.Graph {
|
|
190
|
+
_log;
|
|
191
|
+
_publishImpl;
|
|
192
|
+
events;
|
|
193
|
+
/**
|
|
194
|
+
* Most recently published value. Stays in the protocol SENTINEL state
|
|
195
|
+
* (`cache === undefined`, no DATA emitted) until the first publish, then
|
|
196
|
+
* tracks the latest entry. Spec §5.12 reserves `undefined` as the
|
|
197
|
+
* "never sent DATA" sentinel — and `TopicGraph.publish(undefined)` is
|
|
198
|
+
* rejected — so `cache === undefined` unambiguously signals "empty topic"
|
|
199
|
+
* even when `T` itself includes `null` (i.e., `topic<number | null>`).
|
|
200
|
+
*
|
|
201
|
+
* **Within a reactive fn:** detect the empty-topic case via
|
|
202
|
+
* `ctx.prevData[i] === undefined` for the dep slot holding `topic.latest`,
|
|
203
|
+
* or check `latest.cache === undefined` outside reactive code. No
|
|
204
|
+
* separate `hasLatest` companion needed — the SENTINEL is the answer.
|
|
205
|
+
*/
|
|
206
|
+
latest;
|
|
207
|
+
constructor(name, opts = {}) {
|
|
208
|
+
super(name, opts.graph);
|
|
209
|
+
this._log = (0, import_extra2.reactiveLog)([], {
|
|
210
|
+
name: "events",
|
|
211
|
+
maxSize: opts.retainedLimit ?? DEFAULT_TOPIC_RETAINED_LIMIT
|
|
212
|
+
});
|
|
213
|
+
this.events = this._log.entries;
|
|
214
|
+
this.add(this.events, { name: "events" });
|
|
215
|
+
this.latest = this.derived(
|
|
216
|
+
"latest",
|
|
217
|
+
["events"],
|
|
218
|
+
(batchData, ctx) => {
|
|
219
|
+
const data = batchData.map(
|
|
220
|
+
(batch4, i) => batch4 != null && batch4.length > 0 ? batch4.at(-1) : ctx.prevData[i]
|
|
221
|
+
);
|
|
222
|
+
const entries = data[0];
|
|
223
|
+
return entries.length === 0 ? [] : [entries[entries.length - 1]];
|
|
224
|
+
},
|
|
225
|
+
{ meta: messagingMeta("topic_latest") }
|
|
226
|
+
);
|
|
227
|
+
this.addDisposer((0, import_extra2.keepalive)(this.latest));
|
|
228
|
+
this.addDisposer(() => {
|
|
229
|
+
this.events.down([[import_core2.COMPLETE]]);
|
|
230
|
+
});
|
|
231
|
+
this.addDisposer(() => this._log.disposeAllViews());
|
|
232
|
+
this._publishImpl = mutate(
|
|
233
|
+
(value) => {
|
|
234
|
+
this._log.append(value);
|
|
235
|
+
},
|
|
236
|
+
{ frame: "inline", freeze: false }
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
publish(value) {
|
|
240
|
+
if (value === void 0) {
|
|
241
|
+
throw new TypeError(
|
|
242
|
+
`TopicGraph "${this.name}": publish(undefined) is not allowed (spec \xA75.12 SENTINEL).`
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
this._publishImpl(value);
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Wire one or more append-log storage tiers (Audit 4). Each tier receives
|
|
249
|
+
* appended events per wave; rollback honors the wave-as-transaction model.
|
|
250
|
+
*
|
|
251
|
+
* Named `attachEventStorage` (not `attachStorage`) to avoid colliding with
|
|
252
|
+
* the inherited {@link Graph.attachSnapshotStorage} which takes the
|
|
253
|
+
* paired `AttachSnapshotTierPair[]` shape (Phase 14.6) — distinct
|
|
254
|
+
* concerns, distinct surfaces.
|
|
255
|
+
*
|
|
256
|
+
* @returns Disposer.
|
|
257
|
+
*/
|
|
258
|
+
attachEventStorage(tiers) {
|
|
259
|
+
return this._log.attachStorage(tiers);
|
|
260
|
+
}
|
|
261
|
+
retained() {
|
|
262
|
+
return this.events.cache;
|
|
263
|
+
}
|
|
264
|
+
/** Internal log bundle — used by TopicBridgeGraph for `attach`. */
|
|
265
|
+
get _logBundle() {
|
|
266
|
+
return this._log;
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
// src/utils/inspect/audit.ts
|
|
271
|
+
function auditMeta(kind, extra) {
|
|
272
|
+
return domainMeta("audit", kind, extra);
|
|
273
|
+
}
|
|
274
|
+
var DEFAULT_INCLUDE_TYPES = /* @__PURE__ */ new Set([
|
|
275
|
+
"data",
|
|
276
|
+
"error",
|
|
277
|
+
"complete",
|
|
278
|
+
"teardown"
|
|
279
|
+
]);
|
|
280
|
+
var AuditTrailGraph = class extends import_graph3.Graph {
|
|
281
|
+
entries;
|
|
282
|
+
count;
|
|
283
|
+
/**
|
|
284
|
+
* Effective set of event types this trail records (EH-18). Reflects
|
|
285
|
+
* either the caller-supplied `opts.includeTypes` or the default set
|
|
286
|
+
* (`["data", "error", "complete", "teardown"]`). Captured at construction
|
|
287
|
+
* — each instance owns its own clone, so a default-using trail can never
|
|
288
|
+
* leak mutations into the module-level default set.
|
|
289
|
+
*
|
|
290
|
+
* **Mutation contract.** Type-system read-only via `ReadonlySet`. Runtime
|
|
291
|
+
* mutation through an unsafe cast (`(audit.includeTypes as Set<...>)
|
|
292
|
+
* .add(...)`) is unsupported — it would desync the field from the
|
|
293
|
+
* recording closure, which captured the original `Set` reference at
|
|
294
|
+
* construction. The runtime does NOT enforce immutability beyond the
|
|
295
|
+
* type contract; consumers must respect it.
|
|
296
|
+
*
|
|
297
|
+
* Use this to validate that a `complianceSnapshot.fingerprint` was
|
|
298
|
+
* computed against the same recording surface — fingerprints are stable
|
|
299
|
+
* only when the recording set is identical across snapshots.
|
|
300
|
+
*/
|
|
301
|
+
includeTypes;
|
|
302
|
+
_log;
|
|
303
|
+
_target;
|
|
304
|
+
constructor(target, opts) {
|
|
305
|
+
super(opts.name ?? `${target.name}_audit`, opts.graph);
|
|
306
|
+
this._target = target;
|
|
307
|
+
this._log = (0, import_extra3.reactiveLog)([], {
|
|
308
|
+
name: "entries",
|
|
309
|
+
...opts.maxSize != null ? { maxSize: opts.maxSize } : {}
|
|
310
|
+
});
|
|
311
|
+
this.entries = this._log.entries;
|
|
312
|
+
this.add(this.entries, { name: "entries" });
|
|
313
|
+
this.count = this.derived(
|
|
314
|
+
"count",
|
|
315
|
+
["entries"],
|
|
316
|
+
(batchData, ctx) => {
|
|
317
|
+
const data = batchData.map(
|
|
318
|
+
(batch4, i) => batch4 != null && batch4.length > 0 ? batch4.at(-1) : ctx.prevData[i]
|
|
319
|
+
);
|
|
320
|
+
return [data[0].length];
|
|
321
|
+
},
|
|
322
|
+
{ meta: auditMeta("count") }
|
|
323
|
+
);
|
|
324
|
+
this.addDisposer((0, import_extra3.keepalive)(this.count));
|
|
325
|
+
const includeTypes = opts.includeTypes != null ? new Set(opts.includeTypes) : new Set(DEFAULT_INCLUDE_TYPES);
|
|
326
|
+
this.includeTypes = includeTypes;
|
|
327
|
+
const filter = opts.filter;
|
|
328
|
+
let seq = 0;
|
|
329
|
+
const handle = target.observe({ timeline: true, structured: true });
|
|
330
|
+
const offEvent = handle.onEvent((event) => {
|
|
331
|
+
if (event.type === "derived") return;
|
|
332
|
+
const type = event.type;
|
|
333
|
+
if (!includeTypes.has(type)) return;
|
|
334
|
+
const path = event.path ?? "";
|
|
335
|
+
const entry = {
|
|
336
|
+
seq: seq++,
|
|
337
|
+
timestamp_ns: event.timestamp_ns ?? (0, import_core3.monotonicNs)(),
|
|
338
|
+
wall_clock_ns: (0, import_core3.wallClockNs)(),
|
|
339
|
+
path,
|
|
340
|
+
type
|
|
341
|
+
};
|
|
342
|
+
const node5 = path ? safeNode(target, path) : void 0;
|
|
343
|
+
const lastMutation = node5?.lastMutation;
|
|
344
|
+
if (lastMutation != null) entry.actor = lastMutation.actor;
|
|
345
|
+
if (type === "data") entry.value = event.data;
|
|
346
|
+
if (type === "error") entry.error = event.data;
|
|
347
|
+
const annotation = path ? safeAnnotation(target, path) : void 0;
|
|
348
|
+
if (annotation != null) entry.annotation = annotation;
|
|
349
|
+
if (filter != null && !filter(entry)) return;
|
|
350
|
+
this._log.append(entry);
|
|
351
|
+
});
|
|
352
|
+
this.addDisposer(() => {
|
|
353
|
+
offEvent();
|
|
354
|
+
handle.dispose();
|
|
355
|
+
});
|
|
356
|
+
this.addDisposer(() => this._log.disposeAllViews());
|
|
357
|
+
}
|
|
358
|
+
/** All entries currently in the ring (snapshot). */
|
|
359
|
+
all() {
|
|
360
|
+
return this.entries.cache ?? [];
|
|
361
|
+
}
|
|
362
|
+
/** Entries matching `path`. Order preserved. */
|
|
363
|
+
byNode(path) {
|
|
364
|
+
return this.all().filter((e) => e.path === path);
|
|
365
|
+
}
|
|
366
|
+
/** Entries whose `actor.id` matches. Use `byActorType` for type filtering. */
|
|
367
|
+
byActor(actorId) {
|
|
368
|
+
return this.all().filter((e) => e.actor?.id === actorId);
|
|
369
|
+
}
|
|
370
|
+
/** Entries whose `actor.type` matches (e.g. `"llm"`, `"human"`). */
|
|
371
|
+
byActorType(type) {
|
|
372
|
+
return this.all().filter((e) => e.actor?.type === type);
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Entries with `timestamp_ns` in `[start_ns, end_ns)` (end exclusive).
|
|
376
|
+
* Omit `end_ns` to query open-ended.
|
|
377
|
+
*/
|
|
378
|
+
byTimeRange(start_ns, end_ns) {
|
|
379
|
+
return this.all().filter((e) => {
|
|
380
|
+
if (e.timestamp_ns < start_ns) return false;
|
|
381
|
+
if (end_ns != null && e.timestamp_ns >= end_ns) return false;
|
|
382
|
+
return true;
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
/** Reference to the audited graph (escape hatch for tooling). */
|
|
386
|
+
get target() {
|
|
387
|
+
return this._target;
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
function auditTrail(target, opts = {}) {
|
|
391
|
+
return new AuditTrailGraph(target, opts);
|
|
392
|
+
}
|
|
393
|
+
var PolicyGateGraph = class extends import_graph3.Graph {
|
|
394
|
+
policies;
|
|
395
|
+
violations;
|
|
396
|
+
violationCount;
|
|
397
|
+
_target;
|
|
398
|
+
_mode;
|
|
399
|
+
_currentGuard;
|
|
400
|
+
constructor(target, policies, opts) {
|
|
401
|
+
super(opts.name ?? `${target.name}_policy`, opts.graph);
|
|
402
|
+
this._target = target;
|
|
403
|
+
this._mode = opts.mode ?? "audit";
|
|
404
|
+
const policiesNode = isNode(policies) ? policies : (0, import_core3.node)([], { name: "policies", initial: policies });
|
|
405
|
+
this.policies = policiesNode;
|
|
406
|
+
this.add(this.policies, { name: "policies" });
|
|
407
|
+
this.violations = new TopicGraph("violations", {
|
|
408
|
+
retainedLimit: opts.violationsLimit ?? 1e3
|
|
409
|
+
});
|
|
410
|
+
this.mount("violations", this.violations);
|
|
411
|
+
this.violationCount = this.derived(
|
|
412
|
+
"violationCount",
|
|
413
|
+
["violations::events"],
|
|
414
|
+
(batchData, ctx) => {
|
|
415
|
+
const data = batchData.map(
|
|
416
|
+
(batch4, i) => batch4 != null && batch4.length > 0 ? batch4.at(-1) : ctx.prevData[i]
|
|
417
|
+
);
|
|
418
|
+
return [data[0].length];
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
meta: auditMeta("policy_violation_count")
|
|
422
|
+
}
|
|
423
|
+
);
|
|
424
|
+
this.addDisposer((0, import_extra3.keepalive)(this.violationCount));
|
|
425
|
+
const initialRules = policiesNode.cache ?? [];
|
|
426
|
+
let latestRules = initialRules;
|
|
427
|
+
this._currentGuard = (0, import_core3.policyFromRules)(latestRules);
|
|
428
|
+
const offPolicies = policiesNode.subscribe((msgs) => {
|
|
429
|
+
for (const m of msgs) {
|
|
430
|
+
if (m[0] === import_core3.DATA) {
|
|
431
|
+
latestRules = m[1] ?? [];
|
|
432
|
+
this._currentGuard = (0, import_core3.policyFromRules)(latestRules);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
});
|
|
436
|
+
this.addDisposer(offPolicies);
|
|
437
|
+
const pathsOpt = opts.paths;
|
|
438
|
+
const pathsNode = isNode(pathsOpt) ? pathsOpt : void 0;
|
|
439
|
+
const pathsExplicit = pathsOpt != null;
|
|
440
|
+
const initialPaths = pathsNode != null ? pathsNode.cache ?? [] : pathsExplicit ? [...pathsOpt] : void 0;
|
|
441
|
+
let latestPaths = initialPaths;
|
|
442
|
+
const paths = latestPaths ?? collectPaths(target);
|
|
443
|
+
if (this._mode !== "enforce" && pathsNode != null) {
|
|
444
|
+
const offAuditPaths = pathsNode.subscribe((msgs) => {
|
|
445
|
+
for (const m of msgs) {
|
|
446
|
+
if (m[0] !== import_core3.DATA) continue;
|
|
447
|
+
latestPaths = m[1] ?? [];
|
|
448
|
+
}
|
|
449
|
+
});
|
|
450
|
+
this.addDisposer(offAuditPaths);
|
|
451
|
+
}
|
|
452
|
+
if (this._mode === "enforce") {
|
|
453
|
+
const restorers = /* @__PURE__ */ new Map();
|
|
454
|
+
const wrapAndPush = (path) => {
|
|
455
|
+
if (restorers.has(path)) return;
|
|
456
|
+
const node5 = safeNode(target, path);
|
|
457
|
+
if (!(node5 instanceof import_core3.NodeImpl)) return;
|
|
458
|
+
const pathGuard = (actor, action) => {
|
|
459
|
+
const ok = this._currentGuard(actor, action);
|
|
460
|
+
if (!ok) {
|
|
461
|
+
this._publishViolation(actor, action, path, "blocked");
|
|
462
|
+
}
|
|
463
|
+
return ok;
|
|
464
|
+
};
|
|
465
|
+
restorers.set(path, node5._pushGuard(pathGuard));
|
|
466
|
+
};
|
|
467
|
+
for (const path of paths) wrapAndPush(path);
|
|
468
|
+
if (pathsNode != null) {
|
|
469
|
+
const offReactivePaths = pathsNode.subscribe((msgs) => {
|
|
470
|
+
for (const m of msgs) {
|
|
471
|
+
if (m[0] !== import_core3.DATA) continue;
|
|
472
|
+
const next = m[1] ?? [];
|
|
473
|
+
const nextSet = new Set(next);
|
|
474
|
+
const prevSet = new Set(latestPaths ?? []);
|
|
475
|
+
(0, import_core3.batch)(() => {
|
|
476
|
+
for (const p of prevSet) {
|
|
477
|
+
if (nextSet.has(p)) continue;
|
|
478
|
+
const r = restorers.get(p);
|
|
479
|
+
if (r != null) {
|
|
480
|
+
r();
|
|
481
|
+
restorers.delete(p);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
for (const p of nextSet) {
|
|
485
|
+
if (prevSet.has(p)) continue;
|
|
486
|
+
wrapAndPush(p);
|
|
487
|
+
}
|
|
488
|
+
latestPaths = next;
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
});
|
|
492
|
+
this.addDisposer(offReactivePaths);
|
|
493
|
+
}
|
|
494
|
+
if (!pathsExplicit) {
|
|
495
|
+
const offTopology = (0, import_graph3.watchTopologyTree)(target, (event, emitter, prefix) => {
|
|
496
|
+
if (event.kind === "added") {
|
|
497
|
+
if (event.nodeKind === "node") {
|
|
498
|
+
wrapAndPush(`${prefix}${event.name}`);
|
|
499
|
+
} else {
|
|
500
|
+
const child = emitter._mounts.get(event.name);
|
|
501
|
+
if (!(child instanceof import_graph3.Graph)) return;
|
|
502
|
+
const mountPrefix = `${prefix}${event.name}::`;
|
|
503
|
+
const localPaths = collectPaths(child);
|
|
504
|
+
for (const localPath of localPaths) {
|
|
505
|
+
wrapAndPush(
|
|
506
|
+
localPath === "" ? `${prefix}${event.name}` : `${mountPrefix}${localPath}`
|
|
507
|
+
);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
} else if (event.kind === "removed") {
|
|
511
|
+
if (event.nodeKind === "node") {
|
|
512
|
+
const qp = `${prefix}${event.name}`;
|
|
513
|
+
const r = restorers.get(qp);
|
|
514
|
+
if (r != null) {
|
|
515
|
+
r();
|
|
516
|
+
restorers.delete(qp);
|
|
517
|
+
}
|
|
518
|
+
} else {
|
|
519
|
+
const mountQp = `${prefix}${event.name}`;
|
|
520
|
+
const mountPrefix = `${mountQp}::`;
|
|
521
|
+
for (const [p, r] of restorers) {
|
|
522
|
+
if (p === mountQp || p.startsWith(mountPrefix)) {
|
|
523
|
+
r();
|
|
524
|
+
restorers.delete(p);
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
});
|
|
530
|
+
this.addDisposer(offTopology);
|
|
531
|
+
} else {
|
|
532
|
+
const offCleanup = target.topology.subscribe((msgs) => {
|
|
533
|
+
for (const m of msgs) {
|
|
534
|
+
if (m[0] !== import_core3.DATA) continue;
|
|
535
|
+
const event = m[1];
|
|
536
|
+
if (event.kind !== "removed" || event.nodeKind !== "node") continue;
|
|
537
|
+
const r = restorers.get(event.name);
|
|
538
|
+
if (r != null) {
|
|
539
|
+
r();
|
|
540
|
+
restorers.delete(event.name);
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
});
|
|
544
|
+
this.addDisposer(offCleanup);
|
|
545
|
+
}
|
|
546
|
+
this.addDisposer(() => {
|
|
547
|
+
for (const r of restorers.values()) r();
|
|
548
|
+
restorers.clear();
|
|
549
|
+
});
|
|
550
|
+
} else {
|
|
551
|
+
const handle = target.observe({ timeline: true, structured: true });
|
|
552
|
+
const off = handle.onEvent((event) => {
|
|
553
|
+
if (event.type !== "data" && event.type !== "error") return;
|
|
554
|
+
const path = event.path ?? "";
|
|
555
|
+
if (!path) return;
|
|
556
|
+
if (latestPaths != null && !latestPaths.includes(path)) return;
|
|
557
|
+
const actor = event.actor ?? safeNode(target, path)?.lastMutation?.actor;
|
|
558
|
+
if (actor == null) return;
|
|
559
|
+
const action = "write";
|
|
560
|
+
if (this._currentGuard(actor, action)) return;
|
|
561
|
+
this._publishViolation(actor, action, path, "observed");
|
|
562
|
+
});
|
|
563
|
+
this.addDisposer(() => {
|
|
564
|
+
off();
|
|
565
|
+
handle.dispose();
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
_publishViolation(actor, action, path, result) {
|
|
570
|
+
this.violations.publish({
|
|
571
|
+
timestamp_ns: (0, import_core3.monotonicNs)(),
|
|
572
|
+
wall_clock_ns: (0, import_core3.wallClockNs)(),
|
|
573
|
+
path,
|
|
574
|
+
actor,
|
|
575
|
+
action,
|
|
576
|
+
mode: this._mode,
|
|
577
|
+
result
|
|
578
|
+
});
|
|
579
|
+
}
|
|
580
|
+
/** Snapshot of recorded violations. */
|
|
581
|
+
all() {
|
|
582
|
+
return this.violations.retained();
|
|
583
|
+
}
|
|
584
|
+
get mode() {
|
|
585
|
+
return this._mode;
|
|
586
|
+
}
|
|
587
|
+
get target() {
|
|
588
|
+
return this._target;
|
|
589
|
+
}
|
|
590
|
+
};
|
|
591
|
+
function policyGate(target, policies, opts = {}) {
|
|
592
|
+
const g = new PolicyGateGraph(target, policies, opts);
|
|
593
|
+
g.tagFactory("policyGate", (0, import_core3.placeholderArgs)(opts));
|
|
594
|
+
return g;
|
|
595
|
+
}
|
|
596
|
+
function complianceSnapshot(target, opts = {}) {
|
|
597
|
+
const result = {
|
|
598
|
+
format_version: 1,
|
|
599
|
+
timestamp_ns: (0, import_core3.monotonicNs)(),
|
|
600
|
+
wall_clock_ns: (0, import_core3.wallClockNs)(),
|
|
601
|
+
graph: target.snapshot()
|
|
602
|
+
};
|
|
603
|
+
if (opts.actor != null) result.actor = opts.actor;
|
|
604
|
+
if (opts.audit != null) {
|
|
605
|
+
const entries = [...opts.audit.all()];
|
|
606
|
+
result.audit = { count: entries.length, entries };
|
|
607
|
+
}
|
|
608
|
+
if (opts.policies != null) {
|
|
609
|
+
const rules = opts.policies.policies.cache ?? [];
|
|
610
|
+
result.policies = {
|
|
611
|
+
mode: opts.policies.mode,
|
|
612
|
+
rules,
|
|
613
|
+
violations: [...opts.policies.all()]
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
const fingerprint = computeFingerprint(result);
|
|
617
|
+
return { ...result, fingerprint };
|
|
618
|
+
}
|
|
619
|
+
function isNode(x) {
|
|
620
|
+
return typeof x === "object" && x !== null && "subscribe" in x;
|
|
621
|
+
}
|
|
622
|
+
function safeNode(target, path) {
|
|
623
|
+
try {
|
|
624
|
+
return target.node(path);
|
|
625
|
+
} catch {
|
|
626
|
+
return void 0;
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
function safeAnnotation(target, path) {
|
|
630
|
+
try {
|
|
631
|
+
return target.annotation(path);
|
|
632
|
+
} catch {
|
|
633
|
+
return void 0;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
function collectPaths(target) {
|
|
637
|
+
const described = target.describe({ detail: "minimal" });
|
|
638
|
+
return Object.keys(described.nodes);
|
|
639
|
+
}
|
|
640
|
+
function computeFingerprint(value) {
|
|
641
|
+
return (0, import_core3.defaultHash)(JSON.stringify(canonicalize(value)));
|
|
642
|
+
}
|
|
643
|
+
function canonicalize(value) {
|
|
644
|
+
const stack = /* @__PURE__ */ new Set();
|
|
645
|
+
const walk = (v) => {
|
|
646
|
+
if (v === void 0) return { __undefined: true };
|
|
647
|
+
if (v === null) return null;
|
|
648
|
+
const t = typeof v;
|
|
649
|
+
if (t === "bigint") return { __bigint: v.toString() };
|
|
650
|
+
if (t !== "object") return v;
|
|
651
|
+
const obj = v;
|
|
652
|
+
if (stack.has(obj)) return { __circular: true };
|
|
653
|
+
stack.add(obj);
|
|
654
|
+
try {
|
|
655
|
+
if (Array.isArray(obj)) {
|
|
656
|
+
return obj.map(walk);
|
|
657
|
+
}
|
|
658
|
+
if (obj instanceof Date) {
|
|
659
|
+
return { __date: obj.toISOString() };
|
|
660
|
+
}
|
|
661
|
+
if (obj instanceof RegExp) {
|
|
662
|
+
return { __regexp: { source: obj.source, flags: obj.flags } };
|
|
663
|
+
}
|
|
664
|
+
if (obj instanceof Map) {
|
|
665
|
+
const entries = [...obj.entries()].map(([k, mv]) => [
|
|
666
|
+
walk(k),
|
|
667
|
+
walk(mv)
|
|
668
|
+
]);
|
|
669
|
+
return { __map: entries };
|
|
670
|
+
}
|
|
671
|
+
if (obj instanceof Set) {
|
|
672
|
+
const items = [...obj].map(walk);
|
|
673
|
+
return { __set: items };
|
|
674
|
+
}
|
|
675
|
+
if (ArrayBuffer.isView(obj)) {
|
|
676
|
+
const ta = obj;
|
|
677
|
+
const arr = new Array(ta.length);
|
|
678
|
+
for (let i = 0; i < ta.length; i++) arr[i] = ta[i] ?? 0;
|
|
679
|
+
return { __typed_array: { ctor: obj.constructor.name, data: arr } };
|
|
680
|
+
}
|
|
681
|
+
const out = {};
|
|
682
|
+
for (const k of Object.keys(obj).sort()) {
|
|
683
|
+
out[k] = walk(obj[k]);
|
|
684
|
+
}
|
|
685
|
+
return out;
|
|
686
|
+
} finally {
|
|
687
|
+
stack.delete(obj);
|
|
688
|
+
}
|
|
689
|
+
};
|
|
690
|
+
return walk(value);
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
// src/utils/inspect/lens.ts
|
|
694
|
+
var import_core4 = require("@graphrefly/pure-ts/core");
|
|
695
|
+
var import_extra4 = require("@graphrefly/pure-ts/extra");
|
|
696
|
+
var import_graph4 = require("@graphrefly/pure-ts/graph");
|
|
697
|
+
var import_graph5 = require("@graphrefly/pure-ts/graph");
|
|
698
|
+
function computeHealthReport(described) {
|
|
699
|
+
const problems = [];
|
|
700
|
+
for (const [path, desc] of Object.entries(described.nodes)) {
|
|
701
|
+
if (desc.status !== "errored") continue;
|
|
702
|
+
const entry = { path, status: "errored" };
|
|
703
|
+
const upstream = (0, import_graph4.reachable)(described, path, "upstream", {});
|
|
704
|
+
for (const p of upstream) {
|
|
705
|
+
if (p === path) continue;
|
|
706
|
+
if (described.nodes[p]?.status === "errored") {
|
|
707
|
+
entry.upstreamCause = p;
|
|
708
|
+
break;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
problems.push(entry);
|
|
712
|
+
}
|
|
713
|
+
problems.sort((a, b) => a.path < b.path ? -1 : a.path > b.path ? 1 : 0);
|
|
714
|
+
return { ok: problems.length === 0, problems };
|
|
715
|
+
}
|
|
716
|
+
function healthReportEqual(a, b) {
|
|
717
|
+
if (a.ok !== b.ok) return false;
|
|
718
|
+
if (a.problems.length !== b.problems.length) return false;
|
|
719
|
+
for (let i = 0; i < a.problems.length; i++) {
|
|
720
|
+
const x = a.problems[i];
|
|
721
|
+
const y = b.problems[i];
|
|
722
|
+
if (x.path !== y.path) return false;
|
|
723
|
+
if (x.status !== y.status) return false;
|
|
724
|
+
if (x.upstreamCause !== y.upstreamCause) return false;
|
|
725
|
+
}
|
|
726
|
+
return true;
|
|
727
|
+
}
|
|
728
|
+
function graphLens(target) {
|
|
729
|
+
const topologyHandle = target.describe({
|
|
730
|
+
reactive: true,
|
|
731
|
+
detail: "standard",
|
|
732
|
+
reactiveName: "graphLens.topology"
|
|
733
|
+
});
|
|
734
|
+
const topology = topologyHandle.node;
|
|
735
|
+
const health = (0, import_core4.node)(
|
|
736
|
+
[topology],
|
|
737
|
+
(batchData, actions, ctx) => {
|
|
738
|
+
const data = batchData.map(
|
|
739
|
+
(batch4, i) => batch4 != null && batch4.length > 0 ? batch4.at(-1) : ctx.prevData[i]
|
|
740
|
+
);
|
|
741
|
+
actions.emit(computeHealthReport(data[0]));
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
name: "graphLens.health",
|
|
745
|
+
describeKind: "derived",
|
|
746
|
+
equals: healthReportEqual,
|
|
747
|
+
meta: domainMeta("lens", "health")
|
|
748
|
+
}
|
|
749
|
+
);
|
|
750
|
+
const stopHealthKeep = (0, import_extra4.keepalive)(health);
|
|
751
|
+
const flowMap = /* @__PURE__ */ new Map();
|
|
752
|
+
let lastAppliedFlush_ns = -1;
|
|
753
|
+
const dataFlow = target.observe({ reactive: true, tiers: ["data"] });
|
|
754
|
+
const flow = (0, import_core4.node)(
|
|
755
|
+
[dataFlow, topology],
|
|
756
|
+
(batchData, actions, ctx) => {
|
|
757
|
+
const data = batchData.map(
|
|
758
|
+
(batch4, i) => batch4 != null && batch4.length > 0 ? batch4.at(-1) : ctx.prevData[i]
|
|
759
|
+
);
|
|
760
|
+
const changeset = data[0];
|
|
761
|
+
const described = data[1];
|
|
762
|
+
const c = changeset;
|
|
763
|
+
const desc = described;
|
|
764
|
+
if (c != null && c.flushedAt_ns > lastAppliedFlush_ns) {
|
|
765
|
+
lastAppliedFlush_ns = c.flushedAt_ns;
|
|
766
|
+
for (const event of c.events) {
|
|
767
|
+
if (event.type !== "data") continue;
|
|
768
|
+
const path = event.path;
|
|
769
|
+
if (path == null || path === "") continue;
|
|
770
|
+
const prior = flowMap.get(path);
|
|
771
|
+
flowMap.set(path, {
|
|
772
|
+
path,
|
|
773
|
+
count: (prior?.count ?? 0) + 1,
|
|
774
|
+
lastUpdate_ns: c.flushedAt_ns
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
if (desc != null && flowMap.size > 0) {
|
|
779
|
+
const valid = new Set(Object.keys(desc.nodes));
|
|
780
|
+
for (const k of [...flowMap.keys()]) {
|
|
781
|
+
if (!valid.has(k)) flowMap.delete(k);
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
actions.emit(new Map(flowMap));
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
name: "graphLens.flow",
|
|
788
|
+
describeKind: "derived",
|
|
789
|
+
meta: domainMeta("lens", "flow")
|
|
790
|
+
}
|
|
791
|
+
);
|
|
792
|
+
const stopFlowKeep = (0, import_extra4.keepalive)(flow);
|
|
793
|
+
let disposed = false;
|
|
794
|
+
return {
|
|
795
|
+
topology,
|
|
796
|
+
health,
|
|
797
|
+
flow,
|
|
798
|
+
dispose() {
|
|
799
|
+
if (disposed) return;
|
|
800
|
+
disposed = true;
|
|
801
|
+
stopFlowKeep();
|
|
802
|
+
stopHealthKeep();
|
|
803
|
+
topologyHandle.dispose();
|
|
804
|
+
}
|
|
805
|
+
};
|
|
806
|
+
}
|
|
807
|
+
//# sourceMappingURL=index.cjs.map
|