@cloudflare/workers-types 4.20260617.1 → 4.20260620.1

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.
@@ -477,7 +477,8 @@ interface ExecutionContext<Props = unknown> {
477
477
  passThroughOnException(): void;
478
478
  readonly props: Props;
479
479
  cache?: CacheContext;
480
- tracing?: Tracing;
480
+ readonly access?: CloudflareAccessContext;
481
+ tracing: Tracing;
481
482
  }
482
483
  type ExportedHandlerFetchHandler<
483
484
  Env = unknown,
@@ -576,6 +577,10 @@ interface CachePurgeOptions {
576
577
  interface CacheContext {
577
578
  purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
578
579
  }
580
+ interface CloudflareAccessContext {
581
+ readonly aud: string;
582
+ getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
583
+ }
579
584
  declare abstract class ColoLocalActorNamespace {
580
585
  get(actorId: string): Fetcher;
581
586
  }
@@ -641,6 +646,8 @@ type DurableObjectLocationHint =
641
646
  | "weur"
642
647
  | "eeur"
643
648
  | "apac"
649
+ | "apac-ne"
650
+ | "apac-se"
644
651
  | "oc"
645
652
  | "afr"
646
653
  | "me";
@@ -782,6 +789,7 @@ interface DurableObjectFacets {
782
789
  ): Fetcher<T>;
783
790
  abort(name: string, reason: any): void;
784
791
  delete(name: string): void;
792
+ clone(src: string, dst: string): void;
785
793
  }
786
794
  interface FacetStartupOptions<
787
795
  T extends Rpc.DurableObjectBranded | undefined = undefined,
@@ -3836,6 +3844,28 @@ interface EventSourceEventSourceInit {
3836
3844
  withCredentials?: boolean;
3837
3845
  fetcher?: Fetcher;
3838
3846
  }
3847
+ interface ExecOutput {
3848
+ readonly stdout: ArrayBuffer;
3849
+ readonly stderr: ArrayBuffer;
3850
+ readonly exitCode: number;
3851
+ }
3852
+ interface ContainerExecOptions {
3853
+ cwd?: string;
3854
+ env?: Record<string, string>;
3855
+ user?: string;
3856
+ stdin?: ReadableStream | "pipe";
3857
+ stdout?: "pipe" | "ignore";
3858
+ stderr?: "pipe" | "ignore" | "combined";
3859
+ }
3860
+ interface ExecProcess {
3861
+ readonly stdin: WritableStream | null;
3862
+ readonly stdout: ReadableStream | null;
3863
+ readonly stderr: ReadableStream | null;
3864
+ readonly pid: number;
3865
+ readonly exitCode: Promise<number>;
3866
+ output(): Promise<ExecOutput>;
3867
+ kill(signal?: number): void;
3868
+ }
3839
3869
  interface Container {
3840
3870
  get running(): boolean;
3841
3871
  start(options?: ContainerStartupOptions): void;
@@ -3853,6 +3883,7 @@ interface Container {
3853
3883
  options: ContainerSnapshotOptions,
3854
3884
  ): Promise<ContainerSnapshot>;
3855
3885
  interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
3886
+ exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
3856
3887
  }
3857
3888
  interface ContainerDirectorySnapshot {
3858
3889
  id: string;
@@ -4027,11 +4058,62 @@ interface Tracing {
4027
4058
  callback: (span: Span, ...args: A) => T,
4028
4059
  ...args: A
4029
4060
  ): T;
4061
+ startActiveSpan<T, A extends unknown[]>(
4062
+ name: string,
4063
+ callback: (span: Span, ...args: A) => T,
4064
+ ...args: A
4065
+ ): T;
4030
4066
  Span: typeof Span;
4031
4067
  }
4032
4068
  declare abstract class Span {
4033
4069
  get isTraced(): boolean;
4034
4070
  setAttribute(key: string, value?: boolean | number | string): void;
4071
+ end(): void;
4072
+ }
4073
+ /**
4074
+ * Represents the identity of a user authenticated via Cloudflare Access.
4075
+ * This matches the result of calling /cdn-cgi/access/get-identity.
4076
+ *
4077
+ * The exact structure of the returned object depends on the identity provider
4078
+ * configuration for the Access application. The fields below represent commonly
4079
+ * available properties, but additional provider-specific fields may be present.
4080
+ */
4081
+ interface CloudflareAccessIdentity extends Record<string, unknown> {
4082
+ /** The user's email address, if available from the identity provider. */
4083
+ email?: string;
4084
+ /** The user's display name. */
4085
+ name?: string;
4086
+ /** The user's unique identifier. */
4087
+ user_uuid?: string;
4088
+ /** The Cloudflare account ID. */
4089
+ account_id?: string;
4090
+ /** Login timestamp (Unix epoch seconds). */
4091
+ iat?: number;
4092
+ /** The user's IP address at authentication time. */
4093
+ ip?: string;
4094
+ /** Authentication methods used (e.g., "pwd"). */
4095
+ amr?: string[];
4096
+ /** Identity provider information. */
4097
+ idp?: {
4098
+ id: string;
4099
+ type: string;
4100
+ };
4101
+ /** Geographic information about where the user authenticated. */
4102
+ geo?: {
4103
+ country: string;
4104
+ };
4105
+ /** Group memberships from the identity provider. */
4106
+ groups?: Array<{
4107
+ id: string;
4108
+ name: string;
4109
+ email?: string;
4110
+ }>;
4111
+ /** Device posture check results, keyed by check ID. */
4112
+ devicePosture?: Record<string, unknown>;
4113
+ /** True if the user connected via Cloudflare WARP. */
4114
+ is_warp?: boolean;
4115
+ /** True if the user is authenticated via Cloudflare Gateway. */
4116
+ is_gateway?: boolean;
4035
4117
  }
4036
4118
  // ============================================================================
4037
4119
  // Agent Memory
@@ -12257,6 +12339,17 @@ interface RequestInitCfProperties extends Record<string, unknown> {
12257
12339
  cacheReserveMinimumFileSize?: number;
12258
12340
  scrapeShield?: boolean;
12259
12341
  apps?: boolean;
12342
+ /**
12343
+ * Controls whether an outbound gRPC-web subrequest from this Worker is
12344
+ * converted to gRPC at the Cloudflare edge.
12345
+ *
12346
+ * - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
12347
+ * - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
12348
+ *
12349
+ * Provides per-request control over the same edge conversion behavior
12350
+ * gated by the `auto_grpc_convert` compatibility flag.
12351
+ */
12352
+ grpcWeb?: "passthrough" | "convert";
12260
12353
  image?: RequestInitCfPropertiesImage;
12261
12354
  minify?: RequestInitCfPropertiesImageMinify;
12262
12355
  mirage?: boolean;
@@ -15544,7 +15637,8 @@ declare namespace TailStream {
15544
15637
  | "loadShed"
15545
15638
  | "responseStreamDisconnected"
15546
15639
  | "scriptNotFound"
15547
- | "internalError";
15640
+ | "internalError"
15641
+ | "exceededWallTime";
15548
15642
  interface ScriptVersion {
15549
15643
  readonly id: string;
15550
15644
  readonly tag?: string;
@@ -479,7 +479,8 @@ export interface ExecutionContext<Props = unknown> {
479
479
  passThroughOnException(): void;
480
480
  readonly props: Props;
481
481
  cache?: CacheContext;
482
- tracing?: Tracing;
482
+ readonly access?: CloudflareAccessContext;
483
+ tracing: Tracing;
483
484
  }
484
485
  export type ExportedHandlerFetchHandler<
485
486
  Env = unknown,
@@ -578,6 +579,10 @@ export interface CachePurgeOptions {
578
579
  export interface CacheContext {
579
580
  purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
580
581
  }
582
+ export interface CloudflareAccessContext {
583
+ readonly aud: string;
584
+ getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
585
+ }
581
586
  export declare abstract class ColoLocalActorNamespace {
582
587
  get(actorId: string): Fetcher;
583
588
  }
@@ -643,6 +648,8 @@ export type DurableObjectLocationHint =
643
648
  | "weur"
644
649
  | "eeur"
645
650
  | "apac"
651
+ | "apac-ne"
652
+ | "apac-se"
646
653
  | "oc"
647
654
  | "afr"
648
655
  | "me";
@@ -784,6 +791,7 @@ export interface DurableObjectFacets {
784
791
  ): Fetcher<T>;
785
792
  abort(name: string, reason: any): void;
786
793
  delete(name: string): void;
794
+ clone(src: string, dst: string): void;
787
795
  }
788
796
  export interface FacetStartupOptions<
789
797
  T extends Rpc.DurableObjectBranded | undefined = undefined,
@@ -3842,6 +3850,28 @@ export interface EventSourceEventSourceInit {
3842
3850
  withCredentials?: boolean;
3843
3851
  fetcher?: Fetcher;
3844
3852
  }
3853
+ export interface ExecOutput {
3854
+ readonly stdout: ArrayBuffer;
3855
+ readonly stderr: ArrayBuffer;
3856
+ readonly exitCode: number;
3857
+ }
3858
+ export interface ContainerExecOptions {
3859
+ cwd?: string;
3860
+ env?: Record<string, string>;
3861
+ user?: string;
3862
+ stdin?: ReadableStream | "pipe";
3863
+ stdout?: "pipe" | "ignore";
3864
+ stderr?: "pipe" | "ignore" | "combined";
3865
+ }
3866
+ export interface ExecProcess {
3867
+ readonly stdin: WritableStream | null;
3868
+ readonly stdout: ReadableStream | null;
3869
+ readonly stderr: ReadableStream | null;
3870
+ readonly pid: number;
3871
+ readonly exitCode: Promise<number>;
3872
+ output(): Promise<ExecOutput>;
3873
+ kill(signal?: number): void;
3874
+ }
3845
3875
  export interface Container {
3846
3876
  get running(): boolean;
3847
3877
  start(options?: ContainerStartupOptions): void;
@@ -3859,6 +3889,7 @@ export interface Container {
3859
3889
  options: ContainerSnapshotOptions,
3860
3890
  ): Promise<ContainerSnapshot>;
3861
3891
  interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
3892
+ exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
3862
3893
  }
3863
3894
  export interface ContainerDirectorySnapshot {
3864
3895
  id: string;
@@ -4033,11 +4064,62 @@ export interface Tracing {
4033
4064
  callback: (span: Span, ...args: A) => T,
4034
4065
  ...args: A
4035
4066
  ): T;
4067
+ startActiveSpan<T, A extends unknown[]>(
4068
+ name: string,
4069
+ callback: (span: Span, ...args: A) => T,
4070
+ ...args: A
4071
+ ): T;
4036
4072
  Span: typeof Span;
4037
4073
  }
4038
4074
  export declare abstract class Span {
4039
4075
  get isTraced(): boolean;
4040
4076
  setAttribute(key: string, value?: boolean | number | string): void;
4077
+ end(): void;
4078
+ }
4079
+ /**
4080
+ * Represents the identity of a user authenticated via Cloudflare Access.
4081
+ * This matches the result of calling /cdn-cgi/access/get-identity.
4082
+ *
4083
+ * The exact structure of the returned object depends on the identity provider
4084
+ * configuration for the Access application. The fields below represent commonly
4085
+ * available properties, but additional provider-specific fields may be present.
4086
+ */
4087
+ export interface CloudflareAccessIdentity extends Record<string, unknown> {
4088
+ /** The user's email address, if available from the identity provider. */
4089
+ email?: string;
4090
+ /** The user's display name. */
4091
+ name?: string;
4092
+ /** The user's unique identifier. */
4093
+ user_uuid?: string;
4094
+ /** The Cloudflare account ID. */
4095
+ account_id?: string;
4096
+ /** Login timestamp (Unix epoch seconds). */
4097
+ iat?: number;
4098
+ /** The user's IP address at authentication time. */
4099
+ ip?: string;
4100
+ /** Authentication methods used (e.g., "pwd"). */
4101
+ amr?: string[];
4102
+ /** Identity provider information. */
4103
+ idp?: {
4104
+ id: string;
4105
+ type: string;
4106
+ };
4107
+ /** Geographic information about where the user authenticated. */
4108
+ geo?: {
4109
+ country: string;
4110
+ };
4111
+ /** Group memberships from the identity provider. */
4112
+ groups?: Array<{
4113
+ id: string;
4114
+ name: string;
4115
+ email?: string;
4116
+ }>;
4117
+ /** Device posture check results, keyed by check ID. */
4118
+ devicePosture?: Record<string, unknown>;
4119
+ /** True if the user connected via Cloudflare WARP. */
4120
+ is_warp?: boolean;
4121
+ /** True if the user is authenticated via Cloudflare Gateway. */
4122
+ is_gateway?: boolean;
4041
4123
  }
4042
4124
  // ============================================================================
4043
4125
  // Agent Memory
@@ -12269,6 +12351,17 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
12269
12351
  cacheReserveMinimumFileSize?: number;
12270
12352
  scrapeShield?: boolean;
12271
12353
  apps?: boolean;
12354
+ /**
12355
+ * Controls whether an outbound gRPC-web subrequest from this Worker is
12356
+ * converted to gRPC at the Cloudflare edge.
12357
+ *
12358
+ * - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
12359
+ * - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
12360
+ *
12361
+ * Provides per-request control over the same edge conversion behavior
12362
+ * gated by the `auto_grpc_convert` compatibility flag.
12363
+ */
12364
+ grpcWeb?: "passthrough" | "convert";
12272
12365
  image?: RequestInitCfPropertiesImage;
12273
12366
  minify?: RequestInitCfPropertiesImageMinify;
12274
12367
  mirage?: boolean;
@@ -15505,7 +15598,8 @@ export declare namespace TailStream {
15505
15598
  | "loadShed"
15506
15599
  | "responseStreamDisconnected"
15507
15600
  | "scriptNotFound"
15508
- | "internalError";
15601
+ | "internalError"
15602
+ | "exceededWallTime";
15509
15603
  interface ScriptVersion {
15510
15604
  readonly id: string;
15511
15605
  readonly tag?: string;
@@ -477,7 +477,8 @@ interface ExecutionContext<Props = unknown> {
477
477
  passThroughOnException(): void;
478
478
  readonly props: Props;
479
479
  cache?: CacheContext;
480
- tracing?: Tracing;
480
+ readonly access?: CloudflareAccessContext;
481
+ tracing: Tracing;
481
482
  }
482
483
  type ExportedHandlerFetchHandler<
483
484
  Env = unknown,
@@ -576,6 +577,10 @@ interface CachePurgeOptions {
576
577
  interface CacheContext {
577
578
  purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
578
579
  }
580
+ interface CloudflareAccessContext {
581
+ readonly aud: string;
582
+ getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
583
+ }
579
584
  declare abstract class ColoLocalActorNamespace {
580
585
  get(actorId: string): Fetcher;
581
586
  }
@@ -641,6 +646,8 @@ type DurableObjectLocationHint =
641
646
  | "weur"
642
647
  | "eeur"
643
648
  | "apac"
649
+ | "apac-ne"
650
+ | "apac-se"
644
651
  | "oc"
645
652
  | "afr"
646
653
  | "me";
@@ -782,6 +789,7 @@ interface DurableObjectFacets {
782
789
  ): Fetcher<T>;
783
790
  abort(name: string, reason: any): void;
784
791
  delete(name: string): void;
792
+ clone(src: string, dst: string): void;
785
793
  }
786
794
  interface FacetStartupOptions<
787
795
  T extends Rpc.DurableObjectBranded | undefined = undefined,
@@ -3836,6 +3844,28 @@ interface EventSourceEventSourceInit {
3836
3844
  withCredentials?: boolean;
3837
3845
  fetcher?: Fetcher;
3838
3846
  }
3847
+ interface ExecOutput {
3848
+ readonly stdout: ArrayBuffer;
3849
+ readonly stderr: ArrayBuffer;
3850
+ readonly exitCode: number;
3851
+ }
3852
+ interface ContainerExecOptions {
3853
+ cwd?: string;
3854
+ env?: Record<string, string>;
3855
+ user?: string;
3856
+ stdin?: ReadableStream | "pipe";
3857
+ stdout?: "pipe" | "ignore";
3858
+ stderr?: "pipe" | "ignore" | "combined";
3859
+ }
3860
+ interface ExecProcess {
3861
+ readonly stdin: WritableStream | null;
3862
+ readonly stdout: ReadableStream | null;
3863
+ readonly stderr: ReadableStream | null;
3864
+ readonly pid: number;
3865
+ readonly exitCode: Promise<number>;
3866
+ output(): Promise<ExecOutput>;
3867
+ kill(signal?: number): void;
3868
+ }
3839
3869
  interface Container {
3840
3870
  get running(): boolean;
3841
3871
  start(options?: ContainerStartupOptions): void;
@@ -3853,6 +3883,7 @@ interface Container {
3853
3883
  options: ContainerSnapshotOptions,
3854
3884
  ): Promise<ContainerSnapshot>;
3855
3885
  interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
3886
+ exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
3856
3887
  }
3857
3888
  interface ContainerDirectorySnapshot {
3858
3889
  id: string;
@@ -4027,11 +4058,62 @@ interface Tracing {
4027
4058
  callback: (span: Span, ...args: A) => T,
4028
4059
  ...args: A
4029
4060
  ): T;
4061
+ startActiveSpan<T, A extends unknown[]>(
4062
+ name: string,
4063
+ callback: (span: Span, ...args: A) => T,
4064
+ ...args: A
4065
+ ): T;
4030
4066
  Span: typeof Span;
4031
4067
  }
4032
4068
  declare abstract class Span {
4033
4069
  get isTraced(): boolean;
4034
4070
  setAttribute(key: string, value?: boolean | number | string): void;
4071
+ end(): void;
4072
+ }
4073
+ /**
4074
+ * Represents the identity of a user authenticated via Cloudflare Access.
4075
+ * This matches the result of calling /cdn-cgi/access/get-identity.
4076
+ *
4077
+ * The exact structure of the returned object depends on the identity provider
4078
+ * configuration for the Access application. The fields below represent commonly
4079
+ * available properties, but additional provider-specific fields may be present.
4080
+ */
4081
+ interface CloudflareAccessIdentity extends Record<string, unknown> {
4082
+ /** The user's email address, if available from the identity provider. */
4083
+ email?: string;
4084
+ /** The user's display name. */
4085
+ name?: string;
4086
+ /** The user's unique identifier. */
4087
+ user_uuid?: string;
4088
+ /** The Cloudflare account ID. */
4089
+ account_id?: string;
4090
+ /** Login timestamp (Unix epoch seconds). */
4091
+ iat?: number;
4092
+ /** The user's IP address at authentication time. */
4093
+ ip?: string;
4094
+ /** Authentication methods used (e.g., "pwd"). */
4095
+ amr?: string[];
4096
+ /** Identity provider information. */
4097
+ idp?: {
4098
+ id: string;
4099
+ type: string;
4100
+ };
4101
+ /** Geographic information about where the user authenticated. */
4102
+ geo?: {
4103
+ country: string;
4104
+ };
4105
+ /** Group memberships from the identity provider. */
4106
+ groups?: Array<{
4107
+ id: string;
4108
+ name: string;
4109
+ email?: string;
4110
+ }>;
4111
+ /** Device posture check results, keyed by check ID. */
4112
+ devicePosture?: Record<string, unknown>;
4113
+ /** True if the user connected via Cloudflare WARP. */
4114
+ is_warp?: boolean;
4115
+ /** True if the user is authenticated via Cloudflare Gateway. */
4116
+ is_gateway?: boolean;
4035
4117
  }
4036
4118
  // ============================================================================
4037
4119
  // Agent Memory
@@ -12257,6 +12339,17 @@ interface RequestInitCfProperties extends Record<string, unknown> {
12257
12339
  cacheReserveMinimumFileSize?: number;
12258
12340
  scrapeShield?: boolean;
12259
12341
  apps?: boolean;
12342
+ /**
12343
+ * Controls whether an outbound gRPC-web subrequest from this Worker is
12344
+ * converted to gRPC at the Cloudflare edge.
12345
+ *
12346
+ * - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
12347
+ * - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
12348
+ *
12349
+ * Provides per-request control over the same edge conversion behavior
12350
+ * gated by the `auto_grpc_convert` compatibility flag.
12351
+ */
12352
+ grpcWeb?: "passthrough" | "convert";
12260
12353
  image?: RequestInitCfPropertiesImage;
12261
12354
  minify?: RequestInitCfPropertiesImageMinify;
12262
12355
  mirage?: boolean;
@@ -15544,7 +15637,8 @@ declare namespace TailStream {
15544
15637
  | "loadShed"
15545
15638
  | "responseStreamDisconnected"
15546
15639
  | "scriptNotFound"
15547
- | "internalError";
15640
+ | "internalError"
15641
+ | "exceededWallTime";
15548
15642
  interface ScriptVersion {
15549
15643
  readonly id: string;
15550
15644
  readonly tag?: string;
@@ -479,7 +479,8 @@ export interface ExecutionContext<Props = unknown> {
479
479
  passThroughOnException(): void;
480
480
  readonly props: Props;
481
481
  cache?: CacheContext;
482
- tracing?: Tracing;
482
+ readonly access?: CloudflareAccessContext;
483
+ tracing: Tracing;
483
484
  }
484
485
  export type ExportedHandlerFetchHandler<
485
486
  Env = unknown,
@@ -578,6 +579,10 @@ export interface CachePurgeOptions {
578
579
  export interface CacheContext {
579
580
  purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
580
581
  }
582
+ export interface CloudflareAccessContext {
583
+ readonly aud: string;
584
+ getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
585
+ }
581
586
  export declare abstract class ColoLocalActorNamespace {
582
587
  get(actorId: string): Fetcher;
583
588
  }
@@ -643,6 +648,8 @@ export type DurableObjectLocationHint =
643
648
  | "weur"
644
649
  | "eeur"
645
650
  | "apac"
651
+ | "apac-ne"
652
+ | "apac-se"
646
653
  | "oc"
647
654
  | "afr"
648
655
  | "me";
@@ -784,6 +791,7 @@ export interface DurableObjectFacets {
784
791
  ): Fetcher<T>;
785
792
  abort(name: string, reason: any): void;
786
793
  delete(name: string): void;
794
+ clone(src: string, dst: string): void;
787
795
  }
788
796
  export interface FacetStartupOptions<
789
797
  T extends Rpc.DurableObjectBranded | undefined = undefined,
@@ -3842,6 +3850,28 @@ export interface EventSourceEventSourceInit {
3842
3850
  withCredentials?: boolean;
3843
3851
  fetcher?: Fetcher;
3844
3852
  }
3853
+ export interface ExecOutput {
3854
+ readonly stdout: ArrayBuffer;
3855
+ readonly stderr: ArrayBuffer;
3856
+ readonly exitCode: number;
3857
+ }
3858
+ export interface ContainerExecOptions {
3859
+ cwd?: string;
3860
+ env?: Record<string, string>;
3861
+ user?: string;
3862
+ stdin?: ReadableStream | "pipe";
3863
+ stdout?: "pipe" | "ignore";
3864
+ stderr?: "pipe" | "ignore" | "combined";
3865
+ }
3866
+ export interface ExecProcess {
3867
+ readonly stdin: WritableStream | null;
3868
+ readonly stdout: ReadableStream | null;
3869
+ readonly stderr: ReadableStream | null;
3870
+ readonly pid: number;
3871
+ readonly exitCode: Promise<number>;
3872
+ output(): Promise<ExecOutput>;
3873
+ kill(signal?: number): void;
3874
+ }
3845
3875
  export interface Container {
3846
3876
  get running(): boolean;
3847
3877
  start(options?: ContainerStartupOptions): void;
@@ -3859,6 +3889,7 @@ export interface Container {
3859
3889
  options: ContainerSnapshotOptions,
3860
3890
  ): Promise<ContainerSnapshot>;
3861
3891
  interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
3892
+ exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
3862
3893
  }
3863
3894
  export interface ContainerDirectorySnapshot {
3864
3895
  id: string;
@@ -4033,11 +4064,62 @@ export interface Tracing {
4033
4064
  callback: (span: Span, ...args: A) => T,
4034
4065
  ...args: A
4035
4066
  ): T;
4067
+ startActiveSpan<T, A extends unknown[]>(
4068
+ name: string,
4069
+ callback: (span: Span, ...args: A) => T,
4070
+ ...args: A
4071
+ ): T;
4036
4072
  Span: typeof Span;
4037
4073
  }
4038
4074
  export declare abstract class Span {
4039
4075
  get isTraced(): boolean;
4040
4076
  setAttribute(key: string, value?: boolean | number | string): void;
4077
+ end(): void;
4078
+ }
4079
+ /**
4080
+ * Represents the identity of a user authenticated via Cloudflare Access.
4081
+ * This matches the result of calling /cdn-cgi/access/get-identity.
4082
+ *
4083
+ * The exact structure of the returned object depends on the identity provider
4084
+ * configuration for the Access application. The fields below represent commonly
4085
+ * available properties, but additional provider-specific fields may be present.
4086
+ */
4087
+ export interface CloudflareAccessIdentity extends Record<string, unknown> {
4088
+ /** The user's email address, if available from the identity provider. */
4089
+ email?: string;
4090
+ /** The user's display name. */
4091
+ name?: string;
4092
+ /** The user's unique identifier. */
4093
+ user_uuid?: string;
4094
+ /** The Cloudflare account ID. */
4095
+ account_id?: string;
4096
+ /** Login timestamp (Unix epoch seconds). */
4097
+ iat?: number;
4098
+ /** The user's IP address at authentication time. */
4099
+ ip?: string;
4100
+ /** Authentication methods used (e.g., "pwd"). */
4101
+ amr?: string[];
4102
+ /** Identity provider information. */
4103
+ idp?: {
4104
+ id: string;
4105
+ type: string;
4106
+ };
4107
+ /** Geographic information about where the user authenticated. */
4108
+ geo?: {
4109
+ country: string;
4110
+ };
4111
+ /** Group memberships from the identity provider. */
4112
+ groups?: Array<{
4113
+ id: string;
4114
+ name: string;
4115
+ email?: string;
4116
+ }>;
4117
+ /** Device posture check results, keyed by check ID. */
4118
+ devicePosture?: Record<string, unknown>;
4119
+ /** True if the user connected via Cloudflare WARP. */
4120
+ is_warp?: boolean;
4121
+ /** True if the user is authenticated via Cloudflare Gateway. */
4122
+ is_gateway?: boolean;
4041
4123
  }
4042
4124
  // ============================================================================
4043
4125
  // Agent Memory
@@ -12269,6 +12351,17 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
12269
12351
  cacheReserveMinimumFileSize?: number;
12270
12352
  scrapeShield?: boolean;
12271
12353
  apps?: boolean;
12354
+ /**
12355
+ * Controls whether an outbound gRPC-web subrequest from this Worker is
12356
+ * converted to gRPC at the Cloudflare edge.
12357
+ *
12358
+ * - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
12359
+ * - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
12360
+ *
12361
+ * Provides per-request control over the same edge conversion behavior
12362
+ * gated by the `auto_grpc_convert` compatibility flag.
12363
+ */
12364
+ grpcWeb?: "passthrough" | "convert";
12272
12365
  image?: RequestInitCfPropertiesImage;
12273
12366
  minify?: RequestInitCfPropertiesImageMinify;
12274
12367
  mirage?: boolean;
@@ -15505,7 +15598,8 @@ export declare namespace TailStream {
15505
15598
  | "loadShed"
15506
15599
  | "responseStreamDisconnected"
15507
15600
  | "scriptNotFound"
15508
- | "internalError";
15601
+ | "internalError"
15602
+ | "exceededWallTime";
15509
15603
  interface ScriptVersion {
15510
15604
  readonly id: string;
15511
15605
  readonly tag?: string;