@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.
@@ -472,7 +472,8 @@ interface ExecutionContext<Props = unknown> {
472
472
  passThroughOnException(): void;
473
473
  readonly props: Props;
474
474
  cache?: CacheContext;
475
- tracing?: Tracing;
475
+ readonly access?: CloudflareAccessContext;
476
+ tracing: Tracing;
476
477
  }
477
478
  type ExportedHandlerFetchHandler<
478
479
  Env = unknown,
@@ -571,6 +572,10 @@ interface CachePurgeOptions {
571
572
  interface CacheContext {
572
573
  purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
573
574
  }
575
+ interface CloudflareAccessContext {
576
+ readonly aud: string;
577
+ getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
578
+ }
574
579
  declare abstract class ColoLocalActorNamespace {
575
580
  get(actorId: string): Fetcher;
576
581
  }
@@ -636,6 +641,8 @@ type DurableObjectLocationHint =
636
641
  | "weur"
637
642
  | "eeur"
638
643
  | "apac"
644
+ | "apac-ne"
645
+ | "apac-se"
639
646
  | "oc"
640
647
  | "afr"
641
648
  | "me";
@@ -777,6 +784,7 @@ interface DurableObjectFacets {
777
784
  ): Fetcher<T>;
778
785
  abort(name: string, reason: any): void;
779
786
  delete(name: string): void;
787
+ clone(src: string, dst: string): void;
780
788
  }
781
789
  interface FacetStartupOptions<
782
790
  T extends Rpc.DurableObjectBranded | undefined = undefined,
@@ -3804,6 +3812,28 @@ interface EventSourceEventSourceInit {
3804
3812
  withCredentials?: boolean;
3805
3813
  fetcher?: Fetcher;
3806
3814
  }
3815
+ interface ExecOutput {
3816
+ readonly stdout: ArrayBuffer;
3817
+ readonly stderr: ArrayBuffer;
3818
+ readonly exitCode: number;
3819
+ }
3820
+ interface ContainerExecOptions {
3821
+ cwd?: string;
3822
+ env?: Record<string, string>;
3823
+ user?: string;
3824
+ stdin?: ReadableStream | "pipe";
3825
+ stdout?: "pipe" | "ignore";
3826
+ stderr?: "pipe" | "ignore" | "combined";
3827
+ }
3828
+ interface ExecProcess {
3829
+ readonly stdin: WritableStream | null;
3830
+ readonly stdout: ReadableStream | null;
3831
+ readonly stderr: ReadableStream | null;
3832
+ readonly pid: number;
3833
+ readonly exitCode: Promise<number>;
3834
+ output(): Promise<ExecOutput>;
3835
+ kill(signal?: number): void;
3836
+ }
3807
3837
  interface Container {
3808
3838
  get running(): boolean;
3809
3839
  start(options?: ContainerStartupOptions): void;
@@ -3821,6 +3851,7 @@ interface Container {
3821
3851
  options: ContainerSnapshotOptions,
3822
3852
  ): Promise<ContainerSnapshot>;
3823
3853
  interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
3854
+ exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
3824
3855
  }
3825
3856
  interface ContainerDirectorySnapshot {
3826
3857
  id: string;
@@ -3995,11 +4026,62 @@ interface Tracing {
3995
4026
  callback: (span: Span, ...args: A) => T,
3996
4027
  ...args: A
3997
4028
  ): T;
4029
+ startActiveSpan<T, A extends unknown[]>(
4030
+ name: string,
4031
+ callback: (span: Span, ...args: A) => T,
4032
+ ...args: A
4033
+ ): T;
3998
4034
  Span: typeof Span;
3999
4035
  }
4000
4036
  declare abstract class Span {
4001
4037
  get isTraced(): boolean;
4002
4038
  setAttribute(key: string, value?: boolean | number | string): void;
4039
+ end(): void;
4040
+ }
4041
+ /**
4042
+ * Represents the identity of a user authenticated via Cloudflare Access.
4043
+ * This matches the result of calling /cdn-cgi/access/get-identity.
4044
+ *
4045
+ * The exact structure of the returned object depends on the identity provider
4046
+ * configuration for the Access application. The fields below represent commonly
4047
+ * available properties, but additional provider-specific fields may be present.
4048
+ */
4049
+ interface CloudflareAccessIdentity extends Record<string, unknown> {
4050
+ /** The user's email address, if available from the identity provider. */
4051
+ email?: string;
4052
+ /** The user's display name. */
4053
+ name?: string;
4054
+ /** The user's unique identifier. */
4055
+ user_uuid?: string;
4056
+ /** The Cloudflare account ID. */
4057
+ account_id?: string;
4058
+ /** Login timestamp (Unix epoch seconds). */
4059
+ iat?: number;
4060
+ /** The user's IP address at authentication time. */
4061
+ ip?: string;
4062
+ /** Authentication methods used (e.g., "pwd"). */
4063
+ amr?: string[];
4064
+ /** Identity provider information. */
4065
+ idp?: {
4066
+ id: string;
4067
+ type: string;
4068
+ };
4069
+ /** Geographic information about where the user authenticated. */
4070
+ geo?: {
4071
+ country: string;
4072
+ };
4073
+ /** Group memberships from the identity provider. */
4074
+ groups?: Array<{
4075
+ id: string;
4076
+ name: string;
4077
+ email?: string;
4078
+ }>;
4079
+ /** Device posture check results, keyed by check ID. */
4080
+ devicePosture?: Record<string, unknown>;
4081
+ /** True if the user connected via Cloudflare WARP. */
4082
+ is_warp?: boolean;
4083
+ /** True if the user is authenticated via Cloudflare Gateway. */
4084
+ is_gateway?: boolean;
4003
4085
  }
4004
4086
  // ============================================================================
4005
4087
  // Agent Memory
@@ -12225,6 +12307,17 @@ interface RequestInitCfProperties extends Record<string, unknown> {
12225
12307
  cacheReserveMinimumFileSize?: number;
12226
12308
  scrapeShield?: boolean;
12227
12309
  apps?: boolean;
12310
+ /**
12311
+ * Controls whether an outbound gRPC-web subrequest from this Worker is
12312
+ * converted to gRPC at the Cloudflare edge.
12313
+ *
12314
+ * - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
12315
+ * - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
12316
+ *
12317
+ * Provides per-request control over the same edge conversion behavior
12318
+ * gated by the `auto_grpc_convert` compatibility flag.
12319
+ */
12320
+ grpcWeb?: "passthrough" | "convert";
12228
12321
  image?: RequestInitCfPropertiesImage;
12229
12322
  minify?: RequestInitCfPropertiesImageMinify;
12230
12323
  mirage?: boolean;
@@ -15512,7 +15605,8 @@ declare namespace TailStream {
15512
15605
  | "loadShed"
15513
15606
  | "responseStreamDisconnected"
15514
15607
  | "scriptNotFound"
15515
- | "internalError";
15608
+ | "internalError"
15609
+ | "exceededWallTime";
15516
15610
  interface ScriptVersion {
15517
15611
  readonly id: string;
15518
15612
  readonly tag?: string;
@@ -474,7 +474,8 @@ export interface ExecutionContext<Props = unknown> {
474
474
  passThroughOnException(): void;
475
475
  readonly props: Props;
476
476
  cache?: CacheContext;
477
- tracing?: Tracing;
477
+ readonly access?: CloudflareAccessContext;
478
+ tracing: Tracing;
478
479
  }
479
480
  export type ExportedHandlerFetchHandler<
480
481
  Env = unknown,
@@ -573,6 +574,10 @@ export interface CachePurgeOptions {
573
574
  export interface CacheContext {
574
575
  purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
575
576
  }
577
+ export interface CloudflareAccessContext {
578
+ readonly aud: string;
579
+ getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
580
+ }
576
581
  export declare abstract class ColoLocalActorNamespace {
577
582
  get(actorId: string): Fetcher;
578
583
  }
@@ -638,6 +643,8 @@ export type DurableObjectLocationHint =
638
643
  | "weur"
639
644
  | "eeur"
640
645
  | "apac"
646
+ | "apac-ne"
647
+ | "apac-se"
641
648
  | "oc"
642
649
  | "afr"
643
650
  | "me";
@@ -779,6 +786,7 @@ export interface DurableObjectFacets {
779
786
  ): Fetcher<T>;
780
787
  abort(name: string, reason: any): void;
781
788
  delete(name: string): void;
789
+ clone(src: string, dst: string): void;
782
790
  }
783
791
  export interface FacetStartupOptions<
784
792
  T extends Rpc.DurableObjectBranded | undefined = undefined,
@@ -3810,6 +3818,28 @@ export interface EventSourceEventSourceInit {
3810
3818
  withCredentials?: boolean;
3811
3819
  fetcher?: Fetcher;
3812
3820
  }
3821
+ export interface ExecOutput {
3822
+ readonly stdout: ArrayBuffer;
3823
+ readonly stderr: ArrayBuffer;
3824
+ readonly exitCode: number;
3825
+ }
3826
+ export interface ContainerExecOptions {
3827
+ cwd?: string;
3828
+ env?: Record<string, string>;
3829
+ user?: string;
3830
+ stdin?: ReadableStream | "pipe";
3831
+ stdout?: "pipe" | "ignore";
3832
+ stderr?: "pipe" | "ignore" | "combined";
3833
+ }
3834
+ export interface ExecProcess {
3835
+ readonly stdin: WritableStream | null;
3836
+ readonly stdout: ReadableStream | null;
3837
+ readonly stderr: ReadableStream | null;
3838
+ readonly pid: number;
3839
+ readonly exitCode: Promise<number>;
3840
+ output(): Promise<ExecOutput>;
3841
+ kill(signal?: number): void;
3842
+ }
3813
3843
  export interface Container {
3814
3844
  get running(): boolean;
3815
3845
  start(options?: ContainerStartupOptions): void;
@@ -3827,6 +3857,7 @@ export interface Container {
3827
3857
  options: ContainerSnapshotOptions,
3828
3858
  ): Promise<ContainerSnapshot>;
3829
3859
  interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
3860
+ exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
3830
3861
  }
3831
3862
  export interface ContainerDirectorySnapshot {
3832
3863
  id: string;
@@ -4001,11 +4032,62 @@ export interface Tracing {
4001
4032
  callback: (span: Span, ...args: A) => T,
4002
4033
  ...args: A
4003
4034
  ): T;
4035
+ startActiveSpan<T, A extends unknown[]>(
4036
+ name: string,
4037
+ callback: (span: Span, ...args: A) => T,
4038
+ ...args: A
4039
+ ): T;
4004
4040
  Span: typeof Span;
4005
4041
  }
4006
4042
  export declare abstract class Span {
4007
4043
  get isTraced(): boolean;
4008
4044
  setAttribute(key: string, value?: boolean | number | string): void;
4045
+ end(): void;
4046
+ }
4047
+ /**
4048
+ * Represents the identity of a user authenticated via Cloudflare Access.
4049
+ * This matches the result of calling /cdn-cgi/access/get-identity.
4050
+ *
4051
+ * The exact structure of the returned object depends on the identity provider
4052
+ * configuration for the Access application. The fields below represent commonly
4053
+ * available properties, but additional provider-specific fields may be present.
4054
+ */
4055
+ export interface CloudflareAccessIdentity extends Record<string, unknown> {
4056
+ /** The user's email address, if available from the identity provider. */
4057
+ email?: string;
4058
+ /** The user's display name. */
4059
+ name?: string;
4060
+ /** The user's unique identifier. */
4061
+ user_uuid?: string;
4062
+ /** The Cloudflare account ID. */
4063
+ account_id?: string;
4064
+ /** Login timestamp (Unix epoch seconds). */
4065
+ iat?: number;
4066
+ /** The user's IP address at authentication time. */
4067
+ ip?: string;
4068
+ /** Authentication methods used (e.g., "pwd"). */
4069
+ amr?: string[];
4070
+ /** Identity provider information. */
4071
+ idp?: {
4072
+ id: string;
4073
+ type: string;
4074
+ };
4075
+ /** Geographic information about where the user authenticated. */
4076
+ geo?: {
4077
+ country: string;
4078
+ };
4079
+ /** Group memberships from the identity provider. */
4080
+ groups?: Array<{
4081
+ id: string;
4082
+ name: string;
4083
+ email?: string;
4084
+ }>;
4085
+ /** Device posture check results, keyed by check ID. */
4086
+ devicePosture?: Record<string, unknown>;
4087
+ /** True if the user connected via Cloudflare WARP. */
4088
+ is_warp?: boolean;
4089
+ /** True if the user is authenticated via Cloudflare Gateway. */
4090
+ is_gateway?: boolean;
4009
4091
  }
4010
4092
  // ============================================================================
4011
4093
  // Agent Memory
@@ -12237,6 +12319,17 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
12237
12319
  cacheReserveMinimumFileSize?: number;
12238
12320
  scrapeShield?: boolean;
12239
12321
  apps?: boolean;
12322
+ /**
12323
+ * Controls whether an outbound gRPC-web subrequest from this Worker is
12324
+ * converted to gRPC at the Cloudflare edge.
12325
+ *
12326
+ * - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
12327
+ * - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
12328
+ *
12329
+ * Provides per-request control over the same edge conversion behavior
12330
+ * gated by the `auto_grpc_convert` compatibility flag.
12331
+ */
12332
+ grpcWeb?: "passthrough" | "convert";
12240
12333
  image?: RequestInitCfPropertiesImage;
12241
12334
  minify?: RequestInitCfPropertiesImageMinify;
12242
12335
  mirage?: boolean;
@@ -15473,7 +15566,8 @@ export declare namespace TailStream {
15473
15566
  | "loadShed"
15474
15567
  | "responseStreamDisconnected"
15475
15568
  | "scriptNotFound"
15476
- | "internalError";
15569
+ | "internalError"
15570
+ | "exceededWallTime";
15477
15571
  interface ScriptVersion {
15478
15572
  readonly id: string;
15479
15573
  readonly tag?: string;
@@ -472,7 +472,8 @@ interface ExecutionContext<Props = unknown> {
472
472
  passThroughOnException(): void;
473
473
  readonly props: Props;
474
474
  cache?: CacheContext;
475
- tracing?: Tracing;
475
+ readonly access?: CloudflareAccessContext;
476
+ tracing: Tracing;
476
477
  }
477
478
  type ExportedHandlerFetchHandler<
478
479
  Env = unknown,
@@ -571,6 +572,10 @@ interface CachePurgeOptions {
571
572
  interface CacheContext {
572
573
  purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
573
574
  }
575
+ interface CloudflareAccessContext {
576
+ readonly aud: string;
577
+ getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
578
+ }
574
579
  declare abstract class ColoLocalActorNamespace {
575
580
  get(actorId: string): Fetcher;
576
581
  }
@@ -636,6 +641,8 @@ type DurableObjectLocationHint =
636
641
  | "weur"
637
642
  | "eeur"
638
643
  | "apac"
644
+ | "apac-ne"
645
+ | "apac-se"
639
646
  | "oc"
640
647
  | "afr"
641
648
  | "me";
@@ -777,6 +784,7 @@ interface DurableObjectFacets {
777
784
  ): Fetcher<T>;
778
785
  abort(name: string, reason: any): void;
779
786
  delete(name: string): void;
787
+ clone(src: string, dst: string): void;
780
788
  }
781
789
  interface FacetStartupOptions<
782
790
  T extends Rpc.DurableObjectBranded | undefined = undefined,
@@ -3805,6 +3813,28 @@ interface EventSourceEventSourceInit {
3805
3813
  withCredentials?: boolean;
3806
3814
  fetcher?: Fetcher;
3807
3815
  }
3816
+ interface ExecOutput {
3817
+ readonly stdout: ArrayBuffer;
3818
+ readonly stderr: ArrayBuffer;
3819
+ readonly exitCode: number;
3820
+ }
3821
+ interface ContainerExecOptions {
3822
+ cwd?: string;
3823
+ env?: Record<string, string>;
3824
+ user?: string;
3825
+ stdin?: ReadableStream | "pipe";
3826
+ stdout?: "pipe" | "ignore";
3827
+ stderr?: "pipe" | "ignore" | "combined";
3828
+ }
3829
+ interface ExecProcess {
3830
+ readonly stdin: WritableStream | null;
3831
+ readonly stdout: ReadableStream | null;
3832
+ readonly stderr: ReadableStream | null;
3833
+ readonly pid: number;
3834
+ readonly exitCode: Promise<number>;
3835
+ output(): Promise<ExecOutput>;
3836
+ kill(signal?: number): void;
3837
+ }
3808
3838
  interface Container {
3809
3839
  get running(): boolean;
3810
3840
  start(options?: ContainerStartupOptions): void;
@@ -3822,6 +3852,7 @@ interface Container {
3822
3852
  options: ContainerSnapshotOptions,
3823
3853
  ): Promise<ContainerSnapshot>;
3824
3854
  interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
3855
+ exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
3825
3856
  }
3826
3857
  interface ContainerDirectorySnapshot {
3827
3858
  id: string;
@@ -3996,11 +4027,62 @@ interface Tracing {
3996
4027
  callback: (span: Span, ...args: A) => T,
3997
4028
  ...args: A
3998
4029
  ): T;
4030
+ startActiveSpan<T, A extends unknown[]>(
4031
+ name: string,
4032
+ callback: (span: Span, ...args: A) => T,
4033
+ ...args: A
4034
+ ): T;
3999
4035
  Span: typeof Span;
4000
4036
  }
4001
4037
  declare abstract class Span {
4002
4038
  get isTraced(): boolean;
4003
4039
  setAttribute(key: string, value?: boolean | number | string): void;
4040
+ end(): void;
4041
+ }
4042
+ /**
4043
+ * Represents the identity of a user authenticated via Cloudflare Access.
4044
+ * This matches the result of calling /cdn-cgi/access/get-identity.
4045
+ *
4046
+ * The exact structure of the returned object depends on the identity provider
4047
+ * configuration for the Access application. The fields below represent commonly
4048
+ * available properties, but additional provider-specific fields may be present.
4049
+ */
4050
+ interface CloudflareAccessIdentity extends Record<string, unknown> {
4051
+ /** The user's email address, if available from the identity provider. */
4052
+ email?: string;
4053
+ /** The user's display name. */
4054
+ name?: string;
4055
+ /** The user's unique identifier. */
4056
+ user_uuid?: string;
4057
+ /** The Cloudflare account ID. */
4058
+ account_id?: string;
4059
+ /** Login timestamp (Unix epoch seconds). */
4060
+ iat?: number;
4061
+ /** The user's IP address at authentication time. */
4062
+ ip?: string;
4063
+ /** Authentication methods used (e.g., "pwd"). */
4064
+ amr?: string[];
4065
+ /** Identity provider information. */
4066
+ idp?: {
4067
+ id: string;
4068
+ type: string;
4069
+ };
4070
+ /** Geographic information about where the user authenticated. */
4071
+ geo?: {
4072
+ country: string;
4073
+ };
4074
+ /** Group memberships from the identity provider. */
4075
+ groups?: Array<{
4076
+ id: string;
4077
+ name: string;
4078
+ email?: string;
4079
+ }>;
4080
+ /** Device posture check results, keyed by check ID. */
4081
+ devicePosture?: Record<string, unknown>;
4082
+ /** True if the user connected via Cloudflare WARP. */
4083
+ is_warp?: boolean;
4084
+ /** True if the user is authenticated via Cloudflare Gateway. */
4085
+ is_gateway?: boolean;
4004
4086
  }
4005
4087
  // ============================================================================
4006
4088
  // Agent Memory
@@ -12226,6 +12308,17 @@ interface RequestInitCfProperties extends Record<string, unknown> {
12226
12308
  cacheReserveMinimumFileSize?: number;
12227
12309
  scrapeShield?: boolean;
12228
12310
  apps?: boolean;
12311
+ /**
12312
+ * Controls whether an outbound gRPC-web subrequest from this Worker is
12313
+ * converted to gRPC at the Cloudflare edge.
12314
+ *
12315
+ * - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
12316
+ * - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
12317
+ *
12318
+ * Provides per-request control over the same edge conversion behavior
12319
+ * gated by the `auto_grpc_convert` compatibility flag.
12320
+ */
12321
+ grpcWeb?: "passthrough" | "convert";
12229
12322
  image?: RequestInitCfPropertiesImage;
12230
12323
  minify?: RequestInitCfPropertiesImageMinify;
12231
12324
  mirage?: boolean;
@@ -15513,7 +15606,8 @@ declare namespace TailStream {
15513
15606
  | "loadShed"
15514
15607
  | "responseStreamDisconnected"
15515
15608
  | "scriptNotFound"
15516
- | "internalError";
15609
+ | "internalError"
15610
+ | "exceededWallTime";
15517
15611
  interface ScriptVersion {
15518
15612
  readonly id: string;
15519
15613
  readonly tag?: string;
@@ -474,7 +474,8 @@ export interface ExecutionContext<Props = unknown> {
474
474
  passThroughOnException(): void;
475
475
  readonly props: Props;
476
476
  cache?: CacheContext;
477
- tracing?: Tracing;
477
+ readonly access?: CloudflareAccessContext;
478
+ tracing: Tracing;
478
479
  }
479
480
  export type ExportedHandlerFetchHandler<
480
481
  Env = unknown,
@@ -573,6 +574,10 @@ export interface CachePurgeOptions {
573
574
  export interface CacheContext {
574
575
  purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
575
576
  }
577
+ export interface CloudflareAccessContext {
578
+ readonly aud: string;
579
+ getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
580
+ }
576
581
  export declare abstract class ColoLocalActorNamespace {
577
582
  get(actorId: string): Fetcher;
578
583
  }
@@ -638,6 +643,8 @@ export type DurableObjectLocationHint =
638
643
  | "weur"
639
644
  | "eeur"
640
645
  | "apac"
646
+ | "apac-ne"
647
+ | "apac-se"
641
648
  | "oc"
642
649
  | "afr"
643
650
  | "me";
@@ -779,6 +786,7 @@ export interface DurableObjectFacets {
779
786
  ): Fetcher<T>;
780
787
  abort(name: string, reason: any): void;
781
788
  delete(name: string): void;
789
+ clone(src: string, dst: string): void;
782
790
  }
783
791
  export interface FacetStartupOptions<
784
792
  T extends Rpc.DurableObjectBranded | undefined = undefined,
@@ -3811,6 +3819,28 @@ export interface EventSourceEventSourceInit {
3811
3819
  withCredentials?: boolean;
3812
3820
  fetcher?: Fetcher;
3813
3821
  }
3822
+ export interface ExecOutput {
3823
+ readonly stdout: ArrayBuffer;
3824
+ readonly stderr: ArrayBuffer;
3825
+ readonly exitCode: number;
3826
+ }
3827
+ export interface ContainerExecOptions {
3828
+ cwd?: string;
3829
+ env?: Record<string, string>;
3830
+ user?: string;
3831
+ stdin?: ReadableStream | "pipe";
3832
+ stdout?: "pipe" | "ignore";
3833
+ stderr?: "pipe" | "ignore" | "combined";
3834
+ }
3835
+ export interface ExecProcess {
3836
+ readonly stdin: WritableStream | null;
3837
+ readonly stdout: ReadableStream | null;
3838
+ readonly stderr: ReadableStream | null;
3839
+ readonly pid: number;
3840
+ readonly exitCode: Promise<number>;
3841
+ output(): Promise<ExecOutput>;
3842
+ kill(signal?: number): void;
3843
+ }
3814
3844
  export interface Container {
3815
3845
  get running(): boolean;
3816
3846
  start(options?: ContainerStartupOptions): void;
@@ -3828,6 +3858,7 @@ export interface Container {
3828
3858
  options: ContainerSnapshotOptions,
3829
3859
  ): Promise<ContainerSnapshot>;
3830
3860
  interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
3861
+ exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
3831
3862
  }
3832
3863
  export interface ContainerDirectorySnapshot {
3833
3864
  id: string;
@@ -4002,11 +4033,62 @@ export interface Tracing {
4002
4033
  callback: (span: Span, ...args: A) => T,
4003
4034
  ...args: A
4004
4035
  ): T;
4036
+ startActiveSpan<T, A extends unknown[]>(
4037
+ name: string,
4038
+ callback: (span: Span, ...args: A) => T,
4039
+ ...args: A
4040
+ ): T;
4005
4041
  Span: typeof Span;
4006
4042
  }
4007
4043
  export declare abstract class Span {
4008
4044
  get isTraced(): boolean;
4009
4045
  setAttribute(key: string, value?: boolean | number | string): void;
4046
+ end(): void;
4047
+ }
4048
+ /**
4049
+ * Represents the identity of a user authenticated via Cloudflare Access.
4050
+ * This matches the result of calling /cdn-cgi/access/get-identity.
4051
+ *
4052
+ * The exact structure of the returned object depends on the identity provider
4053
+ * configuration for the Access application. The fields below represent commonly
4054
+ * available properties, but additional provider-specific fields may be present.
4055
+ */
4056
+ export interface CloudflareAccessIdentity extends Record<string, unknown> {
4057
+ /** The user's email address, if available from the identity provider. */
4058
+ email?: string;
4059
+ /** The user's display name. */
4060
+ name?: string;
4061
+ /** The user's unique identifier. */
4062
+ user_uuid?: string;
4063
+ /** The Cloudflare account ID. */
4064
+ account_id?: string;
4065
+ /** Login timestamp (Unix epoch seconds). */
4066
+ iat?: number;
4067
+ /** The user's IP address at authentication time. */
4068
+ ip?: string;
4069
+ /** Authentication methods used (e.g., "pwd"). */
4070
+ amr?: string[];
4071
+ /** Identity provider information. */
4072
+ idp?: {
4073
+ id: string;
4074
+ type: string;
4075
+ };
4076
+ /** Geographic information about where the user authenticated. */
4077
+ geo?: {
4078
+ country: string;
4079
+ };
4080
+ /** Group memberships from the identity provider. */
4081
+ groups?: Array<{
4082
+ id: string;
4083
+ name: string;
4084
+ email?: string;
4085
+ }>;
4086
+ /** Device posture check results, keyed by check ID. */
4087
+ devicePosture?: Record<string, unknown>;
4088
+ /** True if the user connected via Cloudflare WARP. */
4089
+ is_warp?: boolean;
4090
+ /** True if the user is authenticated via Cloudflare Gateway. */
4091
+ is_gateway?: boolean;
4010
4092
  }
4011
4093
  // ============================================================================
4012
4094
  // Agent Memory
@@ -12238,6 +12320,17 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
12238
12320
  cacheReserveMinimumFileSize?: number;
12239
12321
  scrapeShield?: boolean;
12240
12322
  apps?: boolean;
12323
+ /**
12324
+ * Controls whether an outbound gRPC-web subrequest from this Worker is
12325
+ * converted to gRPC at the Cloudflare edge.
12326
+ *
12327
+ * - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
12328
+ * - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
12329
+ *
12330
+ * Provides per-request control over the same edge conversion behavior
12331
+ * gated by the `auto_grpc_convert` compatibility flag.
12332
+ */
12333
+ grpcWeb?: "passthrough" | "convert";
12241
12334
  image?: RequestInitCfPropertiesImage;
12242
12335
  minify?: RequestInitCfPropertiesImageMinify;
12243
12336
  mirage?: boolean;
@@ -15474,7 +15567,8 @@ export declare namespace TailStream {
15474
15567
  | "loadShed"
15475
15568
  | "responseStreamDisconnected"
15476
15569
  | "scriptNotFound"
15477
- | "internalError";
15570
+ | "internalError"
15571
+ | "exceededWallTime";
15478
15572
  interface ScriptVersion {
15479
15573
  readonly id: string;
15480
15574
  readonly tag?: string;