@cloudflare/workers-types 4.20260617.1 → 4.20260619.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.
package/latest/index.d.ts CHANGED
@@ -480,7 +480,8 @@ interface ExecutionContext<Props = unknown> {
480
480
  readonly exports: Cloudflare.Exports;
481
481
  readonly props: Props;
482
482
  cache?: CacheContext;
483
- tracing?: Tracing;
483
+ readonly access?: CloudflareAccessContext;
484
+ tracing: Tracing;
484
485
  }
485
486
  type ExportedHandlerFetchHandler<
486
487
  Env = unknown,
@@ -581,6 +582,10 @@ interface CachePurgeOptions {
581
582
  interface CacheContext {
582
583
  purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
583
584
  }
585
+ interface CloudflareAccessContext {
586
+ readonly aud: string;
587
+ getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
588
+ }
584
589
  declare abstract class ColoLocalActorNamespace {
585
590
  get(actorId: string): Fetcher;
586
591
  }
@@ -646,6 +651,8 @@ type DurableObjectLocationHint =
646
651
  | "weur"
647
652
  | "eeur"
648
653
  | "apac"
654
+ | "apac-ne"
655
+ | "apac-se"
649
656
  | "oc"
650
657
  | "afr"
651
658
  | "me";
@@ -788,6 +795,7 @@ interface DurableObjectFacets {
788
795
  ): Fetcher<T>;
789
796
  abort(name: string, reason: any): void;
790
797
  delete(name: string): void;
798
+ clone(src: string, dst: string): void;
791
799
  }
792
800
  interface FacetStartupOptions<
793
801
  T extends Rpc.DurableObjectBranded | undefined = undefined,
@@ -3849,6 +3857,28 @@ interface EventSourceEventSourceInit {
3849
3857
  withCredentials?: boolean;
3850
3858
  fetcher?: Fetcher;
3851
3859
  }
3860
+ interface ExecOutput {
3861
+ readonly stdout: ArrayBuffer;
3862
+ readonly stderr: ArrayBuffer;
3863
+ readonly exitCode: number;
3864
+ }
3865
+ interface ContainerExecOptions {
3866
+ cwd?: string;
3867
+ env?: Record<string, string>;
3868
+ user?: string;
3869
+ stdin?: ReadableStream | "pipe";
3870
+ stdout?: "pipe" | "ignore";
3871
+ stderr?: "pipe" | "ignore" | "combined";
3872
+ }
3873
+ interface ExecProcess {
3874
+ readonly stdin: WritableStream | null;
3875
+ readonly stdout: ReadableStream | null;
3876
+ readonly stderr: ReadableStream | null;
3877
+ readonly pid: number;
3878
+ readonly exitCode: Promise<number>;
3879
+ output(): Promise<ExecOutput>;
3880
+ kill(signal?: number): void;
3881
+ }
3852
3882
  interface Container {
3853
3883
  get running(): boolean;
3854
3884
  start(options?: ContainerStartupOptions): void;
@@ -3866,6 +3896,7 @@ interface Container {
3866
3896
  options: ContainerSnapshotOptions,
3867
3897
  ): Promise<ContainerSnapshot>;
3868
3898
  interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
3899
+ exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
3869
3900
  }
3870
3901
  interface ContainerDirectorySnapshot {
3871
3902
  id: string;
@@ -4060,11 +4091,62 @@ interface Tracing {
4060
4091
  callback: (span: Span, ...args: A) => T,
4061
4092
  ...args: A
4062
4093
  ): T;
4094
+ startActiveSpan<T, A extends unknown[]>(
4095
+ name: string,
4096
+ callback: (span: Span, ...args: A) => T,
4097
+ ...args: A
4098
+ ): T;
4063
4099
  Span: typeof Span;
4064
4100
  }
4065
4101
  declare abstract class Span {
4066
4102
  get isTraced(): boolean;
4067
4103
  setAttribute(key: string, value?: boolean | number | string): void;
4104
+ end(): void;
4105
+ }
4106
+ /**
4107
+ * Represents the identity of a user authenticated via Cloudflare Access.
4108
+ * This matches the result of calling /cdn-cgi/access/get-identity.
4109
+ *
4110
+ * The exact structure of the returned object depends on the identity provider
4111
+ * configuration for the Access application. The fields below represent commonly
4112
+ * available properties, but additional provider-specific fields may be present.
4113
+ */
4114
+ interface CloudflareAccessIdentity extends Record<string, unknown> {
4115
+ /** The user's email address, if available from the identity provider. */
4116
+ email?: string;
4117
+ /** The user's display name. */
4118
+ name?: string;
4119
+ /** The user's unique identifier. */
4120
+ user_uuid?: string;
4121
+ /** The Cloudflare account ID. */
4122
+ account_id?: string;
4123
+ /** Login timestamp (Unix epoch seconds). */
4124
+ iat?: number;
4125
+ /** The user's IP address at authentication time. */
4126
+ ip?: string;
4127
+ /** Authentication methods used (e.g., "pwd"). */
4128
+ amr?: string[];
4129
+ /** Identity provider information. */
4130
+ idp?: {
4131
+ id: string;
4132
+ type: string;
4133
+ };
4134
+ /** Geographic information about where the user authenticated. */
4135
+ geo?: {
4136
+ country: string;
4137
+ };
4138
+ /** Group memberships from the identity provider. */
4139
+ groups?: Array<{
4140
+ id: string;
4141
+ name: string;
4142
+ email?: string;
4143
+ }>;
4144
+ /** Device posture check results, keyed by check ID. */
4145
+ devicePosture?: Record<string, unknown>;
4146
+ /** True if the user connected via Cloudflare WARP. */
4147
+ is_warp?: boolean;
4148
+ /** True if the user is authenticated via Cloudflare Gateway. */
4149
+ is_gateway?: boolean;
4068
4150
  }
4069
4151
  // ============================================================================
4070
4152
  // Agent Memory
@@ -12290,6 +12372,17 @@ interface RequestInitCfProperties extends Record<string, unknown> {
12290
12372
  cacheReserveMinimumFileSize?: number;
12291
12373
  scrapeShield?: boolean;
12292
12374
  apps?: boolean;
12375
+ /**
12376
+ * Controls whether an outbound gRPC-web subrequest from this Worker is
12377
+ * converted to gRPC at the Cloudflare edge.
12378
+ *
12379
+ * - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
12380
+ * - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
12381
+ *
12382
+ * Provides per-request control over the same edge conversion behavior
12383
+ * gated by the `auto_grpc_convert` compatibility flag.
12384
+ */
12385
+ grpcWeb?: "passthrough" | "convert";
12293
12386
  image?: RequestInitCfPropertiesImage;
12294
12387
  minify?: RequestInitCfPropertiesImageMinify;
12295
12388
  mirage?: boolean;
@@ -15577,7 +15670,8 @@ declare namespace TailStream {
15577
15670
  | "loadShed"
15578
15671
  | "responseStreamDisconnected"
15579
15672
  | "scriptNotFound"
15580
- | "internalError";
15673
+ | "internalError"
15674
+ | "exceededWallTime";
15581
15675
  interface ScriptVersion {
15582
15676
  readonly id: string;
15583
15677
  readonly tag?: string;
package/latest/index.ts CHANGED
@@ -482,7 +482,8 @@ export interface ExecutionContext<Props = unknown> {
482
482
  readonly exports: Cloudflare.Exports;
483
483
  readonly props: Props;
484
484
  cache?: CacheContext;
485
- tracing?: Tracing;
485
+ readonly access?: CloudflareAccessContext;
486
+ tracing: Tracing;
486
487
  }
487
488
  export type ExportedHandlerFetchHandler<
488
489
  Env = unknown,
@@ -583,6 +584,10 @@ export interface CachePurgeOptions {
583
584
  export interface CacheContext {
584
585
  purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
585
586
  }
587
+ export interface CloudflareAccessContext {
588
+ readonly aud: string;
589
+ getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
590
+ }
586
591
  export declare abstract class ColoLocalActorNamespace {
587
592
  get(actorId: string): Fetcher;
588
593
  }
@@ -648,6 +653,8 @@ export type DurableObjectLocationHint =
648
653
  | "weur"
649
654
  | "eeur"
650
655
  | "apac"
656
+ | "apac-ne"
657
+ | "apac-se"
651
658
  | "oc"
652
659
  | "afr"
653
660
  | "me";
@@ -790,6 +797,7 @@ export interface DurableObjectFacets {
790
797
  ): Fetcher<T>;
791
798
  abort(name: string, reason: any): void;
792
799
  delete(name: string): void;
800
+ clone(src: string, dst: string): void;
793
801
  }
794
802
  export interface FacetStartupOptions<
795
803
  T extends Rpc.DurableObjectBranded | undefined = undefined,
@@ -3855,6 +3863,28 @@ export interface EventSourceEventSourceInit {
3855
3863
  withCredentials?: boolean;
3856
3864
  fetcher?: Fetcher;
3857
3865
  }
3866
+ export interface ExecOutput {
3867
+ readonly stdout: ArrayBuffer;
3868
+ readonly stderr: ArrayBuffer;
3869
+ readonly exitCode: number;
3870
+ }
3871
+ export interface ContainerExecOptions {
3872
+ cwd?: string;
3873
+ env?: Record<string, string>;
3874
+ user?: string;
3875
+ stdin?: ReadableStream | "pipe";
3876
+ stdout?: "pipe" | "ignore";
3877
+ stderr?: "pipe" | "ignore" | "combined";
3878
+ }
3879
+ export interface ExecProcess {
3880
+ readonly stdin: WritableStream | null;
3881
+ readonly stdout: ReadableStream | null;
3882
+ readonly stderr: ReadableStream | null;
3883
+ readonly pid: number;
3884
+ readonly exitCode: Promise<number>;
3885
+ output(): Promise<ExecOutput>;
3886
+ kill(signal?: number): void;
3887
+ }
3858
3888
  export interface Container {
3859
3889
  get running(): boolean;
3860
3890
  start(options?: ContainerStartupOptions): void;
@@ -3872,6 +3902,7 @@ export interface Container {
3872
3902
  options: ContainerSnapshotOptions,
3873
3903
  ): Promise<ContainerSnapshot>;
3874
3904
  interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
3905
+ exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
3875
3906
  }
3876
3907
  export interface ContainerDirectorySnapshot {
3877
3908
  id: string;
@@ -4066,11 +4097,62 @@ export interface Tracing {
4066
4097
  callback: (span: Span, ...args: A) => T,
4067
4098
  ...args: A
4068
4099
  ): T;
4100
+ startActiveSpan<T, A extends unknown[]>(
4101
+ name: string,
4102
+ callback: (span: Span, ...args: A) => T,
4103
+ ...args: A
4104
+ ): T;
4069
4105
  Span: typeof Span;
4070
4106
  }
4071
4107
  export declare abstract class Span {
4072
4108
  get isTraced(): boolean;
4073
4109
  setAttribute(key: string, value?: boolean | number | string): void;
4110
+ end(): void;
4111
+ }
4112
+ /**
4113
+ * Represents the identity of a user authenticated via Cloudflare Access.
4114
+ * This matches the result of calling /cdn-cgi/access/get-identity.
4115
+ *
4116
+ * The exact structure of the returned object depends on the identity provider
4117
+ * configuration for the Access application. The fields below represent commonly
4118
+ * available properties, but additional provider-specific fields may be present.
4119
+ */
4120
+ export interface CloudflareAccessIdentity extends Record<string, unknown> {
4121
+ /** The user's email address, if available from the identity provider. */
4122
+ email?: string;
4123
+ /** The user's display name. */
4124
+ name?: string;
4125
+ /** The user's unique identifier. */
4126
+ user_uuid?: string;
4127
+ /** The Cloudflare account ID. */
4128
+ account_id?: string;
4129
+ /** Login timestamp (Unix epoch seconds). */
4130
+ iat?: number;
4131
+ /** The user's IP address at authentication time. */
4132
+ ip?: string;
4133
+ /** Authentication methods used (e.g., "pwd"). */
4134
+ amr?: string[];
4135
+ /** Identity provider information. */
4136
+ idp?: {
4137
+ id: string;
4138
+ type: string;
4139
+ };
4140
+ /** Geographic information about where the user authenticated. */
4141
+ geo?: {
4142
+ country: string;
4143
+ };
4144
+ /** Group memberships from the identity provider. */
4145
+ groups?: Array<{
4146
+ id: string;
4147
+ name: string;
4148
+ email?: string;
4149
+ }>;
4150
+ /** Device posture check results, keyed by check ID. */
4151
+ devicePosture?: Record<string, unknown>;
4152
+ /** True if the user connected via Cloudflare WARP. */
4153
+ is_warp?: boolean;
4154
+ /** True if the user is authenticated via Cloudflare Gateway. */
4155
+ is_gateway?: boolean;
4074
4156
  }
4075
4157
  // ============================================================================
4076
4158
  // Agent Memory
@@ -12302,6 +12384,17 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
12302
12384
  cacheReserveMinimumFileSize?: number;
12303
12385
  scrapeShield?: boolean;
12304
12386
  apps?: boolean;
12387
+ /**
12388
+ * Controls whether an outbound gRPC-web subrequest from this Worker is
12389
+ * converted to gRPC at the Cloudflare edge.
12390
+ *
12391
+ * - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
12392
+ * - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
12393
+ *
12394
+ * Provides per-request control over the same edge conversion behavior
12395
+ * gated by the `auto_grpc_convert` compatibility flag.
12396
+ */
12397
+ grpcWeb?: "passthrough" | "convert";
12305
12398
  image?: RequestInitCfPropertiesImage;
12306
12399
  minify?: RequestInitCfPropertiesImageMinify;
12307
12400
  mirage?: boolean;
@@ -15538,7 +15631,8 @@ export declare namespace TailStream {
15538
15631
  | "loadShed"
15539
15632
  | "responseStreamDisconnected"
15540
15633
  | "scriptNotFound"
15541
- | "internalError";
15634
+ | "internalError"
15635
+ | "exceededWallTime";
15542
15636
  interface ScriptVersion {
15543
15637
  readonly id: string;
15544
15638
  readonly tag?: string;
package/oldest/index.d.ts CHANGED
@@ -469,7 +469,8 @@ interface ExecutionContext<Props = unknown> {
469
469
  passThroughOnException(): void;
470
470
  readonly props: Props;
471
471
  cache?: CacheContext;
472
- tracing?: Tracing;
472
+ readonly access?: CloudflareAccessContext;
473
+ tracing: Tracing;
473
474
  }
474
475
  type ExportedHandlerFetchHandler<
475
476
  Env = unknown,
@@ -562,6 +563,10 @@ interface CachePurgeOptions {
562
563
  interface CacheContext {
563
564
  purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
564
565
  }
566
+ interface CloudflareAccessContext {
567
+ readonly aud: string;
568
+ getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
569
+ }
565
570
  declare abstract class ColoLocalActorNamespace {
566
571
  get(actorId: string): Fetcher;
567
572
  }
@@ -627,6 +632,8 @@ type DurableObjectLocationHint =
627
632
  | "weur"
628
633
  | "eeur"
629
634
  | "apac"
635
+ | "apac-ne"
636
+ | "apac-se"
630
637
  | "oc"
631
638
  | "afr"
632
639
  | "me";
@@ -768,6 +775,7 @@ interface DurableObjectFacets {
768
775
  ): Fetcher<T>;
769
776
  abort(name: string, reason: any): void;
770
777
  delete(name: string): void;
778
+ clone(src: string, dst: string): void;
771
779
  }
772
780
  interface FacetStartupOptions<
773
781
  T extends Rpc.DurableObjectBranded | undefined = undefined,
@@ -3728,6 +3736,28 @@ interface EventSourceEventSourceInit {
3728
3736
  withCredentials?: boolean;
3729
3737
  fetcher?: Fetcher;
3730
3738
  }
3739
+ interface ExecOutput {
3740
+ readonly stdout: ArrayBuffer;
3741
+ readonly stderr: ArrayBuffer;
3742
+ readonly exitCode: number;
3743
+ }
3744
+ interface ContainerExecOptions {
3745
+ cwd?: string;
3746
+ env?: Record<string, string>;
3747
+ user?: string;
3748
+ stdin?: ReadableStream | "pipe";
3749
+ stdout?: "pipe" | "ignore";
3750
+ stderr?: "pipe" | "ignore" | "combined";
3751
+ }
3752
+ interface ExecProcess {
3753
+ readonly stdin: WritableStream | null;
3754
+ readonly stdout: ReadableStream | null;
3755
+ readonly stderr: ReadableStream | null;
3756
+ readonly pid: number;
3757
+ readonly exitCode: Promise<number>;
3758
+ output(): Promise<ExecOutput>;
3759
+ kill(signal?: number): void;
3760
+ }
3731
3761
  interface Container {
3732
3762
  get running(): boolean;
3733
3763
  start(options?: ContainerStartupOptions): void;
@@ -3745,6 +3775,7 @@ interface Container {
3745
3775
  options: ContainerSnapshotOptions,
3746
3776
  ): Promise<ContainerSnapshot>;
3747
3777
  interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
3778
+ exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
3748
3779
  }
3749
3780
  interface ContainerDirectorySnapshot {
3750
3781
  id: string;
@@ -3919,11 +3950,62 @@ interface Tracing {
3919
3950
  callback: (span: Span, ...args: A) => T,
3920
3951
  ...args: A
3921
3952
  ): T;
3953
+ startActiveSpan<T, A extends unknown[]>(
3954
+ name: string,
3955
+ callback: (span: Span, ...args: A) => T,
3956
+ ...args: A
3957
+ ): T;
3922
3958
  Span: typeof Span;
3923
3959
  }
3924
3960
  declare abstract class Span {
3925
3961
  get isTraced(): boolean;
3926
3962
  setAttribute(key: string, value?: boolean | number | string): void;
3963
+ end(): void;
3964
+ }
3965
+ /**
3966
+ * Represents the identity of a user authenticated via Cloudflare Access.
3967
+ * This matches the result of calling /cdn-cgi/access/get-identity.
3968
+ *
3969
+ * The exact structure of the returned object depends on the identity provider
3970
+ * configuration for the Access application. The fields below represent commonly
3971
+ * available properties, but additional provider-specific fields may be present.
3972
+ */
3973
+ interface CloudflareAccessIdentity extends Record<string, unknown> {
3974
+ /** The user's email address, if available from the identity provider. */
3975
+ email?: string;
3976
+ /** The user's display name. */
3977
+ name?: string;
3978
+ /** The user's unique identifier. */
3979
+ user_uuid?: string;
3980
+ /** The Cloudflare account ID. */
3981
+ account_id?: string;
3982
+ /** Login timestamp (Unix epoch seconds). */
3983
+ iat?: number;
3984
+ /** The user's IP address at authentication time. */
3985
+ ip?: string;
3986
+ /** Authentication methods used (e.g., "pwd"). */
3987
+ amr?: string[];
3988
+ /** Identity provider information. */
3989
+ idp?: {
3990
+ id: string;
3991
+ type: string;
3992
+ };
3993
+ /** Geographic information about where the user authenticated. */
3994
+ geo?: {
3995
+ country: string;
3996
+ };
3997
+ /** Group memberships from the identity provider. */
3998
+ groups?: Array<{
3999
+ id: string;
4000
+ name: string;
4001
+ email?: string;
4002
+ }>;
4003
+ /** Device posture check results, keyed by check ID. */
4004
+ devicePosture?: Record<string, unknown>;
4005
+ /** True if the user connected via Cloudflare WARP. */
4006
+ is_warp?: boolean;
4007
+ /** True if the user is authenticated via Cloudflare Gateway. */
4008
+ is_gateway?: boolean;
3927
4009
  }
3928
4010
  // ============================================================================
3929
4011
  // Agent Memory
@@ -12149,6 +12231,17 @@ interface RequestInitCfProperties extends Record<string, unknown> {
12149
12231
  cacheReserveMinimumFileSize?: number;
12150
12232
  scrapeShield?: boolean;
12151
12233
  apps?: boolean;
12234
+ /**
12235
+ * Controls whether an outbound gRPC-web subrequest from this Worker is
12236
+ * converted to gRPC at the Cloudflare edge.
12237
+ *
12238
+ * - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
12239
+ * - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
12240
+ *
12241
+ * Provides per-request control over the same edge conversion behavior
12242
+ * gated by the `auto_grpc_convert` compatibility flag.
12243
+ */
12244
+ grpcWeb?: "passthrough" | "convert";
12152
12245
  image?: RequestInitCfPropertiesImage;
12153
12246
  minify?: RequestInitCfPropertiesImageMinify;
12154
12247
  mirage?: boolean;
@@ -15436,7 +15529,8 @@ declare namespace TailStream {
15436
15529
  | "loadShed"
15437
15530
  | "responseStreamDisconnected"
15438
15531
  | "scriptNotFound"
15439
- | "internalError";
15532
+ | "internalError"
15533
+ | "exceededWallTime";
15440
15534
  interface ScriptVersion {
15441
15535
  readonly id: string;
15442
15536
  readonly tag?: string;
package/oldest/index.ts CHANGED
@@ -471,7 +471,8 @@ export interface ExecutionContext<Props = unknown> {
471
471
  passThroughOnException(): void;
472
472
  readonly props: Props;
473
473
  cache?: CacheContext;
474
- tracing?: Tracing;
474
+ readonly access?: CloudflareAccessContext;
475
+ tracing: Tracing;
475
476
  }
476
477
  export type ExportedHandlerFetchHandler<
477
478
  Env = unknown,
@@ -564,6 +565,10 @@ export interface CachePurgeOptions {
564
565
  export interface CacheContext {
565
566
  purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
566
567
  }
568
+ export interface CloudflareAccessContext {
569
+ readonly aud: string;
570
+ getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
571
+ }
567
572
  export declare abstract class ColoLocalActorNamespace {
568
573
  get(actorId: string): Fetcher;
569
574
  }
@@ -629,6 +634,8 @@ export type DurableObjectLocationHint =
629
634
  | "weur"
630
635
  | "eeur"
631
636
  | "apac"
637
+ | "apac-ne"
638
+ | "apac-se"
632
639
  | "oc"
633
640
  | "afr"
634
641
  | "me";
@@ -770,6 +777,7 @@ export interface DurableObjectFacets {
770
777
  ): Fetcher<T>;
771
778
  abort(name: string, reason: any): void;
772
779
  delete(name: string): void;
780
+ clone(src: string, dst: string): void;
773
781
  }
774
782
  export interface FacetStartupOptions<
775
783
  T extends Rpc.DurableObjectBranded | undefined = undefined,
@@ -3734,6 +3742,28 @@ export interface EventSourceEventSourceInit {
3734
3742
  withCredentials?: boolean;
3735
3743
  fetcher?: Fetcher;
3736
3744
  }
3745
+ export interface ExecOutput {
3746
+ readonly stdout: ArrayBuffer;
3747
+ readonly stderr: ArrayBuffer;
3748
+ readonly exitCode: number;
3749
+ }
3750
+ export interface ContainerExecOptions {
3751
+ cwd?: string;
3752
+ env?: Record<string, string>;
3753
+ user?: string;
3754
+ stdin?: ReadableStream | "pipe";
3755
+ stdout?: "pipe" | "ignore";
3756
+ stderr?: "pipe" | "ignore" | "combined";
3757
+ }
3758
+ export interface ExecProcess {
3759
+ readonly stdin: WritableStream | null;
3760
+ readonly stdout: ReadableStream | null;
3761
+ readonly stderr: ReadableStream | null;
3762
+ readonly pid: number;
3763
+ readonly exitCode: Promise<number>;
3764
+ output(): Promise<ExecOutput>;
3765
+ kill(signal?: number): void;
3766
+ }
3737
3767
  export interface Container {
3738
3768
  get running(): boolean;
3739
3769
  start(options?: ContainerStartupOptions): void;
@@ -3751,6 +3781,7 @@ export interface Container {
3751
3781
  options: ContainerSnapshotOptions,
3752
3782
  ): Promise<ContainerSnapshot>;
3753
3783
  interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
3784
+ exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
3754
3785
  }
3755
3786
  export interface ContainerDirectorySnapshot {
3756
3787
  id: string;
@@ -3925,11 +3956,62 @@ export interface Tracing {
3925
3956
  callback: (span: Span, ...args: A) => T,
3926
3957
  ...args: A
3927
3958
  ): T;
3959
+ startActiveSpan<T, A extends unknown[]>(
3960
+ name: string,
3961
+ callback: (span: Span, ...args: A) => T,
3962
+ ...args: A
3963
+ ): T;
3928
3964
  Span: typeof Span;
3929
3965
  }
3930
3966
  export declare abstract class Span {
3931
3967
  get isTraced(): boolean;
3932
3968
  setAttribute(key: string, value?: boolean | number | string): void;
3969
+ end(): void;
3970
+ }
3971
+ /**
3972
+ * Represents the identity of a user authenticated via Cloudflare Access.
3973
+ * This matches the result of calling /cdn-cgi/access/get-identity.
3974
+ *
3975
+ * The exact structure of the returned object depends on the identity provider
3976
+ * configuration for the Access application. The fields below represent commonly
3977
+ * available properties, but additional provider-specific fields may be present.
3978
+ */
3979
+ export interface CloudflareAccessIdentity extends Record<string, unknown> {
3980
+ /** The user's email address, if available from the identity provider. */
3981
+ email?: string;
3982
+ /** The user's display name. */
3983
+ name?: string;
3984
+ /** The user's unique identifier. */
3985
+ user_uuid?: string;
3986
+ /** The Cloudflare account ID. */
3987
+ account_id?: string;
3988
+ /** Login timestamp (Unix epoch seconds). */
3989
+ iat?: number;
3990
+ /** The user's IP address at authentication time. */
3991
+ ip?: string;
3992
+ /** Authentication methods used (e.g., "pwd"). */
3993
+ amr?: string[];
3994
+ /** Identity provider information. */
3995
+ idp?: {
3996
+ id: string;
3997
+ type: string;
3998
+ };
3999
+ /** Geographic information about where the user authenticated. */
4000
+ geo?: {
4001
+ country: string;
4002
+ };
4003
+ /** Group memberships from the identity provider. */
4004
+ groups?: Array<{
4005
+ id: string;
4006
+ name: string;
4007
+ email?: string;
4008
+ }>;
4009
+ /** Device posture check results, keyed by check ID. */
4010
+ devicePosture?: Record<string, unknown>;
4011
+ /** True if the user connected via Cloudflare WARP. */
4012
+ is_warp?: boolean;
4013
+ /** True if the user is authenticated via Cloudflare Gateway. */
4014
+ is_gateway?: boolean;
3933
4015
  }
3934
4016
  // ============================================================================
3935
4017
  // Agent Memory
@@ -12161,6 +12243,17 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
12161
12243
  cacheReserveMinimumFileSize?: number;
12162
12244
  scrapeShield?: boolean;
12163
12245
  apps?: boolean;
12246
+ /**
12247
+ * Controls whether an outbound gRPC-web subrequest from this Worker is
12248
+ * converted to gRPC at the Cloudflare edge.
12249
+ *
12250
+ * - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
12251
+ * - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
12252
+ *
12253
+ * Provides per-request control over the same edge conversion behavior
12254
+ * gated by the `auto_grpc_convert` compatibility flag.
12255
+ */
12256
+ grpcWeb?: "passthrough" | "convert";
12164
12257
  image?: RequestInitCfPropertiesImage;
12165
12258
  minify?: RequestInitCfPropertiesImageMinify;
12166
12259
  mirage?: boolean;
@@ -15397,7 +15490,8 @@ export declare namespace TailStream {
15397
15490
  | "loadShed"
15398
15491
  | "responseStreamDisconnected"
15399
15492
  | "scriptNotFound"
15400
- | "internalError";
15493
+ | "internalError"
15494
+ | "exceededWallTime";
15401
15495
  interface ScriptVersion {
15402
15496
  readonly id: string;
15403
15497
  readonly tag?: string;
package/package.json CHANGED
@@ -7,5 +7,5 @@
7
7
  },
8
8
  "author": "Cloudflare Workers DevProd Team <workers-devprod@cloudflare.com> (https://workers.cloudflare.com)",
9
9
  "license": "MIT OR Apache-2.0",
10
- "version": "4.20260617.1"
10
+ "version": "4.20260619.1"
11
11
  }