@graphrefly/graphrefly 0.22.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/{chunk-QA3RP5NH.js → chunk-5DJTTKX3.js} +111 -17
  2. package/dist/chunk-5DJTTKX3.js.map +1 -0
  3. package/dist/{chunk-BLD3IFYF.js → chunk-5WGT55R4.js} +9 -7
  4. package/dist/{chunk-BLD3IFYF.js.map → chunk-5WGT55R4.js.map} +1 -1
  5. package/dist/{chunk-IR3KMOLX.js → chunk-AOCBDH4T.js} +3 -383
  6. package/dist/chunk-AOCBDH4T.js.map +1 -0
  7. package/dist/{chunk-TH6COGOP.js → chunk-H4RVA4VE.js} +2 -2
  8. package/dist/chunk-HWPIFSW2.js +36 -0
  9. package/dist/chunk-HWPIFSW2.js.map +1 -0
  10. package/dist/{chunk-MQBQOFDS.js → chunk-IPLKX3L2.js} +12 -31
  11. package/dist/chunk-IPLKX3L2.js.map +1 -0
  12. package/dist/{chunk-44HD4BTA.js → chunk-MW4VAKAO.js} +3 -3
  13. package/dist/chunk-PY4XCDLR.js +391 -0
  14. package/dist/chunk-PY4XCDLR.js.map +1 -0
  15. package/dist/{chunk-RHI3GHZW.js → chunk-QOWVNWOC.js} +3 -3
  16. package/dist/{chunk-EQUZ5NLD.js → chunk-TDEXAMGO.js} +11 -16
  17. package/dist/chunk-TDEXAMGO.js.map +1 -0
  18. package/dist/{chunk-NXC35KC5.js → chunk-XOFWRC73.js} +3 -3
  19. package/dist/compat/nestjs/index.cjs +110 -16
  20. package/dist/compat/nestjs/index.cjs.map +1 -1
  21. package/dist/compat/nestjs/index.d.cts +6 -6
  22. package/dist/compat/nestjs/index.d.ts +6 -6
  23. package/dist/compat/nestjs/index.js +9 -7
  24. package/dist/core/index.cjs +110 -16
  25. package/dist/core/index.cjs.map +1 -1
  26. package/dist/core/index.d.cts +3 -3
  27. package/dist/core/index.d.ts +3 -3
  28. package/dist/core/index.js +3 -3
  29. package/dist/extra/index.cjs +110 -16
  30. package/dist/extra/index.cjs.map +1 -1
  31. package/dist/extra/index.d.cts +4 -4
  32. package/dist/extra/index.d.ts +4 -4
  33. package/dist/extra/index.js +9 -7
  34. package/dist/graph/index.cjs +110 -16
  35. package/dist/graph/index.cjs.map +1 -1
  36. package/dist/graph/index.d.cts +5 -5
  37. package/dist/graph/index.d.ts +5 -5
  38. package/dist/graph/index.js +4 -4
  39. package/dist/{graph-DFr0diXB.d.ts → graph-B6NFqv3z.d.ts} +3 -3
  40. package/dist/{graph-ab1yPwIB.d.cts → graph-D-3JIQme.d.cts} +3 -3
  41. package/dist/{index-BvWfZCTt.d.cts → index-1z8vRTCt.d.cts} +3 -3
  42. package/dist/{index-Dy04P4W3.d.cts → index-AMWewNDe.d.cts} +2 -2
  43. package/dist/{index-C9z6rU9P.d.cts → index-BJB7t9gg.d.cts} +19 -15
  44. package/dist/{index-BbYZma8G.d.ts → index-BysCTzJz.d.ts} +3 -3
  45. package/dist/{index-HdJx_BjO.d.ts → index-C-TXEa7C.d.ts} +19 -15
  46. package/dist/{index-DsGxLfwL.d.ts → index-CYkjxu3s.d.ts} +2 -2
  47. package/dist/{index-BHm3Ba5q.d.ts → index-D7XgsUt7.d.ts} +2 -2
  48. package/dist/{index-D36MAQ3f.d.ts → index-DiobMNwE.d.ts} +3 -3
  49. package/dist/{index-DrJq9B1T.d.cts → index-J7Kc0oIQ.d.cts} +3 -3
  50. package/dist/{index-DLE1Sp-L.d.cts → index-b5BYtczN.d.cts} +2 -2
  51. package/dist/index.cjs +129 -46
  52. package/dist/index.cjs.map +1 -1
  53. package/dist/index.d.cts +15 -15
  54. package/dist/index.d.ts +15 -15
  55. package/dist/index.js +36 -42
  56. package/dist/index.js.map +1 -1
  57. package/dist/{meta-n3FoVWML.d.ts → meta-CnkLA_43.d.ts} +1 -1
  58. package/dist/{meta--fr9sxRM.d.cts → meta-DWbkoq1s.d.cts} +1 -1
  59. package/dist/{node-C5UD5MGq.d.cts → node-B-f-Lu-k.d.cts} +57 -13
  60. package/dist/{node-C5UD5MGq.d.ts → node-B-f-Lu-k.d.ts} +57 -13
  61. package/dist/{observable-DWydVy5b.d.cts → observable-DBnrwcar.d.cts} +1 -1
  62. package/dist/{observable-CQRBtEbq.d.ts → observable-uP-wy_uK.d.ts} +1 -1
  63. package/dist/patterns/reactive-layout/index.cjs +224 -129
  64. package/dist/patterns/reactive-layout/index.cjs.map +1 -1
  65. package/dist/patterns/reactive-layout/index.d.cts +5 -5
  66. package/dist/patterns/reactive-layout/index.d.ts +5 -5
  67. package/dist/patterns/reactive-layout/index.js +6 -4
  68. package/dist/{storage-Bew05Xy6.d.cts → storage-BuTdpCI1.d.cts} +1 -1
  69. package/dist/{storage-C9fZfMfM.d.ts → storage-F2X1U1x0.d.ts} +1 -1
  70. package/package.json +3 -2
  71. package/dist/chunk-EQUZ5NLD.js.map +0 -1
  72. package/dist/chunk-IR3KMOLX.js.map +0 -1
  73. package/dist/chunk-MQBQOFDS.js.map +0 -1
  74. package/dist/chunk-QA3RP5NH.js.map +0 -1
  75. /package/dist/{chunk-TH6COGOP.js.map → chunk-H4RVA4VE.js.map} +0 -0
  76. /package/dist/{chunk-44HD4BTA.js.map → chunk-MW4VAKAO.js.map} +0 -0
  77. /package/dist/{chunk-RHI3GHZW.js.map → chunk-QOWVNWOC.js.map} +0 -0
  78. /package/dist/{chunk-NXC35KC5.js.map → chunk-XOFWRC73.js.map} +0 -0
@@ -1,5 +1,5 @@
1
- export { A as AckableMessage, a as AdapterHandlers, b as AsyncSourceOpts, B as BackoffPreset, c as BackoffStrategy, d as BatchMessage, e as BridgeMessage, f as BufferedSinkHandle, g as BundleTriad, C as CSVRow, h as CacheEvictionPolicy, i as CascadingCache, j as CascadingCacheOptions, k as CheckpointToRedisOptions, l as CheckpointToS3Options, m as CircuitBreaker, n as CircuitBreakerOptions, o as CircuitOpenError, p as CircuitState, q as ClickHouseClientLike, r as ClickHouseInsertClientLike, s as ClickHouseRow, t as CronSchedule, D as DistillBundle, u as DistillOptions, v as DrizzleQueryLike, w as EmitTriad, x as ErrorMessage, y as EventTargetLike, z as ExponentialBackoffOptions, F as ExternalBundleOptions, G as ExternalRegister, E as Extraction, H as FSEvent, I as FSEventType, J as FallbackInput, K as FileWriterLike, L as FromCSVOptions, M as FromClickHouseWatchOptions, O as FromCronOptions, P as FromDrizzleOptions, Q as FromFSWatchOptions, R as FromGitHookOptions, S as FromHTTPOptions, T as FromHTTPPollOptions, U as FromHTTPStreamOptions, V as FromKafkaOptions, W as FromKyselyOptions, X as FromMCPOptions, Y as FromNATSOptions, Z as FromNDJSONOptions, _ as FromOTelOptions, $ as FromPrismaOptions, a0 as FromPrometheusOptions, a1 as FromPulsarOptions, a2 as FromRabbitMQOptions, a3 as FromRedisStreamOptions, a4 as FromSSEOptions, a5 as FromSqliteOptions, a6 as FromStatsDOptions, a7 as FromSyslogOptions, a8 as FromWebSocketReconnectOptions, a9 as GitEvent, aa as GitHookType, ab as HTTPBundle, ac as IndexBackend, ad as IndexRow, ae as InitMessage, af as JitterMode, ag as KafkaConsumerLike, ah as KafkaMessage, ai as KafkaProducerLike, aj as KyselyQueryLike, ak as ListBackend, al as LogBackend, am as LokiClientLike, an as LokiStream, ao as MCPClientLike, ap as MapBackend, aq as MergeMapOptions, ar as MongoCollectionLike, as as NATSClientLike, at as NATSMessage, au as NATSSubscriptionLike, av as NS_PER_MS, aw as NS_PER_SEC, ax as NativeIndexBackend, ay as NativeListBackend, az as NativeLogBackend, aA as NativeMapBackend, aB as NativeMapBackendOptions, aC as NativePubSubBackend, N as NodeInput, aD as OTelBundle, aE as OTelLog, aF as OTelMetric, aG as OTelRegister, aH as OTelSpan, aI as PostgresClientLike, aJ as PrismaModelLike, aK as PrometheusMetric, aL as PubSubBackend, aM as PubSubHub, aN as PubSubHubOptions, aO as PulsarConsumerLike, aP as PulsarMessage, aQ as PulsarProducerLike, aR as RabbitMQChannelLike, aS as RabbitMQMessage, aT as RateLimiterOptions, aU as RateLimiterOverflowError, aV as RateLimiterOverflowPolicy, aW as ReactiveCounterBundle, aX as ReactiveIndexBundle, aY as ReactiveIndexOptions, aZ as ReactiveListBundle, a_ as ReactiveListOptions, a$ as ReactiveLogBundle, b0 as ReactiveLogOptions, b1 as ReactiveMapBundle, b2 as ReactiveMapOptions, b3 as ReactiveSinkBackpressureOptions, b4 as ReactiveSinkConfig, b5 as ReactiveSinkHandle, b6 as ReactiveSinkOptions, b7 as ReactiveSinkRetryOptions, b8 as ReadyMessage, b9 as RedisCheckpointClientLike, ba as RedisClientLike, bb as RedisStreamEntry, bc as ResettableTimer, bd as RetryOptions, be as RetrySourceOptions, bf as S3ClientLike, bg as SSEEvent, bh as SignalMessage, bi as SinkFailure, bj as SinkHandle, bk as SinkTransportError, bl as SqliteDbLike, bm as SqliteIterableDbLike, bn as StatsDMetric, bo as StatsDRegister, bp as StatusValue, bq as SyslogMessage, br as SyslogRegister, bs as TapObserver, bt as TempoClientLike, bu as ThrottleOptions, bv as TimeoutError, bw as ToCSVOptions, bx as ToClickHouseOptions, by as ToFileOptions, bz as ToHTTPOptions, bA as ToKafkaOptions, bB as ToLokiOptions, bC as ToMongoOptions, bD as ToNATSOptions, bE as ToPostgresOptions, bF as ToPulsarOptions, bG as ToRabbitMQOptions, bH as ToRedisStreamOptions, bI as ToS3Options, bJ as ToSSEOptions, bK as ToSqliteOptions, bL as ToTempoOptions, bM as ToWebSocketOptions, bN as TokenBucket, bO as UpsertOptions, bP as ValueMessage, bQ as VerifiableBundle, bR as VerifiableOptions, bS as VerifyValue, bT as WatermarkController, bU as WatermarkOptions, bV as WebSocketLike, bW as WebSocketMessageEventLike, bX as WebSocketRegister, bY as WebhookRegister, bZ as WithBreakerBundle, b_ as WithStatusBundle, b$ as WorkerBridge, c0 as WorkerBridgeOptions, c1 as WorkerSelfHandle, c2 as WorkerSelfOptions, c3 as WorkerTransport, c4 as audit, c5 as buffer, c6 as bufferCount, c7 as bufferTime, c8 as cached, c9 as cascadingCache, ca as catchError, cb as checkpointToRedis, cc as checkpointToS3, cd as circuitBreaker, ce as combine, cf as combineLatest, cg as concat, ch as concatMap, ci as constant, cj as createTransport, ck as createWatermarkController, cl as csvRows, cm as debounce, cn as debounceTime, co as decorrelatedJitter, cp as delay, cq as deserializeError, cr as distill, cs as distinctUntilChanged, ct as elementAt, cu as empty, cv as escapeRegexChar, cw as exhaustMap, cx as exponential, cy as externalBundle, cz as externalProducer, cB as fallback, cC as fibonacci, cD as filter, cE as find, cF as first, cG as firstValueFrom, cH as firstWhere, cI as flatMap, cJ as forEach, cK as fromAny, cL as fromAsyncIter, cM as fromCSV, cN as fromClickHouseWatch, cO as fromCron, cP as fromDrizzle, cQ as fromEvent, cR as fromFSWatch, cS as fromGitHook, cT as fromHTTP, cU as fromHTTPPoll, cV as fromHTTPStream, cW as fromIter, cX as fromKafka, cY as fromKysely, cZ as fromMCP, c_ as fromNATS, c$ as fromNDJSON, d0 as fromOTel, d1 as fromPrisma, d2 as fromPrometheus, d3 as fromPromise, d4 as fromPulsar, d5 as fromRabbitMQ, d6 as fromRedisStream, d7 as fromSSE, d8 as fromSqlite, d9 as fromSqliteCursor, da as fromStatsD, db as fromSyslog, dc as fromTimer, dd as fromWebSocket, de as fromWebSocketReconnect, df as fromWebhook, dg as globToRegExp, dh as interval, di as keepalive, dj as last, dk as linear, dl as lru, dm as map, dn as matchesAnyPattern, dp as matchesCron, dq as merge, dr as mergeMap, ds as nameToSignal, dt as ndjsonRows, du as never, dv as of, dw as pairwise, dx as parseCron, dy as parsePrometheusText, dz as parseStatsD, dA as parseSyslog, dB as pausable, dC as pubsub, dD as race, dE as rateLimiter, dF as reactiveCounter, dG as reactiveIndex, dH as reactiveList, dI as reactiveLog, dJ as reactiveMap, dK as reactiveSink, dL as reduce, dM as repeat, dN as replay, dO as rescue, dP as resolveBackoffPreset, dQ as retry, dR as retrySource, dS as sample, dT as scan, dU as serializeError, dV as share, dW as shareReplay, dX as signalToName, dY as skip, dZ as switchMap, d_ as take, d$ as takeUntil, e0 as takeWhile, e1 as tap, e2 as throttle, e3 as throttleTime, e4 as throwError, e5 as timeout, e6 as toArray, e7 as toCSV, e8 as toClickHouse, e9 as toFile, ea as toHTTP, eb as toKafka, ec as toLoki, ed as toMongo, ee as toNATS, ef as toPostgres, eg as toPulsar, eh as toRabbitMQ, ei as toReadableStream, ej as toRedisStream, ek as toS3, el as toSSE, em as toSSEBytes, en as toSqlite, eo as toTempo, ep as toWebSocket, eq as tokenBucket, er as valve, es as verifiable, et as window, eu as windowCount, ev as windowTime, ew as withBreaker, ex as withLatestFrom, ey as withMaxAttempts, ez as withStatus, eA as workerBridge, eB as workerSelf, eC as zip } from '../index-BvWfZCTt.cjs';
2
- export { T as ToObservableOptions, t as toObservable } from '../observable-DWydVy5b.cjs';
3
- export { I as IndexedDbStorageSpec, S as StorageHandle, a as StorageTier, d as dictStorage, f as fileStorage, b as fromIDBRequest, c as fromIDBTransaction, i as indexedDbStorage, m as memoryStorage, s as sqliteStorage } from '../storage-Bew05Xy6.cjs';
4
- import '../node-C5UD5MGq.cjs';
1
+ export { A as AckableMessage, a as AdapterHandlers, b as AsyncSourceOpts, B as BackoffPreset, c as BackoffStrategy, d as BatchMessage, e as BridgeMessage, f as BufferedSinkHandle, g as BundleTriad, C as CSVRow, h as CacheEvictionPolicy, i as CascadingCache, j as CascadingCacheOptions, k as CheckpointToRedisOptions, l as CheckpointToS3Options, m as CircuitBreaker, n as CircuitBreakerOptions, o as CircuitOpenError, p as CircuitState, q as ClickHouseClientLike, r as ClickHouseInsertClientLike, s as ClickHouseRow, t as CronSchedule, D as DistillBundle, u as DistillOptions, v as DrizzleQueryLike, w as EmitTriad, x as ErrorMessage, y as EventTargetLike, z as ExponentialBackoffOptions, F as ExternalBundleOptions, G as ExternalRegister, E as Extraction, H as FSEvent, I as FSEventType, J as FallbackInput, K as FileWriterLike, L as FromCSVOptions, M as FromClickHouseWatchOptions, O as FromCronOptions, P as FromDrizzleOptions, Q as FromFSWatchOptions, R as FromGitHookOptions, S as FromHTTPOptions, T as FromHTTPPollOptions, U as FromHTTPStreamOptions, V as FromKafkaOptions, W as FromKyselyOptions, X as FromMCPOptions, Y as FromNATSOptions, Z as FromNDJSONOptions, _ as FromOTelOptions, $ as FromPrismaOptions, a0 as FromPrometheusOptions, a1 as FromPulsarOptions, a2 as FromRabbitMQOptions, a3 as FromRedisStreamOptions, a4 as FromSSEOptions, a5 as FromSqliteOptions, a6 as FromStatsDOptions, a7 as FromSyslogOptions, a8 as FromWebSocketReconnectOptions, a9 as GitEvent, aa as GitHookType, ab as HTTPBundle, ac as IndexBackend, ad as IndexRow, ae as InitMessage, af as JitterMode, ag as KafkaConsumerLike, ah as KafkaMessage, ai as KafkaProducerLike, aj as KyselyQueryLike, ak as ListBackend, al as LogBackend, am as LokiClientLike, an as LokiStream, ao as MCPClientLike, ap as MapBackend, aq as MergeMapOptions, ar as MongoCollectionLike, as as NATSClientLike, at as NATSMessage, au as NATSSubscriptionLike, av as NS_PER_MS, aw as NS_PER_SEC, ax as NativeIndexBackend, ay as NativeListBackend, az as NativeLogBackend, aA as NativeMapBackend, aB as NativeMapBackendOptions, aC as NativePubSubBackend, N as NodeInput, aD as OTelBundle, aE as OTelLog, aF as OTelMetric, aG as OTelRegister, aH as OTelSpan, aI as PostgresClientLike, aJ as PrismaModelLike, aK as PrometheusMetric, aL as PubSubBackend, aM as PubSubHub, aN as PubSubHubOptions, aO as PulsarConsumerLike, aP as PulsarMessage, aQ as PulsarProducerLike, aR as RabbitMQChannelLike, aS as RabbitMQMessage, aT as RateLimiterOptions, aU as RateLimiterOverflowError, aV as RateLimiterOverflowPolicy, aW as ReactiveCounterBundle, aX as ReactiveIndexBundle, aY as ReactiveIndexOptions, aZ as ReactiveListBundle, a_ as ReactiveListOptions, a$ as ReactiveLogBundle, b0 as ReactiveLogOptions, b1 as ReactiveMapBundle, b2 as ReactiveMapOptions, b3 as ReactiveSinkBackpressureOptions, b4 as ReactiveSinkConfig, b5 as ReactiveSinkHandle, b6 as ReactiveSinkOptions, b7 as ReactiveSinkRetryOptions, b8 as ReadyMessage, b9 as RedisCheckpointClientLike, ba as RedisClientLike, bb as RedisStreamEntry, bc as ResettableTimer, bd as RetryOptions, be as RetrySourceOptions, bf as S3ClientLike, bg as SSEEvent, bh as SignalMessage, bi as SinkFailure, bj as SinkHandle, bk as SinkTransportError, bl as SqliteDbLike, bm as SqliteIterableDbLike, bn as StatsDMetric, bo as StatsDRegister, bp as StatusValue, bq as SyslogMessage, br as SyslogRegister, bs as TapObserver, bt as TempoClientLike, bu as ThrottleOptions, bv as TimeoutError, bw as ToCSVOptions, bx as ToClickHouseOptions, by as ToFileOptions, bz as ToHTTPOptions, bA as ToKafkaOptions, bB as ToLokiOptions, bC as ToMongoOptions, bD as ToNATSOptions, bE as ToPostgresOptions, bF as ToPulsarOptions, bG as ToRabbitMQOptions, bH as ToRedisStreamOptions, bI as ToS3Options, bJ as ToSSEOptions, bK as ToSqliteOptions, bL as ToTempoOptions, bM as ToWebSocketOptions, bN as TokenBucket, bO as UpsertOptions, bP as ValueMessage, bQ as VerifiableBundle, bR as VerifiableOptions, bS as VerifyValue, bT as WatermarkController, bU as WatermarkOptions, bV as WebSocketLike, bW as WebSocketMessageEventLike, bX as WebSocketRegister, bY as WebhookRegister, bZ as WithBreakerBundle, b_ as WithStatusBundle, b$ as WorkerBridge, c0 as WorkerBridgeOptions, c1 as WorkerSelfHandle, c2 as WorkerSelfOptions, c3 as WorkerTransport, c4 as audit, c5 as buffer, c6 as bufferCount, c7 as bufferTime, c8 as cached, c9 as cascadingCache, ca as catchError, cb as checkpointToRedis, cc as checkpointToS3, cd as circuitBreaker, ce as combine, cf as combineLatest, cg as concat, ch as concatMap, ci as constant, cj as createTransport, ck as createWatermarkController, cl as csvRows, cm as debounce, cn as debounceTime, co as decorrelatedJitter, cp as delay, cq as deserializeError, cr as distill, cs as distinctUntilChanged, ct as elementAt, cu as empty, cv as escapeRegexChar, cw as exhaustMap, cx as exponential, cy as externalBundle, cz as externalProducer, cB as fallback, cC as fibonacci, cD as filter, cE as find, cF as first, cG as firstValueFrom, cH as firstWhere, cI as flatMap, cJ as forEach, cK as fromAny, cL as fromAsyncIter, cM as fromCSV, cN as fromClickHouseWatch, cO as fromCron, cP as fromDrizzle, cQ as fromEvent, cR as fromFSWatch, cS as fromGitHook, cT as fromHTTP, cU as fromHTTPPoll, cV as fromHTTPStream, cW as fromIter, cX as fromKafka, cY as fromKysely, cZ as fromMCP, c_ as fromNATS, c$ as fromNDJSON, d0 as fromOTel, d1 as fromPrisma, d2 as fromPrometheus, d3 as fromPromise, d4 as fromPulsar, d5 as fromRabbitMQ, d6 as fromRedisStream, d7 as fromSSE, d8 as fromSqlite, d9 as fromSqliteCursor, da as fromStatsD, db as fromSyslog, dc as fromTimer, dd as fromWebSocket, de as fromWebSocketReconnect, df as fromWebhook, dg as globToRegExp, dh as interval, di as keepalive, dj as last, dk as linear, dl as lru, dm as map, dn as matchesAnyPattern, dp as matchesCron, dq as merge, dr as mergeMap, ds as nameToSignal, dt as ndjsonRows, du as never, dv as of, dw as pairwise, dx as parseCron, dy as parsePrometheusText, dz as parseStatsD, dA as parseSyslog, dB as pausable, dC as pubsub, dD as race, dE as rateLimiter, dF as reactiveCounter, dG as reactiveIndex, dH as reactiveList, dI as reactiveLog, dJ as reactiveMap, dK as reactiveSink, dL as reduce, dM as repeat, dN as replay, dO as rescue, dP as resolveBackoffPreset, dQ as retry, dR as retrySource, dS as sample, dT as scan, dU as serializeError, dV as share, dW as shareReplay, dX as signalToName, dY as skip, dZ as switchMap, d_ as take, d$ as takeUntil, e0 as takeWhile, e1 as tap, e2 as throttle, e3 as throttleTime, e4 as throwError, e5 as timeout, e6 as toArray, e7 as toCSV, e8 as toClickHouse, e9 as toFile, ea as toHTTP, eb as toKafka, ec as toLoki, ed as toMongo, ee as toNATS, ef as toPostgres, eg as toPulsar, eh as toRabbitMQ, ei as toReadableStream, ej as toRedisStream, ek as toS3, el as toSSE, em as toSSEBytes, en as toSqlite, eo as toTempo, ep as toWebSocket, eq as tokenBucket, er as valve, es as verifiable, et as window, eu as windowCount, ev as windowTime, ew as withBreaker, ex as withLatestFrom, ey as withMaxAttempts, ez as withStatus, eA as workerBridge, eB as workerSelf, eC as zip } from '../index-1z8vRTCt.cjs';
2
+ export { T as ToObservableOptions, t as toObservable } from '../observable-DBnrwcar.cjs';
3
+ export { I as IndexedDbStorageSpec, S as StorageHandle, a as StorageTier, d as dictStorage, f as fileStorage, b as fromIDBRequest, c as fromIDBTransaction, i as indexedDbStorage, m as memoryStorage, s as sqliteStorage } from '../storage-BuTdpCI1.cjs';
4
+ import '../node-B-f-Lu-k.cjs';
5
5
  import 'rxjs';
@@ -1,5 +1,5 @@
1
- export { A as AckableMessage, a as AdapterHandlers, b as AsyncSourceOpts, B as BackoffPreset, c as BackoffStrategy, d as BatchMessage, e as BridgeMessage, f as BufferedSinkHandle, g as BundleTriad, C as CSVRow, h as CacheEvictionPolicy, i as CascadingCache, j as CascadingCacheOptions, k as CheckpointToRedisOptions, l as CheckpointToS3Options, m as CircuitBreaker, n as CircuitBreakerOptions, o as CircuitOpenError, p as CircuitState, q as ClickHouseClientLike, r as ClickHouseInsertClientLike, s as ClickHouseRow, t as CronSchedule, D as DistillBundle, u as DistillOptions, v as DrizzleQueryLike, w as EmitTriad, x as ErrorMessage, y as EventTargetLike, z as ExponentialBackoffOptions, F as ExternalBundleOptions, G as ExternalRegister, E as Extraction, H as FSEvent, I as FSEventType, J as FallbackInput, K as FileWriterLike, L as FromCSVOptions, M as FromClickHouseWatchOptions, O as FromCronOptions, P as FromDrizzleOptions, Q as FromFSWatchOptions, R as FromGitHookOptions, S as FromHTTPOptions, T as FromHTTPPollOptions, U as FromHTTPStreamOptions, V as FromKafkaOptions, W as FromKyselyOptions, X as FromMCPOptions, Y as FromNATSOptions, Z as FromNDJSONOptions, _ as FromOTelOptions, $ as FromPrismaOptions, a0 as FromPrometheusOptions, a1 as FromPulsarOptions, a2 as FromRabbitMQOptions, a3 as FromRedisStreamOptions, a4 as FromSSEOptions, a5 as FromSqliteOptions, a6 as FromStatsDOptions, a7 as FromSyslogOptions, a8 as FromWebSocketReconnectOptions, a9 as GitEvent, aa as GitHookType, ab as HTTPBundle, ac as IndexBackend, ad as IndexRow, ae as InitMessage, af as JitterMode, ag as KafkaConsumerLike, ah as KafkaMessage, ai as KafkaProducerLike, aj as KyselyQueryLike, ak as ListBackend, al as LogBackend, am as LokiClientLike, an as LokiStream, ao as MCPClientLike, ap as MapBackend, aq as MergeMapOptions, ar as MongoCollectionLike, as as NATSClientLike, at as NATSMessage, au as NATSSubscriptionLike, av as NS_PER_MS, aw as NS_PER_SEC, ax as NativeIndexBackend, ay as NativeListBackend, az as NativeLogBackend, aA as NativeMapBackend, aB as NativeMapBackendOptions, aC as NativePubSubBackend, N as NodeInput, aD as OTelBundle, aE as OTelLog, aF as OTelMetric, aG as OTelRegister, aH as OTelSpan, aI as PostgresClientLike, aJ as PrismaModelLike, aK as PrometheusMetric, aL as PubSubBackend, aM as PubSubHub, aN as PubSubHubOptions, aO as PulsarConsumerLike, aP as PulsarMessage, aQ as PulsarProducerLike, aR as RabbitMQChannelLike, aS as RabbitMQMessage, aT as RateLimiterOptions, aU as RateLimiterOverflowError, aV as RateLimiterOverflowPolicy, aW as ReactiveCounterBundle, aX as ReactiveIndexBundle, aY as ReactiveIndexOptions, aZ as ReactiveListBundle, a_ as ReactiveListOptions, a$ as ReactiveLogBundle, b0 as ReactiveLogOptions, b1 as ReactiveMapBundle, b2 as ReactiveMapOptions, b3 as ReactiveSinkBackpressureOptions, b4 as ReactiveSinkConfig, b5 as ReactiveSinkHandle, b6 as ReactiveSinkOptions, b7 as ReactiveSinkRetryOptions, b8 as ReadyMessage, b9 as RedisCheckpointClientLike, ba as RedisClientLike, bb as RedisStreamEntry, bc as ResettableTimer, bd as RetryOptions, be as RetrySourceOptions, bf as S3ClientLike, bg as SSEEvent, bh as SignalMessage, bi as SinkFailure, bj as SinkHandle, bk as SinkTransportError, bl as SqliteDbLike, bm as SqliteIterableDbLike, bn as StatsDMetric, bo as StatsDRegister, bp as StatusValue, bq as SyslogMessage, br as SyslogRegister, bs as TapObserver, bt as TempoClientLike, bu as ThrottleOptions, bv as TimeoutError, bw as ToCSVOptions, bx as ToClickHouseOptions, by as ToFileOptions, bz as ToHTTPOptions, bA as ToKafkaOptions, bB as ToLokiOptions, bC as ToMongoOptions, bD as ToNATSOptions, bE as ToPostgresOptions, bF as ToPulsarOptions, bG as ToRabbitMQOptions, bH as ToRedisStreamOptions, bI as ToS3Options, bJ as ToSSEOptions, bK as ToSqliteOptions, bL as ToTempoOptions, bM as ToWebSocketOptions, bN as TokenBucket, bO as UpsertOptions, bP as ValueMessage, bQ as VerifiableBundle, bR as VerifiableOptions, bS as VerifyValue, bT as WatermarkController, bU as WatermarkOptions, bV as WebSocketLike, bW as WebSocketMessageEventLike, bX as WebSocketRegister, bY as WebhookRegister, bZ as WithBreakerBundle, b_ as WithStatusBundle, b$ as WorkerBridge, c0 as WorkerBridgeOptions, c1 as WorkerSelfHandle, c2 as WorkerSelfOptions, c3 as WorkerTransport, c4 as audit, c5 as buffer, c6 as bufferCount, c7 as bufferTime, c8 as cached, c9 as cascadingCache, ca as catchError, cb as checkpointToRedis, cc as checkpointToS3, cd as circuitBreaker, ce as combine, cf as combineLatest, cg as concat, ch as concatMap, ci as constant, cj as createTransport, ck as createWatermarkController, cl as csvRows, cm as debounce, cn as debounceTime, co as decorrelatedJitter, cp as delay, cq as deserializeError, cr as distill, cs as distinctUntilChanged, ct as elementAt, cu as empty, cv as escapeRegexChar, cw as exhaustMap, cx as exponential, cy as externalBundle, cz as externalProducer, cB as fallback, cC as fibonacci, cD as filter, cE as find, cF as first, cG as firstValueFrom, cH as firstWhere, cI as flatMap, cJ as forEach, cK as fromAny, cL as fromAsyncIter, cM as fromCSV, cN as fromClickHouseWatch, cO as fromCron, cP as fromDrizzle, cQ as fromEvent, cR as fromFSWatch, cS as fromGitHook, cT as fromHTTP, cU as fromHTTPPoll, cV as fromHTTPStream, cW as fromIter, cX as fromKafka, cY as fromKysely, cZ as fromMCP, c_ as fromNATS, c$ as fromNDJSON, d0 as fromOTel, d1 as fromPrisma, d2 as fromPrometheus, d3 as fromPromise, d4 as fromPulsar, d5 as fromRabbitMQ, d6 as fromRedisStream, d7 as fromSSE, d8 as fromSqlite, d9 as fromSqliteCursor, da as fromStatsD, db as fromSyslog, dc as fromTimer, dd as fromWebSocket, de as fromWebSocketReconnect, df as fromWebhook, dg as globToRegExp, dh as interval, di as keepalive, dj as last, dk as linear, dl as lru, dm as map, dn as matchesAnyPattern, dp as matchesCron, dq as merge, dr as mergeMap, ds as nameToSignal, dt as ndjsonRows, du as never, dv as of, dw as pairwise, dx as parseCron, dy as parsePrometheusText, dz as parseStatsD, dA as parseSyslog, dB as pausable, dC as pubsub, dD as race, dE as rateLimiter, dF as reactiveCounter, dG as reactiveIndex, dH as reactiveList, dI as reactiveLog, dJ as reactiveMap, dK as reactiveSink, dL as reduce, dM as repeat, dN as replay, dO as rescue, dP as resolveBackoffPreset, dQ as retry, dR as retrySource, dS as sample, dT as scan, dU as serializeError, dV as share, dW as shareReplay, dX as signalToName, dY as skip, dZ as switchMap, d_ as take, d$ as takeUntil, e0 as takeWhile, e1 as tap, e2 as throttle, e3 as throttleTime, e4 as throwError, e5 as timeout, e6 as toArray, e7 as toCSV, e8 as toClickHouse, e9 as toFile, ea as toHTTP, eb as toKafka, ec as toLoki, ed as toMongo, ee as toNATS, ef as toPostgres, eg as toPulsar, eh as toRabbitMQ, ei as toReadableStream, ej as toRedisStream, ek as toS3, el as toSSE, em as toSSEBytes, en as toSqlite, eo as toTempo, ep as toWebSocket, eq as tokenBucket, er as valve, es as verifiable, et as window, eu as windowCount, ev as windowTime, ew as withBreaker, ex as withLatestFrom, ey as withMaxAttempts, ez as withStatus, eA as workerBridge, eB as workerSelf, eC as zip } from '../index-BbYZma8G.js';
2
- export { T as ToObservableOptions, t as toObservable } from '../observable-CQRBtEbq.js';
3
- export { I as IndexedDbStorageSpec, S as StorageHandle, a as StorageTier, d as dictStorage, f as fileStorage, b as fromIDBRequest, c as fromIDBTransaction, i as indexedDbStorage, m as memoryStorage, s as sqliteStorage } from '../storage-C9fZfMfM.js';
4
- import '../node-C5UD5MGq.js';
1
+ export { A as AckableMessage, a as AdapterHandlers, b as AsyncSourceOpts, B as BackoffPreset, c as BackoffStrategy, d as BatchMessage, e as BridgeMessage, f as BufferedSinkHandle, g as BundleTriad, C as CSVRow, h as CacheEvictionPolicy, i as CascadingCache, j as CascadingCacheOptions, k as CheckpointToRedisOptions, l as CheckpointToS3Options, m as CircuitBreaker, n as CircuitBreakerOptions, o as CircuitOpenError, p as CircuitState, q as ClickHouseClientLike, r as ClickHouseInsertClientLike, s as ClickHouseRow, t as CronSchedule, D as DistillBundle, u as DistillOptions, v as DrizzleQueryLike, w as EmitTriad, x as ErrorMessage, y as EventTargetLike, z as ExponentialBackoffOptions, F as ExternalBundleOptions, G as ExternalRegister, E as Extraction, H as FSEvent, I as FSEventType, J as FallbackInput, K as FileWriterLike, L as FromCSVOptions, M as FromClickHouseWatchOptions, O as FromCronOptions, P as FromDrizzleOptions, Q as FromFSWatchOptions, R as FromGitHookOptions, S as FromHTTPOptions, T as FromHTTPPollOptions, U as FromHTTPStreamOptions, V as FromKafkaOptions, W as FromKyselyOptions, X as FromMCPOptions, Y as FromNATSOptions, Z as FromNDJSONOptions, _ as FromOTelOptions, $ as FromPrismaOptions, a0 as FromPrometheusOptions, a1 as FromPulsarOptions, a2 as FromRabbitMQOptions, a3 as FromRedisStreamOptions, a4 as FromSSEOptions, a5 as FromSqliteOptions, a6 as FromStatsDOptions, a7 as FromSyslogOptions, a8 as FromWebSocketReconnectOptions, a9 as GitEvent, aa as GitHookType, ab as HTTPBundle, ac as IndexBackend, ad as IndexRow, ae as InitMessage, af as JitterMode, ag as KafkaConsumerLike, ah as KafkaMessage, ai as KafkaProducerLike, aj as KyselyQueryLike, ak as ListBackend, al as LogBackend, am as LokiClientLike, an as LokiStream, ao as MCPClientLike, ap as MapBackend, aq as MergeMapOptions, ar as MongoCollectionLike, as as NATSClientLike, at as NATSMessage, au as NATSSubscriptionLike, av as NS_PER_MS, aw as NS_PER_SEC, ax as NativeIndexBackend, ay as NativeListBackend, az as NativeLogBackend, aA as NativeMapBackend, aB as NativeMapBackendOptions, aC as NativePubSubBackend, N as NodeInput, aD as OTelBundle, aE as OTelLog, aF as OTelMetric, aG as OTelRegister, aH as OTelSpan, aI as PostgresClientLike, aJ as PrismaModelLike, aK as PrometheusMetric, aL as PubSubBackend, aM as PubSubHub, aN as PubSubHubOptions, aO as PulsarConsumerLike, aP as PulsarMessage, aQ as PulsarProducerLike, aR as RabbitMQChannelLike, aS as RabbitMQMessage, aT as RateLimiterOptions, aU as RateLimiterOverflowError, aV as RateLimiterOverflowPolicy, aW as ReactiveCounterBundle, aX as ReactiveIndexBundle, aY as ReactiveIndexOptions, aZ as ReactiveListBundle, a_ as ReactiveListOptions, a$ as ReactiveLogBundle, b0 as ReactiveLogOptions, b1 as ReactiveMapBundle, b2 as ReactiveMapOptions, b3 as ReactiveSinkBackpressureOptions, b4 as ReactiveSinkConfig, b5 as ReactiveSinkHandle, b6 as ReactiveSinkOptions, b7 as ReactiveSinkRetryOptions, b8 as ReadyMessage, b9 as RedisCheckpointClientLike, ba as RedisClientLike, bb as RedisStreamEntry, bc as ResettableTimer, bd as RetryOptions, be as RetrySourceOptions, bf as S3ClientLike, bg as SSEEvent, bh as SignalMessage, bi as SinkFailure, bj as SinkHandle, bk as SinkTransportError, bl as SqliteDbLike, bm as SqliteIterableDbLike, bn as StatsDMetric, bo as StatsDRegister, bp as StatusValue, bq as SyslogMessage, br as SyslogRegister, bs as TapObserver, bt as TempoClientLike, bu as ThrottleOptions, bv as TimeoutError, bw as ToCSVOptions, bx as ToClickHouseOptions, by as ToFileOptions, bz as ToHTTPOptions, bA as ToKafkaOptions, bB as ToLokiOptions, bC as ToMongoOptions, bD as ToNATSOptions, bE as ToPostgresOptions, bF as ToPulsarOptions, bG as ToRabbitMQOptions, bH as ToRedisStreamOptions, bI as ToS3Options, bJ as ToSSEOptions, bK as ToSqliteOptions, bL as ToTempoOptions, bM as ToWebSocketOptions, bN as TokenBucket, bO as UpsertOptions, bP as ValueMessage, bQ as VerifiableBundle, bR as VerifiableOptions, bS as VerifyValue, bT as WatermarkController, bU as WatermarkOptions, bV as WebSocketLike, bW as WebSocketMessageEventLike, bX as WebSocketRegister, bY as WebhookRegister, bZ as WithBreakerBundle, b_ as WithStatusBundle, b$ as WorkerBridge, c0 as WorkerBridgeOptions, c1 as WorkerSelfHandle, c2 as WorkerSelfOptions, c3 as WorkerTransport, c4 as audit, c5 as buffer, c6 as bufferCount, c7 as bufferTime, c8 as cached, c9 as cascadingCache, ca as catchError, cb as checkpointToRedis, cc as checkpointToS3, cd as circuitBreaker, ce as combine, cf as combineLatest, cg as concat, ch as concatMap, ci as constant, cj as createTransport, ck as createWatermarkController, cl as csvRows, cm as debounce, cn as debounceTime, co as decorrelatedJitter, cp as delay, cq as deserializeError, cr as distill, cs as distinctUntilChanged, ct as elementAt, cu as empty, cv as escapeRegexChar, cw as exhaustMap, cx as exponential, cy as externalBundle, cz as externalProducer, cB as fallback, cC as fibonacci, cD as filter, cE as find, cF as first, cG as firstValueFrom, cH as firstWhere, cI as flatMap, cJ as forEach, cK as fromAny, cL as fromAsyncIter, cM as fromCSV, cN as fromClickHouseWatch, cO as fromCron, cP as fromDrizzle, cQ as fromEvent, cR as fromFSWatch, cS as fromGitHook, cT as fromHTTP, cU as fromHTTPPoll, cV as fromHTTPStream, cW as fromIter, cX as fromKafka, cY as fromKysely, cZ as fromMCP, c_ as fromNATS, c$ as fromNDJSON, d0 as fromOTel, d1 as fromPrisma, d2 as fromPrometheus, d3 as fromPromise, d4 as fromPulsar, d5 as fromRabbitMQ, d6 as fromRedisStream, d7 as fromSSE, d8 as fromSqlite, d9 as fromSqliteCursor, da as fromStatsD, db as fromSyslog, dc as fromTimer, dd as fromWebSocket, de as fromWebSocketReconnect, df as fromWebhook, dg as globToRegExp, dh as interval, di as keepalive, dj as last, dk as linear, dl as lru, dm as map, dn as matchesAnyPattern, dp as matchesCron, dq as merge, dr as mergeMap, ds as nameToSignal, dt as ndjsonRows, du as never, dv as of, dw as pairwise, dx as parseCron, dy as parsePrometheusText, dz as parseStatsD, dA as parseSyslog, dB as pausable, dC as pubsub, dD as race, dE as rateLimiter, dF as reactiveCounter, dG as reactiveIndex, dH as reactiveList, dI as reactiveLog, dJ as reactiveMap, dK as reactiveSink, dL as reduce, dM as repeat, dN as replay, dO as rescue, dP as resolveBackoffPreset, dQ as retry, dR as retrySource, dS as sample, dT as scan, dU as serializeError, dV as share, dW as shareReplay, dX as signalToName, dY as skip, dZ as switchMap, d_ as take, d$ as takeUntil, e0 as takeWhile, e1 as tap, e2 as throttle, e3 as throttleTime, e4 as throwError, e5 as timeout, e6 as toArray, e7 as toCSV, e8 as toClickHouse, e9 as toFile, ea as toHTTP, eb as toKafka, ec as toLoki, ed as toMongo, ee as toNATS, ef as toPostgres, eg as toPulsar, eh as toRabbitMQ, ei as toReadableStream, ej as toRedisStream, ek as toS3, el as toSSE, em as toSSEBytes, en as toSqlite, eo as toTempo, ep as toWebSocket, eq as tokenBucket, er as valve, es as verifiable, et as window, eu as windowCount, ev as windowTime, ew as withBreaker, ex as withLatestFrom, ey as withMaxAttempts, ez as withStatus, eA as workerBridge, eB as workerSelf, eC as zip } from '../index-BysCTzJz.js';
2
+ export { T as ToObservableOptions, t as toObservable } from '../observable-uP-wy_uK.js';
3
+ export { I as IndexedDbStorageSpec, S as StorageHandle, a as StorageTier, d as dictStorage, f as fileStorage, b as fromIDBRequest, c as fromIDBTransaction, i as indexedDbStorage, m as memoryStorage, s as sqliteStorage } from '../storage-F2X1U1x0.js';
4
+ import '../node-B-f-Lu-k.js';
5
5
  import 'rxjs';
@@ -147,11 +147,15 @@ import {
147
147
  workerBridge,
148
148
  workerSelf,
149
149
  zip
150
- } from "../chunk-BLD3IFYF.js";
150
+ } from "../chunk-5WGT55R4.js";
151
151
  import {
152
152
  NativeLogBackend,
153
- cached,
154
153
  createWatermarkController,
154
+ reactiveLog,
155
+ toObservable
156
+ } from "../chunk-PY4XCDLR.js";
157
+ import {
158
+ cached,
155
159
  empty,
156
160
  escapeRegexChar,
157
161
  firstValueFrom,
@@ -173,18 +177,16 @@ import {
173
177
  of,
174
178
  parseCron,
175
179
  reactiveCounter,
176
- reactiveLog,
177
180
  replay,
178
181
  share,
179
182
  shareReplay,
180
183
  throwError,
181
- toArray,
182
- toObservable
183
- } from "../chunk-IR3KMOLX.js";
184
+ toArray
185
+ } from "../chunk-AOCBDH4T.js";
184
186
  import {
185
187
  ResettableTimer
186
188
  } from "../chunk-7TAQJHQV.js";
187
- import "../chunk-QA3RP5NH.js";
189
+ import "../chunk-5DJTTKX3.js";
188
190
  export {
189
191
  CircuitOpenError,
190
192
  NS_PER_MS,
@@ -324,9 +324,20 @@ var flushInProgress = false;
324
324
  var drainPhase2 = [];
325
325
  var drainPhase3 = [];
326
326
  var drainPhase4 = [];
327
+ var flushHooks = [];
327
328
  function isBatching() {
328
329
  return batchDepth > 0 || flushInProgress;
329
330
  }
331
+ function isExplicitlyBatching() {
332
+ return batchDepth > 0;
333
+ }
334
+ function registerBatchFlushHook(hook) {
335
+ if (batchDepth > 0) {
336
+ flushHooks.push(hook);
337
+ } else {
338
+ hook();
339
+ }
340
+ }
330
341
  function batch(fn) {
331
342
  batchDepth += 1;
332
343
  let threw = false;
@@ -340,6 +351,13 @@ function batch(fn) {
340
351
  if (batchDepth === 0) {
341
352
  if (threw) {
342
353
  if (!flushInProgress) {
354
+ const hooks = flushHooks.splice(0);
355
+ for (const h of hooks) {
356
+ try {
357
+ h();
358
+ } catch {
359
+ }
360
+ }
343
361
  drainPhase2.length = 0;
344
362
  drainPhase3.length = 0;
345
363
  drainPhase4.length = 0;
@@ -356,7 +374,18 @@ function drainPending() {
356
374
  const errors = [];
357
375
  let iterations = 0;
358
376
  try {
359
- while (drainPhase2.length > 0 || drainPhase3.length > 0 || drainPhase4.length > 0) {
377
+ while (drainPhase2.length > 0 || drainPhase3.length > 0 || drainPhase4.length > 0 || ownsFlush && flushHooks.length > 0) {
378
+ if (ownsFlush && flushHooks.length > 0) {
379
+ const hooks = flushHooks.splice(0);
380
+ for (const h of hooks) {
381
+ try {
382
+ h();
383
+ } catch (e) {
384
+ errors.push(e);
385
+ }
386
+ }
387
+ continue;
388
+ }
360
389
  iterations += 1;
361
390
  if (iterations > MAX_DRAIN_ITERATIONS) {
362
391
  drainPhase2.length = 0;
@@ -1006,6 +1035,22 @@ var NodeImpl = class _NodeImpl {
1006
1035
  * treats `0` as "wave settled" — O(1) check for full dep settlement.
1007
1036
  */
1008
1037
  _dirtyDepCount = 0;
1038
+ // --- Per-batch emit accumulator (Bug 2: K+1 fan-in fix) ---
1039
+ /**
1040
+ * Inside an explicit `batch(() => ...)` scope, every `_emit` accumulates
1041
+ * its already-framed messages here instead of dispatching synchronously.
1042
+ * At batch end, `_flushBatchPending` runs (registered via
1043
+ * `registerBatchFlushHook`) and delivers the whole accumulated batch as
1044
+ * one `downWithBatch` call — collapsing what would otherwise be K
1045
+ * separate sink invocations into one. This is the fix for the diamond
1046
+ * fan-in K+1 over-fire.
1047
+ *
1048
+ * `null` outside batch (or after flush). Only ever appended to within
1049
+ * a single explicit batch lifetime; reset to `null` on flush. State
1050
+ * updates (cache, version, status) still happen per-emit via
1051
+ * `_updateState` — only the downstream delivery is coalesced.
1052
+ */
1053
+ _batchPendingMessages = null;
1009
1054
  // --- PAUSE/RESUME lock tracking (C0) ---
1010
1055
  /**
1011
1056
  * Set of active pause locks held against this node. Every `[PAUSE, lockId]`
@@ -1383,7 +1428,10 @@ var NodeImpl = class _NodeImpl {
1383
1428
  dep.unsub = noopUnsub;
1384
1429
  dep.unsub = dep.node.subscribe((msgs) => {
1385
1430
  if (dep.unsub === null) return;
1431
+ const tierOf = this._config.tierOf;
1432
+ let sawSettlement = false;
1386
1433
  for (const m of msgs) {
1434
+ if (tierOf(m[0]) >= 3) sawSettlement = true;
1387
1435
  this._config.onMessage(
1388
1436
  this,
1389
1437
  m,
@@ -1391,6 +1439,7 @@ var NodeImpl = class _NodeImpl {
1391
1439
  this._actions
1392
1440
  );
1393
1441
  }
1442
+ if (sawSettlement) this._maybeRunFnOnSettlement();
1394
1443
  });
1395
1444
  subscribedCount++;
1396
1445
  }
@@ -1445,7 +1494,10 @@ var NodeImpl = class _NodeImpl {
1445
1494
  try {
1446
1495
  record.unsub = depNode.subscribe((msgs) => {
1447
1496
  if (record.unsub === null) return;
1497
+ const tierOf = this._config.tierOf;
1498
+ let sawSettlement = false;
1448
1499
  for (const m of msgs) {
1500
+ if (tierOf(m[0]) >= 3) sawSettlement = true;
1449
1501
  this._config.onMessage(
1450
1502
  this,
1451
1503
  m,
@@ -1453,6 +1505,7 @@ var NodeImpl = class _NodeImpl {
1453
1505
  this._actions
1454
1506
  );
1455
1507
  }
1508
+ if (sawSettlement) this._maybeRunFnOnSettlement();
1456
1509
  });
1457
1510
  } catch (err) {
1458
1511
  record.unsub = null;
@@ -1574,7 +1627,6 @@ var NodeImpl = class _NodeImpl {
1574
1627
  }
1575
1628
  return;
1576
1629
  }
1577
- this._maybeRunFnOnSettlement();
1578
1630
  }
1579
1631
  // --- Centralized dep-state transitions (A3 settlement counters) ---
1580
1632
  //
@@ -1820,37 +1872,35 @@ var NodeImpl = class _NodeImpl {
1820
1872
  // --- Emit pipeline ---
1821
1873
  /**
1822
1874
  * @internal The unified dispatch waist — one call = one wave.
1875
+ * See `GRAPHREFLY-SPEC.md` §1.3.1 for protocol context — the stages
1876
+ * below are the implementation order.
1823
1877
  *
1824
1878
  * Pipeline stages, in order:
1825
1879
  *
1826
- * 1. Early-return on empty batch.
1827
- * 2. Terminal filter — post-COMPLETE/ERROR only TEARDOWN/INVALIDATE
1880
+ * 1. Terminal filter — post-COMPLETE/ERROR only TEARDOWN/INVALIDATE
1828
1881
  * still propagate so graph teardown and cache-clear still work.
1829
- * 3. Tier sort (stable) — the batch can be in any order when it
1882
+ * 2. Tier sort (stable) — the batch can be in any order when it
1830
1883
  * arrives; the walker downstream (`downWithBatch`) assumes
1831
1884
  * ascending tier monotone, and so does `_updateState`'s tier-3
1832
1885
  * slice walk. This is the single source of truth for ordering.
1833
- * 4. Synthetic DIRTY prefix — if a tier-3 payload is present, no
1886
+ * 3. Synthetic DIRTY prefix — if a tier-3 payload is present, no
1834
1887
  * DIRTY is already in the batch, and the node isn't already in
1835
1888
  * `"dirty"` status, prepend `[DIRTY]` after any tier-0 START
1836
1889
  * entries. Guarantees spec §1.3.1 (DIRTY precedes DATA within
1837
1890
  * the same batch) uniformly across every entry point.
1838
- * 5. PAUSE/RESUME lock bookkeeping (C0) — update `_pauseLocks`,
1891
+ * 4. PAUSE/RESUME lock bookkeeping (C0) — update `_pauseLocks`,
1839
1892
  * derive `_paused`, filter unknown-lockId RESUME, replay
1840
1893
  * bufferAll buffer on final lock release.
1841
- * 6. Meta TEARDOWN fan-out — notify meta children before
1894
+ * 5. Meta TEARDOWN fan-out — notify meta children before
1842
1895
  * `_updateState`'s TEARDOWN branch calls `_deactivate`. Hoisted
1843
1896
  * out of the walk to keep `_updateState` re-entrance-free.
1844
- * 7. `_updateState` — walk the batch in tier order, advancing
1897
+ * 6. `_updateState` — walk the batch in tier order, advancing
1845
1898
  * `_cached` / `_status` / `_versioning` and running equals
1846
1899
  * substitution on tier-3 DATA (§3.5.1). Returns
1847
1900
  * `{finalMessages, equalsError?}`.
1848
- * 8. `downWithBatch` dispatch (or bufferAll capture if paused with
1901
+ * 7. `downWithBatch` dispatch (or bufferAll capture if paused with
1849
1902
  * `pausable: "resumeAll"`).
1850
- * 9. Recursive ERROR emission if equals threw mid-walk.
1851
- *
1852
- * `node.down` / `node.emit` / `actions.down` / `actions.emit` all
1853
- * converge here — the unified `_emit` waist (spec §1.3.1).
1903
+ * 8. Recursive ERROR emission if equals threw mid-walk.
1854
1904
  */
1855
1905
  _emit(messages) {
1856
1906
  if (messages.length === 0) return;
@@ -1946,10 +1996,10 @@ var NodeImpl = class _NodeImpl {
1946
1996
  }
1947
1997
  }
1948
1998
  if (immediate.length > 0) {
1949
- downWithBatch(this._deliverToSinks, immediate, tierOf);
1999
+ this._dispatchOrAccumulate(immediate);
1950
2000
  }
1951
2001
  } else {
1952
- downWithBatch(this._deliverToSinks, finalMessages, this._config.tierOf);
2002
+ this._dispatchOrAccumulate(finalMessages);
1953
2003
  }
1954
2004
  }
1955
2005
  if (equalsError != null) {
@@ -2072,6 +2122,50 @@ var NodeImpl = class _NodeImpl {
2072
2122
  const snapshot = [...this._sinks];
2073
2123
  for (const sink of snapshot) sink(messages);
2074
2124
  };
2125
+ /**
2126
+ * @internal Dispatch entry point that respects the per-batch emit
2127
+ * accumulator (Bug 2). Inside an explicit `batch()` scope, append to
2128
+ * `_batchPendingMessages` and register a flush hook on first append.
2129
+ * Outside batch — or during a drain (where `flushInProgress` is true
2130
+ * but `batchDepth` is 0) — dispatch synchronously through `downWithBatch`.
2131
+ *
2132
+ * Per-emit state updates (`_frameBatch`, `_updateState`) have already
2133
+ * happened by the time we reach here; only the **downstream delivery**
2134
+ * is coalesced. Cache, version, and status are visible mid-batch on
2135
+ * the emitting node itself.
2136
+ */
2137
+ _dispatchOrAccumulate(messages) {
2138
+ if (isExplicitlyBatching()) {
2139
+ if (this._batchPendingMessages === null) {
2140
+ this._batchPendingMessages = [];
2141
+ registerBatchFlushHook(() => this._flushBatchPending());
2142
+ }
2143
+ for (const m of messages) this._batchPendingMessages.push(m);
2144
+ return;
2145
+ }
2146
+ downWithBatch(this._deliverToSinks, messages, this._config.tierOf);
2147
+ }
2148
+ /**
2149
+ * @internal Flushes the accumulated batch through `downWithBatch` and
2150
+ * clears the pending state. Idempotent — safe to call when pending is
2151
+ * already null or empty (e.g. on a `batch()` throw, where the hook
2152
+ * fires for cleanup but the drainPhase queues are wiped after).
2153
+ *
2154
+ * Critical: the accumulated batch is interleaved per-emit framings like
2155
+ * `[DIRTY, DATA(1), DIRTY, DATA(2)]` — non-monotone tier order. We must
2156
+ * re-frame to sort by tier before handing to `downWithBatch`, which
2157
+ * assumes pre-sorted input. `_frameBatch` also handles the synthetic
2158
+ * DIRTY prepend rule (no-op here — `hasDirty` is true since each
2159
+ * accumulated emit already carries its own DIRTY prefix).
2160
+ */
2161
+ _flushBatchPending() {
2162
+ const pending = this._batchPendingMessages;
2163
+ if (pending === null) return;
2164
+ this._batchPendingMessages = null;
2165
+ if (pending.length === 0) return;
2166
+ const framed = this._frameBatch(pending);
2167
+ downWithBatch(this._deliverToSinks, framed, this._config.tierOf);
2168
+ }
2075
2169
  };
2076
2170
  var isNodeArray = (value) => Array.isArray(value);
2077
2171
  var isNodeOptionsObject = (value) => typeof value === "object" && value != null && !Array.isArray(value);