@streamsy/core 0.15.0 → 0.17.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.
@@ -1,774 +0,0 @@
1
- import { A as Writer, At as StreamsFault, B as AppendErrorFor, D as Reader, Dt as DecodeFault, F as ReadNextResult, G as HeadError, M as CreateResult, N as HeadResult, O as StreamsReader, Ot as EncodeFault, Q as OffsetMismatch, R as AppendConflict, U as CreateError, X as InvalidReadRequest, Z as NotSupported, at as StreamBusy, ct as StreamNotFound, d as OwnerRecords, ft as ProducerOptions, h as Storage, ht as CreateOptions, i as ProjectionMarks, j as AppendResult, jt as TransportFault, k as StreamsWriter, kt as StorageFault, mt as ReadOptions$1, nt as ReadNextError, ot as StreamClosed, p as CommitBoundary, pt as ReadNextOptions, rt as RemoveError, s as CommitHooks, st as StreamGone, ut as AppendCallOptions, wt as StreamId } from "./projection-marks-BEZv8qDJ.js";
2
- import { Array, Context, Data, Duration, Effect, Function, Layer, Option, Schedule, Schema, Stream } from "effect";
3
- import { HttpRouter, HttpServerRequest, HttpServerResponse } from "effect/http";
4
- interface HttpOptions {
5
- readonly pathPrefix?: string;
6
- /** Lifetime of an SSE response. Default 60 seconds. */
7
- readonly sseDeadlineMs?: number;
8
- readonly maxMessageSize?: number;
9
- readonly cacheVisibility?: "private" | "public";
10
- }
11
- /**
12
- * The public HTTP program. It is the whole application an Effect host serves.
13
- *
14
- * Its success type is `HttpServerResponse` alone, its error channel is closed,
15
- * and it requires exactly `HttpServerRequest | StreamsReader | StreamsWriter`.
16
- * Those three facts are what let a host type it as an Alchemy `HttpEffect` and
17
- * what let one composition serve several backends.
18
- */
19
- declare function app(options?: HttpOptions): Effect.Effect<HttpServerResponse.HttpServerResponse, never, HttpServerRequest.HttpServerRequest | StreamsReader | StreamsWriter>;
20
- /** Prefix helpers shared by protocol and host routers. */
21
- declare const streamPath: (pathPrefix?: string) => {
22
- requiredPathPattern: () => string;
23
- strip: (pathname: string) => string;
24
- canonicalizeForkSource: (source: string) => string;
25
- };
26
- declare namespace address_d_exports {
27
- export { Collection, Collections, CollectionsChange, CollectionsDecodingServices, CollectionsEncodedChange, CollectionsEncodedEvent, CollectionsEncodingServices, CollectionsEvent, StateAddress, StateChange, StateControl, StateControlName, StateDelete, StateEvent, StateHeaders, StateKey, StateUpsert, StreamAddress, ValidCollections, bytes$2 as bytes, isChange, isControl, isUpsert, json$2 as json, reset, snapshotEnd, snapshotStart, state$2 as state, stateChange, stateControl };
28
- }
29
- /** Omit `offset` and `txid` rather than setting them to `undefined`. */
30
- interface StateHeaders {
31
- readonly operation: "upsert" | "delete";
32
- readonly offset?: string;
33
- readonly txid?: string;
34
- readonly timestamp?: string;
35
- readonly from?: string;
36
- }
37
- interface StateUpsert<A, Type extends string = string> {
38
- readonly type: Type;
39
- readonly key: string;
40
- readonly value: A;
41
- readonly headers: StateHeaders & {
42
- readonly operation: "upsert";
43
- };
44
- }
45
- interface StateDelete<A, Type extends string = string> {
46
- readonly type: Type;
47
- readonly key: string;
48
- readonly old_value?: A;
49
- readonly headers: StateHeaders & {
50
- readonly operation: "delete";
51
- };
52
- }
53
- /** A change event consumed by `@durable-streams/state`, narrowed by its `type`. */
54
- type StateChange<A, Type extends string = string> = StateUpsert<A, Type> | StateDelete<A, Type>;
55
- type StateEncodedChange<A, Type extends string = string> = (Omit<StateUpsert<A, Type>, "headers"> & {
56
- readonly headers: Omit<StateHeaders, "operation"> & {
57
- readonly operation: "insert" | "update" | "upsert";
58
- };
59
- }) | StateDelete<A, Type>;
60
- /** The control signals of the Durable State protocol (STATE-PROTOCOL.md section 4.2). */
61
- type StateControlName = "snapshot-start" | "snapshot-end" | "reset";
62
- /**
63
- * A control message of a Durable State stream. It has no `type` or `key`.
64
- * `snapshot-start` and `snapshot-end` mark a run of changes that is a complete
65
- * snapshot. `reset` tells a reader to clear its materialized state. Omit
66
- * `offset` rather than setting it to `undefined`.
67
- */
68
- interface StateControl {
69
- readonly headers: {
70
- readonly control: StateControlName;
71
- readonly offset?: string;
72
- };
73
- }
74
- /** One item of a Durable State stream: a change of one collection or a control. */
75
- type StateEvent<A, Type extends string = string> = StateChange<A, Type> | StateControl;
76
- /** The value fields that may serve as a Durable State key. */
77
- type StateKey<A> = { [K in keyof A]-?: A[K] extends string | number ? K : never; }[keyof A];
78
- /** One collection of a Durable State stream: its value schema and the value field used as the key. */
79
- interface Collection<A, I, RD, RE, Key extends StateKey<A> = StateKey<A>> {
80
- readonly schema: Schema.Codec<A, I, RD, RE>;
81
- readonly key: Key;
82
- }
83
- /** Collections keyed by the `type` that names them on the wire. */
84
- type Collections = Record<string, Collection<any, any, any, any, any>>;
85
- /**
86
- * Each `key` must name a string or number field of its own collection's value.
87
- * A mismatch reports on the `key` property of the offending collection.
88
- */
89
- type ValidCollections<C extends Collections> = { readonly [K in keyof C]: C[K]["key"] extends StateKey<C[K]["schema"]["Type"]> ? C[K] : {
90
- readonly key: StateKey<C[K]["schema"]["Type"]>;
91
- }; };
92
- /** The union of change events across every collection, discriminated by `type`. */
93
- type CollectionsChange<C extends Collections> = { [K in keyof C & string]: StateChange<C[K]["schema"]["Type"], K>; }[keyof C & string];
94
- type CollectionsEncodedChange<C extends Collections> = { [K in keyof C & string]: StateEncodedChange<C[K]["schema"]["Encoded"], K>; }[keyof C & string];
95
- /** The items of a State address: the change events of its collections, plus controls. */
96
- type CollectionsEvent<C extends Collections> = CollectionsChange<C> | StateControl;
97
- type CollectionsEncodedEvent<C extends Collections> = CollectionsEncodedChange<C> | StateControl;
98
- type CollectionsDecodingServices<C extends Collections> = C[keyof C]["schema"]["DecodingServices"];
99
- type CollectionsEncodingServices<C extends Collections> = C[keyof C]["schema"]["EncodingServices"];
100
- /** Inert identity and codec. Constructing an address acquires no service or resource. */
101
- interface StreamAddress<A, RD = never, RE = never> {
102
- readonly _tag: "Json" | "Bytes";
103
- readonly id: StreamId;
104
- readonly contentType: string;
105
- readonly codec: Schema.Codec<A, string | Uint8Array, RD, RE>;
106
- }
107
- /** A JSON address whose items are the change events of its collections and State controls. */
108
- interface StateAddress<C extends Collections, RD = CollectionsDecodingServices<C>, RE = CollectionsEncodingServices<C>> extends StreamAddress<CollectionsEvent<C>, RD, RE> {
109
- readonly collections: C;
110
- }
111
- declare function json$2<A, I, RD, RE>(id: string, options: {
112
- readonly schema: Schema.Codec<A, I, RD, RE>;
113
- }): StreamAddress<A, RD, RE>;
114
- /**
115
- * A codec for the upsert and delete change events of one collection.
116
- * `state` composes one of these per collection. Omit optional headers instead
117
- * of setting them to `undefined`.
118
- */
119
- declare function stateChange<A, I, RD, RE, const Type extends string>(options: {
120
- readonly schema: Schema.Codec<A, I, RD, RE>;
121
- readonly type: Type;
122
- }): Schema.Codec<StateChange<A, Type>, StateEncodedChange<I, Type>, RD, RE>;
123
- /** The codec for a State control message. It needs no services. */
124
- declare const stateControl: Schema.Codec<StateControl>;
125
- /** True for a control message. A change has `headers.operation` and no `headers.control`. */
126
- declare const isControl: <E extends StateEvent<unknown>>(event: E) => event is Extract<E, StateControl>;
127
- /** True for an upsert or delete change. */
128
- declare const isChange: <E extends StateEvent<unknown>>(event: E) => event is Exclude<E, StateControl>;
129
- /** True for an upsert change, with its value available. */
130
- declare const isUpsert: <E extends StateEvent<unknown>>(event: E) => event is Extract<E, StateUpsert<unknown>>;
131
- /** A `reset` control. A reader should clear its materialized state and apply what follows. */
132
- declare const reset: (options?: {
133
- readonly offset?: string;
134
- }) => StateControl;
135
- /** A `snapshot-start` control. The changes up to `snapshot-end` form a complete snapshot. */
136
- declare const snapshotStart: (options?: {
137
- readonly offset?: string;
138
- }) => StateControl;
139
- /** A `snapshot-end` control. It closes the snapshot that `snapshot-start` opened. */
140
- declare const snapshotEnd: (options?: {
141
- readonly offset?: string;
142
- }) => StateControl;
143
- /**
144
- * A stream of Durable State events for several collections. Each record
145
- * key is the `type` on the wire; each entry gives the value schema and the value
146
- * field that becomes the event `key`. The codec also decodes and encodes the
147
- * State control messages `snapshot-start`, `snapshot-end` and `reset`.
148
- */
149
- declare function state$2<const C extends Collections>(id: string, options: {
150
- readonly collections: C & ValidCollections<C>;
151
- }): StateAddress<C>;
152
- /** Items from one bytes append are joined into one stored message. */
153
- declare function bytes$2(id: string, options?: {
154
- readonly contentType?: string;
155
- }): StreamAddress<Uint8Array>;
156
- declare namespace route_d_exports {
157
- export { ExactTemplateParams, Matcher, ParamCodecs, Params, PathSchema, StateRoute, StreamRoute, bytes$1 as bytes, custom$1 as custom, json$1 as json, state$1 as state };
158
- }
159
- /**
160
- * Inert id stream. Constructing a route acquires no service and no resource.
161
- *
162
- * A route owns one id grammar and the address constructor for its addresses. A stream
163
- * binds the route to a storage graph, and `Placement.byRoute` picks the Durable
164
- * Object that owns it.
165
- */
166
- interface StreamRoute<RouteParams, A, RD = never, RE = never, Template extends string = string> {
167
- readonly _tag: "StreamRoute";
168
- /** Relative template, for example `journal/:user`. Empty for a custom route. */
169
- readonly template: Template;
170
- readonly paramSchema?: PathSchema<RouteParams>;
171
- /** The router-facing contract. True when this route owns the id. */
172
- readonly match: (id: string) => boolean;
173
- /** The primitive. `None` when the id does not match or a parameter fails to decode. */
174
- readonly parse: (id: string) => Option.Option<RouteParams>;
175
- /** Build the address. `parse(address(params).id)` must be `Some(params)`. */
176
- readonly address: (params: RouteParams) => StreamAddress<A, RD, RE>;
177
- }
178
- /** The stream codecs exposed to HTTP path decoding. */
179
- type PathSchema<P> = Schema.Codec<P, Readonly<Record<string, string | undefined>>>;
180
- type WithPathSchema<P> = {
181
- readonly paramSchema: PathSchema<P>;
182
- };
183
- /** The codec record a State route was declared with, one codec per template parameter. */
184
- type WithParamCodecs<Codecs extends ParamCodecs> = {
185
- readonly paramCodecs: Codecs;
186
- };
187
- /** A route whose address refs retain their declared State collections. */
188
- type StateRoute<P, C extends Collections, Template extends string = string> = Omit<StreamRoute<P, CollectionsEvent<C>, CollectionsDecodingServices<C>, CollectionsEncodingServices<C>, Template>, "address"> & {
189
- readonly collections: C;
190
- readonly address: (params: P) => StateAddress<C>;
191
- };
192
- /** The route predicate used by stream validation and HTTP dispatch. */
193
- interface Matcher {
194
- readonly match: (id: string) => boolean;
195
- }
196
- /** One codec per template parameter. Decoding runs from a string with no services. */
197
- type ParamCodecs = Readonly<Record<string, Schema.Codec<unknown, string>>>;
198
- type Params<Codecs extends ParamCodecs> = { readonly [Name in keyof Codecs]: Codecs[Name]["Type"]; };
199
- type TemplateNames<Template extends string> = Template extends `${string}:${infer Name}/${infer Rest}` ? Name | TemplateNames<Rest> : Template extends `${string}:${infer Name}` ? Name : never;
200
- /** Every `:name` must have a codec, and every codec must appear in the template. */
201
- type ExactTemplateParams<Template extends string, Codecs extends ParamCodecs> = string extends Template ? unknown : Exclude<TemplateNames<Template>, keyof Codecs> extends never ? Exclude<keyof Codecs, TemplateNames<Template>> extends never ? unknown : never : never;
202
- declare function json$1<const Template extends string, Codecs extends ParamCodecs, A, I, RD, RE>(template: Template, options: {
203
- readonly params: Codecs & ExactTemplateParams<Template, Codecs>;
204
- readonly schema: Schema.Codec<A, I, RD, RE>;
205
- }): StreamRoute<Params<Codecs>, A, RD, RE, Template> & WithPathSchema<Params<Codecs>>;
206
- declare function state$1<const Template extends string, Codecs extends ParamCodecs, const C extends Collections>(template: Template, options: {
207
- readonly params: Codecs & ExactTemplateParams<Template, Codecs>;
208
- readonly collections: C & ValidCollections<C>;
209
- }): StateRoute<Params<Codecs>, C, Template> & WithPathSchema<Params<Codecs>> & WithParamCodecs<Codecs>;
210
- declare function bytes$1<const Template extends string, Codecs extends ParamCodecs>(template: Template, options: {
211
- readonly params: Codecs & ExactTemplateParams<Template, Codecs>;
212
- readonly contentType?: string;
213
- }): StreamRoute<Params<Codecs>, Uint8Array, never, never, Template> & WithPathSchema<Params<Codecs>>;
214
- /** Escape hatch for a grammar a template cannot express, such as a regex stream. */
215
- declare function custom$1<RouteParams, A, RD, RE>(options: {
216
- readonly parse: (id: string) => Option.Option<RouteParams>;
217
- readonly address: (params: RouteParams) => StreamAddress<A, RD, RE>;
218
- }): StreamRoute<RouteParams, A, RD, RE>;
219
- declare const ZERO_OFFSET: string & import("effect/Brand").Brand<"Offset">;
220
- declare const compare: (a: string, b: string) => number;
221
- /** One host-triggered sweep; the host owns scheduling and cancellation. */
222
- declare const expireDue: () => Effect.Effect<void, StorageFault, Storage>;
223
- declare namespace layer_d_exports {
224
- export { ProtocolOptions, bind, expireDue, layer$1 as layer };
225
- }
226
- interface ProtocolOptions {
227
- /** Maximum messages per catch-up page; live reads return the whole tail. Default 1000. */
228
- readonly readLimit?: number;
229
- readonly longPollTimeoutMs?: number;
230
- }
231
- declare const layer$1: (options?: ProtocolOptions) => Layer.Layer<StreamsReader | StreamsWriter, never, Storage>;
232
- interface MemoryOptions {
233
- readonly constrained?: boolean;
234
- readonly pollIntervalMs?: number;
235
- }
236
- declare namespace streams_d_exports$1 {
237
- export { Options, layer, layerProtocol };
238
- }
239
- /** Options for `layer` and `layerProtocol`. */
240
- interface Options extends MemoryOptions, ProtocolOptions {}
241
- /** Generic reader and writer over memory storage, for protocol tools. */
242
- declare const layerProtocol: (options?: Options) => Layer.Layer<CommitBoundary | CommitHooks | OwnerRecords | ProjectionMarks | Storage | StreamsReader | StreamsWriter, never, never>;
243
- /** Memory host. Streams and their feeds share the exposed storage boundary. */
244
- declare function layer<const Keys extends ReadonlyArray<Any>>(group: Group<Keys>, options?: Options): Layer.Layer<Storage | CommitBoundary | OwnerRecords | CommitHooks | ProjectionMarks | Host<Group<Keys>>>;
245
- declare namespace durable_state_d_exports {
246
- export { Change, ChangeHeaders, Delete, Entry, Materialized, Rows, Upsert, changes, materialize, materialized, remove$1 as remove, upsert };
247
- }
248
- interface ChangeHeaders {
249
- readonly txid?: string;
250
- readonly timestamp?: string;
251
- readonly from?: string;
252
- }
253
- type Operation<A, Type extends string> = Data.TaggedEnum<{
254
- Upsert: {
255
- readonly type: Type;
256
- readonly value: A;
257
- readonly headers?: ChangeHeaders;
258
- };
259
- Delete: {
260
- readonly type: Type;
261
- readonly key: string | number;
262
- readonly oldValue?: A;
263
- readonly headers?: ChangeHeaders;
264
- };
265
- }>;
266
- type Upsert<A, Type extends string = string> = Data.TaggedEnum.Value<Operation<A, Type>, "Upsert">;
267
- type Delete<A, Type extends string = string> = Data.TaggedEnum.Value<Operation<A, Type>, "Delete">;
268
- /** A pending change for one of the collections in `C`. */
269
- type Change<C extends Collections> = { [K in keyof C & string]: Upsert<C[K]["schema"]["Type"], K> | Delete<C[K]["schema"]["Type"], K>; }[keyof C & string];
270
- /**
271
- * One entry for `changes`: a pending change, or a State control such as
272
- * `StreamAddress.reset()`.
273
- */
274
- type Entry<C extends Collections> = Change<C> | StateControl;
275
- /** Describe an upsert into a collection. The key is read from the value. */
276
- declare const upsert: <const Type extends string, A>(type: Type, value: A, options?: {
277
- readonly headers?: ChangeHeaders;
278
- }) => Upsert<A, Type>;
279
- /** Describe a delete from a collection by key. An `oldValue` is written as `old_value`. */
280
- declare const remove$1: <const Type extends string, A = never>(type: Type, key: string | number, options?: {
281
- readonly oldValue?: A;
282
- readonly headers?: ChangeHeaders;
283
- }) => Delete<NoInfer<A>, Type>;
284
- /**
285
- * Stamp Durable State changes with their key and headers. With an `offset`, each
286
- * change gets that offset and a default txid of `<offset>:<index>`. A control
287
- * entry passes through. It gets the `offset` only when it has none of its own.
288
- */
289
- declare function changes<C extends Collections, RD, RE>(address: StateAddress<C, RD, RE>, options: {
290
- readonly offset?: string;
291
- }, entries: Array.NonEmptyReadonlyArray<Entry<C>>): Array.NonEmptyReadonlyArray<CollectionsEvent<C>>;
292
- declare function changes<C extends Collections, RD, RE>(address: StateAddress<C, RD, RE>, options: {
293
- readonly offset?: string;
294
- }, entries: ReadonlyArray<Entry<C>>): ReadonlyArray<CollectionsEvent<C>>;
295
- /** The rows of one collection, by State key. */
296
- type Rows<C extends Collections> = { readonly [K in keyof C & string]: ReadonlyMap<string, C[K]["schema"]["Type"]>; };
297
- /**
298
- * The materialized state of a Durable State stream: the latest row for each key
299
- * of each collection. `snapshot` holds the keys seen since an open
300
- * `snapshot-start`, and is `undefined` outside a snapshot.
301
- */
302
- interface Materialized<C extends Collections> {
303
- readonly rows: Rows<C>;
304
- readonly snapshot: ReadonlySet<string> | undefined;
305
- }
306
- /** Empty materialized state for the collections of `address`. */
307
- declare function materialized<C extends Collections>(address: {
308
- readonly collections: C;
309
- }): Materialized<C>;
310
- /**
311
- * Fold State events into materialized state, with the State protocol rules:
312
- *
313
- * - `upsert` sets the row of its key, and `delete` removes it.
314
- * - `reset` clears every collection.
315
- * - `snapshot-end` removes each row that no change since `snapshot-start` named.
316
- * A snapshot may span several calls.
317
- *
318
- * The input state is not changed. Only the collections that `events` touch are copied.
319
- */
320
- declare function materialize<C extends Collections>(state: Materialized<C>, events: Iterable<CollectionsEvent<C>>): Materialized<C>;
321
- declare namespace producer_d_exports {
322
- export { Position, next };
323
- }
324
- type Position = ProducerOptions;
325
- /** Advance only after the caller has acknowledged appended or duplicate. Persist this tuple at the owning edge. */
326
- declare const next: (position: Position) => Position;
327
- /** One row of a wake stream: the latest known state of one source stream. */
328
- declare const WakeRow: Schema.Struct<{
329
- /** Canonical id of the source stream. It is also the State key. */
330
- readonly stream: Schema.brand<Schema.String, "StreamId">;
331
- /**
332
- * A position in the source that the row's writer vouches for. The stream
333
- * holding the row says what is vouched: written in a source wake stream,
334
- * or accepted in a projection's accepted stream.
335
- */
336
- readonly offset: Schema.brand<Schema.String, "Offset">;
337
- /** Present when the source stream is closed. */
338
- readonly closed: Schema.optionalKey<Schema.Literal<true>>;
339
- }>;
340
- type WakeRow = typeof WakeRow.Type;
341
- /** The one collection of every wake stream. Its State `type` is `stream`. */
342
- declare const wakeCollections: {
343
- readonly stream: {
344
- readonly schema: Schema.Struct<{
345
- /** Canonical id of the source stream. It is also the State key. */
346
- readonly stream: Schema.brand<Schema.String, "StreamId">;
347
- /**
348
- * A position in the source that the row's writer vouches for. The stream
349
- * holding the row says what is vouched: written in a source wake stream,
350
- * or accepted in a projection's accepted stream.
351
- */
352
- readonly offset: Schema.brand<Schema.String, "Offset">;
353
- /** Present when the source stream is closed. */
354
- readonly closed: Schema.optionalKey<Schema.Literal<true>>;
355
- }>;
356
- readonly key: "stream";
357
- };
358
- };
359
- type WakeCollections = typeof wakeCollections;
360
- /** One item of a wake stream. */
361
- type WakeEvent = CollectionsEvent<WakeCollections>;
362
- /**
363
- * The codec of one wake stream message: a `stream` change or a State control.
364
- * A client that decodes raw JSON pages uses it in place of a typed service.
365
- */
366
- declare const WakeMessage: Schema.Codec<WakeEvent, CollectionsEncodedEvent<WakeCollections>>;
367
- /**
368
- * Declare a wake stream: a State stream of `WakeRow`s at a template.
369
- *
370
- * ```ts
371
- * class UserWake extends Streamsy.wake<UserWake>()("App/UserWake", "users/:user/wake", {
372
- * params: { user: UserKey },
373
- * }) {}
374
- * ```
375
- *
376
- * The declaration names no sources. A `Projection.wake` binding links one
377
- * source stream to one wake stream, with params of its own.
378
- */
379
- declare const wake: <Self>() => <const Name extends string, const Template extends string, C extends ParamCodecs>(name: Name, template: Template, options: {
380
- readonly params: C & ExactTemplateParams<Template, C>;
381
- }) => StateClass<Self, Name, Template, C, {
382
- readonly stream: {
383
- readonly schema: Schema.Struct<{
384
- /** Canonical id of the source stream. It is also the State key. */
385
- readonly stream: Schema.brand<Schema.String, "StreamId">;
386
- /**
387
- * A position in the source that the row's writer vouches for. The stream
388
- * holding the row says what is vouched: written in a source wake stream,
389
- * or accepted in a projection's accepted stream.
390
- */
391
- readonly offset: Schema.brand<Schema.String, "Offset">;
392
- /** Present when the source stream is closed. */
393
- readonly closed: Schema.optionalKey<Schema.Literal<true>>;
394
- }>;
395
- readonly key: "stream";
396
- };
397
- }>;
398
- /** One action for a consumer of a wake stream. */
399
- type WakeItem = Data.TaggedEnum<{
400
- /** Read `stream` from `from` up to at least `offset`, then save its cursor. */
401
- Dirty: {
402
- readonly stream: StreamId;
403
- readonly from: string;
404
- readonly offset: string;
405
- readonly closed: boolean;
406
- };
407
- /** The stream was removed. Drop its cursor and its local data. */
408
- Removed: {
409
- readonly stream: StreamId;
410
- };
411
- /** Drop every cursor. The items after this one start each stream from `-1`. */
412
- Reset: {};
413
- /** A complete snapshot ended. Drop each stream that `streams` does not hold. */
414
- Snapshot: {
415
- readonly streams: ReadonlySet<StreamId>;
416
- };
417
- }>;
418
- /** Constructors and matchers for `WakeItem`. */
419
- declare const WakeItem: Data.TaggedEnum.Constructor<{
420
- readonly _tag: "Dirty";
421
- readonly stream: StreamId;
422
- readonly from: string;
423
- readonly offset: string;
424
- readonly closed: boolean;
425
- } | {
426
- readonly _tag: "Removed";
427
- readonly stream: StreamId;
428
- } | {
429
- readonly _tag: "Reset";
430
- } | {
431
- readonly _tag: "Snapshot";
432
- readonly streams: ReadonlySet<StreamId>;
433
- }>;
434
- /** One batch of wake actions. Save `offset` as the wake cursor after every item is handled. */
435
- interface WakeBatch {
436
- readonly items: ReadonlyArray<WakeItem>;
437
- readonly offset: string;
438
- readonly upToDate: boolean;
439
- }
440
- interface FollowWakeOptions extends Omit<FollowOptions, "offset"> {
441
- /** The saved wake cursor. Default: `-1`, a cold start. */
442
- readonly from?: string;
443
- /** Saved source cursors. Read again for each batch, so the consumer may update the map. */
444
- readonly cursors: ReadonlyMap<StreamId, string>;
445
- }
446
- /** Follow options for a wait, including a saved wake cursor. */
447
- type AwaitWakeOptions = Omit<FollowWakeOptions, "cursors">;
448
- interface WakeActionsOptions {
449
- /** Saved source cursors. A missing entry starts from `-1`. */
450
- readonly cursors: ReadonlyMap<StreamId, string>;
451
- /** The streams of a snapshot that an earlier batch left open. */
452
- readonly snapshot?: ReadonlySet<StreamId> | undefined;
453
- }
454
- /** The actions of one wake batch, and the snapshot state for the next batch. */
455
- interface WakeActions {
456
- readonly items: ReadonlyArray<WakeItem>;
457
- /** The streams of a snapshot that is still open. Pass it to the next call. */
458
- readonly snapshot: ReadonlySet<StreamId> | undefined;
459
- }
460
- /**
461
- * The actions for one batch of wake messages. The function is pure: it reads
462
- * no stream and changes none of its inputs. Rows for one stream collapse to one
463
- * item; a delete then an upsert of one stream gives `Removed`, then `Dirty` from
464
- * `-1`. Pass the returned `snapshot` to the call for the next batch.
465
- *
466
- * `followWake` uses it over a typed service. A client with its own HTTP reader
467
- * decodes each page with `WakeMessage` and calls it directly.
468
- */
469
- declare function wakeActions(events: ReadonlyArray<WakeEvent>, options: WakeActionsOptions): WakeActions;
470
- /**
471
- * Follow one wake stream and give the actions for each batch: which source
472
- * streams to read, from which cursor, and which to drop. The helper reads no
473
- * source stream. Save each source cursor first and the wake cursor (`offset`)
474
- * last; a stop between the two reads the same rows again, and the offset check
475
- * skips the streams that were already read.
476
- */
477
- declare function followWake<Self, P>(declaration: Context.Key<Self, Api<P, WakeEvent>>, params: P, options: FollowWakeOptions): Stream.Stream<WakeBatch, FollowFailure, Self>;
478
- /**
479
- * Wait until a wake row for `stream` reaches `offset`. Works with local and
480
- * remote services. Callers choose their own timeout. Removed source ids must
481
- * not be reused; a new generation needs a new wake stream or a State reset.
482
- * Without `options.from`, each call reads the wake history from the start.
483
- */
484
- declare const awaitWake: <Self, P>(declaration: Context.Key<Self, Api<P, WakeEvent>>, params: P, target: {
485
- readonly stream: StreamId;
486
- readonly offset: string;
487
- }, options?: AwaitWakeOptions) => Effect.Effect<void, FollowFailure, Self>;
488
- declare namespace streamsy_d_exports {
489
- export { Address, Any, Api, AwaitWakeOptions, BytesClass, Class, CustomClass, FollowWakeOptions, Group, Host, JsonClass, Services, StateClass, WakeActions, WakeActionsOptions, WakeBatch, WakeCollections, WakeEvent, WakeItem, WakeMessage, WakeRow, Wildcard, awaitWake, bytes, custom, followWake, group, json, state, wake, wakeActions, wakeCollections };
490
- }
491
- declare namespace streams_d_exports {
492
- export { AppendFailure, AppendItems, Batch, Collected, CreateFailure, DecideSpec, Decided, Decision, Folded, FollowFailure, FollowOptions, HeadFailure, ReadFailure, RemoveFailure, append, collect, create, decide, fold, follow, head, items, read$1 as read, remove, session };
493
- }
494
- /** Full toolkit failures, including protocol rejections and infrastructure faults. */
495
- type ReadFailure = StreamNotFound | StreamGone | InvalidReadRequest | StreamsFault | DecodeFault;
496
- type FollowFailure = ReadFailure | NotSupported;
497
- type AppendFailure<O = AppendCallOptions> = AppendErrorFor<O> | StreamsFault | EncodeFault;
498
- type CreateFailure = CreateError | StreamsFault;
499
- type HeadFailure = HeadError | StreamsFault;
500
- type RemoveFailure = RemoveError | StreamsFault;
501
- interface Batch<A> {
502
- readonly items: ReadonlyArray<A>;
503
- readonly nextOffset: string;
504
- readonly upToDate: boolean;
505
- readonly closed: boolean;
506
- }
507
- declare const create: <A, RD, RE>(address: StreamAddress<A, RD, RE>, options?: Omit<CreateOptions, "contentType"> | undefined) => Effect.Effect<CreateResult, CreateFailure, StreamsWriter>;
508
- /**
509
- * The items one append takes. An append carries at least one item, unless it
510
- * closes the stream. Caller-bug rejections from a host are defects.
511
- */
512
- type AppendItems<A, O> = O extends {
513
- readonly close: true;
514
- } ? ReadonlyArray<A> : Array.NonEmptyReadonlyArray<A>;
515
- /**
516
- * Append items to one stream. The error type lists only the rejections that the
517
- * options make possible; a host that answers another one dies.
518
- */
519
- declare const append: <A, RD, RE, const O extends AppendCallOptions = {}>(address: StreamAddress<A, RD, RE>, items: AppendItems<A, O>, options?: O | undefined) => Effect.Effect<AppendResult, AppendFailure<O>, RE | StreamsWriter>;
520
- declare function read$1<A, RD, RE>(address: StreamAddress<A, RD, RE>, options?: ReadOptions$1): Stream.Stream<Batch<A>, ReadFailure, StreamsReader | RD>;
521
- /** A folded value and the tail it was read up to. `offset` is this stream's CAS token. */
522
- interface Folded<S> {
523
- readonly state: S;
524
- readonly offset: string;
525
- }
526
- /** Every item read and the tail they were read up to. */
527
- interface Collected<A> {
528
- readonly items: ReadonlyArray<A>;
529
- readonly offset: string;
530
- }
531
- /**
532
- * Read the stream up to its tail and fold every item into one value. Pass
533
- * `options.offset` to fold on from a tail that an earlier fold returned.
534
- */
535
- declare const fold: <A, RD, RE, S>(address: StreamAddress<A, RD, RE>, initial: Function.LazyArg<S>, f: (state: S, item: A) => S, options?: ReadOptions$1 | undefined) => Effect.Effect<Folded<S>, ReadFailure, RD | StreamsReader>;
536
- /** Read the stream up to its tail and return its items. */
537
- declare const collect: <A, RD, RE>(address: StreamAddress<A, RD, RE>, options?: ReadOptions$1 | undefined) => Effect.Effect<Collected<A>, ReadFailure, RD | StreamsReader>;
538
- /** What one `decide` step answers: a value, and the items to append for it. */
539
- interface Decision<B, A> {
540
- readonly value: B;
541
- /** Items to append. Empty means "no write": the call returns without a tail check. */
542
- readonly items: ReadonlyArray<A>;
543
- }
544
- /** The result of a read, decide, append loop. */
545
- interface Decided<B> {
546
- readonly value: B;
547
- /** The new tail after a write, or the tail that was read when there was no write. */
548
- readonly offset: string;
549
- readonly appended: boolean;
550
- }
551
- interface DecideSpec<A, S, B, E, R> {
552
- /** The start value of the fold. Each call starts from a new value. */
553
- readonly initial: Function.LazyArg<S>;
554
- readonly fold: (state: S, item: A) => S;
555
- /**
556
- * Decide what to append from the folded state. `offset` is the tail the state is
557
- * at; the append checks it. This step must not write and must not change
558
- * `state`: a retry folds on from the same state after a lost race.
559
- */
560
- readonly decide: (state: S, at: {
561
- readonly offset: string;
562
- }) => Effect.Effect<Decision<B, NoInfer<A>>, E, R>;
563
- /** Retries after `OffsetMismatch`. Default: `Schedule.recurs(3)`. Nothing else is retried. */
564
- readonly retry?: Schedule.Schedule<unknown, OffsetMismatch>;
565
- }
566
- /**
567
- * Read, decide, append. Fold the stream to its tail, decide from the state, and
568
- * append with `expectedOffset` set to the tail that was read. After an
569
- * `OffsetMismatch`, fold on from that tail and decide again while `retry` allows;
570
- * then fail with the last `OffsetMismatch`. Transport faults are not retried: a
571
- * lost reply may hide an append that landed.
572
- */
573
- declare const decide: <A, RD, RE, S, B, E, R>(address: StreamAddress<A, RD, RE>, spec: DecideSpec<A, S, B, E, R>) => Effect.Effect<Decided<B>, E | AppendConflict | DecodeFault | EncodeFault | InvalidReadRequest | NotSupported | OffsetMismatch | StorageFault | StreamBusy | StreamClosed | StreamGone | StreamNotFound | TransportFault, R | RD | RE | StreamsReader | StreamsWriter>;
574
- interface FollowOptions extends ReadOptions$1 {
575
- /**
576
- * Schedule for retrying a failed read after a retryable `TransportFault` or `StorageFault`.
577
- * Default: exponential from 200 ms, jittered, capped at 30 s, forever. Other
578
- * failures end the stream at once.
579
- */
580
- readonly retry?: Schedule.Schedule<unknown>;
581
- }
582
- /**
583
- * Catch up, then wait one readNext at a time, filtering empty open batches.
584
- * A read that fails with a retryable transport or storage fault is retried from the same
585
- * offset, so a restart or network drop yields each item once.
586
- */
587
- declare function follow<A, RD, RE>(address: StreamAddress<A, RD, RE>, options?: FollowOptions): Stream.Stream<Batch<A>, FollowFailure, StreamsReader | RD>;
588
- declare const items: <A, E, R>(batches: Stream.Stream<Batch<A>, E, R>) => Stream.Stream<A, E, R>;
589
- declare const session: <A, RD, RE>(address: StreamAddress<A, RD, RE>, options: ReadNextOptions) => Effect.Effect<ReadNextResult, StorageFault | TransportFault | ReadNextError, StreamsReader>;
590
- declare const head: <A, RD, RE>(address: StreamAddress<A, RD, RE>) => Effect.Effect<HeadResult, HeadFailure, StreamsReader>;
591
- declare const remove: <A, RD, RE>(address: StreamAddress<A, RD, RE>) => Effect.Effect<void, RemoveFailure, StreamsWriter>;
592
- /** A stream service with named failures for each toolkit call. */
593
- interface Api<P, A, RD = never, RE = never> {
594
- readonly owner: object;
595
- readonly route: StreamRoute<P, A, RD, RE>;
596
- readonly wire: Reader<StreamsFault> & Writer<StreamsFault>;
597
- readonly create: (params: P, options?: Omit<CreateOptions, "contentType">) => Effect.Effect<CreateResult, CreateFailure>;
598
- readonly append: <const O extends AppendCallOptions = {}>(params: P, items: AppendItems<A, O>, options?: O) => Effect.Effect<AppendResult, AppendFailure<O>, RE>;
599
- readonly read: (params: P, options?: ReadOptions$1) => Stream.Stream<Batch<A>, ReadFailure, RD>;
600
- readonly fold: <S>(params: P, initial: Function.LazyArg<S>, f: (state: S, item: A) => S, options?: ReadOptions$1) => Effect.Effect<Folded<S>, ReadFailure, RD>;
601
- readonly collect: (params: P, options?: ReadOptions$1) => Effect.Effect<Collected<A>, ReadFailure, RD>;
602
- readonly decide: <S, B, E, R>(params: P, spec: DecideSpec<A, S, B, E, R>) => Effect.Effect<Decided<B>, ReadFailure | AppendFailure<{
603
- expectedOffset: string;
604
- }> | E, RD | RE | R>;
605
- readonly follow: (params: P, options?: FollowOptions) => Stream.Stream<Batch<A>, FollowFailure, RD>;
606
- readonly session: (params: P, options: ReadNextOptions) => Effect.Effect<ReadNextResult, Exclude<FollowFailure, DecodeFault>>;
607
- readonly head: (params: P) => Effect.Effect<HeadResult, HeadFailure>;
608
- readonly remove: (params: P) => Effect.Effect<void, RemoveFailure>;
609
- readonly fork: (params: P, source: P, options?: Omit<CreateOptions, "contentType" | "forkedFrom">) => Effect.Effect<CreateResult, CreateFailure>;
610
- }
611
- /** An address names one stream. It holds no data. It is not an Effect `Ref`. */
612
- type Address<A, R, RD = never, RE = never> = StreamAddress<A, RD, RE> & {
613
- readonly stream: Context.Key<R, {
614
- readonly owner: object;
615
- readonly wire: Reader<StreamsFault> & Writer<StreamsFault>;
616
- }>;
617
- };
618
- type Class<Self, Name extends string, P, A, RD, RE, R extends StreamRoute<P, A, RD, RE>> = Context.ServiceClass<Self, `@streamsy/core/Stream/${Name}`, Api<P, A, RD, RE>> & R & {
619
- readonly at: (params: P) => ReturnType<R["address"]> & Address<A, Self, RD, RE>;
620
- };
621
- type JsonClass<Self, Name extends string, T extends string, C extends ParamCodecs, A, I, RD, RE> = Class<Self, Name, Params<C>, A, RD, RE, ReturnType<typeof json$1<T, C, A, I, RD, RE>>>;
622
- declare const json: <Self>() => <const Name extends string, const T extends string, C extends ParamCodecs, A, I, RD, RE>(name: Name, ...args: Parameters<typeof json$1<T, C, A, I, RD, RE>>) => JsonClass<Self, Name, T, C, A, I, RD, RE>;
623
- type StateClass<Self, Name extends string, T extends string, C extends ParamCodecs, Collections$1 extends Collections> = Class<Self, Name, Params<C>, CollectionsEvent<Collections$1>, CollectionsDecodingServices<Collections$1>, CollectionsEncodingServices<Collections$1>, ReturnType<typeof state$1<T, C, Collections$1>>>;
624
- declare const state: <Self>() => <const Name extends string, const T extends string, C extends ParamCodecs, const Collections$2 extends Collections>(name: Name, ...args: Parameters<typeof state$1<T, C, Collections$2>>) => StateClass<Self, Name, T, C, Collections$2>;
625
- type BytesClass<Self, Name extends string, T extends string, C extends ParamCodecs> = Class<Self, Name, Params<C>, Uint8Array, never, never, ReturnType<typeof bytes$1<T, C>>>;
626
- declare const bytes: <Self>() => <const Name extends string, const T extends string, C extends ParamCodecs>(name: Name, ...args: Parameters<typeof bytes$1<T, C>>) => BytesClass<Self, Name, T, C>;
627
- type CustomClass<Self, Name extends string, P, A, RD, RE> = Class<Self, Name, P, A, RD, RE, ReturnType<typeof custom$1<P, A, RD, RE>>>;
628
- declare const custom: <Self>() => <const Name extends string, P, A, RD, RE>(name: Name, options: Parameters<typeof custom$1<P, A, RD, RE>>[0]) => CustomClass<Self, Name, P, A, RD, RE>;
629
- declare const Wildcard_base: Class<Wildcard, "Wildcard", {
630
- id: string;
631
- }, Uint8Array<ArrayBufferLike>, never, never, StreamRoute<{
632
- id: string;
633
- }, Uint8Array<ArrayBufferLike>, never, never, string>>;
634
- declare class Wildcard extends Wildcard_base {}
635
- /** Class instances carry Effect's service marker; individual Self types remain on each key. */
636
- interface StreamIdentifier {
637
- readonly [Context.ServiceTypeId]: typeof Context.ServiceTypeId;
638
- }
639
- /** The provider and HTTP boundary need only the wire and the route grammar. */
640
- interface Any extends Context.Key<StreamIdentifier, {
641
- readonly owner: object;
642
- readonly wire: Reader<StreamsFault> & Writer<StreamsFault>;
643
- }> {
644
- readonly template: string;
645
- readonly match: (id: string) => boolean;
646
- }
647
- type Identifiers<Keys extends ReadonlyArray<Any>> = Keys[number]["Identifier"];
648
- /** Bind streams to their owning protocol graph. */
649
- declare function bind<A, E, R, const Keys extends ReadonlyArray<Any>>(graph: Layer.Layer<A | StreamsReader | StreamsWriter, E, R>, streams: Group<Keys>): Layer.Layer<Identifiers<Keys>, E, R>;
650
- interface Group<Keys extends ReadonlyArray<Any> = ReadonlyArray<Any>> {
651
- readonly streams: Keys;
652
- }
653
- type Services<G extends Group> = G["streams"][number]["Identifier"];
654
- /** What every host Layer gives for a group: its stream services. */
655
- type Host<G extends Group> = Services<G>;
656
- declare function group<const Keys extends ReadonlyArray<Any>>(...keys: Keys): Group<Keys>;
657
- type RouteLayer<R> = Layer.Layer<never, never, HttpRouter.HttpRouter | HttpRouter.Request.From<"Requires", Exclude<R, HttpRouter.Provided>>>;
658
- interface Access<S extends Any = Any> {
659
- readonly stream: S;
660
- /** append permits POST; full also permits PUT and DELETE. */
661
- readonly access: "read" | "append" | "full";
662
- }
663
- interface RoutesOptions extends Omit<HttpOptions, "pathPrefix"> {
664
- readonly prefix?: `/${string}`;
665
- /** The access of each stream on this mount. */
666
- readonly access: Access["access"] | ((stream: Any) => Access["access"]);
667
- }
668
- /** One prefix controls both route registration and protocol path stripping. */
669
- declare function routes<const Keys extends ReadonlyArray<Any>>(group: Group<Keys>, options: RoutesOptions): RouteLayer<Identifiers<Keys>>;
670
- interface ReadOptions {
671
- readonly sseDeadlineMs?: number;
672
- readonly cacheVisibility?: "private" | "public";
673
- }
674
- /** @internal Shared construction-time validation for HTTP read routes. */
675
- declare function checkReadOptions(options: ReadOptions): void;
676
- /** Read an already resolved id using the protocol's HTTP framing and live modes. */
677
- declare function read(id: StreamId, options?: ReadOptions): Effect.Effect<HttpServerResponse.HttpServerResponse, InvalidReadRequest | NotSupported | StorageFault | StreamGone | StreamNotFound | TransportFault, HttpServerRequest.HttpServerRequest | StreamsReader>;
678
- /** Shared protocol and host security headers. */
679
- declare const securityHeaders: Readonly<{
680
- "x-content-type-options": "nosniff";
681
- "cross-origin-resource-policy": "cross-origin";
682
- }>;
683
- /**
684
- * Tells live HTTP reads that the host is about to stop. A parked long poll then
685
- * answers `204` with its offset and cursor, and an open SSE body ends after its
686
- * last whole batch. Clients take their normal reconnect path.
687
- *
688
- * The service is optional. Live reads look it up with `Effect.serviceOption`, so
689
- * a host without it (for example the Durable Object host) keeps its behaviour.
690
- */
691
- interface ShutdownSignalService {
692
- /** Completes when the host starts to drain; never fails. */
693
- readonly draining: Effect.Effect<void>;
694
- /** Counts a live read while `effect` runs. */
695
- readonly track: <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
696
- /** Counts a live read while `stream` runs. */
697
- readonly trackStream: <A, E, R>(stream: Stream.Stream<A, E, R>) => Stream.Stream<A, E, R>;
698
- /**
699
- * Starts the drain, then waits until no live read is running or `timeout`
700
- * passes. Safe to call more than once.
701
- */
702
- readonly drain: (timeout: Duration.Input) => Effect.Effect<void>;
703
- /** The number of live reads now running. */
704
- readonly active: Effect.Effect<number>;
705
- }
706
- declare const ShutdownSignal_base: Context.ServiceClass<ShutdownSignal, "@streamsy/core/ShutdownSignal", ShutdownSignalService>;
707
- declare class ShutdownSignal extends ShutdownSignal_base {}
708
- /** A fresh signal. Provide it to the routes and call `drain` before they close. */
709
- declare const layerShutdownSignal: Layer.Layer<ShutdownSignal, never, never>;
710
- interface SseControlData {
711
- streamNextOffset: string;
712
- streamCursor?: string;
713
- streamClosed?: true;
714
- upToDate?: true;
715
- }
716
- /**
717
- * Frames of `live=websocket`, a Streamsy extension to Durable Streams HTTP.
718
- *
719
- * The server sends one `open` text frame, then a binary `data` frame and a
720
- * `control` text frame for each batch. A `data` frame holds the exact body of
721
- * a catch-up `GET` for the batch. A `control` frame has the fields of an SSE
722
- * control event, and a client moves its offset only on `control`.
723
- */
724
- declare const LIVE_SOCKET_PROTOCOL = "streamsy-live.v1";
725
- /** The only client message. The runtime answers it without running the server. */
726
- declare const LIVE_PING = "ping";
727
- declare const LIVE_PONG = "pong";
728
- /** The close codes of `streamsy-live.v1`. */
729
- declare const LiveCloseCode: {
730
- /** The stream closed. A `control` frame with `streamClosed` came first. */
731
- readonly StreamClosed: 1000;
732
- readonly InternalError: 1011;
733
- /** The server restarted or cannot read the socket's state. Reconnect at once. */
734
- readonly Restart: 1012;
735
- /** The socket fell behind the byte cap. Read over HTTP, then reconnect. */
736
- readonly CatchUpRequired: 4100;
737
- readonly BadMessage: 4400;
738
- readonly NotFound: 4404;
739
- readonly Gone: 4410;
740
- };
741
- type LiveCloseCode = (typeof LiveCloseCode)[keyof typeof LiveCloseCode];
742
- interface LiveOpenFrame {
743
- readonly type: "open";
744
- readonly protocol: typeof LIVE_SOCKET_PROTOCOL;
745
- readonly contentType: string;
746
- readonly streamNextOffset: string;
747
- }
748
- interface LiveControlFrame extends SseControlData {
749
- readonly type: "control";
750
- }
751
- interface LiveBatch {
752
- readonly nextOffset: string;
753
- readonly cursor: string;
754
- readonly upToDate: boolean;
755
- readonly closed: boolean;
756
- }
757
- /** The browser socket API hides response headers, so `open` carries the content type. */
758
- declare function openFrame(contentType: string, streamNextOffset: string): string;
759
- /** The SSE control rules: no cursor on a closed stream, `upToDate` only while open. */
760
- declare function controlFrame(batch: LiveBatch): string;
761
- /** The cursor a long-poll response would carry after `previous`. */
762
- declare const nextCursor: (previous: string | undefined) => Effect.Effect<string, never, never>;
763
- /** The close code for a read that failed with an HTTP status. */
764
- declare function closeCodeForStatus(status: number): LiveCloseCode;
765
- /** A `GET` that asks for `live=websocket` with an `Upgrade: websocket` header. */
766
- declare function isLiveUpgrade(request: Request): boolean;
767
- /** The answer to `live=websocket` from a host or request that cannot upgrade. Clients fall back to long-poll. */
768
- declare function upgradeRequired(): Response;
769
- /** `websocket` is a Streamsy extension. Only a host that accepts the upgrade serves it. */
770
- type HttpLiveMode = "long-poll" | "sse" | "websocket";
771
- declare namespace index_d_exports {
772
- export { Access, HttpLiveMode, HttpOptions, LIVE_PING, LIVE_PONG, LIVE_SOCKET_PROTOCOL, LiveBatch, LiveCloseCode, LiveControlFrame, LiveOpenFrame, ReadOptions, RoutesOptions, ShutdownSignal, ShutdownSignalService, app, checkReadOptions, closeCodeForStatus, controlFrame, isLiveUpgrade, layerShutdownSignal, nextCursor, openFrame, read, routes, securityHeaders, streamPath, upgradeRequired };
773
- }
774
- export { streamPath as $, Batch as A, RemoveFailure as B, Access as C, Group as D, Any as E, Decision as F, streams_d_exports$1 as G, streamsy_d_exports as H, Folded as I, layer_d_exports as J, MemoryOptions as K, FollowFailure as L, CreateFailure as M, DecideSpec as N, Identifiers as O, Decided as P, address_d_exports as Q, HeadFailure as R, read as S, routes as T, producer_d_exports as U, streams_d_exports as V, durable_state_d_exports as W, compare as X, ZERO_OFFSET as Y, route_d_exports as Z, ShutdownSignalService as _, LIVE_SOCKET_PROTOCOL as a, ReadOptions as b, LiveControlFrame as c, controlFrame as d, HttpOptions as et, isLiveUpgrade as f, ShutdownSignal as g, upgradeRequired as h, LIVE_PONG as i, Collected as j, AppendFailure as k, LiveOpenFrame as l, openFrame as m, HttpLiveMode as n, LiveBatch as o, nextCursor as p, ProtocolOptions as q, LIVE_PING as r, LiveCloseCode as s, index_d_exports as t, app as tt, closeCodeForStatus as u, layerShutdownSignal as v, RoutesOptions as w, checkReadOptions as x, securityHeaders as y, ReadFailure as z };