effect-cf 0.13.1 → 0.14.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.
package/dist/index.d.mts CHANGED
@@ -1,7 +1,6 @@
1
- import { a as BindingService, c as WorkerConfig, i as BindingNotFoundError, l as WorkerEnv, o as BindingValidationError, s as Binding_d_exports, t as Hyperdrive_d_exports, u as WorkerEnvironment } from "./Hyperdrive-L6ldMlRF.mjs";
2
- import { Cause, Config, Context, Data, DateTime, Duration, Effect, Layer, Option, Schema, Scope } from "effect";
3
- import { HttpServerRequest, HttpServerResponse } from "effect/unstable/http";
4
- import { OtlpMetrics } from "effect/unstable/observability";
1
+ import { a as BindingService, c as WorkerConfig, i as BindingNotFoundError, l as WorkerEnv, o as BindingValidationError, s as Binding_d_exports, t as Hyperdrive_d_exports, u as WorkerEnvironment } from "./Hyperdrive-C0vfrPeG.mjs";
2
+ import { Cause, Context, Data, DateTime, Duration, Effect, Layer, Option, Schema, Scope } from "effect";
3
+ import { Headers as Headers$1, HttpServerRequest, HttpServerResponse } from "effect/unstable/http";
5
4
  import { D1Client } from "@effect/sql-d1";
6
5
  import { DurableObject, RpcStub, RpcTarget, WorkerEntrypoint, WorkflowEntrypoint, WorkflowEvent, WorkflowSleepDuration, WorkflowStep, WorkflowStepConfig, WorkflowStepContext, WorkflowStepEvent, WorkflowTimeoutDuration } from "cloudflare:workers";
7
6
  import * as RpcSerialization from "effect/unstable/rpc/RpcSerialization";
@@ -12,11 +11,244 @@ import * as _$effect_Types0 from "effect/Types";
12
11
  import * as _$effect_Cause0 from "effect/Cause";
13
12
  import * as _$effect_Layer0 from "effect/Layer";
14
13
  import * as _$effect_Scope0 from "effect/Scope";
15
- import * as Duration$1 from "effect/Duration";
16
14
  import * as Tracer from "effect/Tracer";
17
15
  import * as _$effect_Config0 from "effect/Config";
18
16
 
19
- //#region src/DurableObjectStorage.d.ts
17
+ //#region src/WorkersAi.d.ts
18
+ declare namespace WorkersAi_d_exports {
19
+ export { LayerOptions$16 as LayerOptions, Tag$15 as Tag, TagClass$14 as TagClass, WorkersAiAsyncBatchResponse, WorkersAiBinding, WorkersAiClient, WorkersAiDefinition, WorkersAiEmbeddingInput, WorkersAiEmbeddingResponse, WorkersAiModelsSearchObject, WorkersAiModelsSearchParams, WorkersAiOperationError, WorkersAiOptions, WorkersAiService, embeddingResponse, isWorkersAiBinding, layer$13 as layer, make$14 as make, makeClient$10 as makeClient };
20
+ }
21
+ declare const WorkersAiOperationError_base: new <A extends Record<string, any> = {}>(args: _$effect_Types0.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => _$effect_Cause0.YieldableError & {
22
+ readonly _tag: "WorkersAiOperationError";
23
+ } & Readonly<A>;
24
+ /** Error raised when a Workers AI operation fails. */
25
+ declare class WorkersAiOperationError extends WorkersAiOperationError_base<{
26
+ readonly binding: string;
27
+ readonly operation: string;
28
+ readonly cause: unknown;
29
+ }> {}
30
+ /** Typed Workers AI binding definition. */
31
+ interface WorkersAiDefinition {
32
+ /** Binding name as configured in `wrangler.jsonc`. */
33
+ readonly binding: string;
34
+ }
35
+ type WorkersAiBinding<ModelList extends AiModelListType = AiModels> = CloudflareAi<ModelList>;
36
+ type WorkersAiOptions = AiOptions;
37
+ type WorkersAiModelsSearchParams = AiModelsSearchParams;
38
+ type WorkersAiModelsSearchObject = AiModelsSearchObject;
39
+ type WorkersAiAsyncBatchResponse = AiAsyncBatchResponse;
40
+ type WorkersAiEmbeddingInput = AiTextEmbeddingsInput | Ai_Cf_Qwen_Qwen3_Embedding_0_6B_Input | Record<string, unknown>;
41
+ interface WorkersAiEmbeddingResponse {
42
+ readonly data: ReadonlyArray<ReadonlyArray<number>>;
43
+ readonly shape: ReadonlyArray<number>;
44
+ }
45
+ interface WorkersAiClient<ModelList extends AiModelListType = AiModels> {
46
+ readonly aiGatewayLogId: Effect.Effect<string | null, WorkersAiOperationError>;
47
+ readonly run: {
48
+ <Name extends keyof ModelList>(model: Name, input: {
49
+ readonly requests: ReadonlyArray<ModelList[Name]["inputs"]>;
50
+ }, options: WorkersAiOptions & {
51
+ readonly queueRequest: true;
52
+ }): Effect.Effect<WorkersAiAsyncBatchResponse, WorkersAiOperationError>;
53
+ <Name extends keyof ModelList>(model: Name, input: ModelList[Name]["inputs"], options: WorkersAiOptions & {
54
+ readonly returnRawResponse: true;
55
+ }): Effect.Effect<Response, WorkersAiOperationError>;
56
+ <Name extends keyof ModelList>(model: Name, input: ModelList[Name]["inputs"], options: WorkersAiOptions & {
57
+ readonly websocket: true;
58
+ }): Effect.Effect<Response, WorkersAiOperationError>;
59
+ <Name extends keyof ModelList>(model: Name, input: ModelList[Name]["inputs"] & {
60
+ readonly stream: true;
61
+ }, options?: WorkersAiOptions): Effect.Effect<ReadableStream, WorkersAiOperationError>;
62
+ <Name extends keyof ModelList>(model: Name, input: ModelList[Name]["inputs"], options?: WorkersAiOptions): Effect.Effect<ModelList[Name]["postProcessedOutputs"], WorkersAiOperationError>;
63
+ <Input extends Record<string, unknown>, Output = Record<string, unknown>>(model: string, input: Input, options?: WorkersAiOptions): Effect.Effect<Output, WorkersAiOperationError>;
64
+ };
65
+ readonly runEmbedding: <Input extends WorkersAiEmbeddingInput>(model: string, input: Input, options?: WorkersAiOptions) => Effect.Effect<WorkersAiEmbeddingResponse, WorkersAiOperationError>;
66
+ readonly models: (params?: WorkersAiModelsSearchParams) => Effect.Effect<ReadonlyArray<WorkersAiModelsSearchObject>, WorkersAiOperationError>;
67
+ readonly gateway: (gatewayId: string) => Effect.Effect<CloudflareAiGateway, WorkersAiOperationError>;
68
+ readonly unsafeRaw: Effect.Effect<WorkersAiBinding<ModelList>>;
69
+ readonly definition: WorkersAiDefinition;
70
+ }
71
+ declare const WorkersAiServiceTypeId: unique symbol;
72
+ /** Nominal service marker for Workers AI services created with {@link make}. */
73
+ interface WorkersAiService<Id extends string> {
74
+ readonly [WorkersAiServiceTypeId]: {
75
+ readonly id: Id;
76
+ };
77
+ }
78
+ type LayerOptions$16 = {
79
+ readonly binding: string;
80
+ };
81
+ interface TagClass$14<Self, Id extends string, ModelList extends AiModelListType = AiModels> extends Context.ServiceClass<Self, Id, WorkersAiClient<ModelList>> {
82
+ readonly id: Id;
83
+ readonly layer: (options: LayerOptions$16) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
84
+ }
85
+ declare const isWorkersAiBinding: (value: unknown) => value is WorkersAiBinding;
86
+ declare const embeddingResponse: (value: {
87
+ readonly data?: ReadonlyArray<ReadonlyArray<number>>;
88
+ readonly shape?: ReadonlyArray<number>;
89
+ }) => WorkersAiEmbeddingResponse;
90
+ declare const makeClient$10: <ModelList extends AiModelListType = AiModels>(definition: WorkersAiDefinition) => (ai: WorkersAiBinding<ModelList>) => WorkersAiClient<ModelList>;
91
+ declare const layer$13: <Self, ModelList extends AiModelListType = AiModels>(tag: Context.Service<Self, WorkersAiClient<ModelList>>, definition: WorkersAiDefinition) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
92
+ declare const make$14: <Id extends string>(id: Id) => TagClass$14<WorkersAiService<Id>, Id, AiModels>;
93
+ declare const Tag$15: <Self>() => <Id extends string, ModelList extends AiModelListType = AiModels>(id: Id) => TagClass$14<Self, Id, ModelList>;
94
+ declare namespace AiGateway_d_exports {
95
+ export { AiGatewayBinding, AiGatewayClient, AiGatewayDefinition, AiGatewayFetchOptions, AiGatewayHeaders, AiGatewayLog, AiGatewayOperationError, AiGatewayPatchLog, AiGatewayProvider, AiGatewayRunOptions, AiGatewayService, AiGatewayUniversalRequest, LayerOptions$15 as LayerOptions, Tag$14 as Tag, TagClass$13 as TagClass, isAiGatewayBinding, layer$12 as layer, make$13 as make, makeClient$9 as makeClient, makeClientFromAi, makeHttpClient };
96
+ }
97
+ declare const AiGatewayOperationError_base: new <A extends Record<string, any> = {}>(args: _$effect_Types0.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => _$effect_Cause0.YieldableError & {
98
+ readonly _tag: "AiGatewayOperationError";
99
+ } & Readonly<A>;
100
+ /** Error raised when an AI Gateway operation fails. */
101
+ declare class AiGatewayOperationError extends AiGatewayOperationError_base<{
102
+ readonly binding: string;
103
+ readonly operation: string;
104
+ readonly cause: unknown;
105
+ }> {}
106
+ /** Typed AI Gateway client definition. */
107
+ interface AiGatewayDefinition {
108
+ /** Binding name as configured in `wrangler.jsonc`. */
109
+ readonly binding: string;
110
+ /** Gateway id/name passed to `env.AI.gateway(id)`. */
111
+ readonly gatewayId: string;
112
+ /** Optional account id used by the HTTP-only helper. */
113
+ readonly accountId?: string;
114
+ }
115
+ type AiGatewayBinding = CloudflareAiGateway;
116
+ type AiGatewayRunData = Parameters<AiGatewayBinding["run"]>[0];
117
+ type AiGatewayPatchLog = Parameters<AiGatewayBinding["patchLog"]>[1];
118
+ type AiGatewayLog = Awaited<ReturnType<AiGatewayBinding["getLog"]>>;
119
+ type AiGatewayProvider = NonNullable<Parameters<AiGatewayBinding["getUrl"]>[0]>;
120
+ type AiGatewayUniversalRequest = Exclude<AiGatewayRunData, ReadonlyArray<unknown>>;
121
+ type AiGatewayHeaders = NonNullable<AiGatewayUniversalRequest["headers"]>;
122
+ type AiGatewayRunOptions = Parameters<CloudflareAiGateway["run"]>[1];
123
+ interface AiGatewayFetchOptions {
124
+ readonly provider?: AiGatewayProvider;
125
+ readonly path?: string;
126
+ readonly init?: RequestInit;
127
+ }
128
+ interface AiGatewayClient {
129
+ readonly run: (data: AiGatewayUniversalRequest | ReadonlyArray<AiGatewayUniversalRequest>, options?: AiGatewayRunOptions) => Effect.Effect<Response, AiGatewayOperationError>;
130
+ readonly getUrl: (provider?: AiGatewayProvider) => Effect.Effect<string, AiGatewayOperationError>;
131
+ readonly fetch: (options: AiGatewayFetchOptions) => Effect.Effect<Response, AiGatewayOperationError>;
132
+ readonly patchLog: (logId: string, data: AiGatewayPatchLog) => Effect.Effect<void, AiGatewayOperationError>;
133
+ readonly getLog: (logId: string) => Effect.Effect<AiGatewayLog, AiGatewayOperationError>;
134
+ readonly unsafeRaw: Effect.Effect<AiGatewayBinding, AiGatewayOperationError>;
135
+ readonly definition: AiGatewayDefinition;
136
+ }
137
+ declare const AiGatewayServiceTypeId: unique symbol;
138
+ /** Nominal service marker for AI Gateway services created with {@link make}. */
139
+ interface AiGatewayService<Id extends string> {
140
+ readonly [AiGatewayServiceTypeId]: {
141
+ readonly id: Id;
142
+ };
143
+ }
144
+ type LayerOptions$15 = {
145
+ readonly binding: string;
146
+ readonly gatewayId: string;
147
+ readonly accountId?: string;
148
+ };
149
+ interface TagClass$13<Self, Id extends string> extends Context.ServiceClass<Self, Id, AiGatewayClient> {
150
+ readonly id: Id;
151
+ readonly layer: (options: LayerOptions$15) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError | AiGatewayOperationError, WorkerEnvironment>;
152
+ }
153
+ declare const isAiGatewayBinding: (value: unknown) => value is WorkersAiBinding;
154
+ declare const makeClient$9: (definition: AiGatewayDefinition, gateway: AiGatewayBinding) => {
155
+ definition: AiGatewayDefinition;
156
+ run: (data: _$_cloudflare_workers_types0.AIGatewayUniversalRequest | readonly _$_cloudflare_workers_types0.AIGatewayUniversalRequest[], options: {
157
+ gateway?: _$_cloudflare_workers_types0.UniversalGatewayOptions;
158
+ extraHeaders?: object;
159
+ signal?: _$_cloudflare_workers_types0.AbortSignal;
160
+ } | undefined) => Effect.Effect<_$_cloudflare_workers_types0.Response, AiGatewayOperationError, never>;
161
+ getUrl: (provider: string | undefined) => Effect.Effect<string, AiGatewayOperationError, never>;
162
+ fetch: (options: AiGatewayFetchOptions) => Effect.Effect<Response, AiGatewayOperationError, never>;
163
+ patchLog: (logId: string, data: _$_cloudflare_workers_types0.AiGatewayPatchLog) => Effect.Effect<void, AiGatewayOperationError, never>;
164
+ getLog: (logId: string) => Effect.Effect<_$_cloudflare_workers_types0.AiGatewayLog, AiGatewayOperationError, never>;
165
+ unsafeRaw: Effect.Effect<CloudflareAiGateway, never, never>;
166
+ };
167
+ declare const makeClientFromAi: (definition: AiGatewayDefinition, ai: WorkersAiBinding) => AiGatewayClient;
168
+ declare const makeHttpClient: (definition: Omit<AiGatewayDefinition, "binding"> & {
169
+ readonly accountId: string;
170
+ readonly binding?: string;
171
+ }, request?: typeof fetch) => AiGatewayClient;
172
+ declare const layer$12: <Self>(tag: Context.Service<Self, AiGatewayClient>, definition: AiGatewayDefinition) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
173
+ declare const make$13: <Id extends string>(id: Id) => TagClass$13<AiGatewayService<Id>, Id>;
174
+ declare const Tag$14: <Self>() => <Id extends string>(id: Id) => TagClass$13<Self, Id>;
175
+ declare namespace BrowserRendering_d_exports {
176
+ export { BrowserRenderingBinding, BrowserRenderingBrowserClient, BrowserRenderingBrowserLike, BrowserRenderingClient, BrowserRenderingConnect, BrowserRenderingDefinition, BrowserRenderingLaunch, BrowserRenderingOperationError, BrowserRenderingPageClient, BrowserRenderingPageLike, BrowserRenderingService, LayerOptions$14 as LayerOptions, Tag$13 as Tag, TagClass$12 as TagClass, isBrowserRenderingBinding, layer$11 as layer, make$12 as make, makeClient$8 as makeClient };
177
+ }
178
+ declare const BrowserRenderingOperationError_base: new <A extends Record<string, any> = {}>(args: _$effect_Types0.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => _$effect_Cause0.YieldableError & {
179
+ readonly _tag: "BrowserRenderingOperationError";
180
+ } & Readonly<A>;
181
+ /** Error raised when a Browser Rendering operation fails. */
182
+ declare class BrowserRenderingOperationError extends BrowserRenderingOperationError_base<{
183
+ readonly binding: string;
184
+ readonly operation: string;
185
+ readonly cause: unknown;
186
+ }> {}
187
+ /** Typed Browser Rendering binding definition. */
188
+ interface BrowserRenderingDefinition {
189
+ /** Binding name as configured in `wrangler.jsonc`. */
190
+ readonly binding: string;
191
+ }
192
+ type BrowserRenderingBinding = object;
193
+ type BrowserRenderingLaunch<RawBinding, Browser, LaunchOptions = unknown> = (binding: RawBinding, options?: LaunchOptions) => Promise<Browser>;
194
+ type BrowserRenderingConnect<RawBinding, Browser, ConnectOptions = unknown> = (binding: RawBinding, options?: ConnectOptions) => Promise<Browser>;
195
+ interface BrowserRenderingBrowserLike<Page = BrowserRenderingPageLike> {
196
+ readonly newPage: () => Promise<Page>;
197
+ readonly close?: () => Promise<void>;
198
+ readonly disconnect?: () => void;
199
+ readonly version?: () => Promise<string>;
200
+ }
201
+ interface BrowserRenderingPageLike {
202
+ readonly goto?: (url: string, options?: unknown) => Promise<unknown>;
203
+ readonly setContent?: (html: string, options?: unknown) => Promise<void>;
204
+ readonly content?: () => Promise<string>;
205
+ readonly screenshot?: (options?: unknown) => Promise<Uint8Array | string>;
206
+ readonly pdf?: (options?: unknown) => Promise<Uint8Array>;
207
+ readonly evaluate?: (pageFunction: unknown, ...args: ReadonlyArray<unknown>) => Promise<unknown>;
208
+ readonly close?: (options?: unknown) => Promise<void>;
209
+ }
210
+ interface BrowserRenderingPageClient<Page extends BrowserRenderingPageLike> {
211
+ readonly raw: Page;
212
+ readonly goto: (url: string, options?: Parameters<NonNullable<Page["goto"]>>[1]) => Effect.Effect<Awaited<ReturnType<NonNullable<Page["goto"]>>>, BrowserRenderingOperationError>;
213
+ readonly setContent: (html: string, options?: Parameters<NonNullable<Page["setContent"]>>[1]) => Effect.Effect<void, BrowserRenderingOperationError>;
214
+ readonly content: Effect.Effect<string, BrowserRenderingOperationError>;
215
+ readonly screenshot: <A = Uint8Array | string>(options?: Parameters<NonNullable<Page["screenshot"]>>[0]) => Effect.Effect<A, BrowserRenderingOperationError>;
216
+ readonly pdf: <A = Uint8Array>(options?: Parameters<NonNullable<Page["pdf"]>>[0]) => Effect.Effect<A, BrowserRenderingOperationError>;
217
+ readonly evaluate: <A = unknown>(pageFunction: Parameters<NonNullable<Page["evaluate"]>>[0], ...args: ReadonlyArray<unknown>) => Effect.Effect<A, BrowserRenderingOperationError>;
218
+ readonly close: (options?: Parameters<NonNullable<Page["close"]>>[0]) => Effect.Effect<void, BrowserRenderingOperationError>;
219
+ }
220
+ interface BrowserRenderingBrowserClient<Browser extends BrowserRenderingBrowserLike<Page>, Page extends BrowserRenderingPageLike> {
221
+ readonly raw: Browser;
222
+ readonly newPage: Effect.Effect<BrowserRenderingPageClient<Page>, BrowserRenderingOperationError>;
223
+ readonly version: Effect.Effect<string, BrowserRenderingOperationError>;
224
+ readonly close: Effect.Effect<void, BrowserRenderingOperationError>;
225
+ readonly disconnect: Effect.Effect<void, BrowserRenderingOperationError>;
226
+ }
227
+ interface BrowserRenderingClient<RawBinding extends BrowserRenderingBinding = BrowserRenderingBinding> {
228
+ readonly launchWith: <Browser extends BrowserRenderingBrowserLike<Page>, Page extends BrowserRenderingPageLike = BrowserRenderingPageLike, LaunchOptions = unknown>(launch: BrowserRenderingLaunch<RawBinding, Browser, LaunchOptions>, options?: LaunchOptions) => Effect.Effect<BrowserRenderingBrowserClient<Browser, Page>, BrowserRenderingOperationError>;
229
+ readonly connectWith: <Browser extends BrowserRenderingBrowserLike<Page>, Page extends BrowserRenderingPageLike = BrowserRenderingPageLike, ConnectOptions = unknown>(connect: BrowserRenderingConnect<RawBinding, Browser, ConnectOptions>, options?: ConnectOptions) => Effect.Effect<BrowserRenderingBrowserClient<Browser, Page>, BrowserRenderingOperationError>;
230
+ readonly unsafeRaw: Effect.Effect<RawBinding>;
231
+ readonly definition: BrowserRenderingDefinition;
232
+ }
233
+ declare const BrowserRenderingServiceTypeId: unique symbol;
234
+ /** Nominal service marker for Browser Rendering services created with {@link make}. */
235
+ interface BrowserRenderingService<Id extends string> {
236
+ readonly [BrowserRenderingServiceTypeId]: {
237
+ readonly id: Id;
238
+ };
239
+ }
240
+ type LayerOptions$14 = {
241
+ readonly binding: string;
242
+ };
243
+ interface TagClass$12<Self, Id extends string> extends Context.ServiceClass<Self, Id, BrowserRenderingClient> {
244
+ readonly id: Id;
245
+ readonly layer: (options: LayerOptions$14) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
246
+ }
247
+ declare const isBrowserRenderingBinding: (value: unknown) => value is BrowserRenderingBinding;
248
+ declare const makeClient$8: <RawBinding extends BrowserRenderingBinding = BrowserRenderingBinding>(definition: BrowserRenderingDefinition) => (binding: RawBinding) => BrowserRenderingClient<RawBinding>;
249
+ declare const layer$11: <Self>(tag: Context.Service<Self, BrowserRenderingClient>, definition: BrowserRenderingDefinition) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
250
+ declare const make$12: <Id extends string>(id: Id) => TagClass$12<BrowserRenderingService<Id>, Id>;
251
+ declare const Tag$13: <Self>() => <Id extends string>(id: Id) => TagClass$12<Self, Id>;
20
252
  declare namespace DurableObjectStorage_d_exports {
21
253
  export { DurableObjectStorage, DurableObjectTransaction, SchemaBackedSyncKvStorage, SqlCursor, SqlStorage, SqlStorageValue, StorageOperationError, SyncKvDefinition, SyncKvStorage, fromDurableObjectStorage };
22
254
  }
@@ -319,121 +551,55 @@ declare class DurableObjectState extends DurableObjectState_base {}
319
551
  */
320
552
  declare const fromDurableObjectState: (state: globalThis.DurableObjectState) => DurableObjectStateService;
321
553
  declare namespace CloudflareOtlp_d_exports {
322
- export { CloudflareOtlpSettings, DurableObjectResourceOptions, LayerOptions$12 as LayerOptions, ResourceOptions, Serialization, Settings, Signal, WorkerResourceOptions, durableObjectLayer, layer$9 as layer, layerJson, layerProtobuf, settingsConfig, settingsLayer, workerLayer };
554
+ export { DurableObjectLayerOptions, LayerOptions$13 as LayerOptions, ResourceOptions, Serialization, Signal, WorkerLayerOptions, durableObjectLayer, layer$10 as layer, layerJson, layerProtobuf, workerLayer };
323
555
  }
324
556
  /** Telemetry signal groups supported by the Cloudflare OTLP layers. */
325
557
  type Signal = "logs" | "traces" | "metrics";
326
558
  /** OTLP payload serialization used by the Effect OTLP exporters. */
327
559
  type Serialization = "json" | "protobuf";
328
- /**
329
- * Resolved OpenTelemetry settings used by the Cloudflare OTLP layers.
330
- *
331
- * The default {@link settingsLayer} reads the standard OpenTelemetry
332
- * environment variable names from `WorkerEnvironment`. Applications that use
333
- * different binding names can provide {@link CloudflareOtlpSettings} directly
334
- * with a custom layer.
335
- */
336
- interface Settings {
337
- /** Generic OTLP base endpoint, read from `OTEL_EXPORTER_OTLP_ENDPOINT`. */
338
- readonly endpoint: Option.Option<string>;
339
- /** Logs-specific OTLP endpoint, read from `OTEL_EXPORTER_OTLP_LOGS_ENDPOINT`. */
340
- readonly logsEndpoint: Option.Option<string>;
341
- /** Traces-specific OTLP endpoint, read from `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT`. */
342
- readonly tracesEndpoint: Option.Option<string>;
343
- /** Metrics-specific OTLP endpoint, read from `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT`. */
344
- readonly metricsEndpoint: Option.Option<string>;
345
- /** Comma-separated OTLP headers, read from `OTEL_EXPORTER_OTLP_HEADERS`. */
346
- readonly headers: Option.Option<string>;
347
- /** Logs-specific OTLP headers, read from `OTEL_EXPORTER_OTLP_LOGS_HEADERS`. */
348
- readonly logsHeaders: Option.Option<string>;
349
- /** Traces-specific OTLP headers, read from `OTEL_EXPORTER_OTLP_TRACES_HEADERS`. */
350
- readonly tracesHeaders: Option.Option<string>;
351
- /** Metrics-specific OTLP headers, read from `OTEL_EXPORTER_OTLP_METRICS_HEADERS`. */
352
- readonly metricsHeaders: Option.Option<string>;
353
- /** Service name, read from `OTEL_SERVICE_NAME`. */
354
- readonly serviceName: Option.Option<string>;
355
- /** Service version, read from the effect-cf convenience alias `OTEL_SERVICE_VERSION`. */
356
- readonly serviceVersion: Option.Option<string>;
357
- /** Resource attributes, read from `OTEL_RESOURCE_ATTRIBUTES`. */
358
- readonly resourceAttributes: Option.Option<Record<string, string>>;
359
- }
360
- /**
361
- * Supported OpenTelemetry environment configuration for Cloudflare OTLP export.
362
- *
363
- * This config intentionally uses the conventional `OTEL_*` variable names so
364
- * deployments can share the same settings used by other OpenTelemetry SDKs.
365
- * It covers the OTLP HTTP settings supported by the Effect OTLP layers:
366
- *
367
- * - `OTEL_EXPORTER_OTLP_ENDPOINT`
368
- * - `OTEL_EXPORTER_OTLP_LOGS_ENDPOINT`
369
- * - `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT`
370
- * - `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT`
371
- * - `OTEL_EXPORTER_OTLP_HEADERS`
372
- * - `OTEL_EXPORTER_OTLP_LOGS_HEADERS`
373
- * - `OTEL_EXPORTER_OTLP_TRACES_HEADERS`
374
- * - `OTEL_EXPORTER_OTLP_METRICS_HEADERS`
375
- * - `OTEL_SERVICE_NAME`
376
- * - `OTEL_RESOURCE_ATTRIBUTES`
377
- *
378
- * `OTEL_SERVICE_VERSION` is also accepted as an effect-cf convenience alias.
379
- * The standard OpenTelemetry way to configure service version is
380
- * `OTEL_RESOURCE_ATTRIBUTES=service.version=...`.
381
- *
382
- * Consumers with non-standard binding names should map those names into
383
- * {@link CloudflareOtlpSettings} rather than changing this config globally.
384
- */
385
- declare const settingsConfig: Config.Config<{
386
- endpoint: Option.Option<string>;
387
- logsEndpoint: Option.Option<string>;
388
- tracesEndpoint: Option.Option<string>;
389
- metricsEndpoint: Option.Option<string>;
390
- headers: Option.Option<string>;
391
- logsHeaders: Option.Option<string>;
392
- tracesHeaders: Option.Option<string>;
393
- metricsHeaders: Option.Option<string>;
394
- serviceName: Option.Option<string>;
395
- serviceVersion: Option.Option<string>;
396
- resourceAttributes: Option.Option<{
397
- readonly [x: string]: string;
398
- }>;
399
- }>;
400
- declare const CloudflareOtlpSettings_base: Context.ServiceClass<CloudflareOtlpSettings, "effect-cf/CloudflareOtlpSettings", Settings>;
401
- /**
402
- * Service carrying already-resolved Cloudflare OTLP settings.
403
- *
404
- * Provide this service directly when an application needs to map custom
405
- * Cloudflare binding names, compute settings dynamically, or override settings
406
- * in tests. When this service is present, the OTLP layers use it instead of
407
- * reading {@link settingsConfig}.
408
- *
409
- * @example
410
- * ```ts
411
- * const CustomOtlpSettings = Layer.effect(
412
- * CloudflareOtlp.CloudflareOtlpSettings,
413
- * Config.all({
414
- * ...CloudflareOtlp.settingsConfig,
415
- * endpoint: Config.string("MY_OTLP_ENDPOINT").pipe(Config.option),
416
- * }),
417
- * ).pipe(Layer.provide(WorkerConfig.layer));
418
- * ```
419
- */
420
- declare class CloudflareOtlpSettings extends CloudflareOtlpSettings_base {}
421
560
  /** Resource metadata shared by Worker and Durable Object OTLP layers. */
422
561
  interface ResourceOptions {
423
- /** Explicit service name. Overrides `OTEL_SERVICE_NAME` when provided. */
562
+ /** Explicit service name. OTEL resource environment variables take precedence. */
424
563
  readonly serviceName?: string;
425
- /** Explicit service version. Overrides `OTEL_SERVICE_VERSION` when provided. */
564
+ /** Explicit service version. OTEL resource environment variables take precedence. */
426
565
  readonly serviceVersion?: string;
427
- /** Additional resource attributes attached to all exported telemetry. */
566
+ /** Additional resource attributes attached to exported telemetry. */
428
567
  readonly attributes?: Record<string, unknown>;
429
568
  }
569
+ /** Options shared by all Cloudflare OTLP telemetry layers. */
570
+ interface LayerOptions$13 {
571
+ /**
572
+ * Telemetry signals to export. Defaults to logs, traces, and metrics.
573
+ *
574
+ * Each selected signal is still controlled by standard OTEL exporter config,
575
+ * such as `OTEL_TRACES_EXPORTER=otlp`.
576
+ */
577
+ readonly signals?: ReadonlyArray<Signal>;
578
+ /** OTLP payload serialization. Defaults to protobuf. */
579
+ readonly serialization?: Serialization;
580
+ /** Resource metadata forwarded to Effect's OTLP resource resolver. */
581
+ readonly resource?: ResourceOptions;
582
+ /**
583
+ * Explicit headers for every selected signal.
584
+ *
585
+ * When omitted, Effect reads `OTEL_EXPORTER_OTLP_HEADERS` and the
586
+ * signal-specific `OTEL_EXPORTER_OTLP_*_HEADERS` variables.
587
+ */
588
+ readonly headers?: Headers$1.Input;
589
+ /** Exclude log records emitted for spans when exporting logs. */
590
+ readonly loggerExcludeLogSpans?: boolean;
591
+ /** Merge the OTLP logger with existing loggers instead of replacing them. */
592
+ readonly loggerMergeWithExisting?: boolean;
593
+ /** Custom trace context lookup used by the Effect OTLP tracer. */
594
+ readonly tracerContext?: <X>(primitive: Tracer.EffectPrimitive<X>, span: Tracer.AnySpan) => X;
595
+ }
430
596
  /** Resource metadata specific to Cloudflare Workers. */
431
- interface WorkerResourceOptions extends ResourceOptions {
597
+ interface WorkerLayerOptions extends LayerOptions$13 {
432
598
  /** Cloudflare Worker name to attach as `cloudflare.worker.name`. */
433
599
  readonly workerName?: string;
434
600
  }
435
601
  /** Resource metadata specific to Cloudflare Durable Objects. */
436
- interface DurableObjectResourceOptions extends ResourceOptions {
602
+ interface DurableObjectLayerOptions extends LayerOptions$13 {
437
603
  /** Durable Object class name to attach as `cloudflare.durable_object.class`. */
438
604
  readonly className?: string;
439
605
  /**
@@ -443,64 +609,26 @@ interface DurableObjectResourceOptions extends ResourceOptions {
443
609
  */
444
610
  readonly includeObjectId?: boolean;
445
611
  }
446
- /** Options shared by all Cloudflare OTLP telemetry layers. */
447
- interface LayerOptions$12 extends ResourceOptions {
448
- /** Telemetry signals to export. Defaults to logs, traces, and metrics. */
449
- readonly signals?: ReadonlyArray<Signal>;
450
- /** OTLP payload serialization. Defaults to protobuf. */
451
- readonly serialization?: Serialization;
452
- /** Maximum batch size for log and trace exporters. */
453
- readonly maxBatchSize?: number;
454
- /** Maximum time to wait for exporter shutdown/flush when a scope closes. */
455
- readonly shutdownTimeout?: Duration$1.Input;
456
- /** Export interval for the logs exporter. */
457
- readonly loggerExportInterval?: Duration$1.Input;
458
- /** Exclude log records emitted for spans when exporting logs. */
459
- readonly loggerExcludeLogSpans?: boolean;
460
- /** Merge the OTLP logger with existing loggers instead of replacing them. */
461
- readonly loggerMergeWithExisting?: boolean;
462
- /** Export interval for the traces exporter. */
463
- readonly tracerExportInterval?: Duration$1.Input;
464
- /** Custom trace context lookup used by the Effect OTLP tracer. */
465
- readonly tracerContext?: <X>(primitive: Tracer.EffectPrimitive<X>, span: Tracer.AnySpan) => X;
466
- /** Export interval for the metrics exporter. */
467
- readonly metricsExportInterval?: Duration$1.Input;
468
- /** Aggregation temporality for exported metrics. */
469
- readonly metricsTemporality?: OtlpMetrics.AggregationTemporality;
470
- }
471
- /**
472
- * Layer that reads standard OpenTelemetry settings from the current Cloudflare
473
- * `env` object.
474
- *
475
- * The layer depends on {@link WorkerEnvironment} and installs a
476
- * Cloudflare-backed Effect `ConfigProvider`, so `settingsConfig` reads from
477
- * Worker vars/secrets instead of Node process environment variables.
478
- */
479
- declare const settingsLayer: Layer.Layer<CloudflareOtlpSettings, Config.ConfigError, WorkerEnvironment>;
480
612
  /**
481
613
  * Base OTLP telemetry layer for Cloudflare-compatible runtimes.
482
614
  *
483
- * The layer reads {@link CloudflareOtlpSettings} when provided. Otherwise it
484
- * reads standard OpenTelemetry config from `WorkerEnvironment` when available,
485
- * then falls back to the ambient Effect `ConfigProvider`.
486
- *
487
- * When only `OTEL_EXPORTER_OTLP_ENDPOINT` is configured, per-signal paths are
488
- * derived by appending `/v1/logs`, `/v1/traces`, and `/v1/metrics`. Signal
489
- * specific endpoints are used as-is, matching the OpenTelemetry OTLP exporter
490
- * convention.
615
+ * Standard OpenTelemetry environment variables are resolved by Effect's OTLP
616
+ * layers. In Cloudflare Workers and Durable Objects, the current `env` object is
617
+ * installed as the primary `ConfigProvider`; outside Cloudflare, the ambient
618
+ * Effect `ConfigProvider` remains the fallback.
491
619
  */
492
- declare const layer$9: (options?: LayerOptions$12) => Layer.Layer<never, never, never>;
620
+ declare const layer$10: (options?: LayerOptions$13) => Layer.Layer<never, never, never>;
493
621
  /** Base OTLP telemetry layer forced to JSON serialization. */
494
- declare const layerJson: (options?: Omit<LayerOptions$12, "serialization">) => Layer.Layer<never, never, never>;
622
+ declare const layerJson: (options?: Omit<LayerOptions$13, "serialization">) => Layer.Layer<never, never, never>;
495
623
  /** Base OTLP telemetry layer forced to protobuf serialization. */
496
- declare const layerProtobuf: (options?: Omit<LayerOptions$12, "serialization">) => Layer.Layer<never, never, never>;
624
+ declare const layerProtobuf: (options?: Omit<LayerOptions$13, "serialization">) => Layer.Layer<never, never, never>;
497
625
  /**
498
626
  * OTLP layer with Cloudflare Worker resource attributes.
499
627
  *
500
628
  * Provide this layer at runtime scope for long-lived metrics aggregation, or at
501
629
  * handler scope when traces/logs should flush as the Cloudflare event finishes.
502
630
  */
503
- declare const workerLayer: (options?: LayerOptions$12 & WorkerResourceOptions) => Layer.Layer<never, never, never>;
631
+ declare const workerLayer: (options?: WorkerLayerOptions) => Layer.Layer<never, never, never>;
504
632
  /**
505
633
  * OTLP layer with Cloudflare Durable Object resource attributes.
506
634
  *
@@ -508,9 +636,9 @@ declare const workerLayer: (options?: LayerOptions$12 & WorkerResourceOptions) =
508
636
  * Durable Object id. Prefer leaving `includeObjectId` disabled unless the
509
637
  * backend can tolerate high-cardinality resource attributes.
510
638
  */
511
- declare const durableObjectLayer: (options?: LayerOptions$12 & DurableObjectResourceOptions) => Layer.Layer<never, never, DurableObjectState>;
639
+ declare const durableObjectLayer: (options?: DurableObjectLayerOptions) => Layer.Layer<never, never, DurableObjectState>;
512
640
  declare namespace D1_d_exports {
513
- export { D1Definition, D1Service, D1SqlLayerOptions, Service$1 as Service, make$10 as make };
641
+ export { D1Definition, D1Service, D1SqlLayerOptions, Service$1 as Service, make$11 as make };
514
642
  }
515
643
  /** Typed D1 binding definition. */
516
644
  interface D1Definition {
@@ -529,7 +657,7 @@ interface D1Service<Id extends string> {
529
657
  /**
530
658
  * Creates a typed D1 service tag plus Effect helpers.
531
659
  */
532
- declare const make$10: <Id extends string>(id: Id, definition: D1Definition) => BindingService<D1Service<Id>, Id, D1Database> & {
660
+ declare const make$11: <Id extends string>(id: Id, definition: D1Definition) => BindingService<D1Service<Id>, Id, D1Database> & {
533
661
  "effect-cf/D1": "effect-cf/D1";
534
662
  definition: D1Definition;
535
663
  sqlLayer: (options?: D1SqlLayerOptions) => Layer.Layer<D1Client.D1Client | _$effect_unstable_sql_SqlClient0.SqlClient, BindingNotFoundError | BindingValidationError | _$effect_Config0.ConfigError, WorkerEnvironment>;
@@ -579,7 +707,7 @@ declare const dispose: (value: unknown) => Effect.Effect<void>;
579
707
  declare const resolve: <A>(value: A) => Effect.Effect<Awaited<A>, unknown>;
580
708
  declare const scoped: <A>(value: A) => Effect.Effect<Awaited<A>, unknown, Scope.Scope>;
581
709
  declare namespace RpcDefinition_d_exports {
582
- export { Definition$9 as Definition, Method$5 as Method, Methods$4 as Methods, NoReservedMethods$4 as NoReservedMethods, ReservedMethodName$6 as ReservedMethodName, ReservedMethodNameError, RpcArgumentCountError, RpcArgumentDecodeError, RpcArgumentEncodeError, RpcReservedMethodNameError, RpcSuccessDecodeError, RpcSuccessEncodeError, ServiceFreeSchema$4 as ServiceFreeSchema, assertNoReservedMethodNames, assertNoReservedMethods, decodeArgs, decodeSuccess, encodeArgs, encodeSuccess, make$9 as make, method$4 as method, reservedMethodNames };
710
+ export { Definition$9 as Definition, Method$5 as Method, Methods$4 as Methods, NoReservedMethods$4 as NoReservedMethods, ReservedMethodName$6 as ReservedMethodName, ReservedMethodNameError, RpcArgumentCountError, RpcArgumentDecodeError, RpcArgumentEncodeError, RpcReservedMethodNameError, RpcSuccessDecodeError, RpcSuccessEncodeError, ServiceFreeSchema$4 as ServiceFreeSchema, assertNoReservedMethodNames, assertNoReservedMethods, decodeArgs, decodeSuccess, encodeArgs, encodeSuccess, make$10 as make, method$4 as method, reservedMethodNames };
583
711
  }
584
712
  declare const RpcReservedMethodNameError_base: new <A extends Record<string, any> = {}>(args: _$effect_Types0.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => _$effect_Cause0.YieldableError & {
585
713
  readonly _tag: "RpcReservedMethodNameError";
@@ -678,17 +806,17 @@ declare const decodeArgs: <const Self extends Definition$9.Any, MethodName exten
678
806
  declare const encodeArgs: <const Self extends Definition$9.Any, MethodName extends Definition$9.MethodNames<Self>>(definition: Self, methodName: MethodName, args: Method$5.Args<Self["methods"][MethodName]>) => Effect.Effect<Method$5.EncodedArgs<Self["methods"][MethodName]>, RpcArgumentCountError | RpcArgumentEncodeError>;
679
807
  declare const encodeSuccess: <const Self extends Definition$9.Any, MethodName extends Definition$9.MethodNames<Self>>(definition: Self, methodName: MethodName, value: Method$5.Success<Self["methods"][MethodName]>) => Effect.Effect<Method$5.EncodedSuccess<Self["methods"][MethodName]>, RpcSuccessEncodeError>;
680
808
  declare const decodeSuccess: <const Self extends Definition$9.Any, MethodName extends Definition$9.MethodNames<Self>>(definition: Self, methodName: MethodName, value: unknown) => Effect.Effect<Method$5.Success<Self["methods"][MethodName]>, RpcSuccessDecodeError>;
681
- declare const make$9: <Id extends string, const MethodsShape extends Methods$4>(id: Id, methods: MethodsShape) => Definition$9<Id, MethodsShape>;
809
+ declare const make$10: <Id extends string, const MethodsShape extends Methods$4>(id: Id, methods: MethodsShape) => Definition$9<Id, MethodsShape>;
682
810
  declare namespace QueueBinding_d_exports {
683
- export { MessageSendRequest, QueueBindingClient, QueueBindingDefinition, QueueMetrics, QueueOperationError, QueueProducer, QueueSendBatchOptions, QueueSendBatchResponse, QueueSendOptions, QueueSendResponse, isQueue, layer$8 as layer, makeClient$6 as makeClient };
684
- }
685
- type QueueSendOptions = globalThis.QueueSendOptions;
686
- type QueueSendResponse = globalThis.QueueSendResponse;
687
- type QueueSendBatchOptions = globalThis.QueueSendBatchOptions;
688
- type QueueSendBatchResponse = globalThis.QueueSendBatchResponse;
689
- type QueueMetrics = globalThis.QueueMetrics;
690
- type MessageSendRequest<Body> = globalThis.MessageSendRequest<Body>;
691
- type QueueProducer<Body> = Pick<globalThis.Queue<Body>, "send"> & Partial<Pick<globalThis.Queue<Body>, "sendBatch" | "metrics">>;
811
+ export { MessageSendRequest, QueueBindingClient, QueueBindingDefinition, QueueMetrics, QueueOperationError, QueueProducer, QueueSendBatchOptions, QueueSendBatchResponse, QueueSendOptions, QueueSendResponse, isQueue, layer$9 as layer, makeClient$7 as makeClient };
812
+ }
813
+ type QueueSendOptions = CloudflareQueueSendOptions;
814
+ type QueueSendResponse = CloudflareQueueSendResponse;
815
+ type QueueSendBatchOptions = CloudflareQueueSendBatchOptions;
816
+ type QueueSendBatchResponse = CloudflareQueueSendBatchResponse;
817
+ type QueueMetrics = CloudflareQueueMetrics;
818
+ type MessageSendRequest<Body> = CloudflareMessageSendRequest<Body>;
819
+ type QueueProducer<Body> = Pick<CloudflareQueue<Body>, "send"> & Partial<Pick<CloudflareQueue<Body>, "sendBatch" | "metrics">>;
692
820
  interface QueueBindingDefinition<Message extends ServiceFreeSchema$4> {
693
821
  /** Binding name as configured in `wrangler.jsonc`. */
694
822
  readonly binding: string;
@@ -699,7 +827,7 @@ interface QueueBindingClient<Message extends ServiceFreeSchema$4> {
699
827
  readonly send: (message: Schema.Schema.Type<Message>, options?: QueueSendOptions) => Effect.Effect<void, QueueOperationError | Schema.SchemaError>;
700
828
  readonly sendBatch: (messages: Iterable<MessageSendRequest<Schema.Schema.Type<Message>>>, options?: QueueSendBatchOptions) => Effect.Effect<void, QueueOperationError | Schema.SchemaError>;
701
829
  readonly metrics: () => Effect.Effect<QueueMetrics, QueueOperationError>;
702
- readonly unsafeRaw: Effect.Effect<globalThis.Queue<Schema.Codec.Encoded<Message>>>;
830
+ readonly unsafeRaw: Effect.Effect<CloudflareQueue<Schema.Codec.Encoded<Message>>>;
703
831
  }
704
832
  declare const QueueOperationError_base: new <A extends Record<string, any> = {}>(args: _$effect_Types0.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => _$effect_Cause0.YieldableError & {
705
833
  readonly _tag: "QueueOperationError";
@@ -711,10 +839,10 @@ declare class QueueOperationError extends QueueOperationError_base<{
711
839
  readonly message: string;
712
840
  }> {}
713
841
  declare const isQueue: <Body>(value: unknown) => value is QueueProducer<Body>;
714
- declare const makeClient$6: <Message extends ServiceFreeSchema$4>(definition: QueueBindingDefinition<Message>) => ((queue: QueueProducer<Schema.Codec.Encoded<Message>>) => QueueBindingClient<Message>);
715
- declare const layer$8: <Self, Message extends ServiceFreeSchema$4>(tag: Context.Service<Self, QueueBindingClient<Message>>, definition: QueueBindingDefinition<Message>) => _$effect_Layer0.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
842
+ declare const makeClient$7: <Message extends ServiceFreeSchema$4>(definition: QueueBindingDefinition<Message>) => ((queue: QueueProducer<Schema.Codec.Encoded<Message>>) => QueueBindingClient<Message>);
843
+ declare const layer$9: <Self, Message extends ServiceFreeSchema$4>(tag: Context.Service<Self, QueueBindingClient<Message>>, definition: QueueBindingDefinition<Message>) => _$effect_Layer0.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
716
844
  declare namespace QueueDefinition_d_exports {
717
- export { Definition$8 as Definition, Handler$3 as Handler, LayerOptions$11 as LayerOptions, Options$7 as Options, Queue$1 as Queue, Tag$11 as Tag, TagClass$10 as TagClass, implement$7 as implement, make$8 as make };
845
+ export { Definition$8 as Definition, Handler$3 as Handler, LayerOptions$12 as LayerOptions, Options$7 as Options, Queue$1 as Queue, Tag$12 as Tag, TagClass$11 as TagClass, implement$7 as implement, make$9 as make };
718
846
  }
719
847
  interface Definition$8<Id extends string = string, Message extends ServiceFreeSchema$4 = ServiceFreeSchema$4> {
720
848
  readonly id: Id;
@@ -728,31 +856,31 @@ interface Options$7<ROut, Self extends Definition$8.Any> extends Omit<WorkerOpti
728
856
  readonly queue: Handler$3<ROut, Self>;
729
857
  readonly rpc?: never;
730
858
  }
731
- type LayerOptions$11 = {
859
+ type LayerOptions$12 = {
732
860
  readonly binding: string;
733
861
  };
734
- interface TagClass$10<Self, Id extends string, Message extends ServiceFreeSchema$4> extends Context.ServiceClass<Self, Id, QueueBindingClient<Message>> {
862
+ interface TagClass$11<Self, Id extends string, Message extends ServiceFreeSchema$4> extends Context.ServiceClass<Self, Id, QueueBindingClient<Message>> {
735
863
  readonly id: Id;
736
864
  readonly message: Message;
737
865
  readonly make: <ROut, LayerError>(layer: Layer.Layer<ROut, LayerError, ExecutionContext | WorkerContext | WorkerEnvironment>, options: Options$7<ROut, Definition$8<Id, Message>>) => WorkerClass<Record<never, never>, ROut>;
738
- readonly layer: (options: LayerOptions$11) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
866
+ readonly layer: (options: LayerOptions$12) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
739
867
  readonly send: (message: Schema.Schema.Type<Message>, options?: QueueSendOptions) => Effect.Effect<void, QueueOperationError | Schema.SchemaError, Self>;
740
868
  readonly sendBatch: (messages: Iterable<MessageSendRequest<Schema.Schema.Type<Message>>>, options?: QueueSendBatchOptions) => Effect.Effect<void, QueueOperationError | Schema.SchemaError, Self>;
741
869
  readonly metrics: () => Effect.Effect<QueueMetrics, QueueOperationError, Self>;
742
870
  readonly unsafeRaw: () => Effect.Effect<globalThis.Queue<Schema.Codec.Encoded<Message>>, never, Self>;
743
871
  }
744
- declare const make$8: <Id extends string, Message extends ServiceFreeSchema$4>(id: Id, definition: {
872
+ declare const make$9: <Id extends string, Message extends ServiceFreeSchema$4>(id: Id, definition: {
745
873
  readonly message: Message;
746
- }) => TagClass$10<Definition$8<Id, Message>, Id, Message>;
747
- declare const Tag$11: <Self>() => <Id extends string, Message extends ServiceFreeSchema$4>(id: Id, definition: {
874
+ }) => TagClass$11<Definition$8<Id, Message>, Id, Message>;
875
+ declare const Tag$12: <Self>() => <Id extends string, Message extends ServiceFreeSchema$4>(id: Id, definition: {
748
876
  readonly message: Message;
749
- }) => TagClass$10<Self, Id, Message>;
877
+ }) => TagClass$11<Self, Id, Message>;
750
878
  declare const Queue$1: <Self>() => <Id extends string, Message extends ServiceFreeSchema$4>(id: Id, definition: {
751
879
  readonly message: Message;
752
- }) => TagClass$10<Self, Id, Message>;
880
+ }) => TagClass$11<Self, Id, Message>;
753
881
  declare const implement$7: <ROut, const Self extends Definition$8.Any>(_definition: Self, handler: Handler$3<ROut, Self>) => Handler$3<ROut, Self>;
754
882
  declare namespace Queue_d_exports {
755
- export { Definition$7 as Definition, Handler$2 as Handler, LayerOptions$10 as LayerOptions, Options$6 as Options, QueueBatch, QueueHandler, QueueMessage, QueueMessageDecodeError, QueueOptions, Tag$10 as Tag, TagClass$9 as TagClass, decodeBatch, fromMessage, fromMessageBatch, implement$6 as implement };
883
+ export { Definition$7 as Definition, Handler$2 as Handler, LayerOptions$11 as LayerOptions, Options$6 as Options, QueueBatch, QueueHandler, QueueMessage, QueueMessageDecodeError, QueueOptions, Tag$11 as Tag, TagClass$10 as TagClass, decodeBatch, fromMessage, fromMessageBatch, implement$6 as implement };
756
884
  }
757
885
  interface QueueMessage<Body> {
758
886
  readonly raw: globalThis.Message<unknown>;
@@ -801,16 +929,16 @@ type Definition$7<Id extends string = string, Message extends Definition$8.Any["
801
929
  declare namespace Definition$7 {
802
930
  type Any = Definition$8.Any;
803
931
  }
804
- type LayerOptions$10 = LayerOptions$11;
805
- type TagClass$9<Self, Id extends string, Message extends Definition$8.Any["message"]> = TagClass$10<Self, Id, Message>;
806
- declare const Tag$10: <Self>() => <Id extends string, Message extends Definition$8.Any["message"]>(id: Id, definition: {
932
+ type LayerOptions$11 = LayerOptions$12;
933
+ type TagClass$10<Self, Id extends string, Message extends Definition$8.Any["message"]> = TagClass$11<Self, Id, Message>;
934
+ declare const Tag$11: <Self>() => <Id extends string, Message extends Definition$8.Any["message"]>(id: Id, definition: {
807
935
  readonly message: Message;
808
- }) => TagClass$9<Self, Id, Message>;
936
+ }) => TagClass$10<Self, Id, Message>;
809
937
  declare const implement$6: <ROut, const Self extends Definition$8.Any>(_definition: Self, handler: Handler$3<ROut, Self>) => Handler$3<ROut, Self>;
810
938
  type Handler$2<ROut, Self extends Definition$8.Any> = Handler$3<ROut, Self>;
811
939
  type Options$6<ROut, Self extends Definition$8.Any> = Options$7<ROut, Self>;
812
940
  declare namespace WorkerDefinition_d_exports {
813
- export { Api$3 as Api, Definition$6 as Definition, HandlerEffect$3 as HandlerEffect, Handlers$3 as Handlers, LayerOptions$9 as LayerOptions, Method$4 as Method, Methods$3 as Methods, NoReservedMethods$3 as NoReservedMethods, Options$5 as Options, ReservedMethodName$5 as ReservedMethodName, ServerApi$4 as ServerApi, ServiceFreeSchema$3 as ServiceFreeSchema, Tag$9 as Tag, TagClass$8 as TagClass, Worker, implement$5 as implement, make$7 as make, method$3 as method };
941
+ export { Api$3 as Api, Definition$6 as Definition, HandlerEffect$3 as HandlerEffect, Handlers$3 as Handlers, LayerOptions$10 as LayerOptions, Method$4 as Method, Methods$3 as Methods, NoReservedMethods$3 as NoReservedMethods, Options$5 as Options, ReservedMethodName$5 as ReservedMethodName, ServerApi$4 as ServerApi, ServiceFreeSchema$3 as ServiceFreeSchema, Tag$10 as Tag, TagClass$9 as TagClass, Worker, implement$5 as implement, make$8 as make, method$3 as method };
814
942
  }
815
943
  type ServiceFreeSchema$3 = Schema.Codec<any, any, never, never>;
816
944
  interface Method$4<Args extends ReadonlyArray<ServiceFreeSchema$3> = ReadonlyArray<ServiceFreeSchema$3>, Success extends ServiceFreeSchema$3 = ServiceFreeSchema$3> {
@@ -858,14 +986,14 @@ type Handlers$3<ROut, Self extends Definition$6.Any> = { readonly [Key in keyof
858
986
  interface Options$5<ROut, Self extends Definition$6.Any, REvent = never, EventLayerError = never> extends Omit<WorkerOptions<ROut, REvent, EventLayerError, Handlers$3<ROut | REvent, Self>>, "rpc"> {
859
987
  readonly rpc: Handlers$3<ROut | REvent, Self>;
860
988
  }
861
- type LayerOptions$9 = {
989
+ type LayerOptions$10 = {
862
990
  readonly binding: string;
863
991
  };
864
- type TagClass$8<Self, Id extends string, MethodsShape extends Methods$3> = Context.ServiceClass<Self, Id, ServiceBindingEffectClient<Api$3<Definition$6<Id, MethodsShape>>, Definition$6<Id, MethodsShape>>> & ServiceBindingStaticClient<Self, Api$3<Definition$6<Id, MethodsShape>>, Definition$6<Id, MethodsShape>> & {
992
+ type TagClass$9<Self, Id extends string, MethodsShape extends Methods$3> = Context.ServiceClass<Self, Id, ServiceBindingEffectClient<Api$3<Definition$6<Id, MethodsShape>>, Definition$6<Id, MethodsShape>>> & ServiceBindingStaticClient<Self, Api$3<Definition$6<Id, MethodsShape>>, Definition$6<Id, MethodsShape>> & {
865
993
  readonly id: Id;
866
994
  readonly methods: MethodsShape;
867
995
  readonly make: <ROut, LayerError, REvent = never, EventLayerError = never>(layer: Layer.Layer<ROut, LayerError, ExecutionContext | WorkerContext | WorkerEnvironment>, options: Options$5<ROut, Definition$6<Id, MethodsShape>, REvent, EventLayerError>) => WorkerClass<Handlers$3<ROut | REvent, Definition$6<Id, MethodsShape>>, ROut | REvent>;
868
- readonly layer: (options: LayerOptions$9) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
996
+ readonly layer: (options: LayerOptions$10) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
869
997
  };
870
998
  /**
871
999
  * Defines a single RPC method schema in a worker definition.
@@ -879,9 +1007,9 @@ declare const method$3: {
879
1007
  readonly success: Success;
880
1008
  }): Method$4<Args, Success>;
881
1009
  };
882
- declare const make$7: <Id extends string, const MethodsShape extends Methods$3>(id: Id, methods: MethodsShape & NoReservedMethods$3<MethodsShape>) => TagClass$8<Definition$6<Id, MethodsShape>, Id, MethodsShape>;
883
- declare const Tag$9: <Self>() => <Id extends string, const MethodsShape extends Methods$3>(id: Id, methods: MethodsShape & NoReservedMethods$3<MethodsShape>) => TagClass$8<Self, Id, MethodsShape>;
884
- declare const Worker: <Self>() => <Id extends string, const MethodsShape extends Methods$3>(id: Id, methods: MethodsShape & NoReservedMethods$3<MethodsShape>) => TagClass$8<Self, Id, MethodsShape>;
1010
+ declare const make$8: <Id extends string, const MethodsShape extends Methods$3>(id: Id, methods: MethodsShape & NoReservedMethods$3<MethodsShape>) => TagClass$9<Definition$6<Id, MethodsShape>, Id, MethodsShape>;
1011
+ declare const Tag$10: <Self>() => <Id extends string, const MethodsShape extends Methods$3>(id: Id, methods: MethodsShape & NoReservedMethods$3<MethodsShape>) => TagClass$9<Self, Id, MethodsShape>;
1012
+ declare const Worker: <Self>() => <Id extends string, const MethodsShape extends Methods$3>(id: Id, methods: MethodsShape & NoReservedMethods$3<MethodsShape>) => TagClass$9<Self, Id, MethodsShape>;
885
1013
  /**
886
1014
  * Helper for implementing handlers with the exact method shape of a definition.
887
1015
  */
@@ -898,7 +1026,7 @@ type AsyncMethodArgs<Api, Method extends keyof Api> = Api[Method] extends ((...a
898
1026
  type AsyncMethodSuccess<Api, Method extends keyof Api> = Api[Method] extends ((...args: AnyArgs) => Promise<infer A>) ? A : never;
899
1027
  type AsyncMethodCloudflareReturn<Api, Method extends keyof Api> = Result<AsyncMethodSuccess<Api, Method>>;
900
1028
  declare namespace ServiceBinding_d_exports {
901
- export { Service, ServiceBindingClient, ServiceBindingDefinition, ServiceBindingEffectClient, ServiceBindingFetchError, ServiceBindingRpcError, ServiceBindingStaticClient, ServiceFetcher, isServiceBindingClient, layer$7 as layer, makeClient$5 as makeClient, makeDirectMethods$1 as makeDirectMethods };
1029
+ export { Service, ServiceBindingClient, ServiceBindingDefinition, ServiceBindingEffectClient, ServiceBindingFetchError, ServiceBindingRpcError, ServiceBindingStaticClient, ServiceFetcher, isServiceBindingClient, layer$8 as layer, makeClient$6 as makeClient, makeDirectMethods$1 as makeDirectMethods };
902
1030
  }
903
1031
  declare const TypeId$1: "effect-cf/ServiceBinding";
904
1032
  /**
@@ -1044,8 +1172,8 @@ type ServiceBindingStaticClient<R, Api extends object, Definition extends Defini
1044
1172
  readonly scopedCall: <Method extends ServiceMethodKey<Api>>(method: Method, ...args: ServiceMethodArgs<Api, Method>) => Effect.Effect<Awaited<ServiceMethodSuccess<Api, Method>>, unknown, Scope.Scope | R>;
1045
1173
  };
1046
1174
  declare const isServiceBindingClient: <Api extends object>(value: unknown) => value is ServiceBindingClient<Api>;
1047
- declare const makeClient$5: <Api extends object, const Definition extends Definition$6.Any | undefined = undefined>(definition: ServiceBindingDefinition<Definition>) => ((service: ServiceBindingClient<Api>) => ServiceBindingEffectClient<Api, Definition>);
1048
- declare const layer$7: <Self, Api extends object, const Definition extends Definition$6.Any | undefined = undefined>(tag: Context.Service<Self, ServiceBindingEffectClient<Api, Definition>>, definition: ServiceBindingDefinition<Definition>) => _$effect_Layer0.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
1175
+ declare const makeClient$6: <Api extends object, const Definition extends Definition$6.Any | undefined = undefined>(definition: ServiceBindingDefinition<Definition>) => ((service: ServiceBindingClient<Api>) => ServiceBindingEffectClient<Api, Definition>);
1176
+ declare const layer$8: <Self, Api extends object, const Definition extends Definition$6.Any | undefined = undefined>(tag: Context.Service<Self, ServiceBindingEffectClient<Api, Definition>>, definition: ServiceBindingDefinition<Definition>) => _$effect_Layer0.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
1049
1177
  /**
1050
1178
  * Creates a typed Effect service for a Worker service binding.
1051
1179
  *
@@ -1085,7 +1213,7 @@ declare const Service: <Self, Api extends object = never>() => <Id extends strin
1085
1213
  };
1086
1214
  declare const makeDirectMethods$1: <R, Api, Definition extends Definition$6.Any | undefined>(rpcDefinition: Definition | undefined, call: ServiceCall<R, Api>) => DirectMethods$1<R, Definition>;
1087
1215
  declare namespace Worker_d_exports {
1088
- export { Api$2 as Api, Definition$5 as Definition, ExecutionContext, FetchHandler, FetchWorkerOptions, HandlerEffect$2 as HandlerEffect, Handlers$2 as Handlers, LayerOptions$8 as LayerOptions, Method$3 as Method, Methods$2 as Methods, NativeRequest, NoReservedMethods$2 as NoReservedMethods, Options$4 as Options, ReservedMethodName$3 as ReservedMethodName, RpcHandlers$1 as RpcHandlers, ServerApi$3 as ServerApi, ServiceFreeSchema$2 as ServiceFreeSchema, Tag$8 as Tag, TagClass$7 as TagClass, TagFactory$1 as TagFactory, WorkerClass, WorkerContext, WorkerContextService, WorkerContextWaitUntilOptions, WorkerFetchSuccess, WorkerHandler, WorkerOptions, WorkerRpc, WorkerRpcHandler, WorkerRpcShape, implement$4 as implement, isWebSocketUpgrade, make$6 as make, makeFetchHandler, method$2 as method, renderHttpResponse };
1216
+ export { Api$2 as Api, Definition$5 as Definition, ExecutionContext, FetchHandler, FetchWorkerOptions, HandlerEffect$2 as HandlerEffect, Handlers$2 as Handlers, LayerOptions$9 as LayerOptions, Method$3 as Method, Methods$2 as Methods, NativeRequest, NoReservedMethods$2 as NoReservedMethods, Options$4 as Options, ReservedMethodName$3 as ReservedMethodName, RpcHandlers$1 as RpcHandlers, ServerApi$3 as ServerApi, ServiceFreeSchema$2 as ServiceFreeSchema, Tag$9 as Tag, TagClass$8 as TagClass, TagFactory$1 as TagFactory, WorkerClass, WorkerContext, WorkerContextService, WorkerContextWaitUntilOptions, WorkerFetchSuccess, WorkerHandler, WorkerOptions, WorkerRpc, WorkerRpcHandler, WorkerRpcShape, implement$4 as implement, isWebSocketUpgrade, make$7 as make, makeFetchHandler, method$2 as method, renderHttpResponse };
1089
1217
  }
1090
1218
  declare const ExecutionContext_base: Context.ServiceClass<ExecutionContext, "effect-cf/ExecutionContext", globalThis.ExecutionContext<unknown>>;
1091
1219
  declare class ExecutionContext extends ExecutionContext_base {}
@@ -1138,8 +1266,8 @@ interface FetchHandler<Env extends WorkerEnv = WorkerEnv> {
1138
1266
  readonly fetch: (request: Request, env: Env, ctx: globalThis.ExecutionContext) => Promise<Response>;
1139
1267
  }
1140
1268
  declare const renderHttpResponse: <A extends HttpServerResponse.HttpServerResponse, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<Response, E, R>;
1141
- declare function make$6<ROut, LayerError>(layer: Layer.Layer<ROut, LayerError, ExecutionContext | WorkerContext | WorkerEnvironment>, fetch: WorkerHandler<ROut>): WorkerClass<Record<never, never>, ROut>;
1142
- declare function make$6<ROut, LayerError, REvent = never, EventLayerError = never, const Rpc extends WorkerRpc<ROut | REvent> = Record<never, never>>(layer: Layer.Layer<ROut, LayerError, ExecutionContext | WorkerContext | WorkerEnvironment>, options: WorkerOptions<ROut, REvent, EventLayerError, Rpc>): WorkerClass<Rpc, ROut | REvent>;
1269
+ declare function make$7<ROut, LayerError>(layer: Layer.Layer<ROut, LayerError, ExecutionContext | WorkerContext | WorkerEnvironment>, fetch: WorkerHandler<ROut>): WorkerClass<Record<never, never>, ROut>;
1270
+ declare function make$7<ROut, LayerError, REvent = never, EventLayerError = never, const Rpc extends WorkerRpc<ROut | REvent> = Record<never, never>>(layer: Layer.Layer<ROut, LayerError, ExecutionContext | WorkerContext | WorkerEnvironment>, options: WorkerOptions<ROut, REvent, EventLayerError, Rpc>): WorkerClass<Rpc, ROut | REvent>;
1143
1271
  declare const makeFetchHandler: <ROut, LayerError, REvent = never, EventLayerError = never, Env extends WorkerEnv = WorkerEnv>(layer: Layer.Layer<ROut, LayerError, ExecutionContext | WorkerContext | WorkerEnvironment>, options: FetchWorkerOptions<ROut, REvent, EventLayerError>) => FetchHandler<Env>;
1144
1272
  type ServiceFreeSchema$2 = Schema.Codec<any, any, never, never>;
1145
1273
  interface Method$3<Args extends ReadonlyArray<ServiceFreeSchema$2> = ReadonlyArray<ServiceFreeSchema$2>, Success extends ServiceFreeSchema$2 = ServiceFreeSchema$2> {
@@ -1168,15 +1296,15 @@ type Handlers$2<ROut, Self extends Definition$5.Any> = { readonly [Key in keyof
1168
1296
  interface Options$4<ROut, Self extends Definition$5.Any, REvent = never, EventLayerError = never> extends Omit<WorkerOptions<ROut, REvent, EventLayerError, Handlers$2<ROut | REvent, Self>>, "rpc"> {
1169
1297
  readonly rpc: Handlers$2<ROut | REvent, Self>;
1170
1298
  }
1171
- type LayerOptions$8 = LayerOptions$9;
1172
- type TagClass$7<Self, Id extends string, MethodsShape extends Methods$2> = Context.ServiceClass<Self, Id, ServiceBindingEffectClient<Api$2<Definition$5<Id, MethodsShape>>, Definition$5<Id, MethodsShape>>> & ServiceBindingStaticClient<Self, Api$2<Definition$5<Id, MethodsShape>>, Definition$5<Id, MethodsShape>> & {
1299
+ type LayerOptions$9 = LayerOptions$10;
1300
+ type TagClass$8<Self, Id extends string, MethodsShape extends Methods$2> = Context.ServiceClass<Self, Id, ServiceBindingEffectClient<Api$2<Definition$5<Id, MethodsShape>>, Definition$5<Id, MethodsShape>>> & ServiceBindingStaticClient<Self, Api$2<Definition$5<Id, MethodsShape>>, Definition$5<Id, MethodsShape>> & {
1173
1301
  readonly id: Id;
1174
1302
  readonly methods: MethodsShape;
1175
1303
  readonly make: <ROut, LayerError, REvent = never, EventLayerError = never>(layer: Layer.Layer<ROut, LayerError, ExecutionContext | WorkerContext | WorkerEnvironment>, options: Options$4<ROut, Definition$5<Id, MethodsShape>, REvent, EventLayerError>) => WorkerClass<Handlers$2<ROut | REvent, Definition$5<Id, MethodsShape>>, ROut | REvent>;
1176
- readonly layer: (options: LayerOptions$8) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
1304
+ readonly layer: (options: LayerOptions$9) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
1177
1305
  };
1178
- type TagFactory$1 = <Self>() => <Id extends string, const MethodsShape extends Methods$2>(id: Id, methods: MethodsShape & NoReservedMethods$2<MethodsShape>) => TagClass$7<Self, Id, MethodsShape>;
1179
- declare const Tag$8: TagFactory$1;
1306
+ type TagFactory$1 = <Self>() => <Id extends string, const MethodsShape extends Methods$2>(id: Id, methods: MethodsShape & NoReservedMethods$2<MethodsShape>) => TagClass$8<Self, Id, MethodsShape>;
1307
+ declare const Tag$9: TagFactory$1;
1180
1308
  declare const method$2: {
1181
1309
  <Success extends ServiceFreeSchema$2>(definition: {
1182
1310
  readonly success: Success;
@@ -1189,7 +1317,7 @@ declare const method$2: {
1189
1317
  declare const implement$4: <ROut, const Self extends Definition$5.Any>(_definition: Self, handlers: Handlers$2<ROut, Self>) => Handlers$2<ROut, Self>;
1190
1318
  type HandlerEffect$2<ROut, Self extends Definition$5.Any, Key extends keyof Self["methods"]> = WorkerRpcHandler<ROut, Method$3.Success<Self["methods"][Key]>>;
1191
1319
  declare namespace DurableObjectNamespace_d_exports {
1192
- export { DurableObjectFetchError, DurableObjectNamespaceBindingDefinition, DurableObjectNamespaceClient, DurableObjectNamespaceDefinition, DurableObjectNamespaceEffectClient, DurableObjectNamespaceStaticClient, DurableObjectRpcError, DurableObjectStubClient, isDurableObjectNamespaceClient, layer$6 as layer, makeClient$4 as makeClient, makeDirectMethods };
1320
+ export { DurableObjectFetchError, DurableObjectNamespaceBindingDefinition, DurableObjectNamespaceClient, DurableObjectNamespaceDefinition, DurableObjectNamespaceEffectClient, DurableObjectNamespaceStaticClient, DurableObjectRpcError, DurableObjectStubClient, isDurableObjectNamespaceClient, layer$7 as layer, makeClient$5 as makeClient, makeDirectMethods };
1193
1321
  }
1194
1322
  interface DurableObjectFetcher {
1195
1323
  fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
@@ -1387,8 +1515,8 @@ type DurableObjectNamespaceStaticClient<R, Api extends object, Definition extend
1387
1515
  readonly unsafeRaw: () => Effect.Effect<DurableObjectNamespaceClient<Api>, never, R>;
1388
1516
  };
1389
1517
  declare const isDurableObjectNamespaceClient: <Api extends object>(value: unknown) => value is DurableObjectNamespaceClient<Api>;
1390
- declare const makeClient$4: <Api extends object, const Definition extends Definition$4.Any | undefined = undefined>(definition: DurableObjectNamespaceBindingDefinition<Definition>) => ((namespace: DurableObjectNamespaceClient<Api>) => DurableObjectNamespaceEffectClient<Api, Definition>);
1391
- declare const layer$6: <Self, Api extends object, const Definition extends Definition$4.Any | undefined = undefined>(tag: Context.Service<Self, DurableObjectNamespaceEffectClient<Api, Definition>>, definition: DurableObjectNamespaceBindingDefinition<Definition>) => _$effect_Layer0.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
1518
+ declare const makeClient$5: <Api extends object, const Definition extends Definition$4.Any | undefined = undefined>(definition: DurableObjectNamespaceBindingDefinition<Definition>) => ((namespace: DurableObjectNamespaceClient<Api>) => DurableObjectNamespaceEffectClient<Api, Definition>);
1519
+ declare const layer$7: <Self, Api extends object, const Definition extends Definition$4.Any | undefined = undefined>(tag: Context.Service<Self, DurableObjectNamespaceEffectClient<Api, Definition>>, definition: DurableObjectNamespaceBindingDefinition<Definition>) => _$effect_Layer0.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
1392
1520
  declare const makeDirectMethods: <R, Api extends object, Definition extends Definition$4.Any | undefined>(rpcDefinition: Definition | undefined, helpers: {
1393
1521
  readonly call: StubCall<R, Api>;
1394
1522
  readonly fetch: (stub: DurableObjectStubClient<Api>, input: RequestInfo | URL, init?: RequestInit) => Effect.Effect<globalThis.Response, DurableObjectFetchError, R>;
@@ -1396,7 +1524,7 @@ declare const makeDirectMethods: <R, Api extends object, Definition extends Defi
1396
1524
  readonly getByName: (name: string, options?: globalThis.DurableObjectNamespaceGetDurableObjectOptions) => Effect.Effect<DurableObjectStubClient<Api>, never, R>;
1397
1525
  }) => DirectMethods<R, Api, Definition>;
1398
1526
  declare namespace DurableObjectDefinition_d_exports {
1399
- export { Api$1 as Api, Definition$4 as Definition, DurableObject$1 as DurableObject, HandlerEffect$1 as HandlerEffect, Handlers$1 as Handlers, LayerOptions$7 as LayerOptions, Method$2 as Method, Methods$1 as Methods, NoReservedMethods$1 as NoReservedMethods, Options$3 as Options, ReservedMethodName$1 as ReservedMethodName, ServerApi$2 as ServerApi, ServiceFreeSchema$1 as ServiceFreeSchema, Tag$7 as Tag, TagClass$6 as TagClass, implement$3 as implement, make$5 as make, method$1 as method };
1527
+ export { Api$1 as Api, Definition$4 as Definition, DurableObject$1 as DurableObject, HandlerEffect$1 as HandlerEffect, Handlers$1 as Handlers, LayerOptions$8 as LayerOptions, Method$2 as Method, Methods$1 as Methods, NoReservedMethods$1 as NoReservedMethods, Options$3 as Options, ReservedMethodName$1 as ReservedMethodName, ServerApi$2 as ServerApi, ServiceFreeSchema$1 as ServiceFreeSchema, Tag$8 as Tag, TagClass$7 as TagClass, implement$3 as implement, make$6 as make, method$1 as method };
1400
1528
  }
1401
1529
  type ServiceFreeSchema$1 = Schema.Codec<any, any, never, never>;
1402
1530
  interface Method$2<Args extends ReadonlyArray<ServiceFreeSchema$1> = ReadonlyArray<ServiceFreeSchema$1>, Success extends ServiceFreeSchema$1 = ServiceFreeSchema$1> {
@@ -1441,14 +1569,14 @@ type Handlers$1<ROut, Self extends Definition$4.Any> = { readonly [Key in keyof
1441
1569
  interface Options$3<ROut, Self extends Definition$4.Any, REvent = never, EventLayerError = never> extends Omit<DurableObjectOptions<ROut, REvent, EventLayerError, Handlers$1<ROut | REvent, Self>>, "rpc"> {
1442
1570
  readonly rpc: Handlers$1<ROut | REvent, Self>;
1443
1571
  }
1444
- type LayerOptions$7 = {
1572
+ type LayerOptions$8 = {
1445
1573
  readonly binding: string;
1446
1574
  };
1447
- type TagClass$6<Self, Id extends string, MethodsShape extends Methods$1> = Context.ServiceClass<Self, Id, DurableObjectNamespaceEffectClient<Api$1<Definition$4<Id, MethodsShape>>, Definition$4<Id, MethodsShape>>> & DurableObjectNamespaceStaticClient<Self, Api$1<Definition$4<Id, MethodsShape>>, Definition$4<Id, MethodsShape>> & {
1575
+ type TagClass$7<Self, Id extends string, MethodsShape extends Methods$1> = Context.ServiceClass<Self, Id, DurableObjectNamespaceEffectClient<Api$1<Definition$4<Id, MethodsShape>>, Definition$4<Id, MethodsShape>>> & DurableObjectNamespaceStaticClient<Self, Api$1<Definition$4<Id, MethodsShape>>, Definition$4<Id, MethodsShape>> & {
1448
1576
  readonly id: Id;
1449
1577
  readonly methods: MethodsShape;
1450
1578
  readonly make: <ROut, LayerError, REvent = never, EventLayerError = never>(layer: Layer.Layer<ROut, LayerError, DurableObjectState | WorkerEnvironment>, options: Options$3<ROut, Definition$4<Id, MethodsShape>, REvent, EventLayerError>) => DurableObjectClass<Handlers$1<ROut | REvent, Definition$4<Id, MethodsShape>>, ROut | REvent>;
1451
- readonly layer: (options: LayerOptions$7) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
1579
+ readonly layer: (options: LayerOptions$8) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
1452
1580
  };
1453
1581
  /**
1454
1582
  * Defines a single RPC method schema in a Durable Object definition.
@@ -1462,9 +1590,9 @@ declare const method$1: {
1462
1590
  readonly success: Success;
1463
1591
  }): Method$2<Args, Success>;
1464
1592
  };
1465
- declare const make$5: <Id extends string, const MethodsShape extends Methods$1>(id: Id, methods: MethodsShape & NoReservedMethods$1<MethodsShape>) => TagClass$6<Definition$4<Id, MethodsShape>, Id, MethodsShape>;
1466
- declare const Tag$7: <Self>() => <Id extends string, const MethodsShape extends Methods$1>(id: Id, methods: MethodsShape & NoReservedMethods$1<MethodsShape>) => TagClass$6<Self, Id, MethodsShape>;
1467
- declare const DurableObject$1: <Self>() => <Id extends string, const MethodsShape extends Methods$1>(id: Id, methods: MethodsShape & NoReservedMethods$1<MethodsShape>) => TagClass$6<Self, Id, MethodsShape>;
1593
+ declare const make$6: <Id extends string, const MethodsShape extends Methods$1>(id: Id, methods: MethodsShape & NoReservedMethods$1<MethodsShape>) => TagClass$7<Definition$4<Id, MethodsShape>, Id, MethodsShape>;
1594
+ declare const Tag$8: <Self>() => <Id extends string, const MethodsShape extends Methods$1>(id: Id, methods: MethodsShape & NoReservedMethods$1<MethodsShape>) => TagClass$7<Self, Id, MethodsShape>;
1595
+ declare const DurableObject$1: <Self>() => <Id extends string, const MethodsShape extends Methods$1>(id: Id, methods: MethodsShape & NoReservedMethods$1<MethodsShape>) => TagClass$7<Self, Id, MethodsShape>;
1468
1596
  /**
1469
1597
  * Helper for implementing handlers with the exact method shape of a definition.
1470
1598
  */
@@ -1474,7 +1602,7 @@ declare const implement$3: <ROut, const Self extends Definition$4.Any>(_definiti
1474
1602
  */
1475
1603
  type HandlerEffect$1<ROut, Self extends Definition$4.Any, Key extends keyof Self["methods"]> = DurableObjectHandler<ROut, Method$2.Success<Self["methods"][Key]>>;
1476
1604
  declare namespace DurableObject_d_exports {
1477
- export { Api, Definition$3 as Definition, DurableObjectClass, DurableObjectHandler, DurableObjectOptions, DurableObjectRpc, DurableObjectRpcShape, HandlerEffect, Handlers, LayerOptions$6 as LayerOptions, Method$1 as Method, Methods, NoReservedMethods, Options$2 as Options, ReservedMethodName, RpcHandlers, ServerApi$1 as ServerApi, ServiceFreeSchema, Tag$6 as Tag, TagClass$5 as TagClass, TagFactory, implement$2 as implement, make$4 as make, method };
1605
+ export { Api, Definition$3 as Definition, DurableObjectClass, DurableObjectHandler, DurableObjectOptions, DurableObjectRpc, DurableObjectRpcShape, HandlerEffect, Handlers, LayerOptions$7 as LayerOptions, Method$1 as Method, Methods, NoReservedMethods, Options$2 as Options, ReservedMethodName, RpcHandlers, ServerApi$1 as ServerApi, ServiceFreeSchema, Tag$7 as Tag, TagClass$6 as TagClass, TagFactory, implement$2 as implement, make$5 as make, method };
1478
1606
  }
1479
1607
  type RuntimeContext$1<ROut> = DurableObjectState | WorkerEnvironment | ROut;
1480
1608
  type HandlerContext<ROut> = RuntimeContext$1<ROut> | Scope.Scope;
@@ -1534,7 +1662,7 @@ type DurableObjectClass<Rpc extends DurableObjectRpc<ROut>, ROut> = new (state:
1534
1662
  /**
1535
1663
  * Creates a Durable Object class backed by a single managed Effect runtime.
1536
1664
  */
1537
- declare const make$4: <ROut, LayerError, REvent = never, EventLayerError = never, const Rpc extends DurableObjectRpc<ROut | REvent> = Record<never, never>>(layer: Layer.Layer<ROut, LayerError, DurableObjectState | WorkerEnvironment>, options?: DurableObjectOptions<ROut, REvent, EventLayerError, Rpc>) => DurableObjectClass<Rpc, ROut | REvent>;
1665
+ declare const make$5: <ROut, LayerError, REvent = never, EventLayerError = never, const Rpc extends DurableObjectRpc<ROut | REvent> = Record<never, never>>(layer: Layer.Layer<ROut, LayerError, DurableObjectState | WorkerEnvironment>, options?: DurableObjectOptions<ROut, REvent, EventLayerError, Rpc>) => DurableObjectClass<Rpc, ROut | REvent>;
1538
1666
  type ServiceFreeSchema = Schema.Codec<any, any, never, never>;
1539
1667
  interface Method$1<Args extends ReadonlyArray<ServiceFreeSchema> = ReadonlyArray<ServiceFreeSchema>, Success extends ServiceFreeSchema = ServiceFreeSchema> {
1540
1668
  readonly args: Args;
@@ -1557,21 +1685,21 @@ interface Definition$3<Id extends string = string, MethodsShape extends Methods
1557
1685
  declare namespace Definition$3 {
1558
1686
  type Any = Definition$3<string, Methods>;
1559
1687
  }
1560
- type LayerOptions$6 = LayerOptions$7;
1688
+ type LayerOptions$7 = LayerOptions$8;
1561
1689
  type ServerApi$1<Self extends Definition$3.Any> = { readonly [Key in keyof Self["methods"]]: (...args: Method$1.Args<Self["methods"][Key]>) => Promise<Method$1.Success<Self["methods"][Key]>> };
1562
1690
  type Api<Self extends Definition$3.Any> = Provider<ServerApi$1<Self>, ReservedMethodName>;
1563
1691
  type Handlers<ROut, Self extends Definition$3.Any> = { readonly [Key in keyof Self["methods"]]: (...args: Method$1.Args<Self["methods"][Key]>) => DurableObjectHandler<ROut, Method$1.Success<Self["methods"][Key]>> };
1564
1692
  interface Options$2<ROut, Self extends Definition$3.Any, REvent = never, EventLayerError = never> extends Omit<DurableObjectOptions<ROut, REvent, EventLayerError, Handlers<ROut | REvent, Self>>, "rpc"> {
1565
1693
  readonly rpc: Handlers<ROut | REvent, Self>;
1566
1694
  }
1567
- type TagClass$5<Self, Id extends string, MethodsShape extends Methods> = Context.ServiceClass<Self, Id, DurableObjectNamespaceEffectClient<Api<Definition$3<Id, MethodsShape>>, Definition$3<Id, MethodsShape>>> & DurableObjectNamespaceStaticClient<Self, Api<Definition$3<Id, MethodsShape>>, Definition$3<Id, MethodsShape>> & {
1695
+ type TagClass$6<Self, Id extends string, MethodsShape extends Methods> = Context.ServiceClass<Self, Id, DurableObjectNamespaceEffectClient<Api<Definition$3<Id, MethodsShape>>, Definition$3<Id, MethodsShape>>> & DurableObjectNamespaceStaticClient<Self, Api<Definition$3<Id, MethodsShape>>, Definition$3<Id, MethodsShape>> & {
1568
1696
  readonly id: Id;
1569
1697
  readonly methods: MethodsShape;
1570
1698
  readonly make: <ROut, LayerError, REvent = never, EventLayerError = never>(layer: Layer.Layer<ROut, LayerError, DurableObjectState | WorkerEnvironment>, options: Options$2<ROut, Definition$3<Id, MethodsShape>, REvent, EventLayerError>) => DurableObjectClass<Handlers<ROut | REvent, Definition$3<Id, MethodsShape>>, ROut | REvent>;
1571
- readonly layer: (options: LayerOptions$6) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
1699
+ readonly layer: (options: LayerOptions$7) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
1572
1700
  };
1573
- type TagFactory = <Self>() => <Id extends string, const MethodsShape extends Methods>(id: Id, methods: MethodsShape & NoReservedMethods<MethodsShape>) => TagClass$5<Self, Id, MethodsShape>;
1574
- declare const Tag$6: TagFactory;
1701
+ type TagFactory = <Self>() => <Id extends string, const MethodsShape extends Methods>(id: Id, methods: MethodsShape & NoReservedMethods<MethodsShape>) => TagClass$6<Self, Id, MethodsShape>;
1702
+ declare const Tag$7: TagFactory;
1575
1703
  declare const method: {
1576
1704
  <Success extends ServiceFreeSchema>(definition: {
1577
1705
  readonly success: Success;
@@ -1908,12 +2036,12 @@ declare class DurableObjectAlarm extends DurableObjectAlarm_base {
1908
2036
  static readonly layer: Layer.Layer<DurableObjectAlarm, never, DurableObjectState>;
1909
2037
  }
1910
2038
  declare namespace DurableObjectRpcWebSocket_d_exports {
1911
- export { DurableObjectRpcWebSocket, DurableObjectRpcWebSocketService, LayerOptions$5 as LayerOptions, NativeWebSocketMessage, layer$5 as layer };
2039
+ export { DurableObjectRpcWebSocket, DurableObjectRpcWebSocketService, LayerOptions$6 as LayerOptions, NativeWebSocketMessage, layer$6 as layer };
1912
2040
  }
1913
2041
  /**
1914
2042
  * Configuration for {@link layer}.
1915
2043
  */
1916
- interface LayerOptions$5 {
2044
+ interface LayerOptions$6 {
1917
2045
  /** Tag used to select hibernated sockets. */
1918
2046
  readonly tag?: string | undefined;
1919
2047
  /** Socket attachment key used to persist client ids across hibernation. */
@@ -1938,9 +2066,9 @@ declare class DurableObjectRpcWebSocket extends DurableObjectRpcWebSocket_base {
1938
2066
  /**
1939
2067
  * Builds a layer that bridges Durable Object websocket events to `RpcServer.Protocol`.
1940
2068
  */
1941
- declare const layer$5: (options?: LayerOptions$5) => Layer.Layer<DurableObjectRpcWebSocket | RpcServer.Protocol, never, DurableObjectState | RpcSerialization.RpcSerialization>;
2069
+ declare const layer$6: (options?: LayerOptions$6) => Layer.Layer<DurableObjectRpcWebSocket | RpcServer.Protocol, never, DurableObjectState | RpcSerialization.RpcSerialization>;
1942
2070
  declare namespace DurableObjectSqlite_d_exports {
1943
- export { SqliteLayerOptions, layer$4 as layer };
2071
+ export { SqliteLayerOptions, layer$5 as layer };
1944
2072
  }
1945
2073
  /** Options forwarded to `@effect/sql-sqlite-do` when building a SQL client layer. */
1946
2074
  type SqliteLayerOptions = Omit<SqliteClient.SqliteClientConfig, "db">;
@@ -1955,9 +2083,9 @@ type SqliteLayerOptions = Omit<SqliteClient.SqliteClientConfig, "db">;
1955
2083
  * );
1956
2084
  * ```
1957
2085
  */
1958
- declare const layer$4: (options?: SqliteLayerOptions) => Layer.Layer<_$effect_unstable_sql_SqlClient0.SqlClient | SqliteClient.SqliteClient, never, DurableObjectState>;
2086
+ declare const layer$5: (options?: SqliteLayerOptions) => Layer.Layer<_$effect_unstable_sql_SqlClient0.SqlClient | SqliteClient.SqliteClient, never, DurableObjectState>;
1959
2087
  declare namespace Images_d_exports {
1960
- export { DrawStepOptions, HostedImagesClient, ImageDrawOptions, ImageHandleClient, ImageInfoResponse, ImageInputOptions, ImageInputValue, ImageList, ImageListOptions, ImageMetadata, ImageOutputOptions, ImageTransform, ImageTransformationOutputOptions, ImageTransformationResult, ImageUpdateOptions, ImageUploadOptions, ImageUploadValue, ImagesClient, ImagesDefinition, ImagesOperationError, ImagesRuntimeBinding, ImagesService, ImagesTransformationResultClient, LayerOptions$4 as LayerOptions, ProcessOptions, Step, Steps, Tag$5 as Tag, TagClass$4 as TagClass, draw, empty, isImagesBinding, layer$3 as layer, make$3 as make, makeClient$3 as makeClient, transform };
2088
+ export { DrawStepOptions, HostedImagesClient, ImageDrawOptions, ImageHandleClient, ImageInfoResponse, ImageInputOptions, ImageInputValue, ImageList, ImageListOptions, ImageMetadata, ImageOutputOptions, ImageTransform, ImageTransformationOutputOptions, ImageTransformationResult, ImageUpdateOptions, ImageUploadOptions, ImageUploadValue, ImagesClient, ImagesDefinition, ImagesOperationError, ImagesRuntimeBinding, ImagesService, ImagesTransformationResultClient, LayerOptions$5 as LayerOptions, ProcessOptions, Step, Steps, Tag$6 as Tag, TagClass$5 as TagClass, draw, empty, isImagesBinding, layer$4 as layer, make$4 as make, makeClient$4 as makeClient, transform };
1961
2089
  }
1962
2090
  declare const TypeId: "effect-cf/Images/Steps";
1963
2091
  declare const ImagesOperationError_base: new <A extends Record<string, any> = {}>(args: _$effect_Types0.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => _$effect_Cause0.YieldableError & {
@@ -1974,22 +2102,22 @@ interface ImagesDefinition {
1974
2102
  /** Binding name as configured in `wrangler.jsonc`. */
1975
2103
  readonly binding: string;
1976
2104
  }
1977
- type ImageInfoResponse = globalThis.ImageInfoResponse;
1978
- type ImageTransform = globalThis.ImageTransform;
1979
- type ImageDrawOptions = globalThis.ImageDrawOptions;
1980
- type ImageInputOptions = globalThis.ImageInputOptions;
1981
- type ImageOutputOptions = globalThis.ImageOutputOptions;
1982
- type ImageTransformationOutputOptions = globalThis.ImageTransformationOutputOptions;
1983
- type ImageTransformationResult = globalThis.ImageTransformationResult;
1984
- type ImageUploadOptions = globalThis.ImageUploadOptions;
1985
- type ImageUpdateOptions = globalThis.ImageUpdateOptions;
1986
- type ImageListOptions = globalThis.ImageListOptions;
1987
- type ImageList = globalThis.ImageList;
1988
- type ImageMetadata = globalThis.ImageMetadata;
2105
+ type ImageInfoResponse = CloudflareImageInfoResponse;
2106
+ type ImageTransform = CloudflareImageTransform;
2107
+ type ImageDrawOptions = CloudflareImageDrawOptions;
2108
+ type ImageInputOptions = CloudflareImageInputOptions;
2109
+ type ImageOutputOptions = CloudflareImageOutputOptions;
2110
+ type ImageTransformationOutputOptions = CloudflareImageTransformationOutputOptions;
2111
+ type ImageTransformationResult = CloudflareImageTransformationResult;
2112
+ type ImageUploadOptions = CloudflareImageUploadOptions;
2113
+ type ImageUpdateOptions = CloudflareImageUpdateOptions;
2114
+ type ImageListOptions = CloudflareImageListOptions;
2115
+ type ImageList = CloudflareImageList;
2116
+ type ImageMetadata = CloudflareImageMetadata;
1989
2117
  type ImageInputValue = ReadableStream<Uint8Array> | ArrayBuffer;
1990
2118
  type ImageUploadValue = ReadableStream<Uint8Array> | ArrayBuffer;
1991
2119
  interface DrawStepOptions {
1992
- readonly image: ReadableStream<Uint8Array> | globalThis.ImageTransformer;
2120
+ readonly image: ReadableStream<Uint8Array> | CloudflareImageTransformer;
1993
2121
  readonly options?: ImageDrawOptions;
1994
2122
  }
1995
2123
  type Step = Data.TaggedEnum<{
@@ -2008,13 +2136,13 @@ interface ProcessOptions {
2008
2136
  readonly outputOptions: ImageOutputOptions;
2009
2137
  }
2010
2138
  interface ImagesTransformationResultClient {
2011
- readonly raw: globalThis.ImageTransformationResult;
2012
- readonly response: Effect.Effect<globalThis.Response, ImagesOperationError>;
2139
+ readonly raw: CloudflareImageTransformationResult;
2140
+ readonly response: Effect.Effect<CloudflareResponse, ImagesOperationError>;
2013
2141
  readonly contentType: Effect.Effect<string, ImagesOperationError>;
2014
2142
  readonly image: (options?: ImageTransformationOutputOptions) => Effect.Effect<ReadableStream<Uint8Array>, ImagesOperationError>;
2015
2143
  }
2016
2144
  interface ImageHandleClient {
2017
- readonly raw: globalThis.ImageHandle;
2145
+ readonly raw: CloudflareImageHandle;
2018
2146
  readonly details: Effect.Effect<Option.Option<ImageMetadata>, ImagesOperationError>;
2019
2147
  readonly bytes: Effect.Effect<Option.Option<ReadableStream<Uint8Array>>, ImagesOperationError>;
2020
2148
  readonly update: (options: ImageUpdateOptions) => Effect.Effect<ImageMetadata, ImagesOperationError>;
@@ -2024,16 +2152,16 @@ interface HostedImagesClient {
2024
2152
  readonly image: (imageId: string) => ImageHandleClient;
2025
2153
  readonly upload: (image: ImageUploadValue, options?: ImageUploadOptions) => Effect.Effect<ImageMetadata, ImagesOperationError>;
2026
2154
  readonly list: (options?: ImageListOptions) => Effect.Effect<ImageList, ImagesOperationError>;
2027
- readonly unsafeRaw: Effect.Effect<globalThis.HostedImagesBinding>;
2155
+ readonly unsafeRaw: Effect.Effect<CloudflareHostedImagesBinding>;
2028
2156
  }
2029
2157
  interface ImagesRuntimeBinding {
2030
2158
  readonly info: (image: ImageInputValue, options?: ImageInputOptions) => Promise<ImageInfoResponse>;
2031
- readonly input: (image: ImageInputValue, options?: ImageInputOptions) => globalThis.ImageTransformer;
2032
- readonly hosted?: globalThis.HostedImagesBinding;
2159
+ readonly input: (image: ImageInputValue, options?: ImageInputOptions) => CloudflareImageTransformer;
2160
+ readonly hosted?: CloudflareHostedImagesBinding;
2033
2161
  }
2034
2162
  interface ImagesClient {
2035
2163
  readonly info: (image: ImageInputValue, options?: ImageInputOptions) => Effect.Effect<ImageInfoResponse, ImagesOperationError>;
2036
- readonly input: (image: ImageInputValue, options?: ImageInputOptions) => Effect.Effect<globalThis.ImageTransformer, ImagesOperationError>;
2164
+ readonly input: (image: ImageInputValue, options?: ImageInputOptions) => Effect.Effect<CloudflareImageTransformer, ImagesOperationError>;
2037
2165
  readonly process: (steps: Steps, options: ProcessOptions) => Effect.Effect<ImagesTransformationResultClient, ImagesOperationError>;
2038
2166
  readonly hosted: Option.Option<HostedImagesClient>;
2039
2167
  readonly unsafeRaw: Effect.Effect<ImagesRuntimeBinding>;
@@ -2046,12 +2174,12 @@ interface ImagesService<Id extends string> {
2046
2174
  readonly id: Id;
2047
2175
  };
2048
2176
  }
2049
- type LayerOptions$4 = {
2177
+ type LayerOptions$5 = {
2050
2178
  readonly binding: string;
2051
2179
  };
2052
- interface TagClass$4<Self, Id extends string> extends Context.ServiceClass<Self, Id, ImagesClient> {
2180
+ interface TagClass$5<Self, Id extends string> extends Context.ServiceClass<Self, Id, ImagesClient> {
2053
2181
  readonly id: Id;
2054
- readonly layer: (options: LayerOptions$4) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
2182
+ readonly layer: (options: LayerOptions$5) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
2055
2183
  }
2056
2184
  /** Empty Images transformation pipeline. */
2057
2185
  declare const empty: Steps;
@@ -2060,12 +2188,12 @@ declare function transform(steps: Steps, transform: ImageTransform): Steps;
2060
2188
  declare function draw(draw: DrawStepOptions): (steps: Steps) => Steps;
2061
2189
  declare function draw(steps: Steps, draw: DrawStepOptions): Steps;
2062
2190
  declare const isImagesBinding: (value: unknown) => value is ImagesRuntimeBinding;
2063
- declare const makeClient$3: (definition: ImagesDefinition) => (images: ImagesRuntimeBinding) => ImagesClient;
2064
- declare const layer$3: <Self>(tag: Context.Service<Self, ImagesClient>, definition: ImagesDefinition) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
2065
- declare const make$3: <Id extends string>(id: Id) => TagClass$4<ImagesService<Id>, Id>;
2066
- declare const Tag$5: <Self>() => <Id extends string>(id: Id) => TagClass$4<Self, Id>;
2191
+ declare const makeClient$4: (definition: ImagesDefinition) => (images: ImagesRuntimeBinding) => ImagesClient;
2192
+ declare const layer$4: <Self>(tag: Context.Service<Self, ImagesClient>, definition: ImagesDefinition) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
2193
+ declare const make$4: <Id extends string>(id: Id) => TagClass$5<ImagesService<Id>, Id>;
2194
+ declare const Tag$6: <Self>() => <Id extends string>(id: Id) => TagClass$5<Self, Id>;
2067
2195
  declare namespace Kv_d_exports {
2068
- export { Definition$2 as Definition, KvClient, KvDefinition, KvListKey, KvListOptions, KvListResult, KvOperationError, KvPutOptions, KvWithMetadata, LayerOptions$3 as LayerOptions, Tag$4 as Tag, TagClass$3 as TagClass, isKvNamespace, layer$2 as layer, makeClient$2 as makeClient };
2196
+ export { Definition$2 as Definition, KvClient, KvDefinition, KvListKey, KvListOptions, KvListResult, KvOperationError, KvPutOptions, KvWithMetadata, LayerOptions$4 as LayerOptions, Tag$5 as Tag, TagClass$4 as TagClass, isKvNamespace, layer$3 as layer, makeClient$3 as makeClient };
2069
2197
  }
2070
2198
  declare const KvOperationError_base: new <A extends Record<string, any> = {}>(args: _$effect_Types0.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => _$effect_Cause0.YieldableError & {
2071
2199
  readonly _tag: "KvOperationError";
@@ -2077,9 +2205,9 @@ declare class KvOperationError extends KvOperationError_base<{
2077
2205
  readonly cause: unknown;
2078
2206
  }> {}
2079
2207
  /** `KVNamespace.put` options. */
2080
- type KvPutOptions = globalThis.KVNamespacePutOptions;
2208
+ type KvPutOptions = CloudflareKVNamespacePutOptions;
2081
2209
  /** `KVNamespace.list` options with optional metadata decoding schema. */
2082
- type KvListOptions<Metadata = unknown> = globalThis.KVNamespaceListOptions & {
2210
+ type KvListOptions<Metadata = unknown> = CloudflareKVNamespaceListOptions & {
2083
2211
  readonly metadataSchema?: Schema.Codec<Metadata, unknown>;
2084
2212
  };
2085
2213
  /** Successful value returned by `getWithMetadata`. */
@@ -2134,24 +2262,24 @@ interface KvClient<Key, Value, EncodedValue> {
2134
2262
  readonly unsafeRaw: Effect.Effect<KVNamespace>;
2135
2263
  readonly definition: KvDefinition<Key, Value, EncodedValue>;
2136
2264
  }
2137
- type LayerOptions$3 = {
2265
+ type LayerOptions$4 = {
2138
2266
  readonly binding: string;
2139
2267
  };
2140
- interface TagClass$3<Self, Id extends string, Key, Value, EncodedValue> extends Context.ServiceClass<Self, Id, KvClient<Key, Value, EncodedValue>> {
2268
+ interface TagClass$4<Self, Id extends string, Key, Value, EncodedValue> extends Context.ServiceClass<Self, Id, KvClient<Key, Value, EncodedValue>> {
2141
2269
  readonly id: Id;
2142
2270
  readonly keySchema: Schema.Codec<Key, string>;
2143
2271
  readonly valueSchema: Schema.Codec<Value, EncodedValue>;
2144
- readonly layer: (options: LayerOptions$3) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
2272
+ readonly layer: (options: LayerOptions$4) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
2145
2273
  }
2146
2274
  declare const isKvNamespace: (value: unknown) => value is KVNamespace;
2147
- declare const makeClient$2: <Key, Value, EncodedValue>(definition: KvDefinition<Key, Value, EncodedValue>) => ((kv: KVNamespace) => KvClient<Key, Value, EncodedValue>);
2148
- declare const layer$2: <Self, Key, Value, EncodedValue>(tag: Context.Service<Self, KvClient<Key, Value, EncodedValue>>, definition: KvDefinition<Key, Value, EncodedValue>) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
2149
- declare const Tag$4: <Self>() => <Id extends string, Key, Value, EncodedValue>(id: Id, definition: {
2275
+ declare const makeClient$3: <Key, Value, EncodedValue>(definition: KvDefinition<Key, Value, EncodedValue>) => ((kv: KVNamespace) => KvClient<Key, Value, EncodedValue>);
2276
+ declare const layer$3: <Self, Key, Value, EncodedValue>(tag: Context.Service<Self, KvClient<Key, Value, EncodedValue>>, definition: KvDefinition<Key, Value, EncodedValue>) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
2277
+ declare const Tag$5: <Self>() => <Id extends string, Key, Value, EncodedValue>(id: Id, definition: {
2150
2278
  readonly key: Schema.Codec<Key, string>;
2151
2279
  readonly value: Schema.Codec<Value, EncodedValue>;
2152
- }) => TagClass$3<Self, Id, Key, Value, EncodedValue>;
2280
+ }) => TagClass$4<Self, Id, Key, Value, EncodedValue>;
2153
2281
  declare namespace R2_d_exports {
2154
- export { LayerOptions$2 as LayerOptions, R2Client, R2Definition, R2GetOptions, R2ListOptions, R2MultipartOptions, R2MultipartUploadClient, R2ObjectBodyClient, R2OperationError, R2PutOptions, R2PutValue, R2Service, R2UploadPartOptions, R2UploadPartValue, Tag$3 as Tag, TagClass$2 as TagClass, isR2Bucket, layer$1 as layer, make$2 as make, makeClient$1 as makeClient };
2282
+ export { LayerOptions$3 as LayerOptions, R2Client, R2Definition, R2GetOptions, R2ListOptions, R2MultipartOptions, R2MultipartUploadClient, R2ObjectBodyClient, R2OperationError, R2PutOptions, R2PutValue, R2Service, R2UploadPartOptions, R2UploadPartValue, Tag$4 as Tag, TagClass$3 as TagClass, isR2Bucket, layer$2 as layer, make$3 as make, makeClient$2 as makeClient };
2155
2283
  }
2156
2284
  declare const R2OperationError_base: new <A extends Record<string, any> = {}>(args: _$effect_Types0.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => _$effect_Cause0.YieldableError & {
2157
2285
  readonly _tag: "R2OperationError";
@@ -2167,15 +2295,15 @@ interface R2Definition {
2167
2295
  /** Binding name as configured in `wrangler.jsonc`. */
2168
2296
  readonly binding: string;
2169
2297
  }
2170
- type R2GetOptions = globalThis.R2GetOptions;
2171
- type R2PutOptions = globalThis.R2PutOptions;
2172
- type R2ListOptions = globalThis.R2ListOptions;
2173
- type R2MultipartOptions = globalThis.R2MultipartOptions;
2174
- type R2UploadPartOptions = globalThis.R2UploadPartOptions;
2298
+ type R2GetOptions = CloudflareR2GetOptions;
2299
+ type R2PutOptions = CloudflareR2PutOptions;
2300
+ type R2ListOptions = CloudflareR2ListOptions;
2301
+ type R2MultipartOptions = CloudflareR2MultipartOptions;
2302
+ type R2UploadPartOptions = CloudflareR2UploadPartOptions;
2175
2303
  type R2PutValue = ReadableStream | ArrayBuffer | ArrayBufferView | string | null | Blob;
2176
2304
  type R2UploadPartValue = ReadableStream | ArrayBuffer | ArrayBufferView | string | Blob;
2177
- interface R2ObjectBodyClient extends Omit<globalThis.R2ObjectBody, "arrayBuffer" | "blob" | "bytes" | "json" | "text"> {
2178
- readonly raw: globalThis.R2ObjectBody;
2305
+ interface R2ObjectBodyClient extends Omit<CloudflareR2ObjectBody, "arrayBuffer" | "blob" | "bytes" | "json" | "text"> {
2306
+ readonly raw: CloudflareR2ObjectBody;
2179
2307
  readonly arrayBuffer: Effect.Effect<ArrayBuffer, R2OperationError>;
2180
2308
  readonly bytes: Effect.Effect<Uint8Array, R2OperationError>;
2181
2309
  readonly text: Effect.Effect<string, R2OperationError>;
@@ -2183,32 +2311,32 @@ interface R2ObjectBodyClient extends Omit<globalThis.R2ObjectBody, "arrayBuffer"
2183
2311
  readonly blob: Effect.Effect<Blob, R2OperationError>;
2184
2312
  }
2185
2313
  interface R2MultipartUploadClient {
2186
- readonly raw: globalThis.R2MultipartUpload;
2314
+ readonly raw: CloudflareR2MultipartUpload;
2187
2315
  readonly key: string;
2188
2316
  readonly uploadId: string;
2189
- readonly uploadPart: (partNumber: number, value: R2UploadPartValue, options?: R2UploadPartOptions) => Effect.Effect<globalThis.R2UploadedPart, R2OperationError>;
2317
+ readonly uploadPart: (partNumber: number, value: R2UploadPartValue, options?: R2UploadPartOptions) => Effect.Effect<CloudflareR2UploadedPart, R2OperationError>;
2190
2318
  readonly abort: Effect.Effect<void, R2OperationError>;
2191
- readonly complete: (uploadedParts: ReadonlyArray<globalThis.R2UploadedPart>) => Effect.Effect<globalThis.R2Object, R2OperationError>;
2319
+ readonly complete: (uploadedParts: ReadonlyArray<CloudflareR2UploadedPart>) => Effect.Effect<CloudflareR2Object, R2OperationError>;
2192
2320
  }
2193
2321
  interface R2Client {
2194
- readonly head: (key: string) => Effect.Effect<Option.Option<globalThis.R2Object>, R2OperationError>;
2322
+ readonly head: (key: string) => Effect.Effect<Option.Option<CloudflareR2Object>, R2OperationError>;
2195
2323
  readonly get: {
2196
2324
  (key: string, options: R2GetOptions & {
2197
- readonly onlyIf: globalThis.R2Conditional | Headers;
2198
- }): Effect.Effect<Option.Option<R2ObjectBodyClient | globalThis.R2Object>, R2OperationError>;
2325
+ readonly onlyIf: CloudflareR2Conditional | Headers;
2326
+ }): Effect.Effect<Option.Option<R2ObjectBodyClient | CloudflareR2Object>, R2OperationError>;
2199
2327
  (key: string, options?: R2GetOptions): Effect.Effect<Option.Option<R2ObjectBodyClient>, R2OperationError>;
2200
2328
  };
2201
2329
  readonly put: {
2202
2330
  (key: string, value: R2PutValue, options: R2PutOptions & {
2203
- readonly onlyIf: globalThis.R2Conditional | Headers;
2204
- }): Effect.Effect<Option.Option<globalThis.R2Object>, R2OperationError>;
2205
- (key: string, value: R2PutValue, options?: R2PutOptions): Effect.Effect<globalThis.R2Object, R2OperationError>;
2331
+ readonly onlyIf: CloudflareR2Conditional | Headers;
2332
+ }): Effect.Effect<Option.Option<CloudflareR2Object>, R2OperationError>;
2333
+ (key: string, value: R2PutValue, options?: R2PutOptions): Effect.Effect<CloudflareR2Object, R2OperationError>;
2206
2334
  };
2207
2335
  readonly createMultipartUpload: (key: string, options?: R2MultipartOptions) => Effect.Effect<R2MultipartUploadClient, R2OperationError>;
2208
2336
  readonly resumeMultipartUpload: (key: string, uploadId: string) => Effect.Effect<R2MultipartUploadClient, R2OperationError>;
2209
2337
  readonly delete: (keys: string | ReadonlyArray<string>) => Effect.Effect<void, R2OperationError>;
2210
- readonly list: (options?: R2ListOptions) => Effect.Effect<globalThis.R2Objects, R2OperationError>;
2211
- readonly unsafeRaw: Effect.Effect<globalThis.R2Bucket>;
2338
+ readonly list: (options?: R2ListOptions) => Effect.Effect<CloudflareR2Objects, R2OperationError>;
2339
+ readonly unsafeRaw: Effect.Effect<CloudflareR2Bucket>;
2212
2340
  readonly definition: R2Definition;
2213
2341
  }
2214
2342
  declare const R2ServiceTypeId: unique symbol;
@@ -2218,22 +2346,22 @@ interface R2Service<Id extends string> {
2218
2346
  readonly id: Id;
2219
2347
  };
2220
2348
  }
2221
- type LayerOptions$2 = {
2349
+ type LayerOptions$3 = {
2222
2350
  readonly binding: string;
2223
2351
  };
2224
- interface TagClass$2<Self, Id extends string> extends Context.ServiceClass<Self, Id, R2Client> {
2352
+ interface TagClass$3<Self, Id extends string> extends Context.ServiceClass<Self, Id, R2Client> {
2225
2353
  readonly id: Id;
2226
- readonly layer: (options: LayerOptions$2) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
2354
+ readonly layer: (options: LayerOptions$3) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
2227
2355
  }
2228
- declare const isR2Bucket: (value: unknown) => value is globalThis.R2Bucket;
2229
- declare const makeClient$1: (definition: R2Definition) => ((bucket: globalThis.R2Bucket) => R2Client);
2230
- declare const layer$1: <Self>(tag: Context.Service<Self, R2Client>, definition: R2Definition) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
2231
- declare const make$2: <Id extends string>(id: Id) => TagClass$2<R2Service<Id>, Id>;
2232
- declare const Tag$3: <Self>() => <Id extends string>(id: Id) => TagClass$2<Self, Id>;
2356
+ declare const isR2Bucket: (value: unknown) => value is CloudflareR2Bucket;
2357
+ declare const makeClient$2: (definition: R2Definition) => ((bucket: CloudflareR2Bucket) => R2Client);
2358
+ declare const layer$2: <Self>(tag: Context.Service<Self, R2Client>, definition: R2Definition) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
2359
+ declare const make$3: <Id extends string>(id: Id) => TagClass$3<R2Service<Id>, Id>;
2360
+ declare const Tag$4: <Self>() => <Id extends string>(id: Id) => TagClass$3<Self, Id>;
2233
2361
  declare namespace WorkflowBinding_d_exports {
2234
- export { WorkflowBindingClient, WorkflowBindingDefinition, WorkflowInstance, WorkflowInstanceCreateBatchOptions, WorkflowInstanceCreateOptions, WorkflowInstanceEvent, WorkflowInstanceRestartOptions, WorkflowInstanceStatus, WorkflowInstanceStatusName, WorkflowOperationError, WorkflowResultDecodeError, isWorkflow, layer, makeClient };
2362
+ export { WorkflowBindingClient, WorkflowBindingDefinition, WorkflowInstance, WorkflowInstanceCreateBatchOptions, WorkflowInstanceCreateOptions, WorkflowInstanceEvent, WorkflowInstanceRestartOptions, WorkflowInstanceStatus, WorkflowInstanceStatusName, WorkflowOperationError, WorkflowResultDecodeError, isWorkflow, layer$1 as layer, makeClient$1 as makeClient };
2235
2363
  }
2236
- type WorkflowInstanceCreateOptions<Payload> = Omit<globalThis.WorkflowInstanceCreateOptions<Payload>, "params">;
2364
+ type WorkflowInstanceCreateOptions<Payload> = Omit<CloudflareWorkflowInstanceCreateOptions<Payload>, "params">;
2237
2365
  type WorkflowInstanceCreateBatchOptions<Payload, EncodedPayload = unknown> = ReadonlyArray<{
2238
2366
  readonly payload: Payload;
2239
2367
  } & WorkflowInstanceCreateOptions<EncodedPayload>>;
@@ -2244,7 +2372,7 @@ interface WorkflowInstanceRestartOptions {
2244
2372
  readonly type?: string;
2245
2373
  };
2246
2374
  }
2247
- type WorkflowInstanceStatusName = globalThis.InstanceStatus["status"];
2375
+ type WorkflowInstanceStatusName = CloudflareInstanceStatus["status"];
2248
2376
  interface WorkflowInstanceStatus<Result> {
2249
2377
  readonly status: WorkflowInstanceStatusName;
2250
2378
  readonly output: Option.Option<Result>;
@@ -2254,7 +2382,7 @@ interface WorkflowInstanceStatus<Result> {
2254
2382
  }>;
2255
2383
  }
2256
2384
  interface WorkflowInstance<Result> {
2257
- readonly raw: globalThis.WorkflowInstance;
2385
+ readonly raw: CloudflareWorkflowInstance;
2258
2386
  readonly id: string;
2259
2387
  readonly pause: Effect.Effect<void, WorkflowOperationError>;
2260
2388
  readonly resume: Effect.Effect<void, WorkflowOperationError>;
@@ -2279,7 +2407,7 @@ interface WorkflowBindingClient<Payload extends ServiceFreeSchema$4, Result exte
2279
2407
  readonly create: (payload: Schema.Schema.Type<Payload>, options?: WorkflowInstanceCreateOptions<Schema.Codec.Encoded<Payload>>) => Effect.Effect<WorkflowInstance<Schema.Schema.Type<Result>>, WorkflowOperationError | Schema.SchemaError>;
2280
2408
  readonly createBatch: (batch: WorkflowInstanceCreateBatchOptions<Schema.Schema.Type<Payload>, Schema.Codec.Encoded<Payload>>) => Effect.Effect<ReadonlyArray<WorkflowInstance<Schema.Schema.Type<Result>>>, WorkflowOperationError | Schema.SchemaError>;
2281
2409
  readonly get: (instanceId: string) => Effect.Effect<WorkflowInstance<Schema.Schema.Type<Result>>, WorkflowOperationError>;
2282
- readonly unsafeRaw: Effect.Effect<globalThis.Workflow<Schema.Codec.Encoded<Payload>>>;
2410
+ readonly unsafeRaw: Effect.Effect<CloudflareWorkflow<Schema.Codec.Encoded<Payload>>>;
2283
2411
  }
2284
2412
  declare const WorkflowOperationError_base: new <A extends Record<string, any> = {}>(args: _$effect_Types0.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => _$effect_Cause0.YieldableError & {
2285
2413
  readonly _tag: "WorkflowOperationError";
@@ -2297,11 +2425,11 @@ declare class WorkflowResultDecodeError extends WorkflowResultDecodeError_base<{
2297
2425
  readonly instanceId: string;
2298
2426
  readonly cause: unknown;
2299
2427
  }> {}
2300
- declare const isWorkflow: <Payload>(value: unknown) => value is globalThis.Workflow<Payload>;
2301
- declare const makeClient: <Payload extends ServiceFreeSchema$4, Result extends ServiceFreeSchema$4>(definition: WorkflowBindingDefinition<Payload, Result>) => ((workflow: globalThis.Workflow<Schema.Codec.Encoded<Payload>>) => WorkflowBindingClient<Payload, Result>);
2302
- declare const layer: <Self, Payload extends ServiceFreeSchema$4, Result extends ServiceFreeSchema$4>(tag: Context.Service<Self, WorkflowBindingClient<Payload, Result>>, definition: WorkflowBindingDefinition<Payload, Result>) => _$effect_Layer0.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
2428
+ declare const isWorkflow: <Payload>(value: unknown) => value is CloudflareWorkflow<Payload>;
2429
+ declare const makeClient$1: <Payload extends ServiceFreeSchema$4, Result extends ServiceFreeSchema$4>(definition: WorkflowBindingDefinition<Payload, Result>) => ((workflow: CloudflareWorkflow<Schema.Codec.Encoded<Payload>>) => WorkflowBindingClient<Payload, Result>);
2430
+ declare const layer$1: <Self, Payload extends ServiceFreeSchema$4, Result extends ServiceFreeSchema$4>(tag: Context.Service<Self, WorkflowBindingClient<Payload, Result>>, definition: WorkflowBindingDefinition<Payload, Result>) => _$effect_Layer0.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
2303
2431
  declare namespace WorkflowDefinition_d_exports {
2304
- export { Definition$1 as Definition, Handler$1 as Handler, LayerOptions$1 as LayerOptions, Options$1 as Options, Tag$2 as Tag, TagClass$1 as TagClass, Workflow, implement$1 as implement, make$1 as make };
2432
+ export { Definition$1 as Definition, Handler$1 as Handler, LayerOptions$2 as LayerOptions, Options$1 as Options, Tag$3 as Tag, TagClass$2 as TagClass, Workflow, implement$1 as implement, make$2 as make };
2305
2433
  }
2306
2434
  interface Definition$1<Id extends string = string, Payload extends ServiceFreeSchema$4 = ServiceFreeSchema$4, Result extends ServiceFreeSchema$4 = ServiceFreeSchema$4> {
2307
2435
  readonly id: Id;
@@ -2315,41 +2443,42 @@ type Handler$1<ROut, Self extends Definition$1.Any> = (payload: Schema.Schema.Ty
2315
2443
  interface Options$1<ROut, Self extends Definition$1.Any> {
2316
2444
  readonly run: Handler$1<ROut, Self>;
2317
2445
  }
2318
- type LayerOptions$1 = {
2446
+ type LayerOptions$2 = {
2319
2447
  readonly binding: string;
2320
2448
  };
2321
- interface TagClass$1<Self, Id extends string, Payload extends ServiceFreeSchema$4, Result extends ServiceFreeSchema$4> extends Context.ServiceClass<Self, Id, WorkflowBindingClient<Payload, Result>> {
2449
+ interface TagClass$2<Self, Id extends string, Payload extends ServiceFreeSchema$4, Result extends ServiceFreeSchema$4> extends Context.ServiceClass<Self, Id, WorkflowBindingClient<Payload, Result>> {
2322
2450
  readonly id: Id;
2323
2451
  readonly payload: Payload;
2324
2452
  readonly result: Result;
2325
2453
  readonly make: <ROut, LayerError>(layer: Layer.Layer<ROut, LayerError, ExecutionContext | WorkerContext | WorkerEnvironment>, options: Options$1<ROut, Definition$1<Id, Payload, Result>>) => WorkflowClass<Schema.Codec.Encoded<Payload>, Schema.Codec.Encoded<Result>, ROut>;
2326
- readonly layer: (options: LayerOptions$1) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
2454
+ readonly layer: (options: LayerOptions$2) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
2327
2455
  readonly create: (payload: Schema.Schema.Type<Payload>, options?: WorkflowInstanceCreateOptions<Schema.Codec.Encoded<Payload>>) => Effect.Effect<WorkflowInstance<Schema.Schema.Type<Result>>, WorkflowOperationError | Schema.SchemaError, Self>;
2328
2456
  readonly createBatch: (batch: WorkflowInstanceCreateBatchOptions<Schema.Schema.Type<Payload>, Schema.Codec.Encoded<Payload>>) => Effect.Effect<ReadonlyArray<WorkflowInstance<Schema.Schema.Type<Result>>>, WorkflowOperationError | Schema.SchemaError, Self>;
2329
2457
  readonly get: (instanceId: string) => Effect.Effect<WorkflowInstance<Schema.Schema.Type<Result>>, WorkflowOperationError, Self>;
2330
2458
  readonly unsafeRaw: () => Effect.Effect<globalThis.Workflow<Schema.Codec.Encoded<Payload>>, never, Self>;
2331
2459
  }
2332
- declare const make$1: <Id extends string, Payload extends ServiceFreeSchema$4, Result extends ServiceFreeSchema$4>(id: Id, definition: {
2460
+ declare const make$2: <Id extends string, Payload extends ServiceFreeSchema$4, Result extends ServiceFreeSchema$4>(id: Id, definition: {
2333
2461
  readonly payload: Payload;
2334
2462
  readonly result: Result;
2335
- }) => TagClass$1<Definition$1<Id, Payload, Result>, Id, Payload, Result>;
2336
- declare const Tag$2: <Self>() => <Id extends string, Payload extends ServiceFreeSchema$4, Result extends ServiceFreeSchema$4>(id: Id, definition: {
2463
+ }) => TagClass$2<Definition$1<Id, Payload, Result>, Id, Payload, Result>;
2464
+ declare const Tag$3: <Self>() => <Id extends string, Payload extends ServiceFreeSchema$4, Result extends ServiceFreeSchema$4>(id: Id, definition: {
2337
2465
  readonly payload: Payload;
2338
2466
  readonly result: Result;
2339
- }) => TagClass$1<Self, Id, Payload, Result>;
2467
+ }) => TagClass$2<Self, Id, Payload, Result>;
2340
2468
  declare const Workflow: <Self>() => <Id extends string, Payload extends ServiceFreeSchema$4, Result extends ServiceFreeSchema$4>(id: Id, definition: {
2341
2469
  readonly payload: Payload;
2342
2470
  readonly result: Result;
2343
- }) => TagClass$1<Self, Id, Payload, Result>;
2471
+ }) => TagClass$2<Self, Id, Payload, Result>;
2344
2472
  declare const implement$1: <ROut, const Self extends Definition$1.Any>(_definition: Self, handler: Handler$1<ROut, Self>) => Handler$1<ROut, Self>;
2345
2473
  declare namespace Workflow_d_exports {
2346
- export { Definition, Handler, LayerOptions, Options, Tag$1 as Tag, TagClass, WorkflowClass, WorkflowEvent$1 as WorkflowEvent, WorkflowEventService, WorkflowHandler, WorkflowOptions, WorkflowRunContext, WorkflowStep$1 as WorkflowStep, WorkflowStepContext$1 as WorkflowStepContext, WorkflowStepService, implement, make, sleep, sleepUntil, step, waitForEvent };
2474
+ export { Definition, Handler, LayerOptions$1 as LayerOptions, Options, Tag$2 as Tag, TagClass$1 as TagClass, WorkflowClass, WorkflowEvent$1 as WorkflowEvent, WorkflowEventService, WorkflowHandler, WorkflowOptions, WorkflowRunContext, WorkflowStep$1 as WorkflowStep, WorkflowStepContext$1 as WorkflowStepContext, WorkflowStepService, implement, make$1 as make, sleep, sleepUntil, step, waitForEvent };
2347
2475
  }
2348
2476
  interface WorkflowEventService<Payload = unknown> {
2349
2477
  readonly raw: WorkflowEvent<unknown>;
2350
2478
  readonly payload: Payload;
2351
2479
  readonly timestamp: Date;
2352
2480
  readonly instanceId: string;
2481
+ readonly workflowName: string;
2353
2482
  }
2354
2483
  declare const WorkflowEvent_base: Context.ServiceClass<WorkflowEvent$1, "effect-cf/WorkflowEvent", WorkflowEventService<unknown>>;
2355
2484
  declare class WorkflowEvent$1 extends WorkflowEvent_base {}
@@ -2376,7 +2505,7 @@ interface WorkflowOptions<ROut, Payload = unknown, Result = unknown> {
2376
2505
  type WorkflowClass<Payload, Result, _ROut> = new (ctx: globalThis.ExecutionContext, env: WorkerEnv) => WorkflowEntrypoint<WorkerEnv, Payload> & {
2377
2506
  run(event: Readonly<WorkflowEvent<Payload>>, step: WorkflowStep): Promise<Result>;
2378
2507
  };
2379
- declare const make: <ROut, LayerError, Payload = unknown, Result = unknown>(layer: Layer.Layer<ROut, LayerError, ExecutionContext | WorkerContext | WorkerEnvironment>, options: WorkflowOptions<ROut, Payload, Result>) => WorkflowClass<Payload, Result, ROut>;
2508
+ declare const make$1: <ROut, LayerError, Payload = unknown, Result = unknown>(layer: Layer.Layer<ROut, LayerError, ExecutionContext | WorkerContext | WorkerEnvironment>, options: WorkflowOptions<ROut, Payload, Result>) => WorkflowClass<Payload, Result, ROut>;
2380
2509
  declare const step: <A, E, R>(name: string, effect: Effect.Effect<A, E, R>, config?: WorkflowStepConfig) => Effect.Effect<A, unknown, WorkflowStep$1 | Exclude<R, WorkflowStepContext$1>>;
2381
2510
  declare const sleep: (name: string, duration: WorkflowSleepDuration) => Effect.Effect<void, unknown, WorkflowStep$1>;
2382
2511
  declare const sleepUntil: (name: string, timestamp: Date | number) => Effect.Effect<void, unknown, WorkflowStep$1>;
@@ -2388,14 +2517,74 @@ type Definition<Id extends string = string, Payload extends Definition$1.Any["pa
2388
2517
  declare namespace Definition {
2389
2518
  type Any = Definition$1.Any;
2390
2519
  }
2391
- type LayerOptions = LayerOptions$1;
2392
- type TagClass<Self, Id extends string, Payload extends Definition$1.Any["payload"], Result extends Definition$1.Any["result"]> = TagClass$1<Self, Id, Payload, Result>;
2393
- declare const Tag$1: <Self>() => <Id extends string, Payload extends Definition$1.Any["payload"], Result extends Definition$1.Any["result"]>(id: Id, definition: {
2520
+ type LayerOptions$1 = LayerOptions$2;
2521
+ type TagClass$1<Self, Id extends string, Payload extends Definition$1.Any["payload"], Result extends Definition$1.Any["result"]> = TagClass$2<Self, Id, Payload, Result>;
2522
+ declare const Tag$2: <Self>() => <Id extends string, Payload extends Definition$1.Any["payload"], Result extends Definition$1.Any["result"]>(id: Id, definition: {
2394
2523
  readonly payload: Payload;
2395
2524
  readonly result: Result;
2396
- }) => TagClass<Self, Id, Payload, Result>;
2525
+ }) => TagClass$1<Self, Id, Payload, Result>;
2397
2526
  declare const implement: <ROut, const Self extends Definition$1.Any>(_definition: Self, handler: Handler$1<ROut, Self>) => Handler$1<ROut, Self>;
2398
2527
  type Handler<ROut, Self extends Definition$1.Any> = Handler$1<ROut, Self>;
2399
2528
  type Options<ROut, Self extends Definition$1.Any> = Options$1<ROut, Self>;
2529
+ declare namespace Vectorize_d_exports {
2530
+ export { LayerOptions, Tag$1 as Tag, TagClass, VectorizeBinding, VectorizeClient, VectorizeDefinition, VectorizeIndexDetails, VectorizeIndexInfo, VectorizeMatch, VectorizeMatches, VectorizeMutation, VectorizeOperationError, VectorizeQueryOptions, VectorizeService, VectorizeValues, VectorizeVector, VectorizeVectorMetadata, VectorizeVectorMetadataFilter, VectorizeVectorMetadataValue, isVectorizeBinding, layer, make, makeClient };
2531
+ }
2532
+ declare const VectorizeOperationError_base: new <A extends Record<string, any> = {}>(args: _$effect_Types0.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => _$effect_Cause0.YieldableError & {
2533
+ readonly _tag: "VectorizeOperationError";
2534
+ } & Readonly<A>;
2535
+ /** Error raised when a Vectorize operation fails. */
2536
+ declare class VectorizeOperationError extends VectorizeOperationError_base<{
2537
+ readonly binding: string;
2538
+ readonly operation: string;
2539
+ readonly cause: unknown;
2540
+ }> {}
2541
+ /** Typed Vectorize binding definition. */
2542
+ interface VectorizeDefinition {
2543
+ /** Binding name as configured in `wrangler.jsonc`. */
2544
+ readonly binding: string;
2545
+ }
2546
+ type VectorizeBinding = CloudflareVectorize | CloudflareVectorizeIndex;
2547
+ type VectorizeVector = CloudflareVectorizeVector;
2548
+ type VectorizeVectorMetadata = CloudflareVectorizeVectorMetadata;
2549
+ type VectorizeVectorMetadataValue = CloudflareVectorizeVectorMetadataValue;
2550
+ type VectorizeVectorMetadataFilter = CloudflareVectorizeVectorMetadataFilter;
2551
+ type VectorizeQueryOptions = CloudflareVectorizeQueryOptions;
2552
+ type VectorizeMatches = CloudflareVectorizeMatches;
2553
+ type VectorizeMatch = CloudflareVectorizeMatch;
2554
+ type VectorizeIndexInfo = CloudflareVectorizeIndexInfo;
2555
+ type VectorizeIndexDetails = CloudflareVectorizeIndexDetails;
2556
+ type VectorizeMutation = CloudflareVectorizeAsyncMutation | CloudflareVectorizeVectorMutation;
2557
+ type VectorizeValues = Float32Array | Float64Array | ReadonlyArray<number>;
2558
+ interface VectorizeClient {
2559
+ readonly describe: Effect.Effect<VectorizeIndexInfo | VectorizeIndexDetails, VectorizeOperationError>;
2560
+ readonly query: (vector: VectorizeValues, options?: VectorizeQueryOptions) => Effect.Effect<VectorizeMatches, VectorizeOperationError>;
2561
+ readonly queryById: (vectorId: string, options?: VectorizeQueryOptions) => Effect.Effect<VectorizeMatches, VectorizeOperationError>;
2562
+ readonly insert: (vectors: ReadonlyArray<VectorizeVector>) => Effect.Effect<VectorizeMutation, VectorizeOperationError>;
2563
+ readonly upsert: (vectors: ReadonlyArray<VectorizeVector>) => Effect.Effect<VectorizeMutation, VectorizeOperationError>;
2564
+ readonly deleteByIds: (ids: ReadonlyArray<string>) => Effect.Effect<VectorizeMutation, VectorizeOperationError>;
2565
+ readonly delete: (ids: ReadonlyArray<string>) => Effect.Effect<VectorizeMutation, VectorizeOperationError>;
2566
+ readonly getByIds: (ids: ReadonlyArray<string>) => Effect.Effect<ReadonlyArray<VectorizeVector>, VectorizeOperationError>;
2567
+ readonly unsafeRaw: Effect.Effect<VectorizeBinding>;
2568
+ readonly definition: VectorizeDefinition;
2569
+ }
2570
+ declare const VectorizeServiceTypeId: unique symbol;
2571
+ /** Nominal service marker for Vectorize services created with {@link make}. */
2572
+ interface VectorizeService<Id extends string> {
2573
+ readonly [VectorizeServiceTypeId]: {
2574
+ readonly id: Id;
2575
+ };
2576
+ }
2577
+ type LayerOptions = {
2578
+ readonly binding: string;
2579
+ };
2580
+ interface TagClass<Self, Id extends string> extends Context.ServiceClass<Self, Id, VectorizeClient> {
2581
+ readonly id: Id;
2582
+ readonly layer: (options: LayerOptions) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
2583
+ }
2584
+ declare const isVectorizeBinding: (value: unknown) => value is VectorizeBinding;
2585
+ declare const makeClient: (definition: VectorizeDefinition) => (index: VectorizeBinding) => VectorizeClient;
2586
+ declare const layer: <Self>(tag: Context.Service<Self, VectorizeClient>, definition: VectorizeDefinition) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
2587
+ declare const make: <Id extends string>(id: Id) => TagClass<VectorizeService<Id>, Id>;
2588
+ declare const Tag$1: <Self>() => <Id extends string>(id: Id) => TagClass<Self, Id>;
2400
2589
  //#endregion
2401
- export { Binding_d_exports as Binding, CloudflareOtlp_d_exports as CloudflareOtlp, D1_d_exports as D1, DurableObject_d_exports as DurableObject, DurableObjectAlarm_d_exports as DurableObjectAlarm, DurableObjectDefinition_d_exports as DurableObjectDefinition, DurableObjectNamespace_d_exports as DurableObjectNamespace, DurableObjectRpcWebSocket_d_exports as DurableObjectRpcWebSocket, DurableObjectSqlite_d_exports as DurableObjectSqlite, DurableObjectState_d_exports as DurableObjectState, DurableObjectStorage_d_exports as DurableObjectStorage, DurableObjectWebSocket_d_exports as DurableObjectWebSocket, Hyperdrive_d_exports as Hyperdrive, Images_d_exports as Images, Kv_d_exports as Kv, Queue_d_exports as Queue, QueueBinding_d_exports as QueueBinding, QueueDefinition_d_exports as QueueDefinition, R2_d_exports as R2, Rpc_d_exports as Rpc, RpcDefinition_d_exports as RpcDefinition, ServiceBinding_d_exports as ServiceBinding, Worker_d_exports as Worker, WorkerConfig, WorkerDefinition_d_exports as WorkerDefinition, type WorkerEnv, WorkerEnvironment, Workflow_d_exports as Workflow, WorkflowBinding_d_exports as WorkflowBinding, WorkflowDefinition_d_exports as WorkflowDefinition };
2590
+ export { AiGateway_d_exports as AiGateway, Binding_d_exports as Binding, BrowserRendering_d_exports as BrowserRendering, CloudflareOtlp_d_exports as CloudflareOtlp, D1_d_exports as D1, DurableObject_d_exports as DurableObject, DurableObjectAlarm_d_exports as DurableObjectAlarm, DurableObjectDefinition_d_exports as DurableObjectDefinition, DurableObjectNamespace_d_exports as DurableObjectNamespace, DurableObjectRpcWebSocket_d_exports as DurableObjectRpcWebSocket, DurableObjectSqlite_d_exports as DurableObjectSqlite, DurableObjectState_d_exports as DurableObjectState, DurableObjectStorage_d_exports as DurableObjectStorage, DurableObjectWebSocket_d_exports as DurableObjectWebSocket, Hyperdrive_d_exports as Hyperdrive, Images_d_exports as Images, Kv_d_exports as Kv, Queue_d_exports as Queue, QueueBinding_d_exports as QueueBinding, QueueDefinition_d_exports as QueueDefinition, R2_d_exports as R2, Rpc_d_exports as Rpc, RpcDefinition_d_exports as RpcDefinition, ServiceBinding_d_exports as ServiceBinding, Vectorize_d_exports as Vectorize, Worker_d_exports as Worker, WorkerConfig, WorkerDefinition_d_exports as WorkerDefinition, type WorkerEnv, WorkerEnvironment, WorkersAi_d_exports as WorkersAi, Workflow_d_exports as Workflow, WorkflowBinding_d_exports as WorkflowBinding, WorkflowDefinition_d_exports as WorkflowDefinition };