effect-cf 0.25.2 → 0.26.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,8 @@
1
1
  import { a as Environment_d_exports, c as WorkerEnvironment, i as Binding_d_exports, n as BindingService, o as WorkerConfig, r as BindingValidationError, s as WorkerEnv, t as BindingNotFoundError } from "./Binding-COCtoJXa.mjs";
2
+ import { a as ArtifactsOperationError, c as ArtifactsTokenListResult, i as ArtifactsCreateTokenResult, l as Artifacts_d_exports, n as ArtifactsCreateOptions, o as ArtifactsRepoInfo, r as ArtifactsCreateRepoResult, s as ArtifactsTokenInfo, t as ArtifactsBinding, u as RepoName } from "./Artifacts-DcoXcRP5.mjs";
2
3
  import { t as Hyperdrive_d_exports } from "./Hyperdrive-6p59yyVk.mjs";
3
4
  import { A as Rpc_d_exports, C as QueueBinding_d_exports, D as RpcDefinition_d_exports, E as ReservedMethodName$2, M as DurableWebSocket, N as DurableObjectStorage_d_exports, O as ServiceFreeSchema$1, P as StorageOperationError, S as QueueDefinition_d_exports, T as Method$2, _ as AsyncMethodArgs, a as WorkflowInstanceCreateOptions, b as AsyncMethodSuccess, c as DurableObjectState, d as ExecutionContext, f as NativeRequest, g as ServiceBinding_d_exports, h as WorkerDefinition_d_exports, i as WorkflowInstanceCreateBatchOptions, j as DurableObjectWebSocket_d_exports, k as Provider, m as Worker_d_exports, n as WorkflowBinding_d_exports, p as WorkerContext, r as WorkflowInstance, s as WorkflowOperationError, t as WorkflowBindingClient, u as DurableObjectState_d_exports, v as AsyncMethodCloudflareReturn, w as Definition$4, x as Queue_d_exports, y as AsyncMethodKey } from "./WorkflowBinding-D5iWzCUa.mjs";
4
- import { Config, Context, Data, DateTime, Duration, Effect, Layer, Option, Redacted, Schema, Scope } from "effect";
5
+ import { Config, Context, Data, DateTime, Duration, Effect, Layer, Option, Redacted, Schema, Scope, Stream } from "effect";
5
6
  import { Headers as Headers$1, HttpClient, HttpClientResponse } from "effect/unstable/http";
6
7
  import { OtlpExporter } from "effect/unstable/observability";
7
8
  import { D1Client } from "@effect/sql-d1";
@@ -9,10 +10,14 @@ import { DurableObject, WorkflowEntrypoint, WorkflowEvent, WorkflowSleepDuration
9
10
  import * as RpcSerialization from "effect/unstable/rpc/RpcSerialization";
10
11
  import * as RpcServer from "effect/unstable/rpc/RpcServer";
11
12
  import { SqliteClient } from "@effect/sql-sqlite-do";
13
+ import { CommitView, GitClient, GitCloneOptions, GitCommitOptions, GitDiffOptions, GitFetchOptions, GitLogOptions, GitUpdateRefOptions } from "@cloudflare/computer/git";
14
+ import { ExecSyncResult, RuntimeExecOptions, RuntimeGetOptions, RuntimeKillOptions, ShellValue, SkippedEntry, ThinkWorkspaceCompatibility, WorkspaceClient, WorkspaceRuntimeResult, WorkspaceRuntimeValue } from "@cloudflare/computer";
12
15
  import { SqlClient } from "effect/unstable/sql";
13
16
  import * as Tracer from "effect/Tracer";
17
+ import { ArtifactClient, ArtifactImportOptions, ArtifactImportSource, ArtifactRepoSummary, ArtifactScope, ArtifactsCLIInput, ArtifactsCLIResult, RemoteAddFn } from "@cloudflare/computer/artifacts";
18
+ import { ShareOptions } from "@cloudflare/computer/assets";
14
19
  declare namespace WorkersAi_d_exports {
15
- export { LayerOptions$14 as LayerOptions, Tag$13 as Tag, TagClass$12 as TagClass, WorkersAiAsyncBatchResponse, WorkersAiBinding, WorkersAiClient, WorkersAiDefinition, WorkersAiEmbeddingInput, WorkersAiEmbeddingResponse, WorkersAiModelsSearchObject, WorkersAiModelsSearchParams, WorkersAiOperationError, WorkersAiOptions, WorkersAiService, embeddingResponse, isWorkersAiBinding, layer$14 as layer, make$13 as make, makeClient$11 as makeClient };
20
+ export { LayerOptions$14 as LayerOptions, Tag$13 as Tag, TagClass$12 as TagClass, WorkersAiAsyncBatchResponse, WorkersAiBinding, WorkersAiClient, WorkersAiDefinition, WorkersAiEmbeddingInput, WorkersAiEmbeddingResponse, WorkersAiModelsSearchObject, WorkersAiModelsSearchParams, WorkersAiOperationError, WorkersAiOptions, WorkersAiService, embeddingResponse, isWorkersAiBinding, layer$14 as layer, make$13 as make, makeClient$12 as makeClient };
16
21
  }
17
22
  declare const WorkersAiOperationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
18
23
  readonly _tag: "WorkersAiOperationError";
@@ -85,12 +90,12 @@ declare const embeddingResponse: (value: {
85
90
  readonly data?: ReadonlyArray<ReadonlyArray<number>>;
86
91
  readonly shape?: ReadonlyArray<number>;
87
92
  }) => WorkersAiEmbeddingResponse;
88
- declare const makeClient$11: <ModelList extends AiModelListType = AiModels>(definition: WorkersAiDefinition) => (ai: WorkersAiBinding<ModelList>) => WorkersAiClient<ModelList>;
93
+ declare const makeClient$12: <ModelList extends AiModelListType = AiModels>(definition: WorkersAiDefinition) => (ai: WorkersAiBinding<ModelList>) => WorkersAiClient<ModelList>;
89
94
  declare const layer$14: <Self, ModelList extends AiModelListType = AiModels>(tag: Context.Service<Self, WorkersAiClient<ModelList>>, definition: WorkersAiDefinition) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
90
95
  declare const make$13: <Id extends string>(id: Id) => TagClass$12<WorkersAiService<Id>, Id, AiModels>;
91
96
  declare const Tag$13: <Self>() => <Id extends string, ModelList extends AiModelListType = AiModels>(id: Id) => TagClass$12<Self, Id, ModelList>;
92
97
  declare namespace AiGateway_d_exports {
93
- export { AiGatewayBinding, AiGatewayClient, AiGatewayDefinition, AiGatewayFetchOptions, AiGatewayHeaders, AiGatewayLog, AiGatewayOperationError, AiGatewayPatchLog, AiGatewayProvider, AiGatewayRunOptions, AiGatewayService, AiGatewayUniversalRequest, LayerOptions$13 as LayerOptions, Tag$12 as Tag, TagClass$11 as TagClass, isAiGatewayBinding, layer$13 as layer, make$12 as make, makeClient$10 as makeClient, makeClientFromAi, makeHttpClient };
98
+ export { AiGatewayBinding, AiGatewayClient, AiGatewayDefinition, AiGatewayFetchOptions, AiGatewayHeaders, AiGatewayLog, AiGatewayOperationError, AiGatewayPatchLog, AiGatewayProvider, AiGatewayRunOptions, AiGatewayService, AiGatewayUniversalRequest, LayerOptions$13 as LayerOptions, Tag$12 as Tag, TagClass$11 as TagClass, isAiGatewayBinding, layer$13 as layer, make$12 as make, makeClient$11 as makeClient, makeClientFromAi, makeHttpClient };
94
99
  }
95
100
  declare const AiGatewayOperationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
96
101
  readonly _tag: "AiGatewayOperationError";
@@ -151,7 +156,7 @@ interface TagClass$11<Self, Id extends string> extends Context.ServiceClass<Self
151
156
  readonly layer: (options: LayerOptions$13) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError | AiGatewayOperationError, WorkerEnvironment>;
152
157
  }
153
158
  declare const isAiGatewayBinding: (value: unknown) => value is WorkersAiBinding;
154
- declare const makeClient$10: (definition: AiGatewayDefinition, gateway: AiGatewayBinding) => {
159
+ declare const makeClient$11: (definition: AiGatewayDefinition, gateway: AiGatewayBinding) => {
155
160
  definition: AiGatewayDefinition;
156
161
  run: (data: import("@cloudflare/workers-types").AIGatewayUniversalRequest | readonly import("@cloudflare/workers-types").AIGatewayUniversalRequest[], options?: {
157
162
  gateway?: import("@cloudflare/workers-types").UniversalGatewayOptions;
@@ -173,7 +178,7 @@ declare const layer$13: <Self>(tag: Context.Service<Self, AiGatewayClient>, defi
173
178
  declare const make$12: <Id extends string>(id: Id) => TagClass$11<AiGatewayService<Id>, Id>;
174
179
  declare const Tag$12: <Self>() => <Id extends string>(id: Id) => TagClass$11<Self, Id>;
175
180
  declare namespace AnalyticsEngine_d_exports {
176
- export { AnalyticsEngineBinding, AnalyticsEngineClient, AnalyticsEngineDataPoint, AnalyticsEngineDataPointSchema, AnalyticsEngineDefinition, AnalyticsEngineFieldValue, AnalyticsEngineFieldValueSchema, AnalyticsEngineInvalidWritePolicy, AnalyticsEngineOperationError, AnalyticsEngineQueryClient, AnalyticsEngineQueryColumn, AnalyticsEngineQueryDefinition, AnalyticsEngineQueryError, AnalyticsEngineQueryOptions, AnalyticsEngineQueryResult, AnalyticsEngineQueryRow, AnalyticsEngineQueryService, AnalyticsEngineService, AnalyticsEngineWriteError, AnalyticsEngineWriteOptions, AnalyticsEngineWritePolicy, AnalyticsEngineWriteValidationError, AnalyticsEngineWriteViolation, LayerOptions$12 as LayerOptions, QueryConfigOptions, QueryTag, QueryTagClass, Tag$11 as Tag, TagClass$10 as TagClass, isAnalyticsEngineDataset, layer$12 as layer, layerFetch, layerFetchConfig, make$11 as make, makeClient$9 as makeClient, makeQuery, makeQueryClient, queryConfig, queryLayer, queryLayerConfig, writeLimits };
181
+ export { AnalyticsEngineBinding, AnalyticsEngineClient, AnalyticsEngineDataPoint, AnalyticsEngineDataPointSchema, AnalyticsEngineDefinition, AnalyticsEngineFieldValue, AnalyticsEngineFieldValueSchema, AnalyticsEngineInvalidWritePolicy, AnalyticsEngineOperationError, AnalyticsEngineQueryClient, AnalyticsEngineQueryColumn, AnalyticsEngineQueryDefinition, AnalyticsEngineQueryError, AnalyticsEngineQueryOptions, AnalyticsEngineQueryResult, AnalyticsEngineQueryRow, AnalyticsEngineQueryService, AnalyticsEngineService, AnalyticsEngineWriteError, AnalyticsEngineWriteOptions, AnalyticsEngineWritePolicy, AnalyticsEngineWriteValidationError, AnalyticsEngineWriteViolation, LayerOptions$12 as LayerOptions, QueryConfigOptions, QueryTag, QueryTagClass, Tag$11 as Tag, TagClass$10 as TagClass, isAnalyticsEngineDataset, layer$12 as layer, layerFetch, layerFetchConfig, make$11 as make, makeClient$10 as makeClient, makeQuery, makeQueryClient, queryConfig, queryLayer, queryLayerConfig, writeLimits };
177
182
  }
178
183
  declare const writeLimits: {
179
184
  readonly maxBlobs: 20;
@@ -323,7 +328,7 @@ interface QueryTagClass<Self, Id extends string> extends Context.ServiceClass<Se
323
328
  }
324
329
  declare const makeQueryClient: (definition: AnalyticsEngineQueryDefinition) => Effect.Effect<AnalyticsEngineQueryClient, never, HttpClient.HttpClient>;
325
330
  declare const isAnalyticsEngineDataset: (value: unknown) => value is AnalyticsEngineBinding;
326
- declare const makeClient$9: (definition: AnalyticsEngineDefinition, defaults?: AnalyticsEngineWritePolicy) => (dataset: AnalyticsEngineBinding) => AnalyticsEngineClient;
331
+ declare const makeClient$10: (definition: AnalyticsEngineDefinition, defaults?: AnalyticsEngineWritePolicy) => (dataset: AnalyticsEngineBinding) => AnalyticsEngineClient;
327
332
  declare const queryConfig: (options?: QueryConfigOptions) => Config.Config<{
328
333
  accountId: string;
329
334
  apiToken: Redacted.Redacted<string>;
@@ -339,7 +344,7 @@ declare const makeQuery: <Id extends string>(id: Id) => QueryTagClass<AnalyticsE
339
344
  declare const Tag$11: <Self>() => <Id extends string>(id: Id) => TagClass$10<Self, Id>;
340
345
  declare const QueryTag: <Self>() => <Id extends string>(id: Id) => QueryTagClass<Self, Id>;
341
346
  declare namespace BrowserRendering_d_exports {
342
- export { BrowserRenderingBinding, BrowserRenderingBrowserClient, BrowserRenderingBrowserLike, BrowserRenderingClient, BrowserRenderingConnect, BrowserRenderingDefinition, BrowserRenderingLaunch, BrowserRenderingOperationError, BrowserRenderingPageClient, BrowserRenderingPageLike, BrowserRenderingService, LayerOptions$11 as LayerOptions, Tag$10 as Tag, TagClass$9 as TagClass, isBrowserRenderingBinding, layer$11 as layer, make$10 as make, makeClient$8 as makeClient };
347
+ export { BrowserRenderingBinding, BrowserRenderingBrowserClient, BrowserRenderingBrowserLike, BrowserRenderingClient, BrowserRenderingConnect, BrowserRenderingDefinition, BrowserRenderingLaunch, BrowserRenderingOperationError, BrowserRenderingPageClient, BrowserRenderingPageLike, BrowserRenderingService, LayerOptions$11 as LayerOptions, Tag$10 as Tag, TagClass$9 as TagClass, isBrowserRenderingBinding, layer$11 as layer, make$10 as make, makeClient$9 as makeClient };
343
348
  }
344
349
  declare const BrowserRenderingOperationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
345
350
  readonly _tag: "BrowserRenderingOperationError";
@@ -413,12 +418,12 @@ interface TagClass$9<Self, Id extends string> extends Context.ServiceClass<Self,
413
418
  readonly layer: (options: LayerOptions$11) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
414
419
  }
415
420
  declare const isBrowserRenderingBinding: (value: unknown) => value is BrowserRenderingBinding;
416
- declare const makeClient$8: <RawBinding extends BrowserRenderingBinding = BrowserRenderingBinding>(definition: BrowserRenderingDefinition) => (binding: RawBinding) => BrowserRenderingClient<RawBinding>;
421
+ declare const makeClient$9: <RawBinding extends BrowserRenderingBinding = BrowserRenderingBinding>(definition: BrowserRenderingDefinition) => (binding: RawBinding) => BrowserRenderingClient<RawBinding>;
417
422
  declare const layer$11: <Self>(tag: Context.Service<Self, BrowserRenderingClient>, definition: BrowserRenderingDefinition) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
418
423
  declare const make$10: <Id extends string>(id: Id) => TagClass$9<BrowserRenderingService<Id>, Id>;
419
424
  declare const Tag$10: <Self>() => <Id extends string>(id: Id) => TagClass$9<Self, Id>;
420
425
  declare namespace Cache_d_exports {
421
- export { CacheClient, CacheOperation, CacheOperationError, CacheQueryOptions, CacheRequest, CacheStorage, CacheStorageClient, layer$10 as layer, layerFrom, makeCacheClient, makeClient$7 as makeClient };
426
+ export { CacheClient, CacheOperation, CacheOperationError, CacheQueryOptions, CacheRequest, CacheStorage, CacheStorageClient, layer$10 as layer, layerFrom, makeCacheClient, makeClient$8 as makeClient };
422
427
  }
423
428
  /** Request key accepted by Cloudflare's Cache API. */
424
429
  type CacheRequest = CloudflareRequestInfo | URL;
@@ -465,7 +470,7 @@ declare class CacheStorage extends CacheStorage_base {}
465
470
  /** Wraps a native Cloudflare `Cache` instance. */
466
471
  declare const makeCacheClient: (cache: CloudflareCache, name?: string) => CacheClient;
467
472
  /** Wraps a native Cloudflare `CacheStorage` instance. */
468
- declare const makeClient$7: (storage: CloudflareCacheStorage) => CacheStorageClient;
473
+ declare const makeClient$8: (storage: CloudflareCacheStorage) => CacheStorageClient;
469
474
  /** Provides Cache API services from an explicit native `CacheStorage` instance. */
470
475
  declare const layerFrom: (storage: CloudflareCacheStorage) => Layer.Layer<CacheStorage>;
471
476
  /** Provides Cache API services from Cloudflare's global `caches` object. */
@@ -568,6 +573,331 @@ declare const layerWorker: (options?: WorkerLayerOptions) => Layer.Layer<OtlpExp
568
573
  * backend can tolerate high-cardinality resource attributes.
569
574
  */
570
575
  declare const layerDurableObject: (options?: DurableObjectLayerOptions) => Layer.Layer<OtlpExporter.Flusher, never, DurableObjectState>;
576
+ declare namespace ComputerArtifacts_d_exports {
577
+ export { ComputerArtifactImportOptions, ComputerArtifactImportSource, ComputerArtifactRepoSummary, ComputerArtifactScope, ComputerArtifactsCliInput, ComputerArtifactsCliResult, ComputerArtifactsClient, ComputerArtifactsClientOptions, ComputerArtifactsRemoteAdd, fromClient, makeClient$7 as makeClient };
578
+ }
579
+ /** External Git source accepted by a session-scoped repository import. */
580
+ type ComputerArtifactImportSource = Readonly<ArtifactImportSource>;
581
+ /** Target options accepted by a session-scoped repository import. */
582
+ type ComputerArtifactImportOptions = Readonly<ArtifactImportOptions>;
583
+ /** Repository metadata returned by a session-scoped list operation. */
584
+ type ComputerArtifactRepoSummary = Readonly<ArtifactRepoSummary>;
585
+ /** Token scope accepted by the upstream session facade. */
586
+ type ComputerArtifactScope = ArtifactScope;
587
+ /** Optional Git remote-registration seam accepted by the argv API. */
588
+ type ComputerArtifactsRemoteAdd = RemoteAddFn;
589
+ /** Input to the session-scoped `artifacts` argv API. */
590
+ type ComputerArtifactsCliInput = ArtifactsCLIInput;
591
+ /** Result from the session-scoped `artifacts` argv API. */
592
+ type ComputerArtifactsCliResult = Readonly<ArtifactsCLIResult>;
593
+ /** Options used when wrapping a session-scoped Artifacts client. */
594
+ interface ComputerArtifactsClientOptions {
595
+ /** Binding name attached to errors and tracing spans. Defaults to `ARTIFACTS`. */
596
+ readonly binding?: string;
597
+ }
598
+ /**
599
+ * Effect-native facade over `@cloudflare/computer/artifacts`.
600
+ *
601
+ * Repository names are local to {@link sessionId}. Prefixing and filtering are
602
+ * intentionally delegated to the upstream `createArtifact` implementation so
603
+ * this client and the worker-shell `artifacts` command always use the same
604
+ * namespace convention.
605
+ */
606
+ interface ComputerArtifactsClient {
607
+ readonly sessionId: string;
608
+ readonly create: (name: RepoName, options?: ArtifactsCreateOptions) => Effect.Effect<ArtifactsCreateRepoResult, ArtifactsOperationError>;
609
+ readonly get: (name: RepoName) => Effect.Effect<ArtifactsRepoInfo, ArtifactsOperationError>;
610
+ readonly list: Effect.Effect<ReadonlyArray<ComputerArtifactRepoSummary>, ArtifactsOperationError>;
611
+ readonly import: (name: RepoName, source: ComputerArtifactImportSource, options?: ComputerArtifactImportOptions) => Effect.Effect<ArtifactsCreateRepoResult, ArtifactsOperationError>;
612
+ readonly delete: (name: RepoName) => Effect.Effect<boolean, ArtifactsOperationError>;
613
+ readonly createToken: (name: RepoName, scope?: ComputerArtifactScope, ttl?: number) => Effect.Effect<ArtifactsCreateTokenResult, ArtifactsOperationError>;
614
+ readonly listTokens: (name: RepoName) => Effect.Effect<ArtifactsTokenListResult, ArtifactsOperationError>;
615
+ readonly getToken: (name: RepoName, id: string) => Effect.Effect<ArtifactsTokenInfo, ArtifactsOperationError>;
616
+ readonly revokeToken: (name: RepoName, tokenOrId: string) => Effect.Effect<boolean, ArtifactsOperationError>;
617
+ readonly cli: (input: ComputerArtifactsCliInput) => Effect.Effect<ComputerArtifactsCliResult, ArtifactsOperationError>;
618
+ readonly rawUnsafe: Effect.Effect<ArtifactClient>;
619
+ }
620
+ /** Wraps an already-created upstream session client. */
621
+ declare const fromClient: (client: ArtifactClient, options?: ComputerArtifactsClientOptions) => ComputerArtifactsClient;
622
+ /**
623
+ * Creates an Effect-native session client directly from a Worker Artifacts
624
+ * binding. `@cloudflare/computer` is loaded only when this Effect runs, keeping
625
+ * the optional peer out of applications that do not use this integration.
626
+ */
627
+ declare const makeClient$7: (bindingValue: ArtifactsBinding, sessionId: string, options?: ComputerArtifactsClientOptions | undefined) => Effect.Effect<ComputerArtifactsClient, ArtifactsOperationError, never>;
628
+ declare namespace ComputerWorkspace_d_exports {
629
+ export { ComputerWorkspace, ComputerWorkspaceAssets, ComputerWorkspaceFilesystem, ComputerWorkspaceGit, ComputerWorkspaceRuntime, ComputerWorkspaceShape, ComputerWorkspaceThink, ListDirectoryOptions, ReadTextFileOptions, RemovePathOptions, WorkspaceAssetsError, WorkspaceDirectoryEntry, WorkspaceEntryStat, WorkspaceExec, WorkspaceExecChunk, WorkspaceExecCollect, WorkspaceExecEncoding, WorkspaceExecError, WorkspaceExecEvent, WorkspaceExecOptions, WorkspaceExecResult, WorkspaceExecRun, WorkspaceExecSignal, WorkspaceExecSkippedEntry, WorkspaceExecSyncResult, WorkspaceFindOptions, WorkspaceFoundEntry, WorkspaceFsError, WorkspaceGetExec, WorkspaceGetExecOptions, WorkspaceGitCheckoutOptions, WorkspaceGitCloneOptions, WorkspaceGitCommit, WorkspaceGitCommitOptions, WorkspaceGitDiffOptions, WorkspaceGitError, WorkspaceGitFetchOptions, WorkspaceGitFetchResult, WorkspaceGitLogOptions, WorkspaceGitPerson, WorkspaceGitUpdateRefOptions, WorkspaceGrepMatch, WorkspaceGrepOptions, WorkspaceMkdirOptions, WorkspaceReadEncoding, WorkspaceReadFile, WorkspaceReadFileOptions, WorkspaceRuntimeValue$1 as WorkspaceRuntimeValue, WorkspaceWriteFileContent, WorkspaceWriteFileOptions, fromWorkspaceClient };
630
+ }
631
+ type CloudflareWorkspaceFilesystem = WorkspaceClient["fs"];
632
+ type CloudflareReadFileOptions = Parameters<CloudflareWorkspaceFilesystem["readFile"]>[1];
633
+ type CloudflareReaddirOptions = Parameters<CloudflareWorkspaceFilesystem["readdir"]>[1];
634
+ type CloudflareFindOptions = Parameters<CloudflareWorkspaceFilesystem["find"]>[2];
635
+ type CloudflareGrepOptions = Parameters<CloudflareWorkspaceFilesystem["grep"]>[2];
636
+ type CloudflareRmOptions = Parameters<CloudflareWorkspaceFilesystem["rm"]>[1];
637
+ type CloudflareMkdirOptions = Parameters<CloudflareWorkspaceFilesystem["mkdir"]>[1];
638
+ type CloudflareWriteFileContent = Parameters<CloudflareWorkspaceFilesystem["writeFile"]>[1];
639
+ type CloudflareWriteFileOptions = Parameters<CloudflareWorkspaceFilesystem["writeFile"]>[2];
640
+ type CloudflareWorkspaceDirentResult = Awaited<ReturnType<CloudflareWorkspaceFilesystem["readdir"]>>[number];
641
+ type CloudflareWorkspaceStatResult = Awaited<ReturnType<CloudflareWorkspaceFilesystem["stat"]>>;
642
+ type CloudflareWorkspaceFoundEntry = Awaited<ReturnType<CloudflareWorkspaceFilesystem["find"]>>[number];
643
+ type CloudflareWorkspaceGrepMatch = Awaited<ReturnType<CloudflareWorkspaceFilesystem["grep"]>>[number];
644
+ declare const WorkspaceFsError_base: Schema.Class<WorkspaceFsError, Schema.TaggedStruct<"WorkspaceFsError", {
645
+ readonly operation: Schema.String;
646
+ readonly path: Schema.String;
647
+ readonly message: Schema.String;
648
+ readonly code: Schema.optionalKey<Schema.String>;
649
+ readonly cause: Schema.optionalKey<Schema.Defect>;
650
+ }>, import("effect/Cause").YieldableError>;
651
+ /**
652
+ * Workspace errors use `Schema.TaggedError`, unlike most local binding errors,
653
+ * because workspace operations commonly sit behind Durable Object RPC methods.
654
+ * The schema form preserves the operation-family tags across that boundary.
655
+ */
656
+ declare class WorkspaceFsError extends WorkspaceFsError_base {}
657
+ declare const WorkspaceGitError_base: Schema.Class<WorkspaceGitError, Schema.TaggedStruct<"WorkspaceGitError", {
658
+ readonly operation: Schema.String;
659
+ readonly message: Schema.String;
660
+ readonly code: Schema.optionalKey<Schema.String>;
661
+ readonly cause: Schema.optionalKey<Schema.Defect>;
662
+ }>, import("effect/Cause").YieldableError>;
663
+ /** Schema-serializable error for a workspace Git operation. */
664
+ declare class WorkspaceGitError extends WorkspaceGitError_base {}
665
+ declare const WorkspaceExecError_base: Schema.Class<WorkspaceExecError, Schema.TaggedStruct<"WorkspaceExecError", {
666
+ readonly operation: Schema.String;
667
+ readonly message: Schema.String;
668
+ readonly code: Schema.optionalKey<Schema.String>;
669
+ readonly cause: Schema.optionalKey<Schema.Defect>;
670
+ }>, import("effect/Cause").YieldableError>;
671
+ /** Schema-serializable error for a workspace runtime operation. */
672
+ declare class WorkspaceExecError extends WorkspaceExecError_base {}
673
+ declare const WorkspaceAssetsError_base: Schema.Class<WorkspaceAssetsError, Schema.TaggedStruct<"WorkspaceAssetsError", {
674
+ readonly operation: Schema.String;
675
+ readonly path: Schema.String;
676
+ readonly message: Schema.String;
677
+ readonly code: Schema.optionalKey<Schema.String>;
678
+ readonly cause: Schema.optionalKey<Schema.Defect>;
679
+ }>, import("effect/Cause").YieldableError>;
680
+ /** Schema-serializable error for a workspace Assets operation. */
681
+ declare class WorkspaceAssetsError extends WorkspaceAssetsError_base {}
682
+ type WorkspaceReadFileOptions = Omit<CloudflareReadFileOptions, "encoding">;
683
+ type ReadTextFileOptions = WorkspaceReadFileOptions;
684
+ type ListDirectoryOptions = CloudflareReaddirOptions;
685
+ type WorkspaceDirectoryEntry = CloudflareWorkspaceDirentResult;
686
+ type WorkspaceEntryStat = CloudflareWorkspaceStatResult;
687
+ type WorkspaceFindOptions = CloudflareFindOptions;
688
+ type WorkspaceFoundEntry = CloudflareWorkspaceFoundEntry;
689
+ type WorkspaceGrepOptions = CloudflareGrepOptions;
690
+ type WorkspaceGrepMatch = CloudflareWorkspaceGrepMatch;
691
+ type RemovePathOptions = CloudflareRmOptions;
692
+ type WorkspaceMkdirOptions = CloudflareMkdirOptions;
693
+ type WorkspaceWriteFileContent = CloudflareWriteFileContent;
694
+ type WorkspaceWriteFileOptions = CloudflareWriteFileOptions;
695
+ /** Explicit read mode. Text remains the default for consumer-port compatibility. */
696
+ type WorkspaceReadEncoding = "utf8" | "stream";
697
+ interface WorkspaceReadFile {
698
+ (path: string, options?: WorkspaceReadFileOptions & {
699
+ readonly encoding?: "utf8";
700
+ }): Effect.Effect<string, WorkspaceFsError>;
701
+ (path: string, options: WorkspaceReadFileOptions & {
702
+ readonly encoding: "stream";
703
+ }): Effect.Effect<ReadableStream<Uint8Array>, WorkspaceFsError>;
704
+ }
705
+ /** Complete Effect wrapper of `WorkspaceClient.fs`. */
706
+ interface ComputerWorkspaceFilesystem {
707
+ readonly readFile: WorkspaceReadFile;
708
+ readonly stat: (path: string) => Effect.Effect<WorkspaceEntryStat, WorkspaceFsError>;
709
+ readonly lstat: (path: string) => Effect.Effect<WorkspaceEntryStat, WorkspaceFsError>;
710
+ readonly exists: (path: string) => Effect.Effect<boolean, WorkspaceFsError>;
711
+ readonly readlink: (path: string) => Effect.Effect<string, WorkspaceFsError>;
712
+ readonly readdir: (path: string, options?: ListDirectoryOptions) => Effect.Effect<ReadonlyArray<WorkspaceDirectoryEntry>, WorkspaceFsError>;
713
+ readonly find: (directory: string, pattern?: string, options?: WorkspaceFindOptions) => Effect.Effect<ReadonlyArray<WorkspaceFoundEntry>, WorkspaceFsError>;
714
+ readonly ls: (prefix: string) => Effect.Effect<ReadonlyArray<string>, WorkspaceFsError>;
715
+ readonly grep: (pattern: string, path: string, options?: WorkspaceGrepOptions) => Effect.Effect<ReadonlyArray<WorkspaceGrepMatch>, WorkspaceFsError>;
716
+ readonly writeFile: (path: string, content: WorkspaceWriteFileContent, options?: WorkspaceWriteFileOptions) => Effect.Effect<void, WorkspaceFsError>;
717
+ readonly mkdir: (path: string, options?: WorkspaceMkdirOptions) => Effect.Effect<void, WorkspaceFsError>;
718
+ readonly rm: (path: string, options?: RemovePathOptions) => Effect.Effect<void, WorkspaceFsError>;
719
+ readonly chmod: (path: string, mode: number) => Effect.Effect<void, WorkspaceFsError>;
720
+ readonly symlink: (target: string, path: string) => Effect.Effect<void, WorkspaceFsError>;
721
+ }
722
+ type WorkspaceGitCloneOptions = GitCloneOptions;
723
+ type WorkspaceGitFetchOptions = GitFetchOptions;
724
+ type WorkspaceGitFetchResult = Awaited<ReturnType<GitClient["fetch"]>>;
725
+ type WorkspaceGitCheckoutOptions = Parameters<GitClient["checkout"]>[0];
726
+ type WorkspaceGitUpdateRefOptions = GitUpdateRefOptions;
727
+ type WorkspaceGitDiffOptions = GitDiffOptions;
728
+ type WorkspaceGitCommitOptions = GitCommitOptions;
729
+ interface WorkspaceGitLogOptions extends Omit<GitLogOptions, "depth"> {
730
+ /** Preferred upstream name for the history bound. */
731
+ readonly depth?: number;
732
+ /** Consumer-port compatibility alias for `depth`. */
733
+ readonly maxCount?: number;
734
+ }
735
+ type WorkspaceGitPerson = CommitView["author"] & {
736
+ /** Consumer-port compatibility alias for `timestamp`. */
737
+ readonly timestampSeconds: number;
738
+ };
739
+ interface WorkspaceGitCommit {
740
+ readonly oid: string;
741
+ readonly message: string;
742
+ readonly tree: string;
743
+ readonly parent: ReadonlyArray<string>;
744
+ /** Consumer-port compatibility alias for `parent`. */
745
+ readonly parents: ReadonlyArray<string>;
746
+ readonly author: WorkspaceGitPerson;
747
+ readonly committer: WorkspaceGitPerson;
748
+ }
749
+ type EffectGitMethod<Method> = Method extends ((...args: infer Args) => Promise<infer Success>) ? (...args: Args) => Effect.Effect<Success, WorkspaceGitError> : never;
750
+ type EffectGitClient = { readonly [Name in keyof GitClient]: EffectGitMethod<GitClient[Name]>; };
751
+ /** Complete Effect wrapper of the `@cloudflare/computer/git` client. */
752
+ type ComputerWorkspaceGit = Omit<EffectGitClient, "log" | "revParse"> & {
753
+ readonly log: (options?: WorkspaceGitLogOptions) => Effect.Effect<ReadonlyArray<WorkspaceGitCommit>, WorkspaceGitError>;
754
+ readonly revParse: {
755
+ (ref: string): Effect.Effect<string, WorkspaceGitError>;
756
+ (options: Parameters<GitClient["revParse"]>[0]): Effect.Effect<string, WorkspaceGitError>;
757
+ };
758
+ };
759
+ type WorkspaceExecSignal = NonNullable<RuntimeKillOptions["signal"]>;
760
+ type WorkspaceRuntimeValue$1 = WorkspaceRuntimeValue;
761
+ type WorkspaceExecEncoding = "utf8" | "binary";
762
+ type WorkspaceExecSyncResult = ExecSyncResult;
763
+ type WorkspaceExecSkippedEntry = SkippedEntry;
764
+ type CloudflareEncoding<Encoding extends WorkspaceExecEncoding> = Encoding extends "utf8" ? "utf8" : undefined;
765
+ type WorkspaceExecChunk<Encoding extends WorkspaceExecEncoding> = Encoding extends "utf8" ? string : Uint8Array;
766
+ type WorkspaceExecOptions<Encoding extends WorkspaceExecEncoding = "utf8"> = Omit<RuntimeExecOptions, "encoding" | "timeoutMs"> & {
767
+ readonly encoding?: Encoding;
768
+ /** Upstream runtime option name. */
769
+ readonly timeoutMs?: number;
770
+ /** Consumer-port compatibility alias for `timeoutMs`. */
771
+ readonly timeoutMillis?: number;
772
+ };
773
+ type WorkspaceGetExecOptions<Encoding extends WorkspaceExecEncoding = "utf8"> = Omit<RuntimeGetOptions, "encoding"> & {
774
+ readonly encoding?: Encoding;
775
+ };
776
+ type WorkspaceExecEvent<Encoding extends WorkspaceExecEncoding = "utf8"> = ({
777
+ readonly _tag: "Stdout";
778
+ readonly id: string;
779
+ readonly sequence: number;
780
+ readonly chunk: WorkspaceExecChunk<Encoding>;
781
+ } & (Encoding extends "utf8" ? {
782
+ readonly text: string;
783
+ } : {
784
+ readonly bytes: Uint8Array;
785
+ })) | ({
786
+ readonly _tag: "Stderr";
787
+ readonly id: string;
788
+ readonly sequence: number;
789
+ readonly chunk: WorkspaceExecChunk<Encoding>;
790
+ } & (Encoding extends "utf8" ? {
791
+ readonly text: string;
792
+ } : {
793
+ readonly bytes: Uint8Array;
794
+ })) | {
795
+ readonly _tag: "Exit";
796
+ readonly id: string;
797
+ readonly sequence: number;
798
+ readonly exitCode: number;
799
+ readonly value?: WorkspaceRuntimeValue$1;
800
+ };
801
+ interface WorkspaceExecResult<Encoding extends WorkspaceExecEncoding = "utf8"> {
802
+ readonly status: WorkspaceRuntimeResult<CloudflareEncoding<Encoding>>["status"];
803
+ readonly exitCode: number;
804
+ readonly stdout: WorkspaceExecChunk<Encoding>;
805
+ readonly stderr: WorkspaceExecChunk<Encoding>;
806
+ readonly value?: WorkspaceRuntimeValue$1;
807
+ readonly pushed: number;
808
+ readonly pulled: number;
809
+ readonly skipped: ReadonlyArray<WorkspaceExecSkippedEntry>;
810
+ readonly sync: WorkspaceExecSyncResult;
811
+ }
812
+ interface WorkspaceExecRun<Encoding extends WorkspaceExecEncoding = "utf8"> {
813
+ readonly id: string;
814
+ readonly backend: string;
815
+ /**
816
+ * Live output. Like the upstream handle, `events` and `result` are mutually
817
+ * exclusive consumers of a run.
818
+ */
819
+ readonly events: Stream.Stream<WorkspaceExecEvent<Encoding>, WorkspaceExecError>;
820
+ readonly result: Effect.Effect<WorkspaceExecResult<Encoding>, WorkspaceExecError>;
821
+ readonly kill: (signal?: WorkspaceExecSignal) => Effect.Effect<void, WorkspaceExecError>;
822
+ }
823
+ interface WorkspaceExec {
824
+ (strings: TemplateStringsArray, ...values: Array<ShellValue>): Effect.Effect<WorkspaceExecRun<"utf8">, WorkspaceExecError, Scope.Scope>;
825
+ (command: string, options?: WorkspaceExecOptions<"utf8">): Effect.Effect<WorkspaceExecRun<"utf8">, WorkspaceExecError, Scope.Scope>;
826
+ (command: string, options: WorkspaceExecOptions<"binary">): Effect.Effect<WorkspaceExecRun<"binary">, WorkspaceExecError, Scope.Scope>;
827
+ }
828
+ interface WorkspaceGetExec {
829
+ (id: string, options?: WorkspaceGetExecOptions<"utf8">): Effect.Effect<WorkspaceExecRun<"utf8">, WorkspaceExecError, Scope.Scope>;
830
+ (id: string, options: WorkspaceGetExecOptions<"binary">): Effect.Effect<WorkspaceExecRun<"binary">, WorkspaceExecError, Scope.Scope>;
831
+ }
832
+ interface WorkspaceExecCollect {
833
+ (strings: TemplateStringsArray, ...values: Array<ShellValue>): Effect.Effect<WorkspaceExecResult<"utf8">, WorkspaceExecError>;
834
+ (command: string, options?: WorkspaceExecOptions<"utf8">): Effect.Effect<WorkspaceExecResult<"utf8">, WorkspaceExecError>;
835
+ (command: string, options: WorkspaceExecOptions<"binary">): Effect.Effect<WorkspaceExecResult<"binary">, WorkspaceExecError>;
836
+ }
837
+ /** Complete Effect wrapper of `WorkspaceClient.runtime`. */
838
+ interface ComputerWorkspaceRuntime {
839
+ readonly exec: WorkspaceExec;
840
+ readonly execCollect: WorkspaceExecCollect;
841
+ readonly getExec: WorkspaceGetExec;
842
+ readonly killExec: (id: string, options?: RuntimeKillOptions) => Effect.Effect<void, WorkspaceExecError>;
843
+ readonly disposeExec: (id: string, options?: {
844
+ readonly backend?: string;
845
+ }) => Effect.Effect<void, WorkspaceExecError>;
846
+ }
847
+ /** Effect wrapper over a configured local `Workspace.assets` client. */
848
+ interface ComputerWorkspaceAssets {
849
+ readonly share: (path: string, options: ShareOptions) => Effect.Effect<string, WorkspaceAssetsError>;
850
+ }
851
+ type EffectThinkMethod<Method> = Method extends ((...args: infer Args) => Promise<infer Success>) ? (...args: Args) => Effect.Effect<Success, WorkspaceFsError> : never;
852
+ /** Effect wrapper of the optional Think compatibility surface. */
853
+ type ComputerWorkspaceThink = { readonly [Name in keyof ThinkWorkspaceCompatibility]: EffectThinkMethod<ThinkWorkspaceCompatibility[Name]>; };
854
+ /** Effect service over every client surface exposed by Cloudflare Computer. */
855
+ interface ComputerWorkspaceShape {
856
+ readonly fs: ComputerWorkspaceFilesystem;
857
+ readonly git: ComputerWorkspaceGit;
858
+ readonly runtime: ComputerWorkspaceRuntime;
859
+ readonly artifacts: ComputerArtifactsClient;
860
+ readonly assets: ComputerWorkspaceAssets | undefined;
861
+ readonly think: ComputerWorkspaceThink | undefined;
862
+ /** Flat filesystem aliases retained for mechanical consumer migration. */
863
+ readonly readFile: WorkspaceReadFile;
864
+ readonly stat: ComputerWorkspaceFilesystem["stat"];
865
+ readonly lstat: ComputerWorkspaceFilesystem["lstat"];
866
+ readonly exists: ComputerWorkspaceFilesystem["exists"];
867
+ readonly readlink: ComputerWorkspaceFilesystem["readlink"];
868
+ readonly readdir: ComputerWorkspaceFilesystem["readdir"];
869
+ readonly listDirectory: ComputerWorkspaceFilesystem["readdir"];
870
+ readonly find: ComputerWorkspaceFilesystem["find"];
871
+ readonly ls: ComputerWorkspaceFilesystem["ls"];
872
+ readonly grep: ComputerWorkspaceFilesystem["grep"];
873
+ readonly writeFile: ComputerWorkspaceFilesystem["writeFile"];
874
+ readonly mkdir: ComputerWorkspaceFilesystem["mkdir"];
875
+ readonly rm: ComputerWorkspaceFilesystem["rm"];
876
+ readonly removePath: ComputerWorkspaceFilesystem["rm"];
877
+ readonly chmod: ComputerWorkspaceFilesystem["chmod"];
878
+ readonly symlink: ComputerWorkspaceFilesystem["symlink"];
879
+ /** Flat runtime aliases retained for mechanical consumer migration. */
880
+ readonly exec: WorkspaceExec;
881
+ readonly execCollect: WorkspaceExecCollect;
882
+ readonly getExec: WorkspaceGetExec;
883
+ readonly killExec: ComputerWorkspaceRuntime["killExec"];
884
+ readonly disposeExec: ComputerWorkspaceRuntime["disposeExec"];
885
+ }
886
+ /**
887
+ * Wraps a client whose lifetime is owned by the caller. Prefer
888
+ * {@link ComputerWorkspace.layer} in Durable Objects so the parent client and
889
+ * every runtime handle are disposed by Effect `Scope`.
890
+ */
891
+ declare const fromWorkspaceClient: (client: WorkspaceClient) => ComputerWorkspaceShape;
892
+ declare const ComputerWorkspace_base: Context.ServiceClass<ComputerWorkspace, "effect-cf/ComputerWorkspace", ComputerWorkspaceShape>;
893
+ /** Effect service for the workspace owned by the enclosing Durable Object. */
894
+ declare class ComputerWorkspace extends ComputerWorkspace_base {
895
+ /**
896
+ * Acquires the single workspace registered by `withComputerWorkspace` and
897
+ * releases its RPC client when the layer scope closes.
898
+ */
899
+ static readonly layer: Layer.Layer<ComputerWorkspace, never, DurableObjectState>;
900
+ }
571
901
  declare namespace ContainerNamespace_d_exports {
572
902
  export { ContainerInstanceClient, ContainerNamespace, ContainerNamespaceClient, ContainerNamespaceDefinition, ContainerNamespaceResource, ContainerNamespaceService, ContainerNamespaceStaticClient, ContainerOperationError, ContainerReadinessOptions, ContainerSignal, ContainerStartAndWaitForPortsOptions, ContainerStartOptions, ContainerState, ContainerStopSignal, ContainerStub, ContainerStubOf, ContainerWaitOptions, LayerOptions$9 as LayerOptions, Tag$9 as Tag, TagClass$8 as TagClass, isContainerNamespaceResource, layer$8 as layer, make$9 as make, makeClient$6 as makeClient };
573
903
  }
@@ -1116,6 +1446,12 @@ interface DurableObjectOptions<RRuntime, REvent = never, EventLayerError = never
1116
1446
  * the Durable Object's single managed runtime boundary.
1117
1447
  */
1118
1448
  readonly alarms?: Effect.Effect<unknown, unknown, HandlerContext<RRuntime | REvent>>;
1449
+ /**
1450
+ * Optional raw alarm handler.
1451
+ *
1452
+ * After every invocation, the configured OTLP flusher is scheduled through
1453
+ * `DurableObjectState.waitUntil`, including when the handler fails.
1454
+ */
1119
1455
  readonly alarm?: (alarmInfo?: globalThis.AlarmInvocationInfo) => Effect.Effect<void, unknown, HandlerContext<RRuntime | REvent>>;
1120
1456
  readonly webSocketMessage?: (socket: DurableWebSocket, message: string | ArrayBuffer) => Effect.Effect<void, unknown, HandlerContext<RRuntime | REvent>>;
1121
1457
  readonly webSocketClose?: (socket: DurableWebSocket, code: number, reason: string, wasClean: boolean) => Effect.Effect<void, unknown, HandlerContext<RRuntime | REvent>>;
@@ -2034,6 +2370,82 @@ declare const makeClient: (definition: VectorizeDefinition) => (index: Vectorize
2034
2370
  declare const layer: <Self>(tag: Context.Service<Self, VectorizeClient>, definition: VectorizeDefinition) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
2035
2371
  declare const make$2: <Id extends string>(id: Id) => TagClass$2<VectorizeService<Id>, Id>;
2036
2372
  declare const Tag$3: <Self>() => <Id extends string>(id: Id) => TagClass$2<Self, Id>;
2373
+ declare namespace WebTransport_d_exports {
2374
+ export { Capabilities, InboundTransport, WebTransportCapability, WebTransportUnsupportedError, capabilities, inboundSessionsUnsupported, inboundTransport, isHttp3 };
2375
+ }
2376
+ declare const InboundTransport_base: Schema.Class<InboundTransport, Schema.Struct<{
2377
+ /** The HTTP protocol the client used, e.g. `"HTTP/2"` or `"HTTP/3"`. */
2378
+ readonly httpProtocol: Schema.String;
2379
+ /** Client round-trip time; only present for QUIC (HTTP/3) connections. */
2380
+ readonly clientQuicRtt: Schema.optional<Schema.Number>;
2381
+ /** Client round-trip time; only present for TCP (HTTP/1.x, HTTP/2) connections. */
2382
+ readonly clientTcpRtt: Schema.optional<Schema.Number>;
2383
+ }>, {}>;
2384
+ /**
2385
+ * Metadata Cloudflare's edge reports about the inbound client connection.
2386
+ *
2387
+ * `httpProtocol` and `clientTcpRtt` are declared in
2388
+ * `@cloudflare/workers-types`; `clientQuicRtt` is documented by Cloudflare
2389
+ * ("only present when the client connected over QUIC (HTTP/3)") but not yet
2390
+ * present in the published types, so it is decoded from the open
2391
+ * `Record<string, unknown>` side of `request.cf`.
2392
+ */
2393
+ declare class InboundTransport extends InboundTransport_base {}
2394
+ /**
2395
+ * Decodes the inbound transport metadata from `request.cf`.
2396
+ *
2397
+ * Returns `None` when the metadata is absent (for example in local `wrangler
2398
+ * dev` or when a Worker invokes another Worker directly) or does not match
2399
+ * the expected shape.
2400
+ */
2401
+ declare const inboundTransport: (request: Pick<CloudflareRequest, "cf">) => Option.Option<InboundTransport>;
2402
+ /**
2403
+ * Returns `true` when the client reached Cloudflare's edge over QUIC
2404
+ * (HTTP/3). Prefers the documented QUIC signal (`clientQuicRtt` is only
2405
+ * present for QUIC connections) and falls back to the `httpProtocol` string.
2406
+ *
2407
+ * Note this describes the browser→edge hop only: the edge always terminates
2408
+ * QUIC, and the Worker still handles an ordinary `fetch` Request.
2409
+ */
2410
+ declare const isHttp3: (transport: InboundTransport) => boolean;
2411
+ /** WebTransport-related capabilities of the current Workers runtime. */
2412
+ interface Capabilities {
2413
+ /**
2414
+ * Whether Worker code can accept inbound WebTransport sessions. Typed as
2415
+ * literally `false`: no such runtime API exists (cloudflare/workerd#6451),
2416
+ * so this can only change through a breaking, deliberate update when
2417
+ * Cloudflare ships one.
2418
+ */
2419
+ readonly inboundSessions: false;
2420
+ /**
2421
+ * Whether the runtime exposes a client `WebTransport` constructor global.
2422
+ * Feature-detected at runtime; `false` in workerd today, which has no
2423
+ * QUIC stack.
2424
+ */
2425
+ readonly outboundSessions: boolean;
2426
+ }
2427
+ /** Feature-detects the WebTransport capabilities of the current runtime. */
2428
+ declare const capabilities: Effect.Effect<Capabilities>;
2429
+ /** WebTransport capability missing from the current Workers runtime. */
2430
+ type WebTransportCapability = "inbound-sessions" | "outbound-sessions";
2431
+ declare const WebTransportUnsupportedError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
2432
+ readonly _tag: "WebTransportUnsupportedError";
2433
+ } & Readonly<A>;
2434
+ /** Raised when a WebTransport capability is unavailable in this runtime. */
2435
+ declare class WebTransportUnsupportedError extends WebTransportUnsupportedError_base<{
2436
+ readonly capability: WebTransportCapability;
2437
+ }> {
2438
+ get message(): string;
2439
+ }
2440
+ /**
2441
+ * The explicit typed boundary for inbound WebTransport sessions.
2442
+ *
2443
+ * Always fails with {@link WebTransportUnsupportedError} today. Route the
2444
+ * code path that would accept a session through this effect so the
2445
+ * limitation is visible in the type system and greppable when Cloudflare
2446
+ * ships a real API.
2447
+ */
2448
+ declare const inboundSessionsUnsupported: Effect.Effect<never, WebTransportUnsupportedError>;
2037
2449
  declare namespace WorkflowDefinition_d_exports {
2038
2450
  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 };
2039
2451
  }
@@ -2141,4 +2553,4 @@ declare const implement: typeof implement$1;
2141
2553
  type Handler<ROut, Self extends Definition$1.Any> = Handler$1<ROut, Self>;
2142
2554
  type Options<ROut, Self extends Definition$1.Any> = Options$1<ROut, Self>;
2143
2555
  //#endregion
2144
- export { AiGateway_d_exports as AiGateway, AnalyticsEngine_d_exports as AnalyticsEngine, Binding_d_exports as Binding, BrowserRendering_d_exports as BrowserRendering, Cache_d_exports as Cache, CloudflareOtlp_d_exports as CloudflareOtlp, ContainerNamespace_d_exports as ContainerNamespace, 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, Email_d_exports as Email, Environment_d_exports as Environment, 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 };
2556
+ export { AiGateway_d_exports as AiGateway, AnalyticsEngine_d_exports as AnalyticsEngine, Artifacts_d_exports as Artifacts, Binding_d_exports as Binding, BrowserRendering_d_exports as BrowserRendering, Cache_d_exports as Cache, CloudflareOtlp_d_exports as CloudflareOtlp, ComputerArtifacts_d_exports as ComputerArtifacts, ComputerWorkspace_d_exports as ComputerWorkspace, ContainerNamespace_d_exports as ContainerNamespace, 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, Email_d_exports as Email, Environment_d_exports as Environment, 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, WebTransport_d_exports as WebTransport, 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 };