@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/adapters/nestjs/native.ts","../../../src/graph/sources.ts","../../../src/adapters/nestjs.ts"],"sourcesContent":["/**\n * Nest-native provider bridge for GraphReFly boundary metadata (D484).\n *\n * This focused subpath is allowed to import Nest/RxJS. The dependency-light\n * `@graphrefly/ts/adapters/nestjs` structural layer stays Nest-free.\n */\n\nimport type {\n\tArgumentsHost,\n\tCallHandler,\n\tCanActivate,\n\tExceptionFilter,\n\tExecutionContext,\n\tOnModuleDestroy,\n\tOnModuleInit,\n\tProvider,\n} from \"@nestjs/common\";\nimport { Catch, HttpException, type NestInterceptor } from \"@nestjs/common\";\nimport { APP_GUARD, APP_INTERCEPTOR } from \"@nestjs/core\";\nimport { from, type Observable } from \"rxjs\";\nimport {\n\ttype CronSchedule,\n\ttype FromCronOptions,\n\tmatchesCron,\n\tparseCron,\n} from \"../../graph/sources.js\";\nimport {\n\tbindingEmitOptions,\n\tbindingRequestId,\n\tcreateNestGraphBoundaryRunner,\n\ttype DecoratorBoundMethod,\n\ttype DecoratorHostConstructor,\n\ttype GraphGuardDecision,\n\tgetNestBoundaryBindings,\n\tisDataIssue,\n\tlowerHttpReplyPayload,\n\tlowerProtocolError,\n\ttype NestBoundaryBindingMeta,\n\ttype NestDiagnosticIngressBoundary,\n\ttype NestGraphRunOptions,\n\ttype NestHttpReplyBindingMeta,\n\ttype NestHttpResponsePayload,\n\ttype NestIngressBindingMeta,\n\ttype NestIssueResponse,\n\ttype NestProtocolErrorResponse,\n\tprotocolError,\n\tresolveNestMethodKey,\n\ttoNestHttp,\n} from \"../nestjs.js\";\n\nexport const GRAPHREFLY_NEST_CRON_SCHEDULER = Symbol.for(\"graphrefly:nest:cron-scheduler\");\nexport const GRAPHREFLY_NEST_EXCEPTION_FILTER = Symbol.for(\"graphrefly:nest:exception-filter\");\nexport const GRAPHREFLY_NEST_LIFECYCLE_HOOKS = Symbol.for(\"graphrefly:nest:lifecycle-hooks\");\n\nexport interface GraphNativeHostOptions<THost = unknown> extends NestGraphRunOptions<THost> {\n\treadonly host?: (context: ExecutionContext) => THost;\n\treadonly diagnosticBoundary?: NestDiagnosticIngressBoundary;\n}\n\nexport interface GraphNativeHttpOptions<THost = unknown> extends GraphNativeHostOptions<THost> {\n\treadonly issueResponse?: NestIssueResponse<THost>;\n\treadonly protocolError?: NestProtocolErrorResponse<THost>;\n}\n\nexport interface GraphExceptionFilterTarget {\n\treadonly target: DecoratorHostConstructor | object;\n\treadonly methodKey: string | symbol;\n}\n\nexport interface GraphExceptionFilterProviderOptions<THost = unknown> {\n\treadonly host?: (host: ArgumentsHost, exception: unknown) => THost;\n\treadonly target: (\n\t\thost: ArgumentsHost,\n\t\texception: unknown,\n\t) => GraphExceptionFilterTarget | undefined;\n\treadonly diagnosticBoundary?: NestDiagnosticIngressBoundary;\n\treadonly requestId?: string | ((host: THost) => string | undefined);\n\treadonly issueResponse?: NestIssueResponse<THost>;\n\treadonly protocolError?: NestProtocolErrorResponse<THost>;\n}\n\nexport interface GraphCronProviderTarget<THost = unknown> {\n\treadonly target: DecoratorHostConstructor | object;\n\treadonly methodKey?: string | symbol;\n\treadonly expr: string;\n\treadonly tickMs?: number;\n\treadonly timezone?: string;\n\treadonly dst?: FromCronOptions[\"dst\"];\n\treadonly host?: (date: Date) => THost;\n}\n\nexport interface GraphCronSchedulerProviderOptions {\n\treadonly targets: readonly GraphCronProviderTarget[];\n}\n\nexport interface GraphCronController {\n\tcheck(now: Date): void;\n}\n\nexport interface GraphCronControllerOptions {\n\treadonly targets: readonly GraphCronProviderTarget[];\n}\n\nexport interface GraphLifecycleProviderTarget<THost = unknown> {\n\treadonly target: DecoratorHostConstructor | object;\n\treadonly methodKey?: string | symbol;\n\treadonly event?: \"module-init\" | \"module-destroy\";\n\treadonly host?: (event: \"module-init\" | \"module-destroy\") => THost;\n}\n\nexport interface GraphLifecycleHooksProviderOptions {\n\treadonly targets: readonly GraphLifecycleProviderTarget[];\n}\n\nexport interface GraphNativeHttpProviderBundleOptions<THost = unknown> {\n\treadonly boundaryInterceptor?: GraphNativeHttpOptions<THost> | false;\n\treadonly guard?: GraphNativeHttpOptions<THost> | false;\n\treadonly guardDeniedFilter?: boolean;\n\treadonly exceptionFilter?: GraphExceptionFilterProviderOptions<THost>;\n}\n\nexport interface GraphNativeProviderBundleOptions<THost = unknown> {\n\treadonly http?: GraphNativeHttpProviderBundleOptions<THost> | false;\n\treadonly cronScheduler?: GraphCronSchedulerProviderOptions;\n\treadonly lifecycleHooks?: GraphLifecycleHooksProviderOptions;\n}\n\nexport function provideGraphBoundaryInterceptor<THost = unknown>(\n\topts: GraphNativeHttpOptions<THost> = {},\n): Provider {\n\treturn { provide: APP_INTERCEPTOR, useValue: new GraphBoundaryInterceptorBridge(opts) };\n}\n\nexport function provideGraphGuard<THost = unknown>(\n\topts: GraphNativeHttpOptions<THost> = {},\n): Provider {\n\treturn { provide: APP_GUARD, useValue: new GraphGuardBridge(opts) };\n}\n\nexport function provideGraphExceptionFilter<THost = unknown>(\n\topts: GraphExceptionFilterProviderOptions<THost>,\n): Provider {\n\treturn { provide: GRAPHREFLY_NEST_EXCEPTION_FILTER, useValue: createGraphExceptionFilter(opts) };\n}\n\nexport function createGraphExceptionFilter<THost = unknown>(\n\topts: GraphExceptionFilterProviderOptions<THost>,\n): ExceptionFilter & OnModuleDestroy {\n\treturn new GraphExceptionFilterBridge(opts);\n}\n\nexport function provideGraphGuardDeniedFilter(): Provider {\n\treturn GraphGuardDeniedFilter;\n}\n\nexport function createGraphGuardDeniedFilter(): ExceptionFilter {\n\treturn new GraphGuardDeniedFilter();\n}\n\nexport function provideGraphCronScheduler(opts: GraphCronSchedulerProviderOptions): Provider {\n\treturn { provide: GRAPHREFLY_NEST_CRON_SCHEDULER, useValue: new GraphCronSchedulerBridge(opts) };\n}\n\nexport function provideGraphLifecycleHooks(opts: GraphLifecycleHooksProviderOptions): Provider {\n\treturn {\n\t\tprovide: GRAPHREFLY_NEST_LIFECYCLE_HOOKS,\n\t\tuseValue: new GraphLifecycleHooksBridge(opts),\n\t};\n}\n\nexport function provideGraphNativeHttpProviders<THost = unknown>(\n\topts: GraphNativeHttpProviderBundleOptions<THost> = {},\n): Provider[] {\n\tconst providers: Provider[] = [];\n\tif (opts.boundaryInterceptor !== false)\n\t\tproviders.push(provideGraphBoundaryInterceptor(opts.boundaryInterceptor ?? {}));\n\tif (opts.guard !== false) providers.push(provideGraphGuard(opts.guard ?? {}));\n\tif (opts.guardDeniedFilter ?? true) providers.push(provideGraphGuardDeniedFilter());\n\tif (opts.exceptionFilter !== undefined)\n\t\tproviders.push(provideGraphExceptionFilter(opts.exceptionFilter));\n\treturn providers;\n}\n\nexport function provideGraphNativeProviders<THost = unknown>(\n\topts: GraphNativeProviderBundleOptions<THost> = {},\n): Provider[] {\n\tconst providers: Provider[] = [];\n\tif (opts.http !== false) providers.push(...provideGraphNativeHttpProviders(opts.http ?? {}));\n\tif (opts.cronScheduler !== undefined)\n\t\tproviders.push(provideGraphCronScheduler(opts.cronScheduler));\n\tif (opts.lifecycleHooks !== undefined)\n\t\tproviders.push(provideGraphLifecycleHooks(opts.lifecycleHooks));\n\treturn providers;\n}\n\nexport function graphCronTarget<THost = unknown>(\n\ttarget: DecoratorHostConstructor | object,\n\tmethodKey: string | symbol,\n\topts: Omit<GraphCronProviderTarget<THost>, \"target\" | \"methodKey\">,\n): GraphCronProviderTarget<THost> {\n\treturn { ...opts, target, methodKey };\n}\n\nexport function graphLifecycleTarget<THost = unknown>(\n\ttarget: DecoratorHostConstructor | object,\n\tmethodKey: string | symbol,\n\topts: Omit<GraphLifecycleProviderTarget<THost>, \"target\" | \"methodKey\"> = {},\n): GraphLifecycleProviderTarget<THost> {\n\treturn { ...opts, target, methodKey };\n}\n\nexport function createGraphCronController(opts: GraphCronControllerOptions): GraphCronController {\n\treturn new GraphCronControllerImpl(opts);\n}\n\nclass GraphBoundaryInterceptorBridge<THost> implements NestInterceptor, OnModuleDestroy {\n\tprivate readonly runner: ReturnType<typeof createNestGraphBoundaryRunner>;\n\n\tconstructor(private readonly opts: GraphNativeHttpOptions<THost>) {\n\t\tthis.runner = createNestGraphBoundaryRunner({\n\t\t\tdiagnosticBoundary: opts.diagnosticBoundary,\n\t\t\tdiagnosticPhase: \"http\",\n\t\t});\n\t}\n\n\tintercept(context: ExecutionContext, next: CallHandler): Observable<unknown> {\n\t\tconst host = this.opts.host?.(context) ?? (defaultHttpHost(context) as THost);\n\t\tconst result = this.runner.run(\n\t\t\tcontext.getClass(),\n\t\t\tmethodKeyForContext(context),\n\t\t\thost,\n\t\t\tthis.opts,\n\t\t);\n\t\tconst reply = firstHttpReply(context);\n\t\tconst value =\n\t\t\tresult === undefined\n\t\t\t\t? next.handle()\n\t\t\t\t: Promise.resolve(result).then(\n\t\t\t\t\t\t(payload) =>\n\t\t\t\t\t\t\twriteHttpResponse(\n\t\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\t\tlowerHttpReplyPayload(payload, host, {\n\t\t\t\t\t\t\t\t\tissueResponse: reply?.issueResponse ?? this.opts.issueResponse,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t(errorPayload) =>\n\t\t\t\t\t\t\twriteHttpResponse(\n\t\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\t\tlowerProtocolError(errorPayload, host, {\n\t\t\t\t\t\t\t\t\tprotocolError: reply?.protocolError ?? this.opts.protocolError,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\treturn isObservableLike(value) ? value : from(Promise.resolve(value));\n\t}\n\n\tonModuleDestroy(): void {\n\t\tthis.runner.dispose();\n\t}\n}\n\nclass GraphGuardBridge<THost> implements CanActivate, OnModuleDestroy {\n\tprivate readonly decisions = new WeakMap<\n\t\tobject,\n\t\tMap<string, ReturnType<typeof toNestHttp<GraphGuardDecision>>>\n\t>();\n\tprivate readonly disposableDecisions = new Set<\n\t\tReturnType<typeof toNestHttp<GraphGuardDecision>>\n\t>();\n\n\tconstructor(private readonly opts: GraphNativeHttpOptions<THost>) {}\n\n\tasync canActivate(context: ExecutionContext): Promise<boolean> {\n\t\tconst methodKey = methodKeyForContext(context);\n\t\tconst bindings = getNestBoundaryBindings(context.getClass(), methodKey);\n\t\tconst guards = bindings.filter(isGuardIngress);\n\t\tif (guards.length === 0) return true;\n\t\tconst decisions = bindings.filter(isGuardDecision);\n\t\tif (decisions.length === 0) return false;\n\t\tconst host = this.opts.host?.(context) ?? (defaultHttpHost(context) as THost);\n\t\tconst guardEmits = guards.map((guard) => ({\n\t\t\tguard,\n\t\t\trequestId: bindingRequestId(host, guard, this.opts.requestId),\n\t\t}));\n\t\tif (guardEmits.some((entry) => entry.requestId === undefined)) return false;\n\t\tconst requestIds = new Set(guardEmits.map((entry) => entry.requestId as string));\n\t\tconst cleanups: Array<() => boolean> = [];\n\t\ttry {\n\t\t\tconst pending: GuardDecisionState[] = [];\n\t\t\tfor (const requestId of requestIds) {\n\t\t\t\tfor (const decision of decisions) {\n\t\t\t\t\tconst state: GuardDecisionState = { status: \"pending\", binding: decision };\n\t\t\t\t\tpending.push(state);\n\t\t\t\t\tcleanups.push(\n\t\t\t\t\t\tthis.decisionBoundary(decision).attach({\n\t\t\t\t\t\t\trequestId,\n\t\t\t\t\t\t\tbindingId: decision.bindingId,\n\t\t\t\t\t\t\thandle: {\n\t\t\t\t\t\t\t\tresolve(payload) {\n\t\t\t\t\t\t\t\t\tstate.status = \"resolved\";\n\t\t\t\t\t\t\t\t\tstate.payload = payload;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\treject(error) {\n\t\t\t\t\t\t\t\t\tstate.status = \"rejected\";\n\t\t\t\t\t\t\t\t\tstate.error = error;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const entry of guardEmits)\n\t\t\t\tentry.guard.boundary.emit(host, bindingEmitOptions(host, entry.guard, entry.requestId));\n\t\t\tconst rejected = pending.find((state) => state.status === \"rejected\");\n\t\t\tif (rejected !== undefined) {\n\t\t\t\tthrow new GraphGuardProtocolErrorException(\n\t\t\t\t\tlowerProtocolError(rejected.error, host, {\n\t\t\t\t\t\tprotocolError: rejected.binding.protocolError ?? this.opts.protocolError,\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (pending.some((state) => state.status !== \"resolved\")) return false;\n\t\t\tconst denied = pending.find(\n\t\t\t\t(\n\t\t\t\t\tstate,\n\t\t\t\t): state is GuardDecisionState & {\n\t\t\t\t\treadonly status: \"resolved\";\n\t\t\t\t\treadonly payload: Extract<GraphGuardDecision, { readonly kind: \"deny\" }>;\n\t\t\t\t} => state.status === \"resolved\" && state.payload?.kind === \"deny\",\n\t\t\t);\n\t\t\tif (denied !== undefined) {\n\t\t\t\tthrow new GraphGuardDeniedException(\n\t\t\t\t\tguardDecisionResponse(denied.payload, host, {\n\t\t\t\t\t\tissueResponse: denied.binding.issueResponse ?? this.opts.issueResponse,\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn pending.every((state) => state.payload?.kind === \"allow\");\n\t\t} catch (error) {\n\t\t\tif (isGraphGuardDeniedException(error) || error instanceof GraphGuardProtocolErrorException) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\treturn false;\n\t\t} finally {\n\t\t\tfor (const cleanup of cleanups) cleanup();\n\t\t}\n\t}\n\n\tonModuleDestroy(): void {\n\t\tfor (const boundary of this.disposableDecisions) boundary.dispose();\n\t\tthis.disposableDecisions.clear();\n\t}\n\n\tprivate decisionBoundary(\n\t\tbinding: NestGuardDecisionBindingMeta,\n\t): ReturnType<typeof toNestHttp<GraphGuardDecision>> {\n\t\tconst node = binding.decisionNode as object;\n\t\tlet byBinding = this.decisions.get(node);\n\t\tif (byBinding === undefined) {\n\t\t\tbyBinding = new Map();\n\t\t\tthis.decisions.set(node, byBinding);\n\t\t}\n\t\tconst existing = byBinding.get(binding.bindingId);\n\t\tif (existing !== undefined) return existing;\n\t\tconst boundary = toNestHttp(binding.decisionNode, {\n\t\t\tbindingId: binding.bindingId,\n\t\t\tdiagnosticBoundary: this.opts.diagnosticBoundary,\n\t\t\tdiagnosticPhase: \"guard\",\n\t\t});\n\t\tbyBinding.set(binding.bindingId, boundary);\n\t\tthis.disposableDecisions.add(boundary);\n\t\treturn boundary;\n\t}\n}\n\nexport class GraphExceptionFilterBridge<THost> implements ExceptionFilter, OnModuleDestroy {\n\tprivate readonly replies = new WeakMap<\n\t\tobject,\n\t\tMap<string, ReturnType<typeof toNestHttp<NestHttpReplyPayloadUnknown>>>\n\t>();\n\tprivate readonly disposableReplies = new Set<\n\t\tReturnType<typeof toNestHttp<NestHttpReplyPayloadUnknown>>\n\t>();\n\n\tconstructor(private readonly opts: GraphExceptionFilterProviderOptions<THost>) {}\n\n\tcatch(exception: unknown, host: ArgumentsHost): unknown {\n\t\tconst target = this.opts.target(host, exception);\n\t\tif (target === undefined) throw exception;\n\t\tconst bindings = getNestBoundaryBindings(target.target, target.methodKey);\n\t\tconst filters = bindings.filter(isErrorIngress);\n\t\tif (filters.length === 0) throw exception;\n\t\tconst nativeHost =\n\t\t\tthis.opts.host?.(host, exception) ?? (defaultArgumentsHost(host, exception) as THost);\n\t\tconst filterEmits = filters.map((filter) => ({\n\t\t\tfilter,\n\t\t\trequestId: bindingRequestId(nativeHost, filter, this.opts.requestId),\n\t\t}));\n\t\tconst handleFilters = filterEmits.filter((entry) => entry.filter.mode !== \"observe\");\n\t\tconst observeOnly = handleFilters.length === 0;\n\t\tconst replies = bindings.filter(isHttpReply);\n\t\tconst cleanups: Array<() => boolean> = [];\n\t\tconst emitFilters = () => {\n\t\t\tfor (const entry of filterEmits) {\n\t\t\t\tentry.filter.boundary.emit(\n\t\t\t\t\tnativeHost,\n\t\t\t\t\tbindingEmitOptions(nativeHost, entry.filter, entry.requestId),\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t\tif (observeOnly) {\n\t\t\temitFilters();\n\t\t\tthrow exception;\n\t\t}\n\t\tconst requestIds = new Set(\n\t\t\thandleFilters\n\t\t\t\t.map((entry) => entry.requestId)\n\t\t\t\t.filter((requestId): requestId is string => requestId !== undefined),\n\t\t);\n\t\tif (replies.length === 0 || requestIds.size === 0) {\n\t\t\tfor (const entry of filterEmits) {\n\t\t\t\tif (entry.requestId === undefined) continue;\n\t\t\t\tentry.filter.boundary.emit(\n\t\t\t\t\tnativeHost,\n\t\t\t\t\tbindingEmitOptions(nativeHost, entry.filter, entry.requestId),\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst filter = handleFilters[0]?.filter;\n\t\t\tconst lowered = lowerCaughtException(exception, nativeHost, {\n\t\t\t\tissueResponse: filter?.issueResponse ?? this.opts.issueResponse,\n\t\t\t\tprotocolError: filter?.protocolError ?? this.opts.protocolError,\n\t\t\t});\n\t\t\treturn writeHttpResponse(host, lowered);\n\t\t}\n\t\tconst pending: FilterReplyState[] = [];\n\t\ttry {\n\t\t\tfor (const requestId of requestIds) {\n\t\t\t\tfor (const reply of replies) {\n\t\t\t\t\tconst state: FilterReplyState = { status: \"pending\", reply };\n\t\t\t\t\tpending.push(state);\n\t\t\t\t\tcleanups.push(\n\t\t\t\t\t\tthis.replyBoundary(reply).attach({\n\t\t\t\t\t\t\trequestId,\n\t\t\t\t\t\t\tbindingId: reply.bindingId,\n\t\t\t\t\t\t\thandle: {\n\t\t\t\t\t\t\t\tresolve(payload) {\n\t\t\t\t\t\t\t\t\tstate.status = \"resolved\";\n\t\t\t\t\t\t\t\t\tstate.payload = payload;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\treject(error) {\n\t\t\t\t\t\t\t\t\tstate.status = \"rejected\";\n\t\t\t\t\t\t\t\t\tstate.error = error;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\temitFilters();\n\t\t\tconst resolved = pending.find((state) => state.status === \"resolved\");\n\t\t\tif (resolved !== undefined) {\n\t\t\t\treturn writeHttpResponse(\n\t\t\t\t\thost,\n\t\t\t\t\tlowerHttpReplyPayload(resolved.payload, nativeHost, {\n\t\t\t\t\t\tissueResponse:\n\t\t\t\t\t\t\tresolved.reply.issueResponse ??\n\t\t\t\t\t\t\thandleFilters[0]?.filter.issueResponse ??\n\t\t\t\t\t\t\tthis.opts.issueResponse,\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst rejected = pending.find((state) => state.status === \"rejected\");\n\t\t\tif (rejected !== undefined) {\n\t\t\t\treturn writeHttpResponse(\n\t\t\t\t\thost,\n\t\t\t\t\tlowerProtocolError(rejected.error, nativeHost, {\n\t\t\t\t\t\tprotocolError:\n\t\t\t\t\t\t\trejected.reply.protocolError ??\n\t\t\t\t\t\t\thandleFilters[0]?.filter.protocolError ??\n\t\t\t\t\t\t\tthis.opts.protocolError,\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst filter = handleFilters[0]?.filter;\n\t\t\treturn writeHttpResponse(\n\t\t\t\thost,\n\t\t\t\tlowerCaughtException(exception, nativeHost, {\n\t\t\t\t\tissueResponse: filter?.issueResponse ?? this.opts.issueResponse,\n\t\t\t\t\tprotocolError: filter?.protocolError ?? this.opts.protocolError,\n\t\t\t\t}),\n\t\t\t);\n\t\t} finally {\n\t\t\tfor (const cleanup of cleanups) cleanup();\n\t\t}\n\t}\n\n\tonModuleDestroy(): void {\n\t\tfor (const boundary of this.disposableReplies) boundary.dispose();\n\t\tthis.disposableReplies.clear();\n\t}\n\n\tprivate replyBoundary(\n\t\tbinding: NestHttpReplyBindingMeta,\n\t): ReturnType<typeof toNestHttp<NestHttpReplyPayloadUnknown>> {\n\t\tconst node = binding.replyNode as object;\n\t\tlet byBinding = this.replies.get(node);\n\t\tif (byBinding === undefined) {\n\t\t\tbyBinding = new Map();\n\t\t\tthis.replies.set(node, byBinding);\n\t\t}\n\t\tconst existing = byBinding.get(binding.bindingId);\n\t\tif (existing !== undefined) return existing;\n\t\tconst boundary = toNestHttp(binding.replyNode as NodeReplyPayload, {\n\t\t\tbindingId: binding.bindingId,\n\t\t\tdiagnosticBoundary: this.opts.diagnosticBoundary,\n\t\t\tdiagnosticPhase: \"filter\",\n\t\t});\n\t\tbyBinding.set(binding.bindingId, boundary);\n\t\tthis.disposableReplies.add(boundary);\n\t\treturn boundary;\n\t}\n}\n\nclass GraphCronControllerImpl implements GraphCronController {\n\tprivate readonly targets: Array<{\n\t\treadonly target: GraphCronProviderTarget;\n\t\treadonly schedule: CronSchedule;\n\t\treadonly fired: Set<string>;\n\t}>;\n\n\tconstructor(opts: GraphCronControllerOptions) {\n\t\tthis.targets = opts.targets.map((target) => ({\n\t\t\ttarget,\n\t\t\tschedule: parseCron(target.expr),\n\t\t\tfired: new Set<string>(),\n\t\t}));\n\t}\n\n\tcheck(now: Date): void {\n\t\tfor (const entry of this.targets) {\n\t\t\temitCronTarget(entry.target, entry.schedule, entry.fired, now);\n\t\t}\n\t}\n}\n\nclass GraphCronSchedulerBridge implements OnModuleInit, OnModuleDestroy {\n\tprivate readonly timers: Array<ReturnType<typeof setInterval>> = [];\n\n\tconstructor(private readonly opts: GraphCronSchedulerProviderOptions) {}\n\n\tonModuleInit(): void {\n\t\ttry {\n\t\t\tfor (const target of this.opts.targets) this.startTarget(target);\n\t\t} catch (error) {\n\t\t\tthis.onModuleDestroy();\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\tonModuleDestroy(): void {\n\t\tfor (const timer of this.timers.splice(0)) clearInterval(timer);\n\t}\n\n\tprivate startTarget(target: GraphCronProviderTarget): void {\n\t\tconst tickMs = target.tickMs ?? 60_000;\n\t\tif (!Number.isFinite(tickMs) || tickMs <= 0) {\n\t\t\tthrow new RangeError(\"provideGraphCronScheduler: tickMs must be a positive finite number\");\n\t\t}\n\t\tconst controller = createGraphCronController({ targets: [target] });\n\t\tconst check = () => controller.check(new Date());\n\t\tcheck();\n\t\tthis.timers.push(setInterval(check, tickMs));\n\t}\n}\n\nclass GraphLifecycleHooksBridge implements OnModuleInit, OnModuleDestroy {\n\tconstructor(private readonly opts: GraphLifecycleHooksProviderOptions) {}\n\n\tonModuleInit(): void {\n\t\tthis.emit(\"module-init\");\n\t}\n\n\tonModuleDestroy(): void {\n\t\tthis.emit(\"module-destroy\");\n\t}\n\n\tprivate emit(event: \"module-init\" | \"module-destroy\"): void {\n\t\tfor (const target of this.opts.targets) {\n\t\t\tif (target.event !== undefined && target.event !== event) continue;\n\t\t\tconst host = target.host?.(event) ?? { event };\n\t\t\tfor (const binding of lifecycleBindings(target)) {\n\t\t\t\tbinding.boundary.emit(host, bindingEmitOptions(host, binding, undefined));\n\t\t\t}\n\t\t}\n\t}\n}\n\ntype NestHttpReplyPayloadUnknown = unknown;\ntype NodeReplyPayload = Parameters<typeof toNestHttp<NestHttpReplyPayloadUnknown>>[0];\ntype NestGuardDecisionBindingMeta = Extract<NestBoundaryBindingMeta, { kind: \"guard-decision\" }>;\ninterface GuardDecisionState {\n\tstatus: \"pending\" | \"resolved\" | \"rejected\";\n\tbinding: NestGuardDecisionBindingMeta;\n\tpayload?: GraphGuardDecision;\n\terror?: unknown;\n}\n\ninterface FilterReplyState {\n\tstatus: \"pending\" | \"resolved\" | \"rejected\";\n\treply: NestHttpReplyBindingMeta;\n\tpayload?: NestHttpReplyPayloadUnknown;\n\terror?: unknown;\n}\n\nfunction methodKeyForContext(context: ExecutionContext): string | symbol {\n\tconst resolved = resolveNestMethodKey(\n\t\tcontext.getClass(),\n\t\tcontext.getHandler() as DecoratorBoundMethod,\n\t);\n\treturn resolved ?? context.getHandler().name;\n}\n\nfunction defaultHttpHost(context: ExecutionContext): unknown {\n\tconst request = context.switchToHttp?.().getRequest?.();\n\treturn request ?? {};\n}\n\nfunction defaultArgumentsHost(host: ArgumentsHost, exception: unknown): unknown {\n\tconst request = host.switchToHttp?.().getRequest?.();\n\tif (request !== undefined && request !== null) return { ...request, exception };\n\treturn { exception };\n}\n\nfunction isObservableLike(value: unknown): value is Observable<unknown> {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === \"object\" &&\n\t\ttypeof (value as { subscribe?: unknown }).subscribe === \"function\"\n\t);\n}\n\nfunction isGuardIngress(binding: NestBoundaryBindingMeta): binding is NestIngressBindingMeta {\n\treturn binding.direction === \"ingress\" && binding.kind === \"guard\";\n}\n\nfunction isErrorIngress(binding: NestBoundaryBindingMeta): binding is NestIngressBindingMeta {\n\treturn binding.direction === \"ingress\" && binding.kind === \"error\";\n}\n\nfunction isHttpReply(binding: NestBoundaryBindingMeta): binding is NestHttpReplyBindingMeta {\n\treturn binding.direction === \"egress\" && binding.kind === \"http\";\n}\n\nfunction isGuardDecision(\n\tbinding: NestBoundaryBindingMeta,\n): binding is NestGuardDecisionBindingMeta {\n\treturn binding.direction === \"egress\" && binding.kind === \"guard-decision\";\n}\n\nfunction firstHttpReply(context: ExecutionContext): NestHttpReplyBindingMeta | undefined {\n\treturn getNestBoundaryBindings(context.getClass(), methodKeyForContext(context)).find(\n\t\tisHttpReply,\n\t);\n}\n\nfunction lifecycleBindings(\n\ttarget: GraphLifecycleProviderTarget,\n): readonly NestIngressBindingMeta[] {\n\treturn getNestBoundaryBindings(target.target, target.methodKey).filter(\n\t\t(binding): binding is NestIngressBindingMeta =>\n\t\t\tbinding.direction === \"ingress\" && binding.kind === \"lifecycle\",\n\t);\n}\n\nfunction cronBindings(target: GraphCronProviderTarget): readonly NestIngressBindingMeta[] {\n\treturn getNestBoundaryBindings(target.target, target.methodKey).filter(\n\t\t(binding): binding is NestIngressBindingMeta =>\n\t\t\tbinding.direction === \"ingress\" && binding.kind === \"cron\",\n\t);\n}\n\nfunction emitCronTarget(\n\ttarget: GraphCronProviderTarget,\n\tschedule: CronSchedule,\n\tfired: Set<string>,\n\tnow: Date,\n): void {\n\tif (!matchesCron(schedule, now, { timezone: target.timezone })) return;\n\tconst key = cronProviderMinuteKey(now, target.timezone);\n\tfor (const existing of fired) {\n\t\tif (!existing.startsWith(`${key.dayKey}:`)) fired.delete(existing);\n\t}\n\tif (fired.has(key.minuteKey)) return;\n\tfired.add(key.minuteKey);\n\tconst host =\n\t\ttarget.host?.(now) ??\n\t\t({\n\t\t\tiso: now.toISOString(),\n\t\t\ttimestamp_ms: now.getTime(),\n\t\t\ttimestamp_ns: (BigInt(now.getTime()) * 1_000_000n).toString(),\n\t\t\ttimezone: target.timezone,\n\t\t} satisfies Record<string, unknown>);\n\tfor (const binding of cronBindings(target)) {\n\t\tbinding.boundary.emit(host, bindingEmitOptions(host, binding, undefined));\n\t}\n}\n\nfunction cronProviderMinuteKey(\n\tdate: Date,\n\ttimezone?: string,\n): { readonly dayKey: string; readonly minuteKey: string } {\n\tif (timezone === undefined) {\n\t\tconst dayKey = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;\n\t\treturn { dayKey, minuteKey: `${dayKey}:${date.getHours()}:${date.getMinutes()}` };\n\t}\n\tconst parts = new Intl.DateTimeFormat(\"en-US-u-ca-gregory-nu-latn\", {\n\t\ttimeZone: timezone,\n\t\tyear: \"numeric\",\n\t\tmonth: \"2-digit\",\n\t\tday: \"2-digit\",\n\t\thour: \"2-digit\",\n\t\tminute: \"2-digit\",\n\t\thourCycle: \"h23\",\n\t}).formatToParts(date);\n\tconst byType = new Map(parts.map((part) => [part.type, part.value]));\n\tconst dayKey = `${byType.get(\"year\")}-${byType.get(\"month\")}-${byType.get(\"day\")}`;\n\treturn { dayKey, minuteKey: `${dayKey}:${byType.get(\"hour\")}:${byType.get(\"minute\")}` };\n}\n\nfunction lowerCaughtException<THost>(\n\texception: unknown,\n\thost: THost,\n\topts: {\n\t\treadonly issueResponse?: NestIssueResponse<THost>;\n\t\treadonly protocolError?: NestProtocolErrorResponse<THost>;\n\t},\n): ReturnType<typeof lowerHttpReplyPayload> {\n\tif (isDataIssue(exception)) return lowerHttpReplyPayload(exception, host, opts);\n\treturn (opts.protocolError ?? protocolError)(exception, host);\n}\n\nfunction guardDecisionResponse<THost>(\n\tdecision: Extract<GraphGuardDecision, { readonly kind: \"deny\" }>,\n\thost: THost,\n\topts: { readonly issueResponse?: NestIssueResponse<THost> },\n): NestHttpResponsePayload {\n\tif (decision.issue !== undefined) return lowerHttpReplyPayload(decision.issue, host, opts);\n\tif (Number.isInteger(decision.status)) {\n\t\treturn {\n\t\t\tstatus: decision.status as number,\n\t\t\tbody: decision.body ?? {\n\t\t\t\tcode: \"graphrefly.guard_denied\",\n\t\t\t\tmessage: decision.reason ?? \"GraphReFly guard denied request\",\n\t\t\t},\n\t\t\theaders: decision.headers,\n\t\t};\n\t}\n\treturn {\n\t\tstatus: 403,\n\t\tbody: {\n\t\t\tcode: \"graphrefly.guard_denied\",\n\t\t\tmessage: decision.reason ?? \"GraphReFly guard denied request\",\n\t\t},\n\t\theaders: decision.headers,\n\t};\n}\n\nexport class GraphGuardDeniedException extends HttpException {\n\treadonly payload: NestHttpResponsePayload;\n\n\tconstructor(payload: NestHttpResponsePayload) {\n\t\tsuper(payload.body ?? {}, payload.status);\n\t\tthis.payload = payload;\n\t}\n}\n\nclass GraphGuardProtocolErrorException extends HttpException {\n\tconstructor(payload: NestHttpResponsePayload) {\n\t\tsuper(payload.body ?? {}, payload.status);\n\t}\n}\n\nexport function isGraphGuardDeniedException(value: unknown): value is GraphGuardDeniedException {\n\treturn value instanceof GraphGuardDeniedException;\n}\n\nexport class GraphGuardDeniedFilter implements ExceptionFilter {\n\tcatch(exception: unknown, host: ArgumentsHost): unknown {\n\t\tif (!isGraphGuardDeniedException(exception)) throw exception;\n\t\treturn writeHttpResponse(host, exception.payload);\n\t}\n}\n\nCatch(GraphGuardDeniedException)(GraphGuardDeniedFilter);\n\nfunction writeHttpResponse(\n\thost: ArgumentsHost,\n\tpayload: ReturnType<typeof lowerHttpReplyPayload>,\n): unknown {\n\tconst response = host.switchToHttp?.().getResponse?.() as\n\t\t| {\n\t\t\t\tstatus?: (status: number) => unknown;\n\t\t\t\tjson?: (body: unknown) => unknown;\n\t\t\t\tsend?: (body?: unknown) => unknown;\n\t\t\t\tsetHeader?: (name: string, value: string) => void;\n\t\t\t\theader?: (name: string, value: string) => void;\n\t\t }\n\t\t| undefined;\n\tif (response === undefined) return payload;\n\tfor (const [name, value] of Object.entries(payload.headers ?? {})) {\n\t\tif (typeof response.setHeader === \"function\") response.setHeader(name, value);\n\t\telse response.header?.(name, value);\n\t}\n\tresponse.status?.(payload.status);\n\tif (typeof response.json === \"function\") return response.json(payload.body ?? {});\n\tif (typeof response.send === \"function\") return response.send(payload.body);\n\treturn payload;\n}\n","/**\n * Async + sync sources (binding-layer sugar, D43 / D40 / feedback_async_sources_binding_layer).\n *\n * Sources are depless {@link Operator}`<never, T>` specs built on the `producer`/`node` path:\n * the body runs ONCE on activation (node `_activate`), schedules its work, and emits later via\n * the captured `ctx.down` (an external tier-3 emit → the leading DIRTY is synthesized for it,\n * R-dirty-before-data). Async lives ONLY here (R-no-raw-async / F-SYNC-CORE): `setTimeout` /\n * `Promise` / `for await` are confined to source bodies; the wave core stays sync. Cleanup is\n * `ctx.onDeactivation` (D28), NOT a returned object. Per-language (D6/D24), never in parity.\n *\n * Instantiate via `g.initNode(timer(1000), [])` (graph-bound, inspectable) or\n * {@link initNode}(timer(1000), []) (bare). Pool/pause defaults (D43): timer/interval =\n * sync + pausable:false (keep producing through PAUSE); fromPromise/fromAsyncIter = async\n * (default pausable, so a paused source buffers its late emits — R-async-paused).\n */\n\nimport type { Ctx } from \"../ctx/types.js\";\nimport type { Node, NodeOptions } from \"../node/node.js\";\nimport { errorPayload } from \"../protocol/messages.js\";\nimport { toCheckpointJson } from \"./checkpoint.js\";\nimport type {\n\tDriverCancel,\n\tDriverResult,\n\tHttpRequest,\n\tHttpResponse,\n\tProcessCommand,\n\tProcessResult,\n\tSseDriverEvent,\n\tSseEvent,\n\tSseRequest,\n\tWebhookDriverEvent,\n\tWebhookEvent,\n\tWebhookRegistration,\n\tWebSocketDriverEvent,\n\tWebSocketEvent,\n\tWebSocketRequest,\n} from \"./environment.js\";\nimport { initNode, type Operator } from \"./operators.js\";\n\n/**\n * Values accepted by {@link fromAny}: an existing Node, a Promise, an (a)sync iterable, or a\n * bare scalar. The universal coercion target for higher-order operators (CSP-2.7).\n */\nexport type NodeInput<T> = Node<T> | PromiseLike<T> | AsyncIterable<T> | Iterable<T> | T;\n\n/** Host-boundary options for {@link singleFromAny}. */\nexport interface SingleFromAnyOptions<K> {\n\t/**\n\t * Map a caller key to the in-flight dedupe key. Defaults to key identity; object keys dedupe only\n\t * when the same object reference is reused. Return a stable string/canonical value for structural\n\t * object-key dedupe.\n\t */\n\tkeyOf?: (key: K) => unknown;\n\t/** Treat a sync iterable result as a stream and take its first item. Defaults to scalar value. */\n\titer?: boolean;\n}\n\n/**\n * Internal: build a depless source spec. `setup` runs once on activation; its returned fn (if\n * any) is registered as the deactivation cleanup (clear timers / abort). `setup` schedules the\n * async work and emits via `ctx.down` — synchronously (sync sources) or later (async sources).\n */\nfunction source<T>(\n\tfactory: string,\n\t// biome-ignore lint/suspicious/noConfusingVoidType: setup returns a cleanup fn OR nothing — the void arm keeps no-return source bodies (e.g. `of`/`fromIter`) ergonomic, same idiom as EffectFn.\n\tsetup: (ctx: Ctx) => void | (() => void),\n\topts?: Partial<NodeOptions<T>>,\n): Operator<never, T> {\n\treturn {\n\t\tfactory,\n\t\topts,\n\t\tbody: (ctx) => {\n\t\t\tlet cleanup: undefined | (() => void);\n\t\t\tlet deactivated = false;\n\t\t\tctx.onDeactivation(() => {\n\t\t\t\tdeactivated = true;\n\t\t\t\tif (typeof cleanup === \"function\") cleanup();\n\t\t\t});\n\t\t\tconst maybeCleanup = setup(ctx);\n\t\t\tcleanup = typeof maybeCleanup === \"function\" ? maybeCleanup : undefined;\n\t\t\tif (deactivated && typeof cleanup === \"function\") cleanup();\n\t\t},\n\t};\n}\n\nfunction assertNonEmptyString(value: string, label: string): void {\n\tif (typeof value !== \"string\" || value.length === 0) {\n\t\tthrow new TypeError(`${label} must be a non-empty string`);\n\t}\n}\n\nfunction cleanupDriverWork(\n\tactive: { value: boolean },\n\tcancelSlot: { value: DriverCancel | undefined },\n): void {\n\tactive.value = false;\n\tconst cancel = cancelSlot.value;\n\tcancelSlot.value = undefined;\n\tif (cancel !== undefined) runDriverCancel(cancel);\n}\n\nfunction installDriverCancel(\n\tactive: { value: boolean },\n\tcancelSlot: { value: DriverCancel | undefined },\n\tcancel: DriverCancel,\n): void {\n\tif (active.value) cancelSlot.value = cancel;\n\telse runDriverCancel(cancel);\n}\n\nfunction runDriverCancel(cancel: DriverCancel): void {\n\ttry {\n\t\tcancel();\n\t} catch {\n\t\t// Driver cleanup is best-effort: it must not suppress graph-visible terminal delivery.\n\t}\n}\n\nfunction driverOneShotSource<T>(\n\tfactory: string,\n\tmissing: string,\n\tstart: (ctx: Ctx, callback: (result: DriverResult<T>) => void) => DriverCancel | undefined,\n): Operator<never, T> {\n\treturn source<T>(\n\t\tfactory,\n\t\t(ctx) => {\n\t\t\tconst active = { value: true };\n\t\t\tconst cancelSlot: { value: DriverCancel | undefined } = { value: undefined };\n\t\t\tconst callback = (result: DriverResult<T>) => {\n\t\t\t\tif (!active.value) return;\n\t\t\t\tcleanupDriverWork(active, cancelSlot);\n\t\t\t\tif (result.ok) ctx.down([[\"DATA\", result.value], [\"COMPLETE\"]]);\n\t\t\t\telse ctx.down([[\"ERROR\", errorPayload(result.error)]]);\n\t\t\t};\n\t\t\tlet cancel: DriverCancel | undefined;\n\t\t\ttry {\n\t\t\t\tcancel = start(ctx, callback);\n\t\t\t} catch (e) {\n\t\t\t\tactive.value = false;\n\t\t\t\tctx.down([[\"ERROR\", errorPayload(e)]]);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (cancel === undefined) {\n\t\t\t\tactive.value = false;\n\t\t\t\tctx.down([[\"ERROR\", missing]]);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tinstallDriverCancel(active, cancelSlot, cancel);\n\t\t\treturn () => cleanupDriverWork(active, cancelSlot);\n\t\t},\n\t\t{ pool: \"async\", pausable: false },\n\t);\n}\n\nfunction driverStreamSource<T, E extends { readonly kind: string }>(\n\tfactory: string,\n\tmissing: string,\n\tstart: (ctx: Ctx, callback: (event: E) => void) => DriverCancel | undefined,\n\tdataOf: (event: E) => T | undefined,\n\terrorOf: (event: E) => unknown,\n): Operator<never, T> {\n\treturn source<T>(\n\t\tfactory,\n\t\t(ctx) => {\n\t\t\tconst active = { value: true };\n\t\t\tconst cancelSlot: { value: DriverCancel | undefined } = { value: undefined };\n\t\t\tconst callback = (event: E) => {\n\t\t\t\tif (!active.value) return;\n\t\t\t\tif (event.kind === \"event\") {\n\t\t\t\t\tconst value = dataOf(event);\n\t\t\t\t\tif (value !== undefined) ctx.down([[\"DATA\", value]]);\n\t\t\t\t} else if (event.kind === \"error\") {\n\t\t\t\t\tcleanupDriverWork(active, cancelSlot);\n\t\t\t\t\tctx.down([[\"ERROR\", errorPayload(errorOf(event))]]);\n\t\t\t\t} else if (event.kind === \"complete\") {\n\t\t\t\t\tcleanupDriverWork(active, cancelSlot);\n\t\t\t\t\tctx.down([[\"COMPLETE\"]]);\n\t\t\t\t}\n\t\t\t};\n\t\t\tlet cancel: DriverCancel | undefined;\n\t\t\ttry {\n\t\t\t\tcancel = start(ctx, callback);\n\t\t\t} catch (e) {\n\t\t\t\tactive.value = false;\n\t\t\t\tctx.down([[\"ERROR\", errorPayload(e)]]);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (cancel === undefined) {\n\t\t\t\tactive.value = false;\n\t\t\t\tctx.down([[\"ERROR\", missing]]);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tinstallDriverCancel(active, cancelSlot, cancel);\n\t\t\treturn () => cleanupDriverWork(active, cancelSlot);\n\t\t},\n\t\t{ pool: \"async\", pausable: false },\n\t);\n}\n\nfunction isNode(x: unknown): x is Node {\n\treturn (\n\t\tx != null &&\n\t\ttypeof x === \"object\" &&\n\t\t\"cache\" in x &&\n\t\ttypeof (x as Node).subscribe === \"function\"\n\t);\n}\n\nfunction isThenable(x: unknown): x is PromiseLike<unknown> {\n\treturn x != null && typeof (x as PromiseLike<unknown>).then === \"function\";\n}\n\nfunction isAsyncIterable<T>(x: unknown): x is AsyncIterable<T> {\n\treturn (\n\t\tx !== null &&\n\t\tx !== undefined &&\n\t\ttypeof (x as { [Symbol.asyncIterator]?: unknown })[Symbol.asyncIterator] === \"function\"\n\t);\n}\n\nfunction isIterable<T>(x: unknown): x is Iterable<T> {\n\treturn (\n\t\tx !== null &&\n\t\tx !== undefined &&\n\t\ttypeof (x as { [Symbol.iterator]?: unknown })[Symbol.iterator] === \"function\"\n\t);\n}\n\n/** Options shared by async/timer sources: an optional AbortSignal → ERROR on abort. */\nexport interface AsyncSourceOpts {\n\tsignal?: AbortSignal;\n}\n\nexport interface TimerSourceOpts extends AsyncSourceOpts {\n\tperiod?: number;\n}\n\n/** Options for {@link fromCron}. */\nexport interface FromCronOptions extends AsyncSourceOpts {\n\t/** Cron matcher polling interval in milliseconds. Default: 60_000. */\n\ttickMs?: number;\n\t/** IANA timezone used for wall-clock cron matching. Defaults to the host-local timezone. */\n\ttimezone?: string;\n\t/**\n\t * DST policy for timezone-aware matching. Current D484 defaults are explicit: nonexistent\n\t * wall-clock minutes are skipped, and repeated wall-clock minutes fire at most once.\n\t */\n\tdst?: {\n\t\treadonly nonexistent?: \"skip\";\n\t\treadonly repeated?: \"once\";\n\t};\n\t/**\n\t * Emitted value shape. `timestamp_ns` is a decimal string so it cannot lose precision as a\n\t * JavaScript number; use `timestamp_ms` when numeric millisecond precision is enough.\n\t */\n\toutput?: \"date\" | \"timestamp_ms\" | \"timestamp_ns\";\n}\n\n/** Minimal five-field cron schedule: minute hour day-of-month month day-of-week. */\nexport interface CronSchedule {\n\treadonly minutes: ReadonlySet<number>;\n\treadonly hours: ReadonlySet<number>;\n\treadonly daysOfMonth: ReadonlySet<number>;\n\treadonly months: ReadonlySet<number>;\n\treadonly daysOfWeek: ReadonlySet<number>;\n}\n\n/** DOM/EventEmitter-style target accepted by {@link fromEvent}. */\nexport interface EventTargetLike {\n\taddEventListener(\n\t\ttype: string,\n\t\tlistener: (event: unknown) => void,\n\t\toptions?: EventListenerOptionsLike,\n\t): void;\n\tremoveEventListener(\n\t\ttype: string,\n\t\tlistener: (event: unknown) => void,\n\t\toptions?: EventListenerOptionsLike,\n\t): void;\n}\n\nexport interface EventListenerOptionsLike {\n\tcapture?: boolean;\n\tpassive?: boolean;\n\tonce?: boolean;\n}\n\nexport type FromEventOptions = EventListenerOptionsLike;\n\n/** Host push registration callback accepted by {@link fromPushNotification}. */\nexport type PushUnsubscribe = () => void;\nexport type PushRegister<T> = (deliver: (payload: T) => void) => PushUnsubscribe | undefined;\n\nfunction parseCronField(field: string, min: number, max: number): Set<number> {\n\tif (field.length === 0) throw new Error(\"Invalid cron field: empty\");\n\tconst out = new Set<number>();\n\tfor (const part of field.split(\",\")) {\n\t\tif (part.length === 0) throw new Error(`Invalid cron field: ${field}`);\n\t\tconst stepParts = part.split(\"/\");\n\t\tif (stepParts.length > 2) throw new Error(`Invalid cron step: ${part}`);\n\t\tconst [range, stepText] = stepParts;\n\t\tif (range == null || range.length === 0) throw new Error(`Invalid cron field: ${field}`);\n\t\tif (stepText === \"\") throw new Error(`Invalid cron step: ${part}`);\n\t\tconst step = stepText == null ? 1 : parseCronInt(stepText, `Invalid cron step: ${part}`);\n\t\tif (step < 1) throw new Error(`Invalid cron step: ${part}`);\n\n\t\tlet start: number;\n\t\tlet end: number;\n\t\tif (range === \"*\") {\n\t\t\tstart = min;\n\t\t\tend = max;\n\t\t} else if (range.includes(\"-\")) {\n\t\t\tconst [a, b, extra] = range.split(\"-\");\n\t\t\tif (extra !== undefined || a === \"\" || b === \"\")\n\t\t\t\tthrow new Error(`Invalid cron field: ${field}`);\n\t\t\tstart = parseCronInt(a, `Invalid cron field: ${field}`);\n\t\t\tend = parseCronInt(b, `Invalid cron field: ${field}`);\n\t\t} else {\n\t\t\tstart = parseCronInt(range, `Invalid cron field: ${field}`);\n\t\t\tend = start;\n\t\t}\n\n\t\tif (!Number.isInteger(start) || !Number.isInteger(end)) {\n\t\t\tthrow new Error(`Invalid cron field: ${field}`);\n\t\t}\n\t\tif (start < min || end > max) {\n\t\t\tthrow new RangeError(`Cron field out of range: ${field} (${min}-${max})`);\n\t\t}\n\t\tif (start > end) throw new Error(`Invalid cron range: ${start}-${end} in ${field}`);\n\t\tfor (let i = start; i <= end; i += step) out.add(i);\n\t}\n\treturn out;\n}\n\nfunction parseCronInt(text: string, message: string): number {\n\tif (!/^\\d+$/.test(text)) throw new Error(message);\n\tconst value = Number.parseInt(text, 10);\n\tif (!Number.isSafeInteger(value)) throw new Error(message);\n\treturn value;\n}\n\n/** Parse a standard five-field cron expression. */\nexport function parseCron(expr: string): CronSchedule {\n\tconst parts = expr.trim().split(/\\s+/);\n\tif (parts.length !== 5 || parts.some((part) => part.length === 0)) {\n\t\tthrow new Error(`Invalid cron: expected 5 fields, got ${parts.length}`);\n\t}\n\treturn {\n\t\tminutes: parseCronField(parts[0], 0, 59),\n\t\thours: parseCronField(parts[1], 0, 23),\n\t\tdaysOfMonth: parseCronField(parts[2], 1, 31),\n\t\tmonths: parseCronField(parts[3], 1, 12),\n\t\tdaysOfWeek: parseCronField(parts[4], 0, 6),\n\t};\n}\n\nexport interface CronMatchOptions {\n\t/** IANA timezone used for wall-clock projection. Defaults to the host-local timezone. */\n\ttimezone?: string;\n}\n\ninterface CronWallClockFields {\n\treadonly year: number;\n\treadonly month: number;\n\treadonly day: number;\n\treadonly hour: number;\n\treadonly minute: number;\n\treadonly dayOfWeek: number;\n}\n\n/** Test whether a Date matches a parsed cron schedule in host-local time or an IANA timezone. */\nexport function matchesCron(\n\tschedule: CronSchedule,\n\tdate: Date,\n\topts: CronMatchOptions = {},\n): boolean {\n\tconst fields = cronWallClockFields(date, opts.timezone);\n\treturn (\n\t\tschedule.minutes.has(fields.minute) &&\n\t\tschedule.hours.has(fields.hour) &&\n\t\tschedule.daysOfMonth.has(fields.day) &&\n\t\tschedule.months.has(fields.month) &&\n\t\tschedule.daysOfWeek.has(fields.dayOfWeek)\n\t);\n}\n\nfunction cronMinuteKey(date: Date, timezone?: string): string {\n\tconst fields = cronWallClockFields(date, timezone);\n\treturn `${fields.year}-${fields.month}-${fields.day}-${fields.hour}-${fields.minute}`;\n}\n\nfunction cronDayKey(date: Date, timezone?: string): string {\n\tconst fields = cronWallClockFields(date, timezone);\n\treturn `${fields.year}-${fields.month}-${fields.day}`;\n}\n\nfunction cronWallClockFields(date: Date, timezone?: string): CronWallClockFields {\n\tif (timezone === undefined) {\n\t\treturn {\n\t\t\tyear: date.getFullYear(),\n\t\t\tmonth: date.getMonth() + 1,\n\t\t\tday: date.getDate(),\n\t\t\thour: date.getHours(),\n\t\t\tminute: date.getMinutes(),\n\t\t\tdayOfWeek: date.getDay(),\n\t\t};\n\t}\n\tconst parts = timezoneFormatter(timezone).formatToParts(date);\n\tconst values: Record<string, number> = {};\n\tfor (const part of parts) {\n\t\tif (\n\t\t\tpart.type === \"year\" ||\n\t\t\tpart.type === \"month\" ||\n\t\t\tpart.type === \"day\" ||\n\t\t\tpart.type === \"hour\" ||\n\t\t\tpart.type === \"minute\"\n\t\t) {\n\t\t\tvalues[part.type] = Number.parseInt(part.value, 10);\n\t\t}\n\t}\n\tconst year = values.year;\n\tconst month = values.month;\n\tconst day = values.day;\n\tconst hour = values.hour;\n\tconst minute = values.minute;\n\tif (\n\t\tyear === undefined ||\n\t\tmonth === undefined ||\n\t\tday === undefined ||\n\t\thour === undefined ||\n\t\tminute === undefined\n\t) {\n\t\tthrow new Error(`fromCron: timezone projection failed for ${timezone}`);\n\t}\n\treturn {\n\t\tyear,\n\t\tmonth,\n\t\tday,\n\t\thour,\n\t\tminute,\n\t\tdayOfWeek: new Date(Date.UTC(year, month - 1, day)).getUTCDay(),\n\t};\n}\n\nconst TIMEZONE_FORMATTERS = new Map<string, Intl.DateTimeFormat>();\n\nfunction timezoneFormatter(timezone: string): Intl.DateTimeFormat {\n\tconst existing = TIMEZONE_FORMATTERS.get(timezone);\n\tif (existing !== undefined) return existing;\n\tassertNonEmptyString(timezone, \"fromCron: timezone\");\n\ttry {\n\t\tconst formatter = new Intl.DateTimeFormat(\"en-US-u-ca-gregory-nu-latn\", {\n\t\t\ttimeZone: timezone,\n\t\t\tyear: \"numeric\",\n\t\t\tmonth: \"2-digit\",\n\t\t\tday: \"2-digit\",\n\t\t\thour: \"2-digit\",\n\t\t\tminute: \"2-digit\",\n\t\t\thourCycle: \"h23\",\n\t\t});\n\t\tformatter.format(new Date(0));\n\t\tTIMEZONE_FORMATTERS.set(timezone, formatter);\n\t\treturn formatter;\n\t} catch (error) {\n\t\tthrow new RangeError(\n\t\t\t`fromCron: unsupported IANA timezone '${timezone}' (${error instanceof Error ? error.message : String(error)})`,\n\t\t);\n\t}\n}\n\nfunction dateToTimestampNs(date: Date): string {\n\treturn (BigInt(date.getTime()) * 1_000_000n).toString();\n}\n\nexport function fromCron(\n\texpr: string,\n\topts: FromCronOptions & { output: \"date\" },\n): Operator<never, Date>;\nexport function fromCron(\n\texpr: string,\n\topts: FromCronOptions & { output: \"timestamp_ms\" },\n): Operator<never, number>;\nexport function fromCron(\n\texpr: string,\n\topts?: FromCronOptions & { output?: \"timestamp_ns\" },\n): Operator<never, string>;\nexport function fromCron(\n\texpr: string,\n\topts?: FromCronOptions,\n): Operator<never, Date | number | string>;\nexport function fromCron(\n\texpr: string,\n\topts: FromCronOptions = {},\n): Operator<never, Date | number | string> {\n\tconst schedule = parseCron(expr);\n\tconst { tickMs = 60_000, output = \"timestamp_ns\", signal, timezone } = opts;\n\tif (opts.dst?.nonexistent !== undefined && opts.dst.nonexistent !== \"skip\") {\n\t\tthrow new RangeError(\"fromCron: dst.nonexistent currently supports only 'skip'\");\n\t}\n\tif (opts.dst?.repeated !== undefined && opts.dst.repeated !== \"once\") {\n\t\tthrow new RangeError(\"fromCron: dst.repeated currently supports only 'once'\");\n\t}\n\tif (timezone !== undefined) timezoneFormatter(timezone);\n\tif (!Number.isFinite(tickMs) || tickMs <= 0) {\n\t\tthrow new RangeError(\"fromCron: tickMs must be a positive finite number\");\n\t}\n\treturn source<Date | number | string>(\n\t\t\"fromCron\",\n\t\t(ctx) => {\n\t\t\tlet done = false;\n\t\t\tlet lastFiredKey: string | undefined;\n\t\t\tlet firedTimezoneDay: string | undefined;\n\t\t\tconst firedTimezoneMinutes = new Set<string>();\n\t\t\tlet intervalId: ReturnType<typeof setInterval> | undefined;\n\t\t\tconst cleanup = () => {\n\t\t\t\tdone = true;\n\t\t\t\tif (intervalId !== undefined) clearInterval(intervalId);\n\t\t\t\tintervalId = undefined;\n\t\t\t\tsignal?.removeEventListener(\"abort\", onAbort);\n\t\t\t};\n\t\t\tconst onAbort = () => {\n\t\t\t\tif (done) return;\n\t\t\t\tcleanup();\n\t\t\t\tctx.down([[\"ERROR\", errorPayload(signal?.reason)]]);\n\t\t\t};\n\t\t\tconst emitNow = (now: Date) => {\n\t\t\t\tif (output === \"date\") ctx.down([[\"DATA\", now]]);\n\t\t\t\telse if (output === \"timestamp_ms\") ctx.down([[\"DATA\", now.getTime()]]);\n\t\t\t\telse ctx.down([[\"DATA\", dateToTimestampNs(now)]]);\n\t\t\t};\n\t\t\tconst check = () => {\n\t\t\t\tif (done) return;\n\t\t\t\tconst now = new Date();\n\t\t\t\tconst key = cronMinuteKey(now, timezone);\n\t\t\t\tconst alreadyFired =\n\t\t\t\t\ttimezone === undefined ? key === lastFiredKey : firedTimezoneMinutes.has(key);\n\t\t\t\tif (!alreadyFired && matchesCron(schedule, now, { timezone })) {\n\t\t\t\t\tlastFiredKey = key;\n\t\t\t\t\tif (timezone !== undefined) {\n\t\t\t\t\t\tconst dayKey = cronDayKey(now, timezone);\n\t\t\t\t\t\tif (dayKey !== firedTimezoneDay) {\n\t\t\t\t\t\t\tfiredTimezoneDay = dayKey;\n\t\t\t\t\t\t\tfiredTimezoneMinutes.clear();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfiredTimezoneMinutes.add(key);\n\t\t\t\t\t}\n\t\t\t\t\temitNow(now);\n\t\t\t\t}\n\t\t\t};\n\t\t\tif (signal?.aborted) {\n\t\t\t\tonAbort();\n\t\t\t\treturn cleanup;\n\t\t\t}\n\t\t\tsignal?.addEventListener(\"abort\", onAbort, { once: true });\n\t\t\tcheck();\n\t\t\tintervalId = setInterval(check, tickMs);\n\t\t\treturn cleanup;\n\t\t},\n\t\t{ pool: \"sync\", pausable: false },\n\t);\n}\n\nexport function runProcess(\n\tprogram: string,\n\targs: readonly string[] = [],\n): Operator<never, ProcessResult> {\n\treturn runProcessWithOptions({ program, args });\n}\n\nexport function fromProcess(\n\tprogram: string,\n\targs: readonly string[] = [],\n): Operator<never, ProcessResult> {\n\treturn processSource(\"fromProcess\", { program, args });\n}\n\nexport function runProcessWithOptions(command: ProcessCommand): Operator<never, ProcessResult> {\n\treturn processSource(\"runProcess\", command);\n}\n\nfunction processSource(factory: string, command: ProcessCommand): Operator<never, ProcessResult> {\n\tassertNonEmptyString(command.program, `${factory}: program`);\n\treturn driverOneShotSource<ProcessResult>(\n\t\tfactory,\n\t\t`${factory}: missing process driver`,\n\t\t(ctx, callback) => ctx.environment().processDriver()?.run(command, callback),\n\t);\n}\n\nexport function fromHttp(url: string): Operator<never, HttpResponse> {\n\treturn fromHttpWithOptions({ method: \"GET\", url });\n}\n\nexport function fromHttpWithOptions(request: HttpRequest): Operator<never, HttpResponse> {\n\tassertNonEmptyString(request.url, \"fromHttp: url\");\n\tassertNonEmptyString(request.method, \"fromHttp: method\");\n\treturn driverOneShotSource<HttpResponse>(\n\t\t\"fromHttp\",\n\t\t\"fromHttp: missing http driver\",\n\t\t(ctx, callback) => ctx.environment().httpDriver()?.request(request, callback),\n\t);\n}\n\nexport function fromSSE(url: string): Operator<never, SseEvent> {\n\treturn fromSSEWithOptions({ url });\n}\n\nexport function fromSSEWithOptions(request: SseRequest): Operator<never, SseEvent> {\n\tassertNonEmptyString(request.url, \"fromSSE: url\");\n\treturn driverStreamSource<SseEvent, SseDriverEvent>(\n\t\t\"fromSSE\",\n\t\t\"fromSSE: missing sse driver\",\n\t\t(ctx, callback) => ctx.environment().sseDriver()?.connect(request, callback),\n\t\t(event) => (event.kind === \"event\" ? event.event : undefined),\n\t\t(event) => (event.kind === \"error\" ? event.error : undefined),\n\t);\n}\n\nexport function fromWebSocket(url: string): Operator<never, WebSocketEvent> {\n\treturn fromWebSocketWithOptions({ url });\n}\n\nexport function fromWebSocketWithOptions(\n\trequest: WebSocketRequest,\n): Operator<never, WebSocketEvent> {\n\tassertNonEmptyString(request.url, \"fromWebSocket: url\");\n\treturn driverStreamSource<WebSocketEvent, WebSocketDriverEvent>(\n\t\t\"fromWebSocket\",\n\t\t\"fromWebSocket: missing websocket driver\",\n\t\t(ctx, callback) => ctx.environment().webSocketDriver()?.connect(request, callback),\n\t\t(event) => (event.kind === \"event\" ? event.event : undefined),\n\t\t(event) => (event.kind === \"error\" ? event.error : undefined),\n\t);\n}\n\nexport function fromWebhook(id: string): Operator<never, WebhookEvent> {\n\treturn fromWebhookWithOptions({ id });\n}\n\nexport function fromWebhookWithOptions(\n\tregistration: WebhookRegistration,\n): Operator<never, WebhookEvent> {\n\tassertNonEmptyString(registration.id, \"fromWebhook: id\");\n\treturn driverStreamSource<WebhookEvent, WebhookDriverEvent>(\n\t\t\"fromWebhook\",\n\t\t\"fromWebhook: missing webhook driver\",\n\t\t(ctx, callback) => ctx.environment().webhookDriver()?.register(registration, callback),\n\t\t(event) => (event.kind === \"event\" ? event.event : undefined),\n\t\t(event) => (event.kind === \"error\" ? event.error : undefined),\n\t);\n}\n\nfunction timerSource(factory: string, ms: number, opts?: TimerSourceOpts): Operator<never, number> {\n\tconst { period, signal } = opts ?? {};\n\tconst op = source<number>(\n\t\tfactory,\n\t\t(ctx) => {\n\t\t\tlet done = false;\n\t\t\tlet count = 0;\n\t\t\tlet t: ReturnType<typeof setTimeout> | undefined;\n\t\t\tlet iv: ReturnType<typeof setInterval> | undefined;\n\t\t\tconst cleanup = () => {\n\t\t\t\tdone = true;\n\t\t\t\tif (t !== undefined) clearTimeout(t);\n\t\t\t\tif (iv !== undefined) clearInterval(iv);\n\t\t\t\tsignal?.removeEventListener(\"abort\", onAbort);\n\t\t\t};\n\t\t\tconst onAbort = () => {\n\t\t\t\tif (done) return;\n\t\t\t\tcleanup();\n\t\t\t\tctx.down([[\"ERROR\", errorPayload(signal?.reason)]]);\n\t\t\t};\n\t\t\tconst finish = () => {\n\t\t\t\tif (done) return;\n\t\t\t\tif (period != null) {\n\t\t\t\t\tctx.down([[\"DATA\", count++]]);\n\t\t\t\t\tiv = setInterval(() => {\n\t\t\t\t\t\tif (done) return;\n\t\t\t\t\t\tctx.down([[\"DATA\", count++]]);\n\t\t\t\t\t}, period);\n\t\t\t\t} else {\n\t\t\t\t\t// One-shot: DATA then COMPLETE in one wave (terminal-is-forever).\n\t\t\t\t\tdone = true;\n\t\t\t\t\tsignal?.removeEventListener(\"abort\", onAbort);\n\t\t\t\t\tctx.down([[\"DATA\", count++], [\"COMPLETE\"]]);\n\t\t\t\t}\n\t\t\t};\n\t\t\tif (signal?.aborted) {\n\t\t\t\tonAbort();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsignal?.addEventListener(\"abort\", onAbort, { once: true });\n\t\t\tt = setTimeout(finish, ms);\n\t\t\treturn cleanup;\n\t\t},\n\t\t{ pool: \"sync\", pausable: false },\n\t);\n\tif (factory === \"timer\" && period === undefined && signal === undefined) {\n\t\treturn { ...op, restore: { ref: \"timer\", config: { ms: toCheckpointJson(ms, \"timer.ms\") } } };\n\t}\n\treturn op;\n}\n\n/**\n * Timer source: one-shot (first tick then COMPLETE) or periodic (`{period}` → 0, 1, 2, …).\n * sync pool + pausable:false (a timer keeps producing through PAUSE, R-pause-modes). Emits the\n * tick counter from 0; deactivation clears the timers.\n *\n * @param ms - Delay before the first tick in milliseconds.\n * @param opts - Optional period and source options.\n * @returns A source operator that emits tick counters.\n * @example\n * ```ts\n * import { graph, timer } from \"@graphrefly/ts\";\n *\n * const tick = graph().initNode(timer(100), []);\n * ```\n * @category sources\n */\nexport function timer(ms: number, opts?: TimerSourceOpts): Operator<never, number> {\n\treturn timerSource(\"timer\", ms, opts);\n}\n\n/**\n * Create a timer source with the legacy `fromTimer` factory name.\n *\n * @param ms - Delay before the first tick in milliseconds.\n * @param opts - Optional period and source options.\n * @returns A source operator that emits tick counters.\n * @example\n * ```ts\n * import { fromTimer, graph } from \"@graphrefly/ts\";\n *\n * const tick = graph().initNode(fromTimer(100), []);\n * ```\n * @remarks **Factory name:** This preserves the real `fromTimer` factory name in `describe()`.\n * @category sources\n */\nexport function fromTimer(ms: number, opts?: TimerSourceOpts): Operator<never, number> {\n\treturn timerSource(\"fromTimer\", ms, opts);\n}\n\n/**\n * Emit periodic tick counters.\n *\n * @param ms - Delay before the first tick and between later ticks in milliseconds.\n * @returns A source operator that emits `0`, `1`, `2`, and so on.\n * @example\n * ```ts\n * import { graph, interval } from \"@graphrefly/ts\";\n *\n * const ticks = graph().initNode(interval(1000), []);\n * ```\n * @category sources\n */\nexport function interval(ms: number): Operator<never, number> {\n\treturn timerSource(\"interval\", ms, { period: ms });\n}\n\n/**\n * Lift a Promise (or thenable) to a single-value stream: one DATA then COMPLETE, or ERROR on\n * rejection. async pool (default pausable → a paused source buffers its late emit). Optional\n * `signal` aborts to ERROR.\n *\n * @param p - Promise or thenable to lift into the graph.\n * @param opts - Optional abort signal and async source options.\n * @returns A source operator that emits one DATA value and COMPLETE, or ERROR on rejection/abort.\n * @example\n * ```ts\n * import { fromPromise, graph } from \"@graphrefly/ts\";\n *\n * const user = graph().initNode(fromPromise(fetch(\"/user\").then((res) => res.json())), []);\n * ```\n * @category sources\n */\nexport function fromPromise<T>(\n\tp: Promise<T> | PromiseLike<T>,\n\topts?: AsyncSourceOpts,\n): Operator<never, T> {\n\tconst signal = opts?.signal;\n\treturn source<T>(\n\t\t\"fromPromise\",\n\t\t(ctx) => {\n\t\t\tlet settled = false;\n\t\t\tconst onAbort = () => {\n\t\t\t\tif (settled) return;\n\t\t\t\tsettled = true;\n\t\t\t\t// onAbort only runs from a `signal` listener / the `signal.aborted` guard → signal is defined.\n\t\t\t\tctx.down([[\"ERROR\", errorPayload((signal as AbortSignal).reason)]]);\n\t\t\t};\n\t\t\tif (signal?.aborted) {\n\t\t\t\tonAbort();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsignal?.addEventListener(\"abort\", onAbort, { once: true });\n\t\t\tvoid Promise.resolve(p).then(\n\t\t\t\t(v) => {\n\t\t\t\t\tif (settled) return;\n\t\t\t\t\tsettled = true;\n\t\t\t\t\tsignal?.removeEventListener(\"abort\", onAbort);\n\t\t\t\t\tctx.down([[\"DATA\", v], [\"COMPLETE\"]]);\n\t\t\t\t},\n\t\t\t\t(e) => {\n\t\t\t\t\tif (settled) return;\n\t\t\t\t\tsettled = true;\n\t\t\t\t\tsignal?.removeEventListener(\"abort\", onAbort);\n\t\t\t\t\tctx.down([[\"ERROR\", errorPayload(e)]]);\n\t\t\t\t},\n\t\t\t);\n\t\t\treturn () => {\n\t\t\t\tsettled = true;\n\t\t\t\tsignal?.removeEventListener(\"abort\", onAbort);\n\t\t\t};\n\t\t},\n\t\t{ pool: \"async\" },\n\t);\n}\n\n/**\n * Read an async iterable: each value → DATA; COMPLETE when done; ERROR on failure. async pool.\n * Optional `signal` aborts the pump.\n *\n * @param iterable - Async iterable to pump into the graph.\n * @param opts - Optional abort signal and async source options.\n * @returns A source operator that emits every iterable value and then COMPLETE.\n * @example\n * ```ts\n * import { fromAsyncIter, graph } from \"@graphrefly/ts\";\n *\n * const stream = graph().initNode(fromAsyncIter(events()), []);\n * ```\n * @category sources\n */\nexport function fromAsyncIter<T>(\n\titerable: AsyncIterable<T>,\n\topts?: AsyncSourceOpts,\n): Operator<never, T> {\n\tconst outerSignal = opts?.signal;\n\treturn source<T>(\n\t\t\"fromAsyncIter\",\n\t\t(ctx) => {\n\t\t\tconst ac = new AbortController();\n\t\t\tconst onOuterAbort = () => ac.abort(outerSignal?.reason);\n\t\t\touterSignal?.addEventListener(\"abort\", onOuterAbort, { once: true });\n\t\t\tlet done = false;\n\t\t\tconst pump = async () => {\n\t\t\t\ttry {\n\t\t\t\t\tfor await (const v of iterable) {\n\t\t\t\t\t\tif (ac.signal.aborted) break;\n\t\t\t\t\t\tctx.down([[\"DATA\", v]]);\n\t\t\t\t\t}\n\t\t\t\t\tif (!ac.signal.aborted) ctx.down([[\"COMPLETE\"]]);\n\t\t\t\t} catch (e) {\n\t\t\t\t\tif (!ac.signal.aborted) ctx.down([[\"ERROR\", errorPayload(e)]]);\n\t\t\t\t} finally {\n\t\t\t\t\tdone = true;\n\t\t\t\t}\n\t\t\t};\n\t\t\tvoid pump();\n\t\t\treturn () => {\n\t\t\t\tif (!done) ac.abort();\n\t\t\t\touterSignal?.removeEventListener(\"abort\", onOuterAbort);\n\t\t\t};\n\t\t},\n\t\t{ pool: \"async\" },\n\t);\n}\n\n/**\n * of: synchronous values — each argument as DATA, then COMPLETE. `of()` is the EMPTY source.\n *\n * @param values - Values to emit synchronously on activation.\n * @returns A source operator that emits each value and then COMPLETE.\n * @example\n * ```ts\n * import { graph, of } from \"@graphrefly/ts\";\n *\n * const values = graph().initNode(of(1, 2, 3), []);\n * ```\n * @category sources\n */\nexport function of<T = never>(...values: T[]): Operator<never, T> {\n\treturn source<T>(\n\t\t\"of\",\n\t\t(ctx) => {\n\t\t\tfor (const value of values) ctx.down([[\"DATA\", value]]);\n\t\t\tctx.down([[\"COMPLETE\"]]);\n\t\t},\n\t\t{ pool: \"sync\" },\n\t);\n}\n\n/**\n * Emit every value from a synchronous iterable.\n *\n * @param iterable - Iterable whose values are emitted in order.\n * @returns A source operator that emits every iterable value and then COMPLETE.\n * @example\n * ```ts\n * import { fromIter, graph } from \"@graphrefly/ts\";\n *\n * const values = graph().initNode(fromIter([1, 2, 3]), []);\n * ```\n * @category sources\n */\nexport function fromIter<T>(iterable: Iterable<T>): Operator<never, T> {\n\treturn source<T>(\n\t\t\"fromIter\",\n\t\t(ctx) => {\n\t\t\tfor (const v of iterable) ctx.down([[\"DATA\", v]]);\n\t\t\tctx.down([[\"COMPLETE\"]]);\n\t\t},\n\t\t{ pool: \"sync\" },\n\t);\n}\n\n/**\n * Complete immediately without emitting DATA.\n *\n * @returns A source operator that emits COMPLETE on activation.\n * @example\n * ```ts\n * import { empty, graph } from \"@graphrefly/ts\";\n *\n * const done = graph().initNode(empty(), []);\n * ```\n * @category sources\n */\nexport function empty<T = never>(): Operator<never, T> {\n\treturn source<T>(\n\t\t\"empty\",\n\t\t(ctx) => {\n\t\t\tctx.down([[\"COMPLETE\"]]);\n\t\t},\n\t\t{ pool: \"sync\" },\n\t);\n}\n\n/**\n * Activate and remain silent until deactivation.\n *\n * @returns A source operator that never emits DATA or terminal messages by itself.\n * @example\n * ```ts\n * import { graph, never } from \"@graphrefly/ts\";\n *\n * const quiet = graph().initNode(never(), []);\n * ```\n * @category sources\n */\nexport function never<T = never>(): Operator<never, T> {\n\treturn source<T>(\"never\", () => undefined, { pool: \"sync\" });\n}\n\n/**\n * Terminate with ERROR on activation.\n *\n * @param err - Host-language error payload to normalize into a protocol ERROR payload.\n * @returns A source operator that emits ERROR.\n * @example\n * ```ts\n * import { graph, throwError } from \"@graphrefly/ts\";\n *\n * const failed = graph().initNode(throwError(new Error(\"boom\")), []);\n * ```\n * @category sources\n */\nexport function throwError(err: unknown): Operator<never, never> {\n\treturn source<never>(\n\t\t\"throwError\",\n\t\t(ctx) => {\n\t\t\tctx.down([[\"ERROR\", errorPayload(err)]]);\n\t\t},\n\t\t{ pool: \"sync\" },\n\t);\n}\n\n/**\n * Wrap a DOM-style event target. Each event becomes DATA; deactivation removes the listener.\n * External callbacks are source boundaries (D43), so no polling or operator-level async leaks in.\n *\n * @param target - Event target implementing `addEventListener` and `removeEventListener`.\n * @param type - Event type to subscribe to.\n * @param opts - Optional listener options and source options.\n * @returns A source operator that emits each event as DATA.\n * @example\n * ```ts\n * import { fromEvent, graph } from \"@graphrefly/ts\";\n *\n * const clicks = graph().initNode(fromEvent<MouseEvent>(button, \"click\"), []);\n * ```\n * @category sources\n */\nexport function fromEvent<T = unknown>(\n\ttarget: EventTargetLike,\n\ttype: string,\n\topts: FromEventOptions = {},\n): Operator<never, T> {\n\tif (target == null || typeof target.addEventListener !== \"function\") {\n\t\tthrow new TypeError(\"fromEvent: target must implement addEventListener\");\n\t}\n\tif (typeof target.removeEventListener !== \"function\") {\n\t\tthrow new TypeError(\"fromEvent: target must implement removeEventListener\");\n\t}\n\tif (typeof type !== \"string\" || type.length === 0) {\n\t\tthrow new TypeError(\"fromEvent: event type must be a non-empty string\");\n\t}\n\treturn source<T>(\n\t\t\"fromEvent\",\n\t\t(ctx) => {\n\t\t\tlet done = false;\n\t\t\tconst handler = (event: unknown) => {\n\t\t\t\tif (!done) ctx.down([[\"DATA\", event as T]]);\n\t\t\t};\n\t\t\ttarget.addEventListener(type, handler, opts);\n\t\t\treturn () => {\n\t\t\t\tdone = true;\n\t\t\t\ttarget.removeEventListener(type, handler, opts);\n\t\t\t};\n\t\t},\n\t\t{ pool: \"sync\" },\n\t);\n}\n\n/**\n * Wrap a host push transport. The host owns network/native setup; this factory owns reactive\n * delivery and teardown only, preserving async-at-source-boundary discipline.\n */\nexport function fromPushNotification<T = unknown>(register: PushRegister<T>): Operator<never, T> {\n\tif (typeof register !== \"function\") {\n\t\tthrow new TypeError(\"fromPushNotification: register must be a function\");\n\t}\n\treturn source<T>(\n\t\t\"fromPushNotification\",\n\t\t(ctx) => {\n\t\t\tlet done = false;\n\t\t\tconst deliver = (payload: T) => {\n\t\t\t\tif (!done) ctx.down([[\"DATA\", payload]]);\n\t\t\t};\n\t\t\tconst unsubscribe = register(deliver);\n\t\t\treturn () => {\n\t\t\t\tdone = true;\n\t\t\t\tif (typeof unsubscribe === \"function\") unsubscribe();\n\t\t\t};\n\t\t},\n\t\t{ pool: \"sync\" },\n\t);\n}\n\n/**\n * Coerce a {@link NodeInput}`<T>` to a `Node<T>` (D43 — coercion prerequisite for the CSP-2.7\n * higher-order operators). An existing Node passes through; a thenable → {@link fromPromise};\n * an async iterable → {@link fromAsyncIter}; with `{iter:true}` a sync iterable →\n * {@link fromIter}; everything else → {@link of}. Coerced nodes are bare (use\n * `opts.dispatcher` to bind one, default = process-global D26).\n */\nexport function fromAny<T>(\n\tinput: NodeInput<T>,\n\topts: NodeOptions<T> & { iter?: boolean } = {},\n): Node<T> {\n\tif (isNode(input)) return input as Node<T>;\n\tconst { iter, ...nodeOpts } = opts;\n\tif (isThenable(input)) {\n\t\treturn initNode(fromPromise(input as PromiseLike<T>), [], nodeOpts);\n\t}\n\tif (input !== null && input !== undefined) {\n\t\tconst candidate = input as {\n\t\t\t[Symbol.asyncIterator]?: unknown;\n\t\t\t[Symbol.iterator]?: unknown;\n\t\t};\n\t\tif (typeof candidate[Symbol.asyncIterator] === \"function\") {\n\t\t\treturn initNode(fromAsyncIter(input as AsyncIterable<T>), [], nodeOpts);\n\t\t}\n\t\tif (iter === true && typeof candidate[Symbol.iterator] === \"function\") {\n\t\t\treturn initNode(fromIter(input as Iterable<T>), [], nodeOpts);\n\t\t}\n\t}\n\treturn initNode(of(input as T), [], nodeOpts);\n}\n\n/**\n * Resolve the first DATA from a Node as a Promise. This is a host-boundary escape hatch, not a\n * graph operator; do not call it from reactive node bodies. ERROR rejects, and COMPLETE before DATA\n * rejects because no value exists.\n */\nexport function firstValueFrom<T>(source: Node<T>): Promise<T> {\n\treturn new Promise<T>((resolve, reject) => {\n\t\tlet settled = false;\n\t\tlet shouldUnsub = false;\n\t\tlet unsub: (() => void) | undefined;\n\t\tconst finish = (f: () => void): void => {\n\t\t\tif (settled) return;\n\t\t\tsettled = true;\n\t\t\tf();\n\t\t\tif (unsub) {\n\t\t\t\tunsub();\n\t\t\t\tunsub = undefined;\n\t\t\t} else {\n\t\t\t\tshouldUnsub = true;\n\t\t\t}\n\t\t};\n\t\tunsub = source.subscribe((msg) => {\n\t\t\tif (msg[0] === \"DATA\") {\n\t\t\t\tfinish(() => resolve(msg[1] as T));\n\t\t\t} else if (msg[0] === \"ERROR\") {\n\t\t\t\tfinish(() => reject(msg[1]));\n\t\t\t} else if (msg[0] === \"COMPLETE\") {\n\t\t\t\tfinish(() => reject(new Error(\"firstValueFrom: completed without DATA\")));\n\t\t\t} else if (msg[0] === \"TEARDOWN\") {\n\t\t\t\tfinish(() => reject(new Error(\"firstValueFrom: torn down without DATA\")));\n\t\t\t}\n\t\t});\n\t\tif (shouldUnsub) {\n\t\t\tunsub?.();\n\t\t\tunsub = undefined;\n\t\t}\n\t});\n}\n\nfunction singleFromAnyValue<T>(value: T): T {\n\tif (value === undefined) {\n\t\tthrow new TypeError(\"singleFromAny: undefined is the substrate SENTINEL\");\n\t}\n\treturn value;\n}\n\nasync function firstFromAsyncIterable<T>(input: AsyncIterable<T>): Promise<T> {\n\tconst iter = input[Symbol.asyncIterator]();\n\tconst { value, done } = await iter.next();\n\tif (done) {\n\t\tawait iter.return?.();\n\t\tthrow new Error(\"singleFromAny: factory returned empty async iterable\");\n\t}\n\ttry {\n\t\tawait iter.return?.();\n\t} catch {\n\t\t// The first value is the bridge result; close failures after that are cleanup-only.\n\t}\n\treturn value as T;\n}\n\nfunction firstFromIterable<T>(input: Iterable<T>): Promise<T> {\n\tconst iter = input[Symbol.iterator]();\n\tconst { value, done } = iter.next();\n\tif (done) {\n\t\titer.return?.();\n\t\treturn Promise.reject(new Error(\"singleFromAny: factory returned empty iterable\"));\n\t}\n\ttry {\n\t\titer.return?.();\n\t} catch {\n\t\t// The first value is the bridge result; close failures after that are cleanup-only.\n\t}\n\treturn Promise.resolve(value as T);\n}\n\nfunction nodeInputToPromise<T>(input: NodeInput<T>, opts: { iter?: boolean }): Promise<T> {\n\tif (isThenable(input)) return Promise.resolve(input as PromiseLike<T>).then(singleFromAnyValue);\n\tif (isNode(input)) return firstValueFrom(input as Node<T>).then(singleFromAnyValue);\n\tif (isAsyncIterable<T>(input)) return firstFromAsyncIterable(input).then(singleFromAnyValue);\n\tif (opts.iter === true && isIterable<T>(input)) {\n\t\treturn firstFromIterable(input).then(singleFromAnyValue);\n\t}\n\tif (input === undefined) {\n\t\treturn Promise.reject(new TypeError(\"singleFromAny: undefined is the substrate SENTINEL\"));\n\t}\n\treturn Promise.resolve(singleFromAnyValue(input as T));\n}\n\n/**\n * Keyed singleflight over {@link NodeInput}. Concurrent calls with the same key share one Promise;\n * once that input resolves/rejects, the in-flight entry is cleared and a later call re-runs the\n * factory. Host-boundary helper only; it does not create graph topology.\n */\nexport function singleFromAny<K, T>(\n\tfactory: (key: K) => NodeInput<T>,\n\topts: SingleFromAnyOptions<K> = {},\n): (key: K) => Promise<T> {\n\tconst keyOf = opts.keyOf ?? ((key: K): unknown => key);\n\tconst inFlight = new Map<unknown, Promise<T>>();\n\n\treturn (key: K): Promise<T> => {\n\t\tconst dedupeKey = keyOf(key);\n\t\tconst existing = inFlight.get(dedupeKey);\n\t\tif (existing) return existing;\n\n\t\tlet resolvePending!: (value: T) => void;\n\t\tlet rejectPending!: (reason: unknown) => void;\n\t\tlet tracked!: Promise<T>;\n\t\tconst cleanup = (): void => {\n\t\t\tif (inFlight.get(dedupeKey) === tracked) inFlight.delete(dedupeKey);\n\t\t};\n\t\tconst pending = new Promise<T>((resolve, reject) => {\n\t\t\tresolvePending = resolve;\n\t\t\trejectPending = reject;\n\t\t});\n\t\ttracked = pending.then(\n\t\t\t(value) => {\n\t\t\t\tcleanup();\n\t\t\t\treturn value;\n\t\t\t},\n\t\t\t(error) => {\n\t\t\t\tcleanup();\n\t\t\t\tthrow error;\n\t\t\t},\n\t\t);\n\t\tinFlight.set(dedupeKey, tracked);\n\t\ttry {\n\t\t\tnodeInputToPromise(factory(key), opts).then(resolvePending, rejectPending);\n\t\t} catch (e) {\n\t\t\trejectPending(e);\n\t\t}\n\t\treturn tracked;\n\t};\n}\n","/**\n * Focused NestJS boundary bindings for GraphReFly (D474/D478).\n *\n * This subpath stays dependency-light: it exposes graph boundary primitives,\n * token/provider shapes, and decorator metadata without importing Nest itself.\n * User-land Nest modules/controllers bind these helpers to real decorators and\n * host lifecycle objects at the framework edge.\n */\n\nimport type { DataIssue } from \"../data/index.js\";\nimport type { Graph } from \"../graph/graph.js\";\nimport type { Node } from \"../node/node.js\";\nimport type { Message } from \"../protocol/messages.js\";\n\nexport const NEST_BOUNDARY_ENVELOPE_VERSION = 1;\nexport const NEST_BOUNDARY_PAYLOAD_MAX_BYTES = 64 * 1024;\nexport const NEST_HTTP_DIAGNOSTICS_MAX_RETAINED = 100;\n\n/** D478 minimal graph-visible transport envelope. Payload must be data-only. */\nexport interface NestBoundaryEnvelope<T = unknown> {\n\treadonly bindingId: string;\n\treadonly version: number;\n\treadonly payload: T;\n\treadonly requestId?: string;\n}\n\n/** Reply-capable egress must carry host-private request correlation (D478). */\nexport type NestReplyEnvelope<T = unknown> = NestBoundaryEnvelope<T> & {\n\treadonly requestId: string;\n};\n\nexport type NestBoundaryKind =\n\t| \"request\"\n\t| \"guard\"\n\t| \"interceptor\"\n\t| \"error\"\n\t| \"lifecycle\"\n\t| \"cron\"\n\t| \"diagnostics\"\n\t| \"ws\"\n\t| \"message\";\n\nexport type NestEgressKind = \"http\" | \"guard-decision\" | \"ws-ack\" | \"ws-reply\" | \"message-reply\";\nexport type NestFilterMode = \"handle\" | \"observe\";\nexport type NestDiagnosticPhase =\n\t| \"adapter\"\n\t| \"http\"\n\t| \"guard\"\n\t| \"filter\"\n\t| \"cron\"\n\t| \"lifecycle\"\n\t| \"ws\"\n\t| \"message\"\n\t| NestBoundaryKind\n\t| NestEgressKind;\n\nexport interface NestHttpResponsePayload<TBody = unknown> {\n\treadonly status: number;\n\treadonly body?: TBody;\n\treadonly headers?: Record<string, string>;\n}\n\nexport interface HttpDataIssue extends DataIssue {\n\treadonly status: number;\n\treadonly body?: unknown;\n\treadonly headers?: Record<string, string>;\n}\n\nexport type NestIssueResponse<THost = unknown> = (\n\tissue: DataIssue,\n\thost: THost,\n) => NestHttpResponsePayload;\n\nexport type NestProtocolErrorResponse<THost = unknown> = (\n\terrorPayload: unknown,\n\thost: THost,\n) => NestHttpResponsePayload;\n\nexport type GraphGuardDecision =\n\t| {\n\t\t\treadonly kind: \"allow\";\n\t\t\treadonly reason?: string;\n\t\t\treadonly metadata?: Record<string, unknown>;\n\t }\n\t| {\n\t\t\treadonly kind: \"deny\";\n\t\t\treadonly reason?: string;\n\t\t\treadonly status?: number;\n\t\t\treadonly body?: unknown;\n\t\t\treadonly headers?: Record<string, string>;\n\t\t\treadonly issue?: DataIssue | HttpDataIssue;\n\t\t\treadonly metadata?: Record<string, unknown>;\n\t };\n\nexport interface NestBoundaryDiagnostic {\n\treadonly kind:\n\t\t| \"binding-mismatch\"\n\t\t| \"dispose-pending\"\n\t\t| \"malformed-egress\"\n\t\t| \"stale-egress\"\n\t\t| \"terminal-egress\"\n\t\t| \"timeout\"\n\t\t| \"resolve-threw\"\n\t\t| \"reject-threw\";\n\treadonly phase?: NestDiagnosticPhase;\n\treadonly requestId?: string;\n\treadonly bindingId?: string;\n\treadonly expectedBindingId?: string;\n\treadonly message: string;\n\treadonly error?: unknown;\n}\n\nexport interface NestDiagnosticErrorPayload {\n\treadonly name?: string;\n\treadonly message: string;\n}\n\nexport interface NestDiagnosticPayload {\n\treadonly kind: NestBoundaryDiagnostic[\"kind\"];\n\treadonly phase: NestDiagnosticPhase;\n\treadonly requestId?: string;\n\treadonly bindingId?: string;\n\treadonly expectedBindingId?: string;\n\treadonly message: string;\n\treadonly error?: NestDiagnosticErrorPayload;\n}\n\nexport interface NestDiagnosticInput extends NestBoundaryDiagnostic {\n\treadonly phase?: NestDiagnosticPhase;\n}\n\nexport interface NestDiagnosticsOptions\n\textends Omit<NestIngressOptions<NestDiagnosticInput, NestDiagnosticPayload>, \"payload\"> {\n\treadonly phase?: NestDiagnosticPhase;\n}\n\nexport type NestDiagnosticIngressBoundary = NestIngressBoundary<\n\tNestDiagnosticInput,\n\tNestDiagnosticPayload\n>;\n\nexport interface NestIngressBoundary<THost = unknown, TPayload = THost> {\n\treadonly kind: NestBoundaryKind;\n\treadonly bindingId: string;\n\treadonly version: number;\n\treadonly node: Node<NestBoundaryEnvelope<TPayload>>;\n\tenvelope(host: THost, opts?: NestIngressEmitOptions<TPayload>): NestBoundaryEnvelope<TPayload>;\n\temit(host: THost, opts?: NestIngressEmitOptions<TPayload>): NestBoundaryEnvelope<TPayload>;\n}\n\nexport interface NestIngressOptions<THost, TPayload> {\n\treadonly bindingId?: string;\n\treadonly name?: string;\n\treadonly version?: number;\n\treadonly maxPayloadBytes?: number;\n\treadonly requestId?: string | ((host: THost) => string | undefined);\n\treadonly requireRequestId?: boolean;\n\treadonly payload?: (host: THost) => TPayload;\n}\n\nexport interface NestIngressEmitOptions<TPayload> {\n\treadonly requestId?: string;\n\treadonly bindingId?: string;\n\treadonly version?: number;\n\treadonly payload?: TPayload;\n\treadonly requireRequestId?: boolean;\n}\n\nexport interface NestReplyResponseHandle<TPayload> {\n\tresolve(payload: TPayload, envelope: NestReplyEnvelope<TPayload>): void;\n\treject(error: unknown, envelope?: NestReplyEnvelope<TPayload>): void;\n}\n\nexport interface NestReplyPendingRegistration<TPayload> {\n\treadonly requestId: string;\n\treadonly handle: NestReplyResponseHandle<TPayload>;\n\treadonly bindingId?: string;\n}\n\nexport interface NestReplyBoundary<TPayload = unknown> {\n\treadonly kind: NestEgressKind;\n\treadonly bindingId: string;\n\tattach(registration: NestReplyPendingRegistration<TPayload>): () => boolean;\n\tpendingCount(): number;\n\tdiagnostics(): readonly NestBoundaryDiagnostic[];\n\tdispose(): void;\n}\n\nexport interface NestHttpResponseHandle<TPayload> extends NestReplyResponseHandle<TPayload> {}\n\nexport interface NestHttpPendingRegistration<TPayload>\n\textends NestReplyPendingRegistration<TPayload> {}\n\nexport interface NestHttpBoundary<TPayload = unknown> extends NestReplyBoundary<TPayload> {\n\treadonly kind: \"http\";\n}\n\nexport interface ToNestHttpOptions<TPayload> {\n\treadonly bindingId?: string;\n\treadonly diagnosticBoundary?: NestDiagnosticIngressBoundary;\n\treadonly diagnosticPhase?: NestDiagnosticPhase;\n\treadonly maxDiagnostics?: number;\n\treadonly maxPayloadBytes?: number;\n\treadonly name?: string;\n\treadonly transform?: (payload: TPayload, envelope: NestReplyEnvelope<TPayload>) => TPayload;\n\treadonly label?: string;\n}\n\ninterface NestReplyPendingEntry<TPayload> {\n\treadonly requestId: string;\n\treadonly bindingId?: string;\n\treadonly handle: NestReplyResponseHandle<TPayload>;\n}\n\ninterface NestHttpPendingEntry<TPayload> extends NestReplyPendingEntry<TPayload> {}\n\nexport interface NestBoundaryDecoratorOptions<THost = unknown, TPayload = unknown> {\n\treadonly bindingId?: string;\n\treadonly payload?: (host: THost) => TPayload;\n\treadonly requestId?: string | ((host: THost) => string | undefined);\n\treadonly order?: number;\n}\n\nexport interface NestFilterDecoratorOptions<THost = unknown, TPayload = unknown>\n\textends NestBoundaryDecoratorOptions<THost, TPayload> {\n\treadonly mode?: NestFilterMode;\n\treadonly issueResponse?: NestIssueResponse<THost>;\n\treadonly protocolError?: NestProtocolErrorResponse<THost>;\n}\n\nexport interface NestHttpReplyDecoratorOptions<THost = unknown> {\n\treadonly bindingId: string;\n\treadonly order?: number;\n\treadonly issueResponse?: NestIssueResponse<THost>;\n\treadonly protocolError?: NestProtocolErrorResponse<THost>;\n}\n\nexport interface NestGuardDecisionDecoratorOptions<THost = unknown> {\n\treadonly bindingId: string;\n\treadonly order?: number;\n\treadonly issueResponse?: NestIssueResponse<THost>;\n\treadonly protocolError?: NestProtocolErrorResponse<THost>;\n}\n\nexport interface NestGraphRunOptions<THost = unknown> {\n\treadonly requestId?: string | ((host: THost) => string | undefined);\n}\n\nexport interface NestGraphBoundaryRunnerOptions {\n\treadonly diagnosticBoundary?: NestDiagnosticIngressBoundary;\n\treadonly diagnosticPhase?: NestDiagnosticPhase;\n}\n\nexport interface NestGraphBoundaryRunner {\n\trun<THost = unknown>(\n\t\ttarget: DecoratorHostConstructor | object,\n\t\tmethodKey: string | symbol,\n\t\thost: THost,\n\t\topts?: NestGraphRunOptions<THost>,\n\t): Promise<unknown> | undefined;\n\tdispose(): void;\n}\n\nexport interface NestExecutionContextLike {\n\tgetClass(): DecoratorHostConstructor;\n\tgetHandler(): DecoratorBoundMethod;\n\tswitchToHttp?(): { getRequest<T = unknown>(): T };\n}\n\nexport interface NestCallHandlerLike {\n\thandle(): unknown;\n}\n\nexport interface NestGraphBoundaryInterceptorOptions<THost = unknown>\n\textends NestGraphRunOptions<THost>,\n\t\tNestGraphBoundaryRunnerOptions {\n\treadonly host?: (context: NestExecutionContextLike) => THost;\n\treadonly runner?: NestGraphBoundaryRunner;\n}\n\nexport interface NestGraphBoundaryInterceptor {\n\tintercept(\n\t\tcontext: NestExecutionContextLike,\n\t\tnext?: NestCallHandlerLike,\n\t): Promise<unknown> | unknown;\n\tdispose(): void;\n}\n\n/** Injection token for a root graph singleton. */\nexport const GRAPHREFLY_ROOT_GRAPH = Symbol.for(\"graphrefly:root-graph\");\n\n/** Injection token for adapter module options. */\nexport const GRAPHREFLY_MODULE_OPTIONS = Symbol.for(\"graphrefly:module-options\");\n\n/** Injection token for a request-scoped graph. */\nexport const GRAPHREFLY_REQUEST_GRAPH = Symbol.for(\"graphrefly:request-graph\");\n\nexport type DecoratorHostConstructor = abstract new (...args: unknown[]) => unknown;\nexport type DecoratorBoundMethod = (...args: unknown[]) => unknown;\n\nexport interface OnGraphEventMeta {\n\tnodeName: string;\n\tmethodKey: string | symbol;\n}\n\nexport interface GraphIntervalMeta {\n\tms: number;\n\tmethodKey: string | symbol;\n}\n\nexport interface GraphCronMeta {\n\texpr: string;\n\tmethodKey: string | symbol;\n}\n\nexport type NestBoundaryBindingDirection = \"ingress\" | \"egress\";\n\nexport interface NestIngressBindingMeta {\n\treadonly direction: \"ingress\";\n\tkind: NestBoundaryKind;\n\tbindingId: string;\n\tmethodKey: string | symbol;\n\treadonly boundary: NestIngressBoundary<unknown, unknown>;\n\treadonly payload?: (host: unknown) => unknown;\n\treadonly requestId?: string | ((host: unknown) => string | undefined);\n\treadonly order?: number;\n\treadonly mode?: NestFilterMode;\n\treadonly issueResponse?: NestIssueResponse<unknown>;\n\treadonly protocolError?: NestProtocolErrorResponse<unknown>;\n}\n\nexport interface NestHttpReplyBindingMeta {\n\treadonly direction: \"egress\";\n\treadonly kind: \"http\";\n\treadonly bindingId: string;\n\treadonly methodKey: string | symbol;\n\treadonly replyNode: Node<NestReplyEnvelope<unknown>>;\n\treadonly order?: number;\n\treadonly issueResponse?: NestIssueResponse<unknown>;\n\treadonly protocolError?: NestProtocolErrorResponse<unknown>;\n}\n\nexport interface NestGuardDecisionBindingMeta {\n\treadonly direction: \"egress\";\n\treadonly kind: \"guard-decision\";\n\treadonly bindingId: string;\n\treadonly methodKey: string | symbol;\n\treadonly decisionNode: Node<NestReplyEnvelope<GraphGuardDecision>>;\n\treadonly order?: number;\n\treadonly issueResponse?: NestIssueResponse<unknown>;\n\treadonly protocolError?: NestProtocolErrorResponse<unknown>;\n}\n\nexport interface NestWsAckBindingMeta {\n\treadonly direction: \"egress\";\n\treadonly kind: \"ws-ack\";\n\treadonly bindingId: string;\n\treadonly methodKey: string | symbol;\n\treadonly ackNode: Node<NestReplyEnvelope<unknown>>;\n\treadonly order?: number;\n}\n\nexport interface NestWsReplyBindingMeta {\n\treadonly direction: \"egress\";\n\treadonly kind: \"ws-reply\";\n\treadonly bindingId: string;\n\treadonly methodKey: string | symbol;\n\treadonly replyNode: Node<NestReplyEnvelope<unknown>>;\n\treadonly order?: number;\n}\n\nexport interface NestMessageReplyBindingMeta {\n\treadonly direction: \"egress\";\n\treadonly kind: \"message-reply\";\n\treadonly bindingId: string;\n\treadonly methodKey: string | symbol;\n\treadonly replyNode: Node<NestReplyEnvelope<unknown>>;\n\treadonly order?: number;\n}\n\nexport type NestBoundaryBindingMeta =\n\t| NestIngressBindingMeta\n\t| NestHttpReplyBindingMeta\n\t| NestGuardDecisionBindingMeta\n\t| NestWsAckBindingMeta\n\t| NestWsReplyBindingMeta\n\t| NestMessageReplyBindingMeta;\n\nexport const EVENT_HANDLERS = new WeakMap<DecoratorHostConstructor, OnGraphEventMeta[]>();\nexport const INTERVAL_HANDLERS = new WeakMap<DecoratorHostConstructor, GraphIntervalMeta[]>();\nexport const CRON_HANDLERS = new WeakMap<DecoratorHostConstructor, GraphCronMeta[]>();\nexport const NEST_BOUNDARY_BINDINGS = new WeakMap<\n\tDecoratorHostConstructor,\n\tNestBoundaryBindingMeta[]\n>();\n\nexport type GraphMethodDecorator = MethodDecorator &\n\t((value: DecoratorBoundMethod, context: ClassMethodDecoratorContext) => void);\n\n/** Minimal Nest provider object shape without importing @nestjs/common. */\nexport type NestProviderBinding<T = unknown> =\n\t| { readonly provide: string | symbol; readonly useValue: T }\n\t| { readonly provide: string | symbol; readonly useFactory: (...args: unknown[]) => T };\n\n/** Get the injection token for a named feature graph. */\nexport function getGraphToken(name: string): symbol {\n\tassertNonEmptyString(name, \"getGraphToken(name)\");\n\treturn Symbol.for(`graphrefly:graph:${name}`);\n}\n\n/** Get the injection token for a node at a qualified path. */\nexport function getNodeToken(path: string): symbol {\n\tassertNonEmptyString(path, \"getNodeToken(path)\");\n\treturn Symbol.for(`graphrefly:node:${path}`);\n}\n\n/** Get the injection token for a named Nest boundary binding. */\nexport function getNestBoundaryToken(bindingId: string): symbol {\n\tassertNonEmptyString(bindingId, \"getNestBoundaryToken(bindingId)\");\n\treturn Symbol.for(`graphrefly:nest-boundary:${bindingId}`);\n}\n\n/** Build a dependency-free provider binding shape for user-land Nest modules. */\nexport function nestProvider<T>(provide: string | symbol, useValue: T): NestProviderBinding<T> {\n\treturn { provide, useValue };\n}\n\n/** D474 P0 HTTP request ingress. */\nexport function fromNestReq<THost = unknown, TPayload = THost>(\n\tgraph: Graph,\n\topts: NestIngressOptions<THost, TPayload> = {},\n): NestIngressBoundary<THost, TPayload> {\n\treturn nestIngress(graph, \"request\", opts);\n}\n\n/** D474 P0 guard/admission ingress. */\nexport function fromNestGuard<THost = unknown, TPayload = THost>(\n\tgraph: Graph,\n\topts: NestIngressOptions<THost, TPayload> = {},\n): NestIngressBoundary<THost, TPayload> {\n\treturn nestIngress(graph, \"guard\", opts);\n}\n\n/** D474 P1 interceptor ingress. */\nexport function fromNestIntercept<THost = unknown, TPayload = THost>(\n\tgraph: Graph,\n\topts: NestIngressOptions<THost, TPayload> = {},\n): NestIngressBoundary<THost, TPayload> {\n\treturn nestIngress(graph, \"interceptor\", opts);\n}\n\n/** D474 P0 error/filter ingress. */\nexport function fromNestError<THost = unknown, TPayload = THost>(\n\tgraph: Graph,\n\topts: NestIngressOptions<THost, TPayload> = {},\n): NestIngressBoundary<THost, TPayload> {\n\treturn nestIngress(graph, \"error\", opts);\n}\n\n/** D474 P1 Nest lifecycle hook ingress. */\nexport function fromNestLifecycle<THost = unknown, TPayload = THost>(\n\tgraph: Graph,\n\topts: NestIngressOptions<THost, TPayload> = {},\n): NestIngressBoundary<THost, TPayload> {\n\treturn nestIngress(graph, \"lifecycle\", opts);\n}\n\n/** D474 P1 schedule/cron ingress. */\nexport function fromNestCron<THost = unknown, TPayload = THost>(\n\tgraph: Graph,\n\topts: NestIngressOptions<THost, TPayload> = {},\n): NestIngressBoundary<THost, TPayload> {\n\treturn nestIngress(graph, \"cron\", opts);\n}\n\n/** D494 explicit graph-visible diagnostics ingress. Emits sanitized data-only payloads. */\nexport function fromNestDiagnostics(\n\tgraph: Graph,\n\topts: NestDiagnosticsOptions = {},\n): NestDiagnosticIngressBoundary {\n\treturn nestIngress<NestDiagnosticInput, NestDiagnosticPayload>(graph, \"diagnostics\", {\n\t\t...opts,\n\t\tpayload: (diagnostic) => sanitizeNestDiagnostic(diagnostic, opts.phase),\n\t});\n}\n\n/** D474 later/optional WebSocket ingress. Kept thin for first-slice experiments. */\nexport function fromNestWs<THost = unknown, TPayload = THost>(\n\tgraph: Graph,\n\topts: NestIngressOptions<THost, TPayload> = {},\n): NestIngressBoundary<THost, TPayload> {\n\treturn nestIngress(graph, \"ws\", opts);\n}\n\n/** D474 later/optional microservice/message ingress. */\nexport function fromNestMessage<THost = unknown, TPayload = THost>(\n\tgraph: Graph,\n\topts: NestIngressOptions<THost, TPayload> = {},\n): NestIngressBoundary<THost, TPayload> {\n\treturn nestIngress(graph, \"message\", opts);\n}\n\n/**\n * D474 HTTP egress resolver.\n *\n * The returned boundary owns only a host-private pending map. It never stores\n * response/socket/ack handles in graph DATA and only resolves handles whose\n * requestId (and optional bindingId) match an egress envelope.\n */\nexport function toNestHttp<TPayload = unknown>(\n\tegress: Node<NestReplyEnvelope<TPayload>>,\n\topts: ToNestHttpOptions<TPayload> = {},\n): NestHttpBoundary<TPayload> {\n\tconst bindingId = stableBindingId(\"http\", opts);\n\tconst scopedBindingId = opts.bindingId;\n\tconst maxDiagnostics = diagnosticsRetainedLimit(opts.maxDiagnostics);\n\tconst maxPayloadBytes = payloadByteLimit(opts.maxPayloadBytes);\n\tconst pending = new Map<string, NestHttpPendingEntry<TPayload>>();\n\tconst diagnostics: NestBoundaryDiagnostic[] = [];\n\tlet active = true;\n\tlet terminal:\n\t\t| {\n\t\t\t\treadonly error: unknown;\n\t\t\t\treadonly message: string;\n\t\t }\n\t\t| undefined;\n\n\tconst report = (diagnostic: NestBoundaryDiagnostic) => {\n\t\tpushDiagnostic(diagnostics, diagnostic, maxDiagnostics);\n\t\ttry {\n\t\t\tconst phase = diagnostic.phase ?? opts.diagnosticPhase ?? \"http\";\n\t\t\tconst payload = sanitizeNestDiagnostic({ ...diagnostic, phase }, phase);\n\t\t\topts.diagnosticBoundary?.emit(payload, { payload });\n\t\t} catch {\n\t\t\t// Graph-visible diagnostics are optional and must not interrupt host cleanup.\n\t\t}\n\t};\n\tconst keyOf = (requestId: string, requestBindingId?: string) =>\n\t\trequestBindingId === undefined ? requestId : `${requestBindingId}\\u0000${requestId}`;\n\tconst rejectEntry = (\n\t\tentry: NestHttpPendingEntry<TPayload>,\n\t\terror: unknown,\n\t\tenvelope: NestReplyEnvelope<TPayload> | undefined,\n\t\tmessage: string,\n\t) => {\n\t\ttry {\n\t\t\tentry.handle.reject(error, envelope);\n\t\t} catch (rejectError) {\n\t\t\treport({\n\t\t\t\tkind: \"reject-threw\",\n\t\t\t\trequestId: entry.requestId,\n\t\t\t\tbindingId: entry.bindingId,\n\t\t\t\tmessage,\n\t\t\t\terror: rejectError,\n\t\t\t});\n\t\t}\n\t};\n\tconst rejectPending = (\n\t\tkind: \"dispose-pending\" | \"terminal-egress\",\n\t\terror: unknown,\n\t\tmessage: string,\n\t): number => {\n\t\tconst entries = [...pending.values()];\n\t\tpending.clear();\n\t\tif (entries.length === 0) return 0;\n\t\treport({ kind, bindingId: scopedBindingId, message, error });\n\t\tfor (const entry of entries) {\n\t\t\trejectEntry(entry, error, undefined, `toNestHttp(${bindingId}) pending reject threw`);\n\t\t}\n\t\treturn entries.length;\n\t};\n\n\tconst unsubscribe = egress.subscribe((msg: Message) => {\n\t\tif (!active) return;\n\t\tif (msg[0] === \"ERROR\" || msg[0] === \"COMPLETE\" || msg[0] === \"TEARDOWN\") {\n\t\t\tconst error =\n\t\t\t\tmsg[0] === \"ERROR\"\n\t\t\t\t\t? msg[1]\n\t\t\t\t\t: new Error(`toNestHttp(${bindingId}) egress received ${msg[0]}`);\n\t\t\tconst message = `toNestHttp(${bindingId}) rejected pending requests after ${msg[0]}`;\n\t\t\tterminal = { error, message };\n\t\t\tconst rejectedCount = rejectPending(\"terminal-egress\", error, message);\n\t\t\tif (rejectedCount === 0)\n\t\t\t\treport({ kind: \"terminal-egress\", bindingId: scopedBindingId, message, error });\n\t\t\treturn;\n\t\t}\n\t\tif (msg[0] !== \"DATA\") return;\n\t\tconst envelope = msg[1] as NestReplyEnvelope<TPayload>;\n\t\tconst malformed = validateEnvelope(envelope, maxPayloadBytes);\n\t\tif (malformed !== undefined) {\n\t\t\tconst correlated = malformedCorrelation(msg[1], scopedBindingId);\n\t\t\tif (correlated !== undefined) {\n\t\t\t\tconst pendingKey = keyOf(correlated.requestId, scopedBindingId);\n\t\t\t\tconst entry = pending.get(pendingKey);\n\t\t\t\tif (entry !== undefined) {\n\t\t\t\t\tpending.delete(pendingKey);\n\t\t\t\t\trejectEntry(\n\t\t\t\t\t\tentry,\n\t\t\t\t\t\tnew Error(malformed),\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t`toNestHttp(${bindingId}) rejected malformed correlated egress`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\treport({\n\t\t\t\tkind: \"malformed-egress\",\n\t\t\t\trequestId: correlated?.requestId,\n\t\t\t\tbindingId: correlated?.bindingId,\n\t\t\t\tmessage: malformed,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (scopedBindingId !== undefined && envelope.bindingId !== scopedBindingId) {\n\t\t\treport({\n\t\t\t\tkind: \"binding-mismatch\",\n\t\t\t\trequestId: envelope.requestId,\n\t\t\t\tbindingId: envelope.bindingId,\n\t\t\t\texpectedBindingId: scopedBindingId,\n\t\t\t\tmessage: `toNestHttp(${bindingId}) ignored egress for binding ${envelope.bindingId}`,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst pendingKey = keyOf(envelope.requestId, scopedBindingId);\n\t\tconst entry = pending.get(pendingKey);\n\t\tif (entry === undefined) {\n\t\t\treport({\n\t\t\t\tkind: \"stale-egress\",\n\t\t\t\trequestId: envelope.requestId,\n\t\t\t\tbindingId: envelope.bindingId,\n\t\t\t\tmessage: `toNestHttp(${bindingId}) ignored stale requestId ${envelope.requestId}`,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tpending.delete(pendingKey);\n\t\ttry {\n\t\t\tentry.handle.resolve(\n\t\t\t\topts.transform?.(envelope.payload, envelope) ?? envelope.payload,\n\t\t\t\tenvelope,\n\t\t\t);\n\t\t} catch (error) {\n\t\t\treport({\n\t\t\t\tkind: \"resolve-threw\",\n\t\t\t\trequestId: envelope.requestId,\n\t\t\t\tbindingId: envelope.bindingId,\n\t\t\t\tmessage: `toNestHttp(${bindingId}) response handle threw while resolving`,\n\t\t\t\terror,\n\t\t\t});\n\t\t\trejectEntry(\n\t\t\t\tentry,\n\t\t\t\terror,\n\t\t\t\tenvelope,\n\t\t\t\t`toNestHttp(${bindingId}) response handle threw while rejecting`,\n\t\t\t);\n\t\t}\n\t});\n\n\treturn {\n\t\tkind: \"http\",\n\t\tbindingId,\n\t\tattach(registration) {\n\t\t\tif (!active) throw new Error(`toNestHttp(${bindingId}) is disposed`);\n\t\t\tassertNonEmptyString(registration.requestId, \"toNestHttp.attach(requestId)\");\n\t\t\tconst registrationBindingId = registration.bindingId ?? scopedBindingId;\n\t\t\tif (scopedBindingId !== undefined && registrationBindingId !== scopedBindingId) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`toNestHttp.attach expected bindingId ${scopedBindingId}, got ${registrationBindingId}`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (terminal !== undefined) {\n\t\t\t\tconst entry = {\n\t\t\t\t\trequestId: registration.requestId,\n\t\t\t\t\tbindingId: registrationBindingId,\n\t\t\t\t\thandle: registration.handle,\n\t\t\t\t};\n\t\t\t\treport({\n\t\t\t\t\tkind: \"terminal-egress\",\n\t\t\t\t\trequestId: registration.requestId,\n\t\t\t\t\tbindingId: registrationBindingId,\n\t\t\t\t\tmessage: terminal.message,\n\t\t\t\t\terror: terminal.error,\n\t\t\t\t});\n\t\t\t\trejectEntry(\n\t\t\t\t\tentry,\n\t\t\t\t\tterminal.error,\n\t\t\t\t\tundefined,\n\t\t\t\t\t`toNestHttp(${bindingId}) terminal response handle reject threw`,\n\t\t\t\t);\n\t\t\t\treturn () => false;\n\t\t\t}\n\t\t\tconst key = keyOf(registration.requestId, scopedBindingId);\n\t\t\tif (pending.has(key)) {\n\t\t\t\tthrow new Error(`toNestHttp.attach duplicate pending requestId ${registration.requestId}`);\n\t\t\t}\n\t\t\tconst entry = {\n\t\t\t\trequestId: registration.requestId,\n\t\t\t\tbindingId: registrationBindingId,\n\t\t\t\thandle: registration.handle,\n\t\t\t};\n\t\t\tpending.set(key, entry);\n\t\t\treturn () => {\n\t\t\t\tif (pending.get(key) !== entry) return false;\n\t\t\t\treturn pending.delete(key);\n\t\t\t};\n\t\t},\n\t\tpendingCount: () => pending.size,\n\t\tdiagnostics: () => diagnostics.slice(),\n\t\tdispose() {\n\t\t\tif (!active) return;\n\t\t\tactive = false;\n\t\t\trejectPending(\n\t\t\t\t\"dispose-pending\",\n\t\t\t\tnew Error(`toNestHttp(${bindingId}) disposed before response resolution`),\n\t\t\t\t`toNestHttp(${bindingId}) rejected pending requests during dispose`,\n\t\t\t);\n\t\t\tunsubscribe();\n\t\t},\n\t};\n}\n\n/** D478 route-request decorator over an existing ingress boundary. */\nexport function GraphReq<THost = unknown, TPayload = unknown>(\n\tboundary: NestIngressBoundary<THost, TPayload>,\n\topts: NestBoundaryDecoratorOptions<THost, TPayload> = {},\n): GraphMethodDecorator {\n\treturn graphIngressBinding(\"request\", boundary, opts);\n}\n\n/** D478 route-guard decorator over an existing ingress boundary. */\nexport function GraphGuard<THost = unknown, TPayload = unknown>(\n\tboundary: NestIngressBoundary<THost, TPayload>,\n\topts: NestBoundaryDecoratorOptions<THost, TPayload> = {},\n): GraphMethodDecorator {\n\treturn graphIngressBinding(\"guard\", boundary, opts);\n}\n\n/** D478 route-interceptor decorator over an existing ingress boundary. */\nexport function GraphIntercept<THost = unknown, TPayload = unknown>(\n\tboundary: NestIngressBoundary<THost, TPayload>,\n\topts: NestBoundaryDecoratorOptions<THost, TPayload> = {},\n): GraphMethodDecorator {\n\treturn graphIngressBinding(\"interceptor\", boundary, opts);\n}\n\n/** D484 generic filter decorator over an existing ingress boundary. */\nexport function GraphFilter<THost = unknown, TPayload = unknown>(\n\tboundary: NestIngressBoundary<THost, TPayload>,\n\topts: NestFilterDecoratorOptions<THost, TPayload> = {},\n): GraphMethodDecorator {\n\treturn graphIngressBinding(\"error\", boundary, opts);\n}\n\n/** D484 exception-oriented sugar over GraphFilter. */\nexport function GraphError<THost = unknown, TPayload = unknown>(\n\tboundary: NestIngressBoundary<THost, TPayload>,\n\topts: NestFilterDecoratorOptions<THost, TPayload> = {},\n): GraphMethodDecorator {\n\treturn GraphFilter(boundary, opts);\n}\n\n/** D478 lifecycle decorator over an existing ingress boundary. */\nexport function GraphLifecycle<THost = unknown, TPayload = unknown>(\n\tboundary: NestIngressBoundary<THost, TPayload>,\n\topts: NestBoundaryDecoratorOptions<THost, TPayload> = {},\n): GraphMethodDecorator {\n\treturn graphIngressBinding(\"lifecycle\", boundary, opts);\n}\n\n/** D478 cron/schedule decorator over an existing ingress boundary. */\nexport function GraphCron<THost = unknown, TPayload = unknown>(\n\tboundary: NestIngressBoundary<THost, TPayload>,\n\topts: NestBoundaryDecoratorOptions<THost, TPayload> = {},\n): GraphMethodDecorator {\n\treturn graphIngressBinding(\"cron\", boundary, opts);\n}\n\n/** D488 WebSocket message ingress decorator over an existing boundary. */\nexport function GraphWs<THost = unknown, TPayload = unknown>(\n\tboundary: NestIngressBoundary<THost, TPayload>,\n\topts: NestBoundaryDecoratorOptions<THost, TPayload> = {},\n): GraphMethodDecorator {\n\treturn graphIngressBinding(\"ws\", boundary, opts);\n}\n\n/** D488 microservice/message ingress decorator over an existing boundary. */\nexport function GraphMessage<THost = unknown, TPayload = unknown>(\n\tboundary: NestIngressBoundary<THost, TPayload>,\n\topts: NestBoundaryDecoratorOptions<THost, TPayload> = {},\n): GraphMethodDecorator {\n\treturn graphIngressBinding(\"message\", boundary, opts);\n}\n\n/** D478 HTTP reply decorator over an existing reply node. */\nexport function GraphHttpReply<THost = unknown, TPayload = unknown>(\n\treplyNode: Node<NestReplyEnvelope<TPayload>>,\n\topts: NestHttpReplyDecoratorOptions<THost>,\n): GraphMethodDecorator {\n\tconst bindingId = opts?.bindingId;\n\tif (typeof bindingId !== \"string\" || bindingId.length === 0) {\n\t\tthrow new Error(\"GraphHttpReply requires a non-empty bindingId\");\n\t}\n\treturn registerMeta(NEST_BOUNDARY_BINDINGS, (methodKey) => ({\n\t\tdirection: \"egress\" as const,\n\t\tkind: \"http\" as const,\n\t\tbindingId,\n\t\tmethodKey,\n\t\treplyNode: replyNode as Node<NestReplyEnvelope<unknown>>,\n\t\torder: opts.order,\n\t\tissueResponse: opts.issueResponse as NestIssueResponse<unknown> | undefined,\n\t\tprotocolError: opts.protocolError as NestProtocolErrorResponse<unknown> | undefined,\n\t}));\n}\n\n/** D484 guard decision egress decorator over an existing reply-correlated decision node. */\nexport function GraphGuardDecision<THost = unknown>(\n\tdecisionNode: Node<NestReplyEnvelope<GraphGuardDecision>>,\n\topts: NestGuardDecisionDecoratorOptions<THost>,\n): GraphMethodDecorator {\n\tconst bindingId = opts?.bindingId;\n\tif (typeof bindingId !== \"string\" || bindingId.length === 0) {\n\t\tthrow new Error(\"GraphGuardDecision requires a non-empty bindingId\");\n\t}\n\treturn registerMeta(NEST_BOUNDARY_BINDINGS, (methodKey) => ({\n\t\tdirection: \"egress\" as const,\n\t\tkind: \"guard-decision\" as const,\n\t\tbindingId,\n\t\tmethodKey,\n\t\tdecisionNode,\n\t\torder: opts.order,\n\t\tissueResponse: opts.issueResponse as NestIssueResponse<unknown> | undefined,\n\t\tprotocolError: opts.protocolError as NestProtocolErrorResponse<unknown> | undefined,\n\t}));\n}\n\n/** D488 WebSocket acknowledgement egress decorator over an existing reply-correlated node. */\nexport function GraphWsAck<TPayload = unknown>(\n\tackNode: Node<NestReplyEnvelope<TPayload>>,\n\topts: { readonly bindingId: string; readonly order?: number },\n): GraphMethodDecorator {\n\treturn graphReplyBinding(\"ws-ack\", ackNode, opts, \"GraphWsAck\");\n}\n\n/** D488 WebSocket reply egress decorator over an existing reply-correlated node. */\nexport function GraphWsReply<TPayload = unknown>(\n\treplyNode: Node<NestReplyEnvelope<TPayload>>,\n\topts: { readonly bindingId: string; readonly order?: number },\n): GraphMethodDecorator {\n\treturn graphReplyBinding(\"ws-reply\", replyNode, opts, \"GraphWsReply\");\n}\n\n/** D488 microservice/message reply egress decorator over an existing reply-correlated node. */\nexport function GraphMessageReply<TPayload = unknown>(\n\treplyNode: Node<NestReplyEnvelope<TPayload>>,\n\topts: { readonly bindingId: string; readonly order?: number },\n): GraphMethodDecorator {\n\treturn graphReplyBinding(\"message-reply\", replyNode, opts, \"GraphMessageReply\");\n}\n\nexport function createNestGraphBoundaryRunner(\n\topts: NestGraphBoundaryRunnerOptions = {},\n): NestGraphBoundaryRunner {\n\tconst httpBoundaries = new Map<\n\t\tNode<NestReplyEnvelope<unknown>>,\n\t\tMap<string, NestHttpBoundary<unknown>>\n\t>();\n\tconst httpBoundaryFor = (\n\t\tnode: Node<NestReplyEnvelope<unknown>>,\n\t\tbindingId: string,\n\t): NestHttpBoundary<unknown> => {\n\t\tlet byBinding = httpBoundaries.get(node);\n\t\tif (byBinding === undefined) {\n\t\t\tbyBinding = new Map();\n\t\t\thttpBoundaries.set(node, byBinding);\n\t\t}\n\t\tlet boundary = byBinding.get(bindingId);\n\t\tif (boundary === undefined) {\n\t\t\tboundary = toNestHttp(node, {\n\t\t\t\tbindingId,\n\t\t\t\tdiagnosticBoundary: opts.diagnosticBoundary,\n\t\t\t\tdiagnosticPhase: opts.diagnosticPhase ?? \"http\",\n\t\t\t});\n\t\t\tbyBinding.set(bindingId, boundary);\n\t\t}\n\t\treturn boundary;\n\t};\n\n\treturn {\n\t\trun(target, methodKey, host, opts = {}) {\n\t\t\tconst ctor = typeof target === \"function\" ? target : target.constructor;\n\t\t\tconst bindings = getNestBoundaryBindings(ctor as DecoratorHostConstructor, methodKey);\n\t\t\tif (bindings.length === 0) return undefined;\n\t\t\tconst requestId = requestIdFromRunOptions(host, opts);\n\t\t\tconst replies = bindings.filter(isHttpReplyBinding);\n\t\t\tconst ingress = bindings.filter(\n\t\t\t\t(binding): binding is NestIngressBindingMeta =>\n\t\t\t\t\tbinding.direction === \"ingress\" &&\n\t\t\t\t\t(binding.kind === \"request\" || binding.kind === \"interceptor\"),\n\t\t\t);\n\t\t\tif (replies.length > 0 && ingress.length === 0) {\n\t\t\t\tthrow new Error(\"Nest GraphHttpReply requires at least one ingress boundary\");\n\t\t\t}\n\t\t\tconst ingressEmits = ingress.map((binding) => ({\n\t\t\t\tbinding,\n\t\t\t\trequestId: requestIdFromBinding(host, binding) ?? requestId,\n\t\t\t}));\n\t\t\tconst replyRequestIds = uniqueDefinedStrings(ingressEmits.map((entry) => entry.requestId));\n\t\t\tif (replies.length > 0 && replyRequestIds.length === 0) {\n\t\t\t\tthrow new Error(\"Nest GraphHttpReply requires a stable requestId\");\n\t\t\t}\n\t\t\tconst cleanups: Array<() => boolean> = [];\n\t\t\tlet resolveReply: ((value: unknown) => void) | undefined;\n\t\t\tlet rejectReply: ((reason?: unknown) => void) | undefined;\n\t\t\tconst replyPromise =\n\t\t\t\treplies.length === 0\n\t\t\t\t\t? undefined\n\t\t\t\t\t: new Promise<unknown>((resolve, reject) => {\n\t\t\t\t\t\t\tresolveReply = resolve;\n\t\t\t\t\t\t\trejectReply = reject;\n\t\t\t\t\t\t});\n\t\t\ttry {\n\t\t\t\tfor (const reply of replies) {\n\t\t\t\t\tconst http = httpBoundaryFor(reply.replyNode, reply.bindingId);\n\t\t\t\t\tfor (const replyRequestId of replyRequestIds) {\n\t\t\t\t\t\tcleanups.push(\n\t\t\t\t\t\t\thttp.attach({\n\t\t\t\t\t\t\t\trequestId: replyRequestId,\n\t\t\t\t\t\t\t\tbindingId: reply.bindingId,\n\t\t\t\t\t\t\t\thandle: {\n\t\t\t\t\t\t\t\t\tresolve: resolveReply ?? (() => undefined),\n\t\t\t\t\t\t\t\t\treject: rejectReply ?? (() => undefined),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (const entry of ingressEmits) {\n\t\t\t\t\tentry.binding.boundary.emit(host, {\n\t\t\t\t\t\tbindingId: entry.binding.bindingId,\n\t\t\t\t\t\trequestId: entry.requestId,\n\t\t\t\t\t\t...bindingPayloadEmitOption(host, entry.binding),\n\t\t\t\t\t\trequireRequestId: requiresRequestId(entry.binding.kind),\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tfor (const cleanup of cleanups) cleanup();\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\treturn replyPromise?.finally(() => {\n\t\t\t\tfor (const cleanup of cleanups) cleanup();\n\t\t\t});\n\t\t},\n\t\tdispose() {\n\t\t\tfor (const byBinding of httpBoundaries.values()) {\n\t\t\t\tfor (const boundary of byBinding.values()) boundary.dispose();\n\t\t\t}\n\t\t\thttpBoundaries.clear();\n\t\t},\n\t};\n}\n\nexport function createNestGraphBoundaryInterceptor<THost = unknown>(\n\topts: NestGraphBoundaryInterceptorOptions<THost> = {},\n): NestGraphBoundaryInterceptor {\n\tconst runner = opts.runner ?? createNestGraphBoundaryRunner(opts);\n\tlet nextRequestSeq = 1;\n\treturn {\n\t\tintercept(context, next) {\n\t\t\tconst ctor = context.getClass();\n\t\t\tconst handler = context.getHandler();\n\t\t\tconst methodKey = methodKeyForHandler(ctor, handler);\n\t\t\tif (methodKey === undefined) return next?.handle();\n\t\t\tconst bindings = getNestBoundaryBindings(ctor, methodKey);\n\t\t\tconst needsSyntheticRequestId = bindings.some(\n\t\t\t\t(binding) =>\n\t\t\t\t\tbinding.direction === \"egress\" ||\n\t\t\t\t\t(binding.direction === \"ingress\" && requiresRequestId(binding.kind)),\n\t\t\t);\n\t\t\tconst host =\n\t\t\t\topts.host?.(context) ??\n\t\t\t\t(defaultNestHttpHost(context, () => nextRequestSeq++, needsSyntheticRequestId) as THost) ??\n\t\t\t\t({} as THost);\n\t\t\tconst result = runner.run(ctor, methodKey, host, opts);\n\t\t\treturn result ?? next?.handle();\n\t\t},\n\t\tdispose() {\n\t\t\trunner.dispose();\n\t\t},\n\t};\n}\n\nexport function getNestBoundaryBindings(\n\ttarget: DecoratorHostConstructor | object,\n\tmethodKey?: string | symbol,\n): readonly NestBoundaryBindingMeta[] {\n\tconst ctor =\n\t\ttypeof target === \"function\"\n\t\t\t? (target as DecoratorHostConstructor)\n\t\t\t: ((target as { constructor: DecoratorHostConstructor })\n\t\t\t\t\t.constructor as DecoratorHostConstructor);\n\tconst bindings = boundaryBindingsFor(ctor);\n\treturn sortBoundaryBindings(\n\t\tmethodKey === undefined\n\t\t\t? bindings\n\t\t\t: bindings.filter((binding) => binding.methodKey === methodKey),\n\t);\n}\n\nexport function resolveNestMethodKey(\n\tctor: DecoratorHostConstructor,\n\thandler: DecoratorBoundMethod,\n): string | symbol | undefined {\n\treturn methodKeyForHandler(ctor, handler);\n}\n\nexport function bindingRequestId<THost>(\n\thost: THost,\n\tbinding: NestBoundaryBindingMeta,\n\tfallback?: string | ((host: THost) => string | undefined),\n): string | undefined {\n\tif (binding.direction === \"ingress\") {\n\t\tconst requestId = requestIdFromBinding(host, binding);\n\t\tif (requestId !== undefined) return requestId;\n\t}\n\tif (typeof fallback === \"string\") {\n\t\tassertNonEmptyString(fallback, \"requestId\");\n\t\treturn fallback;\n\t}\n\tif (typeof fallback === \"function\") {\n\t\tconst requestId = fallback(host);\n\t\tif (requestId !== undefined) assertNonEmptyString(requestId, \"requestId\");\n\t\treturn requestId;\n\t}\n\treturn requestIdOf(host, {}, {});\n}\n\nexport function bindingEmitOptions<THost>(\n\thost: THost,\n\tbinding: NestIngressBindingMeta,\n\trequestId?: string,\n): NestIngressEmitOptions<unknown> {\n\treturn {\n\t\tbindingId: binding.bindingId,\n\t\trequestId,\n\t\t...bindingPayloadEmitOption(host, binding),\n\t\trequireRequestId: requiresRequestId(binding.kind),\n\t};\n}\n\nexport function isDataIssue(value: unknown): value is DataIssue {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === \"object\" &&\n\t\t(value as { kind?: unknown }).kind === \"issue\" &&\n\t\ttypeof (value as { code?: unknown }).code === \"string\" &&\n\t\ttypeof (value as { message?: unknown }).message === \"string\"\n\t);\n}\n\nexport function isHttpDataIssue(value: unknown): value is HttpDataIssue {\n\treturn isDataIssue(value) && Number.isInteger((value as { status?: unknown }).status);\n}\n\nexport function issueResponse<THost = unknown>(\n\tissue: DataIssue,\n\t_host?: THost,\n): NestHttpResponsePayload {\n\tif (isHttpDataIssue(issue)) {\n\t\treturn {\n\t\t\tstatus: issue.status,\n\t\t\tbody: issue.body ?? { code: issue.code, message: issue.message },\n\t\t\theaders: issue.headers,\n\t\t};\n\t}\n\treturn {\n\t\tstatus: 400,\n\t\tbody: { code: issue.code, message: issue.message },\n\t};\n}\n\nexport function protocolError<THost = unknown>(\n\t_errorPayload: unknown,\n\t_host?: THost,\n): NestHttpResponsePayload {\n\treturn {\n\t\tstatus: 500,\n\t\tbody: { code: \"graphrefly.protocol_error\", message: \"GraphReFly reply pipeline failed\" },\n\t};\n}\n\nexport function lowerHttpReplyPayload<THost = unknown>(\n\tpayload: unknown,\n\thost: THost,\n\topts: { readonly issueResponse?: NestIssueResponse<THost> } = {},\n): NestHttpResponsePayload {\n\tif (isHttpResponsePayload(payload)) return payload;\n\tif (isDataIssue(payload)) return (opts.issueResponse ?? issueResponse)(payload, host);\n\treturn { status: 200, body: payload };\n}\n\nexport function lowerProtocolError<THost = unknown>(\n\terrorPayload: unknown,\n\thost: THost,\n\topts: { readonly protocolError?: NestProtocolErrorResponse<THost> } = {},\n): NestHttpResponsePayload {\n\treturn (opts.protocolError ?? protocolError)(errorPayload, host);\n}\n\nexport function sanitizeNestDiagnostic(\n\tdiagnostic: NestDiagnosticInput,\n\tdefaultPhase: NestDiagnosticPhase = \"adapter\",\n): NestDiagnosticPayload {\n\tconst payload: NestDiagnosticPayload = {\n\t\tkind: diagnostic.kind,\n\t\tphase: diagnostic.phase ?? defaultPhase,\n\t\tmessage: diagnostic.message,\n\t\t...optionalStringField(\"requestId\", diagnostic.requestId),\n\t\t...optionalStringField(\"bindingId\", diagnostic.bindingId),\n\t\t...optionalStringField(\"expectedBindingId\", diagnostic.expectedBindingId),\n\t\t...optionalDiagnosticError(diagnostic.error),\n\t};\n\tassertGraphVisibleData(payload, \"NestDiagnosticPayload\", NEST_BOUNDARY_PAYLOAD_MAX_BYTES);\n\treturn payload;\n}\n\nfunction nestIngress<THost, TPayload>(\n\tgraph: Graph,\n\tkind: NestBoundaryKind,\n\topts: NestIngressOptions<THost, TPayload>,\n): NestIngressBoundary<THost, TPayload> {\n\tconst bindingId = stableBindingId(kind, opts);\n\tconst version = parseEnvelopeVersion(opts.version ?? NEST_BOUNDARY_ENVELOPE_VERSION, \"version\");\n\tconst maxPayloadBytes = payloadByteLimit(opts.maxPayloadBytes);\n\tconst node = graph.node<NestBoundaryEnvelope<TPayload>>([], null, {\n\t\tname: opts.name,\n\t\tmeta: { adapter: \"nestjs\", boundary: \"ingress\", kind, bindingId, version },\n\t});\n\n\treturn {\n\t\tkind,\n\t\tbindingId,\n\t\tversion,\n\t\tnode,\n\t\tenvelope(host, emitOpts = {}) {\n\t\t\tconst requestId = requestIdOf(host, opts, {\n\t\t\t\t...emitOpts,\n\t\t\t\trequireRequestId:\n\t\t\t\t\temitOpts.requireRequestId ?? opts.requireRequestId ?? requiresRequestId(kind),\n\t\t\t});\n\t\t\tconst envelopeBindingId = emitOpts.bindingId ?? bindingId;\n\t\t\tassertNonEmptyString(envelopeBindingId, \"NestBoundaryEnvelope.bindingId\");\n\t\t\tconst envelopeVersion = parseEnvelopeVersion(\n\t\t\t\temitOpts.version ?? version,\n\t\t\t\t\"NestBoundaryEnvelope.version\",\n\t\t\t);\n\t\t\tconst payload =\n\t\t\t\t\"payload\" in emitOpts\n\t\t\t\t\t? (emitOpts.payload as TPayload)\n\t\t\t\t\t: opts.payload !== undefined\n\t\t\t\t\t\t? opts.payload(host)\n\t\t\t\t\t\t: (host as unknown as TPayload);\n\t\t\tassertGraphVisibleData(payload, \"NestBoundaryEnvelope.payload\", maxPayloadBytes);\n\t\t\tconst envelope: NestBoundaryEnvelope<TPayload> = {\n\t\t\t\tbindingId: envelopeBindingId,\n\t\t\t\tversion: envelopeVersion,\n\t\t\t\tpayload,\n\t\t\t};\n\t\t\treturn requestId === undefined ? envelope : { ...envelope, requestId };\n\t\t},\n\t\temit(host, emitOpts = {}) {\n\t\t\tconst envelope = this.envelope(host, emitOpts);\n\t\t\tnode.down([[\"DATA\", envelope]]);\n\t\t\treturn envelope;\n\t\t},\n\t};\n}\n\nfunction stableBindingId(\n\tkind: NestBoundaryKind | NestEgressKind,\n\topts: { readonly bindingId?: string; readonly name?: string },\n): string {\n\tconst bindingId = opts.bindingId ?? opts.name ?? `nestjs.${kind}`;\n\tassertNonEmptyString(bindingId, \"bindingId\");\n\treturn bindingId;\n}\n\nfunction requiresRequestId(kind: NestBoundaryKind): boolean {\n\treturn kind === \"request\" || kind === \"guard\" || kind === \"interceptor\" || kind === \"error\";\n}\n\nfunction requestIdFromRunOptions<THost>(\n\thost: THost,\n\topts: NestGraphRunOptions<THost>,\n): string | undefined {\n\tif (typeof opts.requestId === \"string\") {\n\t\tassertNonEmptyString(opts.requestId, \"requestId\");\n\t\treturn opts.requestId;\n\t}\n\tif (typeof opts.requestId === \"function\") {\n\t\tconst requestId = opts.requestId(host);\n\t\tif (requestId !== undefined) assertNonEmptyString(requestId, \"requestId\");\n\t\treturn requestId;\n\t}\n\treturn requestIdOf(host, {}, {});\n}\n\nfunction requestIdFromBinding<THost>(\n\thost: THost,\n\tbinding: NestIngressBindingMeta,\n): string | undefined {\n\tif (typeof binding.requestId === \"string\") {\n\t\tassertNonEmptyString(binding.requestId, \"requestId\");\n\t\treturn binding.requestId;\n\t}\n\tif (typeof binding.requestId === \"function\") {\n\t\tconst requestId = binding.requestId(host);\n\t\tif (requestId !== undefined) assertNonEmptyString(requestId, \"requestId\");\n\t\treturn requestId;\n\t}\n\treturn undefined;\n}\n\nfunction bindingPayloadEmitOption<THost>(\n\thost: THost,\n\tbinding: NestIngressBindingMeta,\n): { readonly payload: unknown } | Record<string, never> {\n\treturn binding.payload === undefined ? {} : { payload: binding.payload(host) };\n}\n\nfunction isHttpResponsePayload(value: unknown): value is NestHttpResponsePayload {\n\tif (value === null || typeof value !== \"object\") return false;\n\tconst status = (value as { status?: unknown }).status;\n\tif (!Number.isInteger(status)) return false;\n\tconst headers = (value as { headers?: unknown }).headers;\n\treturn headers === undefined || isStringRecord(headers);\n}\n\nfunction isStringRecord(value: unknown): value is Record<string, string> {\n\tif (value === null || typeof value !== \"object\" || Array.isArray(value)) return false;\n\tfor (const entry of Object.values(value)) if (typeof entry !== \"string\") return false;\n\treturn true;\n}\n\nfunction isHttpReplyBinding(binding: NestBoundaryBindingMeta): binding is NestHttpReplyBindingMeta {\n\treturn binding.direction === \"egress\" && binding.kind === \"http\";\n}\n\nfunction uniqueDefinedStrings(values: readonly (string | undefined)[]): string[] {\n\tconst seen = new Set<string>();\n\tfor (const value of values) {\n\t\tif (value !== undefined) seen.add(value);\n\t}\n\treturn [...seen];\n}\n\nfunction defaultNestHttpHost(\n\tcontext: NestExecutionContextLike,\n\tnextSeq: () => number,\n\tneedsSyntheticRequestId: boolean,\n): unknown | undefined {\n\tconst request = context.switchToHttp?.().getRequest<Record<string, unknown>>();\n\tif (request === undefined || request === null || typeof request !== \"object\") return request;\n\tif (requestIdFromRecord(request) !== undefined) return request;\n\tconst headerId = requestIdFromHeaders(request.headers);\n\tif (headerId !== undefined || needsSyntheticRequestId) {\n\t\treturn { ...request, requestId: headerId ?? `nestjs-request:${nextSeq()}` };\n\t}\n\treturn request;\n}\n\nfunction requestIdFromRecord(record: Record<string, unknown>): string | undefined {\n\tfor (const key of [\"requestId\", \"id\"]) {\n\t\tconst value = record[key];\n\t\tif (typeof value === \"string\" && value.length > 0) return value;\n\t}\n\treturn undefined;\n}\n\nfunction requestIdFromHeaders(headers: unknown): string | undefined {\n\tif (headers === null || typeof headers !== \"object\") return undefined;\n\tfor (const key of [\"x-request-id\", \"x-correlation-id\"]) {\n\t\tconst value = (headers as Record<string, unknown>)[key];\n\t\tconst first = Array.isArray(value) ? value[0] : value;\n\t\tif (typeof first === \"string\" && first.trim().length > 0) return first.trim();\n\t}\n\treturn undefined;\n}\n\nfunction graphIngressBinding<THost, TPayload>(\n\tkind: NestBoundaryKind,\n\tboundary: NestIngressBoundary<THost, TPayload>,\n\topts: NestBoundaryDecoratorOptions<THost, TPayload> & NestFilterDecoratorOptions<THost, TPayload>,\n): GraphMethodDecorator {\n\tif (boundary.kind !== kind) {\n\t\tthrow new Error(`Graph${kind} expected a ${kind} boundary, got ${boundary.kind}`);\n\t}\n\tconst bindingId = opts.bindingId ?? boundary.bindingId;\n\tassertNonEmptyString(bindingId, \"bindingId\");\n\treturn registerMeta(NEST_BOUNDARY_BINDINGS, (methodKey) => ({\n\t\tdirection: \"ingress\" as const,\n\t\tkind,\n\t\tbindingId,\n\t\tmethodKey,\n\t\tboundary: boundary as NestIngressBoundary<unknown, unknown>,\n\t\tpayload: opts.payload as ((host: unknown) => unknown) | undefined,\n\t\trequestId: opts.requestId as string | ((host: unknown) => string | undefined) | undefined,\n\t\torder: opts.order,\n\t\tmode: opts.mode,\n\t\tissueResponse: opts.issueResponse as NestIssueResponse<unknown> | undefined,\n\t\tprotocolError: opts.protocolError as NestProtocolErrorResponse<unknown> | undefined,\n\t}));\n}\n\nfunction graphReplyBinding<TPayload>(\n\tkind: \"ws-ack\" | \"ws-reply\" | \"message-reply\",\n\tnode: Node<NestReplyEnvelope<TPayload>>,\n\topts: { readonly bindingId: string; readonly order?: number },\n\tdecoratorName: string,\n): GraphMethodDecorator {\n\tconst bindingId = opts?.bindingId;\n\tif (typeof bindingId !== \"string\" || bindingId.length === 0) {\n\t\tthrow new Error(`${decoratorName} requires a non-empty bindingId`);\n\t}\n\tconst replyNode = node as Node<NestReplyEnvelope<unknown>>;\n\treturn registerMeta(NEST_BOUNDARY_BINDINGS, (methodKey) => {\n\t\tif (kind === \"ws-ack\") {\n\t\t\treturn {\n\t\t\t\tdirection: \"egress\" as const,\n\t\t\t\tkind,\n\t\t\t\tbindingId,\n\t\t\t\tmethodKey,\n\t\t\t\tackNode: replyNode,\n\t\t\t\torder: opts.order,\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tdirection: \"egress\" as const,\n\t\t\tkind,\n\t\t\tbindingId,\n\t\t\tmethodKey,\n\t\t\treplyNode,\n\t\t\torder: opts.order,\n\t\t};\n\t});\n}\n\nfunction methodKeyForHandler(\n\tctor: DecoratorHostConstructor,\n\thandler: DecoratorBoundMethod,\n): string | symbol | undefined {\n\tfor (const binding of boundaryBindingsFor(ctor)) {\n\t\tconst candidate = methodOnPrototypeChain(ctor, binding.methodKey);\n\t\tif (candidate === handler || String(binding.methodKey) === handler.name)\n\t\t\treturn binding.methodKey;\n\t}\n\treturn undefined;\n}\n\nfunction boundaryBindingsFor(ctor: DecoratorHostConstructor): NestBoundaryBindingMeta[] {\n\tconst bindings: NestBoundaryBindingMeta[] = [];\n\tconst seen = new Set<NestBoundaryBindingMeta>();\n\tlet current: unknown = ctor;\n\twhile (typeof current === \"function\" && current !== Function.prototype) {\n\t\tfor (const binding of NEST_BOUNDARY_BINDINGS.get(current as DecoratorHostConstructor) ?? []) {\n\t\t\tif (seen.has(binding)) continue;\n\t\t\tseen.add(binding);\n\t\t\tbindings.push(binding);\n\t\t}\n\t\tcurrent = Object.getPrototypeOf(current);\n\t}\n\treturn bindings;\n}\n\nfunction sortBoundaryBindings(\n\tbindings: readonly NestBoundaryBindingMeta[],\n): readonly NestBoundaryBindingMeta[] {\n\treturn bindings\n\t\t.map((binding, index) => ({ binding, index }))\n\t\t.sort((a, b) => (a.binding.order ?? 0) - (b.binding.order ?? 0) || a.index - b.index)\n\t\t.map(({ binding }) => binding);\n}\n\nfunction methodOnPrototypeChain(\n\tctor: DecoratorHostConstructor,\n\tmethodKey: string | symbol,\n): unknown {\n\tlet proto: unknown = ctor.prototype;\n\twhile (proto !== null && typeof proto === \"object\") {\n\t\tif (Object.hasOwn(proto, methodKey)) {\n\t\t\treturn (proto as Record<string | symbol, unknown>)[methodKey];\n\t\t}\n\t\tproto = Object.getPrototypeOf(proto);\n\t}\n\treturn undefined;\n}\n\nfunction requestIdOf<THost, TPayload>(\n\thost: THost,\n\topts: NestIngressOptions<THost, TPayload>,\n\temitOpts: NestIngressEmitOptions<TPayload>,\n): string | undefined {\n\tconst fromEmit = emitOpts.requestId;\n\tif (fromEmit !== undefined) {\n\t\tassertNonEmptyString(fromEmit, \"requestId\");\n\t\treturn fromEmit;\n\t}\n\tif (typeof opts.requestId === \"string\") {\n\t\tassertNonEmptyString(opts.requestId, \"requestId\");\n\t\treturn opts.requestId;\n\t}\n\tif (typeof opts.requestId === \"function\") {\n\t\tconst requestId = opts.requestId(host);\n\t\tif (requestId !== undefined) assertNonEmptyString(requestId, \"requestId\");\n\t\treturn requestId;\n\t}\n\tconst record = host as { requestId?: unknown; id?: unknown };\n\tif (typeof record?.requestId === \"string\" && record.requestId.length > 0) return record.requestId;\n\tif (typeof record?.id === \"string\" && record.id.length > 0) return record.id;\n\tif (emitOpts.requireRequestId ?? opts.requireRequestId ?? false) {\n\t\tthrow new Error(\"Nest boundary ingress requires a stable requestId\");\n\t}\n\treturn undefined;\n}\n\nfunction validateEnvelope(value: unknown, maxPayloadBytes: number): string | undefined {\n\ttry {\n\t\tassertGraphVisibleData(value, \"NestBoundaryEnvelope\", maxPayloadBytes);\n\t} catch (error) {\n\t\treturn error instanceof Error ? error.message : \"egress envelope must be data-only material\";\n\t}\n\tif (value === null || typeof value !== \"object\") return \"egress DATA is not an envelope object\";\n\tconst envelope = value as Partial<NestBoundaryEnvelope>;\n\tif (typeof envelope.requestId !== \"string\" || envelope.requestId.length === 0) {\n\t\treturn \"egress envelope requestId must be a non-empty string\";\n\t}\n\tif (typeof envelope.bindingId !== \"string\" || envelope.bindingId.length === 0) {\n\t\treturn \"egress envelope bindingId must be a non-empty string\";\n\t}\n\ttry {\n\t\tparseEnvelopeVersion(envelope.version, \"egress envelope version\");\n\t} catch {\n\t\treturn `egress envelope version must be ${NEST_BOUNDARY_ENVELOPE_VERSION}`;\n\t}\n\treturn undefined;\n}\n\nfunction malformedCorrelation(\n\tvalue: unknown,\n\tscopedBindingId: string | undefined,\n): { readonly requestId: string; readonly bindingId: string } | undefined {\n\tif (value === null || typeof value !== \"object\") return undefined;\n\tconst requestId = (value as { readonly requestId?: unknown }).requestId;\n\tconst bindingId = (value as { readonly bindingId?: unknown }).bindingId;\n\tif (typeof requestId !== \"string\" || requestId.length === 0) return undefined;\n\tif (typeof bindingId !== \"string\" || bindingId.length === 0) return undefined;\n\tif (scopedBindingId !== undefined && bindingId !== scopedBindingId) return undefined;\n\treturn { requestId, bindingId };\n}\n\nfunction parseEnvelopeVersion(value: unknown, label: string): number {\n\tif (value !== NEST_BOUNDARY_ENVELOPE_VERSION) {\n\t\tthrow new Error(`${label} must be ${NEST_BOUNDARY_ENVELOPE_VERSION}`);\n\t}\n\treturn value;\n}\n\nfunction assertNonEmptyString(value: string, label: string): void {\n\tif (value.length === 0) throw new Error(`${label} must be a non-empty string`);\n}\n\nfunction optionalStringField<K extends \"requestId\" | \"bindingId\" | \"expectedBindingId\">(\n\tkey: K,\n\tvalue: string | undefined,\n): Record<K, string> | Record<string, never> {\n\treturn value === undefined ? {} : ({ [key]: value } as Record<K, string>);\n}\n\nfunction optionalDiagnosticError(\n\terror: unknown,\n): { readonly error: NestDiagnosticErrorPayload } | Record<string, never> {\n\tconst summarized = summarizeDiagnosticError(error);\n\treturn summarized === undefined ? {} : { error: summarized };\n}\n\nfunction summarizeDiagnosticError(error: unknown): NestDiagnosticErrorPayload | undefined {\n\tif (error === undefined) return undefined;\n\tif (error instanceof Error) {\n\t\treturn {\n\t\t\t...optionalDiagnosticName(safeDiagnosticString(() => error.name)),\n\t\t\tmessage: safeDiagnosticString(() => error.message) ?? \"diagnostic error\",\n\t\t};\n\t}\n\tif (typeof error === \"string\") return { message: error };\n\tif (typeof error === \"number\" || typeof error === \"boolean\" || typeof error === \"bigint\") {\n\t\treturn { message: String(error) };\n\t}\n\tif (typeof error === \"symbol\") return { message: error.description ?? \"symbol\" };\n\tif (typeof error === \"function\") return { message: \"opaque diagnostic function\" };\n\tif (error !== null && typeof error === \"object\") {\n\t\tconst record = error as { readonly name?: unknown; readonly message?: unknown };\n\t\tconst message = safeDiagnosticString(() => record.message);\n\t\tif (message !== undefined) {\n\t\t\treturn {\n\t\t\t\t...optionalDiagnosticName(safeDiagnosticString(() => record.name)),\n\t\t\t\tmessage,\n\t\t\t};\n\t\t}\n\t\treturn { message: \"opaque diagnostic error\" };\n\t}\n\treturn { message: String(error) };\n}\n\nfunction safeDiagnosticString(read: () => unknown): string | undefined {\n\ttry {\n\t\tconst value = read();\n\t\treturn typeof value === \"string\" ? value : undefined;\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n\nfunction optionalDiagnosticName(\n\tname: string | undefined,\n): { readonly name: string } | Record<string, never> {\n\treturn name === undefined || name.length === 0 ? {} : { name };\n}\n\nfunction payloadByteLimit(value: number | undefined): number {\n\tif (value === undefined) return NEST_BOUNDARY_PAYLOAD_MAX_BYTES;\n\tif (!Number.isSafeInteger(value) || value < 1) {\n\t\tthrow new Error(\"Nest boundary maxPayloadBytes must be a positive safe integer\");\n\t}\n\treturn value;\n}\n\nfunction diagnosticsRetainedLimit(value: number | undefined): number {\n\tif (value === undefined) return NEST_HTTP_DIAGNOSTICS_MAX_RETAINED;\n\tif (!Number.isSafeInteger(value) || value < 0) {\n\t\tthrow new Error(\"toNestHttp maxDiagnostics must be a non-negative safe integer\");\n\t}\n\treturn value;\n}\n\nfunction pushDiagnostic(\n\tdiagnostics: NestBoundaryDiagnostic[],\n\tdiagnostic: NestBoundaryDiagnostic,\n\tmaxDiagnostics: number,\n): void {\n\tif (maxDiagnostics === 0) return;\n\tdiagnostics.push(diagnostic);\n\tif (diagnostics.length > maxDiagnostics)\n\t\tdiagnostics.splice(0, diagnostics.length - maxDiagnostics);\n}\n\nfunction assertGraphVisibleData(\n\tvalue: unknown,\n\tpath: string,\n\tmaxPayloadBytes: number,\n\tseen = new WeakSet<object>(),\n): void {\n\tif (value === undefined) {\n\t\tthrow new TypeError(`${path} cannot be undefined; undefined is SENTINEL/no DATA`);\n\t}\n\tif (value === null) return;\n\tconst type = typeof value;\n\tif (type === \"string\" || type === \"boolean\") return;\n\tif (type === \"number\") {\n\t\tif (!Number.isFinite(value)) throw new TypeError(`${path} number must be finite`);\n\t\treturn;\n\t}\n\tif (type === \"function\" || type === \"symbol\" || type === \"bigint\") {\n\t\tthrow new TypeError(`${path} must be data-only; found ${type}`);\n\t}\n\tif (type !== \"object\") return;\n\tif (seen.has(value as object)) throw new TypeError(`${path} must be acyclic data`);\n\tseen.add(value as object);\n\tif (Array.isArray(value)) {\n\t\ttry {\n\t\t\tfor (let i = 0; i < value.length; i += 1) {\n\t\t\t\tconst descriptor = Object.getOwnPropertyDescriptor(value, i);\n\t\t\t\tif (descriptor === undefined) {\n\t\t\t\t\tthrow new TypeError(`${path}[${i}] cannot be a sparse array hole`);\n\t\t\t\t}\n\t\t\t\tif (!descriptor.enumerable || !(\"value\" in descriptor)) {\n\t\t\t\t\tthrow new TypeError(`${path}[${i}] must be enumerable plain data`);\n\t\t\t\t}\n\t\t\t\tassertGraphVisibleData(descriptor.value, `${path}[${i}]`, maxPayloadBytes, seen);\n\t\t\t}\n\t\t\tfor (const key of Reflect.ownKeys(value)) {\n\t\t\t\tif (key === \"length\") continue;\n\t\t\t\tif (typeof key === \"symbol\" || !/^(0|[1-9]\\d*)$/.test(key)) {\n\t\t\t\t\tthrow new TypeError(`${path} arrays must not carry hidden or extra properties`);\n\t\t\t\t}\n\t\t\t}\n\t\t\tassertPayloadSize(value, path, maxPayloadBytes);\n\t\t} finally {\n\t\t\tseen.delete(value as object);\n\t\t}\n\t\treturn;\n\t}\n\tconst proto = Object.getPrototypeOf(value);\n\tif (proto !== Object.prototype && proto !== null) {\n\t\tthrow new TypeError(`${path} must be a plain data object or array`);\n\t}\n\ttry {\n\t\tfor (const key of Reflect.ownKeys(value)) {\n\t\t\tif (typeof key === \"symbol\") throw new TypeError(`${path} must not carry symbol keys`);\n\t\t\tconst descriptor = Object.getOwnPropertyDescriptor(value, key);\n\t\t\tif (descriptor === undefined) continue;\n\t\t\tif (!descriptor.enumerable || !(\"value\" in descriptor)) {\n\t\t\t\tthrow new TypeError(`${path}.${key} must be enumerable plain data`);\n\t\t\t}\n\t\t\tassertGraphVisibleData(descriptor.value, `${path}.${key}`, maxPayloadBytes, seen);\n\t\t}\n\t\tassertPayloadSize(value, path, maxPayloadBytes);\n\t} finally {\n\t\tseen.delete(value as object);\n\t}\n}\n\nfunction assertPayloadSize(value: unknown, path: string, maxPayloadBytes: number): void {\n\tconst serialized = JSON.stringify(value);\n\tif (serialized !== undefined && utf8ByteLength(serialized) > maxPayloadBytes) {\n\t\tthrow new TypeError(`${path} exceeds ${maxPayloadBytes} bytes`);\n\t}\n}\n\nfunction utf8ByteLength(value: string): number {\n\tlet bytes = 0;\n\tfor (let i = 0; i < value.length; i += 1) {\n\t\tconst code = value.charCodeAt(i);\n\t\tif (code < 0x80) {\n\t\t\tbytes += 1;\n\t\t} else if (code < 0x800) {\n\t\t\tbytes += 2;\n\t\t} else if (code >= 0xd800 && code <= 0xdbff && i + 1 < value.length) {\n\t\t\tconst next = value.charCodeAt(i + 1);\n\t\t\tif (next >= 0xdc00 && next <= 0xdfff) {\n\t\t\t\tbytes += 4;\n\t\t\t\ti += 1;\n\t\t\t} else {\n\t\t\t\tbytes += 3;\n\t\t\t}\n\t\t} else {\n\t\t\tbytes += 3;\n\t\t}\n\t}\n\treturn bytes;\n}\n\nfunction sameMeta<T>(a: T, b: T): boolean {\n\tconst left = a as Record<string | symbol, unknown>;\n\tconst right = b as Record<string | symbol, unknown>;\n\tconst keys = Reflect.ownKeys(left);\n\tif (keys.length !== Reflect.ownKeys(right).length) return false;\n\tfor (const key of keys) {\n\t\tif (!Object.is(left[key], right[key])) return false;\n\t}\n\treturn true;\n}\n\nfunction pushUniqueMeta<T>(\n\tregistry: WeakMap<DecoratorHostConstructor, T[]>,\n\tctor: DecoratorHostConstructor,\n\titem: T,\n): void {\n\tconst existing = registry.get(ctor) ?? [];\n\tif (existing.some((current) => sameMeta(current, item))) return;\n\tregistry.set(ctor, [...existing, item]);\n}\n\nfunction registerMeta<T>(\n\tregistry: WeakMap<DecoratorHostConstructor, T[]>,\n\tmeta: (methodKey: string | symbol) => T,\n): GraphMethodDecorator {\n\treturn ((targetOrValue: object, contextOrKey: ClassMethodDecoratorContext | string | symbol) => {\n\t\tif (typeof contextOrKey === \"object\" && contextOrKey !== null) {\n\t\t\tconst methodKey = contextOrKey.name;\n\t\t\tcontextOrKey.addInitializer(function (this: unknown) {\n\t\t\t\tconst ctor = (this as { constructor: DecoratorHostConstructor }).constructor;\n\t\t\t\tpushUniqueMeta(registry, ctor, meta(methodKey));\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tconst ctor = (targetOrValue as { constructor: DecoratorHostConstructor }).constructor;\n\t\tpushUniqueMeta(registry, ctor, meta(contextOrKey));\n\t}) as GraphMethodDecorator;\n}\n\n/** Register a method as a DATA-event handler for a graph observe path. */\nexport function OnGraphEvent(nodeName: string): GraphMethodDecorator {\n\treturn registerMeta(EVENT_HANDLERS, (methodKey) => ({ nodeName, methodKey }));\n}\n\n/** Register fixed-interval metadata for a user-land NestJS scheduler bridge. */\nexport function GraphInterval(ms: number): GraphMethodDecorator {\n\treturn registerMeta(INTERVAL_HANDLERS, (methodKey) => ({ ms, methodKey }));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBA,oBAA2D;AAC3D,kBAA2C;AAC3C,kBAAsC;;;ACkEtC,SAAS,qBAAqB,OAAe,OAAqB;AACjE,MAAI,OAAO,UAAU,YAAY,MAAM,WAAW,GAAG;AACpD,UAAM,IAAI,UAAU,GAAG,KAAK,6BAA6B;AAAA,EAC1D;AACD;AA4MA,SAAS,eAAe,OAAe,KAAa,KAA0B;AAC7E,MAAI,MAAM,WAAW,EAAG,OAAM,IAAI,MAAM,2BAA2B;AACnE,QAAM,MAAM,oBAAI,IAAY;AAC5B,aAAW,QAAQ,MAAM,MAAM,GAAG,GAAG;AACpC,QAAI,KAAK,WAAW,EAAG,OAAM,IAAI,MAAM,uBAAuB,KAAK,EAAE;AACrE,UAAM,YAAY,KAAK,MA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,UAAU;AAAA,IAC7B;AAAA,IACA,SAAS,SAAS;AAAA,EACnB;AACD;AAEO,IAAM,4BAAN,cAAwC,4BAAc;AAAA,EACnD;AAAA,EAET,YAAY,SAAkC;AAC7C,UAAM,QAAQ,QAAQ,CAAC,GAAG,QAAQ,MAAM;AACxC,SAAK,UAAU;AAAA,EAChB;AACD;AAEA,IAAM,mCAAN,cAA+C,4BAAc;AAAA,EAC5D,YAAY,SAAkC;AAC7C,UAAM,QAAQ,QAAQ,CAAC,GAAG,QAAQ,MAAM;AAAA,EACzC;AACD;AAEO,SAAS,4BAA4B,OAAoD;AAC/F,SAAO,iBAAiB;AACzB;AAEO,IAAM,yBAAN,MAAwD;AAAA,EAC9D,MAAM,WAAoB,MAA8B;AACvD,QAAI,CAAC,4BAA4B,SAAS,EAAG,OAAM;AACnD,WAAO,kBAAkB,MAAM,UAAU,OAAO;AAAA,EACjD;AACD;AAAA,IAEA,qBAAM,yBAAyB,EAAE,sBAAsB;AAEvD,SAAS,kBACR,MACA,SACU;AACV,QAAM,WAAW,KAAK,eAAe,EAAE,cAAc;AASrD,MAAI,aAAa,OAAW,QAAO;AACnC,aAAW,CAAC,MAAM,KAAK,KAAK,OAAO,QAAQ,QAAQ,WAAW,CAAC,CAAC,GAAG;AAClE,QAAI,OAAO,SAAS,cAAc,WAAY,UAAS,UAAU,MAAM,KAAK;AAAA,QACvE,UAAS,SAAS,MAAM,KAAK;AAAA,EACnC;AACA,WAAS,SAAS,QAAQ,MAAM;AAChC,MAAI,OAAO,SAAS,SAAS,WAAY,QAAO,SAAS,KAAK,QAAQ,QAAQ,CAAC,CAAC;AAChF,MAAI,OAAO,SAAS,SAAS,WAAY,QAAO,SAAS,KAAK,QAAQ,IAAI;AAC1E,SAAO;AACR;","names":["pendingKey","entry","assertNonEmptyString","opts","assertNonEmptyString","assertNonEmptyString","assertNonEmptyString","dayKey"]}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { ExceptionFilter, OnModuleDestroy, ArgumentsHost, HttpException, ExecutionContext, Provider } from '@nestjs/common';
|
|
2
|
+
import { F as FromCronOptions } from '../../index-DLrNopda.cjs';
|
|
3
|
+
import { DecoratorHostConstructor, NestDiagnosticIngressBoundary, NestIssueResponse, NestProtocolErrorResponse, NestHttpResponsePayload, NestGraphRunOptions } from '../nestjs.cjs';
|
|
4
|
+
import '../../types-CTN3XoMl.cjs';
|
|
5
|
+
import '../../messages-CAzUPPJM.cjs';
|
|
6
|
+
import '../../graph-C1C-wb0L.cjs';
|
|
7
|
+
import '../../core/index.cjs';
|
|
8
|
+
import '../../codec-BB7p8fJc.cjs';
|
|
9
|
+
import '../../describe-BumQ-3_0.cjs';
|
|
10
|
+
import '../../data/index.cjs';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Nest-native provider bridge for GraphReFly boundary metadata (D484).
|
|
14
|
+
*
|
|
15
|
+
* This focused subpath is allowed to import Nest/RxJS. The dependency-light
|
|
16
|
+
* `@graphrefly/ts/adapters/nestjs` structural layer stays Nest-free.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
declare const GRAPHREFLY_NEST_CRON_SCHEDULER: unique symbol;
|
|
20
|
+
declare const GRAPHREFLY_NEST_EXCEPTION_FILTER: unique symbol;
|
|
21
|
+
declare const GRAPHREFLY_NEST_LIFECYCLE_HOOKS: unique symbol;
|
|
22
|
+
interface GraphNativeHostOptions<THost = unknown> extends NestGraphRunOptions<THost> {
|
|
23
|
+
readonly host?: (context: ExecutionContext) => THost;
|
|
24
|
+
readonly diagnosticBoundary?: NestDiagnosticIngressBoundary;
|
|
25
|
+
}
|
|
26
|
+
interface GraphNativeHttpOptions<THost = unknown> extends GraphNativeHostOptions<THost> {
|
|
27
|
+
readonly issueResponse?: NestIssueResponse<THost>;
|
|
28
|
+
readonly protocolError?: NestProtocolErrorResponse<THost>;
|
|
29
|
+
}
|
|
30
|
+
interface GraphExceptionFilterTarget {
|
|
31
|
+
readonly target: DecoratorHostConstructor | object;
|
|
32
|
+
readonly methodKey: string | symbol;
|
|
33
|
+
}
|
|
34
|
+
interface GraphExceptionFilterProviderOptions<THost = unknown> {
|
|
35
|
+
readonly host?: (host: ArgumentsHost, exception: unknown) => THost;
|
|
36
|
+
readonly target: (host: ArgumentsHost, exception: unknown) => GraphExceptionFilterTarget | undefined;
|
|
37
|
+
readonly diagnosticBoundary?: NestDiagnosticIngressBoundary;
|
|
38
|
+
readonly requestId?: string | ((host: THost) => string | undefined);
|
|
39
|
+
readonly issueResponse?: NestIssueResponse<THost>;
|
|
40
|
+
readonly protocolError?: NestProtocolErrorResponse<THost>;
|
|
41
|
+
}
|
|
42
|
+
interface GraphCronProviderTarget<THost = unknown> {
|
|
43
|
+
readonly target: DecoratorHostConstructor | object;
|
|
44
|
+
readonly methodKey?: string | symbol;
|
|
45
|
+
readonly expr: string;
|
|
46
|
+
readonly tickMs?: number;
|
|
47
|
+
readonly timezone?: string;
|
|
48
|
+
readonly dst?: FromCronOptions["dst"];
|
|
49
|
+
readonly host?: (date: Date) => THost;
|
|
50
|
+
}
|
|
51
|
+
interface GraphCronSchedulerProviderOptions {
|
|
52
|
+
readonly targets: readonly GraphCronProviderTarget[];
|
|
53
|
+
}
|
|
54
|
+
interface GraphCronController {
|
|
55
|
+
check(now: Date): void;
|
|
56
|
+
}
|
|
57
|
+
interface GraphCronControllerOptions {
|
|
58
|
+
readonly targets: readonly GraphCronProviderTarget[];
|
|
59
|
+
}
|
|
60
|
+
interface GraphLifecycleProviderTarget<THost = unknown> {
|
|
61
|
+
readonly target: DecoratorHostConstructor | object;
|
|
62
|
+
readonly methodKey?: string | symbol;
|
|
63
|
+
readonly event?: "module-init" | "module-destroy";
|
|
64
|
+
readonly host?: (event: "module-init" | "module-destroy") => THost;
|
|
65
|
+
}
|
|
66
|
+
interface GraphLifecycleHooksProviderOptions {
|
|
67
|
+
readonly targets: readonly GraphLifecycleProviderTarget[];
|
|
68
|
+
}
|
|
69
|
+
interface GraphNativeHttpProviderBundleOptions<THost = unknown> {
|
|
70
|
+
readonly boundaryInterceptor?: GraphNativeHttpOptions<THost> | false;
|
|
71
|
+
readonly guard?: GraphNativeHttpOptions<THost> | false;
|
|
72
|
+
readonly guardDeniedFilter?: boolean;
|
|
73
|
+
readonly exceptionFilter?: GraphExceptionFilterProviderOptions<THost>;
|
|
74
|
+
}
|
|
75
|
+
interface GraphNativeProviderBundleOptions<THost = unknown> {
|
|
76
|
+
readonly http?: GraphNativeHttpProviderBundleOptions<THost> | false;
|
|
77
|
+
readonly cronScheduler?: GraphCronSchedulerProviderOptions;
|
|
78
|
+
readonly lifecycleHooks?: GraphLifecycleHooksProviderOptions;
|
|
79
|
+
}
|
|
80
|
+
declare function provideGraphBoundaryInterceptor<THost = unknown>(opts?: GraphNativeHttpOptions<THost>): Provider;
|
|
81
|
+
declare function provideGraphGuard<THost = unknown>(opts?: GraphNativeHttpOptions<THost>): Provider;
|
|
82
|
+
declare function provideGraphExceptionFilter<THost = unknown>(opts: GraphExceptionFilterProviderOptions<THost>): Provider;
|
|
83
|
+
declare function createGraphExceptionFilter<THost = unknown>(opts: GraphExceptionFilterProviderOptions<THost>): ExceptionFilter & OnModuleDestroy;
|
|
84
|
+
declare function provideGraphGuardDeniedFilter(): Provider;
|
|
85
|
+
declare function createGraphGuardDeniedFilter(): ExceptionFilter;
|
|
86
|
+
declare function provideGraphCronScheduler(opts: GraphCronSchedulerProviderOptions): Provider;
|
|
87
|
+
declare function provideGraphLifecycleHooks(opts: GraphLifecycleHooksProviderOptions): Provider;
|
|
88
|
+
declare function provideGraphNativeHttpProviders<THost = unknown>(opts?: GraphNativeHttpProviderBundleOptions<THost>): Provider[];
|
|
89
|
+
declare function provideGraphNativeProviders<THost = unknown>(opts?: GraphNativeProviderBundleOptions<THost>): Provider[];
|
|
90
|
+
declare function graphCronTarget<THost = unknown>(target: DecoratorHostConstructor | object, methodKey: string | symbol, opts: Omit<GraphCronProviderTarget<THost>, "target" | "methodKey">): GraphCronProviderTarget<THost>;
|
|
91
|
+
declare function graphLifecycleTarget<THost = unknown>(target: DecoratorHostConstructor | object, methodKey: string | symbol, opts?: Omit<GraphLifecycleProviderTarget<THost>, "target" | "methodKey">): GraphLifecycleProviderTarget<THost>;
|
|
92
|
+
declare function createGraphCronController(opts: GraphCronControllerOptions): GraphCronController;
|
|
93
|
+
declare class GraphExceptionFilterBridge<THost> implements ExceptionFilter, OnModuleDestroy {
|
|
94
|
+
private readonly opts;
|
|
95
|
+
private readonly replies;
|
|
96
|
+
private readonly disposableReplies;
|
|
97
|
+
constructor(opts: GraphExceptionFilterProviderOptions<THost>);
|
|
98
|
+
catch(exception: unknown, host: ArgumentsHost): unknown;
|
|
99
|
+
onModuleDestroy(): void;
|
|
100
|
+
private replyBoundary;
|
|
101
|
+
}
|
|
102
|
+
declare class GraphGuardDeniedException extends HttpException {
|
|
103
|
+
readonly payload: NestHttpResponsePayload;
|
|
104
|
+
constructor(payload: NestHttpResponsePayload);
|
|
105
|
+
}
|
|
106
|
+
declare function isGraphGuardDeniedException(value: unknown): value is GraphGuardDeniedException;
|
|
107
|
+
declare class GraphGuardDeniedFilter implements ExceptionFilter {
|
|
108
|
+
catch(exception: unknown, host: ArgumentsHost): unknown;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export { GRAPHREFLY_NEST_CRON_SCHEDULER, GRAPHREFLY_NEST_EXCEPTION_FILTER, GRAPHREFLY_NEST_LIFECYCLE_HOOKS, type GraphCronController, type GraphCronControllerOptions, type GraphCronProviderTarget, type GraphCronSchedulerProviderOptions, GraphExceptionFilterBridge, type GraphExceptionFilterProviderOptions, type GraphExceptionFilterTarget, GraphGuardDeniedException, GraphGuardDeniedFilter, type GraphLifecycleHooksProviderOptions, type GraphLifecycleProviderTarget, type GraphNativeHostOptions, type GraphNativeHttpOptions, type GraphNativeHttpProviderBundleOptions, type GraphNativeProviderBundleOptions, createGraphCronController, createGraphExceptionFilter, createGraphGuardDeniedFilter, graphCronTarget, graphLifecycleTarget, isGraphGuardDeniedException, provideGraphBoundaryInterceptor, provideGraphCronScheduler, provideGraphExceptionFilter, provideGraphGuard, provideGraphGuardDeniedFilter, provideGraphLifecycleHooks, provideGraphNativeHttpProviders, provideGraphNativeProviders };
|