@graphrefly/graphrefly 0.44.0 → 0.45.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 +21 -17
- package/dist/compat/index.cjs +20 -10
- package/dist/compat/index.cjs.map +1 -0
- package/dist/compat/index.d.cts +1 -22
- package/dist/compat/index.d.ts +1 -22
- package/dist/compat/index.js +3 -1
- package/dist/compat/index.js.map +1 -0
- package/dist/compat/jotai/index.cjs +21 -1
- package/dist/compat/jotai/index.cjs.map +1 -0
- package/dist/compat/jotai/index.d.cts +1 -2
- package/dist/compat/jotai/index.d.ts +1 -2
- package/dist/compat/jotai/index.js +3 -1
- package/dist/compat/jotai/index.js.map +1 -0
- package/dist/compat/nanostores/index.cjs +21 -1
- package/dist/compat/nanostores/index.cjs.map +1 -0
- package/dist/compat/nanostores/index.d.cts +1 -2
- package/dist/compat/nanostores/index.d.ts +1 -2
- package/dist/compat/nanostores/index.js +3 -1
- package/dist/compat/nanostores/index.js.map +1 -0
- package/dist/compat/nestjs/index.cjs +20 -10
- package/dist/compat/nestjs/index.cjs.map +1 -0
- package/dist/compat/nestjs/index.d.cts +1 -13
- package/dist/compat/nestjs/index.d.ts +1 -13
- package/dist/compat/nestjs/index.js +3 -1
- package/dist/compat/nestjs/index.js.map +1 -0
- package/dist/compat/react/index.cjs +21 -1
- package/dist/compat/react/index.cjs.map +1 -0
- package/dist/compat/react/index.d.cts +1 -2
- package/dist/compat/react/index.d.ts +1 -2
- package/dist/compat/react/index.js +3 -1
- package/dist/compat/react/index.js.map +1 -0
- package/dist/compat/solid/index.cjs +21 -1
- package/dist/compat/solid/index.cjs.map +1 -0
- package/dist/compat/solid/index.d.cts +1 -2
- package/dist/compat/solid/index.d.ts +1 -2
- package/dist/compat/solid/index.js +3 -1
- package/dist/compat/solid/index.js.map +1 -0
- package/dist/compat/svelte/index.cjs +21 -1
- package/dist/compat/svelte/index.cjs.map +1 -0
- package/dist/compat/svelte/index.d.cts +1 -2
- package/dist/compat/svelte/index.d.ts +1 -2
- package/dist/compat/svelte/index.js +3 -1
- package/dist/compat/svelte/index.js.map +1 -0
- package/dist/compat/vue/index.cjs +21 -1
- package/dist/compat/vue/index.cjs.map +1 -0
- package/dist/compat/vue/index.d.cts +1 -3
- package/dist/compat/vue/index.d.ts +1 -3
- package/dist/compat/vue/index.js +3 -1
- package/dist/compat/vue/index.js.map +1 -0
- package/dist/compat/zustand/index.cjs +21 -3
- package/dist/compat/zustand/index.cjs.map +1 -0
- package/dist/compat/zustand/index.d.cts +1 -6
- package/dist/compat/zustand/index.d.ts +1 -6
- package/dist/compat/zustand/index.js +3 -1
- package/dist/compat/zustand/index.js.map +1 -0
- package/dist/core/index.cjs +21 -1
- package/dist/core/index.cjs.map +1 -0
- package/dist/core/index.d.cts +1 -3
- package/dist/core/index.d.ts +1 -3
- package/dist/core/index.js +3 -1
- package/dist/core/index.js.map +1 -0
- package/dist/extra/browser.cjs +21 -1
- package/dist/extra/browser.cjs.map +1 -0
- package/dist/extra/browser.d.cts +1 -4
- package/dist/extra/browser.d.ts +1 -4
- package/dist/extra/browser.js +3 -1
- package/dist/extra/browser.js.map +1 -0
- package/dist/extra/index.cjs +20 -19
- package/dist/extra/index.cjs.map +1 -0
- package/dist/extra/index.d.cts +1 -17
- package/dist/extra/index.d.ts +1 -17
- package/dist/extra/index.js +3 -1
- package/dist/extra/index.js.map +1 -0
- package/dist/extra/node.cjs +21 -2
- package/dist/extra/node.cjs.map +1 -0
- package/dist/extra/node.d.cts +1 -187
- package/dist/extra/node.d.ts +1 -187
- package/dist/extra/node.js +3 -2
- package/dist/extra/node.js.map +1 -0
- package/dist/extra/operators.cjs +21 -1
- package/dist/extra/operators.cjs.map +1 -0
- package/dist/extra/operators.d.cts +1 -958
- package/dist/extra/operators.d.ts +1 -958
- package/dist/extra/operators.js +3 -1
- package/dist/extra/operators.js.map +1 -0
- package/dist/extra/reactive.cjs +21 -1
- package/dist/extra/reactive.cjs.map +1 -0
- package/dist/extra/reactive.d.cts +1 -353
- package/dist/extra/reactive.d.ts +1 -353
- package/dist/extra/reactive.js +3 -1
- package/dist/extra/reactive.js.map +1 -0
- package/dist/extra/render/index.cjs +21 -5
- package/dist/extra/render/index.cjs.map +1 -0
- package/dist/extra/render/index.d.cts +1 -183
- package/dist/extra/render/index.d.ts +1 -183
- package/dist/extra/render/index.js +3 -1
- package/dist/extra/render/index.js.map +1 -0
- package/dist/extra/sources.cjs +21 -3
- package/dist/extra/sources.cjs.map +1 -0
- package/dist/extra/sources.d.cts +1 -584
- package/dist/extra/sources.d.ts +1 -584
- package/dist/extra/sources.js +3 -1
- package/dist/extra/sources.js.map +1 -0
- package/dist/extra/storage-browser.cjs +21 -1
- package/dist/extra/storage-browser.cjs.map +1 -0
- package/dist/extra/storage-browser.d.cts +1 -37
- package/dist/extra/storage-browser.d.ts +1 -37
- package/dist/extra/storage-browser.js +3 -1
- package/dist/extra/storage-browser.js.map +1 -0
- package/dist/extra/storage-core.cjs +21 -1
- package/dist/extra/storage-core.cjs.map +1 -0
- package/dist/extra/storage-core.d.cts +1 -28
- package/dist/extra/storage-core.d.ts +1 -28
- package/dist/extra/storage-core.js +3 -1
- package/dist/extra/storage-core.js.map +1 -0
- package/dist/extra/storage-node.cjs +20 -0
- package/dist/extra/storage-node.cjs.map +1 -0
- package/dist/extra/storage-node.d.cts +1 -2
- package/dist/extra/storage-node.d.ts +1 -2
- package/dist/extra/storage-node.js +3 -0
- package/dist/extra/storage-node.js.map +1 -0
- package/dist/extra/storage-tiers-browser.cjs +21 -1
- package/dist/extra/storage-tiers-browser.cjs.map +1 -0
- package/dist/extra/storage-tiers-browser.d.cts +1 -120
- package/dist/extra/storage-tiers-browser.d.ts +1 -120
- package/dist/extra/storage-tiers-browser.js +3 -1
- package/dist/extra/storage-tiers-browser.js.map +1 -0
- package/dist/extra/storage-tiers-node.cjs +21 -1
- package/dist/extra/storage-tiers-node.cjs.map +1 -0
- package/dist/extra/storage-tiers-node.d.cts +1 -210
- package/dist/extra/storage-tiers-node.d.ts +1 -210
- package/dist/extra/storage-tiers-node.js +3 -1
- package/dist/extra/storage-tiers-node.js.map +1 -0
- package/dist/extra/storage-tiers.cjs +21 -1
- package/dist/extra/storage-tiers.cjs.map +1 -0
- package/dist/extra/storage-tiers.d.cts +1 -412
- package/dist/extra/storage-tiers.d.ts +1 -412
- package/dist/extra/storage-tiers.js +3 -1
- package/dist/extra/storage-tiers.js.map +1 -0
- package/dist/extra/storage-wal.cjs +21 -0
- package/dist/extra/storage-wal.cjs.map +1 -0
- package/dist/extra/storage-wal.d.cts +1 -0
- package/dist/extra/storage-wal.d.ts +1 -0
- package/dist/extra/storage-wal.js +3 -0
- package/dist/extra/storage-wal.js.map +1 -0
- package/dist/graph/index.cjs +21 -7
- package/dist/graph/index.cjs.map +1 -0
- package/dist/graph/index.d.cts +1 -7
- package/dist/graph/index.d.ts +1 -7
- package/dist/graph/index.js +3 -1
- package/dist/graph/index.js.map +1 -0
- package/dist/index.cjs +20 -227
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +45 -95
- package/dist/index.d.ts +45 -95
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -0
- package/dist/patterns/ai/browser.cjs +20 -7
- package/dist/patterns/ai/browser.cjs.map +1 -0
- package/dist/patterns/ai/browser.d.cts +1 -127
- package/dist/patterns/ai/browser.d.ts +1 -127
- package/dist/patterns/ai/browser.js +3 -3
- package/dist/patterns/ai/browser.js.map +1 -0
- package/dist/patterns/ai/index.cjs +20 -73
- package/dist/patterns/ai/index.cjs.map +1 -0
- package/dist/patterns/ai/index.d.cts +1 -20
- package/dist/patterns/ai/index.d.ts +1 -20
- package/dist/patterns/ai/index.js +3 -1
- package/dist/patterns/ai/index.js.map +1 -0
- package/dist/patterns/ai/node.cjs +21 -1
- package/dist/patterns/ai/node.cjs.map +1 -0
- package/dist/patterns/ai/node.d.cts +1 -59
- package/dist/patterns/ai/node.d.ts +1 -59
- package/dist/patterns/ai/node.js +3 -1
- package/dist/patterns/ai/node.js.map +1 -0
- package/dist/patterns/cqrs/index.cjs +21 -3
- package/dist/patterns/cqrs/index.cjs.map +1 -0
- package/dist/patterns/cqrs/index.d.cts +1 -8
- package/dist/patterns/cqrs/index.d.ts +1 -8
- package/dist/patterns/cqrs/index.js +3 -1
- package/dist/patterns/cqrs/index.js.map +1 -0
- package/dist/patterns/demo-shell/index.cjs +21 -5
- package/dist/patterns/demo-shell/index.cjs.map +1 -0
- package/dist/patterns/demo-shell/index.d.cts +1 -7
- package/dist/patterns/demo-shell/index.d.ts +1 -7
- package/dist/patterns/demo-shell/index.js +3 -1
- package/dist/patterns/demo-shell/index.js.map +1 -0
- package/dist/patterns/domain-templates/index.cjs +21 -3
- package/dist/patterns/domain-templates/index.cjs.map +1 -0
- package/dist/patterns/domain-templates/index.d.cts +1 -6
- package/dist/patterns/domain-templates/index.d.ts +1 -6
- package/dist/patterns/domain-templates/index.js +3 -1
- package/dist/patterns/domain-templates/index.js.map +1 -0
- package/dist/patterns/graphspec/index.cjs +21 -86
- package/dist/patterns/graphspec/index.cjs.map +1 -0
- package/dist/patterns/graphspec/index.d.cts +1 -8
- package/dist/patterns/graphspec/index.d.ts +1 -8
- package/dist/patterns/graphspec/index.js +3 -1
- package/dist/patterns/graphspec/index.js.map +1 -0
- package/dist/patterns/harness/index.cjs +21 -48
- package/dist/patterns/harness/index.cjs.map +1 -0
- package/dist/patterns/harness/index.d.cts +1 -13
- package/dist/patterns/harness/index.d.ts +1 -13
- package/dist/patterns/harness/index.js +3 -1
- package/dist/patterns/harness/index.js.map +1 -0
- package/dist/patterns/inspect/index.cjs +21 -3
- package/dist/patterns/inspect/index.cjs.map +1 -0
- package/dist/patterns/inspect/index.d.cts +1 -9
- package/dist/patterns/inspect/index.d.ts +1 -9
- package/dist/patterns/inspect/index.js +3 -1
- package/dist/patterns/inspect/index.js.map +1 -0
- package/dist/patterns/job-queue/index.cjs +21 -3
- package/dist/patterns/job-queue/index.cjs.map +1 -0
- package/dist/patterns/job-queue/index.d.cts +1 -9
- package/dist/patterns/job-queue/index.d.ts +1 -9
- package/dist/patterns/job-queue/index.js +3 -1
- package/dist/patterns/job-queue/index.js.map +1 -0
- package/dist/patterns/memory/index.cjs +21 -3
- package/dist/patterns/memory/index.cjs.map +1 -0
- package/dist/patterns/memory/index.d.cts +1 -8
- package/dist/patterns/memory/index.d.ts +1 -8
- package/dist/patterns/memory/index.js +3 -1
- package/dist/patterns/memory/index.js.map +1 -0
- package/dist/patterns/messaging/index.cjs +21 -3
- package/dist/patterns/messaging/index.cjs.map +1 -0
- package/dist/patterns/messaging/index.d.cts +1 -7
- package/dist/patterns/messaging/index.d.ts +1 -7
- package/dist/patterns/messaging/index.js +3 -1
- package/dist/patterns/messaging/index.js.map +1 -0
- package/dist/patterns/orchestration/index.cjs +21 -3
- package/dist/patterns/orchestration/index.cjs.map +1 -0
- package/dist/patterns/orchestration/index.d.cts +1 -8
- package/dist/patterns/orchestration/index.d.ts +1 -8
- package/dist/patterns/orchestration/index.js +3 -1
- package/dist/patterns/orchestration/index.js.map +1 -0
- package/dist/patterns/process/index.cjs +21 -3
- package/dist/patterns/process/index.cjs.map +1 -0
- package/dist/patterns/process/index.d.cts +1 -10
- package/dist/patterns/process/index.d.ts +1 -10
- package/dist/patterns/process/index.js +3 -1
- package/dist/patterns/process/index.js.map +1 -0
- package/dist/patterns/reactive-layout/index.cjs +21 -4
- package/dist/patterns/reactive-layout/index.cjs.map +1 -0
- package/dist/patterns/reactive-layout/index.d.cts +1 -7
- package/dist/patterns/reactive-layout/index.d.ts +1 -7
- package/dist/patterns/reactive-layout/index.js +3 -1
- package/dist/patterns/reactive-layout/index.js.map +1 -0
- package/dist/patterns/reduction/index.cjs +21 -3
- package/dist/patterns/reduction/index.cjs.map +1 -0
- package/dist/patterns/reduction/index.d.cts +1 -6
- package/dist/patterns/reduction/index.d.ts +1 -6
- package/dist/patterns/reduction/index.js +3 -1
- package/dist/patterns/reduction/index.js.map +1 -0
- package/dist/patterns/surface/index.cjs +21 -13
- package/dist/patterns/surface/index.cjs.map +1 -0
- package/dist/patterns/surface/index.d.cts +1 -9
- package/dist/patterns/surface/index.d.ts +1 -9
- package/dist/patterns/surface/index.js +3 -1
- package/dist/patterns/surface/index.js.map +1 -0
- package/dist/patterns/topology-view/index.cjs +21 -0
- package/dist/patterns/topology-view/index.cjs.map +1 -0
- package/dist/patterns/topology-view/index.d.cts +1 -0
- package/dist/patterns/topology-view/index.d.ts +1 -0
- package/dist/patterns/topology-view/index.js +3 -0
- package/dist/patterns/topology-view/index.js.map +1 -0
- package/dist/testing/index.cjs +21 -0
- package/dist/testing/index.cjs.map +1 -0
- package/dist/testing/index.d.cts +1 -0
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/index.js +3 -0
- package/dist/testing/index.js.map +1 -0
- package/package.json +608 -584
- package/dist/backoff-HPZMEZNF.js +0 -1
- package/dist/cascading-BglDkMdX.d.cts +0 -199
- package/dist/cascading-MFgxu7Yo.d.ts +0 -199
- 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/decay-BvOWTZ00.d.ts +0 -112
- package/dist/decay-CFlLvXUT.d.cts +0 -112
- package/dist/fallback-74oxi34l.d.cts +0 -250
- package/dist/fallback-DUyyBTBK.d.ts +0 -250
- 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-B-_tFaqV.d.cts +0 -468
- package/dist/index-B17QddL1.d.cts +0 -374
- package/dist/index-B1F8Enjf.d.ts +0 -704
- package/dist/index-B5S8ULbU.d.ts +0 -515
- package/dist/index-B8YnZpIR.d.ts +0 -102
- package/dist/index-BHskSB8v.d.ts +0 -3413
- package/dist/index-BIYAkbAi.d.cts +0 -26
- package/dist/index-BQSKmbuG.d.cts +0 -127
- package/dist/index-BaQaY_IQ.d.cts +0 -231
- package/dist/index-BmZXHqkE.d.ts +0 -36
- package/dist/index-BoJ5JHxI.d.ts +0 -557
- package/dist/index-BocU7pqs.d.ts +0 -779
- package/dist/index-BrPrLl4e.d.cts +0 -86
- package/dist/index-BxNs2HB9.d.cts +0 -1858
- package/dist/index-Byu-OpX_.d.ts +0 -113
- package/dist/index-C1T3d7V-.d.cts +0 -704
- package/dist/index-C5ri2Axc.d.cts +0 -301
- package/dist/index-C5stwKcw.d.cts +0 -44
- package/dist/index-C9l6OEBL.d.ts +0 -26
- package/dist/index-CBBLl_rc.d.ts +0 -127
- package/dist/index-CBGUK09R.d.ts +0 -754
- package/dist/index-CC-AvFTy.d.cts +0 -557
- package/dist/index-CJF1URuX.d.ts +0 -121
- package/dist/index-CK29LV56.d.cts +0 -34
- package/dist/index-CMh5Rz1y.d.ts +0 -385
- package/dist/index-CPQlGA29.d.ts +0 -34
- package/dist/index-CR8QpwX8.d.ts +0 -2680
- package/dist/index-CS0LTlB8.d.cts +0 -385
- package/dist/index-CSOmP7xT.d.cts +0 -291
- package/dist/index-CYq8vAyV.d.ts +0 -291
- package/dist/index-CZ3r5Rxp.d.ts +0 -374
- package/dist/index-CasX6Pfq.d.cts +0 -358
- package/dist/index-CdAlHFEt.d.ts +0 -44
- package/dist/index-CdTelp1M.d.ts +0 -202
- package/dist/index-CeFiHtAg.d.ts +0 -468
- package/dist/index-Cj3WohTd.d.cts +0 -202
- package/dist/index-Climxqsu.d.cts +0 -754
- package/dist/index-Co7uli2l.d.cts +0 -3413
- package/dist/index-CviRnE4K.d.ts +0 -45
- package/dist/index-Cwv0KWcU.d.cts +0 -102
- package/dist/index-CzLVrjxn.d.ts +0 -231
- package/dist/index-D0aciIex.d.cts +0 -209
- package/dist/index-DHen9Klo.d.ts +0 -1858
- package/dist/index-DV_1YuVk.d.cts +0 -221
- package/dist/index-Dc4AYqrJ.d.cts +0 -515
- package/dist/index-Dgl1HpPn.d.ts +0 -86
- package/dist/index-DisjX8a-.d.ts +0 -221
- package/dist/index-UPSiS-X7.d.cts +0 -2680
- package/dist/index-Yq60JP3s.d.ts +0 -209
- package/dist/index-ZVQhLa2i.d.cts +0 -37
- package/dist/index-_6ODbuOu.d.cts +0 -45
- package/dist/index-hcDJ8PSI.d.cts +0 -36
- package/dist/index-nozs3fFC.d.ts +0 -301
- package/dist/index-p09KSrTN.d.ts +0 -358
- package/dist/index-sqkqlb1p.d.ts +0 -37
- package/dist/index-tRCxuAXF.d.cts +0 -113
- package/dist/node-kK3CvTrR.d.cts +0 -1347
- package/dist/node-kK3CvTrR.d.ts +0 -1347
- package/dist/observable-DWjNfLvC.d.ts +0 -36
- package/dist/observable-e3eiPPFy.d.cts +0 -36
- package/dist/pipeline-graph-CIKhynsF.d.cts +0 -142
- package/dist/pipeline-graph-Sgj0gCwn.d.ts +0 -142
- package/dist/reactive-layout-DOTs9P3X.d.ts +0 -183
- package/dist/reactive-layout-DgctbqZo.d.cts +0 -183
- 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
- package/dist/types-C0_yquda.d.cts +0 -442
- package/dist/types-CWFysE9E.d.ts +0 -442
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// `@graphrefly/graphrefly` is a thin re-export layer over the chosen sibling\n// impl (per PART 13 of `archive/docs/SESSION-rust-port-architecture.md`).\n// Three siblings (D082): `@graphrefly/native` (napi-rs, Node fast path),\n// `@graphrefly/wasm` (wasm-bindgen, browser fast path opt-in subpath),\n// `@graphrefly/pure-ts` (universal fallback, permanent first-class peer per\n// D084). Until the facade build lands (Deferred 1 of PART 13), this shim\n// delegates everything to `@graphrefly/pure-ts` directly.\nexport * from \"@graphrefly/pure-ts\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAOA,0BAAc,gCAPd;","names":[]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,95 +1,45 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
import '
|
|
46
|
-
import './fallback-74oxi34l.cjs';
|
|
47
|
-
import './pipeline-graph-CIKhynsF.cjs';
|
|
48
|
-
import './reactive-layout-DgctbqZo.cjs';
|
|
49
|
-
import 'rxjs';
|
|
50
|
-
import '@nestjs/common';
|
|
51
|
-
import '@nestjs/core';
|
|
52
|
-
import 'vue';
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Patterns layer: domain/solution helpers (Phase 4+).
|
|
56
|
-
*/
|
|
57
|
-
|
|
58
|
-
declare const index_CatalogFnEntry: typeof CatalogFnEntry;
|
|
59
|
-
declare const index_CatalogSourceEntry: typeof CatalogSourceEntry;
|
|
60
|
-
declare const index_ConfigFieldSchema: typeof ConfigFieldSchema;
|
|
61
|
-
declare const index_CreateGraphOptions: typeof CreateGraphOptions;
|
|
62
|
-
declare const index_FnFactory: typeof FnFactory;
|
|
63
|
-
declare const index_GraphSpec: typeof GraphSpec;
|
|
64
|
-
declare const index_GraphSpecCatalog: typeof GraphSpecCatalog;
|
|
65
|
-
declare const index_GraphSpecFeedbackEdge: typeof GraphSpecFeedbackEdge;
|
|
66
|
-
declare const index_GraphSpecNode: typeof GraphSpecNode;
|
|
67
|
-
declare const index_GraphSpecTemplate: typeof GraphSpecTemplate;
|
|
68
|
-
declare const index_GraphSpecTemplateRef: typeof GraphSpecTemplateRef;
|
|
69
|
-
declare const index_GraphSpecValidation: typeof GraphSpecValidation;
|
|
70
|
-
declare const index_ReduceOptions: typeof ReduceOptions;
|
|
71
|
-
declare const index_RestoreSnapshotOptions: typeof RestoreSnapshotOptions;
|
|
72
|
-
declare const index_SNAPSHOT_WIRE_VERSION: typeof SNAPSHOT_WIRE_VERSION;
|
|
73
|
-
declare const index_SaveSnapshotResult: typeof SaveSnapshotResult;
|
|
74
|
-
declare const index_SourceFactory: typeof SourceFactory;
|
|
75
|
-
declare const index_SurfaceError: typeof SurfaceError;
|
|
76
|
-
declare const index_SurfaceErrorCode: typeof SurfaceErrorCode;
|
|
77
|
-
declare const index_SurfaceErrorPayload: typeof SurfaceErrorPayload;
|
|
78
|
-
declare const index_asSurfaceError: typeof asSurfaceError;
|
|
79
|
-
declare const index_createGraph: typeof createGraph;
|
|
80
|
-
declare const index_deleteSnapshot: typeof deleteSnapshot;
|
|
81
|
-
declare const index_diffSnapshots: typeof diffSnapshots;
|
|
82
|
-
declare const index_listSnapshots: typeof listSnapshots;
|
|
83
|
-
declare const index_restoreSnapshot: typeof restoreSnapshot;
|
|
84
|
-
declare const index_runReduction: typeof runReduction;
|
|
85
|
-
declare const index_saveSnapshot: typeof saveSnapshot;
|
|
86
|
-
declare namespace index {
|
|
87
|
-
export { index_CatalogFnEntry as CatalogFnEntry, index_CatalogSourceEntry as CatalogSourceEntry, index_ConfigFieldSchema as ConfigFieldSchema, index_CreateGraphOptions as CreateGraphOptions, index_FnFactory as FnFactory, index_GraphSpec as GraphSpec, index_GraphSpecCatalog as GraphSpecCatalog, index_GraphSpecFeedbackEdge as GraphSpecFeedbackEdge, index_GraphSpecNode as GraphSpecNode, index_GraphSpecTemplate as GraphSpecTemplate, index_GraphSpecTemplateRef as GraphSpecTemplateRef, index_GraphSpecValidation as GraphSpecValidation, index_ReduceOptions as ReduceOptions, index_RestoreSnapshotOptions as RestoreSnapshotOptions, index_SNAPSHOT_WIRE_VERSION as SNAPSHOT_WIRE_VERSION, index_SaveSnapshotResult as SaveSnapshotResult, index_SourceFactory as SourceFactory, index_SurfaceError as SurfaceError, index_SurfaceErrorCode as SurfaceErrorCode, index_SurfaceErrorPayload as SurfaceErrorPayload, index$1 as ai, index_asSurfaceError as asSurfaceError, index$2 as cqrs, index_createGraph as createGraph, index_deleteSnapshot as deleteSnapshot, index$3 as demoShell, index_diffSnapshots as diffSnapshots, index$4 as domainTemplates, index$5 as graphspec, index$6 as harness, index$7 as inspect, index$8 as jobQueue, index$9 as layout, index_listSnapshots as listSnapshots, index$a as memory, index$b as messaging, index$c as orchestration, index$d as process, index$e as reduction, index_restoreSnapshot as restoreSnapshot, index_runReduction as runReduction, index_saveSnapshot as saveSnapshot, index$f as surface };
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* GraphRefly — public API surface.
|
|
92
|
-
*/
|
|
93
|
-
declare const version = "0.0.0";
|
|
94
|
-
|
|
95
|
-
export { CatalogFnEntry, CatalogSourceEntry, ConfigFieldSchema, CreateGraphOptions, FnFactory, GraphSpec, GraphSpecCatalog, GraphSpecFeedbackEdge, GraphSpecNode, GraphSpecTemplate, GraphSpecTemplateRef, GraphSpecValidation, ReduceOptions, RestoreSnapshotOptions, SNAPSHOT_WIRE_VERSION, SaveSnapshotResult, SourceFactory, SurfaceError, SurfaceErrorCode, SurfaceErrorPayload, index$1 as ai, asSurfaceError, index$2 as cqrs, createGraph, deleteSnapshot, index$3 as demoShell, diffSnapshots, index$4 as domainTemplates, index$5 as graphspec, index$6 as harness, index$7 as inspect, index$8 as jobQueue, index$9 as layout, listSnapshots, index$a as memory, index$b as messaging, index$c as orchestration, index as patterns, index$d as process, index$e as reduction, restoreSnapshot, runReduction, saveSnapshot, index$f as surface, version };
|
|
1
|
+
export * from '@graphrefly/pure-ts';
|
|
2
|
+
import '@graphrefly/pure-ts/compat';
|
|
3
|
+
import '@graphrefly/pure-ts/core';
|
|
4
|
+
import '@graphrefly/pure-ts/extra/browser';
|
|
5
|
+
import '@graphrefly/pure-ts/extra';
|
|
6
|
+
import '@graphrefly/pure-ts/extra/node';
|
|
7
|
+
import '@graphrefly/pure-ts/extra/operators';
|
|
8
|
+
import '@graphrefly/pure-ts/extra/reactive';
|
|
9
|
+
import '@graphrefly/pure-ts/extra/sources';
|
|
10
|
+
import '@graphrefly/pure-ts/extra/storage-browser';
|
|
11
|
+
import '@graphrefly/pure-ts/extra/storage-core';
|
|
12
|
+
import '@graphrefly/pure-ts/extra/storage-node';
|
|
13
|
+
import '@graphrefly/pure-ts/extra/storage-tiers-browser';
|
|
14
|
+
import '@graphrefly/pure-ts/extra/storage-tiers-node';
|
|
15
|
+
import '@graphrefly/pure-ts/extra/storage-tiers';
|
|
16
|
+
import '@graphrefly/pure-ts/extra/storage-wal';
|
|
17
|
+
import '@graphrefly/pure-ts/graph';
|
|
18
|
+
import '@graphrefly/pure-ts/testing';
|
|
19
|
+
import '@graphrefly/pure-ts/compat/jotai';
|
|
20
|
+
import '@graphrefly/pure-ts/compat/nanostores';
|
|
21
|
+
import '@graphrefly/pure-ts/compat/nestjs';
|
|
22
|
+
import '@graphrefly/pure-ts/compat/react';
|
|
23
|
+
import '@graphrefly/pure-ts/compat/solid';
|
|
24
|
+
import '@graphrefly/pure-ts/compat/svelte';
|
|
25
|
+
import '@graphrefly/pure-ts/compat/vue';
|
|
26
|
+
import '@graphrefly/pure-ts/compat/zustand';
|
|
27
|
+
import '@graphrefly/pure-ts/extra/render';
|
|
28
|
+
import '@graphrefly/pure-ts/patterns/ai/browser';
|
|
29
|
+
import '@graphrefly/pure-ts/patterns/ai';
|
|
30
|
+
import '@graphrefly/pure-ts/patterns/ai/node';
|
|
31
|
+
import '@graphrefly/pure-ts/patterns/cqrs';
|
|
32
|
+
import '@graphrefly/pure-ts/patterns/demo-shell';
|
|
33
|
+
import '@graphrefly/pure-ts/patterns/domain-templates';
|
|
34
|
+
import '@graphrefly/pure-ts/patterns/graphspec';
|
|
35
|
+
import '@graphrefly/pure-ts/patterns/harness';
|
|
36
|
+
import '@graphrefly/pure-ts/patterns/inspect';
|
|
37
|
+
import '@graphrefly/pure-ts/patterns/job-queue';
|
|
38
|
+
import '@graphrefly/pure-ts/patterns/memory';
|
|
39
|
+
import '@graphrefly/pure-ts/patterns/messaging';
|
|
40
|
+
import '@graphrefly/pure-ts/patterns/orchestration';
|
|
41
|
+
import '@graphrefly/pure-ts/patterns/process';
|
|
42
|
+
import '@graphrefly/pure-ts/patterns/reactive-layout';
|
|
43
|
+
import '@graphrefly/pure-ts/patterns/reduction';
|
|
44
|
+
import '@graphrefly/pure-ts/patterns/surface';
|
|
45
|
+
import '@graphrefly/pure-ts/patterns/topology-view';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,95 +1,45 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
import '
|
|
46
|
-
import './fallback-DUyyBTBK.js';
|
|
47
|
-
import './pipeline-graph-Sgj0gCwn.js';
|
|
48
|
-
import './reactive-layout-DOTs9P3X.js';
|
|
49
|
-
import 'rxjs';
|
|
50
|
-
import '@nestjs/common';
|
|
51
|
-
import '@nestjs/core';
|
|
52
|
-
import 'vue';
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Patterns layer: domain/solution helpers (Phase 4+).
|
|
56
|
-
*/
|
|
57
|
-
|
|
58
|
-
declare const index_CatalogFnEntry: typeof CatalogFnEntry;
|
|
59
|
-
declare const index_CatalogSourceEntry: typeof CatalogSourceEntry;
|
|
60
|
-
declare const index_ConfigFieldSchema: typeof ConfigFieldSchema;
|
|
61
|
-
declare const index_CreateGraphOptions: typeof CreateGraphOptions;
|
|
62
|
-
declare const index_FnFactory: typeof FnFactory;
|
|
63
|
-
declare const index_GraphSpec: typeof GraphSpec;
|
|
64
|
-
declare const index_GraphSpecCatalog: typeof GraphSpecCatalog;
|
|
65
|
-
declare const index_GraphSpecFeedbackEdge: typeof GraphSpecFeedbackEdge;
|
|
66
|
-
declare const index_GraphSpecNode: typeof GraphSpecNode;
|
|
67
|
-
declare const index_GraphSpecTemplate: typeof GraphSpecTemplate;
|
|
68
|
-
declare const index_GraphSpecTemplateRef: typeof GraphSpecTemplateRef;
|
|
69
|
-
declare const index_GraphSpecValidation: typeof GraphSpecValidation;
|
|
70
|
-
declare const index_ReduceOptions: typeof ReduceOptions;
|
|
71
|
-
declare const index_RestoreSnapshotOptions: typeof RestoreSnapshotOptions;
|
|
72
|
-
declare const index_SNAPSHOT_WIRE_VERSION: typeof SNAPSHOT_WIRE_VERSION;
|
|
73
|
-
declare const index_SaveSnapshotResult: typeof SaveSnapshotResult;
|
|
74
|
-
declare const index_SourceFactory: typeof SourceFactory;
|
|
75
|
-
declare const index_SurfaceError: typeof SurfaceError;
|
|
76
|
-
declare const index_SurfaceErrorCode: typeof SurfaceErrorCode;
|
|
77
|
-
declare const index_SurfaceErrorPayload: typeof SurfaceErrorPayload;
|
|
78
|
-
declare const index_asSurfaceError: typeof asSurfaceError;
|
|
79
|
-
declare const index_createGraph: typeof createGraph;
|
|
80
|
-
declare const index_deleteSnapshot: typeof deleteSnapshot;
|
|
81
|
-
declare const index_diffSnapshots: typeof diffSnapshots;
|
|
82
|
-
declare const index_listSnapshots: typeof listSnapshots;
|
|
83
|
-
declare const index_restoreSnapshot: typeof restoreSnapshot;
|
|
84
|
-
declare const index_runReduction: typeof runReduction;
|
|
85
|
-
declare const index_saveSnapshot: typeof saveSnapshot;
|
|
86
|
-
declare namespace index {
|
|
87
|
-
export { index_CatalogFnEntry as CatalogFnEntry, index_CatalogSourceEntry as CatalogSourceEntry, index_ConfigFieldSchema as ConfigFieldSchema, index_CreateGraphOptions as CreateGraphOptions, index_FnFactory as FnFactory, index_GraphSpec as GraphSpec, index_GraphSpecCatalog as GraphSpecCatalog, index_GraphSpecFeedbackEdge as GraphSpecFeedbackEdge, index_GraphSpecNode as GraphSpecNode, index_GraphSpecTemplate as GraphSpecTemplate, index_GraphSpecTemplateRef as GraphSpecTemplateRef, index_GraphSpecValidation as GraphSpecValidation, index_ReduceOptions as ReduceOptions, index_RestoreSnapshotOptions as RestoreSnapshotOptions, index_SNAPSHOT_WIRE_VERSION as SNAPSHOT_WIRE_VERSION, index_SaveSnapshotResult as SaveSnapshotResult, index_SourceFactory as SourceFactory, index_SurfaceError as SurfaceError, index_SurfaceErrorCode as SurfaceErrorCode, index_SurfaceErrorPayload as SurfaceErrorPayload, index$1 as ai, index_asSurfaceError as asSurfaceError, index$2 as cqrs, index_createGraph as createGraph, index_deleteSnapshot as deleteSnapshot, index$3 as demoShell, index_diffSnapshots as diffSnapshots, index$4 as domainTemplates, index$5 as graphspec, index$6 as harness, index$7 as inspect, index$8 as jobQueue, index$9 as layout, index_listSnapshots as listSnapshots, index$a as memory, index$b as messaging, index$c as orchestration, index$d as process, index$e as reduction, index_restoreSnapshot as restoreSnapshot, index_runReduction as runReduction, index_saveSnapshot as saveSnapshot, index$f as surface };
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* GraphRefly — public API surface.
|
|
92
|
-
*/
|
|
93
|
-
declare const version = "0.0.0";
|
|
94
|
-
|
|
95
|
-
export { CatalogFnEntry, CatalogSourceEntry, ConfigFieldSchema, CreateGraphOptions, FnFactory, GraphSpec, GraphSpecCatalog, GraphSpecFeedbackEdge, GraphSpecNode, GraphSpecTemplate, GraphSpecTemplateRef, GraphSpecValidation, ReduceOptions, RestoreSnapshotOptions, SNAPSHOT_WIRE_VERSION, SaveSnapshotResult, SourceFactory, SurfaceError, SurfaceErrorCode, SurfaceErrorPayload, index$1 as ai, asSurfaceError, index$2 as cqrs, createGraph, deleteSnapshot, index$3 as demoShell, diffSnapshots, index$4 as domainTemplates, index$5 as graphspec, index$6 as harness, index$7 as inspect, index$8 as jobQueue, index$9 as layout, listSnapshots, index$a as memory, index$b as messaging, index$c as orchestration, index as patterns, index$d as process, index$e as reduction, restoreSnapshot, runReduction, saveSnapshot, index$f as surface, version };
|
|
1
|
+
export * from '@graphrefly/pure-ts';
|
|
2
|
+
import '@graphrefly/pure-ts/compat';
|
|
3
|
+
import '@graphrefly/pure-ts/core';
|
|
4
|
+
import '@graphrefly/pure-ts/extra/browser';
|
|
5
|
+
import '@graphrefly/pure-ts/extra';
|
|
6
|
+
import '@graphrefly/pure-ts/extra/node';
|
|
7
|
+
import '@graphrefly/pure-ts/extra/operators';
|
|
8
|
+
import '@graphrefly/pure-ts/extra/reactive';
|
|
9
|
+
import '@graphrefly/pure-ts/extra/sources';
|
|
10
|
+
import '@graphrefly/pure-ts/extra/storage-browser';
|
|
11
|
+
import '@graphrefly/pure-ts/extra/storage-core';
|
|
12
|
+
import '@graphrefly/pure-ts/extra/storage-node';
|
|
13
|
+
import '@graphrefly/pure-ts/extra/storage-tiers-browser';
|
|
14
|
+
import '@graphrefly/pure-ts/extra/storage-tiers-node';
|
|
15
|
+
import '@graphrefly/pure-ts/extra/storage-tiers';
|
|
16
|
+
import '@graphrefly/pure-ts/extra/storage-wal';
|
|
17
|
+
import '@graphrefly/pure-ts/graph';
|
|
18
|
+
import '@graphrefly/pure-ts/testing';
|
|
19
|
+
import '@graphrefly/pure-ts/compat/jotai';
|
|
20
|
+
import '@graphrefly/pure-ts/compat/nanostores';
|
|
21
|
+
import '@graphrefly/pure-ts/compat/nestjs';
|
|
22
|
+
import '@graphrefly/pure-ts/compat/react';
|
|
23
|
+
import '@graphrefly/pure-ts/compat/solid';
|
|
24
|
+
import '@graphrefly/pure-ts/compat/svelte';
|
|
25
|
+
import '@graphrefly/pure-ts/compat/vue';
|
|
26
|
+
import '@graphrefly/pure-ts/compat/zustand';
|
|
27
|
+
import '@graphrefly/pure-ts/extra/render';
|
|
28
|
+
import '@graphrefly/pure-ts/patterns/ai/browser';
|
|
29
|
+
import '@graphrefly/pure-ts/patterns/ai';
|
|
30
|
+
import '@graphrefly/pure-ts/patterns/ai/node';
|
|
31
|
+
import '@graphrefly/pure-ts/patterns/cqrs';
|
|
32
|
+
import '@graphrefly/pure-ts/patterns/demo-shell';
|
|
33
|
+
import '@graphrefly/pure-ts/patterns/domain-templates';
|
|
34
|
+
import '@graphrefly/pure-ts/patterns/graphspec';
|
|
35
|
+
import '@graphrefly/pure-ts/patterns/harness';
|
|
36
|
+
import '@graphrefly/pure-ts/patterns/inspect';
|
|
37
|
+
import '@graphrefly/pure-ts/patterns/job-queue';
|
|
38
|
+
import '@graphrefly/pure-ts/patterns/memory';
|
|
39
|
+
import '@graphrefly/pure-ts/patterns/messaging';
|
|
40
|
+
import '@graphrefly/pure-ts/patterns/orchestration';
|
|
41
|
+
import '@graphrefly/pure-ts/patterns/process';
|
|
42
|
+
import '@graphrefly/pure-ts/patterns/reactive-layout';
|
|
43
|
+
import '@graphrefly/pure-ts/patterns/reduction';
|
|
44
|
+
import '@graphrefly/pure-ts/patterns/surface';
|
|
45
|
+
import '@graphrefly/pure-ts/patterns/topology-view';
|
package/dist/index.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
import{a as T,b as j,c as k,d as v,e as C,f as D,g as S,h as b,i as q,j as A,k as g}from"./chunk-HY4DJBA7.js";import{J as n}from"./chunk-5M4CCMMD.js";import{m as i}from"./chunk-7K6PWTDQ.js";import{f as x}from"./chunk-FZMYDOWV.js";import{d as c}from"./chunk-SVY7VUYU.js";import{p as l}from"./chunk-TK3NWWD4.js";import{da as p}from"./chunk-UNGSTR4X.js";import{e as t}from"./chunk-CE6TI2TL.js";import{j as r}from"./chunk-OIVP6KFV.js";import{d as e}from"./chunk-ZKPSFFKU.js";import"./chunk-OYQOZP2F.js";import"./chunk-OPHBU3LG.js";import{b as m}from"./chunk-ZLV5SQSX.js";import"./chunk-DHRX7JX4.js";import"./chunk-7LIAPXJB.js";import{e as f}from"./chunk-5XJ6B66J.js";import{m as a}from"./chunk-APPIWSGD.js";import{d as s}from"./chunk-Z4NPUARF.js";import{a as it,b as y}from"./chunk-CB676TKJ.js";import{b as zo}from"./chunk-ZGNQRPDT.js";import{i as Bo}from"./chunk-7WPU3UHQ.js";import{G as xt}from"./chunk-6X7AFUJV.js";import{f as o}from"./chunk-VV4N5P64.js";import{d as nt}from"./chunk-VJLMUKOI.js";import{d as ct}from"./chunk-VIMF6LGM.js";import{d as lt}from"./chunk-6QZNQS5B.js";import{d as gt}from"./chunk-GPW2V3RE.js";import{b as ht}from"./chunk-HIDYF36O.js";import{a as u}from"./chunk-KZIEYVXN.js";import{a as ds,b as us,c as Ss,d as bs,e as Ys,f as Zs,g as _s,h as $s,i as oa,j as ra,k as ea,l as M}from"./chunk-ST7UXLWR.js";import{a as Ts,b as js}from"./chunk-PTZK576G.js";import{b as Xs}from"./chunk-TSOYJ743.js";import{$ as hs,A as Ht,B as Jt,C as Kt,D as Nt,E as Pt,F as Vt,G as Wt,H as Xt,I as Yt,J as Zt,K as _t,L as $t,M as os,N as rs,O as es,P as ts,Q as ss,R as as,S as ps,T as ms,U as fs,V as xs,W as ns,X as is,Y as cs,Z as ls,_ as gs,a as Lt,aa as Ls,b as dt,ba as Ds,c as ut,d as yt,e as Mt,f as Tt,g as jt,h as kt,i as vt,j as Ct,k as Dt,l as St,m as bt,n as qt,o as At,p as It,q as Ot,r as Qt,s as Rt,t as Ut,u as wt,v as zt,w as Bt,x as Et,y as Ft,z as Gt}from"./chunk-N4MQX6JU.js";import{a as Jo,d as ie,e as ce,f as le,g as ge,h as he,i as Le,j as de,k as ue,l as ye,m as Me,n as Te}from"./chunk-D7GPHKFH.js";import{b as ks,c as vs,d as Cs,e as Qs,f as Rs}from"./chunk-WJR24TAG.js";import{a as Ws}from"./chunk-N7FHEL4D.js";import{a as Eo,b as Ye}from"./chunk-5QDBSZBV.js";import{a as ot,b as rt,c as et,d as tt,e as st,f as at,g as pt,h as mt,i as ft}from"./chunk-W3I423PS.js";import{a as Ho}from"./chunk-L6NSJVJZ.js";import{a as ar,b as pr,c as mr,d}from"./chunk-2T7U5EU6.js";import"./chunk-3G5U5QNE.js";import"./chunk-C72GO4IZ.js";import{a as Vo,b as Wo,c as Xo,d as Yo,e as Zo,g as $o,h as or,i as rr,j as er,k as tr,l as sr}from"./chunk-HITNVN6B.js";import{a as _o}from"./chunk-ESMPEKEV.js";import{a as zs,b as Bs,c as Es,d as Fs,e as Gs,f as Hs,g as Js,h as Ks,i as Ns,j as Ps,k as Vs}from"./chunk-D5RFJOZ2.js";import{a as Us,b as ws}from"./chunk-CE72X3WO.js";import{A as Jr,B as Kr,C as Nr,D as Pr,E as Vr,F as Wr,G as Xr,I as Yr,J as Zr,K as _r,L as $r,M as oe,N as re,O as ee,P as te,Q as se,R as ae,S as pe,T as me,U as fe,V as xe,W as ne,a as dr,b as ur,c as yr,d as Mr,e as Tr,f as jr,g as kr,h as vr,i as Cr,j as Dr,k as Sr,l as br,m as qr,n as Ar,o as Ir,p as Or,q as Qr,r as Rr,s as Ur,t as wr,u as zr,v as Br,w as Er,x as Fr,y as Gr,z as Hr}from"./chunk-CLVB32RD.js";import{a as fr,b as xr,c as nr,d as ir,e as cr,f as lr,g as gr,h as hr,i as Lr}from"./chunk-4VVTGLXJ.js";import{a as Ko,b as No,c as Po}from"./chunk-GHBWHMRZ.js";import{a as qs,b as As}from"./chunk-A5WCQ5NO.js";import{a as Is,b as Os}from"./chunk-GLERH466.js";import{a as ys,b as Ms}from"./chunk-BEZWM2SY.js";import{a as Ze,b as _e,c as $e}from"./chunk-YBB7ZGTY.js";import{A as Pe,B as Ve,C as We,D as Xe,a as Fo,b as Go,c as je,d as ke,e as ve,f as Ce,g as De,h as Se,i as be,j as qe,k as Ae,l as Ie,m as Oe,n as Qe,o as Re,p as Ue,q as we,r as ze,s as Be,t as Ee,u as Fe,v as Ge,w as He,x as Je,y as Ke,z as Ne}from"./chunk-CRVT7D2P.js";import{A as vo,B as Co,C as Do,D as So,E as bo,F as qo,G as Ao,H as Io,I as Oo,J as Qo,K as Ro,L as Uo,M as wo,a as _,b as $,c as oo,d as ro,e as eo,f as to,g as so,h as ao,i as po,j as mo,k as fo,m as xo,n as no,o as io,p as co,q as lo,r as go,s as ho,t as Lo,u as uo,v as yo,w as Mo,x as To,y as jo,z as ko}from"./chunk-NTEURFZH.js";import{a as I,b as O,c as Q,d as R,e as U,f as w,g as z,h as B,i as E,j as F,k as G,l as H,m as J,n as K,o as N,p as P,q as V,r as W,s as X,t as Y,u as Z}from"./chunk-CK2E7BTU.js";import{b as L}from"./chunk-QYADASLV.js";var h={};L(h,{SNAPSHOT_WIRE_VERSION:()=>C,SurfaceError:()=>T,ai:()=>p,asSurfaceError:()=>j,cqrs:()=>o,createGraph:()=>k,deleteSnapshot:()=>A,demoShell:()=>m,diffSnapshots:()=>b,domainTemplates:()=>f,graphspec:()=>a,harness:()=>n,inspect:()=>i,jobQueue:()=>x,layout:()=>l,listSnapshots:()=>q,memory:()=>t,messaging:()=>r,orchestration:()=>e,process:()=>c,reduction:()=>s,restoreSnapshot:()=>S,runReduction:()=>v,saveSnapshot:()=>D,surface:()=>g});var sa="0.0.0";export{E as COMPLETE,N as COMPLETE_MSG,Y as COMPLETE_ONLY_BATCH,ce as CircuitOpenError,ks as ContentAddressedMissError,O as DATA,po as DEFAULT_ACTOR,rt as DEFAULT_AUDIT_GUARD,Q as DIRTY,G as DIRTY_MSG,V as DIRTY_ONLY_BATCH,ro as ENVELOPE_VERSION,F as ERROR,or as GRAPH_META_SEGMENT,er as Graph,lo as GraphReFlyConfig,ho as GuardDenied,U as INVALIDATE,J as INVALIDATE_MSG,X as INVALIDATE_ONLY_BATCH,_ as JsonCodec,fr as NS_PER_MS,xr as NS_PER_SEC,qs as NativeIndexBackend,Is as NativeListBackend,Ze as NativeLogBackend,ys as NativeMapBackend,Ss as NativePubSubBackend,Do as NodeImpl,w as PAUSE,R as RESOLVED,H as RESOLVED_MSG,W as RESOLVED_ONLY_BATCH,z as RESUME,Le as RateLimiterOverflowError,_o as ResettableTimer,Vo as SIZEOF_OVERHEAD,Wo as SIZEOF_SYMBOL,rr as SNAPSHOT_VERSION,C as SNAPSHOT_WIRE_VERSION,I as START,K as START_MSG,T as SurfaceError,B as TEARDOWN,P as TEARDOWN_MSG,Z as TEARDOWN_ONLY_BATCH,ye as TimeoutError,yo as accessHintForGuard,jo as advanceVersion,p as ai,st as appendAudit,Gs as appendLogStorage,j as asSurfaceError,Xr as audit,Uo as autoTrackNode,Ne as awaitSettled,xo as batch,Jo as budgetGate,Yr as buffer,Zr as bufferCount,$r as bufferTime,tt as bumpCursor,He as cached,vs as canonicalJson,us as cascadingCache,ne as catchError,ns as checkpointToRedis,xs as checkpointToS3,le as circuitBreaker,Rr as combine,me as combineLatest,y as compat,Br as concat,Hr as concatMap,Co as configure,nr as constant,Cs as contentAddressedStorage,u as core,o as cqrs,et as createAuditLog,$ as createDagCborCodec,oo as createDagCborZstdCodec,k as createGraph,oa as createTransport,To as createVersioning,Ye as createWatermarkController,Nt as csvRows,Pr as debounce,fe as debounceTime,Xs as decay,to as decodeEnvelope,gr as decorrelatedJitter,vo as defaultConfig,Mo as defaultHash,ze as defer,Nr as delay,A as deleteSnapshot,m as demoShell,Ao as derived,Io as derivedT,$s as deserializeError,Ps as dictKv,Vs as dictSnapshot,tr as diffForWAL,b as diffSnapshots,js as distill,Or as distinctUntilChanged,Ho as domainMeta,f as domainTemplates,no as downWithBatch,Ro as dynamicNode,Qo as effect,Oo as effectT,br as elementAt,Re as empty,eo as encodeEnvelope,je as escapeRegexChar,Gr as exhaustMap,Yo as explainPath,cr as exponential,dt as externalBundle,Lt as externalProducer,M as extra,Po as factoryTag,Me as fallback,lr as fibonacci,ur as filter,Sr as find,Cr as first,Je as firstValueFrom,Ke as firstWhere,Kr as flatMap,Be as forEach,Oe as fromAny,Ie as fromAsyncIter,Kt as fromCSV,Wt as fromClickHouseWatch,Se as fromCron,hs as fromDrizzle,be as fromEvent,Tt as fromHTTP,qt as fromHTTPPoll,bt as fromHTTPStream,qe as fromIter,Ft as fromKafka,Ls as fromKysely,Ot as fromMCP,Zt as fromNATS,Vt as fromNDJSON,Qt as fromOTel,gs as fromPrisma,Bt as fromPrometheus,Ae as fromPromise,Xt as fromPulsar,$t as fromRabbitMQ,De as fromRaf,Ht as fromRedisStream,St as fromSSE,is as fromSqlite,cs as fromSqliteCursor,wt as fromStatsD,Rt as fromSyslog,Ce as fromTimer,yt as fromWebSocket,It as fromWebSocketReconnect,Mt as fromWebhook,ke as globToRegExp,d as graph,$o as graphProfile,a as graphspec,n as harness,i as inspect,ee as interval,fo as isBatching,ko as isV1,x as jobQueue,zo as jotai,zs as jsonCodec,Bs as jsonCodecFor,We as keepalive,Hs as kvStorage,Dr as last,l as layout,at as lightMutation,ir as linear,q as listSnapshots,ds as lru,Ds as makeHttpError,dr as map,ve as matchesAnyPattern,Go as matchesCron,t as memory,Ks as memoryAppendLog,Es as memoryBackend,Ns as memoryKv,Js as memorySnapshot,wr as merge,Jr as mergeMap,$e as mergeReactiveLogs,r as messaging,io as monotonicNs,Zs as nameToSignal,Bo as nanostores,Pt as ndjsonRows,xt as nestjs,Ue as never,So as node,Pe as nodeSignal,mo as normalizeActor,Qe as of,Ar as onFirstData,e as orchestration,Qr as pairwise,Fo as parseCron,Et as parsePrometheusText,Dt as parseSSEStream,zt as parseStatsD,Ut as parseSyslog,h as patterns,se as pausable,wo as pipe,No as placeholderArgs,Lo as policy,uo as policyFromRules,c as process,qo as producer,bs as pubsub,Er as race,de as rateLimiter,sr as reachable,nt as react,Xe as reactiveCounter,As as reactiveIndex,Os as reactiveList,_e as reactiveLog,Ms as reactiveMap,ut as reactiveSink,Mr as reduce,s as reduction,so as registerBuiltinCodecs,go as registerBuiltins,mt as registerCursor,ft as registerCursorMap,te as repeat,Ge as replay,ao as replayWAL,ae as rescue,Lr as resolveBackoffPreset,Ko as resolveDescribeFields,S as restoreSnapshot,ie as retry,v as runReduction,Wr as sample,D as saveSnapshot,yr as scan,_s as serializeError,Fe as share,Ve as shareReplay,Ys as signalToName,it as signals,Qs as singleFromAny,Rs as singleNodeFromAny,Xo as sizeof,jr as skip,Fs as snapshotStorage,ct as solid,Us as sortJsonValue,ws as stableJsonString,bo as state,Ws as stratify,g as surface,lt as svelte,Fr as switchMap,Tr as take,vr as takeUntil,kr as takeWhile,qr as tap,Ir as tapFirst,Vr as throttle,xe as throttleTime,we as throwError,Te as timeout,Ee as toArray,es as toCSV,ts as toClickHouse,rs as toFile,jt as toHTTP,Gt as toKafka,ms as toLoki,ps as toMongo,_t as toNATS,Eo as toObservable,as as toPostgres,Yt as toPulsar,os as toRabbitMQ,Ct as toReadableStream,Jt as toRedisStream,ss as toS3,kt as toSSE,vt as toSSEBytes,ls as toSqlite,fs as toTempo,At as toWebSocket,he as tokenBucket,Zo as topologyDiff,ot as tryIncrementBounded,mr as validateGraphObservability,pr as validateNoIslands,pe as valve,Ts as verifiable,sa as version,gt as vue,co as wallClockNs,ar as watchTopologyTree,re as window,_r as windowCount,oe as windowTime,ge as withBreaker,Ur as withLatestFrom,hr as withMaxAttempts,ue as withStatus,ra as workerBridge,ea as workerSelf,pt as wrapMutation,zr as zip,ht as zustand};
|
|
1
|
+
// src/index.ts
|
|
2
|
+
export * from "@graphrefly/pure-ts";
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// `@graphrefly/graphrefly` is a thin re-export layer over the chosen sibling\n// impl (per PART 13 of `archive/docs/SESSION-rust-port-architecture.md`).\n// Three siblings (D082): `@graphrefly/native` (napi-rs, Node fast path),\n// `@graphrefly/wasm` (wasm-bindgen, browser fast path opt-in subpath),\n// `@graphrefly/pure-ts` (universal fallback, permanent first-class peer per\n// D084). Until the facade build lands (Deferred 1 of PART 13), this shim\n// delegates everything to `@graphrefly/pure-ts` directly.\nexport * from \"@graphrefly/pure-ts\";\n"],"mappings":";AAOA,cAAc;","names":[]}
|
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
"use strict";var Vt=Object.create;var te=Object.defineProperty;var Kt=Object.getOwnPropertyDescriptor;var Wt=Object.getOwnPropertyNames;var zt=Object.getPrototypeOf,$t=Object.prototype.hasOwnProperty;var R=(e,t)=>()=>(e&&(t=e(e=0)),t);var qt=(e,t)=>{for(var n in t)te(e,n,{get:t[n],enumerable:!0})},He=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Wt(t))!$t.call(e,s)&&s!==n&&te(e,s,{get:()=>t[s],enumerable:!(r=Kt(t,s))||r.enumerable});return e};var Jt=(e,t,n)=>(n=e!=null?Vt(zt(e)):{},He(t||!e||!e.__esModule?te(n,"default",{value:e,enumerable:!0}):n,e)),Qt=e=>He(te({},"__esModule",{value:!0}),e);function k(){return Math.trunc(performance.now()*1e6)}function D(){return Date.now()*1e6}var M=R(()=>{"use strict"});function $e(){return we>0||Zt}function qe(){return we>0}function Je(e){we>0?en.push(e):e()}function ne(e,t,n){if(t.length===0)return;if(t.length===1){let d=n(t[0][0]);if(d<3||!$e()){e(t);return}(d>=5?ze:d===4?We:Ke).push(()=>e(t));return}let r=t.length,s=r,i=r,a=r,o=0;for(;o<r&&n(t[o][0])<3;)o++;for(s=o;o<r&&n(t[o][0])===3;)o++;for(i=o;o<r&&n(t[o][0])===4;)o++;a=o;let c=$e();if(s>0){let d=t.slice(0,s);e(d)}if(i>s){let d=t.slice(s,i);c?Ke.push(()=>e(d)):e(d)}if(a>i){let d=t.slice(i,a);c?We.push(()=>e(d)):e(d)}if(r>a){let d=t.slice(a,r);c?ze.push(()=>e(d)):e(d)}}var we,Zt,Ke,We,ze,en,Qe=R(()=>{"use strict";we=0,Zt=!1,Ke=[],We=[],ze=[],en=[]});var G,E,L,P,U,B,Q,I,N,v,j,ve,tn,xe,nn,rn,_e,Ye,Xe,Ze,Se,Y=R(()=>{"use strict";G=Symbol.for("graphrefly/START"),E=Symbol.for("graphrefly/DATA"),L=Symbol.for("graphrefly/DIRTY"),P=Symbol.for("graphrefly/RESOLVED"),U=Symbol.for("graphrefly/INVALIDATE"),B=Symbol.for("graphrefly/PAUSE"),Q=Symbol.for("graphrefly/RESUME"),I=Symbol.for("graphrefly/TEARDOWN"),N=Symbol.for("graphrefly/COMPLETE"),v=Symbol.for("graphrefly/ERROR"),j=Object.freeze([L]),ve=Object.freeze([P]),tn=Object.freeze([U]),xe=Object.freeze([G]),nn=Object.freeze([N]),rn=Object.freeze([I]),_e=Object.freeze([j]),Ye=Object.freeze([ve]),Xe=Object.freeze([tn]),Ze=Object.freeze([nn]),Se=Object.freeze([rn])});function et(e){e.registerCodec(on)}var on,tt=R(()=>{"use strict";on={name:"json",version:1,contentType:"application/json",encode(e){let t=JSON.stringify(e);return new TextEncoder().encode(t)},decode(e,t){let n=new TextDecoder().decode(e);return JSON.parse(n)}}});function re(e){if(e==null)return sn;let{type:t,id:n,...r}=e;return{type:t??"system",id:n??"",...r}}var sn,nt=R(()=>{"use strict";sn={type:"system",id:""}});function rt(e){e.registerMessageType(G,{tier:0,wireCrossing:!1}),e.registerMessageType(L,{tier:1,wireCrossing:!1}),e.registerMessageType(U,{tier:1,wireCrossing:!1,metaPassthrough:!1}),e.registerMessageType(B,{tier:2,wireCrossing:!1}),e.registerMessageType(Q,{tier:2,wireCrossing:!1}),e.registerMessageType(E,{tier:3,wireCrossing:!0}),e.registerMessageType(P,{tier:3,wireCrossing:!0}),e.registerMessageType(N,{tier:4,wireCrossing:!0,metaPassthrough:!1}),e.registerMessageType(v,{tier:4,wireCrossing:!0,metaPassthrough:!1}),e.registerMessageType(I,{tier:5,wireCrossing:!0,metaPassthrough:!1})}var oe,ot=R(()=>{"use strict";Y();oe=class{_messageTypes=new Map;_codecs=new Map;_onMessage;_onSubscribe;_defaultVersioning;_defaultHashFn;_inspectorEnabled=!(typeof process<"u"&&process.env?.NODE_ENV==="production");_globalInspector;_rigorRecorder;_frozen=!1;tierOf;constructor(t){this._onMessage=t.onMessage,this._onSubscribe=t.onSubscribe,this._defaultVersioning=t.defaultVersioning,this._defaultHashFn=t.defaultHashFn,this.tierOf=n=>{let r=this._messageTypes.get(n);return r!=null?r.tier:1}}get onMessage(){return this._frozen=!0,this._onMessage}get onSubscribe(){return this._frozen=!0,this._onSubscribe}set onMessage(t){this._assertUnfrozen(),this._onMessage=t}set onSubscribe(t){this._assertUnfrozen(),this._onSubscribe=t}get defaultVersioning(){return this._defaultVersioning}set defaultVersioning(t){this._assertUnfrozen(),this._defaultVersioning=t}get defaultHashFn(){return this._defaultHashFn}set defaultHashFn(t){this._assertUnfrozen(),this._defaultHashFn=t}get inspectorEnabled(){return this._inspectorEnabled}set inspectorEnabled(t){this._inspectorEnabled=t}get globalInspector(){return this._globalInspector}set globalInspector(t){this._globalInspector=t}get rigorRecorder(){return this._rigorRecorder}set rigorRecorder(t){this._rigorRecorder=t}registerMessageType(t,n){return this._assertUnfrozen(),this._messageTypes.set(t,{tier:n.tier,wireCrossing:n.wireCrossing??n.tier>=3,metaPassthrough:n.metaPassthrough??!0}),this}messageTier(t){let n=this._messageTypes.get(t);return n!=null?n.tier:1}isWireCrossing(t){let n=this._messageTypes.get(t);return n!=null?n.wireCrossing:!0}isLocalOnly(t){return!this.isWireCrossing(t)}isMetaPassthrough(t){let n=this._messageTypes.get(t);return n!=null?n.metaPassthrough:!0}isKnownMessageType(t){return this._messageTypes.has(t)}registerCodec(t){return this._assertUnfrozen(),this._codecs.set(t.name,t),this}lookupCodec(t){return this._codecs.get(t)}_isFrozen(){return this._frozen}_assertUnfrozen(){if(this._frozen)throw new Error("GraphReFlyConfig is frozen: a node has already captured this config. Register custom types and set hooks before creating any node.")}}});var H,st=R(()=>{"use strict";H=class extends Error{actor;action;nodeName;constructor(t,n){super(n??`GuardDenied: action "${String(t.action)}" denied for actor type "${String(t.actor.type)}"`),this.name="GuardDenied",this.actor=t.actor,this.action=t.action,this.nodeName=t.nodeName}get node(){return this.nodeName}}});function Ae(e){if(e===void 0)return null;if(typeof e=="number"){if(!Number.isFinite(e))throw new TypeError(`Cannot hash non-finite number: ${e}`);if(Number.isInteger(e)&&!Number.isSafeInteger(e))throw new TypeError(`Cannot hash integer outside safe range (|n| > 2^53-1): ${e}. Cross-language cid parity is not guaranteed for unsafe integers.`);return e}if(typeof e=="string"||typeof e=="boolean"||e===null)return e;if(Array.isArray(e))return e.map(Ae);if(typeof e=="object"&&e!==null){let t={};for(let n of Object.keys(e).sort())t[n]=Ae(e[n]);return t}return null}function dn(e){let t=cn.encode(e),n=t.length,r=n*8,s=n+9+63&-64,i=new Uint8Array(s);i.set(t),i[n]=128;let a=new DataView(i.buffer);a.setUint32(s-4,r>>>0,!1),a.setUint32(s-8,Math.floor(r/4294967296)>>>0,!1);let o=1779033703,c=3144134277,d=1013904242,u=2773480762,l=1359893119,p=2600822924,f=528734635,h=1541459225,y=new Uint32Array(64),g=(_,S)=>_>>>S|_<<32-S;for(let _=0;_<s;_+=64){for(let A=0;A<16;A++)y[A]=a.getUint32(_+A*4,!1);for(let A=16;A<64;A++){let z=y[A-15],$=y[A-2],ee=g(z,7)^g(z,18)^z>>>3,ke=g($,17)^g($,19)^$>>>10;y[A]=y[A-16]+ee+y[A-7]+ke>>>0}let S=o,O=c,T=d,b=u,w=l,x=p,C=f,Te=h;for(let A=0;A<64;A++){let z=g(w,6)^g(w,11)^g(w,25),$=w&x^~w&C,ee=Te+z+$+an[A]+y[A]>>>0,ke=g(S,2)^g(S,13)^g(S,22),jt=S&O^S&T^O&T,Ht=ke+jt>>>0;Te=C,C=x,x=w,w=b+ee>>>0,b=T,T=O,O=S,S=ee+Ht>>>0}o=o+S>>>0,c=c+O>>>0,d=d+T>>>0,u=u+b>>>0,l=l+w>>>0,p=p+x>>>0,f=f+C>>>0,h=h+Te>>>0}let m=_=>_.toString(16).padStart(8,"0");return m(o)+m(c)+m(d)+m(u)+m(l)+m(p)+m(f)+m(h)}function Re(e){let t=Ae(e??null),n=JSON.stringify(t);return dn(n).slice(0,16)}function un(){let e=globalThis.crypto;if(e?.randomUUID)return e.randomUUID();let t=()=>Math.floor(Math.random()*4294967296).toString(16).padStart(8,"0"),n=t()+t()+t()+t();return`${n.slice(0,8)}-${n.slice(8,12)}-4${n.slice(13,16)}-${(parseInt(n.slice(16,17),16)&3|8).toString(16)}${n.slice(17,20)}-${n.slice(20,32)}`}function Ee(e,t,n){let r=n?.id??un();if(e===0)return{id:r,version:0};let i=(n?.hash??Re)(t);return{id:r,version:0,cid:i,prev:null}}function it(e,t,n){e.version+=1,"cid"in e&&(e.prev=e.cid,e.cid=n(t))}var an,cn,at=R(()=>{"use strict";an=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),cn=new TextEncoder});function ut(e){return{node:e,unsub:null,prevData:void 0,dirty:!1,involvedThisWave:!1,dataBatch:[],terminal:void 0}}function Ne(e){e.prevData=void 0,e.dirty=!1,e.involvedThisWave=!1,e.dataBatch.length=0,e.terminal=void 0}function se(e){return e.length===0?e:typeof e[0]=="symbol"?[e]:e}function pt(e,t,n){let r=lt(e)?e:[],s=typeof e=="function"?e:typeof t=="function"?t:void 0,i={};return lt(e)?i=(Oe(t)?t:n)??{}:Oe(e)?i=e:i=(Oe(t)?t:n)??{},new ie(r,s,i)}var ct,dt,ln,pn,Ce,ie,lt,Oe,ft=R(()=>{"use strict";tt();nt();Qe();M();ot();st();Y();at();ct=()=>{},dt=100;ln=(e,t,n,r)=>{n.direction==="down-in"&&e._onDepMessage(n.depIndex,t)},pn=(e,t,n,r)=>{let s=e;if(s._status==="completed"||s._status==="errored")return;let i=s._cached,a=i===void 0?[xe]:[xe,[E,i]];s._status==="dirty"&&a.push(j),ne(t,a,s._config.tierOf)},Ce=new oe({onMessage:ln,onSubscribe:pn});rt(Ce);et(Ce);ie=class e{_optsName;_describeKind;meta;_hasMeta;_config;_deps;_sinks=null;_sinkCount=0;_cached;_status;_cleanup;_store={};_waveHasNewData=!1;_hasNewTerminal=!1;_hasCalledFnOnce=!1;_paused=!1;_pendingWave=!1;_isExecutingFn=!1;_pendingRerun=!1;_rerunDepth=0;_dirtyDepCount=0;_batchPendingMessages=null;_pauseLocks=null;_pauseBuffer=null;_fn;_equals;_resubscribable;_resetOnTeardown;_autoComplete;_autoError;_pausable;_partial;_guard;_extraGuards;_hashFn;_versioning;_versioningLevel;_lastMutation;_inspectorHooks;_actions;constructor(t,n,r){this._config=r.config??Ce,this._config.onMessage,this._optsName=r.name,this._describeKind=r.describeKind,this._equals=r.equals??Object.is,this._resubscribable=r.resubscribable??!1,this._resetOnTeardown=r.resetOnTeardown??!1,this._autoComplete=r.completeWhenDepsComplete??!0,this._autoError=r.errorWhenDepsError??!0,this._pausable=r.pausable??!0,this._guard=r.guard,this._fn=n,this._partial=r.partial??!1,this._cached=r.initial!==void 0?r.initial:void 0,this._status=t.length===0&&n==null&&this._cached!==void 0?"settled":"sentinel",this._hashFn=r.versioningHash??this._config.defaultHashFn??Re;let s=r.versioning??this._config.defaultVersioning;this._versioningLevel=s,this._versioning=s!=null?Ee(s,this._cached===void 0?void 0:this._cached,{id:r.versioningId,hash:this._hashFn}):void 0,this._deps=t.map(ut);let i={};for(let[o,c]of Object.entries(r.meta??{})){let d={initial:c,name:`${r.name??"node"}:meta:${o}`,describeKind:"state",config:this._config};r.guard!=null&&(d.guard=r.guard),r.resubscribable===!0&&(d.resubscribable=!0),i[o]=new e([],void 0,d)}Object.freeze(i),this.meta=i,this._hasMeta=Object.keys(i).length>0;let a=this;this._actions={emit(o){a._emit([[E,o]])},down(o){a._emit(se(o))},up(o){a._emitUp(se(o))}},this.down=this.down.bind(this),this.up=this.up.bind(this)}get _isTerminal(){return this._status==="completed"||this._status==="errored"}get name(){return this._optsName}get status(){return this._status}get cache(){return this._cached===void 0?void 0:this._cached}get lastMutation(){return this._lastMutation}get v(){return this._versioning}hasGuard(){return this._guard!=null}_applyVersioning(t,n){if(this._isExecutingFn)throw new Error(`Node "${this.name}": _applyVersioning cannot run mid-fn \u2014 call it outside of \`_execFn\` (typically at graph setup time before the first subscribe).`);let r=this._versioningLevel;if(r!=null&&t<=r)return;let s=n?.hash??this._hashFn;s!==this._hashFn&&(this._hashFn=s);let i=this._cached===void 0?void 0:this._cached,a=this._versioning,o=a?.id??n?.id,c=a?.version??0,d=Ee(t,i,{id:o,hash:s});d.version=c,this._versioning=d,this._versioningLevel=t}_setInspectorHook(t){return t==null?()=>{}:(this._inspectorHooks==null&&(this._inspectorHooks=new Set),this._inspectorHooks.add(t),()=>{this._inspectorHooks?.delete(t),this._inspectorHooks?.size===0&&(this._inspectorHooks=void 0)})}_pushGuard(t){return this._extraGuards==null&&(this._extraGuards=new Set),this._extraGuards.add(t),()=>{this._extraGuards?.delete(t),this._extraGuards?.size===0&&(this._extraGuards=void 0)}}allowsObserve(t){if(this._guard==null&&this._extraGuards==null)return!0;let n=re(t);if(this._guard!=null&&!this._guard(n,"observe"))return!1;if(this._extraGuards!=null){for(let r of this._extraGuards)if(!r(n,"observe"))return!1}return!0}_checkGuard(t){if(t?.internal)return;let n=this._guard!=null||this._extraGuards!=null,r=t?.actor!=null;if(!n&&!r)return;let s=re(t?.actor),i=t?.delivery==="signal"?"signal":"write";if(this._guard!=null&&!this._guard(s,i))throw new H({actor:s,action:i,nodeName:this.name});if(this._extraGuards!=null){for(let a of this._extraGuards)if(!a(s,i))throw new H({actor:s,action:i,nodeName:this.name})}this._lastMutation={actor:s,timestamp_ns:D()}}down(t,n){let r=se(t);r.length!==0&&(this._checkGuard(n),this._emit(r))}emit(t,n){this._checkGuard(n),this._emit([[E,t]])}up(t,n){if(this._deps.length===0)return;let r=se(t);if(r.length===0)return;this._checkGuard(n);let s=n??{internal:!0};this._validateUpTiers(r);for(let i of this._deps)i.node.up?.(r,s)}_emitUp(t){if(this._deps.length!==0&&t.length!==0){this._validateUpTiers(t);for(let n of this._deps)n.node.up?.(t,{internal:!0})}}_validateUpTiers(t){let n=this._config.tierOf;for(let r of t){let s=n(r[0]);if(s===3||s===4)throw new Error(`Node "${this.name}": tier-${s} messages cannot flow up \u2014 DATA/RESOLVED/COMPLETE/ERROR are downstream-only. Use \`down(...)\` for value delivery; \`up(...)\` is for control signals (DIRTY, INVALIDATE, PAUSE, RESUME, TEARDOWN).`)}}subscribe(t,n){if(n!=null&&this._guard!=null){let c=re(n);if(!this._guard(c,"observe"))throw new H({actor:c,action:"observe",nodeName:this.name})}let s=this._isTerminal&&this._resubscribable;if(s){this._cached=void 0,this._status="sentinel",this._store={},this._hasCalledFnOnce=!1,this._waveHasNewData=!1,this._hasNewTerminal=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._isExecutingFn=!1,this._rerunDepth=0,this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null;for(let c of this._deps)Ne(c);if(this._partial===!1){for(let c of this._deps)if(c.prevData!==void 0||c.dataBatch.length!==0||c.terminal!==void 0||c.dirty)throw new Error(`resubscribable-reset invariant: DepRecord not fully reset for node ${this._optsName??"(anonymous)"}`)}}this._sinkCount+=1;let i;try{i=this._config.onSubscribe(this,t,{sinkCount:this._sinkCount,afterTerminalReset:s},this._actions)}catch(c){throw this._sinkCount-=1,c}this._sinks==null?this._sinks=t:typeof this._sinks=="function"?this._sinks=new Set([this._sinks,t]):this._sinks.add(t);let a=this._isTerminal;if(this._sinkCount===1&&!a)try{this._activate()}catch(c){if(this._sinkCount-=1,this._removeSink(t),this._sinkCount===0&&(this._status="sentinel"),typeof i=="function")try{i()}catch{}throw c}this._status==="sentinel"&&this._cached===void 0&&(this._status="pending");let o=!1;return()=>{o||(o=!0,this._sinkCount-=1,this._removeSink(t),typeof i=="function"&&i(),this._sinks==null&&this._deactivate())}}_removeSink(t){if(this._sinks===t)this._sinks=null;else if(this._sinks!=null&&typeof this._sinks!="function")if(this._sinks.delete(t),this._sinks.size===1){let[n]=this._sinks;this._sinks=n}else this._sinks.size===0&&(this._sinks=null)}_activate(){if(this._deps.length===0){this._fn&&this._execFn();return}this._dirtyDepCount=0;let t=this._deps.length,n=0;try{for(let r=0;r<t;r++){let s=r,i=this._deps[r];i.unsub=ct,i.unsub=i.node.subscribe(a=>{if(i.unsub===null)return;let o=this._config.tierOf,c=!1;for(let d of a)o(d[0])>=3&&(c=!0),this._config.onMessage(this,d,{direction:"down-in",depIndex:s},this._actions);c&&this._maybeRunFnOnSettlement()}),n++}}catch(r){this._deps[n].unsub=null;for(let s=0;s<n;s++){let i=this._deps[s];if(i.unsub!=null){let a=i.unsub;i.unsub=null;try{a()}catch{}Ne(i)}}throw this._dirtyDepCount=0,r}}_addDep(t){for(let s=0;s<this._deps.length;s++)if(this._deps[s].node===t)return s;let n=this._deps.length,r=ut(t);if(this._deps.push(r),this._sinks==null)return n;r.dirty=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(_e),r.unsub=ct;try{r.unsub=t.subscribe(s=>{if(r.unsub===null)return;let i=this._config.tierOf,a=!1;for(let o of s)i(o[0])>=3&&(a=!0),this._config.onMessage(this,o,{direction:"down-in",depIndex:n},this._actions);a&&this._maybeRunFnOnSettlement()})}catch(s){throw r.unsub=null,this._deps.pop(),this._dirtyDepCount--,s}return n}_deactivate(t=!1){let n=this._cleanup;if(this._cleanup=void 0,typeof n=="function")try{n()}catch(r){this._emit([[v,this._wrapFnError("cleanup threw",r)]])}else if(n!=null&&typeof n=="object"){let r=n.deactivate;if(typeof r=="function")try{r()}catch(s){this._emit([[v,this._wrapFnError("cleanup.deactivate threw",s)]])}}for(let r of this._deps){if(r.unsub!=null){let s=r.unsub;r.unsub=null;try{s()}catch{}}Ne(r)}this._waveHasNewData=!1,this._hasNewTerminal=!1,this._hasCalledFnOnce=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._rerunDepth=0,this._store={},this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null,this._fn!=null&&(this._cached=void 0),t||(this._fn!=null||this._deps.length>0)&&(!this._isTerminal||this._resubscribable)&&(this._status="sentinel")}_onDepMessage(t,n){let r=this._deps[t],s=n[0];if(this._inspectorHooks!=null){let i={kind:"dep_message",depIndex:t,message:n};for(let a of this._inspectorHooks)a(i)}if(s!==G){if(s===L){this._depDirtied(r);return}if(s===U){if(this._depInvalidated(r),this._cached===void 0)return;this._emit(Xe);return}if(s===B||s===Q){this._emit([n]);return}if(s===I){this._emit(Se);return}if(s===E)this._depSettledAsData(r,n[1]);else if(s===P)this._depSettledAsResolved(r);else if(s===N)this._depSettledAsTerminal(r,!0);else if(s===v)this._depSettledAsTerminal(r,n[1]);else{this._emit([n]);return}if(!this._fn){(s===E||s===P)&&this._emit([n]),(s===N||s===v)&&this._maybeAutoTerminalAfterWave();return}}}_depDirtied(t){t.dirty||(t.dirty=!0,t.involvedThisWave=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(_e))}_depSettledAsData(t,n){t.dirty&&(t.dirty=!1,this._dirtyDepCount--),t.involvedThisWave=!0,t.dataBatch.push(n),this._waveHasNewData=!0}_depSettledAsResolved(t){t.dirty&&(t.dirty=!1,this._dirtyDepCount--)}_depSettledAsTerminal(t,n){t.dirty&&(t.dirty=!1,this._dirtyDepCount--),t.terminal=n,t.involvedThisWave=!0,this._hasNewTerminal=!0}_depInvalidated(t){t.prevData=void 0,t.terminal=void 0,t.dataBatch.length=0,t.dirty?t.involvedThisWave=!1:(t.dirty=!0,t.involvedThisWave=!0,this._dirtyDepCount++)}_maybeRunFnOnSettlement(){if(!(this._isTerminal&&!this._resubscribable)&&!(this._dirtyDepCount>0)){if(!this._partial&&!this._hasCalledFnOnce)for(let t=0;t<this._deps.length;t++){let n=this._deps[t];if(n.dataBatch.length===0&&n.prevData===void 0&&n.terminal===void 0){this._maybeAutoTerminalAfterWave();return}}if(this._paused){this._pendingWave=!0;return}if(!this._waveHasNewData&&!this._hasNewTerminal&&this._hasCalledFnOnce){this._clearWaveFlags(),this._emit(Ye),this._maybeAutoTerminalAfterWave();return}this._fn&&this._execFn(),this._maybeAutoTerminalAfterWave()}}_maybeAutoTerminalAfterWave(){if(this._deps.length===0||this._isTerminal)return;let t=this._deps.find(n=>n.terminal!==void 0&&n.terminal!==!0);if(t!=null){this._autoError&&this._emit([[v,t.terminal]]);return}this._autoComplete&&this._deps.every(n=>n.terminal!==void 0)&&this._emit(Ze)}_execFn(){if(!this._fn||this._isTerminal&&!this._resubscribable)return;if(this._isExecutingFn){this._pendingRerun=!0;return}let t=this._cleanup;if(typeof t=="function"){this._cleanup=void 0;try{t()}catch(a){this._emit([[v,this._wrapFnError("cleanup threw",a)]]);return}}else if(t!=null&&typeof t=="object"){let a=t.beforeRun;if(typeof a=="function"){t.beforeRun=void 0;try{a()}catch(o){this._emit([[v,this._wrapFnError("cleanup.beforeRun threw",o)]]);return}}}let n=this._deps.map(a=>a.involvedThisWave?a.dataBatch.length>0?[...a.dataBatch]:[]:void 0),r=this._deps.map(a=>a.prevData);for(let a=0;a<this._deps.length;a++){let o=n[a];o!=null&&o.length>0&&(this._deps[a].prevData=o[o.length-1])}let s=this._deps.map(a=>a.terminal),i={prevData:r,terminalDeps:s,store:this._store};if(this._hasCalledFnOnce=!0,this._clearWaveFlags(),this._inspectorHooks!=null){let a={kind:"run",batchData:n,prevData:r};for(let o of this._inspectorHooks)o(a)}this._isExecutingFn=!0;try{let a=this._fn(n,this._actions,i);if(typeof a=="function")this._cleanup=a;else if(a!=null&&typeof a=="object"){let o=a;(typeof o.beforeRun=="function"||typeof o.deactivate=="function"||typeof o.invalidate=="function")&&(this._cleanup=a)}}catch(a){this._emit([[v,this._wrapFnError("fn threw",a)]])}finally{this._isExecutingFn=!1,this._pendingRerun?(this._pendingRerun=!1,this._rerunDepth+=1,this._rerunDepth>dt?(this._rerunDepth=0,this._emit([[v,new Error(`Node "${this.name}": _pendingRerun depth exceeded ${dt} \u2014 likely a reactive cycle`)]])):this._maybeRunFnOnSettlement()):this._rerunDepth=0,this._clearWaveFlags()}}_clearWaveFlags(){this._waveHasNewData=!1,this._hasNewTerminal=!1;for(let t of this._deps)t.involvedThisWave=!1,t.dataBatch.length=0}_wrapFnError(t,n){let r=n instanceof Error?n.message:String(n);return new Error(`Node "${this.name}": ${t}: ${r}`,{cause:n})}_frameBatch(t){let n=this._config.tierOf;if(t.length===1)return n(t[0][0])===3&&this._status!=="dirty"?[j,t[0]]:t;let r=!0,s=!1,i=!1,a=-1;for(let c of t){let d=n(c[0]);d<a&&(r=!1),d===3&&(s=!0),c[0]===L&&(i=!0),a=d}let o=t;if(!r){let c=t.map((d,u)=>({m:d,i:u,tier:n(d[0])}));c.sort((d,u)=>d.tier-u.tier||d.i-u.i),o=c.map(d=>d.m)}if(s&&!i&&this._status!=="dirty"){let c=0;for(;c<o.length&&n(o[c][0])===0;)c++;return c===0?[j,...o]:[...o.slice(0,c),j,...o.slice(c)]}return o}_emit(t){if(t.length===0)return;for(let o=0;o<t.length;o++){let c=t[o];if(c[0]===v&&c[1]===void 0)throw new TypeError('[ERROR, payload] requires a non-undefined payload (spec \xA71.2). Pass an Error object or domain tag instead \u2014 e.g. node.down([[ERROR, new Error("reason")]])')}let n=t;if(this._isTerminal&&!this._resubscribable){let o=t.filter(c=>c[0]===I||c[0]===U);if(o.length===0)return;n=o}n=this._frameBatch(n);let s=null;for(let o=0;o<n.length;o++){let c=n[o],d=c[0];if(d!==B&&d!==Q){s?.push(c);continue}if(c.length<2)throw new Error(`Node "${this.name}": [[${d===B?"PAUSE":"RESUME"}]] must carry a lockId payload \u2014 bare PAUSE/RESUME is a protocol violation (C0 rule). Use \`[[PAUSE, lockId]]\` / \`[[RESUME, lockId]]\`.`);let u=!0;if(this._pausable!==!1){let l=c[1];if(d===B)this._pauseLocks==null&&(this._pauseLocks=new Set),this._pauseLocks.add(l),this._paused=!0,this._pausable==="resumeAll"&&this._pauseBuffer==null&&(this._pauseBuffer=[]);else if(this._pauseLocks==null||!this._pauseLocks.has(l))u=!1;else if(this._pauseLocks.delete(l),this._pauseLocks.size===0){if(this._paused=!1,this._pauseBuffer!=null&&this._pauseBuffer.length>0){let p=this._pauseBuffer;this._pauseBuffer=[],this._emit(p)}this._pendingWave&&(this._pendingWave=!1,this._maybeRunFnOnSettlement())}}u?s?.push(c):s==null&&(s=n.slice(0,o))}if(s!=null){if(s.length===0)return;n=s}if(this._hasMeta&&n.some(o=>o[0]===I))for(let o of Object.keys(this.meta))try{this.meta[o]._emit(Se)}catch{}let{finalMessages:i,equalsError:a}=this._updateState(n);if(i.length>0&&this._config.inspectorEnabled){let o=this._config.globalInspector;if(o!=null)try{o({kind:"emit",node:this,messages:i})}catch{}}if(i.length>0)if(this._paused&&this._pausable==="resumeAll"&&this._pauseBuffer!=null){let o=this._config.tierOf,c=[];for(let d of i)o(d[0])===3?this._pauseBuffer.push(d):c.push(d);c.length>0&&this._dispatchOrAccumulate(c)}else this._dispatchOrAccumulate(i);a!=null&&this._emit([[v,a]])}_updateState(t){let n=this._config.tierOf,r,s,i=-1,a=0;for(let u of t)n(u[0])===3&&a++;let o=a<=1,c=-1;if(this._versioning!=null&&a>1){for(let u=t.length-1;u>=0;u--)if(t[u][0]===E){c=u;break}}for(let u=0;u<t.length;u++){let l=t[u],p=l[0];if(p===E){if(l.length>=2){let f=!1;if(o&&this._cached!==void 0)try{f=this._equals(this._cached,l[1])}catch(h){s=this._wrapFnError("equals threw",h),i=u;break}if(f){r==null&&(r=t.slice(0,u)),r.push(ve),this._status="resolved";continue}this._cached=l[1],this._versioning!=null&&(c<0||u===c)&&it(this._versioning,l[1],this._hashFn)}this._status="settled",r?.push(l)}else if(r?.push(l),p===L)this._status="dirty";else if(p===P)this._status="resolved";else if(p===N){this._status="completed";{let f=this._config.rigorRecorder;if(f!=null)try{f.onTerminalTransition(this,"completed",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(p===v){this._status="errored";{let f=this._config.rigorRecorder;if(f!=null)try{f.onTerminalTransition(this,"errored",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(p===U){if(this._cached!==void 0){let h=this._config.rigorRecorder;if(h!=null)try{h.onNonVacuousInvalidate(this,this._cached)}catch{}}this._cached=void 0,this._status="dirty";let f=this._cleanup;if(typeof f=="function"){this._cleanup=void 0;try{f()}catch{}}else if(f!=null&&typeof f=="object"){let h=f.invalidate;if(typeof h=="function")try{h()}catch{}}}else p===I&&(this._resetOnTeardown&&(this._cached=void 0),this._deactivate(!0),this._status="sentinel")}let d=i>=0?r??t.slice(0,i):r??t;return s!=null?{finalMessages:d,equalsError:s}:{finalMessages:d}}_deliverToSinks=t=>{if(this._sinks==null)return;if(typeof this._sinks=="function"){this._sinks(t);return}let n=[...this._sinks];for(let r of n)r(t)};_dispatchOrAccumulate(t){if(qe()){this._batchPendingMessages===null&&(this._batchPendingMessages=[],Je(()=>this._flushBatchPending()));for(let n of t)this._batchPendingMessages.push(n);return}ne(this._deliverToSinks,t,this._config.tierOf)}_flushBatchPending(){let t=this._batchPendingMessages;if(t===null||(this._batchPendingMessages=null,t.length===0))return;let n=this._frameBatch(t);ne(this._deliverToSinks,n,this._config.tierOf)}},lt=e=>Array.isArray(e),Oe=e=>typeof e=="object"&&e!=null&&!Array.isArray(e)});function ae(e,t){return pt((r,s,i)=>e(s,i)??void 0,{describeKind:"producer",...t})}var mt=R(()=>{"use strict";ft()});function Me(e){return{describeKind:"producer",...e}}function gt(e,t){return ae(n=>{let r=!1;try{for(let s of e){if(r)return;n.emit(s)}r||n.down([[N]])}catch(s){r||n.down([[v,s]])}return()=>{r=!0}},Me(t))}function fn(e){return e!=null&&typeof e.then=="function"}function mn(e,t){let{signal:n,...r}=t??{};return ae(s=>{let i=!1,a=()=>{i||(i=!0,s.down([[v,n.reason]]))};if(n?.aborted){a();return}return n?.addEventListener("abort",a,{once:!0}),Promise.resolve(e).then(o=>{i||(i=!0,n?.removeEventListener("abort",a),s.emit(o),s.down([[N]]))},o=>{i||(i=!0,n?.removeEventListener("abort",a),s.down([[v,o]]))}),()=>{i=!0,n?.removeEventListener("abort",a)}},Me(r))}function gn(e,t){let{signal:n,...r}=t??{};return ae(s=>{let i=new AbortController,a=()=>i.abort(n?.reason);n?.aborted?i.abort(n.reason):n?.addEventListener("abort",a,{once:!0});let o=n??i.signal,c=!1,d=e[Symbol.asyncIterator](),u=()=>{c||o.aborted||Promise.resolve(d.next()).then(l=>{if(!(c||o.aborted)){if(l.done){s.down([[N]]);return}s.emit(l.value),u()}},l=>{!c&&!o.aborted&&s.down([[v,l]])})};return u(),()=>{c=!0,n?.removeEventListener("abort",a),i.abort(),Promise.resolve(d.return?.()).catch(()=>{})}},Me(r))}function hn(e){return e!=null&&typeof e=="object"&&"cache"in e&&typeof e.subscribe=="function"}function X(e,t){if(hn(e))return e;if(fn(e))return mn(e,t);if(e!=null){let n=e;if(typeof n[Symbol.asyncIterator]=="function")return gn(e,t);if(typeof n[Symbol.iterator]=="function")return gt(e,t)}return yn(e)}function yn(...e){return gt(e,void 0)}function V(e){return new Promise((t,n)=>{let r=!1,s=!1,i;i=e.subscribe(a=>{for(let o of a){if(r)return;if(o[0]===E){r=!0,t(o[1]),i?(i(),i=void 0):s=!0;return}if(o[0]===v){r=!0,n(o[1]),i?(i(),i=void 0):s=!0;return}if(o[0]===N){r=!0,n(new Error("completed without DATA")),i?(i(),i=void 0):s=!0;return}}}),s&&(i?.(),i=void 0)})}var ht=R(()=>{"use strict";Y();mt()});var ce=R(()=>{"use strict";ht()});var K,Le=R(()=>{"use strict";K=class{_timer;_gen=0;start(t,n){this.cancel(),this._gen+=1;let r=this._gen;this._timer=setTimeout(()=>{this._timer=void 0,r===this._gen&&n()},t)}cancel(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}get pending(){return this._timer!==void 0}}});function Tn(e){return e<0?0:e}function yt(e){let t=5,n=30*1e9,r=null,s=1,i=k;function a(m){t=Math.max(1,m?.failureThreshold??5),n=Tn(m?.cooldownNs??30*1e9),r=m?.cooldown??null,s=Math.max(1,m?.halfOpenMax??1),i=m?.now??k}let o="closed",c=0,d=0,u=0,l=n,p=0,f=wn(e,m=>{a(m),o="closed",c=0,d=0,p=0,l=n});a(f.current()),l=n;function h(){if(!r)return n;let m=r(d);return m!==null?m:n}function y(){o="open",l=h(),u=i(),p=0}return{canExecute(){return o==="closed"?!0:o==="open"?i()-u>=l?(o="half-open",p=1,!0):!1:p<s?(p++,!0):!1},recordSuccess(){o==="half-open"?(o="closed",c=0,d=0):o==="closed"&&(c=0)},recordFailure(m){if(o==="half-open"){d++,y();return}o==="closed"&&(c++,c>=t&&y())},get state(){return o},get failureCount(){return c},reset(){o="closed",c=0,d=0,p=0},dispose(){f.unsub()}}}function kn(e){return e!=null&&typeof e=="object"&&"cache"in e&&typeof e.subscribe=="function"}function wn(e,t){if(!kn(e))return{current:()=>e,unsub:()=>{}};let n=e,r=n.cache,s=n.subscribe(i=>{for(let a of i)a[0]===E&&(r=a[1],t&&t(r))});return{current:()=>r,unsub:s}}var Or,bt=R(()=>{"use strict";M();Y();Or=Object.freeze({droppedCount:0,pendingCount:0,paused:!1})});var Tt=R(()=>{"use strict";bt()});var Jn={};qt(Jn,{chromeNanoAdapter:()=>q,cloudFirstPreset:()=>zn,localFirstPreset:()=>$n,offlinePreset:()=>qn,webllmAdapter:()=>J});module.exports=Qt(Jn);M();function Ve(){let e=new Error("aborted");return e.name="AbortError",e}function q(e={}){let t=e.streamMode??"accumulated",n=e.navigatorOverride??globalThis.navigator,r=()=>{let o=n?.ai;if(!o?.languageModel)throw new Error("chromeNanoAdapter: Chrome AI languageModel not available (requires Chrome 131+ with flag/OT).");return o},s=async o=>r().languageModel.create({systemPrompt:o?.systemPrompt??e.systemPrompt,temperature:o?.temperature??e.temperature,topK:e.topK,signal:o?.signal}),i=o=>{let c=[];for(let d of o)d.role!=="system"&&c.push(`${d.role}: ${d.content}`);return c.join(`
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
2
16
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
`):void 0,chat:r}}function xn(e){if(e.role==="tool")return{role:"user",content:[{type:"tool_result",tool_use_id:e.toolCallId,content:e.content}]};if(e.role==="assistant"&&e.toolCalls&&e.toolCalls.length>0){let t=[];e.content&&t.push({type:"text",text:e.content});for(let n of e.toolCalls)t.push({type:"tool_use",id:n.id,name:n.name,input:n.arguments});return{role:"assistant",content:t}}return{role:e.role,content:e.content}}function _n(e){return{name:e.name,description:e.description,input_schema:e.parameters}}function ue(e,t){if(!e)return{...t};let n={...e};return t.input_tokens!=null&&(n.input_tokens=t.input_tokens),t.output_tokens!=null&&(n.output_tokens=t.output_tokens),t.cache_read_input_tokens!=null&&(n.cache_read_input_tokens=t.cache_read_input_tokens),t.cache_creation_input_tokens!=null&&(n.cache_creation_input_tokens=t.cache_creation_input_tokens),t.cache_creation&&(n.cache_creation={...e.cache_creation??{},...t.cache_creation}),t.server_tool_use&&(n.server_tool_use={...e.server_tool_use??{},...t.server_tool_use}),n}function Pe(e){let t={input:{regular:e?.input_tokens??0},output:{regular:e?.output_tokens??0},raw:e};return e?.cache_read_input_tokens&&(t.input.cacheRead=e.cache_read_input_tokens),e?.cache_creation?(e.cache_creation.ephemeral_5m_input_tokens&&(t.input.cacheWrite5m=e.cache_creation.ephemeral_5m_input_tokens),e.cache_creation.ephemeral_1h_input_tokens&&(t.input.cacheWrite1h=e.cache_creation.ephemeral_1h_input_tokens)):e?.cache_creation_input_tokens&&(t.input.cacheWrite5m=e.cache_creation_input_tokens),e?.server_tool_use?.web_search_requests&&(t.auxiliary={webSearchRequests:e.server_tool_use.web_search_requests}),t}function wt(e,t){let n=[],r=[];for(let s of e.content)if(s.type==="text"&&typeof s.text=="string")n.push(s.text);else if(s.type==="tool_use"){let i=s;r.push({id:i.id,name:i.name,arguments:i.input??{}})}return{content:n.join(""),toolCalls:r.length>0?r:void 0,usage:Pe(e.usage),finishReason:e.stop_reason,latencyMs:t,model:e.model,provider:"anthropic"}}function Sn(e){let t=e.apiKey??globalThis.process?.env?.ANTHROPIC_API_KEY,n=e.baseURL??"https://api.anthropic.com",r=e.anthropicVersion??"2023-06-01",s=e.fetchImpl??fetch,i=()=>{if(!t)throw new Error("anthropicAdapter: apiKey required for invoke/stream (or provide opts.sdk)");return{"x-api-key":t,"anthropic-version":r,"content-type":"application/json",...e.headers??{}}};return{provider:"anthropic",model:e.model,async invoke(a,o){let c=de(a,o,e.model,!1),d=k(),u=await s(`${n}/v1/messages`,{method:"POST",headers:i(),body:JSON.stringify(c),signal:o?.signal});if(!u.ok)throw await F(u,"Anthropic");let l=await u.json(),p=Math.max(0,(k()-d)/1e6);return wt(l,p)},async*stream(a,o){let c=de(a,o,e.model,!0),d=await s(`${n}/v1/messages`,{method:"POST",headers:{...i(),accept:"text/event-stream"},body:JSON.stringify(c),signal:o?.signal});if(!d.ok)throw await F(d,"Anthropic");if(!d.body)throw new Error("anthropicAdapter: streaming response has no body");let u,l,p=new Map;for await(let f of W(d.body,{signal:o?.signal})){let h=f.data;if(!h)continue;let y;try{y=JSON.parse(h)}catch{continue}switch(y.type){case"message_start":{u=ue(u,y.message.usage);break}case"content_block_start":{let g=y,m=g.content_block;m.type==="tool_use"&&(p.set(g.index,{id:String(m.id??""),name:String(m.name??""),argBuf:""}),yield{type:"tool-call-delta",delta:{id:String(m.id??""),name:String(m.name??"")}});break}case"content_block_delta":{let g=y,m=g.delta;if(m.type==="text_delta"&&typeof m.text=="string")yield{type:"token",delta:m.text};else if(m.type==="input_json_delta"&&typeof m.partial_json=="string"){let _=p.get(g.index);_&&(_.argBuf+=m.partial_json),yield{type:"tool-call-delta",delta:{argumentsDelta:m.partial_json}}}else m.type==="thinking_delta"&&typeof m.thinking=="string"&&(yield{type:"thinking",delta:m.thinking});break}case"message_delta":{let g=y;g.delta.stop_reason&&(l=g.delta.stop_reason),g.delta.usage&&(u=ue(u,g.delta.usage));break}case"message_stop":break}}u&&(yield{type:"usage",usage:Pe(u)}),yield{type:"finish",reason:l??"stop"}}}}function An(e){let t=e.sdk;if(!t)throw new Error("sdkBackedAnthropic: sdk instance required");return{provider:"anthropic",model:e.model,async invoke(n,r){let s=de(n,r,e.model,!1),i=k(),a=await t.messages.create(s,{signal:r?.signal}),o=Math.max(0,(k()-i)/1e6);return wt(a,o)},async*stream(n,r){if(!t.messages.stream)throw new Error("sdkBackedAnthropic: SDK instance does not expose .messages.stream");let s=de(n,r,e.model,!0),i,a;for await(let o of t.messages.stream(s,{signal:r?.signal}))switch(o.type){case"message_start":i=ue(i,o.message.usage);break;case"content_block_delta":{let c=o.delta;c?.type==="text_delta"&&typeof c.text=="string"?yield{type:"token",delta:c.text}:c?.type==="input_json_delta"&&typeof c.partial_json=="string"?yield{type:"tool-call-delta",delta:{argumentsDelta:c.partial_json}}:c?.type==="thinking_delta"&&typeof c.thinking=="string"&&(yield{type:"thinking",delta:c.thinking});break}case"message_delta":{let c=o;c.delta.stop_reason&&(a=c.delta.stop_reason),c.delta.usage&&(i=ue(i,c.delta.usage));break}}i&&(yield{type:"usage",usage:Pe(i)}),yield{type:"finish",reason:a??"stop"}}}}Le();function le(){let e=new Error("aborted");return e.name="AbortError",e}function vt(e,t){return e<=0?Promise.resolve():t?.aborted?Promise.reject(le()):new Promise((n,r)=>{let s=new K,i,a=()=>{s.cancel(),t&&i&&t.removeEventListener("abort",i)};s.start(e,()=>{a(),n()}),t&&(i=()=>{a(),r(le())},t.addEventListener("abort",i,{once:!0}))})}function pe(e={}){let t=e.provider??"dry-run",n=e.model??"dry-run-v1",r=e.latencyMs??0,s=Math.max(1,e.streamChunkSize??16),i=e.respond??(o=>{let c=[...o].reverse().find(d=>d.role==="user");return c?`echo: ${c.content}`:"dry-run: no user message"}),a=e.usage??((o,c)=>{let d=o.reduce((u,l)=>u+l.content.length,0);return{input:{regular:Math.ceil(d/4)},output:{regular:Math.ceil(c.length/4)}}});return{provider:t,model:n,async invoke(o,c){if(await vt(r,c?.signal),c?.signal?.aborted)throw le();let d=i(o,c),u=a(o,d);return{content:d,usage:u,finishReason:"stop",model:c?.model??n,provider:t,tier:c?.tier,metadata:{dryRun:!0}}},async*stream(o,c){let d=i(o,c),u=a(o,d),l=Math.ceil(d.length/s)||1,p=r>0?r/l:0;for(let f=0;f<d.length;f+=s){if(c?.signal?.aborted)throw le();await vt(p,c?.signal),yield{type:"token",delta:d.slice(f,f+s)}}yield{type:"usage",usage:u},yield{type:"finish",reason:"stop"}}}}M();async function fe(e){let t=typeof e=="string"?new TextEncoder().encode(e):e,n=await globalThis.crypto.subtle.digest("SHA-256",t),r=new Uint8Array(n),s="";for(let i=0;i<r.length;i++)s+=xt[r[i]];return s}var xt=new Array(256);for(let e=0;e<256;e++)xt[e]=e.toString(16).padStart(2,"0");function Ie(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Ie);let t=e,n=Object.keys(t).sort(),r={};for(let s of n)r[s]=Ie(t[s]);return r}function _t(e){return JSON.stringify(Ie(e),void 0,0)}var Rn=new TextEncoder,En=new TextDecoder("utf-8",{fatal:!0}),Nn={name:"json",version:1,encode(e){return Rn.encode(_t(e))},decode(e){return JSON.parse(En.decode(e))}};function On(){let e=new Map;return{name:"memory",read(t){let n=e.get(t);return n===void 0?void 0:new Uint8Array(n)},write(t,n){e.set(t,new Uint8Array(n))},delete(t){e.delete(t)},list(t){let n=[...e.keys()];return t?n.filter(r=>r.startsWith(t)).sort():n.sort()}}}function Cn(e,t={}){let n=t.codec??Nn,r=t.name??e.name??"kv",s=t.compactEvery,i=new Map,a=0,o={name:r,debounceMs:t.debounceMs,compactEvery:s,filter:t.filter,save(d,u){if(!(t.filter&&!t.filter(d,u))&&(i.set(d,u),a+=1,s!==void 0&&a%s===0||!t.debounceMs))return c()},load(d){let u=e.read(d);if(u!==void 0)return u instanceof Uint8Array?u.length===0?void 0:n.decode(u):Promise.resolve(u).then(l=>l===void 0||l.length===0?void 0:n.decode(l))},delete(d){if(i.delete(d),!!e.delete)return e.delete(d)},list(d){return e.list?e.list(d):[]},async flush(){await c()},async rollback(){i=new Map}};function c(){if(i.size===0)return;let d=i;i=new Map;let u=[];for(let[l,p]of d){let f=n.encode(p),h=e.write(l,f);h instanceof Promise&&u.push(h)}if(u.length>0)return Promise.all(u).then(()=>{})}return o}function Fe(e){return Cn(On(),e)}M();var De=class extends Error{constructor(n,r){super(`content-addressed lookup miss in read-strict mode: ${n}`);this.key=n;this.context=r;this.name="ContentAddressedMissError"}};function Ue(e){let t=new Set,n=r=>{if(r===null||typeof r!="object")return r;let s=r;if(t.has(s))return{__cycle:!0};t.add(s);try{if(Array.isArray(r))return r.map(n);let i={};for(let a of Object.keys(r).sort())i[a]=n(r[a]);return i}finally{t.delete(s)}};return JSON.stringify(n(e))}function St(e){let{storage:t,keyContext:n,keyPrefix:r,mode:s="read-write"}=e,i=n??(o=>o);async function a(o){let c=Ue(i(o)),d=await fe(c);return r?`${r}:${d}`:d}return{keyFor:a,async lookup(o){if(s==="write")return;let c=await a(o),d=await t.load(c);if(d===void 0){if(s==="read-strict")throw new De(c,o);return}return d},async store(o,c){if(s==="read")return;let d=await a(o);await t.save(d,c)},async forget(o){if(s==="read"||s==="write"||!t.delete)return;let c=await a(o);await t.delete(c)}}}ce();function At(e,t={}){let n=t.keyFn??(s=>String(s)),r=new Map;return s=>{let i=n(s),a=r.get(i);if(a)return a;let o=e(s),c;o!=null&&typeof o.then=="function"?c=Promise.resolve(o):o!=null&&typeof o=="object"&&"subscribe"in o&&"cache"in o?c=V(o):o!=null&&typeof o=="object"&&Symbol.asyncIterator in o?c=(async()=>{let l=o[Symbol.asyncIterator]();try{let{value:p,done:f}=await l.next();if(f)throw new Error("singleFromAny: factory returned empty async iterable");return p}finally{await l.return?.()}})():o!=null&&typeof o=="object"&&Symbol.iterator in o?c=(async()=>{let l=o[Symbol.iterator]();try{let{value:p,done:f}=l.next();if(f)throw new Error("singleFromAny: factory returned empty iterable");return p}finally{l.return?.()}})():c=Promise.resolve(o);let d,u=()=>{r.get(i)===d&&r.delete(i)};return d=c.then(l=>(u(),l),l=>{throw u(),l}),r.set(i,d),d}}ce();Le();function Rt(e){let{storage:t,mode:n="read-write",keyFn:r,keyPrefix:s="llm-replay"}=e,a=St({storage:t,keyPrefix:s,mode:n==="read-strict"?"read":n,keyContext:({messages:c,opts:d})=>{let{signal:u,keyContext:l,...p}=d??{};return{messages:c,opts:p}}});async function o(c,d){if(r){if(r.length<=1){let l={messages:c,opts:d,context:d?.keyContext},p=await r(l);return`${s}:${p}`}let u=await r(c,d);return`${s}:${u}`}return a.keyFor({messages:c,opts:d})}return{keyFor:o,async lookup(c,d){if(n!=="write"){if(r){let u=await o(c,d),l=await t.load(u);return l===void 0?void 0:l}return a.lookup({messages:c,opts:d})}},async store(c,d,u){if(n!=="read"){if(r){let l=await o(c,d);await t.save(l,u);return}await a.store({messages:c,opts:d},u)}},async forget(c,d){if(!(n==="read"||n==="write")&&t.delete){if(r){let u=await o(c,d);await t.delete(u);return}await a.forget({messages:c,opts:d})}}}}function Et(e,t,n){return{provider:n?.provider??e.provider,model:n?.model??e.model,capabilities:n?.capabilities??e.capabilities?.bind(e),invoke:t.invoke,stream:t.stream}}var Nt=Symbol.for("graphrefly.adapter.middlewareLayers");function me(e,t,n){let s=[...n?Mn(n):[],t];return Object.defineProperty(e,Nt,{value:Object.freeze(s),enumerable:!1,writable:!1,configurable:!1}),e}function Mn(e){let t=e[Nt];return Array.isArray(t)?t:[]}var Z=class extends Error{constructor(n,r){super(`withReplayCache: no cached response for ${r} (key=${n}, mode=read-strict)`);this.key=n;this.method=r}name="ReplayCacheMissError"};function Ot(e,t){let n=t.mode??"read-write",r=t.cacheStreaming??!1,s=t.captureStreamCadence??!1,i=t.replaySpeed??1,a=t.keyPrefix??"llm-replay",o=n==="read"||n==="read-strict",c=Rt({storage:t.storage,mode:n==="write-only"?"write":n,keyFn:t.keyFn,keyPrefix:a}),d=p=>p<=0?Promise.resolve():new Promise(f=>{new K().start(p,()=>f())}),u=At(async({messages:p,invokeOpts:f})=>await V(X(e.invoke(p,f))),{keyFn:({_precomputedKey:p})=>p}),l=Et(e,{async invoke(p,f){let h=await c.keyFor(p,f),y=await c.lookup(p,f);if(y?.response){let m=y.response;return{...m,metadata:{...m.metadata??{},replayCache:"hit"}}}if(n==="read-strict")throw new Z(h,"invoke");let g=await u({messages:p,invokeOpts:f,_precomputedKey:h});return o||await c.store(p,f,{response:g,storedAtNs:D()}),g},async*stream(p,f){if(!r){for await(let b of e.stream(p,f))yield b;return}let h=await c.keyFor(p,f),y=await c.lookup(p,f);if(y){let b=y.response;if(y.streamChunks&&y.streamCadenceMs)for(let w=0;w<y.streamChunks.length;w++){let x=y.streamCadenceMs[w]??0,C=i>0?x/i:0;C>0&&await d(C),yield{type:"token",delta:y.streamChunks[w]?.delta??""}}else b.content&&(yield{type:"token",delta:b.content});b.usage&&(yield{type:"usage",usage:b.usage}),yield{type:"finish",reason:b.finishReason??"stop"};return}if(n==="read-strict")throw new Z(h,"stream");let g="",m,_,S=[],O=[],T;for await(let b of e.stream(p,f)){if(b.type==="token"&&(g+=b.delta,s)){let w=k(),x=T===void 0?0:(w-T)/1e6;O.push(x),T=w,S.push({delta:b.delta})}b.type==="usage"&&(m=b.usage),b.type==="finish"&&(_=b.reason),yield b}if((g||m)&&!o){let w={response:{content:g,usage:m??{input:{regular:0},output:{regular:0}},finishReason:_,model:e.model??f?.model??"",provider:e.provider},storedAtNs:D(),...s?{streamChunks:S,streamCadenceMs:O}:{}};await c.store(p,f,w)}}});return me(l,"withReplayCache",e),l}var Ct=Ue;function Mt(e,t){return{content:"[fallback: no cached response available for this request]",usage:{input:{regular:0},output:{regular:0}},finishReason:"stop",model:t,provider:e,metadata:{degraded:!0,reason:"no-fixture"}}}function Lt(e,t,n){return typeof e=="string"?{content:e,usage:{input:{regular:0},output:{regular:0}},finishReason:"stop",model:n,provider:t,metadata:{degraded:!0,reason:"respond"}}:e}async function Ln(e,t){if("key"in e)return e.key;let n=Ct({messages:e.messages,opts:e.invokeOpts??{}}),r=await fe(n);return`${t}:${r}`}function Pn(e){let t={response:e.response,storedAtNs:D()};if("key"in e&&e.stream){let n=e.stream.chunks.filter(r=>r.type==="token");return{...t,streamChunks:n.map(r=>({delta:r.delta})),streamCadenceMs:e.stream.delaysMs??n.map(()=>0)}}return t}function In(e,t){let n=[];if(e.fixtures!=null&&n.push("fixtures"),e.fixturesStorage!=null&&n.push("fixturesStorage"),n.length>1)throw new TypeError(`fallbackAdapter: \`fixtures\` and \`fixturesStorage\` are mutually exclusive; got both ${n.join(" and ")}. Pick one source. For filesystem directories use the node subpath's \`fallbackAdapter\`.`);if(e.fixtures){let r=Fe(),s=e.fixtures,i=(async()=>{for(let a of s){let o=await Ln(a,t);await r.save(o,Pn(a))}})();return i.catch(()=>{}),{tier:r,seedReady:i}}return e.fixturesStorage?{tier:e.fixturesStorage,seedReady:Promise.resolve()}:{tier:void 0,seedReady:Promise.resolve()}}function Pt(e={}){let t=e.provider??"fallback",n=e.model??"fallback",r=e.onMiss??"respond",s=e.keyPrefix??"fallback",i=e.record?e.record.adapter:r==="throw"?pe({provider:t,model:n,respond:()=>"[unreachable: read-strict mode throws on miss]"}):{provider:t,model:n,async invoke(u,l){let p=e.respond?e.respond(u,l):Mt(t,n);return Lt(p,t,n)},async*stream(u,l){let p=e.respond?e.respond(u,l):Mt(t,n),f=Lt(p,t,n);yield{type:"token",delta:f.content},f.usage&&(yield{type:"usage",usage:f.usage}),yield{type:"finish",reason:f.finishReason??"stop"}}},a,o=Promise.resolve();if(e.record){if(!e.record.storage)throw new TypeError("fallbackAdapter: `record.storage` is required in record mode. For filesystem `record.dir` convenience, use the node subpath's `fallbackAdapter`.");a=e.record.storage}else{let u=In(e,s);a=u.tier??Fe(),o=u.seedReady}let c=e.record?"read-write":r==="throw"?"read-strict":"read",d=Ot(i,{storage:a,mode:c,keyPrefix:s,cacheStreaming:!0,captureStreamCadence:!0,replaySpeed:e.replaySpeed,...e.keyFn?{keyFn:e.keyFn}:{}});return{provider:t,model:n,capabilities:d.capabilities?.bind(d),async invoke(u,l){return await o,d.invoke(u,l)},async*stream(u,l){await o;for await(let p of d.stream(u,l))yield p}}}M();function Ft(e={}){return e.sdk?Bn(e):Un(e)}function ge(e,t){let n=[],r=[];t?.systemPrompt&&n.push(t.systemPrompt);for(let a of e){if(a.role==="system"){n.push(a.content);continue}if(a.role==="tool"){r.push({role:"user",parts:[{functionResponse:{name:a.name??a.toolCallId??"tool",response:{result:a.content}}}]});continue}if(a.role==="assistant"&&a.toolCalls&&a.toolCalls.length>0){let o=[];a.content&&o.push({text:a.content});for(let c of a.toolCalls)o.push({functionCall:{name:c.name,args:c.arguments}});r.push({role:"model",parts:o});continue}r.push({role:a.role==="assistant"?"model":"user",parts:[{text:a.content}]})}let s={contents:r};n.length>0&&(s.systemInstruction={role:"system",parts:[{text:n.join(`
|
|
7
|
-
|
|
8
|
-
`)}]});let i={};return t?.maxTokens!=null&&(i.maxOutputTokens=t.maxTokens),t?.temperature!=null&&(i.temperature=t.temperature),t?.maxReasoningTokens!=null&&(i.thinkingConfig={thinkingBudget:t.maxReasoningTokens}),Object.keys(i).length>0&&(s.generationConfig=i),t?.tools&&t.tools.length>0&&(s.tools=[{functionDeclarations:t.tools.map(Fn)}]),t?.providerExtras&&Object.assign(s,t.providerExtras),s}function Fn(e){return{name:e.name,description:e.description,parameters:e.parameters}}function It(e,t,n){let r={},s=e.generationConfig;s&&(typeof s.maxOutputTokens=="number"&&(r.maxOutputTokens=s.maxOutputTokens),typeof s.temperature=="number"&&(r.temperature=s.temperature),s.thinkingConfig&&(r.thinkingConfig=s.thinkingConfig)),e.systemInstruction&&(r.systemInstruction=e.systemInstruction),e.tools&&(r.tools=e.tools);for(let[i,a]of Object.entries(e))i==="contents"||i==="generationConfig"||i==="systemInstruction"||i==="tools"||i==="abortSignal"||i==="model"||(r[i]=a);return n&&(r.abortSignal=n),{model:t,contents:e.contents,config:Object.keys(r).length>0?r:void 0}}function Be(e){let t={input:{regular:0},output:{regular:0},raw:e};if(!e)return t;let n=e.promptTokenCount??0,r=e.cachedContentTokenCount??0;if(t.input.regular=Math.max(0,n-r),r>0&&(t.input.cacheRead=r),e.toolUsePromptTokenCount&&(t.input.toolUse=e.toolUsePromptTokenCount),e.promptTokensDetails)for(let s of e.promptTokensDetails){let i=s.modality?.toLowerCase();i==="image"?t.input.image=(t.input.image??0)+s.tokenCount:i==="audio"?t.input.audio=(t.input.audio??0)+s.tokenCount:i==="video"&&(t.input.video=(t.input.video??0)+s.tokenCount)}return t.output.regular=e.candidatesTokenCount??0,e.thoughtsTokenCount&&(t.output.reasoning=e.thoughtsTokenCount),t}function Dt(e,t){let n=e.candidates?.[0],r=n?.content?.parts??[],s=[],i=[],a=0;for(let o of r)typeof o.text=="string"&&s.push(o.text),o.functionCall&&i.push({id:`${o.functionCall.name}-${a++}`,name:o.functionCall.name,arguments:o.functionCall.args??{}});return{content:s.join(""),toolCalls:i.length>0?i:void 0,usage:Be(e.usageMetadata),finishReason:n?.finishReason,latencyMs:t,model:e.modelVersion,provider:"google"}}function Dn(e){if(e.apiKey)return e.apiKey;let t=globalThis.process?.env;return t?.GOOGLE_API_KEY??t?.GEMINI_API_KEY}function Un(e){let t=e.baseURL??"https://generativelanguage.googleapis.com/v1beta",n=e.fetchImpl??fetch,r=i=>{let a=i?.model??e.model;if(!a)throw new Error("googleAdapter: model must be set via options.model or invokeOpts.model");return a},s=()=>{let i=Dn(e);if(!i)throw new Error("googleAdapter: apiKey required for invoke/stream");return`key=${encodeURIComponent(i)}`};return{provider:"google",model:e.model,async invoke(i,a){let o=r(a),c=ge(i,a),d=k(),u=`${t}/models/${encodeURIComponent(o)}:generateContent?${s()}`,l=await n(u,{method:"POST",headers:{"content-type":"application/json",...e.headers??{}},body:JSON.stringify(c),signal:a?.signal});if(!l.ok)throw await F(l,"Google");let p=await l.json(),f=Math.max(0,(k()-d)/1e6);return Dt(p,f)},async*stream(i,a){let o=r(a),c=ge(i,a),d=`${t}/models/${encodeURIComponent(o)}:streamGenerateContent?alt=sse&${s()}`,u=await n(d,{method:"POST",headers:{"content-type":"application/json",accept:"text/event-stream",...e.headers??{}},body:JSON.stringify(c),signal:a?.signal});if(!u.ok)throw await F(u,"Google");if(!u.body)throw new Error("googleAdapter: streaming response has no body");let l,p;for await(let f of W(u.body,{signal:a?.signal})){if(!f.data)continue;let h;try{h=JSON.parse(f.data)}catch{continue}let y=h.candidates?.[0];for(let g of y?.content?.parts??[])typeof g.text=="string"&&(g.thought?yield{type:"thinking",delta:g.text}:yield{type:"token",delta:g.text}),g.functionCall&&(yield{type:"tool-call-delta",delta:{name:g.functionCall.name,argumentsDelta:JSON.stringify(g.functionCall.args??{})}});y?.finishReason&&(p=y.finishReason),h.usageMetadata&&(l=h.usageMetadata)}l&&(yield{type:"usage",usage:Be(l)}),yield{type:"finish",reason:p??"stop"}}}}function Bn(e){let t=e.sdk;if(!t)throw new Error("sdkBackedGoogle: sdk instance required");return{provider:"google",model:e.model,async invoke(n,r){let s=ge(n,r),i=r?.model??e.model;if(!i)throw new Error("googleAdapter: model required");let a=It(s,i,r?.signal),o=k(),c=await t.models.generateContent(a),d=Math.max(0,(k()-o)/1e6);return Dt(c,d)},async*stream(n,r){if(!t.models.generateContentStream)throw new Error("sdkBackedGoogle: SDK instance does not expose generateContentStream");let s=ge(n,r),i=r?.model??e.model;if(!i)throw new Error("googleAdapter: model required");let a=It(s,i,r?.signal),o,c,d=await t.models.generateContentStream(a);for await(let u of d){let l=u.candidates?.[0];for(let p of l?.content?.parts??[])typeof p.text=="string"&&(p.thought?yield{type:"thinking",delta:p.text}:yield{type:"token",delta:p.text}),p.functionCall&&(yield{type:"tool-call-delta",delta:{name:p.functionCall.name,argumentsDelta:JSON.stringify(p.functionCall.args??{})}});l?.finishReason&&(c=l.finishReason),u.usageMetadata&&(o=u.usageMetadata)}o&&(yield{type:"usage",usage:Be(o)}),yield{type:"finish",reason:c??"stop"}}}}M();var Gn={openai:{baseURL:"https://api.openai.com/v1",apiKeyEnv:"OPENAI_API_KEY",provider:"openai"},openrouter:{baseURL:"https://openrouter.ai/api/v1",apiKeyEnv:"OPENROUTER_API_KEY",provider:"openrouter"},groq:{baseURL:"https://api.groq.com/openai/v1",apiKeyEnv:"GROQ_API_KEY",provider:"groq"},ollama:{baseURL:"http://localhost:11434/v1",provider:"ollama"},deepseek:{baseURL:"https://api.deepseek.com/v1",apiKeyEnv:"DEEPSEEK_API_KEY",provider:"deepseek"},xai:{baseURL:"https://api.x.ai/v1",apiKeyEnv:"XAI_API_KEY",provider:"xai"}};function Ut(e={}){return e.sdk?Wn(e):Kn(e)}function he(e,t,n,r,s){let i=t?.model??n;if(!i)throw new Error("openAICompatAdapter: model must be set via options.model or invokeOpts.model");let a=e.map(jn);t?.systemPrompt&&!e.some(c=>c.role==="system")&&a.unshift({role:"system",content:t.systemPrompt});let o={model:i,messages:a};return t?.maxTokens!=null&&(o.max_tokens=t.maxTokens),t?.temperature!=null&&(o.temperature=t.temperature),t?.tools&&t.tools.length>0&&(o.tools=t.tools.map(Hn)),t?.maxReasoningTokens!=null&&(o.reasoning={max_tokens:t.maxReasoningTokens}),r&&(o.stream=!0,o.stream_options={include_usage:!0}),s&&Object.assign(o,s),t?.providerExtras&&Object.assign(o,t.providerExtras),o}function jn(e){return e.role==="tool"?{role:"tool",tool_call_id:e.toolCallId,content:e.content}:e.role==="assistant"&&e.toolCalls&&e.toolCalls.length>0?{role:"assistant",content:e.content||null,tool_calls:e.toolCalls.map(t=>({id:t.id,type:"function",function:{name:t.name,arguments:JSON.stringify(t.arguments)}}))}:{role:e.role,content:e.content}}function Hn(e){return{type:"function",function:{name:e.name,description:e.description,parameters:e.parameters}}}function Ge(e){let t={input:{regular:0},output:{regular:0},raw:e};if(!e)return t;let n=e.prompt_tokens??0,r=e.prompt_tokens_details?.cached_tokens??0;e.prompt_cache_hit_tokens!=null?(r=e.prompt_cache_hit_tokens,t.input.regular=e.prompt_cache_miss_tokens??Math.max(0,n-r)):t.input.regular=Math.max(0,n-r),r>0&&(t.input.cacheRead=r),e.prompt_tokens_details?.audio_tokens&&(t.input.audio=e.prompt_tokens_details.audio_tokens);let s=e.completion_tokens??0,i=e.completion_tokens_details?.reasoning_tokens??0;return t.output.regular=Math.max(0,s-i),i>0&&(t.output.reasoning=i),e.completion_tokens_details?.audio_tokens&&(t.output.audio=e.completion_tokens_details.audio_tokens),e.completion_tokens_details?.accepted_prediction_tokens&&(t.output.predictionAccepted=e.completion_tokens_details.accepted_prediction_tokens),e.completion_tokens_details?.rejected_prediction_tokens&&(t.output.predictionRejected=e.completion_tokens_details.rejected_prediction_tokens),t}function Bt(e,t,n){let r=e.choices[0],s=r?.message,i=s?.content??"",a=(s?.tool_calls??[]).map(o=>({id:o.id,name:o.function.name,arguments:Vn(o.function.arguments)}));return{content:i,toolCalls:a.length>0?a:void 0,usage:Ge(e.usage),finishReason:r?.finish_reason,latencyMs:t,model:e.model,provider:n}}function Vn(e){try{let t=JSON.parse(e);return typeof t=="object"&&t!=null?t:{_raw:e}}catch{return{_raw:e}}}function Gt(e){let t=e.preset??"openai",n=Gn[t],r=e.baseURL??n.baseURL,s=e.provider??n.provider,i=n.apiKeyEnv,a=e.apiKey??(i?globalThis.process?.env?.[i]:void 0);return{provider:s,baseURL:r,apiKey:a}}function Kn(e){let{provider:t,baseURL:n,apiKey:r}=Gt(e),s=e.fetchImpl??fetch,i=t!=="ollama",a=()=>{let o={"content-type":"application/json",...e.headers??{}};if(i){if(!r)throw new Error(`openAICompatAdapter[${t}]: apiKey required for invoke/stream`);o.authorization=`Bearer ${r}`}return o};return{provider:t,model:e.model,async invoke(o,c){let d=he(o,c,e.model,!1,e.bodyExtras),u=k(),l=await s(`${n}/chat/completions`,{method:"POST",headers:a(),body:JSON.stringify(d),signal:c?.signal});if(!l.ok)throw await F(l,t);let p=await l.json(),f=Math.max(0,(k()-u)/1e6);return Bt(p,f,t)},async*stream(o,c){let d=he(o,c,e.model,!0,e.bodyExtras),u=await s(`${n}/chat/completions`,{method:"POST",headers:{...a(),accept:"text/event-stream"},body:JSON.stringify(d),signal:c?.signal});if(!u.ok)throw await F(u,t);if(!u.body)throw new Error(`openAICompatAdapter[${t}]: streaming response has no body`);let l,p;for await(let f of W(u.body,{signal:c?.signal})){if(!f.data||f.data==="[DONE]")continue;let h;try{h=JSON.parse(f.data)}catch{continue}let y=h.choices;if(y){let g=y[0];if(g?.delta?.content&&(yield{type:"token",delta:g.delta.content}),g?.delta?.reasoning_content&&(yield{type:"thinking",delta:g.delta.reasoning_content}),g?.delta?.tool_calls)for(let m of g.delta.tool_calls)yield{type:"tool-call-delta",delta:{id:m.id,name:m.function?.name,argumentsDelta:m.function?.arguments}};g?.finish_reason&&(p=g.finish_reason)}h.usage&&(l=h.usage,yield{type:"usage",usage:Ge(l)})}yield{type:"finish",reason:p??"stop"}}}}function Wn(e){let t=e.sdk;if(!t)throw new Error("sdkBackedOpenAI: sdk instance required");let{provider:n}=Gt(e);return{provider:n,model:e.model,async invoke(r,s){let i=he(r,s,e.model,!1,e.bodyExtras),a=k(),o=await t.chat.completions.create(i,{signal:s?.signal}),c=Math.max(0,(k()-a)/1e6);return Bt(o,c,n)},async*stream(r,s){let i=he(r,s,e.model,!0,e.bodyExtras),a=await t.chat.completions.create(i,{signal:s?.signal}),o,c;for await(let d of a){let u=d.choices;if(u){let p=u[0];if(p?.delta?.content&&(yield{type:"token",delta:p.delta.content}),p?.delta?.reasoning_content&&(yield{type:"thinking",delta:p.delta.reasoning_content}),p?.delta?.tool_calls)for(let f of p.delta.tool_calls)yield{type:"tool-call-delta",delta:{id:f.id,name:f.function?.name,argumentsDelta:f.function?.arguments}};p?.finish_reason&&(c=p.finish_reason)}let l=d.usage;l&&(o=l,yield{type:"usage",usage:Ge(l)})}yield{type:"finish",reason:c??"stop"}}}}function je(e){switch(e.provider){case"anthropic":{let t={apiKey:e.apiKey,model:e.model,baseURL:e.baseURL,headers:e.headers,sdk:e.sdk,fetchImpl:e.fetchImpl,...e.extras};return kt(t)}case"google":{let t={apiKey:e.apiKey,model:e.model,baseURL:e.baseURL,headers:e.headers,sdk:e.sdk,fetchImpl:e.fetchImpl,...e.extras};return Ft(t)}case"dry-run":{let t={model:e.model,...e.extras};return pe(t)}case"fallback":{let t={provider:e.provider,model:e.model,...e.extras};return Pt(t)}case"openai":case"openrouter":case"groq":case"ollama":case"deepseek":case"xai":{let t={preset:e.provider,apiKey:e.apiKey,model:e.model,baseURL:e.baseURL,headers:e.headers,bodyExtras:e.bodyExtras,sdk:e.sdk,fetchImpl:e.fetchImpl,...e.extras};return Ut(t)}default:{let t=e.provider;throw new Error(`createAdapter: unknown provider: ${String(t)}`)}}}Tt();ce();var ye=class extends Error{name="AllTiersExhaustedError";skipped;failed;constructor(t){let n=[];t.failed.size>0&&n.push(`failed=[${[...t.failed.keys()].join(",")}]`),t.skipped.length>0&&n.push(`skipped=[${t.skipped.map(r=>`${r.name}(${r.reason})`).join(",")}]`),super(`All LLM adapter tiers exhausted: ${n.join(" ")}`),this.skipped=t.skipped,this.failed=t.failed}};function be(e,t={}){if(e.length===0)throw new RangeError("cascadingLlmAdapter: tiers must be non-empty");let n=e.map(i=>({name:i.name,adapter:i.adapter,filter:i.filter,breaker:i.breaker?"canExecute"in i.breaker?i.breaker:yt(i.breaker):void 0})),r=t.streamRetryBeforeFirstChunk??!0,s={provider:"cascading",model:void 0,async invoke(i,a){let o=[],c=new Map;for(let u=0;u<n.length;u++){let l=n[u];if(l.filter&&!l.filter(i,a)){o.push({name:l.name,reason:"filter"});continue}if(l.breaker&&!l.breaker.canExecute()){o.push({name:l.name,reason:"breaker"});continue}try{let p=await V(X(l.adapter.invoke(i,a)));return l.breaker?.recordSuccess(),{...p,metadata:{...p.metadata??{},tier:l.name}}}catch(p){c.set(l.name,p),l.breaker?.recordFailure(p);let f=n[u+1];f&&t.onFallback?.(l.name,f.name,p)}}let d={skipped:o,failed:c};throw t.onExhausted?.(d),new ye(d)},async*stream(i,a){let o=[],c=new Map;for(let u=0;u<n.length;u++){let l=n[u];if(l.filter&&!l.filter(i,a)){o.push({name:l.name,reason:"filter"});continue}if(l.breaker&&!l.breaker.canExecute()){o.push({name:l.name,reason:"breaker"});continue}let p=!1;try{for await(let f of l.adapter.stream(i,a))p=!0,yield f;l.breaker?.recordSuccess();return}catch(f){if(c.set(l.name,f),l.breaker?.recordFailure(f),p||!r)throw f;let h=n[u+1];h&&t.onFallback?.(l.name,h.name,f)}}let d={skipped:o,failed:c};throw t.onExhausted?.(d),new ye(d)}};return me(s,`cascade[${n.map(i=>i.name).join(",")}]`),s}function zn(e){let t=[{name:"cloud",adapter:je(e.cloud)}];return e.webllmModel&&t.push({name:"webllm",adapter:J({model:e.webllmModel})}),e.chromeNano!==!1&&t.push({name:"chrome-nano",adapter:q(),filter:(n,r)=>!r?.tools||r.tools.length===0}),be(t,e.cascade)}function $n(e){let t=[{name:"ollama",adapter:je({provider:"ollama",model:e.ollamaModel,baseURL:e.ollamaBaseURL})}];return e.webllmModel&&t.push({name:"webllm",adapter:J({model:e.webllmModel})}),e.chromeNano!==!1&&t.push({name:"chrome-nano",adapter:q(),filter:(n,r)=>!r?.tools||r.tools.length===0}),be(t,e.cascade)}function qn(e){let t=[{name:"webllm",adapter:J({model:e.webllmModel})}];return e.chromeNano!==!1&&t.push({name:"chrome-nano",adapter:q(),filter:(n,r)=>!r?.tools||r.tools.length===0}),be(t,e.cascade)}0&&(module.exports={chromeNanoAdapter,cloudFirstPreset,localFirstPreset,offlinePreset,webllmAdapter});
|
|
17
|
+
// src/patterns/ai/browser.ts
|
|
18
|
+
var browser_exports = {};
|
|
19
|
+
module.exports = __toCommonJS(browser_exports);
|
|
20
|
+
__reExport(browser_exports, require("@graphrefly/pure-ts/patterns/ai/browser"), module.exports);
|
|
21
|
+
//# sourceMappingURL=browser.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/patterns/ai/browser.ts"],"sourcesContent":["// Phase 13.9.A shim — re-export from pure-TS sibling until\n// @graphrefly/native (napi binding) and per-milestone swap-overs land.\nexport * from \"@graphrefly/pure-ts/patterns/ai/browser\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAEA,4BAAc,oDAFd;","names":[]}
|