brass-runtime 1.15.0 → 1.16.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 (93) hide show
  1. package/README.md +409 -137
  2. package/dist/agent/cli/main.cjs +40 -35
  3. package/dist/agent/cli/main.js +9 -4
  4. package/dist/agent/cli/main.mjs +9 -4
  5. package/dist/agent/index.cjs +8 -4
  6. package/dist/agent/index.d.ts +1 -1
  7. package/dist/agent/index.js +7 -3
  8. package/dist/agent/index.mjs +7 -3
  9. package/dist/{chunk-PPUXIH5R.js → chunk-2WC63LJK.mjs} +11 -7
  10. package/dist/chunk-3RG5ZIWI.js +10 -0
  11. package/dist/chunk-45F7OKGT.cjs +104 -0
  12. package/dist/chunk-5YOQOXEQ.cjs +2491 -0
  13. package/dist/{chunk-STVLQ3XD.cjs → chunk-7HUOJA4W.cjs} +78 -74
  14. package/dist/{chunk-BMH5AV44.js → chunk-7LVI2GIN.js} +251 -370
  15. package/dist/chunk-7TL2LHQJ.js +2491 -0
  16. package/dist/chunk-7V4KY4RL.mjs +104 -0
  17. package/dist/chunk-7XOPAB5Q.js +2143 -0
  18. package/dist/chunk-CCKHV5BT.mjs +193 -0
  19. package/dist/{chunk-AR22SXML.js → chunk-CY33PGEX.mjs} +488 -421
  20. package/dist/chunk-DJQ7OMMB.cjs +144 -0
  21. package/dist/chunk-F5EUMJL7.mjs +2143 -0
  22. package/dist/chunk-FM4W4QPL.js +193 -0
  23. package/dist/{chunk-TO7IKXYT.js → chunk-G3XGCZDQ.js} +1 -1
  24. package/dist/{chunk-BDF4AMWX.mjs → chunk-G6IQOE4P.mjs} +251 -370
  25. package/dist/chunk-GOV47PPB.mjs +552 -0
  26. package/dist/chunk-H55LI6WY.js +93 -0
  27. package/dist/chunk-IJT6RRQ5.cjs +93 -0
  28. package/dist/{chunk-ELOOF35R.mjs → chunk-J3H54ZRV.mjs} +1 -1
  29. package/dist/chunk-JF4XXPZ5.cjs +552 -0
  30. package/dist/chunk-JNFRRJYH.cjs +2143 -0
  31. package/dist/chunk-JX3LZQJH.cjs +354 -0
  32. package/dist/chunk-K2T3DV26.mjs +93 -0
  33. package/dist/chunk-KCPT2D6G.js +552 -0
  34. package/dist/chunk-MWXMNYJS.cjs +1110 -0
  35. package/dist/{chunk-VEZNF5GZ.cjs → chunk-N6VHMOWB.cjs} +130 -126
  36. package/dist/{chunk-3QMOKAS5.js → chunk-NC5SDRYE.js} +9 -5
  37. package/dist/chunk-NOYZIMUJ.mjs +144 -0
  38. package/dist/{chunk-R3R2FVLG.cjs → chunk-NYL4D7SK.cjs} +5 -5
  39. package/dist/chunk-OBGZSXTJ.cjs +10 -0
  40. package/dist/{chunk-4NHES7VK.mjs → chunk-OOGJ73B6.js} +11 -7
  41. package/dist/chunk-PNVFW245.js +144 -0
  42. package/dist/chunk-PRWCB3QL.mjs +2491 -0
  43. package/dist/{chunk-JFPU5GQI.mjs → chunk-QY5FKYEQ.js} +488 -421
  44. package/dist/chunk-ROJC3NBJ.js +104 -0
  45. package/dist/chunk-SPUEME2B.cjs +343 -0
  46. package/dist/chunk-TDVMADDN.js +343 -0
  47. package/dist/chunk-TVN5I4U6.cjs +193 -0
  48. package/dist/chunk-U5KWK3PX.mjs +343 -0
  49. package/dist/chunk-VFIUZG7J.mjs +354 -0
  50. package/dist/{chunk-TGIFUAK4.cjs → chunk-WQ5QNU5R.cjs} +459 -578
  51. package/dist/chunk-XDZOO4L5.js +354 -0
  52. package/dist/chunk-Y6FXYEAI.mjs +10 -0
  53. package/dist/{chunk-K6M7MDZ4.mjs → chunk-ZGLD4TVZ.mjs} +9 -5
  54. package/dist/client-CtFmoDvM.d.ts +645 -0
  55. package/dist/core/index.cjs +72 -4
  56. package/dist/core/index.d.ts +92 -198
  57. package/dist/core/index.js +106 -38
  58. package/dist/core/index.mjs +106 -38
  59. package/dist/{effect-CMOQKX8y.d.ts → effect-CGNl5Rqp.d.ts} +107 -1
  60. package/dist/effectRunner-3ZHAD3LE.cjs +8 -0
  61. package/dist/effectRunner-A4CHJXJI.js +8 -0
  62. package/dist/effectRunner-OPUF6QRN.mjs +8 -0
  63. package/dist/http/index.cjs +2189 -1271
  64. package/dist/http/index.d.ts +830 -270
  65. package/dist/http/index.js +2008 -1090
  66. package/dist/http/index.mjs +2008 -1090
  67. package/dist/http/testing.cjs +159 -0
  68. package/dist/http/testing.d.ts +42 -0
  69. package/dist/http/testing.js +159 -0
  70. package/dist/http/testing.mjs +159 -0
  71. package/dist/index.cjs +246 -178
  72. package/dist/index.d.ts +9 -35
  73. package/dist/index.js +120 -52
  74. package/dist/index.mjs +120 -52
  75. package/dist/observability/index.cjs +677 -0
  76. package/dist/observability/index.d.ts +79 -0
  77. package/dist/observability/index.js +677 -0
  78. package/dist/observability/index.mjs +677 -0
  79. package/dist/schedule-Fque9Abz.d.ts +70 -0
  80. package/dist/schema/index.cjs +25 -0
  81. package/dist/schema/index.d.ts +177 -0
  82. package/dist/schema/index.js +25 -0
  83. package/dist/schema/index.mjs +25 -0
  84. package/dist/server-C8hDXA74.d.ts +674 -0
  85. package/dist/{stream-FQm9h4Mg.d.ts → stream-dvSs0QS5.d.ts} +1 -1
  86. package/dist/tracer-B5tRH9H7.d.ts +230 -0
  87. package/dist/tracing-Dt9S_6V8.d.ts +148 -0
  88. package/package.json +27 -1
  89. package/dist/chunk-BDYEENHT.js +0 -224
  90. package/dist/chunk-MS34J5LY.cjs +0 -224
  91. package/dist/chunk-UMAZLXAB.mjs +0 -224
  92. package/dist/chunk-XPZNXSVN.cjs +0 -1043
  93. package/dist/tracing-DNT9jEbr.d.ts +0 -106
package/dist/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
- import { F as FiberEngine, W as WasmEngineRuntime, A as Async, R as RuntimeFiber, a as FiberEngineStats, b as Fiber, c as FiberId, d as FiberStatus, E as Exit, e as RuntimeEvent, f as WasmBridge, g as OpcodeProgram, h as FiberId$1, i as EngineEvent, j as RefId, N as NodeId, k as OpcodeNode, S as Scope, l as RingBufferOptions, m as EngineStats, O as Option } from './effect-CMOQKX8y.js';
2
- export { n as AbortablePromiseFinish, o as AbortablePromiseLabelStats, p as AbortablePromiseOptions, q as AbortablePromiseOutcome, r as AbortablePromiseStats, s as AsyncRegisterRef, t as AsyncWithPromise, u as BoundedRingBuffer, C as CancelToken, v as Canceler, w as Cause, x as CustomHostAction, D as DbHostAction, y as DecodeRef, z as DefaultHostExecutor, B as EngineKind, G as EngineSelection, H as EngineSelectionMode, I as FiberEngineKind, J as FlatMapRef, K as FoldFailureRef, L as FoldSuccessRef, M as HostAction, P as HostActionKind, Q as HostActionResult, T as HostExecutionContext, U as HostExecutor, V as HostRegistry, X as HostRegistryStats, Y as HttpHostAction, _ as Interrupted, $ as Joiner, a0 as LaneStatsData, a1 as None, a2 as NoopHooks, a3 as ProgramBuilder, a4 as ProgramPatch, a5 as PushStatus, a6 as QueueHostAction, a7 as RingBuffer, a8 as RingBufferEngine, a9 as RingBufferStatsData, aa as Runtime, ab as RuntimeCapabilities, ac as RuntimeEngineMode, ad as RuntimeOptions, ae as ScheduleResult, af as Scheduler, ag as SchedulerEngine, ah as SchedulerOptions, ai as SchedulerStats, aj as SchedulerStatsData, ak as ScopeId, al as Some, am as SyncRef, an as Task, ao as WasmFiberEngine, ap as WasmFiberEngineOptions, Z as ZIO, aq as abortablePromiseStats, ar as acquireRelease, as as async, at as asyncCatchAll, au as asyncFail, av as asyncFlatMap, aw as asyncFold, ax as asyncInterruptible, ay as asyncMap, az as asyncMapError, aA as asyncSucceed, aB as asyncSync, aC as asyncTotal, aD as catchAll, aE as end, aF as engineStats, aG as fail, aH as flatMap, aI as fork, aJ as fromPromiseAbortable, aK as getBenchmarkBudget, aL as getCurrentFiber, aM as globalScheduler, aN as inferCallerLaneFromStack, aO as laneTag, aP as linkAbortController, aQ as makeBoundedRingBuffer, aR as makeCancelToken, aS as map, aT as mapAsync, aU as mapError, aV as mapTryAsync, aW as none, aX as orElseOptional, aY as resetAbortablePromiseStats, aZ as runtimeCapabilities, a_ as runtimeForCaller, a$ as sanitizeLaneKey, b0 as selectedEngineStats, b1 as setBenchmarkBudget, b2 as some, b3 as succeed, b4 as sync, b5 as toPromise, b6 as toPromiseByCaller, b7 as unit, b8 as unsafeGetCurrentRuntime, b9 as unsafeRunAsync, ba as unsafeRunFoldWithEnv, bb as withAsyncPromise, bc as withCurrentFiber, bd as withScope, be as withScopeAsync } from './effect-CMOQKX8y.js';
3
- export { Counter, Gauge, Histogram, HistogramBuckets, Layer, ManagedResource, MetricSnapshot, MetricType, MetricValue, MetricsRegistry, Ref, RetryPolicy, RetryState, Schedule, ScheduleDecision, Semaphore, SemaphoreStats, ShutdownConfig, ShutdownStats, TaggedError, TestRuntimeOptions, TimeoutError, WorkerPool, WorkerPoolConfig, WorkerPoolError, WorkerPoolStats, andThenSchedule, assertCompletesWithin, assertFails, assertFailsWith, assertSucceeds, bracket, catchTag, catchTags, composeLayer, delayedEffect, derivedRef, elapsed, ensuring, exponential, fixed, flakyEffect, gracefulShutdown, intersect, jittered, layer, layerFail, layerFrom, layerSucceed, makeMetrics, makeRef, makeSemaphore, makeTestRuntime, makeWorkerPool, managed, managedAll, mapErrorTyped, mapLayer, mergeLayer, neverEffect, orElse, provideLayer, recurs, registerShutdownHooks, repeatWithSchedule, retry, retryN, retryWithBackoff, retryWithSchedule, sleep, tagError, takeSchedule, timeout, union, useManaged, whileInput } from './core/index.js';
4
- export { C as CircuitBreaker, a as CircuitBreakerConfig, b as CircuitBreakerError, c as CircuitBreakerState, d as CircuitBreakerStats, S as Span, e as SpanContext, f as SpanEvent, g as SpanStatus, T as Tracer, h as TracerConfig, m as makeCircuitBreaker, i as makeTracer } from './tracing-DNT9jEbr.js';
5
- import { Z as ZStream } from './stream-FQm9h4Mg.js';
6
- export { C as Concat, E as Emit, a as Empty, F as Flatten, b as FromArray, c as FromPull, M as Managed, d as Merge, N as Normalize, R as ReadableStreamOptions, S as Scoped, e as assertNever, f as collectStream, g as concatStream, h as emitStream, i as emptyStream, j as flattenStream, k as foreachStream, l as fromArray, m as fromPull, n as managedStream, o as mapStream, p as merge, q as mergeStream, r as rangeStream, s as streamFromReadableStream, u as uncons, t as unwrapScoped, w as widenOpt, z as zip } from './stream-FQm9h4Mg.js';
1
+ import { F as FiberEngine, W as WasmEngineRuntime, A as Async, i as RuntimeFiber, j as FiberEngineStats, k as Fiber, l as FiberId, m as FiberStatus, E as Exit, b as RuntimeEvent, n as WasmBridge, o as OpcodeProgram, p as FiberId$1, q as EngineEvent, r as RefId, N as NodeId, s as OpcodeNode, S as Scope, a as RingBufferOptions, t as EngineStats, O as Option } from './effect-CGNl5Rqp.js';
2
+ export { u as AbortablePromiseFinish, v as AbortablePromiseLabelStats, w as AbortablePromiseOptions, x as AbortablePromiseOutcome, y as AbortablePromiseStats, z as AsyncRegisterRef, C as AsyncWithPromise, D as BoundedRingBuffer, G as CancelToken, H as Canceler, I as Cause, K as ContextNode, L as CustomHostAction, M as DbHostAction, P as DecodeRef, Q as DefaultHostExecutor, U as EngineKind, V as EngineSelection, X as EngineSelectionMode, Y as FiberContext, _ as FiberEngineKind, $ as FiberInfo, a0 as FiberReadyQueue, a1 as FiberReadyQueueOptions, a2 as FiberReadyQueueStats, a3 as FiberRunState, a4 as FlatMapRef, a5 as FoldFailureRef, a6 as FoldSuccessRef, a7 as HostAction, a8 as HostActionKind, a9 as HostActionResult, aa as HostExecutionContext, ab as HostExecutor, ac as HostRegistry, ad as HostRegistryStats, ae as HttpHostAction, af as Interrupted, J as JSONValue, ag as Joiner, ah as LaneStatsData, ai as None, aj as NoopHooks, ak as ProgramBuilder, al as ProgramPatch, am as PushStatus, an as QueueHostAction, ao as ReadyQueueScheduleKind, ap as RingBuffer, aq as RingBufferEngine, ar as RingBufferStatsData, f as Runtime, as as RuntimeCapabilities, c as RuntimeEmitContext, at as RuntimeEngineMode, d as RuntimeEventRecord, R as RuntimeHooks, h as RuntimeOptions, g as RuntimeRegistry, e as RuntimeSpanLink, au as ScheduleResult, av as Scheduler, aw as SchedulerEngine, ax as SchedulerLaneMode, ay as SchedulerOptions, az as SchedulerStats, aA as SchedulerStatsData, aB as ScopeId, aC as ScopeInfo, aD as Some, aE as SyncRef, aF as Task, T as TraceContext, aG as WasmFiberEngine, aH as WasmFiberEngineOptions, Z as ZIO, aI as abortablePromiseStats, aJ as acquireRelease, aK as async, aL as asyncCatchAll, aM as asyncFail, aN as asyncFlatMap, aO as asyncFold, aP as asyncInterruptible, aQ as asyncMap, aR as asyncMapError, aS as asyncSucceed, aT as asyncSync, aU as asyncTotal, aV as catchAll, aW as ctxExtend, aX as ctxToObject, aY as emptyContext, aZ as end, a_ as engineStats, a$ as fail, b0 as flatMap, b1 as fork, b2 as fromPromiseAbortable, b3 as getBenchmarkBudget, b4 as getCurrentFiber, b5 as globalScheduler, b6 as inferCallerLaneFromStack, b7 as laneTag, b8 as linkAbortController, b9 as makeBoundedRingBuffer, ba as makeCancelToken, bb as makeFiberReadyQueue, bc as makeRuntimeEventRecord, bd as map, be as mapAsync, bf as mapError, bg as mapTryAsync, bh as none, bi as orElseOptional, bj as resetAbortablePromiseStats, bk as runtimeCapabilities, bl as runtimeEventRecordContext, bm as runtimeForCaller, bn as sanitizeLaneKey, bo as selectedEngineStats, bp as setBenchmarkBudget, bq as some, br as succeed, bs as sync, bt as toPromise, bu as toPromiseByCaller, bv as unit, bw as unsafeGetCurrentRuntime, bx as unsafeRunAsync, by as unsafeRunFoldWithEnv, bz as withAsyncPromise, bA as withCurrentFiber, bB as withScope, bC as withScopeAsync } from './effect-CGNl5Rqp.js';
3
+ export { Layer, LogLevel, Ref, RetryPolicy, RetryState, Semaphore, SemaphoreStats, ShutdownConfig, ShutdownStats, SupervisedChildSpec, SupervisedChildStatus, SupervisedFiber, Supervisor, SupervisorConfig, SupervisorEscalation, SupervisorEvent, SupervisorRestartContext, SupervisorRestartMode, SupervisorRestartPolicy, SupervisorStrategy, TaggedError, TestRuntimeOptions, TimeoutError, WorkerPool, WorkerPoolConfig, WorkerPoolError, WorkerPoolStats, assertCompletesWithin, assertFails, assertFailsWith, assertSucceeds, catchTag, catchTags, composeLayer, consoleJsonLogger, delayedEffect, derivedRef, dumpAllFibers, flakyEffect, gracefulShutdown, joinSupervised, layer, layerFail, layerFrom, layerSucceed, makeRef, makeSemaphore, makeSupervisor, makeTestRuntime, makeWorkerPool, mapErrorTyped, mapLayer, mergeLayer, neverEffect, orElse, provideLayer, registerShutdownHooks, retry, retryN, retryWithBackoff, sleep, supervise, tagError, timeout } from './core/index.js';
4
+ export { M as ManagedResource, R as Resource, R as ResourceDescriptor, S as Span, a as SpanContext, b as SpanEvent, c as SpanStatus, T as Tracer, d as TracerConfig, e as bracket, f as ensuring, m as makeResource, g as makeTracer, h as managed, i as managedAll, r as resource, j as resourceAll, k as resourceFromManaged, l as resourceSucceed, u as useManaged, n as useResource } from './tracing-Dt9S_6V8.js';
5
+ export { B as BrassEnv, f as CircuitBreaker, g as CircuitBreakerConfig, h as CircuitBreakerError, i as CircuitBreakerState, C as CircuitBreakerStats, j as Counter, E as EventBus, k as EventBusOptions, l as EventHandler, G as Gauge, H as Histogram, m as HistogramBuckets, I as InMemoryTracer, e as InMemoryTracerOptions, n as InMemoryTracerStats, a as MetricExemplar, b as MetricSnapshot, o as MetricType, p as MetricValue, M as MetricsRegistry, R as RuntimeSpan, q as RuntimeSpanEvent, d as RuntimeTraceIdGenerator, r as defaultTracer, s as makeCircuitBreaker, t as makeMetrics, u as runtimeHooksToEventHandler } from './tracer-B5tRH9H7.js';
6
+ export { S as Schedule, a as ScheduleDecision, b as andThenSchedule, c as contramapSchedule, e as elapsed, d as exponential, f as fibonacci, g as fixed, i as intersect, j as jitter, h as jittered, k as jitteredSchedule, m as mapSchedule, r as recurs, l as repeatWithSchedule, n as retryWithSchedule, t as takeSchedule, u as union, w as whileInput, o as windowed } from './schedule-Fque9Abz.js';
7
+ import { Z as ZStream } from './stream-dvSs0QS5.js';
8
+ export { C as Concat, E as Emit, a as Empty, F as Flatten, b as FromArray, c as FromPull, M as Managed, d as Merge, N as Normalize, R as ReadableStreamOptions, S as Scoped, e as assertNever, f as collectStream, g as concatStream, h as emitStream, i as emptyStream, j as flattenStream, k as foreachStream, l as fromArray, m as fromPull, n as managedStream, o as mapStream, p as merge, q as mergeStream, r as rangeStream, s as streamFromReadableStream, u as uncons, t as unwrapScoped, w as widenOpt, z as zip } from './stream-dvSs0QS5.js';
7
9
 
8
10
  declare class JsFiberEngine<R> implements FiberEngine<R> {
9
11
  private readonly runtime;
@@ -87,8 +89,6 @@ declare class WasmPackFiberBridge implements WasmBridge {
87
89
  stats(): unknown;
88
90
  private assertStrictWasmHotPath;
89
91
  private decodeZeroCopy;
90
- private decodeBinary;
91
- private decodeJson;
92
92
  private memory;
93
93
  private readU32;
94
94
  private readF64;
@@ -130,32 +130,6 @@ declare class WasmFiberRegistryBridge {
130
130
  stats(): WasmFiberRegistryStats;
131
131
  }
132
132
 
133
- type ReadyQueueScheduleKind = "micro" | "macro" | "none" | "dropped";
134
- type FiberReadyQueueStats = {
135
- readonly engine: "ts" | "wasm";
136
- readonly fallbackUsed: boolean;
137
- readonly data: unknown;
138
- };
139
- interface FiberReadyQueue {
140
- readonly engine: "ts" | "wasm";
141
- enqueue(fiberId: FiberId$1, tag: string): ReadyQueueScheduleKind;
142
- beginFlush(): number;
143
- shift(): FiberId$1 | undefined;
144
- endFlush(ran: number): ReadyQueueScheduleKind;
145
- len(): number;
146
- clear(): void;
147
- stats(): FiberReadyQueueStats;
148
- }
149
- type FiberReadyQueueOptions = {
150
- readonly engine?: "ts" | "wasm";
151
- readonly flushBudget?: number;
152
- readonly microThreshold?: number;
153
- readonly laneCapacity?: number;
154
- readonly laneBudget?: number;
155
- readonly maxLanes?: number;
156
- };
157
- declare function makeFiberReadyQueue(options?: FiberReadyQueueOptions): FiberReadyQueue;
158
-
159
133
  declare const ABI_VERSION = 1;
160
134
  declare const EVENT_WORDS = 5;
161
135
  declare const NONE_U32 = 4294967295;
@@ -532,4 +506,4 @@ declare function take<R, E, A>(stream: ZStream<R, E, A>, n: number): ZStream<R,
532
506
  */
533
507
  declare function drop<R, E, A>(stream: ZStream<R, E, A>, n: number): ZStream<R, E, A>;
534
508
 
535
- export { ABI_VERSION, Async, EVENT_WORDS, EngineEvent, EngineFiberHandle, EngineStats, EventKindCode, Exit, Fiber, FiberEngine, FiberEngineStats, FiberId, type FiberReadyQueue, type FiberReadyQueueOptions, type FiberReadyQueueStats, FiberStatus, type FuseResult, type FuseState, type FusedPipelineRepr, type FusedPipelineStats, type FusedStep, type FusionOptions, type Hub, type HubClosed, type HubStrategy, type InternalFiberStatus, JsFiberEngine, NONE_U32, NodeId, OpcodeNode, OpcodeProgram, OpcodeTagCode, Option, PURE_PIPELINE_TAG, type PurePipelineMetadata, type PurePipelineTag, type Queue, type QueueClosed, type QueueOptions, type ReadyQueueScheduleKind, RefId, RingBufferOptions, RuntimeFiber, Scope, type SerializedFusedPipeline, type SerializedStep, type Strategy, type StreamChunkEngine, type StreamChunkOptions, type StreamChunkStats, type Subscription, WasmBridge, WasmEngineRuntime, WasmFiberRegistryBridge, type WasmFiberRegistryStats, WasmPackFiberBridge, type ZPipeline, ZStream, andThen, applyFused, bounded, broadcast, broadcastToHub, buffer, bufferP, chunks, chunksP, collectAllPar, compose, debounce, decodeEvent, decodeEventBatch, deserializeFusedPipeline, dropP, drop as dropStream, encodeOpcodeNodes, encodeOpcodeProgram, filterMapP, filterP, fromHub, fuse, getStats, groupedP, identity, initState, interleave, isFusionEnabled, isFusionVerbose, makeFiberReadyQueue, makeHub, makeStreamChunker, mapChunks, mapChunksEffect, mapChunksEffectP, mapEffectP, mapP, race, raceWith, runFusedArray, scan, serializeFusedPipeline, setFusionEnabled, setFusionVerbose, takeP, take as takeStream, tapEffectP, throttle, via, zipPar, zip as zipStream, zipWith };
509
+ export { ABI_VERSION, Async, EVENT_WORDS, EngineEvent, EngineFiberHandle, EngineStats, EventKindCode, Exit, Fiber, FiberEngine, FiberEngineStats, FiberId, FiberStatus, type FuseResult, type FuseState, type FusedPipelineRepr, type FusedPipelineStats, type FusedStep, type FusionOptions, type Hub, type HubClosed, type HubStrategy, type InternalFiberStatus, JsFiberEngine, NONE_U32, NodeId, OpcodeNode, OpcodeProgram, OpcodeTagCode, Option, PURE_PIPELINE_TAG, type PurePipelineMetadata, type PurePipelineTag, type Queue, type QueueClosed, type QueueOptions, RefId, RingBufferOptions, RuntimeEvent, RuntimeFiber, Scope, type SerializedFusedPipeline, type SerializedStep, type Strategy, type StreamChunkEngine, type StreamChunkOptions, type StreamChunkStats, type Subscription, WasmBridge, WasmEngineRuntime, WasmFiberRegistryBridge, type WasmFiberRegistryStats, WasmPackFiberBridge, type ZPipeline, ZStream, andThen, applyFused, bounded, broadcast, broadcastToHub, buffer, bufferP, chunks, chunksP, collectAllPar, compose, debounce, decodeEvent, decodeEventBatch, deserializeFusedPipeline, dropP, drop as dropStream, encodeOpcodeNodes, encodeOpcodeProgram, filterMapP, filterP, fromHub, fuse, getStats, groupedP, identity, initState, interleave, isFusionEnabled, isFusionVerbose, makeHub, makeStreamChunker, mapChunks, mapChunksEffect, mapChunksEffectP, mapEffectP, mapP, race, raceWith, runFusedArray, scan, serializeFusedPipeline, setFusionEnabled, setFusionVerbose, takeP, take as takeStream, tapEffectP, throttle, via, zipPar, zip as zipStream, zipWith };
package/dist/index.js CHANGED
@@ -1,54 +1,77 @@
1
1
  import {
2
2
  LinkedQueue,
3
- andThen,
3
+ RuntimeRegistry,
4
+ Supervisor,
4
5
  assertCompletesWithin,
5
6
  assertFails,
6
7
  assertFailsWith,
7
8
  assertSucceeds,
8
- bracket,
9
9
  catchTag,
10
10
  catchTags,
11
11
  compose,
12
+ consoleJsonLogger,
13
+ defaultTracer,
12
14
  delayedEffect,
13
15
  derivedRef,
14
- elapsed,
15
- ensuring,
16
- exponential,
17
- fixed,
16
+ dumpAllFibers,
18
17
  flakyEffect,
19
18
  gracefulShutdown,
20
- intersect,
21
- jittered,
19
+ joinSupervised,
22
20
  layer,
23
21
  layerFail,
24
22
  layerFrom,
25
23
  layerSucceed,
26
24
  linkAbortController,
27
25
  makeCancelToken,
28
- makeMetrics,
29
26
  makeRef,
30
27
  makeSemaphore,
28
+ makeSupervisor,
31
29
  makeTestRuntime,
32
30
  makeTracer,
33
31
  makeWorkerPool,
34
- managed,
35
- managedAll,
36
32
  mapError as mapError2,
37
33
  mapLayer,
38
34
  merge,
39
35
  neverEffect,
40
36
  orElse,
41
37
  provideLayer,
42
- recurs,
43
38
  registerShutdownHooks,
39
+ supervise,
40
+ tagError
41
+ } from "./chunk-QY5FKYEQ.js";
42
+ import {
43
+ Resource,
44
+ andThen,
45
+ bracket,
46
+ contramap,
47
+ elapsed,
48
+ ensuring,
49
+ exponential,
50
+ fibonacci,
51
+ fixed,
52
+ intersect,
53
+ jitter,
54
+ jittered,
55
+ jitteredSchedule,
56
+ makeCircuitBreaker,
57
+ makeResource,
58
+ managed,
59
+ managedAll,
60
+ map as map2,
61
+ recurs,
44
62
  repeatWithSchedule,
63
+ resource,
64
+ resourceAll,
65
+ resourceFromManaged,
66
+ resourceSucceed,
45
67
  retryWithSchedule,
46
- tagError,
47
68
  take,
48
69
  union,
49
70
  useManaged,
50
- whileInput
51
- } from "./chunk-AR22SXML.js";
71
+ useResource,
72
+ whileInput,
73
+ windowed
74
+ } from "./chunk-KCPT2D6G.js";
52
75
  import {
53
76
  assertNever,
54
77
  collectStream,
@@ -69,30 +92,39 @@ import {
69
92
  unwrapScoped,
70
93
  widenOpt,
71
94
  zip
72
- } from "./chunk-PPUXIH5R.js";
95
+ } from "./chunk-OOGJ73B6.js";
73
96
  import {
74
- makeCircuitBreaker,
75
97
  retry,
76
98
  retryN,
77
99
  retryWithBackoff,
78
100
  sleep,
79
101
  timeout
80
- } from "./chunk-BDYEENHT.js";
102
+ } from "./chunk-ROJC3NBJ.js";
103
+ import {
104
+ EventBus,
105
+ InMemoryTracer,
106
+ makeMetrics,
107
+ makeRuntimeEventRecord,
108
+ runtimeEventRecordContext,
109
+ runtimeHooksToEventHandler
110
+ } from "./chunk-XDZOO4L5.js";
81
111
  import {
82
112
  collectAllPar,
83
113
  race,
84
114
  raceWith,
85
115
  zipPar
86
- } from "./chunk-TO7IKXYT.js";
116
+ } from "./chunk-G3XGCZDQ.js";
117
+ import {
118
+ Scope,
119
+ withScope,
120
+ withScopeAsync
121
+ } from "./chunk-FM4W4QPL.js";
87
122
  import {
88
123
  ABI_VERSION,
89
- Async,
90
- Cause,
91
124
  DefaultHostExecutor,
92
125
  EVENT_WORDS,
93
126
  EngineFiberHandle,
94
127
  EventKindCode,
95
- Exit,
96
128
  HostRegistry,
97
129
  JsFiberEngine,
98
130
  NONE_U32,
@@ -104,11 +136,43 @@ import {
104
136
  Runtime,
105
137
  RuntimeFiber,
106
138
  Scheduler,
107
- Scope,
108
139
  WasmFiberEngine,
109
140
  WasmFiberRegistryBridge,
110
141
  WasmPackFiberBridge,
111
142
  abortablePromiseStats,
143
+ ctxExtend,
144
+ ctxToObject,
145
+ decodeEvent,
146
+ decodeEventBatch,
147
+ emptyContext,
148
+ encodeOpcodeNodes,
149
+ encodeOpcodeProgram,
150
+ fork,
151
+ fromPromiseAbortable,
152
+ getBenchmarkBudget,
153
+ getCurrentFiber,
154
+ globalScheduler,
155
+ inferCallerLaneFromStack,
156
+ laneTag,
157
+ makeBoundedRingBuffer,
158
+ makeFiberReadyQueue,
159
+ resetAbortablePromiseStats,
160
+ resolveWasmModule,
161
+ runtimeCapabilities,
162
+ runtimeForCaller,
163
+ sanitizeLaneKey,
164
+ setBenchmarkBudget,
165
+ toPromise,
166
+ toPromiseByCaller,
167
+ unsafeGetCurrentRuntime,
168
+ unsafeRunAsync,
169
+ unsafeRunFoldWithEnv,
170
+ withCurrentFiber
171
+ } from "./chunk-7LVI2GIN.js";
172
+ import {
173
+ Async,
174
+ Cause,
175
+ Exit,
112
176
  acquireRelease,
113
177
  asyncCatchAll,
114
178
  asyncEffect,
@@ -122,48 +186,23 @@ import {
122
186
  asyncSync,
123
187
  asyncTotal,
124
188
  catchAll,
125
- decodeEvent,
126
- decodeEventBatch,
127
- encodeOpcodeNodes,
128
- encodeOpcodeProgram,
129
189
  end,
130
190
  fail,
131
191
  flatMap,
132
- fork,
133
- fromPromiseAbortable,
134
- getBenchmarkBudget,
135
- getCurrentFiber,
136
- globalScheduler,
137
- inferCallerLaneFromStack,
138
- laneTag,
139
- makeBoundedRingBuffer,
140
- makeFiberReadyQueue,
141
192
  map,
142
193
  mapAsync,
143
194
  mapError,
144
195
  mapTryAsync,
145
196
  none,
146
197
  orElseOptional,
147
- resetAbortablePromiseStats,
148
- resolveWasmModule,
149
- runtimeCapabilities,
150
- runtimeForCaller,
151
- sanitizeLaneKey,
152
- setBenchmarkBudget,
153
198
  some,
154
199
  succeed,
155
200
  sync,
156
- toPromise,
157
- toPromiseByCaller,
158
201
  unit,
159
- unsafeGetCurrentRuntime,
160
- unsafeRunAsync,
161
- unsafeRunFoldWithEnv,
162
- withAsyncPromise,
163
- withCurrentFiber,
164
- withScope,
165
- withScopeAsync
166
- } from "./chunk-BMH5AV44.js";
202
+ withAsyncPromise
203
+ } from "./chunk-PNVFW245.js";
204
+ import "./chunk-TDVMADDN.js";
205
+ import "./chunk-3RG5ZIWI.js";
167
206
 
168
207
  // src/core/stream/queue.ts
169
208
  function bounded(capacity, strategy = "backpressure", options = {}) {
@@ -1374,9 +1413,11 @@ export {
1374
1413
  DefaultHostExecutor,
1375
1414
  EVENT_WORDS,
1376
1415
  EngineFiberHandle,
1416
+ EventBus,
1377
1417
  EventKindCode,
1378
1418
  Exit,
1379
1419
  HostRegistry,
1420
+ InMemoryTracer,
1380
1421
  JsFiberEngine,
1381
1422
  NONE_U32,
1382
1423
  NoopHooks,
@@ -1384,11 +1425,14 @@ export {
1384
1425
  PURE_PIPELINE_TAG,
1385
1426
  ProgramBuilder,
1386
1427
  PushStatus,
1428
+ Resource,
1387
1429
  RingBuffer,
1388
1430
  Runtime,
1389
1431
  RuntimeFiber,
1432
+ RuntimeRegistry,
1390
1433
  Scheduler,
1391
1434
  Scope,
1435
+ Supervisor,
1392
1436
  WasmFiberEngine,
1393
1437
  WasmFiberRegistryBridge,
1394
1438
  WasmPackFiberBridge,
@@ -1429,16 +1473,23 @@ export {
1429
1473
  compose2 as compose,
1430
1474
  compose as composeLayer,
1431
1475
  concatStream,
1476
+ consoleJsonLogger,
1477
+ contramap as contramapSchedule,
1478
+ ctxExtend,
1479
+ ctxToObject,
1432
1480
  debounce,
1433
1481
  decodeEvent,
1434
1482
  decodeEventBatch,
1483
+ defaultTracer,
1435
1484
  delayedEffect,
1436
1485
  derivedRef,
1437
1486
  deserializeFusedPipeline,
1438
1487
  dropP,
1439
1488
  drop as dropStream,
1489
+ dumpAllFibers,
1440
1490
  elapsed,
1441
1491
  emitStream,
1492
+ emptyContext,
1442
1493
  emptyStream,
1443
1494
  encodeOpcodeNodes,
1444
1495
  encodeOpcodeProgram,
@@ -1447,6 +1498,7 @@ export {
1447
1498
  ensuring,
1448
1499
  exponential,
1449
1500
  fail,
1501
+ fibonacci,
1450
1502
  filterMapP,
1451
1503
  filterP,
1452
1504
  fixed,
@@ -1473,7 +1525,10 @@ export {
1473
1525
  intersect,
1474
1526
  isFusionEnabled,
1475
1527
  isFusionVerbose,
1528
+ jitter,
1476
1529
  jittered,
1530
+ jitteredSchedule,
1531
+ joinSupervised,
1477
1532
  laneTag,
1478
1533
  layer,
1479
1534
  layerFail,
@@ -1487,8 +1542,11 @@ export {
1487
1542
  makeHub,
1488
1543
  makeMetrics,
1489
1544
  makeRef,
1545
+ makeResource,
1546
+ makeRuntimeEventRecord,
1490
1547
  makeSemaphore,
1491
1548
  makeStreamChunker,
1549
+ makeSupervisor,
1492
1550
  makeTestRuntime,
1493
1551
  makeTracer,
1494
1552
  makeWorkerPool,
@@ -1505,6 +1563,7 @@ export {
1505
1563
  mapError2 as mapErrorTyped,
1506
1564
  mapLayer,
1507
1565
  mapP,
1566
+ map2 as mapSchedule,
1508
1567
  mapStream,
1509
1568
  mapTryAsync,
1510
1569
  merge2 as merge,
@@ -1522,13 +1581,19 @@ export {
1522
1581
  registerShutdownHooks,
1523
1582
  repeatWithSchedule,
1524
1583
  resetAbortablePromiseStats,
1584
+ resource,
1585
+ resourceAll,
1586
+ resourceFromManaged,
1587
+ resourceSucceed,
1525
1588
  retry,
1526
1589
  retryN,
1527
1590
  retryWithBackoff,
1528
1591
  retryWithSchedule,
1529
1592
  runFusedArray,
1530
1593
  runtimeCapabilities,
1594
+ runtimeEventRecordContext,
1531
1595
  runtimeForCaller,
1596
+ runtimeHooksToEventHandler,
1532
1597
  sanitizeLaneKey,
1533
1598
  scan,
1534
1599
  selectedEngineStats,
@@ -1540,6 +1605,7 @@ export {
1540
1605
  some,
1541
1606
  streamFromReadableStream,
1542
1607
  succeed,
1608
+ supervise,
1543
1609
  sync,
1544
1610
  tagError,
1545
1611
  takeP,
@@ -1558,9 +1624,11 @@ export {
1558
1624
  unsafeRunFoldWithEnv,
1559
1625
  unwrapScoped,
1560
1626
  useManaged,
1627
+ useResource,
1561
1628
  via,
1562
1629
  whileInput,
1563
1630
  widenOpt,
1631
+ windowed,
1564
1632
  withAsyncPromise,
1565
1633
  withCurrentFiber,
1566
1634
  withScope,