@graphrefly/ts 0.0.1 → 0.0.3
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 +197 -117
- package/dist/actions-types-CH-XCU9O.d.cts +657 -0
- package/dist/actions-types-w2iPQTkv.d.ts +657 -0
- package/dist/adapters/index.cjs +5157 -2951
- package/dist/adapters/index.cjs.map +1 -1
- package/dist/adapters/index.d.cts +207 -70
- package/dist/adapters/index.d.ts +207 -70
- package/dist/adapters/index.js +3738 -1688
- package/dist/adapters/index.js.map +1 -1
- package/dist/adapters/nestjs/microservices.cjs +841 -0
- package/dist/adapters/nestjs/microservices.cjs.map +1 -0
- package/dist/adapters/nestjs/microservices.d.cts +45 -0
- package/dist/adapters/nestjs/microservices.d.ts +45 -0
- package/dist/adapters/nestjs/microservices.js +206 -0
- package/dist/adapters/nestjs/microservices.js.map +1 -0
- package/dist/adapters/nestjs/native.cjs +1391 -0
- package/dist/adapters/nestjs/native.cjs.map +1 -0
- package/dist/adapters/nestjs/native.d.cts +111 -0
- package/dist/adapters/nestjs/native.d.ts +111 -0
- package/dist/adapters/nestjs/native.js +577 -0
- package/dist/adapters/nestjs/native.js.map +1 -0
- package/dist/adapters/nestjs/websockets.cjs +924 -0
- package/dist/adapters/nestjs/websockets.cjs.map +1 -0
- package/dist/adapters/nestjs/websockets.d.cts +47 -0
- package/dist/adapters/nestjs/websockets.d.ts +47 -0
- package/dist/adapters/nestjs/websockets.js +286 -0
- package/dist/adapters/nestjs/websockets.js.map +1 -0
- package/dist/adapters/nestjs.cjs +1085 -0
- package/dist/adapters/nestjs.cjs.map +1 -0
- package/dist/adapters/nestjs.d.cts +385 -0
- package/dist/adapters/nestjs.d.ts +385 -0
- package/dist/adapters/nestjs.js +112 -0
- package/dist/adapters/nestjs.js.map +1 -0
- package/dist/adapters/observe-storage.d.cts +3 -3
- package/dist/adapters/observe-storage.d.ts +3 -3
- package/dist/adapters/observe-storage.js +4 -4
- package/dist/adapters/react.cjs.map +1 -1
- package/dist/adapters/react.d.cts +2 -2
- package/dist/adapters/react.d.ts +2 -2
- package/dist/adapters/react.js +1 -1
- package/dist/adapters/solid.cjs.map +1 -1
- package/dist/adapters/solid.d.cts +2 -2
- package/dist/adapters/solid.d.ts +2 -2
- package/dist/adapters/solid.js +1 -1
- package/dist/adapters/svelte.cjs.map +1 -1
- package/dist/adapters/svelte.d.cts +2 -2
- package/dist/adapters/svelte.d.ts +2 -2
- package/dist/adapters/svelte.js +1 -1
- package/dist/adapters/vue.cjs.map +1 -1
- package/dist/adapters/vue.d.cts +2 -2
- package/dist/adapters/vue.d.ts +2 -2
- package/dist/adapters/vue.js +1 -1
- package/dist/{agent-runtime-BesGDZcB.d.ts → agent-runtime-types-core-CKwrBDyi.d.ts} +171 -320
- package/dist/{agent-runtime-DZTJ3C-p.d.cts → agent-runtime-types-core-bfl4m0vM.d.cts} +171 -320
- package/dist/agent-runtime-types-tool-BLPV3azj.d.cts +695 -0
- package/dist/agent-runtime-types-tool-hwqvVqNt.d.ts +695 -0
- package/dist/agentic-memory-retention-CLwI76JK.d.ts +14 -0
- package/dist/agentic-memory-retention-Cz8GR6ie.d.cts +14 -0
- package/dist/{agentic-memory-DfuVZ-lY.d.cts → agentic-memory-types-JDr7MPhh.d.cts} +13 -57
- package/dist/{agentic-memory-BmRCvh0d.d.ts → agentic-memory-types-khYJgzKL.d.ts} +13 -57
- package/dist/{capability-admission-B0BzqAm5.d.cts → capability-admission-B8RNFyaZ.d.cts} +3 -3
- package/dist/{capability-admission-g0mn9hpq.d.ts → capability-admission-Dkw1Xz3r.d.ts} +3 -3
- package/dist/chunk-2KUAG2GZ.js +9693 -0
- package/dist/chunk-2KUAG2GZ.js.map +1 -0
- package/dist/{chunk-CZNV3VXM.js → chunk-3J7UPZL5.js} +11 -11
- package/dist/{chunk-HKK2JD7Z.js → chunk-3LYI6ADX.js} +12 -125
- package/dist/chunk-3LYI6ADX.js.map +1 -0
- package/dist/{chunk-YXMZ2N6J.js → chunk-4M37FH2I.js} +1071 -1025
- package/dist/chunk-4M37FH2I.js.map +1 -0
- package/dist/{chunk-YDSIVHRR.js → chunk-4NWSNI4K.js} +1598 -1584
- package/dist/chunk-4NWSNI4K.js.map +1 -0
- package/dist/{chunk-Z2ANQ6JW.js → chunk-4Q77MMJY.js} +2 -2
- package/dist/{chunk-SS2A464I.js → chunk-54WPEODM.js} +3 -3
- package/dist/chunk-54WPEODM.js.map +1 -0
- package/dist/chunk-6E76H4OU.js +132 -0
- package/dist/chunk-6E76H4OU.js.map +1 -0
- package/dist/chunk-7GOTIIQ7.js +819 -0
- package/dist/chunk-7GOTIIQ7.js.map +1 -0
- package/dist/{chunk-V7CIJE4B.js → chunk-DKFWDTVY.js} +92 -9
- package/dist/chunk-DKFWDTVY.js.map +1 -0
- package/dist/{chunk-FBUU43PM.js → chunk-E4QCH32M.js} +448 -446
- package/dist/chunk-E4QCH32M.js.map +1 -0
- package/dist/{chunk-XKXWK2KP.js → chunk-GXU6WFEJ.js} +1157 -1021
- package/dist/chunk-GXU6WFEJ.js.map +1 -0
- package/dist/{chunk-K3FXTC3I.js → chunk-HJACH5PU.js} +3 -3
- package/dist/{chunk-GTPCOEOZ.js → chunk-IDMLXLLG.js} +3 -3
- package/dist/{chunk-DKP56CSW.js → chunk-JKAYLDQV.js} +2 -2
- package/dist/{chunk-4VLAQHZI.js → chunk-K7FB3JTD.js} +17 -1
- package/dist/chunk-K7FB3JTD.js.map +1 -0
- package/dist/{chunk-43BKLFZU.js → chunk-KFURM6FM.js} +10 -10
- package/dist/{chunk-H75VXTGT.js → chunk-L6LDXRWE.js} +3 -3
- package/dist/{chunk-H75VXTGT.js.map → chunk-L6LDXRWE.js.map} +1 -1
- package/dist/chunk-MCOFHMUU.js +4131 -0
- package/dist/chunk-MCOFHMUU.js.map +1 -0
- package/dist/chunk-MQEQMS7B.js +1009 -0
- package/dist/chunk-MQEQMS7B.js.map +1 -0
- package/dist/chunk-MTELVIYR.js +1421 -0
- package/dist/chunk-MTELVIYR.js.map +1 -0
- package/dist/{chunk-3JR3EDB2.js → chunk-NNDIFUKX.js} +121 -115
- package/dist/chunk-NNDIFUKX.js.map +1 -0
- package/dist/{chunk-2747WN4Y.js → chunk-PUSRRALM.js} +3 -3
- package/dist/{chunk-QFY4AFY4.js → chunk-PVC7WDKI.js} +58 -52
- package/dist/chunk-PVC7WDKI.js.map +1 -0
- package/dist/{chunk-VTHLCFN4.js → chunk-RAHNUYA5.js} +2 -2
- package/dist/chunk-TQPCAIQI.js +612 -0
- package/dist/chunk-TQPCAIQI.js.map +1 -0
- package/dist/{chunk-IXZBUWSP.js → chunk-UEMN5URK.js} +2 -2
- package/dist/chunk-WOS7RJYZ.js +1320 -0
- package/dist/chunk-WOS7RJYZ.js.map +1 -0
- package/dist/{chunk-6PHB5CJS.js → chunk-ZLFRB6FI.js} +2 -2
- package/dist/composition/index.cjs +1228 -1076
- package/dist/composition/index.cjs.map +1 -1
- package/dist/composition/index.d.cts +3 -3
- package/dist/composition/index.d.ts +3 -3
- package/dist/composition/index.js +4 -4
- package/dist/core/index.cjs +1198 -1046
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +23 -2
- package/dist/core/index.d.ts +23 -2
- package/dist/core/index.js +2 -2
- package/dist/cqrs/index.d.cts +3 -3
- package/dist/cqrs/index.d.ts +3 -3
- package/dist/cqrs/messaging.d.cts +4 -4
- package/dist/cqrs/messaging.d.ts +4 -4
- package/dist/cqrs/work-queue.d.cts +5 -5
- package/dist/cqrs/work-queue.d.ts +5 -5
- package/dist/data-structures/index.cjs +1226 -1074
- package/dist/data-structures/index.cjs.map +1 -1
- package/dist/data-structures/index.d.cts +8 -7
- package/dist/data-structures/index.d.ts +8 -7
- package/dist/data-structures/index.js +6 -5
- package/dist/{describe-DYMw_l1C.d.cts → describe-BumQ-3_0.d.cts} +1 -1
- package/dist/{describe-BpyJuWkw.d.ts → describe-cYr_Z5zm.d.ts} +1 -1
- package/dist/executors/tool-provider-adapters.cjs +3091 -0
- package/dist/executors/tool-provider-adapters.cjs.map +1 -0
- package/dist/executors/tool-provider-adapters.d.cts +174 -0
- package/dist/executors/tool-provider-adapters.d.ts +174 -0
- package/dist/executors/tool-provider-adapters.js +1336 -0
- package/dist/executors/tool-provider-adapters.js.map +1 -0
- package/dist/executors/tool-provider-runtime.cjs +5178 -0
- package/dist/executors/tool-provider-runtime.cjs.map +1 -0
- package/dist/executors/tool-provider-runtime.d.cts +17 -0
- package/dist/executors/tool-provider-runtime.d.ts +17 -0
- package/dist/executors/tool-provider-runtime.js +15 -0
- package/dist/executors/tool-provider-runtime.js.map +1 -0
- package/dist/executors/tool-provider.cjs +6392 -0
- package/dist/executors/tool-provider.cjs.map +1 -0
- package/dist/executors/tool-provider.d.cts +60 -0
- package/dist/executors/tool-provider.d.ts +60 -0
- package/dist/executors/tool-provider.js +89 -0
- package/dist/executors/tool-provider.js.map +1 -0
- package/dist/executors/work-queue.d.cts +6 -6
- package/dist/executors/work-queue.d.ts +6 -6
- package/dist/graph/index.cjs +1499 -1341
- package/dist/graph/index.cjs.map +1 -1
- package/dist/graph/index.d.cts +9 -8
- package/dist/graph/index.d.ts +9 -8
- package/dist/graph/index.js +23 -22
- package/dist/{graph-DCEWh4T2.d.cts → graph-C1C-wb0L.d.cts} +266 -137
- package/dist/{graph-D-1-SQeC.d.ts → graph-CS0b4V9B.d.ts} +266 -137
- package/dist/{index-72VZC0-E.d.cts → index-DLrNopda.d.cts} +151 -10
- package/dist/{index-Bmxeu0nK.d.ts → index-DzJni3_6.d.ts} +151 -10
- package/dist/index.cjs +3397 -3140
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -9
- package/dist/index.d.ts +12 -9
- package/dist/index.js +110 -109
- package/dist/inspection/boundary.d.cts +4 -4
- package/dist/inspection/boundary.d.ts +4 -4
- package/dist/measurements-BWAnochv.d.ts +294 -0
- package/dist/measurements-B_gJfD8h.d.cts +294 -0
- package/dist/messaging/index.cjs +57 -51
- package/dist/messaging/index.cjs.map +1 -1
- package/dist/messaging/index.d.cts +11 -276
- package/dist/messaging/index.d.ts +11 -276
- package/dist/messaging/index.js +1 -1
- package/dist/operators/index.cjs +1228 -1076
- package/dist/operators/index.cjs.map +1 -1
- package/dist/operators/index.d.cts +5 -5
- package/dist/operators/index.d.ts +5 -5
- package/dist/operators/index.js +5 -5
- package/dist/orchestration/index.cjs +8844 -6071
- package/dist/orchestration/index.cjs.map +1 -1
- package/dist/orchestration/index.d.cts +171 -224
- package/dist/orchestration/index.d.ts +171 -224
- package/dist/orchestration/index.js +42 -991
- package/dist/orchestration/index.js.map +1 -1
- package/dist/orchestration/messaging.d.cts +5 -8
- package/dist/orchestration/messaging.d.ts +5 -8
- package/dist/orchestration/work-queue.cjs +1243 -5
- package/dist/orchestration/work-queue.cjs.map +1 -1
- package/dist/orchestration/work-queue.d.cts +121 -10
- package/dist/orchestration/work-queue.d.ts +121 -10
- package/dist/orchestration/work-queue.js +1067 -4
- package/dist/orchestration/work-queue.js.map +1 -1
- package/dist/patterns/event-flow.cjs +6 -20
- package/dist/patterns/event-flow.cjs.map +1 -1
- package/dist/patterns/event-flow.d.cts +4 -4
- package/dist/patterns/event-flow.d.ts +4 -4
- package/dist/patterns/event-flow.js +2 -2
- package/dist/patterns/index.cjs +453 -465
- package/dist/patterns/index.cjs.map +1 -1
- package/dist/patterns/index.d.cts +6 -5
- package/dist/patterns/index.d.ts +6 -5
- package/dist/patterns/index.js +3 -3
- package/dist/process-types-BB7oRhX3.d.cts +200 -0
- package/dist/process-types-QNhyoYJ8.d.ts +200 -0
- package/dist/{reactive-collection-DNV0-gFi.d.cts → reactive-collection-BYlWvtnp.d.cts} +4 -34
- package/dist/{reactive-collection-BAmfrGjd.d.ts → reactive-collection-efOEdGFN.d.ts} +4 -34
- package/dist/{reactive-collection-storage-BNEldDyi.d.cts → reactive-collection-storage-BjoLsoiC.d.cts} +5 -5
- package/dist/{reactive-collection-storage-YZsAQsWK.d.ts → reactive-collection-storage-DwW6UuK_.d.ts} +5 -5
- package/dist/{reactive-map-DRD1LJ2H.d.cts → reactive-map-BHacbIqz.d.cts} +7 -2
- package/dist/{reactive-map-EsDiCmJk.d.ts → reactive-map-DN4Jyqnf.d.ts} +7 -2
- package/dist/render/index.d.cts +2 -2
- package/dist/render/index.d.ts +2 -2
- package/dist/scheduled-readiness-BmqXxnzX.d.ts +91 -0
- package/dist/scheduled-readiness-CYSw7KDE.d.cts +91 -0
- package/dist/semantic-memory-graph-B_LwbM-E.d.cts +30 -0
- package/dist/semantic-memory-graph-rsFNNhwn.d.ts +30 -0
- package/dist/{semantic-memory-graph-DKuNzuWw.d.cts → semantic-memory-graph-types-Y73bbwVI.d.cts} +2 -28
- package/dist/{semantic-memory-graph-uwbwJdhe.d.ts → semantic-memory-graph-types-safmPkuX.d.ts} +2 -28
- package/dist/solutions/index.cjs +6353 -6169
- package/dist/solutions/index.cjs.map +1 -1
- package/dist/solutions/index.d.cts +12 -10
- package/dist/solutions/index.d.ts +12 -10
- package/dist/solutions/index.js +5 -5
- package/dist/solutions/reactive-layout/browser/index.cjs +116 -108
- package/dist/solutions/reactive-layout/browser/index.cjs.map +1 -1
- package/dist/solutions/reactive-layout/browser/index.d.cts +4 -4
- package/dist/solutions/reactive-layout/browser/index.d.ts +4 -4
- package/dist/solutions/reactive-layout/browser/index.js +3 -3
- package/dist/solutions/reactive-layout/index.cjs +3578 -3350
- package/dist/solutions/reactive-layout/index.cjs.map +1 -1
- package/dist/solutions/reactive-layout/index.d.cts +32 -576
- package/dist/solutions/reactive-layout/index.d.ts +32 -576
- package/dist/solutions/reactive-layout/index.js +65 -5
- package/dist/solutions/reactive-layout/node-canvas/index.cjs +127 -117
- package/dist/solutions/reactive-layout/node-canvas/index.cjs.map +1 -1
- package/dist/solutions/reactive-layout/node-canvas/index.d.cts +4 -4
- package/dist/solutions/reactive-layout/node-canvas/index.d.ts +4 -4
- package/dist/solutions/reactive-layout/node-canvas/index.js +3 -3
- package/dist/solutions/reactive-layout/react-native/index.cjs +127 -117
- package/dist/solutions/reactive-layout/react-native/index.cjs.map +1 -1
- package/dist/solutions/reactive-layout/react-native/index.d.cts +4 -4
- package/dist/solutions/reactive-layout/react-native/index.d.ts +4 -4
- package/dist/solutions/reactive-layout/react-native/index.js +3 -3
- package/dist/solutions/reactive-layout/skia/index.cjs +127 -117
- package/dist/solutions/reactive-layout/skia/index.cjs.map +1 -1
- package/dist/solutions/reactive-layout/skia/index.d.cts +4 -4
- package/dist/solutions/reactive-layout/skia/index.d.ts +4 -4
- package/dist/solutions/reactive-layout/skia/index.js +3 -3
- package/dist/solutions/work-item/actions.cjs +1609 -1428
- package/dist/solutions/work-item/actions.cjs.map +1 -1
- package/dist/solutions/work-item/actions.d.cts +23 -184
- package/dist/solutions/work-item/actions.d.ts +23 -184
- package/dist/solutions/work-item/actions.js +1558 -934
- package/dist/solutions/work-item/actions.js.map +1 -1
- package/dist/solutions/work-item/scheduling.cjs +9181 -1838
- package/dist/solutions/work-item/scheduling.cjs.map +1 -1
- package/dist/solutions/work-item/scheduling.d.cts +1763 -328
- package/dist/solutions/work-item/scheduling.d.ts +1763 -328
- package/dist/solutions/work-item/scheduling.js +117 -3
- package/dist/solutions/work-item/work-queue.d.cts +7 -7
- package/dist/solutions/work-item/work-queue.d.ts +7 -7
- package/dist/sources/browser.cjs +1318 -1083
- package/dist/sources/browser.cjs.map +1 -1
- package/dist/sources/browser.d.cts +22 -6
- package/dist/sources/browser.d.ts +22 -6
- package/dist/sources/browser.js +4 -4
- package/dist/sources/browser.js.map +1 -1
- package/dist/sources/index.cjs +1318 -1083
- package/dist/sources/index.cjs.map +1 -1
- package/dist/sources/index.d.cts +4 -4
- package/dist/sources/index.d.ts +4 -4
- package/dist/sources/index.js +4 -4
- package/dist/sources/node.d.cts +3 -3
- package/dist/sources/node.d.ts +3 -3
- package/dist/storage/browser.cjs +16 -0
- package/dist/storage/browser.cjs.map +1 -1
- package/dist/storage/browser.js +3 -3
- package/dist/storage/index.cjs +16 -0
- package/dist/storage/index.cjs.map +1 -1
- package/dist/storage/index.d.cts +5 -4
- package/dist/storage/index.d.ts +5 -4
- package/dist/storage/index.js +6 -6
- package/dist/storage/node.cjs +16 -0
- package/dist/storage/node.cjs.map +1 -1
- package/dist/storage/node.js +3 -3
- package/dist/{store-C-joM4gh.d.ts → store-6_CHF6Ge.d.ts} +1 -1
- package/dist/{store-CNJwmT-h.d.cts → store-BljX8RkQ.d.cts} +1 -1
- package/dist/types-BAw2QVVE.d.cts +274 -0
- package/dist/types-BUbbbh4f.d.cts +34 -0
- package/dist/types-CMnzoL54.d.cts +457 -0
- package/dist/{types-CcPIn7sy.d.cts → types-CTN3XoMl.d.cts} +57 -108
- package/dist/types-CV_ohy5T.d.cts +357 -0
- package/dist/{types-BsJvElYZ.d.ts → types-DChxk1vK.d.ts} +57 -108
- package/dist/types-DRu7SnLV.d.ts +274 -0
- package/dist/types-DeID_FRl.d.ts +34 -0
- package/dist/types-IhKH0hGW.d.ts +357 -0
- package/dist/types-ePlD2uyT.d.ts +457 -0
- package/dist/{work-item-runtime-qaVgsL0T.d.cts → work-item-runtime-types-BTxLskN5.d.cts} +3 -93
- package/dist/{work-item-runtime-C3M79vE9.d.ts → work-item-runtime-types-DAsZbb2y.d.ts} +3 -93
- package/dist/work-queue/index.cjs +957 -953
- package/dist/work-queue/index.cjs.map +1 -1
- package/dist/work-queue/index.d.cts +9 -357
- package/dist/work-queue/index.d.ts +9 -357
- package/dist/work-queue/index.js +957 -953
- package/dist/work-queue/index.js.map +1 -1
- package/package.json +611 -513
- package/dist/chunk-3JR3EDB2.js.map +0 -1
- package/dist/chunk-4VLAQHZI.js.map +0 -1
- package/dist/chunk-6XAIOL3X.js +0 -2407
- package/dist/chunk-6XAIOL3X.js.map +0 -1
- package/dist/chunk-FBUU43PM.js.map +0 -1
- package/dist/chunk-HKK2JD7Z.js.map +0 -1
- package/dist/chunk-PC3BTTBE.js +0 -3217
- package/dist/chunk-PC3BTTBE.js.map +0 -1
- package/dist/chunk-QFY4AFY4.js.map +0 -1
- package/dist/chunk-SS2A464I.js.map +0 -1
- package/dist/chunk-V7CIJE4B.js.map +0 -1
- package/dist/chunk-XKXWK2KP.js.map +0 -1
- package/dist/chunk-YDSIVHRR.js.map +0 -1
- package/dist/chunk-YXMZ2N6J.js.map +0 -1
- /package/dist/{chunk-CZNV3VXM.js.map → chunk-3J7UPZL5.js.map} +0 -0
- /package/dist/{chunk-Z2ANQ6JW.js.map → chunk-4Q77MMJY.js.map} +0 -0
- /package/dist/{chunk-K3FXTC3I.js.map → chunk-HJACH5PU.js.map} +0 -0
- /package/dist/{chunk-GTPCOEOZ.js.map → chunk-IDMLXLLG.js.map} +0 -0
- /package/dist/{chunk-DKP56CSW.js.map → chunk-JKAYLDQV.js.map} +0 -0
- /package/dist/{chunk-43BKLFZU.js.map → chunk-KFURM6FM.js.map} +0 -0
- /package/dist/{chunk-2747WN4Y.js.map → chunk-PUSRRALM.js.map} +0 -0
- /package/dist/{chunk-VTHLCFN4.js.map → chunk-RAHNUYA5.js.map} +0 -0
- /package/dist/{chunk-IXZBUWSP.js.map → chunk-UEMN5URK.js.map} +0 -0
- /package/dist/{chunk-6PHB5CJS.js.map → chunk-ZLFRB6FI.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/graph/blueprint.ts","../src/graph/describe.ts","../src/graph/graph.ts"],"sourcesContent":["/**\n * GraphBlueprint first slice (D173/D177).\n *\n * A blueprint is read-only audit/collaboration evidence over graph.topology(). It is not an\n * authoring spec, checkpoint, restore input, hash owner, or collaboration ownership artifact.\n */\n\nimport {\n\tassertStrictJsonObject,\n\ttype StrictJsonObject,\n\ttype StrictJsonValue,\n\tstableJsonString,\n\tstrictCanonicalJsonBytes,\n} from \"../json/codec.js\";\nimport type { GraphTopologyEdge, GraphTopologySnapshot } from \"./describe.js\";\n\nexport const GRAPH_BLUEPRINT_VERSION = \"graphrefly.blueprint.v1\" as const;\n\nexport type GraphBlueprintJson = StrictJsonValue;\n\nexport type GraphBlueprintProvenance = StrictJsonObject;\n\nexport interface NormalizedGraphTopologyNode {\n\treadonly id: string;\n\treadonly name?: string;\n\treadonly factory: string;\n\treadonly deps: readonly string[];\n\treadonly meta?: Readonly<Record<string, GraphBlueprintJson>>;\n}\n\nexport interface NormalizedGraphTopologySnapshot {\n\treadonly name?: string;\n\treadonly nodes: readonly NormalizedGraphTopologyNode[];\n\treadonly edges: readonly GraphTopologyEdge[];\n\treadonly subgraphs?: readonly NormalizedGraphTopologySnapshot[];\n}\n\nexport type GraphBlueprintDiagnosticCode = \"dangling-dep\" | \"duplicate-node-id\" | \"island-node\";\n\nexport interface GraphBlueprintDiagnosticIssue {\n\treadonly severity: \"warning\" | \"error\";\n\treadonly code: GraphBlueprintDiagnosticCode;\n\treadonly message: string;\n\treadonly nodeId?: string;\n\treadonly from?: string;\n\treadonly to?: string;\n}\n\nexport interface GraphBlueprintDiagnostics {\n\treadonly ok: boolean;\n\treadonly issues: readonly GraphBlueprintDiagnosticIssue[];\n}\n\nexport type GraphBlueprintHashInput = \"strictCanonicalTopologyBytes\";\n\nexport interface GraphBlueprintHash {\n\treadonly kind: \"topology\";\n\treadonly algorithm: string;\n\treadonly input: GraphBlueprintHashInput;\n\treadonly value: string;\n}\n\nexport interface GraphBlueprintHashOptions {\n\treadonly algorithm: string;\n\treadonly hash: (bytes: Uint8Array) => string | Promise<string>;\n}\n\nexport interface GraphBlueprint {\n\treadonly version: typeof GRAPH_BLUEPRINT_VERSION;\n\treadonly topology: NormalizedGraphTopologySnapshot;\n\treadonly diagnostics?: GraphBlueprintDiagnostics;\n\treadonly provenance?: GraphBlueprintProvenance;\n\treadonly hash?: GraphBlueprintHash;\n}\n\nexport interface GraphBlueprintOptions {\n\t/** Include graph-local structural diagnostics over the normalized topology. */\n\treadonly diagnostics?: boolean;\n\t/** Caller-supplied provenance only; environment enrichment stays outside Graph core (D177). */\n\treadonly provenance?: GraphBlueprintProvenance;\n}\n\nexport function normalizeTopologyMeta(\n\tmeta: Record<string, unknown>,\n\tlabel = \"meta\",\n\tkind = \"graph meta\",\n): Readonly<Record<string, GraphBlueprintJson>> {\n\ttry {\n\t\treturn assertStrictJsonObject(meta, label);\n\t} catch (error) {\n\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\tthrow new TypeError(`${label}: ${kind} must be strict JSON-compatible data (D177): ${message}`);\n\t}\n}\n\nexport function normalizeTopology(\n\tsnapshot: GraphTopologySnapshot | NormalizedGraphTopologySnapshot,\n): NormalizedGraphTopologySnapshot {\n\treturn normalizeTopologySnapshot(snapshot as GraphTopologySnapshot, new WeakSet<object>(), \"$\");\n}\n\nfunction normalizeTopologySnapshot(\n\tsnapshot: GraphTopologySnapshot,\n\tseen: WeakSet<object>,\n\tpath: string,\n): NormalizedGraphTopologySnapshot {\n\tif (snapshot === null || typeof snapshot !== \"object\") {\n\t\tthrow new TypeError(`normalizeTopology: snapshot at ${path} must be an object`);\n\t}\n\tif (seen.has(snapshot)) {\n\t\tthrow new TypeError(`normalizeTopology: circular subgraph reference at ${path}`);\n\t}\n\tseen.add(snapshot);\n\ttry {\n\t\tconst nodes = mapDense(snapshot.nodes, `${path}.nodes`, (node, index) => {\n\t\t\tconst nodePath = `${path}.nodes[${index}]`;\n\t\t\tassertTopologyObject(node, nodePath);\n\t\t\tconst id = topologyString(node.id, `${nodePath}.id`);\n\t\t\tconst factory = topologyString(node.factory, `${nodePath}.factory`);\n\t\t\tconst out: NormalizedGraphTopologyNode = {\n\t\t\t\tid,\n\t\t\t\tfactory,\n\t\t\t\tdeps: mapDense(node.deps, `${labelForNode(id)}.deps`, (dep, depIndex) =>\n\t\t\t\t\ttopologyString(dep, `${labelForNode(id)}.deps[${depIndex}]`),\n\t\t\t\t),\n\t\t\t};\n\t\t\tif (node.name !== undefined) {\n\t\t\t\t(out as { name?: string }).name = topologyString(node.name, `${nodePath}.name`);\n\t\t\t}\n\t\t\tif (node.meta !== undefined) {\n\t\t\t\t(out as { meta?: Readonly<Record<string, GraphBlueprintJson>> }).meta =\n\t\t\t\t\tnormalizeTopologyMeta(node.meta, `${labelForNode(id)}.meta`);\n\t\t\t}\n\t\t\treturn out;\n\t\t}).sort(compareNodes);\n\t\tconst out: NormalizedGraphTopologySnapshot = {\n\t\t\tnodes,\n\t\t\tedges: deriveEdges(nodes),\n\t\t};\n\t\tif (snapshot.name !== undefined) {\n\t\t\t(out as { name?: string }).name = topologyString(snapshot.name, `${path}.name`);\n\t\t}\n\t\tif (snapshot.subgraphs !== undefined) {\n\t\t\t(out as { subgraphs?: readonly NormalizedGraphTopologySnapshot[] }).subgraphs = mapDense(\n\t\t\t\tsnapshot.subgraphs,\n\t\t\t\t`${path}.subgraphs`,\n\t\t\t\t(subgraph, index) =>\n\t\t\t\t\tnormalizeTopologySnapshot(subgraph, seen, `${path}.subgraphs[${index}]`),\n\t\t\t).sort(compareTopologies);\n\t\t}\n\t\treturn out;\n\t} finally {\n\t\tseen.delete(snapshot);\n\t}\n}\n\nfunction mapDense<T, U>(\n\tvalues: readonly T[],\n\tpath: string,\n\tmapper: (value: T, index: number) => U,\n): U[] {\n\tif (!Array.isArray(values)) {\n\t\tthrow new TypeError(`normalizeTopology: ${path} must be an array`);\n\t}\n\tconst out: U[] = [];\n\tfor (let i = 0; i < values.length; i += 1) {\n\t\tif (!(i in values)) {\n\t\t\tthrow new TypeError(`normalizeTopology: sparse array hole at ${path}[${i}]`);\n\t\t}\n\t\tout.push(mapper(values[i] as T, i));\n\t}\n\treturn out;\n}\n\nfunction assertTopologyObject(\n\tvalue: unknown,\n\tpath: string,\n): asserts value is Record<string, unknown> {\n\tif (value === null || typeof value !== \"object\" || Array.isArray(value)) {\n\t\tthrow new TypeError(`normalizeTopology: ${path} must be an object`);\n\t}\n}\n\nfunction topologyString(value: unknown, path: string): string {\n\tif (typeof value !== \"string\") {\n\t\tthrow new TypeError(`normalizeTopology: ${path} must be a string`);\n\t}\n\treturn value;\n}\n\nexport function canonicalTopologyJson(\n\tsnapshot: GraphTopologySnapshot | NormalizedGraphTopologySnapshot,\n): string {\n\treturn stableJsonString(normalizeTopology(snapshot as GraphTopologySnapshot));\n}\n\nexport function canonicalTopologyBytes(\n\tsnapshot: GraphTopologySnapshot | NormalizedGraphTopologySnapshot,\n): Uint8Array {\n\treturn strictCanonicalJsonBytes(normalizeTopology(snapshot as GraphTopologySnapshot));\n}\n\nexport function withBlueprintHash(\n\tblueprint: GraphBlueprint,\n\toptions: GraphBlueprintHashOptions,\n): GraphBlueprint | Promise<GraphBlueprint> {\n\tif (typeof options.algorithm !== \"string\" || options.algorithm.length === 0) {\n\t\tthrow new TypeError(\"withBlueprintHash: algorithm must be a non-empty string\");\n\t}\n\tconst topology = normalizeTopology(blueprint.topology);\n\tconst withHash = (value: string): GraphBlueprint => {\n\t\tif (typeof value !== \"string\" || value.length === 0) {\n\t\t\tthrow new TypeError(\"withBlueprintHash: hash value must be a non-empty string\");\n\t\t}\n\t\treturn {\n\t\t\t...blueprint,\n\t\t\ttopology,\n\t\t\thash: {\n\t\t\t\tkind: \"topology\",\n\t\t\t\talgorithm: options.algorithm,\n\t\t\t\tinput: \"strictCanonicalTopologyBytes\",\n\t\t\t\tvalue,\n\t\t\t},\n\t\t};\n\t};\n\tconst value = options.hash(canonicalTopologyBytes(topology));\n\tif (typeof value !== \"string\" || value.length === 0) {\n\t\tconst maybeThenable = value as { then?: unknown } | null | undefined;\n\t\tif (\n\t\t\tmaybeThenable === null ||\n\t\t\tmaybeThenable === undefined ||\n\t\t\ttypeof maybeThenable.then !== \"function\"\n\t\t) {\n\t\t\tthrow new TypeError(\"withBlueprintHash: hash value must be a non-empty string\");\n\t\t}\n\t\treturn (value as Promise<string>).then(withHash);\n\t}\n\treturn withHash(value);\n}\n\nexport function withBlueprintProvenance(\n\tblueprint: GraphBlueprint,\n\tprovenance: GraphBlueprintProvenance,\n): GraphBlueprint {\n\treturn {\n\t\t...blueprint,\n\t\tprovenance: normalizeTopologyMeta(provenance, \"graph blueprint provenance\", \"provenance\"),\n\t};\n}\n\nexport function graphBlueprintDiagnostics(\n\ttopology: NormalizedGraphTopologySnapshot,\n): GraphBlueprintDiagnostics {\n\tconst issues: GraphBlueprintDiagnosticIssue[] = [];\n\tcollectDiagnostics(topology, issues);\n\tissues.sort(compareIssues);\n\treturn { ok: !issues.some((issue) => issue.severity === \"error\"), issues };\n}\n\nfunction collectDiagnostics(\n\ttopology: NormalizedGraphTopologySnapshot,\n\tissues: GraphBlueprintDiagnosticIssue[],\n): void {\n\tconst seen = new Set<string>();\n\tconst duplicateIds = new Set<string>();\n\tfor (const node of topology.nodes) {\n\t\tif (seen.has(node.id)) duplicateIds.add(node.id);\n\t\tseen.add(node.id);\n\t}\n\tfor (const id of duplicateIds) {\n\t\tissues.push({\n\t\t\tseverity: \"error\",\n\t\t\tcode: \"duplicate-node-id\",\n\t\t\tnodeId: id,\n\t\t\tmessage: `duplicate topology node id '${id}'`,\n\t\t});\n\t}\n\n\tconst dependents = new Map<string, number>();\n\tfor (const node of topology.nodes) dependents.set(node.id, 0);\n\tfor (const node of topology.nodes) {\n\t\tfor (const dep of node.deps) {\n\t\t\tif (!seen.has(dep)) {\n\t\t\t\tissues.push({\n\t\t\t\t\tseverity: \"error\",\n\t\t\t\t\tcode: \"dangling-dep\",\n\t\t\t\t\tnodeId: node.id,\n\t\t\t\t\tfrom: dep,\n\t\t\t\t\tto: node.id,\n\t\t\t\t\tmessage: `node '${node.id}' depends on missing node '${dep}'`,\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdependents.set(dep, (dependents.get(dep) ?? 0) + 1);\n\t\t}\n\t}\n\tfor (const node of topology.nodes) {\n\t\tif (node.deps.length === 0 && (dependents.get(node.id) ?? 0) === 0) {\n\t\t\tissues.push({\n\t\t\t\tseverity: \"warning\",\n\t\t\t\tcode: \"island-node\",\n\t\t\t\tnodeId: node.id,\n\t\t\t\tmessage: `node '${node.id}' has no deps and no dependents`,\n\t\t\t});\n\t\t}\n\t}\n\n\tfor (const subgraph of topology.subgraphs ?? []) collectDiagnostics(subgraph, issues);\n}\n\nfunction deriveEdges(nodes: readonly NormalizedGraphTopologyNode[]): GraphTopologyEdge[] {\n\tconst seen = new Set<string>();\n\tconst edges: GraphTopologyEdge[] = [];\n\tfor (const node of nodes) {\n\t\tfor (const from of node.deps) {\n\t\t\tconst key = `${from}\\0${node.id}`;\n\t\t\tif (seen.has(key)) continue;\n\t\t\tseen.add(key);\n\t\t\tedges.push({ from, to: node.id });\n\t\t}\n\t}\n\treturn edges.sort(compareEdges);\n}\n\nfunction labelForNode(id: string): string {\n\treturn id === \"\" ? \"node\" : `node '${id}'`;\n}\n\nfunction compareText(a: string, b: string): number {\n\treturn a < b ? -1 : a > b ? 1 : 0;\n}\n\nfunction compareNodes(a: NormalizedGraphTopologyNode, b: NormalizedGraphTopologyNode): number {\n\treturn compareText(a.id, b.id);\n}\n\nfunction compareEdges(a: GraphTopologyEdge, b: GraphTopologyEdge): number {\n\treturn compareText(a.from, b.from) || compareText(a.to, b.to);\n}\n\nfunction compareTopologies(\n\ta: NormalizedGraphTopologySnapshot,\n\tb: NormalizedGraphTopologySnapshot,\n): number {\n\treturn compareText(stableJsonString(a), stableJsonString(b));\n}\n\nfunction compareIssues(a: GraphBlueprintDiagnosticIssue, b: GraphBlueprintDiagnosticIssue): number {\n\treturn (\n\t\tcompareText(a.code, b.code) ||\n\t\tcompareText(a.nodeId ?? \"\", b.nodeId ?? \"\") ||\n\t\tcompareText(a.from ?? \"\", b.from ?? \"\") ||\n\t\tcompareText(a.to ?? \"\", b.to ?? \"\")\n\t);\n}\n","/**\n * topology()/describe() snapshot shapes (R-describe / D39 / D51 / D173).\n *\n * topology() is the current pure-structure snapshot direction (D173). describe()\n * remains the richer developer inspection snapshot over the same live topology\n * truth source, adding runtime status/value/version fields.\n */\n\nimport type { Status } from \"../node/node.js\";\nimport type { NodeVersion } from \"../node/versioning.js\";\n\nexport interface GraphTopologyNode {\n\t/** Stable mount-aware `::` path (auto-numbered when unnamed). Edge key. */\n\tid: string;\n\t/** Optional debug name. */\n\tname?: string;\n\t/** Operator/verb real name (D6/L1.5 — \"map\"/\"state\", not \"derived\"). */\n\tfactory: string;\n\t/** Dep ids (R-edges-derived: edges are a pure fn of live deps). */\n\tdeps: string[];\n\t/** Static annotations attached via g.* opts (R-meta-presentation). */\n\tmeta?: Record<string, unknown>;\n}\n\nexport interface GraphTopologyEdge {\n\tfrom: string;\n\tto: string;\n}\n\nexport interface GraphTopologySnapshot {\n\tname?: string;\n\tnodes: GraphTopologyNode[];\n\tedges: GraphTopologyEdge[];\n\tsubgraphs?: GraphTopologySnapshot[];\n}\n\nexport interface DescribeNode extends GraphTopologyNode {\n\t/** R-status-enum (7). */\n\tstatus: Status;\n\t/** Cache snapshot at call time; field ABSENT = SENTINEL / never-emitted. */\n\tvalue?: unknown;\n\t/** D109 node runtime version metadata; absent when versioning:false. */\n\tversion?: NodeVersion;\n}\n\nexport interface DescribeEdge extends GraphTopologyEdge {}\n\nexport interface DescribeSnapshot extends GraphTopologySnapshot {\n\tname?: string;\n\tnodes: DescribeNode[];\n\tedges: DescribeEdge[];\n\tsubgraphs?: DescribeSnapshot[];\n}\n\nexport interface DescribeOpts {\n\t/** Causal-chain mode: filter to nodes on a path from→to (R-describe). */\n\texplain?: { from: string; to: string };\n}\n\n/** Project a rich describe snapshot into the D173 pure-structure topology shape. */\nexport function topologyFromDescribe(snapshot: DescribeSnapshot): GraphTopologySnapshot {\n\tconst nodes = snapshot.nodes.map((node) => {\n\t\tconst topologyNode: GraphTopologyNode = {\n\t\t\tid: node.id,\n\t\t\tfactory: node.factory,\n\t\t\tdeps: [...node.deps],\n\t\t};\n\t\tif (node.name !== undefined) topologyNode.name = node.name;\n\t\tif (node.meta !== undefined) topologyNode.meta = cloneTopologyMeta(node.meta);\n\t\treturn topologyNode;\n\t});\n\tconst out: GraphTopologySnapshot = {\n\t\tnodes,\n\t\tedges: snapshot.edges.map((edge) => ({ from: edge.from, to: edge.to })),\n\t};\n\tif (snapshot.name !== undefined) out.name = snapshot.name;\n\tif (snapshot.subgraphs !== undefined)\n\t\tout.subgraphs = snapshot.subgraphs.map(topologyFromDescribe);\n\treturn out;\n}\n\nfunction cloneTopologyMeta(meta: Record<string, unknown>): Record<string, unknown> {\n\treturn cloneTopologyValue(meta, new WeakMap()) as Record<string, unknown>;\n}\n\nfunction cloneTopologyValue(value: unknown, seen: WeakMap<object, unknown>): unknown {\n\tif (value === null) return null;\n\tconst kind = typeof value;\n\tif (kind === \"string\" || kind === \"boolean\") return value;\n\tif (kind === \"number\") {\n\t\tif (!Number.isFinite(value)) {\n\t\t\tthrow new Error(\"topology(): meta must be finite JSON-compatible data (D39/D173)\");\n\t\t}\n\t\treturn value;\n\t}\n\tif (kind !== \"object\") {\n\t\tthrow new Error(\"topology(): meta must be JSON-compatible data (D39/D173)\");\n\t}\n\tconst objectValue = value as object;\n\tconst cached = seen.get(objectValue);\n\tif (cached !== undefined) return cached;\n\tif (Array.isArray(value)) {\n\t\tconst out = new Array<unknown>(value.length);\n\t\tseen.set(objectValue, out);\n\t\tfor (let i = 0; i < value.length; i += 1) {\n\t\t\tif (!(i in value)) {\n\t\t\t\tthrow new Error(\"topology(): meta arrays must be dense JSON-compatible data (D39/D173)\");\n\t\t\t}\n\t\t\tout[i] = cloneTopologyValue(value[i], seen);\n\t\t}\n\t\treturn out;\n\t}\n\tconst proto = Object.getPrototypeOf(objectValue);\n\tif (proto !== Object.prototype && proto !== null) {\n\t\tthrow new Error(\"topology(): meta must be plain JSON-compatible data (D39/D173)\");\n\t}\n\tconst out: Record<string, unknown> = {};\n\tseen.set(objectValue, out);\n\tfor (const [key, item] of Object.entries(value as Record<string, unknown>))\n\t\tout[key] = cloneTopologyValue(item, seen);\n\treturn out;\n}\n","/**\n * The Graph layer (CSP-2): convenience + inspection entry (D5 / R-graph-role).\n *\n * g.* sugar desugars to dispatcher.register + Node and auto-registers into the graph\n * inspection index (D27: sugar→ctx-fn conversion lives strictly here; the substrate node\n * only ever sees `(ctx)=>void`). The Graph owns naming, describe, mount, and the D30\n * value-level throw→ERROR boundary. The bare node()/dispatcher stay inspection-free\n * (R-node-thin).\n *\n * Canonical authority: ~/src/graphrefly — D3/D5/D27/D30/D36/D37/D39, R-graph-role,\n * R-describe, R-fn-contract, R-edges-derived, R-meta-presentation.\n */\n\nimport { type BatchCtx, batch as batchRun } from \"../batch/batch.js\";\nimport { type Ctx, depCount, depLatest, type NodeFn } from \"../ctx/types.js\";\nimport { type Dispatcher, defaultDispatcher } from \"../dispatcher/index.js\";\nimport { NodeCore } from \"../node/core.js\";\nimport {\n\tcheckpointStateOfNode,\n\tgetNodeOwner,\n\tisNodeActiveForRelease,\n\tisNodeRuntimeQuiescentForRelease,\n\tisNodeRuntimeReleased,\n\tNode,\n\ttype NodeOptions,\n\treleaseRuntimeOfNode,\n\tsetNodeOwner,\n\tsetNodeTopologyDepsChangedObserver,\n\tsubscriberCountOfNode,\n\twithEnvironmentDrivers,\n\twithNodeCore,\n} from \"../node/node.js\";\nimport type { NodeVersioningPolicy } from \"../node/versioning.js\";\nimport { errorPayload, messageTier, SENTINEL } from \"../protocol/messages.js\";\nimport {\n\tGRAPH_BLUEPRINT_VERSION,\n\ttype GraphBlueprint,\n\ttype GraphBlueprintOptions,\n\tgraphBlueprintDiagnostics,\n\tnormalizeTopology,\n\tnormalizeTopologyMeta,\n} from \"./blueprint.js\";\nimport {\n\tcheckpointBackendStateOfNode,\n\tcheckpointTerminal,\n\tcheckpointValue,\n\tGRAPH_CHECKPOINT_VERSION,\n\ttype GraphCheckpoint,\n\ttype GraphCheckpointFactory,\n\ttype GraphCheckpointJson,\n\ttype GraphCheckpointNode,\n\ttoCheckpointJson,\n} from \"./checkpoint.js\";\nimport {\n\ttype DescribeEdge,\n\ttype DescribeNode,\n\ttype DescribeOpts,\n\ttype DescribeSnapshot,\n\ttype GraphTopologySnapshot,\n\ttopologyFromDescribe,\n} from \"./describe.js\";\nimport { EnvironmentDrivers } from \"./environment.js\";\nimport type {\n\tNodeProfile,\n\tObserveStream,\n\tProfile,\n\tTopologyEvent,\n\tTopologyStream,\n} from \"./inspect.js\";\nimport { initNodeWithCore, type Operator } from \"./operators.js\";\n\n/** Map a tuple of Nodes to the tuple of their value types (typed value-level fn args). */\ntype DepValues<D extends readonly Node<unknown>[]> = {\n\t[K in keyof D]: D[K] extends Node<infer V> ? V : never;\n};\n\n/** Value-level derived fn: receives dep values, returns the next value (undefined = no emit). */\nexport type DerivedFn<D extends readonly Node<unknown>[], T> = (\n\t...values: DepValues<D>\n) => T | undefined;\n\n/** Value-level effect fn: receives dep values, optionally returns a deactivation cleanup. */\nexport type EffectFn<D extends readonly Node<unknown>[]> = (\n\t...values: DepValues<D>\n\t// biome-ignore lint/suspicious/noConfusingVoidType: effect returns void OR a cleanup fn — the void arm keeps `(v) => { sideEffect(v) }` ergonomic (React EffectCallback idiom); dropping it would force an explicit `return undefined`.\n) => void | (() => void);\n\n/** Sugar options — node options minus graph-owned dispatcher plus naming/meta. */\nexport interface SugarOpts<T = unknown> extends Omit<NodeOptions<T>, \"dispatcher\"> {\n\tname?: string;\n\tmeta?: Record<string, unknown>;\n\t/**\n\t * D95: explicit restorable factory metadata. Static JSON-compatible config may live here;\n\t * reactive options must remain graph deps. Without this, function-backed nodes are local-only.\n\t */\n\trestore?: { ref: string; config?: unknown; configVersion?: unknown };\n}\n\nexport interface GraphOptions {\n\tname?: string;\n\t/** Bind to a dispatcher (default = process-global, D26). */\n\tdispatcher?: Dispatcher;\n\t/** D109 default node runtime versioning policy for graph-owned nodes. Default is nodev0. */\n\tversioning?: NodeVersioningPolicy;\n\t/** Graph-owned environment drivers for source/adapter boundaries (D130/D131). */\n\tenvironment?: EnvironmentDrivers;\n\t/**\n\t * Turn on the dispatcher profile recorder (D39 / F-PERF default off). NOTE: this\n\t * switches recording on for the WHOLE bound dispatcher (the default is process-global,\n\t * D26) — every graph sharing it then pays the recorder cost. For isolated profiling\n\t * use a dedicated dispatcher: `graph({ dispatcher: new Dispatcher(), profile: true })`.\n\t */\n\tprofile?: boolean;\n}\n\ninterface Entry {\n\tnode: Node<unknown>;\n\tid: string;\n\tname?: string;\n\tfactory: string;\n\tdeps: readonly Node<unknown>[];\n\tmeta?: Record<string, unknown>;\n\trestore?: { ref: string; config?: unknown; configVersion?: unknown };\n}\n\ninterface TopologyObserver {\n\tpath?: string;\n\tsink(event: TopologyEvent): void;\n}\n\ninterface MountedGraph {\n\tat: string;\n\tgraph: Graph;\n\ttopologyUnsub?: () => void;\n}\n\ninterface GraphRestoreRegistrar {\n\tstateNode<T>(id: string, opts?: SugarOpts<T>): StateNode<T>;\n\tnode<T>(\n\t\tid: string,\n\t\tfactory: string,\n\t\tdeps: readonly Node<unknown>[],\n\t\tfn: NodeFn | null,\n\t\topts?: SugarOpts<T>,\n\t): Node<T>;\n}\n\nconst restoreRegistrars = new WeakMap<Graph, GraphRestoreRegistrar>();\n\ninterface GraphLifecycleRegistrar {\n\tassertRegisteredNode(node: Node<unknown>, label: string): void;\n\treleaseNodes(nodes: readonly Node<unknown>[], opts?: { reason?: string }): void;\n}\n\nconst lifecycleRegistrars = new WeakMap<Graph, GraphLifecycleRegistrar>();\n\nfunction nodeOwner(n: Node<unknown>): Graph | undefined {\n\treturn getNodeOwner(n) as Graph | undefined;\n}\n\nexport function assertGraphLocalNode(owner: Graph, n: Node<unknown>, label: string): void {\n\tif (isNodeRuntimeReleased(n)) {\n\t\tthrow new Error(`${label} has been released from its graph lifecycle (D122)`);\n\t}\n\tconst existing = nodeOwner(n);\n\tif (existing !== undefined && existing !== owner) {\n\t\tthrow new Error(\n\t\t\t`${label} belongs to a different graph; cross-graph deps require a wire bridge`,\n\t\t);\n\t}\n}\n\n/**\n * A state node (L4-Q1): a manual source whose `.set(v)` is `node.down([[DATA, v]])` sugar.\n * Extends the substrate Node so it is usable as a dep AND carries the graph-layer `.set`.\n */\nexport class StateNode<T> extends Node<T> {\n\tset(v: T): void {\n\t\tthis.down([[\"DATA\", v]]);\n\t}\n}\n\nexport interface TopologyGroupOptions {\n\t/** Optional inspection/release reason label for this graph-owned topology group. */\n\tname?: string;\n}\n\nexport interface TopologyGroupReleaseOptions {\n\t/** Optional diagnostic reason. No protocol/control messages are synthesized. */\n\treason?: string;\n}\n\n/**\n * Graph-owned D152 release group: a label over ordinary graph-registered nodes.\n * The graph registry remains the source of truth; helper-local membership is only\n * a memo for atomic quiescent release.\n */\nexport interface TopologyGroup {\n\treadonly name?: string;\n\treadonly released: boolean;\n\tadd<T extends Node<unknown>>(node: T): T;\n\tnode<T = unknown>(\n\t\tdeps?: readonly Node<unknown>[],\n\t\tfn?: NodeFn | null,\n\t\topts?: SugarOpts<T>,\n\t): Node<T>;\n\tstate<T>(initial: T, opts?: SugarOpts<T>): StateNode<T>;\n\tproducer<T = unknown>(fn: NodeFn, opts?: SugarOpts<T>): Node<T>;\n\tderived<const D extends readonly Node<unknown>[], T>(\n\t\tdeps: D,\n\t\tfn: DerivedFn<D, T>,\n\t\topts?: SugarOpts<T>,\n\t): Node<T>;\n\teffect<const D extends readonly Node<unknown>[]>(\n\t\tdeps: D,\n\t\tfn: EffectFn<D>,\n\t\topts?: SugarOpts<void>,\n\t): Node<void>;\n\tinitNode<TIn, TOut>(\n\t\top: Operator<TIn, TOut>,\n\t\tdeps: readonly Node<TIn>[],\n\t\topts?: SugarOpts<TOut>,\n\t): Node<TOut>;\n\trelease(opts?: TopologyGroupReleaseOptions): void;\n}\n\nclass GraphTopologyGroup implements TopologyGroup {\n\treadonly name?: string;\n\tprivate readonly _graph: Graph;\n\tprivate readonly _members: Node<unknown>[] = [];\n\tprivate _released = false;\n\n\tconstructor(graph: Graph, opts: TopologyGroupOptions = {}) {\n\t\tthis._graph = graph;\n\t\tthis.name = opts.name;\n\t}\n\n\tget released(): boolean {\n\t\treturn this._released;\n\t}\n\n\tadd<T extends Node<unknown>>(node: T): T {\n\t\tthis._assertLive();\n\t\tconst lifecycle = lifecycleRegistrars.get(this._graph);\n\t\tif (lifecycle === undefined) throw new Error(\"topologyGroup: graph lifecycle unavailable\");\n\t\tlifecycle.assertRegisteredNode(node, `topology group '${this.name ?? \"group\"}' member`);\n\t\tif (!this._members.includes(node)) this._members.push(node);\n\t\treturn node;\n\t}\n\n\tnode<T = unknown>(\n\t\tdeps: readonly Node<unknown>[] = [],\n\t\tfn: NodeFn | null = null,\n\t\topts: SugarOpts<T> = {},\n\t): Node<T> {\n\t\tthis._assertLive();\n\t\treturn this.add(this._graph.node(deps, fn, opts));\n\t}\n\n\tstate<T>(initial: T, opts: SugarOpts<T> = {}): StateNode<T> {\n\t\tthis._assertLive();\n\t\treturn this.add(this._graph.state(initial, opts));\n\t}\n\n\tproducer<T = unknown>(fn: NodeFn, opts: SugarOpts<T> = {}): Node<T> {\n\t\tthis._assertLive();\n\t\treturn this.add(this._graph.producer(fn, opts));\n\t}\n\n\tderived<const D extends readonly Node<unknown>[], T>(\n\t\tdeps: D,\n\t\tfn: DerivedFn<D, T>,\n\t\topts: SugarOpts<T> = {},\n\t): Node<T> {\n\t\tthis._assertLive();\n\t\treturn this.add(this._graph.derived(deps, fn, opts));\n\t}\n\n\teffect<const D extends readonly Node<unknown>[]>(\n\t\tdeps: D,\n\t\tfn: EffectFn<D>,\n\t\topts: SugarOpts<void> = {},\n\t): Node<void> {\n\t\tthis._assertLive();\n\t\treturn this.add(this._graph.effect(deps, fn, opts));\n\t}\n\n\tinitNode<TIn, TOut>(\n\t\top: Operator<TIn, TOut>,\n\t\tdeps: readonly Node<TIn>[],\n\t\topts: SugarOpts<TOut> = {},\n\t): Node<TOut> {\n\t\tthis._assertLive();\n\t\treturn this.add(this._graph.initNode(op, deps, opts));\n\t}\n\n\trelease(opts: TopologyGroupReleaseOptions = {}): void {\n\t\tif (this._released) return;\n\t\tconst lifecycle = lifecycleRegistrars.get(this._graph);\n\t\tif (lifecycle === undefined) throw new Error(\"topologyGroup: graph lifecycle unavailable\");\n\t\tlifecycle.releaseNodes([...this._members], {\n\t\t\treason: opts.reason ?? this.name,\n\t\t});\n\t\tthis._members.length = 0;\n\t\tthis._released = true;\n\t}\n\n\tprivate _assertLive(): void {\n\t\tif (this._released) {\n\t\t\tthrow new Error(`topology group '${this.name ?? \"group\"}' has been released (D152)`);\n\t\t}\n\t}\n}\n\nexport class Graph {\n\treadonly name?: string;\n\tprivate readonly _dispatcher: Dispatcher;\n\tprivate readonly _versioning: NodeVersioningPolicy | undefined;\n\tprivate readonly _environment: EnvironmentDrivers;\n\tprivate readonly _core = new NodeCore();\n\tprivate readonly _entries = new Map<Node<unknown>, Entry>();\n\tprivate readonly _byId = new Map<string, Node<unknown>>();\n\tprivate readonly _retiredIds = new Set<string>();\n\tprivate readonly _mounts: MountedGraph[] = [];\n\tprivate _seq = 0;\n\tprivate _clock = 0; // graph-local monotonic clock for observe seq (D26)\n\tprivate _topologyObserverSeq = 0;\n\tprivate readonly _topologyObservers = new Map<number, TopologyObserver>();\n\tprivate _topologyDelivering = false;\n\tprivate readonly _topologyQueue: TopologyEvent[] = [];\n\t// D51: stable synthetic ids for unregistered live deps (runtime *Map inners) auto-discovered by\n\t// describe(). WeakMap-cached so successive describes agree + the inner's id is freed when it is.\n\t// A dedicated counter (NOT _seq) so a describe() call never perturbs registered-node id numbering.\n\tprivate _synthSeq = 0;\n\tprivate readonly _synthIds = new WeakMap<Node<unknown>, string>();\n\n\tconstructor(opts: GraphOptions = {}) {\n\t\tthis.name = opts.name;\n\t\tthis._dispatcher = opts.dispatcher ?? defaultDispatcher;\n\t\tthis._versioning = opts.versioning;\n\t\tthis._environment = opts.environment ?? EnvironmentDrivers.empty();\n\t\tif (opts.profile) this._dispatcher.setRecording(true);\n\t\trestoreRegistrars.set(this, {\n\t\t\tstateNode: <T = unknown>(id: string, stateOpts: SugarOpts<T> = {}) => {\n\t\t\t\tconst n = this._construct(() => new StateNode<T>([], null, this._nodeOpts(stateOpts)));\n\t\t\t\tthis._addWithId(n, \"state\", [], stateOpts, id);\n\t\t\t\treturn n;\n\t\t\t},\n\t\t\tnode: <T = unknown>(\n\t\t\t\tid: string,\n\t\t\t\tfactory: string,\n\t\t\t\tdeps: readonly Node<unknown>[],\n\t\t\t\tfn: NodeFn | null,\n\t\t\t\tnodeOpts: SugarOpts<T> = {},\n\t\t\t) => {\n\t\t\t\tthis._assertDepsLocal(deps, `dep of restored '${id}'`);\n\t\t\t\tconst n = this._construct(() => new Node<T>([...deps], fn, this._nodeOpts(nodeOpts)));\n\t\t\t\tthis._addWithId(n, factory, deps, nodeOpts, id);\n\t\t\t\treturn n;\n\t\t\t},\n\t\t});\n\t\tlifecycleRegistrars.set(this, {\n\t\t\tassertRegisteredNode: (node, label) => this._assertRegisteredNode(node, label),\n\t\t\treleaseNodes: (nodes, releaseOpts) => this._releaseNodes(nodes, releaseOpts),\n\t\t});\n\t}\n\n\t// ── registration / inspection index ──\n\n\tprivate _add<T>(\n\t\tn: Node<T>,\n\t\tfactory: string,\n\t\tdeps: readonly Node<unknown>[],\n\t\topts: SugarOpts<T>,\n\t): Node<T> {\n\t\tconst id = opts.name ?? `${factory}#${this._seq++}`;\n\t\treturn this._addWithId(n, factory, deps, opts, id);\n\t}\n\n\tprivate _addWithId<T>(\n\t\tn: Node<T>,\n\t\tfactory: string,\n\t\tdeps: readonly Node<unknown>[],\n\t\topts: SugarOpts<T>,\n\t\tid: string,\n\t): Node<T> {\n\t\tassertGraphLocalNode(this, n as Node<unknown>, `graph node '${opts.name ?? factory}'`);\n\t\tfor (const dep of deps) assertGraphLocalNode(this, dep, `dep of '${opts.name ?? factory}'`);\n\t\tif (this._byId.has(id)) {\n\t\t\tthrow new Error(`graph: duplicate node id '${id}' (checkpoint/describe ids must be unique)`);\n\t\t}\n\t\tif (this._retiredIds.has(id)) {\n\t\t\tthrow new Error(`graph: node id '${id}' was released and cannot be reused (D152/D153)`);\n\t\t}\n\t\tconst meta =\n\t\t\topts.meta === undefined\n\t\t\t\t? undefined\n\t\t\t\t: (normalizeTopologyMeta(opts.meta, `graph node '${id}' meta`) as Record<string, unknown>);\n\t\tthis._entries.set(n as Node<unknown>, {\n\t\t\tnode: n as Node<unknown>,\n\t\t\tid,\n\t\t\tname: opts.name,\n\t\t\tfactory,\n\t\t\tdeps,\n\t\t\tmeta,\n\t\t\trestore: opts.restore,\n\t\t});\n\t\tsetNodeOwner(n as Node<unknown>, this);\n\t\tthis._byId.set(id, n as Node<unknown>);\n\t\tsetNodeTopologyDepsChangedObserver(n as Node<unknown>, (_node, prevDeps, nextDeps) => {\n\t\t\tthis._emitTopologyDepsChanged(n as Node<unknown>, prevDeps, nextDeps);\n\t\t});\n\t\tconst seqMatch = /#(\\d+)$/.exec(id);\n\t\tif (seqMatch) this._seq = Math.max(this._seq, Number(seqMatch[1]) + 1);\n\t\tthis._emitTopologyNodeRegistered(n as Node<unknown>);\n\t\treturn n;\n\t}\n\n\tprivate _assertDepsLocal(deps: readonly Node<unknown>[], label: string): void {\n\t\tfor (const dep of deps) assertGraphLocalNode(this, dep, label);\n\t}\n\n\tprivate _assertRegisteredNode(node: Node<unknown>, label: string): void {\n\t\tassertGraphLocalNode(this, node, label);\n\t\tif (!this._entries.has(node)) {\n\t\t\tthrow new Error(`${label} is not a registered graph node (D152)`);\n\t\t}\n\t}\n\n\tprivate _nodeOpts<T>(opts: SugarOpts<T>): NodeOptions<T> {\n\t\tif (opts.meta !== undefined) {\n\t\t\tnormalizeTopologyMeta(opts.meta, `graph node '${opts.name ?? opts.factory ?? \"node\"}' meta`);\n\t\t}\n\t\t// strip graph-only fields; inject the bound dispatcher\n\t\tconst { name: _n, meta: _m, restore: _r, ...rest } = opts;\n\t\treturn {\n\t\t\t...rest,\n\t\t\tversioning: rest.versioning ?? this._versioning,\n\t\t\tdispatcher: this._dispatcher,\n\t\t};\n\t}\n\n\tprivate _construct<TNode extends Node<unknown>>(create: () => TNode): TNode {\n\t\treturn withEnvironmentDrivers(this._environment, () => withNodeCore(this._core, create));\n\t}\n\n\t/** Look up a registered node by its id. */\n\tfind(id: string): Node<unknown> | undefined {\n\t\tconst local = this._byId.get(id);\n\t\tif (local !== undefined) return local;\n\t\tconst separator = id.indexOf(\"::\");\n\t\tif (separator < 0) return undefined;\n\t\tconst mountPath = id.slice(0, separator);\n\t\tconst childPath = id.slice(separator + 2);\n\t\treturn this._mounts.find((mount) => mount.at === mountPath)?.graph.find(childPath);\n\t}\n\n\tprivate _releaseNodes(nodes: readonly Node<unknown>[], _opts: { reason?: string } = {}): void {\n\t\tconst seen = new Set<Node<unknown>>();\n\t\tconst entries: Array<{ node: Node<unknown>; entry: Entry }> = [];\n\t\tfor (const node of nodes) {\n\t\t\tif (seen.has(node)) continue;\n\t\t\tseen.add(node);\n\t\t\tconst entry = this._entries.get(node);\n\t\t\tif (entry === undefined) continue;\n\t\t\tentries.push({ node, entry });\n\t\t}\n\t\tconst releaseSet = new Set(entries.map(({ node }) => node));\n\t\tconst releaseIds = new Map(entries.map(({ node, entry }) => [node, entry.id] as const));\n\t\tfor (const entry of this._entries.values()) {\n\t\t\tif (releaseSet.has(entry.node)) continue;\n\t\t\tfor (const dep of entry.node.deps) {\n\t\t\t\tif (!releaseSet.has(dep)) continue;\n\t\t\t\tconst depId = releaseIds.get(dep) ?? dep.name ?? dep.factory ?? \"released node\";\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`graph: cannot release node group; '${entry.id}' still depends on '${depId}' (D122)`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tfor (const { node, entry } of entries) {\n\t\t\tif (!isNodeRuntimeQuiescentForRelease(node)) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`graph: cannot release node group; '${entry.id}' is not runtime-quiescent (D124)`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tlet internalSubscribers = 0;\n\t\t\tfor (const { node: dependent } of entries) {\n\t\t\t\tif (dependent === node || !isNodeActiveForRelease(dependent)) continue;\n\t\t\t\tfor (const dep of dependent.deps) {\n\t\t\t\t\tif (dep === node) internalSubscribers += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (subscriberCountOfNode(node) > internalSubscribers) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`graph: cannot release node group; '${entry.id}' still has live subscribers (D124)`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tconst releasedEvents =\n\t\t\tthis._topologyObservers.size === 0\n\t\t\t\t? []\n\t\t\t\t: entries.map(({ node, entry }) => ({\n\t\t\t\t\t\tpath: entry.id,\n\t\t\t\t\t\tfactory: entry.factory,\n\t\t\t\t\t\tdeps: this._topologyDeps(node.deps),\n\t\t\t\t\t}));\n\t\tfor (const { node, entry } of entries) {\n\t\t\tthis._entries.delete(node);\n\t\t\tthis._byId.delete(entry.id);\n\t\t\tthis._retiredIds.add(entry.id);\n\t\t}\n\t\tlet releaseError: unknown;\n\t\tfor (const { node } of entries) {\n\t\t\ttry {\n\t\t\t\treleaseRuntimeOfNode(node);\n\t\t\t} catch (error) {\n\t\t\t\tif (releaseError === undefined) releaseError = error;\n\t\t\t}\n\t\t}\n\t\tfor (const event of releasedEvents) this._emitTopologyNodeReleased(event);\n\t\tif (releaseError !== undefined) throw releaseError;\n\t}\n\n\t// ── 8 verbs (core: node/state/batch + sugar: producer/derived/effect/mount) ──\n\n\t/** ctx-level power surface: a raw `(ctx)=>void` fn (or a passthrough/state when null). */\n\tnode<T = unknown>(\n\t\tdeps: readonly Node<unknown>[] = [],\n\t\tfn: NodeFn | null = null,\n\t\topts: SugarOpts<T> = {},\n\t): Node<T> {\n\t\tthis._assertDepsLocal(deps, `dep of '${opts.name ?? \"node\"}'`);\n\t\tconst n = this._construct(() => new Node<T>(deps as Node<unknown>[], fn, this._nodeOpts(opts)));\n\t\treturn this._add(n, opts.factory ?? \"node\", deps, opts);\n\t}\n\n\t/** A manual source with `.set(v)` (L4-Q1). */\n\tstate<T>(initial: T, opts: SugarOpts<T> = {}): StateNode<T> {\n\t\tconst n = this._construct(\n\t\t\t() => new StateNode<T>([], null, { ...this._nodeOpts(opts), initial }),\n\t\t);\n\t\tthis._add(n, \"state\", [], opts);\n\t\treturn n;\n\t}\n\n\t/** ctx-level depless source; its fn runs on activation (R-rom-ram). */\n\tproducer<T = unknown>(fn: NodeFn, opts: SugarOpts<T> = {}): Node<T> {\n\t\tconst n = this._construct(() => new Node<T>([], fn, this._nodeOpts(opts)));\n\t\treturn this._add(n, \"producer\", [], opts);\n\t}\n\n\t/** value-level pure transform: deps → value (D27 wrapped; D30 throw→ERROR). */\n\tderived<const D extends readonly Node<unknown>[], T>(\n\t\tdeps: D,\n\t\tfn: DerivedFn<D, T>,\n\t\topts: SugarOpts<T> = {},\n\t): Node<T> {\n\t\tthis._assertDepsLocal(deps, `dep of '${opts.name ?? \"derived\"}'`);\n\t\tconst ctxFn: NodeFn = (ctx: Ctx) => {\n\t\t\ttry {\n\t\t\t\tconst args = Array.from({ length: depCount(ctx) }, (_, i) =>\n\t\t\t\t\tdepLatest(ctx, i),\n\t\t\t\t) as DepValues<D>;\n\t\t\t\tconst result = fn(...args);\n\t\t\t\tif (result !== undefined) ctx.down([[\"DATA\", result]]);\n\t\t\t} catch (e) {\n\t\t\t\tctx.down([[\"ERROR\", errorPayload(e, \"derived threw without a valid error payload\")]]); // D30: value-level throw → graph-layer ERROR\n\t\t\t}\n\t\t};\n\t\tconst n = this._construct(() => new Node<T>([...deps], ctxFn, this._nodeOpts(opts)));\n\t\treturn this._add(n, \"derived\", deps, opts);\n\t}\n\n\t/** value-level sink: deps → effect; return value (a fn) becomes onDeactivation (D28). */\n\teffect<const D extends readonly Node<unknown>[]>(\n\t\tdeps: D,\n\t\tfn: EffectFn<D>,\n\t\topts: SugarOpts<void> = {},\n\t): Node<void> {\n\t\tthis._assertDepsLocal(deps, `dep of '${opts.name ?? \"effect\"}'`);\n\t\t// effect cleanup = deactivation-only (D28 / Flag 3): the LATEST returned cleanup\n\t\t// fires ONCE when the effect deactivates (not between re-runs — onRerun was cut).\n\t\t// R-cleanup-hooks per-run lifecycle (D28 clarification / C-14): the substrate clears\n\t\t// the hook list before EACH fn run, so the effect re-registers its returned cleanup\n\t\t// every run — only the latest run's registration is live (or none, if the latest run\n\t\t// returned void). No st.registered/ctx.state bookkeeping; re-registering every run is\n\t\t// safe (the per-run clear prevents accumulation).\n\t\tconst ctxFn: NodeFn = (ctx: Ctx) => {\n\t\t\ttry {\n\t\t\t\tconst args = Array.from({ length: depCount(ctx) }, (_, i) =>\n\t\t\t\t\tdepLatest(ctx, i),\n\t\t\t\t) as DepValues<D>;\n\t\t\t\tconst cleanup = fn(...args);\n\t\t\t\tif (typeof cleanup === \"function\") ctx.onDeactivation(cleanup);\n\t\t\t} catch (e) {\n\t\t\t\tctx.down([[\"ERROR\", errorPayload(e, \"effect threw without a valid error payload\")]]);\n\t\t\t}\n\t\t};\n\t\tconst n = this._construct(() => new Node<void>([...deps], ctxFn, this._nodeOpts(opts)));\n\t\treturn this._add(n, \"effect\", deps, opts);\n\t}\n\n\t/** Declarative batch (D12): one wave, success→commit / throw→rollback. */\n\tbatch<T>(fn: (bctx: BatchCtx) => T): T {\n\t\treturn batchRun(fn);\n\t}\n\n\t/** Embed a child graph addressable under `at` (R-mount; mount has no deps). */\n\tmount(child: Graph, opts: { at: string }): void {\n\t\tconst mount = { at: opts.at, graph: child };\n\t\tthis._mounts.push(mount);\n\t\tif (this._topologyObservers.size > 0) this._ensureMountedTopologyForwarders();\n\t\tthis._emitTopologyMountChanged(opts.at);\n\t}\n\n\t// ── operator funnel (D43): instantiate any free-standing Operator (node sugar, D6/L1.5) ──\n\t// g.initNode is the single graph-bound entry for the whole operator/source catalog (D40):\n\t// it delegates to the FREE initNode (graph/operators.ts — the D30 throw→ERROR boundary +\n\t// dispatcher binding live there) and records the operator's REAL factory name in the\n\t// inspection index (_add) so describe shows it (D6/R-describe) while the node stays thin\n\t// (R-node-thin). Operators are free-standing factory definitions (graph/operators.ts,\n\t// graph/sources.ts) usable bare via the free initNode(); this funnel is the inspectable\n\t// path. Replaces the per-operator methods.\n\n\t/**\n\t * Instantiate an operator (or source) factory as a registered graph node. `deps` are\n\t * type-checked against the operator's input element type; the output type flows from the\n\t * operator. A source is a depless operator — pass `[]`. Caller `opts` (name/meta/behavioral\n\t * overrides) win over the operator's baked-in `opts`.\n\t */\n\tinitNode<TIn, TOut>(\n\t\top: Operator<TIn, TOut>,\n\t\tdeps: readonly Node<TIn>[],\n\t\topts: SugarOpts<TOut> = {},\n\t): Node<TOut> {\n\t\tconst entryOpts =\n\t\t\top.restore !== undefined && !(\"restore\" in opts) ? { ...opts, restore: op.restore } : opts;\n\t\tfor (const dep of deps as readonly Node<unknown>[])\n\t\t\tassertGraphLocalNode(this, dep, `dep of '${entryOpts.name ?? op.factory}'`);\n\t\t// Node<T> is invariant (T appears in NodeOptions.initial); widen the typed deps to the\n\t\t// erased Node surface the free initNode / _add accept (same cast the old methods used).\n\t\tconst erased = deps as readonly Node<unknown>[];\n\t\tconst n = withEnvironmentDrivers(this._environment, () =>\n\t\t\tinitNodeWithCore(this._core, op, erased, this._nodeOpts(entryOpts)),\n\t\t);\n\t\treturn this._add(n, op.factory, erased, entryOpts);\n\t}\n\n\t/**\n\t * Graph-owned activation root for internal helper nodes. This is the sanctioned keepalive shape:\n\t * a graph, not a helper closure, owns the subscription and returns the release handle.\n\t */\n\tretain<T>(node: Node<T>, opts: { reason?: string } = {}): () => void {\n\t\tassertGraphLocalNode(this, node as Node<unknown>, opts.reason ?? \"retained node\");\n\t\treturn node.subscribe(() => {});\n\t}\n\n\t/**\n\t * D152 graph-owned topology/release group. Members are ordinary registered graph nodes;\n\t * release is quiescent-only and removes ids atomically without synthesizing protocol messages.\n\t */\n\ttopologyGroup(opts: TopologyGroupOptions = {}): TopologyGroup {\n\t\treturn new GraphTopologyGroup(this, opts);\n\t}\n\n\t// ── inspection: describe / observe / profile (D39) ──\n\n\t/** Live point-in-time structure snapshot (R-describe / D39 / D51). `_prefix` carries the mount path. */\n\tdescribe(opts: DescribeOpts = {}, _prefix = \"\"): DescribeSnapshot {\n\t\t// D51: edges derive from each node's CURRENT/LIVE deps (entry.node.deps, NOT the\n\t\t// construction-time entry.deps), so a rewire (C-8 immediate / C-11 *Map deferred) is\n\t\t// reflected and every edge is a real current subscription (D3). A live dep absent from this\n\t\t// graph's index (a runtime *Map inner / bare fromAny node) is AUTO-DISCOVERED as a snapshot\n\t\t// node with a synthesized stable id (B2). B38 extends this to transitive live-reachability:\n\t\t// discovered unregistered nodes are recursively expanded through their own live deps.\n\t\tconst discovered = new Map<Node<unknown>, string>(); // unregistered live dep → synth local id\n\t\tconst localId = (n: Node<unknown>): string => {\n\t\t\tconst e = this._entries.get(n);\n\t\t\tif (e) return `${_prefix}${e.id}`;\n\t\t\t// unregistered: a stable synthetic id, cached so successive describes + both call sites\n\t\t\t// agree; the `~` prefix can't collide with a registered name or `factory#seq`.\n\t\t\tlet sid = this._synthIds.get(n);\n\t\t\tif (sid === undefined) {\n\t\t\t\t// the `~` prefix avoids the registered `name`/`factory#seq` space; guard the\n\t\t\t\t// pathological case of a user node literally named `~factory#n` (bump until free).\n\t\t\t\tdo {\n\t\t\t\t\tsid = `~${n.factory ?? \"?\"}#${this._synthSeq++}`;\n\t\t\t\t} while (this._byId.has(sid));\n\t\t\t\tthis._synthIds.set(n, sid);\n\t\t\t}\n\t\t\tdiscovered.set(n, sid);\n\t\t\treturn `${_prefix}${sid}`;\n\t\t};\n\t\tconst nodes: DescribeNode[] = [];\n\t\tconst edges: DescribeEdge[] = [];\n\t\t// pass 1: registered nodes, reading LIVE deps (localId records any unregistered inner).\n\t\tfor (const entry of this._entries.values()) {\n\t\t\tconst id = `${_prefix}${entry.id}`;\n\t\t\tconst liveIds = entry.node.deps.map(localId);\n\t\t\tconst dnode: DescribeNode = {\n\t\t\t\tid,\n\t\t\t\tfactory: entry.factory,\n\t\t\t\tstatus: entry.node.status,\n\t\t\t\tdeps: liveIds,\n\t\t\t};\n\t\t\tif (entry.name !== undefined) dnode.name = entry.name;\n\t\t\tif (entry.node.cache !== undefined) dnode.value = entry.node.cache; // absent = SENTINEL\n\t\t\tif (entry.node.version !== undefined) dnode.version = entry.node.version;\n\t\t\tif (entry.meta !== undefined) dnode.meta = entry.meta;\n\t\t\tnodes.push(dnode);\n\t\t\tfor (const from of liveIds) edges.push({ from, to: id });\n\t\t}\n\t\t// pass 2: recursively emit auto-discovered unregistered nodes (D51+B38). localId() may add\n\t\t// further unregistered deps to `discovered` while this loop runs; a visited set keeps each\n\t\t// discovered node emitted once (stable ids via _synthIds).\n\t\tconst visited = new Set<Node<unknown>>();\n\t\tconst queue: Node<unknown>[] = [...discovered.keys()];\n\t\tfor (let i = 0; i < queue.length; i += 1) {\n\t\t\tconst inner = queue[i];\n\t\t\tif (visited.has(inner)) continue;\n\t\t\tvisited.add(inner);\n\t\t\tconst sid = discovered.get(inner);\n\t\t\tif (sid === undefined) continue;\n\t\t\tconst liveIds = inner.deps.map(localId);\n\t\t\tfor (const dep of inner.deps) {\n\t\t\t\tif (!this._entries.has(dep) && !visited.has(dep)) queue.push(dep);\n\t\t\t}\n\t\t\tconst dnode: DescribeNode = {\n\t\t\t\tid: `${_prefix}${sid}`,\n\t\t\t\tfactory: inner.factory ?? \"?\",\n\t\t\t\tstatus: inner.status,\n\t\t\t\tdeps: liveIds,\n\t\t\t};\n\t\t\tif (inner.cache !== undefined) dnode.value = inner.cache;\n\t\t\tif (inner.version !== undefined) dnode.version = inner.version;\n\t\t\tnodes.push(dnode);\n\t\t\tfor (const from of liveIds) edges.push({ from, to: dnode.id });\n\t\t}\n\t\tconst snap: DescribeSnapshot = { nodes, edges };\n\t\tif (this.name !== undefined) snap.name = this.name;\n\t\tif (this._mounts.length > 0) {\n\t\t\tsnap.subgraphs = this._mounts.map((m) => m.graph.describe({}, `${_prefix}${m.at}::`));\n\t\t}\n\t\treturn opts.explain ? explainSubset(snap, opts.explain) : snap;\n\t}\n\n\t/**\n\t * D173 pure-structure topology snapshot over the same live truth source as describe().\n\t * Runtime status/value/version remain on describe(); blueprint metadata is a later envelope.\n\t */\n\ttopology(): GraphTopologySnapshot {\n\t\treturn topologyFromDescribe(this.describe());\n\t}\n\n\t/**\n\t * D177 synchronous audit/collaboration envelope over the pure topology snapshot.\n\t * Hashing and environment provenance enrichment stay in pure helpers outside Graph core.\n\t */\n\tblueprint(opts: GraphBlueprintOptions = {}): GraphBlueprint {\n\t\tconst topology = normalizeTopology(this.topology());\n\t\tconst out: GraphBlueprint = {\n\t\t\tversion: GRAPH_BLUEPRINT_VERSION,\n\t\t\ttopology,\n\t\t};\n\t\tif (opts.diagnostics) {\n\t\t\t(out as { diagnostics?: ReturnType<typeof graphBlueprintDiagnostics> }).diagnostics =\n\t\t\t\tgraphBlueprintDiagnostics(topology);\n\t\t}\n\t\tif (opts.provenance !== undefined) {\n\t\t\t(out as { provenance?: GraphBlueprint[\"provenance\"] }).provenance = normalizeTopologyMeta(\n\t\t\t\topts.provenance,\n\t\t\t\t\"graph blueprint provenance\",\n\t\t\t\t\"provenance\",\n\t\t\t);\n\t\t}\n\t\treturn out;\n\t}\n\n\tprivate _observeTargets(path?: string): Array<[string, Node<unknown>]> {\n\t\tconst all: Array<[string, Node<unknown>]> = [...this._entries.values()].map((e) => [\n\t\t\te.id,\n\t\t\te.node,\n\t\t]);\n\t\tif (path === undefined) return all; // whole graph\n\t\tconst exact = this._byId.get(path);\n\t\tif (exact) return [[path, exact]]; // single node\n\t\treturn all.filter(([id]) => id.startsWith(`${path}::`)); // subtree (mount-aware :: boundary, QA A-1)\n\t}\n\n\t/**\n\t * observe(path?) = read-only enveloped EGRESS (R-observe / D39). NOT a graph node — it\n\t * taps the target node(s) via subscribe and forwards each Message as an ObserveEvent.\n\t * No path = whole graph; an exact id = a single node; otherwise a `::`-prefix subtree.\n\t */\n\t// NOTE (R-observe/D19): observe is a real, lazily-ACTIVATING subscriber — observing a\n\t// cold node runs its fn (and activates upstream); whole-graph observe() activates the\n\t// graph. \"Read-only\" means it never emits/mutates node state, NOT that it avoids\n\t// activation. Use it knowing inspection of a cold graph wakes it.\n\tobserve(path?: string): ObserveStream {\n\t\tconst targets = this._observeTargets(path);\n\t\treturn {\n\t\t\tsubscribe: (sink) => {\n\t\t\t\tconst unsubs = targets.map(([id, n]) =>\n\t\t\t\t\tn.subscribe((msg) => {\n\t\t\t\t\t\tsink({ path: id, msg, tier: messageTier(msg[0]), seq: this._clock++ });\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t\treturn () => {\n\t\t\t\t\tfor (const u of unsubs) u();\n\t\t\t\t};\n\t\t\t},\n\t\t};\n\t}\n\n\t/**\n\t * D145 observeTopology(path?) = read-only graph lifecycle egress over the existing\n\t * graph registry. It is not a graph node, does not subscribe to nodes, and emits no DATA.\n\t */\n\tobserveTopology(path?: string): TopologyStream {\n\t\treturn {\n\t\t\tsubscribe: (sink) => {\n\t\t\t\tconst id = this._topologyObserverSeq++;\n\t\t\t\tthis._topologyObservers.set(id, { path, sink });\n\t\t\t\tthis._ensureMountedTopologyForwarders();\n\t\t\t\treturn () => {\n\t\t\t\t\tthis._topologyObservers.delete(id);\n\t\t\t\t\tif (this._topologyObservers.size === 0) this._releaseMountedTopologyForwarders();\n\t\t\t\t};\n\t\t\t},\n\t\t};\n\t}\n\n\tprivate _idForTopologyNode(n: Node<unknown>): string {\n\t\tconst e = this._entries.get(n);\n\t\tif (e) return e.id;\n\t\tlet sid = this._synthIds.get(n);\n\t\tif (sid === undefined) {\n\t\t\tdo {\n\t\t\t\tsid = `~${n.factory ?? \"?\"}#${this._synthSeq++}`;\n\t\t\t} while (this._byId.has(sid));\n\t\t\tthis._synthIds.set(n, sid);\n\t\t}\n\t\treturn sid;\n\t}\n\n\tprivate _topologyDeps(deps: readonly Node<unknown>[]): string[] {\n\t\treturn deps.map((dep) => this._idForTopologyNode(dep));\n\t}\n\n\tprivate _emitTopologyNodeRegistered(node: Node<unknown>): void {\n\t\tif (this._topologyObservers.size === 0) return;\n\t\tconst entry = this._entries.get(node);\n\t\tif (entry === undefined) return;\n\t\tthis._emitTopologyEvent({\n\t\t\tkind: \"node-registered\",\n\t\t\tpath: entry.id,\n\t\t\tfactory: entry.factory,\n\t\t\tdeps: this._topologyDeps(node.deps),\n\t\t\tseq: this._clock++,\n\t\t});\n\t}\n\n\tprivate _emitTopologyDepsChanged(\n\t\tnode: Node<unknown>,\n\t\tprevDeps: readonly Node<unknown>[],\n\t\tnextDeps: readonly Node<unknown>[],\n\t): void {\n\t\tif (this._topologyObservers.size === 0) return;\n\t\tconst entry = this._entries.get(node);\n\t\tif (entry === undefined) return;\n\t\tthis._emitTopologyEvent({\n\t\t\tkind: \"deps-changed\",\n\t\t\tpath: entry.id,\n\t\t\tprevDeps: this._topologyDeps(prevDeps),\n\t\t\tdeps: this._topologyDeps(nextDeps),\n\t\t\tseq: this._clock++,\n\t\t});\n\t}\n\n\tprivate _emitTopologyNodeReleased(event: {\n\t\tpath: string;\n\t\tfactory: string;\n\t\tdeps: readonly string[];\n\t}): void {\n\t\tif (this._topologyObservers.size === 0) return;\n\t\tthis._emitTopologyEvent({\n\t\t\tkind: \"node-released\",\n\t\t\tpath: event.path,\n\t\t\tfactory: event.factory,\n\t\t\tdeps: [...event.deps],\n\t\t\tseq: this._clock++,\n\t\t});\n\t}\n\n\tprivate _emitTopologyMountChanged(path: string): void {\n\t\tif (this._topologyObservers.size === 0) return;\n\t\tthis._emitTopologyEvent({\n\t\t\tkind: \"mount-changed\",\n\t\t\tpath,\n\t\t\tfactory: \"mount\",\n\t\t\tdeps: [],\n\t\t\tseq: this._clock++,\n\t\t});\n\t}\n\n\tprivate _ensureMountedTopologyForwarders(): void {\n\t\tif (this._topologyObservers.size === 0) return;\n\t\tfor (const mount of this._mounts) {\n\t\t\tif (mount.topologyUnsub !== undefined) continue;\n\t\t\tconst mountPath = mount.at;\n\t\t\tmount.topologyUnsub = mount.graph.observeTopology().subscribe((event) => {\n\t\t\t\tthis._emitMountedTopologyEvent(mountPath, event);\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate _releaseMountedTopologyForwarders(): void {\n\t\tfor (const mount of this._mounts) {\n\t\t\tmount.topologyUnsub?.();\n\t\t\tmount.topologyUnsub = undefined;\n\t\t}\n\t}\n\n\tprivate _emitMountedTopologyEvent(mountPath: string, event: TopologyEvent): void {\n\t\tif (this._topologyObservers.size === 0) return;\n\t\tthis._emitTopologyEvent({\n\t\t\tkind: event.kind,\n\t\t\tpath: prefixTopologyPath(mountPath, event.path),\n\t\t\tdeps: event.deps.map((dep) => prefixTopologyPath(mountPath, dep)),\n\t\t\t...(event.prevDeps !== undefined\n\t\t\t\t? { prevDeps: event.prevDeps.map((dep) => prefixTopologyPath(mountPath, dep)) }\n\t\t\t\t: {}),\n\t\t\t...(event.factory !== undefined ? { factory: event.factory } : {}),\n\t\t\tseq: this._clock++,\n\t\t});\n\t}\n\n\tprivate _emitTopologyEvent(event: TopologyEvent): void {\n\t\tif (this._topologyDelivering) {\n\t\t\tthis._topologyQueue.push(event);\n\t\t\treturn;\n\t\t}\n\t\tthis._topologyDelivering = true;\n\t\ttry {\n\t\t\tlet current: TopologyEvent | undefined = event;\n\t\t\twhile (current !== undefined) {\n\t\t\t\tconst observers = [...this._topologyObservers.entries()];\n\t\t\t\tfor (const [id, observer] of observers) {\n\t\t\t\t\tif (this._topologyObservers.get(id) !== observer) continue;\n\t\t\t\t\tif (observer.path !== undefined && !topologyPathMatches(current.path, observer.path))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tobserver.sink(cloneTopologyEvent(current));\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// D145 egress is read-only inspection; observer failure must not veto a\n\t\t\t\t\t\t// graph registry/rewire mutation that already committed.\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcurrent = this._topologyQueue.shift();\n\t\t\t}\n\t\t} finally {\n\t\t\tthis._topologyDelivering = false;\n\t\t}\n\t}\n\n\t/**\n\t * profile() = accumulated-counter snapshot (R-profile / D39). invokes + duration are\n\t * dispatcher-backed (the invoke funnel, F-DISPATCH-ALL) — counters never live on the\n\t * thin node (R-node-thin). Requires `graph({ profile: true })` (opt-in, F-PERF).\n\t */\n\tprofile(): Profile {\n\t\tconst nodes: Record<string, NodeProfile> = {};\n\t\tlet totalInvokes = 0;\n\t\tfor (const e of this._entries.values()) {\n\t\t\tconst h = e.node.handle;\n\t\t\tconst stat = h ? this._dispatcher.statFor(h) : undefined;\n\t\t\tconst invokes = stat?.invokes ?? 0;\n\t\t\tnodes[e.id] = {\n\t\t\t\tinvokes,\n\t\t\t\ttotalDurationNs: stat?.totalDurationNs ?? 0,\n\t\t\t\tlastDurationNs: stat?.lastDurationNs ?? 0,\n\t\t\t\tstatus: e.node.status,\n\t\t\t};\n\t\t\t// graph-scoped (QA D-2): sum THIS graph's nodes, NOT the dispatcher-global\n\t\t\t// counter (which would leak invokes from other graphs sharing the dispatcher).\n\t\t\ttotalInvokes += invokes;\n\t\t}\n\t\treturn { totalInvokes, nodes };\n\t}\n\n\t/** Versioned graph lifecycle checkpoint (R-snapshot / D83 / D90). Pure capture, no storage I/O. */\n\tcheckpoint(): GraphCheckpoint {\n\t\treturn this._checkpoint(\"\", new WeakSet());\n\t}\n\n\tprivate _checkpoint(_prefix: string, stack: WeakSet<Graph>): GraphCheckpoint {\n\t\tif (stack.has(this)) {\n\t\t\tthrow new Error(\"checkpoint: cyclic graph mount detected\");\n\t\t}\n\t\tstack.add(this);\n\t\tconst discovered = new Map<Node<unknown>, string>();\n\t\tconst localId = (n: Node<unknown>): string => {\n\t\t\tconst e = this._entries.get(n);\n\t\t\tif (e) return `${_prefix}${e.id}`;\n\t\t\tlet sid = this._synthIds.get(n);\n\t\t\tif (sid === undefined) {\n\t\t\t\tdo {\n\t\t\t\t\tsid = `~${n.factory ?? \"?\"}#${this._synthSeq++}`;\n\t\t\t\t} while (this._byId.has(sid));\n\t\t\t\tthis._synthIds.set(n, sid);\n\t\t\t}\n\t\t\tdiscovered.set(n, sid);\n\t\t\treturn `${_prefix}${sid}`;\n\t\t};\n\t\tconst nodes: GraphCheckpointNode[] = [];\n\t\tconst edges: DescribeEdge[] = [];\n\t\tfor (const entry of this._entries.values()) {\n\t\t\tconst id = `${_prefix}${entry.id}`;\n\t\t\tconst liveIds = entry.node.deps.map(localId);\n\t\t\tnodes.push(\n\t\t\t\tthis._checkpointNode(entry.node, id, {\n\t\t\t\t\tname: entry.name,\n\t\t\t\t\tfactory: checkpointFactory(entry.factory, entry.node, false, entry.restore, entry.meta),\n\t\t\t\t\tdeps: liveIds,\n\t\t\t\t\tmeta: entry.meta,\n\t\t\t\t}),\n\t\t\t);\n\t\t\tfor (const from of liveIds) edges.push({ from, to: id });\n\t\t}\n\t\tconst visited = new Set<Node<unknown>>();\n\t\tconst queue: Node<unknown>[] = [...discovered.keys()];\n\t\tfor (let i = 0; i < queue.length; i += 1) {\n\t\t\tconst inner = queue[i];\n\t\t\tif (visited.has(inner)) continue;\n\t\t\tvisited.add(inner);\n\t\t\tconst sid = discovered.get(inner);\n\t\t\tif (sid === undefined) continue;\n\t\t\tconst liveIds = inner.deps.map(localId);\n\t\t\tfor (const dep of inner.deps) {\n\t\t\t\tif (!this._entries.has(dep) && !visited.has(dep)) queue.push(dep);\n\t\t\t}\n\t\t\tconst id = `${_prefix}${sid}`;\n\t\t\tnodes.push(\n\t\t\t\tthis._checkpointNode(inner, id, {\n\t\t\t\t\tfactory: checkpointFactory(inner.factory ?? \"?\", inner, true),\n\t\t\t\t\tdeps: liveIds,\n\t\t\t\t}),\n\t\t\t);\n\t\t\tfor (const from of liveIds) edges.push({ from, to: id });\n\t\t}\n\t\tconst checkpoint: GraphCheckpoint = {\n\t\t\tversion: GRAPH_CHECKPOINT_VERSION,\n\t\t\tnodes,\n\t\t\tedges,\n\t\t};\n\t\tif (this.name !== undefined) checkpoint.name = this.name;\n\t\tif (this._mounts.length > 0) {\n\t\t\tcheckpoint.mounts = this._mounts.map((m) => ({\n\t\t\t\tat: m.at,\n\t\t\t\tcheckpoint: m.graph._checkpoint(\"\", stack),\n\t\t\t}));\n\t\t}\n\t\tstack.delete(this);\n\t\treturn toCheckpointJson(checkpoint, \"checkpoint\") as unknown as GraphCheckpoint;\n\t}\n\n\tprivate _checkpointNode(\n\t\tnode: Node<unknown>,\n\t\tid: string,\n\t\topts: {\n\t\t\tname?: string;\n\t\t\tfactory: GraphCheckpointFactory;\n\t\t\tdeps: string[];\n\t\t\tmeta?: Record<string, unknown>;\n\t\t},\n\t): GraphCheckpointNode {\n\t\tconst state = checkpointStateOfNode(node);\n\t\tassertCheckpointQuiescentStatus(node.status, id, \"checkpoint\");\n\t\tconst nonAuthoritativeCollectionHelper = isNonAuthoritativeCollectionHelperMeta(opts.meta);\n\t\tconst out: GraphCheckpointNode = {\n\t\t\tid,\n\t\t\tfactory: opts.factory,\n\t\t\tstatus: node.status,\n\t\t\tdeps: opts.deps,\n\t\t\tvalue: nonAuthoritativeCollectionHelper\n\t\t\t\t? { kind: \"SENTINEL\" }\n\t\t\t\t: checkpointValue(state.cache, state.hasData, `${id}.value`),\n\t\t\tterminal: checkpointTerminal(state.terminal, `${id}.terminal`),\n\t\t\tlifecycle: { activated: state.activated, hasCalledFnOnce: state.hasCalledFnOnce },\n\t\t\tctxState: {\n\t\t\t\tpersist: state.ctxState.persist,\n\t\t\t\tvalue: nonAuthoritativeCollectionHelper\n\t\t\t\t\t? { kind: \"SENTINEL\" }\n\t\t\t\t\t: checkpointValue(\n\t\t\t\t\t\t\tstate.ctxState.value,\n\t\t\t\t\t\t\tstate.ctxState.value !== SENTINEL,\n\t\t\t\t\t\t\t`${id}.ctxState`,\n\t\t\t\t\t\t),\n\t\t\t},\n\t\t};\n\t\tif (opts.name !== undefined) out.name = opts.name;\n\t\tconst backendState = checkpointBackendStateOfNode(node, `${id}.backendState`);\n\t\tif (backendState !== undefined) out.backendState = backendState;\n\t\tif (state.version !== undefined) out.version = state.version;\n\t\tif (opts.meta !== undefined)\n\t\t\tout.meta = toCheckpointJson(opts.meta, `${id}.meta`) as {\n\t\t\t\t[key: string]: GraphCheckpointJson;\n\t\t\t};\n\t\treturn out;\n\t}\n}\n\nfunction isNonAuthoritativeCollectionHelperMeta(\n\tmeta: Record<string, unknown> | undefined,\n): boolean {\n\treturn (\n\t\tmeta?.kind === \"collection_delta\" ||\n\t\tmeta?.kind === \"collection_intent\" ||\n\t\tmeta?.kind === \"collection_policy_apply\" ||\n\t\tmeta?.kind === \"collection_snapshot\" ||\n\t\tmeta?.kind === \"collection_snapshot_prep\"\n\t);\n}\n\nfunction assertCheckpointQuiescentStatus(status: string, id: string, op: string): void {\n\tif (status === \"pending\" || status === \"dirty\") {\n\t\tthrow new Error(\n\t\t\t`${op}: node '${id}' has non-quiescent status '${status}' that cannot be checkpoint-restored yet`,\n\t\t);\n\t}\n}\n\nfunction topologyPathMatches(eventPath: string, path: string): boolean {\n\treturn eventPath === path || eventPath.startsWith(`${path}::`);\n}\n\nfunction prefixTopologyPath(prefix: string, path: string): string {\n\treturn `${prefix}::${path}`;\n}\n\nfunction cloneTopologyEvent(event: TopologyEvent): TopologyEvent {\n\tconst deps = Object.freeze([...event.deps]);\n\tconst prevDeps = event.prevDeps === undefined ? undefined : Object.freeze([...event.prevDeps]);\n\treturn Object.freeze({\n\t\tkind: event.kind,\n\t\tpath: event.path,\n\t\tdeps,\n\t\t...(prevDeps !== undefined ? { prevDeps } : {}),\n\t\t...(event.factory !== undefined ? { factory: event.factory } : {}),\n\t\tseq: event.seq,\n\t});\n}\n\nfunction checkpointFactory(\n\tname: string,\n\tnode: Node<unknown>,\n\tunregistered: boolean,\n\trestore?: { ref: string; config?: unknown; configVersion?: unknown },\n\tmeta?: Record<string, unknown>,\n): GraphCheckpointFactory {\n\tconst state = checkpointStateOfNode(node);\n\tif (unregistered) {\n\t\treturn {\n\t\t\tkind: \"local-only\",\n\t\t\tname,\n\t\t\treason: \"node is an unregistered live dependency auto-discovered from topology\",\n\t\t};\n\t}\n\tif (\n\t\trestore === undefined &&\n\t\ttypeof meta?.kind === \"string\" &&\n\t\tmeta.kind.startsWith(\"collection_\")\n\t) {\n\t\treturn {\n\t\t\tkind: \"local-only\",\n\t\t\tname,\n\t\t\treason: \"collection helper node has no backend checkpoint restore metadata\",\n\t\t};\n\t}\n\tif (restore !== undefined) {\n\t\tconst out: GraphCheckpointFactory = {\n\t\t\tkind: \"registry-ref\",\n\t\t\tref: toCheckpointJson(restore.ref, `${name}.factory.ref`) as string,\n\t\t};\n\t\tif (restore.config !== undefined)\n\t\t\tout.config = toCheckpointJson(restore.config, `${name}.factory.config`);\n\t\tif (restore.configVersion !== undefined)\n\t\t\tout.configVersion = toCheckpointJson(restore.configVersion, `${name}.factory.configVersion`);\n\t\treturn out;\n\t}\n\tif (state.handle !== null) {\n\t\treturn {\n\t\t\tkind: \"local-only\",\n\t\t\tname,\n\t\t\treason: \"node uses a function body; first-cut checkpoints do not serialize local functions\",\n\t\t};\n\t}\n\treturn { kind: \"registry-ref\", ref: name };\n}\n\n/** Filter a snapshot to the causal chain from→to (forward-reachable(from) ∩ back-reachable(to)). */\nfunction explainSubset(\n\tsnap: DescribeSnapshot,\n\tchain: { from: string; to: string },\n): DescribeSnapshot {\n\tconst fwd = new Map<string, string[]>();\n\tconst rev = new Map<string, string[]>();\n\tconst push = (map: Map<string, string[]>, k: string, v: string): void => {\n\t\tconst a = map.get(k);\n\t\tif (a) a.push(v);\n\t\telse map.set(k, [v]);\n\t};\n\tfor (const e of snap.edges) {\n\t\tpush(fwd, e.from, e.to);\n\t\tpush(rev, e.to, e.from);\n\t}\n\tconst reach = (start: string, adj: Map<string, string[]>): Set<string> => {\n\t\tconst seen = new Set<string>([start]);\n\t\tconst stack = [start];\n\t\twhile (stack.length > 0) {\n\t\t\tconst cur = stack.pop() as string;\n\t\t\tfor (const nxt of adj.get(cur) ?? []) {\n\t\t\t\tif (!seen.has(nxt)) {\n\t\t\t\t\tseen.add(nxt);\n\t\t\t\t\tstack.push(nxt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn seen;\n\t};\n\tconst onPath = new Set([...reach(chain.from, fwd)].filter((id) => reach(chain.to, rev).has(id)));\n\treturn {\n\t\t...(snap.name !== undefined ? { name: snap.name } : {}),\n\t\tnodes: snap.nodes.filter((n) => onPath.has(n.id)),\n\t\tedges: snap.edges.filter((e) => onPath.has(e.from) && onPath.has(e.to)),\n\t};\n}\n\n/** Construct a Graph (default global dispatcher; L4-Q4). */\nexport function graph(opts: GraphOptions = {}): Graph {\n\treturn new Graph(opts);\n}\n\n/** @internal D122 graph-owned ephemeral node-group release. */\nexport function releaseGraphNodes(\n\tgraph: Graph,\n\tnodes: readonly Node<unknown>[],\n\topts: { reason?: string } = {},\n): void {\n\tconst registrar = lifecycleRegistrars.get(graph);\n\tif (registrar === undefined) throw new Error(\"graph: unknown lifecycle registrar\");\n\tregistrar.releaseNodes(nodes, opts);\n}\n\n/** @internal D94 descriptor path: register a restored state node without widening Graph. */\nexport function restoreStateNodeInGraph<T = unknown>(\n\tgraph: Graph,\n\tid: string,\n\topts: SugarOpts<T> = {},\n): StateNode<T> {\n\tconst registrar = restoreRegistrars.get(graph);\n\tif (registrar === undefined) throw new Error(\"restoreGraph: unknown graph restore registrar\");\n\treturn registrar.stateNode(id, opts);\n}\n\n/** @internal D94 descriptor path: register a restored ctx-level node without widening Graph. */\nexport function restoreNodeInGraph<T = unknown>(\n\tgraph: Graph,\n\tid: string,\n\tfactory: string,\n\tdeps: readonly Node<unknown>[],\n\tfn: NodeFn | null,\n\topts: SugarOpts<T> = {},\n): Node<T> {\n\tconst registrar = restoreRegistrars.get(graph);\n\tif (registrar === undefined) throw new Error(\"restoreGraph: unknown graph restore registrar\");\n\treturn registrar.node(id, factory, deps, fn, opts);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBO,IAAM,0BAA0B;AAkEhC,SAAS,sBACf,MACA,QAAQ,QACR,OAAO,cACwC;AAC/C,MAAI;AACH,WAAO,uBAAuB,MAAM,KAAK;AAAA,EAC1C,SAAS,O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AACA,WAAO;AAAA,EACR;AACA,QAAM,SAAS,IAAI,IAAI,CAAC,GAAG,MAAM,MAAM,MAAM,GAAG,CAAC,EAAE,OAAO,CAAC,OAAO,MAAM,MAAM,IAAI,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;AAC/F,SAAO;AAAA,IACN,GAAI,KAAK,SAAS,SAAY,EAAE,MAAM,KAAK,KAAK,IAAI,CAAC;AAAA,IACrD,OAAO,KAAK,MAAM,OAAO,CAAC,MAAM,OAAO,IAAI,EAAE,EAAE,CAAC;AAAA,IAChD,OAAO,KAAK,MAAM,OAAO,CAAC,MAAM,OAAO,IAAI,EAAE,IAAI,KAAK,OAAO,IAAI,EAAE,EAAE,CAAC;AAAA,EACvE;AACD;AAGO,SAAS,MAAM,OAAqB,CAAC,GAAU;AACrD,SAAO,IAAI,MAAM,IAAI;AACtB;AAcO,SAAS,wBACfC,QACA,IACA,OAAqB,CAAC,GACP;AACf,QAAM,YAAY,kBAAkB,IAAIA,MAAK;AAC7C,MAAI,cAAc,OAAW,OAAM,IAAI,MAAM,+CAA+C;AAC5F,SAAO,UAAU,UAAU,IAAI,IAAI;AACpC;AAGO,SAAS,mBACfA,QACA,IACA,SACA,MACA,IACA,OAAqB,CAAC,GACZ;AACV,QAAM,YAAY,kBAAkB,IAAIA,MAAK;AAC7C,MAAI,cAAc,OAAW,OAAM,IAAI,MAAM,+CAA+C;AAC5F,SAAO,UAAU,KAAK,IAAI,SAAS,MAAM,IAAI,IAAI;AAClD;","names":["out","value","out","graph","graph"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/json/codec.ts"],"sourcesContent":["/**\n * Neutral JSON/encoding utilities (D96).\n *\n * Shared by graph checkpoints and storage bindings; neither layer owns the strict JSON\n * scanner/canonicalization contract.\n */\n\n/** Typed byte codec for D82 storage binding helpers and D96 shared JSON surfaces. */\nexport interface Codec<T> {\n\tencode(value: T): Uint8Array;\n\tdecode(bytes: Uint8Array): T;\n}\n\nexport type StrictJsonScalar = null | boolean | number | string;\nexport type StrictJsonValue =\n\t| StrictJsonScalar\n\t| readonly StrictJsonValue[]\n\t| { readonly [key: string]: StrictJsonValue };\nexport type StrictJsonObject = Readonly<Record<string, StrictJsonValue>>;\n\ntype JsonValue = StrictJsonValue;\n\nconst JS_MIN_NORMAL_NUMBER = 2 ** -1022;\n\nfunction assertStableJsonNumber(value: number, path: string): void {\n\tif (!Number.isFinite(value)) {\n\t\tthrow new TypeError(`stableJsonString: non-finite number at ${path}`);\n\t}\n}\n\nfunction assertStrictJsonNumber(value: number, path: string): void {\n\tassertStableJsonNumber(value, path);\n\tif (Object.is(value, -0)) {\n\t\tthrow new TypeError(`stableJsonString: non-canonical number at ${path}`);\n\t}\n\tconst abs = Math.abs(value);\n\tif (abs > 0 && abs < JS_MIN_NORMAL_NUMBER) {\n\t\tthrow new TypeError(`stableJsonString: subnormal number at ${path}`);\n\t}\n\tif (Number.isInteger(value) && !Number.isSafeInteger(value)) {\n\t\tthrow new TypeError(`stableJsonString: integer outside safe range at ${path}`);\n\t}\n}\n\nfunction sortedJsonValue(\n\tvalue: unknown,\n\tseen = new Set<object>(),\n\tpath = \"$\",\n\tstrictNumbers = false,\n): JsonValue {\n\tif (value === null) return null;\n\tif (typeof value === \"string\" || typeof value === \"boolean\") return value;\n\tif (typeof value === \"number\") {\n\t\tif (strictNumbers) assertStrictJsonNumber(value, path);\n\t\telse assertStableJsonNumber(value, path);\n\t\treturn value;\n\t}\n\tif (typeof value !== \"object\") {\n\t\tthrow new TypeError(`stableJsonString: value at ${path} is not JSON-encodable`);\n\t}\n\tif (seen.has(value)) throw new TypeError(`stableJsonString: circular reference at ${path}`);\n\tconst proto = Object.getPrototypeOf(value);\n\tif (!Array.isArray(value) && proto !== Object.prototype && proto !== null) {\n\t\tthrow new TypeError(`stableJsonString: non-plain object at ${path}`);\n\t}\n\tseen.add(value);\n\ttry {\n\t\tif (Array.isArray(value)) {\n\t\t\tif (Object.getOwnPropertySymbols(value).length > 0) {\n\t\t\t\tthrow new TypeError(`stableJsonString: symbol-keyed properties at ${path}`);\n\t\t\t}\n\t\t\tfor (const key of Object.getOwnPropertyNames(value)) {\n\t\t\t\tconst isIndex =\n\t\t\t\t\t/^(0|[1-9]\\d*)$/.test(key) &&\n\t\t\t\t\tNumber.isSafeInteger(Number(key)) &&\n\t\t\t\t\tNumber(key) < value.length;\n\t\t\t\tif (key !== \"length\" && !isIndex) {\n\t\t\t\t\tthrow new TypeError(`stableJsonString: non-index array property at ${path}.${key}`);\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst out: JsonValue[] = [];\n\t\t\tfor (let i = 0; i < value.length; i += 1) {\n\t\t\t\tif (!(i in value)) {\n\t\t\t\t\tthrow new TypeError(`stableJsonString: sparse array hole at ${path}[${i}]`);\n\t\t\t\t}\n\t\t\t\tout.push(sortedJsonValue(value[i], seen, `${path}[${i}]`, strictNumbers));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\tif (Object.getOwnPropertySymbols(value).length > 0) {\n\t\t\tthrow new TypeError(`stableJsonString: symbol-keyed properties at ${path}`);\n\t\t}\n\t\tconst out: Record<string, JsonValue> = Object.create(null);\n\t\tfor (const key of Object.keys(value as Record<string, unknown>).sort()) {\n\t\t\tout[key] = sortedJsonValue(\n\t\t\t\t(value as Record<string, unknown>)[key],\n\t\t\t\tseen,\n\t\t\t\t`${path}.${key}`,\n\t\t\t\tstrictNumbers,\n\t\t\t);\n\t\t}\n\t\treturn out;\n\t} finally {\n\t\tseen.delete(value);\n\t}\n}\n\n/** Stable JSON string: object keys sort by code-unit order for deterministic storage/checkpoint bytes. */\nexport function stableJsonString(value: unknown): string {\n\treturn JSON.stringify(sortedJsonValue(value));\n}\n\nfunction strictStableJsonString(value: unknown): string {\n\treturn JSON.stringify(sortedJsonValue(value, new Set<object>(), \"$\", true));\n}\n\n/** Build a JSON codec using stable object-key ordering. */\nexport function jsonCodecFor<T>(): Codec<T> {\n\tconst encoder = new TextEncoder();\n\tconst decoder = new TextDecoder();\n\treturn {\n\t\tencode(value: T): Uint8Array {\n\t\t\treturn encoder.encode(stableJsonString(value));\n\t\t},\n\t\tdecode(bytes: Uint8Array): T {\n\t\t\treturn JSON.parse(decoder.decode(bytes)) as T;\n\t\t},\n\t};\n}\n\n/** Default stable JSON codec for unknown values. */\nexport const jsonCodec: Codec<unknown> = jsonCodecFor<unknown>();\n\nfunction bytesEqual(a: Uint8Array, b: Uint8Array): boolean {\n\tif (a.byteLength !== b.byteLength) return false;\n\tfor (let i = 0; i < a.byteLength; i += 1) {\n\t\tif (a[i] !== b[i]) return false;\n\t}\n\treturn true;\n}\n\nfunction hasUnpairedSurrogate(value: string): boolean {\n\tfor (let i = 0; i < value.length; i += 1) {\n\t\tconst code = value.charCodeAt(i);\n\t\tif (code >= 0xd800 && code <= 0xdbff) {\n\t\t\tconst next = value.charCodeAt(i + 1);\n\t\t\tif (next >= 0xdc00 && next <= 0xdfff) {\n\t\t\t\ti += 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\tif (code >= 0xdc00 && code <= 0xdfff) return true;\n\t}\n\treturn false;\n}\n\nfunction assertNoUnpairedSurrogates(value: unknown, seen = new Set<object>(), path = \"$\"): void {\n\tif (typeof value === \"string\") {\n\t\tif (hasUnpairedSurrogate(value)) {\n\t\t\tthrow new TypeError(`strictJsonCodec: unpaired surrogate at ${path}`);\n\t\t}\n\t\treturn;\n\t}\n\tif (value === null || typeof value !== \"object\") return;\n\tif (seen.has(value)) return;\n\tseen.add(value);\n\ttry {\n\t\tif (Array.isArray(value)) {\n\t\t\tfor (let i = 0; i < value.length; i += 1) {\n\t\t\t\tassertNoUnpairedSurrogates(value[i], seen, `${path}[${i}]`);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tfor (const key of Object.keys(value as Record<string, unknown>)) {\n\t\t\tif (hasUnpairedSurrogate(key)) {\n\t\t\t\tthrow new TypeError(`strictJsonCodec: unpaired surrogate at ${path}.${key}`);\n\t\t\t}\n\t\t\tassertNoUnpairedSurrogates((value as Record<string, unknown>)[key], seen, `${path}.${key}`);\n\t\t}\n\t} finally {\n\t\tseen.delete(value);\n\t}\n}\n\nfunction assertNoDuplicateJsonObjectKeys(text: string): void {\n\tlet index = 0;\n\n\tfunction fail(message: string): never {\n\t\tthrow new TypeError(`strictJsonCodec: ${message}`);\n\t}\n\n\tfunction skipWhitespace(): void {\n\t\twhile (/\\s/.test(text[index] ?? \"\")) index += 1;\n\t}\n\n\tfunction readJsonString(): string {\n\t\tconst start = index;\n\t\tindex += 1;\n\t\twhile (index < text.length) {\n\t\t\tconst ch = text[index];\n\t\t\tif (ch === '\"') {\n\t\t\t\tindex += 1;\n\t\t\t\ttry {\n\t\t\t\t\treturn JSON.parse(text.slice(start, index)) as string;\n\t\t\t\t} catch {\n\t\t\t\t\tfail(\"malformed JSON string\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (ch === \"\\\\\") {\n\t\t\t\tindex += 2;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tindex += 1;\n\t\t}\n\t\tfail(\"unterminated JSON string\");\n\t}\n\n\tfunction consumeLiteral(literal: string): void {\n\t\tif (text.slice(index, index + literal.length) !== literal) {\n\t\t\tfail(`malformed JSON near byte ${index}`);\n\t\t}\n\t\tindex += literal.length;\n\t}\n\n\tfunction consumeNumber(): void {\n\t\tconst match = /^-?(0|[1-9]\\d*)(\\.\\d+)?([eE][+-]?\\d+)?/.exec(text.slice(index));\n\t\tif (!match) fail(`malformed JSON number near byte ${index}`);\n\t\tindex += match[0].length;\n\t}\n\n\tfunction parseValue(path: string): void {\n\t\tskipWhitespace();\n\t\tconst ch = text[index];\n\t\tif (ch === \"{\") {\n\t\t\tparseObject(path);\n\t\t\treturn;\n\t\t}\n\t\tif (ch === \"[\") {\n\t\t\tparseArray(path);\n\t\t\treturn;\n\t\t}\n\t\tif (ch === '\"') {\n\t\t\treadJsonString();\n\t\t\treturn;\n\t\t}\n\t\tif (ch === \"t\") {\n\t\t\tconsumeLiteral(\"true\");\n\t\t\treturn;\n\t\t}\n\t\tif (ch === \"f\") {\n\t\t\tconsumeLiteral(\"false\");\n\t\t\treturn;\n\t\t}\n\t\tif (ch === \"n\") {\n\t\t\tconsumeLiteral(\"null\");\n\t\t\treturn;\n\t\t}\n\t\tif (ch === \"-\" || (ch !== undefined && ch >= \"0\" && ch <= \"9\")) {\n\t\t\tconsumeNumber();\n\t\t\treturn;\n\t\t}\n\t\tfail(`malformed JSON near byte ${index}`);\n\t}\n\n\tfunction parseObject(path: string): void {\n\t\tconst keys = new Set<string>();\n\t\tindex += 1;\n\t\tskipWhitespace();\n\t\tif (text[index] === \"}\") {\n\t\t\tindex += 1;\n\t\t\treturn;\n\t\t}\n\t\twhile (index < text.length) {\n\t\t\tskipWhitespace();\n\t\t\tif (text[index] !== '\"') fail(`expected object key near byte ${index}`);\n\t\t\tconst key = readJsonString();\n\t\t\tif (keys.has(key)) {\n\t\t\t\tthrow new TypeError(\n\t\t\t\t\t`strictJsonCodec: duplicate object key ${JSON.stringify(key)} at ${path}`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tkeys.add(key);\n\t\t\tskipWhitespace();\n\t\t\tif (text[index] !== \":\") fail(`expected ':' after object key near byte ${index}`);\n\t\t\tindex += 1;\n\t\t\tparseValue(`${path}.${key}`);\n\t\t\tskipWhitespace();\n\t\t\tif (text[index] === \",\") {\n\t\t\t\tindex += 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (text[index] === \"}\") {\n\t\t\t\tindex += 1;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfail(`expected ',' or '}' near byte ${index}`);\n\t\t}\n\t\tfail(\"unterminated JSON object\");\n\t}\n\n\tfunction parseArray(path: string): void {\n\t\tindex += 1;\n\t\tskipWhitespace();\n\t\tif (text[index] === \"]\") {\n\t\t\tindex += 1;\n\t\t\treturn;\n\t\t}\n\t\tlet item = 0;\n\t\twhile (index < text.length) {\n\t\t\tparseValue(`${path}[${item}]`);\n\t\t\titem += 1;\n\t\t\tskipWhitespace();\n\t\t\tif (text[index] === \",\") {\n\t\t\t\tindex += 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (text[index] === \"]\") {\n\t\t\t\tindex += 1;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfail(`expected ',' or ']' near byte ${index}`);\n\t\t}\n\t\tfail(\"unterminated JSON array\");\n\t}\n\n\tparseValue(\"$\");\n\tskipWhitespace();\n\tif (index !== text.length) fail(`trailing JSON token near byte ${index}`);\n}\n\n/**\n * Build a strict canonical JSON codec (D84/D87/D96).\n * The strict surface rejects malformed UTF-8, duplicate object keys, non-canonical bytes,\n * unpaired surrogates, and values that cannot round-trip through stable JSON.\n */\nexport function strictJsonCodecFor<T>(): Codec<T> {\n\tconst encoder = new TextEncoder();\n\tconst decoder = new TextDecoder(\"utf-8\", { fatal: true });\n\treturn {\n\t\tencode(value: T): Uint8Array {\n\t\t\tassertNoUnpairedSurrogates(value);\n\t\t\treturn encoder.encode(strictStableJsonString(value));\n\t\t},\n\t\tdecode(bytes: Uint8Array): T {\n\t\t\tconst text = decoder.decode(bytes);\n\t\t\tassertNoDuplicateJsonObjectKeys(text);\n\t\t\tconst decoded = JSON.parse(text) as unknown;\n\t\t\tassertNoUnpairedSurrogates(decoded);\n\t\t\tconst canonical = encoder.encode(strictStableJsonString(decoded));\n\t\t\tif (!bytesEqual(bytes, canonical)) {\n\t\t\t\tthrow new TypeError(\"strictJsonCodec: bytes are not canonical stable JSON\");\n\t\t\t}\n\t\t\treturn decoded as T;\n\t\t},\n\t};\n}\n\n/** Default strict canonical JSON codec for unknown values. */\nexport const strictJsonCodec: Codec<unknown> = strictJsonCodecFor<unknown>();\n\n/** D113 neutral helper for strict canonical JSON UTF-8 bytes. */\nexport function strictCanonicalJsonBytes(value: unknown): Uint8Array {\n\treturn strictJsonCodec.encode(value);\n}\n\n/** Validate and normalize a host value into strict canonical JSON data. */\nexport function assertStrictJsonValue(value: unknown, label = \"strictJsonValue\"): StrictJsonValue {\n\ttry {\n\t\treturn strictJsonCodec.decode(strictJsonCodec.encode(value)) as StrictJsonValue;\n\t} catch (cause) {\n\t\tconst message = cause instanceof Error ? cause.message : String(cause);\n\t\tthrow new TypeError(`${label}: value is not strict JSON compatible: ${message}`, { cause });\n\t}\n}\n\n/** Validate and normalize a host value into a strict canonical JSON object. */\nexport function assertStrictJsonObject(\n\tvalue: unknown,\n\tlabel = \"strictJsonObject\",\n): StrictJsonObject {\n\tconst normalized = assertStrictJsonValue(value, label);\n\tif (normalized === null || typeof normalized !== \"object\" || Array.isArray(normalized)) {\n\t\tthrow new TypeError(`${label}: value must be a strict JSON object`);\n\t}\n\treturn normalized as StrictJsonObject;\n}\n"],"mappings":";AAsBA,IAAM,uBAAuB,KAAK;AAElC,SAAS,uBAAuB,OAAe,MAAoB;AAClE,MAAI,CAAC,OAAO,SAAS,KAAK,GAAG;AAC5B,UAAM,IAAI,UAAU,0CAA0C,IAAI,EAAE;AAAA,EACrE;AACD;AAEA,SAAS,uBAAuB,OAAe,MAAoB;AAClE,yBAAuB,OAAO,IAAI;AAClC,MAAI,OAAO,GAAG,OAAO,EAAE,GAAG;AACzB,UAAM,IAAI,UAAU,6CAA6C,IAAI,EAAE;AAAA,EACxE;AACA,QAAM,MAAM,KAAK,IAAI,KAAK;AAC1B,MAAI,MAAM,KAAK,MAAM,sBAAsB;AAC1C,UAAM,IAAI,UAAU,yCAAyC,IAAI,EAAE;AAAA,EACpE;AACA,MAAI,OAAO,UAAU,KAAK,KAAK,CAAC,OAAO,cAAc,KAAK,GAAG;AAC5D,UAAM,IAAI,UAAU,mDAAmD,IAAI,EAAE;AAAA,EAC9E;AACD;AAEA,SAAS,gBACR,OACA,OAAO,oBAAI,IAAY,GACvB,OAAO,KACP,gBAAgB,OACJ;AACZ,MAAI,UAAU,KAAM,QAAO;AAC3B,MAAI,OAAO,UAAU,YAAY,OAAO,UAAU,UAAW,QAA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