@cloudflare/workers-types 4.20260616.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.
@@ -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,
@@ -3795,6 +3803,28 @@ interface EventSourceEventSourceInit {
3795
3803
  withCredentials?: boolean;
3796
3804
  fetcher?: Fetcher;
3797
3805
  }
3806
+ interface ExecOutput {
3807
+ readonly stdout: ArrayBuffer;
3808
+ readonly stderr: ArrayBuffer;
3809
+ readonly exitCode: number;
3810
+ }
3811
+ interface ContainerExecOptions {
3812
+ cwd?: string;
3813
+ env?: Record<string, string>;
3814
+ user?: string;
3815
+ stdin?: ReadableStream | "pipe";
3816
+ stdout?: "pipe" | "ignore";
3817
+ stderr?: "pipe" | "ignore" | "combined";
3818
+ }
3819
+ interface ExecProcess {
3820
+ readonly stdin: WritableStream | null;
3821
+ readonly stdout: ReadableStream | null;
3822
+ readonly stderr: ReadableStream | null;
3823
+ readonly pid: number;
3824
+ readonly exitCode: Promise<number>;
3825
+ output(): Promise<ExecOutput>;
3826
+ kill(signal?: number): void;
3827
+ }
3798
3828
  interface Container {
3799
3829
  get running(): boolean;
3800
3830
  start(options?: ContainerStartupOptions): void;
@@ -3812,6 +3842,7 @@ interface Container {
3812
3842
  options: ContainerSnapshotOptions,
3813
3843
  ): Promise<ContainerSnapshot>;
3814
3844
  interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
3845
+ exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
3815
3846
  }
3816
3847
  interface ContainerDirectorySnapshot {
3817
3848
  id: string;
@@ -3986,11 +4017,62 @@ interface Tracing {
3986
4017
  callback: (span: Span, ...args: A) => T,
3987
4018
  ...args: A
3988
4019
  ): T;
4020
+ startActiveSpan<T, A extends unknown[]>(
4021
+ name: string,
4022
+ callback: (span: Span, ...args: A) => T,
4023
+ ...args: A
4024
+ ): T;
3989
4025
  Span: typeof Span;
3990
4026
  }
3991
4027
  declare abstract class Span {
3992
4028
  get isTraced(): boolean;
3993
4029
  setAttribute(key: string, value?: boolean | number | string): void;
4030
+ end(): void;
4031
+ }
4032
+ /**
4033
+ * Represents the identity of a user authenticated via Cloudflare Access.
4034
+ * This matches the result of calling /cdn-cgi/access/get-identity.
4035
+ *
4036
+ * The exact structure of the returned object depends on the identity provider
4037
+ * configuration for the Access application. The fields below represent commonly
4038
+ * available properties, but additional provider-specific fields may be present.
4039
+ */
4040
+ interface CloudflareAccessIdentity extends Record<string, unknown> {
4041
+ /** The user's email address, if available from the identity provider. */
4042
+ email?: string;
4043
+ /** The user's display name. */
4044
+ name?: string;
4045
+ /** The user's unique identifier. */
4046
+ user_uuid?: string;
4047
+ /** The Cloudflare account ID. */
4048
+ account_id?: string;
4049
+ /** Login timestamp (Unix epoch seconds). */
4050
+ iat?: number;
4051
+ /** The user's IP address at authentication time. */
4052
+ ip?: string;
4053
+ /** Authentication methods used (e.g., "pwd"). */
4054
+ amr?: string[];
4055
+ /** Identity provider information. */
4056
+ idp?: {
4057
+ id: string;
4058
+ type: string;
4059
+ };
4060
+ /** Geographic information about where the user authenticated. */
4061
+ geo?: {
4062
+ country: string;
4063
+ };
4064
+ /** Group memberships from the identity provider. */
4065
+ groups?: Array<{
4066
+ id: string;
4067
+ name: string;
4068
+ email?: string;
4069
+ }>;
4070
+ /** Device posture check results, keyed by check ID. */
4071
+ devicePosture?: Record<string, unknown>;
4072
+ /** True if the user connected via Cloudflare WARP. */
4073
+ is_warp?: boolean;
4074
+ /** True if the user is authenticated via Cloudflare Gateway. */
4075
+ is_gateway?: boolean;
3994
4076
  }
3995
4077
  // ============================================================================
3996
4078
  // Agent Memory
@@ -12141,87 +12223,6 @@ declare abstract class BrowserRun {
12141
12223
  options: BrowserRunMarkdownOptions,
12142
12224
  ): Promise<Response>;
12143
12225
  }
12144
- interface BasicImageTransformations {
12145
- /**
12146
- * Maximum width in image pixels. The value must be an integer.
12147
- */
12148
- width?: number;
12149
- /**
12150
- * Maximum height in image pixels. The value must be an integer.
12151
- */
12152
- height?: number;
12153
- /**
12154
- * Resizing mode as a string. It affects interpretation of width and height
12155
- * options:
12156
- * - scale-down: Similar to contain, but the image is never enlarged. If
12157
- * the image is larger than given width or height, it will be resized.
12158
- * Otherwise its original size will be kept.
12159
- * - contain: Resizes to maximum size that fits within the given width and
12160
- * height. If only a single dimension is given (e.g. only width), the
12161
- * image will be shrunk or enlarged to exactly match that dimension.
12162
- * Aspect ratio is always preserved.
12163
- * - cover: Resizes (shrinks or enlarges) to fill the entire area of width
12164
- * and height. If the image has an aspect ratio different from the ratio
12165
- * of width and height, it will be cropped to fit.
12166
- * - crop: The image will be shrunk and cropped to fit within the area
12167
- * specified by width and height. The image will not be enlarged. For images
12168
- * smaller than the given dimensions it's the same as scale-down. For
12169
- * images larger than the given dimensions, it's the same as cover.
12170
- * See also trim.
12171
- * - pad: Resizes to the maximum size that fits within the given width and
12172
- * height, and then fills the remaining area with a background color
12173
- * (white by default). Use of this mode is not recommended, as the same
12174
- * effect can be more efficiently achieved with the contain mode and the
12175
- * CSS object-fit: contain property.
12176
- * - squeeze: Stretches and deforms to the width and height given, even if it
12177
- * breaks aspect ratio
12178
- */
12179
- fit?: "scale-down" | "contain" | "cover" | "crop" | "pad" | "squeeze";
12180
- /**
12181
- * Image segmentation using artificial intelligence models. Sets pixels not
12182
- * within selected segment area to transparent e.g "foreground" sets every
12183
- * background pixel as transparent.
12184
- */
12185
- segment?: "foreground";
12186
- /**
12187
- * When cropping with fit: "cover", this defines the side or point that should
12188
- * be left uncropped. The value is either a string
12189
- * "left", "right", "top", "bottom", "auto", or "center" (the default),
12190
- * or an object {x, y} containing focal point coordinates in the original
12191
- * image expressed as fractions ranging from 0.0 (top or left) to 1.0
12192
- * (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
12193
- * crop bottom or left and right sides as necessary, but won’t crop anything
12194
- * from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
12195
- * preserve as much as possible around a point at 20% of the height of the
12196
- * source image.
12197
- */
12198
- gravity?:
12199
- | "face"
12200
- | "left"
12201
- | "right"
12202
- | "top"
12203
- | "bottom"
12204
- | "center"
12205
- | "auto"
12206
- | "entropy"
12207
- | BasicImageTransformationsGravityCoordinates;
12208
- /**
12209
- * Background color to add underneath the image. Applies only to images with
12210
- * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
12211
- * hsl(…), etc.)
12212
- */
12213
- background?: string;
12214
- /**
12215
- * Number of degrees (90, 180, 270) to rotate the image by. width and height
12216
- * options refer to axes after rotation.
12217
- */
12218
- rotate?: 0 | 90 | 180 | 270 | 360;
12219
- }
12220
- interface BasicImageTransformationsGravityCoordinates {
12221
- x?: number;
12222
- y?: number;
12223
- mode?: "remainder" | "box-center";
12224
- }
12225
12226
  /**
12226
12227
  * In addition to the properties you can set in the RequestInit dict
12227
12228
  * that you pass as an argument to the Request constructor, you can
@@ -12297,6 +12298,17 @@ interface RequestInitCfProperties extends Record<string, unknown> {
12297
12298
  cacheReserveMinimumFileSize?: number;
12298
12299
  scrapeShield?: boolean;
12299
12300
  apps?: boolean;
12301
+ /**
12302
+ * Controls whether an outbound gRPC-web subrequest from this Worker is
12303
+ * converted to gRPC at the Cloudflare edge.
12304
+ *
12305
+ * - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
12306
+ * - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
12307
+ *
12308
+ * Provides per-request control over the same edge conversion behavior
12309
+ * gated by the `auto_grpc_convert` compatibility flag.
12310
+ */
12311
+ grpcWeb?: "passthrough" | "convert";
12300
12312
  image?: RequestInitCfPropertiesImage;
12301
12313
  minify?: RequestInitCfPropertiesImageMinify;
12302
12314
  mirage?: boolean;
@@ -12317,6 +12329,209 @@ interface RequestInitCfProperties extends Record<string, unknown> {
12317
12329
  */
12318
12330
  resolveOverride?: string;
12319
12331
  }
12332
+ interface BasicImageTransformations {
12333
+ /**
12334
+ * Maximum width in image pixels. The value must be an integer.
12335
+ */
12336
+ width?: number;
12337
+ /**
12338
+ * Maximum height in image pixels. The value must be an integer.
12339
+ */
12340
+ height?: number;
12341
+ /**
12342
+ * When cropping with fit: "cover", this defines the side or point that should
12343
+ * be left uncropped. The value is either a string
12344
+ * "left", "right", "top", "bottom", "auto", or "center" (the default),
12345
+ * or an object {x, y} containing focal point coordinates in the original
12346
+ * image expressed as fractions ranging from 0.0 (top or left) to 1.0
12347
+ * (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
12348
+ * crop bottom or left and right sides as necessary, but won’t crop anything
12349
+ * from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
12350
+ * preserve as much as possible around a point at 20% of the height of the
12351
+ * source image.
12352
+ */
12353
+ gravity?:
12354
+ | "face"
12355
+ | "left"
12356
+ | "right"
12357
+ | "top"
12358
+ | "bottom"
12359
+ | "center"
12360
+ | "auto"
12361
+ | "entropy"
12362
+ | BasicImageTransformationsGravityCoordinates;
12363
+ /**
12364
+ * Specifies how closely the image is cropped toward detected faces when combined
12365
+ * with the gravity=face option. Accepts a valid range between 0.0 (includes as much
12366
+ * of the background as possible) and 1.0 (crops the image as closely to the face as
12367
+ * possible). The default is 0.
12368
+ */
12369
+ zoom?: number;
12370
+ /**
12371
+ * Resizing mode as a string. It affects interpretation of width and height
12372
+ * options:
12373
+ * - scale-down: Similar to contain, but the image is never enlarged. If
12374
+ * the image is larger than given width or height, it will be resized.
12375
+ * Otherwise its original size will be kept.
12376
+ * - scale-up: Similar to contain, but the image is never shrunk. If the
12377
+ * image is smaller than the given width or height, it will be resized.
12378
+ * Otherwise its original size will be kept.
12379
+ * - contain: Resizes to maximum size that fits within the given width and
12380
+ * height. If only a single dimension is given (e.g. only width), the
12381
+ * image will be shrunk or enlarged to exactly match that dimension.
12382
+ * Aspect ratio is always preserved.
12383
+ * - cover: Resizes (shrinks or enlarges) to fill the entire area of width
12384
+ * and height. If the image has an aspect ratio different from the ratio
12385
+ * of width and height, it will be cropped to fit.
12386
+ * - crop: The image will be shrunk and cropped to fit within the area
12387
+ * specified by width and height. The image will not be enlarged. For images
12388
+ * smaller than the given dimensions it's the same as scale-down. For
12389
+ * images larger than the given dimensions, it's the same as cover.
12390
+ * See also trim.
12391
+ * - pad: Resizes to the maximum size that fits within the given width and
12392
+ * height, and then fills the remaining area with a background color
12393
+ * (white by default). Use of this mode is not recommended, as the same
12394
+ * effect can be more efficiently achieved with the contain mode and the
12395
+ * CSS object-fit: contain property.
12396
+ * - squeeze: Stretches and deforms to the width and height given, even if it
12397
+ * breaks aspect ratio
12398
+ */
12399
+ fit?:
12400
+ | "scale-down"
12401
+ | "scale-up"
12402
+ | "contain"
12403
+ | "cover"
12404
+ | "crop"
12405
+ | "pad"
12406
+ | "squeeze";
12407
+ /**
12408
+ * Allows you to trim your image. Takes dpr into account and is performed before
12409
+ * resizing or rotation.
12410
+ *
12411
+ * It can be used as:
12412
+ * - left, top, right, bottom - it will specify the number of pixels to cut
12413
+ * off each side
12414
+ * - width, height - the width/height you'd like to end up with - can be used
12415
+ * in combination with the properties above
12416
+ * - border - this will automatically trim the surroundings of an image based on
12417
+ * it's color. It consists of three properties:
12418
+ * - color: rgb or hex representation of the color you wish to trim (todo: verify the rgba bit)
12419
+ * - tolerance: difference from color to treat as color
12420
+ * - keep: the number of pixels of border to keep
12421
+ */
12422
+ trim?:
12423
+ | "border"
12424
+ | {
12425
+ top?: number;
12426
+ bottom?: number;
12427
+ left?: number;
12428
+ right?: number;
12429
+ width?: number;
12430
+ height?: number;
12431
+ border?:
12432
+ | boolean
12433
+ | {
12434
+ color?: string;
12435
+ tolerance?: number;
12436
+ keep?: number;
12437
+ };
12438
+ };
12439
+ /**
12440
+ * Background color to add underneath the image. Applies only to images with
12441
+ * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
12442
+ * hsl(…), etc.)
12443
+ */
12444
+ background?: string;
12445
+ /**
12446
+ * Flips the images horizontally, vertically, or both. Flipping is applied before
12447
+ * rotation, so if you apply flip=h,rotate=90 then the image will be flipped
12448
+ * horizontally, then rotated by 90 degrees.
12449
+ */
12450
+ flip?: "h" | "v" | "hv";
12451
+ /**
12452
+ * Number of degrees (90, 180, 270) to rotate the image by. width and height
12453
+ * options refer to axes after rotation.
12454
+ */
12455
+ rotate?: 0 | 90 | 180 | 270 | 360;
12456
+ /**
12457
+ * Strength of sharpening filter to apply to the image. Floating-point
12458
+ * number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
12459
+ * recommended value for downscaled images.
12460
+ */
12461
+ sharpen?: number;
12462
+ /**
12463
+ * Radius of a blur filter (approximate gaussian). Maximum supported radius
12464
+ * is 250.
12465
+ */
12466
+ blur?: number;
12467
+ /**
12468
+ * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12469
+ * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12470
+ * ignored.
12471
+ */
12472
+ contrast?: number;
12473
+ /**
12474
+ * Increase brightness by a factor. A value of 1.0 equals no change, a value
12475
+ * of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
12476
+ * 0 is ignored.
12477
+ */
12478
+ brightness?: number;
12479
+ /**
12480
+ * Increase exposure by a factor. A value of 1.0 equals no change, a value of
12481
+ * 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
12482
+ */
12483
+ gamma?: number;
12484
+ /**
12485
+ * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12486
+ * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12487
+ * ignored.
12488
+ */
12489
+ saturation?: number;
12490
+ /**
12491
+ * Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
12492
+ * easier to specify higher-DPI sizes in <img srcset>.
12493
+ */
12494
+ dpr?: number;
12495
+ /**
12496
+ * Adds a border around the image. The border is added after resizing. Border
12497
+ * width takes dpr into account, and can be specified either using a single
12498
+ * width property, or individually for each side.
12499
+ */
12500
+ border?:
12501
+ | {
12502
+ color: string;
12503
+ width: number;
12504
+ }
12505
+ | {
12506
+ color: string;
12507
+ top: number;
12508
+ right: number;
12509
+ bottom: number;
12510
+ left: number;
12511
+ };
12512
+ /**
12513
+ * Image segmentation using artificial intelligence models. Sets pixels not
12514
+ * within selected segment area to transparent e.g "foreground" sets every
12515
+ * background pixel as transparent.
12516
+ */
12517
+ segment?: "foreground";
12518
+ /**
12519
+ * Controls the algorithm used when an image needs to be enlarged. This
12520
+ * parameter works with any fit mode that upscales, such as `contain`,
12521
+ * `cover`, and `scale-up`. It has no effect when `fit=scale-down` or when
12522
+ * the target dimensions are smaller than the source.
12523
+ * - interpolate: Uses bicubic interpolation, which may reduce image quality.
12524
+ * This is the default behavior when `upscale` is not specified.
12525
+ * - generate: Uses AI upscaling to produce sharper, more detailed results
12526
+ * when enlarging images.
12527
+ */
12528
+ upscale?: "interpolate" | "generate";
12529
+ }
12530
+ interface BasicImageTransformationsGravityCoordinates {
12531
+ x?: number;
12532
+ y?: number;
12533
+ mode?: "remainder" | "box-center";
12534
+ }
12320
12535
  interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
12321
12536
  /**
12322
12537
  * Absolute URL of the image file to use for the drawing. It can be any of
@@ -12370,43 +12585,6 @@ interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
12370
12585
  right?: number;
12371
12586
  }
12372
12587
  interface RequestInitCfPropertiesImage extends BasicImageTransformations {
12373
- /**
12374
- * Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
12375
- * easier to specify higher-DPI sizes in <img srcset>.
12376
- */
12377
- dpr?: number;
12378
- /**
12379
- * Allows you to trim your image. Takes dpr into account and is performed before
12380
- * resizing or rotation.
12381
- *
12382
- * It can be used as:
12383
- * - left, top, right, bottom - it will specify the number of pixels to cut
12384
- * off each side
12385
- * - width, height - the width/height you'd like to end up with - can be used
12386
- * in combination with the properties above
12387
- * - border - this will automatically trim the surroundings of an image based on
12388
- * it's color. It consists of three properties:
12389
- * - color: rgb or hex representation of the color you wish to trim (todo: verify the rgba bit)
12390
- * - tolerance: difference from color to treat as color
12391
- * - keep: the number of pixels of border to keep
12392
- */
12393
- trim?:
12394
- | "border"
12395
- | {
12396
- top?: number;
12397
- bottom?: number;
12398
- left?: number;
12399
- right?: number;
12400
- width?: number;
12401
- height?: number;
12402
- border?:
12403
- | boolean
12404
- | {
12405
- color?: string;
12406
- tolerance?: number;
12407
- keep?: number;
12408
- };
12409
- };
12410
12588
  /**
12411
12589
  * Quality setting from 1-100 (useful values are in 60-90 range). Lower values
12412
12590
  * make images look worse, but load faster. The default is 85. It applies only
@@ -12456,17 +12634,6 @@ interface RequestInitCfPropertiesImage extends BasicImageTransformations {
12456
12634
  * output formats always discard metadata.
12457
12635
  */
12458
12636
  metadata?: "keep" | "copyright" | "none";
12459
- /**
12460
- * Strength of sharpening filter to apply to the image. Floating-point
12461
- * number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
12462
- * recommended value for downscaled images.
12463
- */
12464
- sharpen?: number;
12465
- /**
12466
- * Radius of a blur filter (approximate gaussian). Maximum supported radius
12467
- * is 250.
12468
- */
12469
- blur?: number;
12470
12637
  /**
12471
12638
  * Overlays are drawn in the order they appear in the array (last array
12472
12639
  * entry is the topmost layer).
@@ -12478,52 +12645,6 @@ interface RequestInitCfPropertiesImage extends BasicImageTransformations {
12478
12645
  * the origin.
12479
12646
  */
12480
12647
  "origin-auth"?: "share-publicly";
12481
- /**
12482
- * Adds a border around the image. The border is added after resizing. Border
12483
- * width takes dpr into account, and can be specified either using a single
12484
- * width property, or individually for each side.
12485
- */
12486
- border?:
12487
- | {
12488
- color: string;
12489
- width: number;
12490
- }
12491
- | {
12492
- color: string;
12493
- top: number;
12494
- right: number;
12495
- bottom: number;
12496
- left: number;
12497
- };
12498
- /**
12499
- * Increase brightness by a factor. A value of 1.0 equals no change, a value
12500
- * of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
12501
- * 0 is ignored.
12502
- */
12503
- brightness?: number;
12504
- /**
12505
- * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12506
- * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12507
- * ignored.
12508
- */
12509
- contrast?: number;
12510
- /**
12511
- * Increase exposure by a factor. A value of 1.0 equals no change, a value of
12512
- * 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
12513
- */
12514
- gamma?: number;
12515
- /**
12516
- * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12517
- * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12518
- * ignored.
12519
- */
12520
- saturation?: number;
12521
- /**
12522
- * Flips the images horizontally, vertically, or both. Flipping is applied before
12523
- * rotation, so if you apply flip=h,rotate=90 then the image will be flipped
12524
- * horizontally, then rotated by 90 degrees.
12525
- */
12526
- flip?: "h" | "v" | "hv";
12527
12648
  /**
12528
12649
  * Slightly reduces latency on a cache miss by selecting a
12529
12650
  * quickest-to-compress file format, at a cost of increased file size and
@@ -14463,6 +14584,10 @@ declare namespace CloudflareWorkersModule {
14463
14584
  timeout?: WorkflowTimeoutDuration | number;
14464
14585
  sensitive?: WorkflowStepSensitivity;
14465
14586
  };
14587
+ export type WorkflowStepRollbackConfig = Pick<
14588
+ WorkflowStepConfig,
14589
+ "retries" | "timeout"
14590
+ >;
14466
14591
  export type WorkflowCronSchedule = {
14467
14592
  /** Cron expression that triggered this event. */
14468
14593
  cron: string;
@@ -14491,16 +14616,18 @@ declare namespace CloudflareWorkersModule {
14491
14616
  config: WorkflowStepConfig;
14492
14617
  };
14493
14618
  export type WorkflowRollbackContext<T = unknown> = {
14619
+ ctx: WorkflowStepContext;
14494
14620
  error: Error;
14495
14621
  output: T | undefined;
14622
+ /** @deprecated Use `ctx.step.name` and `ctx.step.count` instead. */
14496
14623
  stepName: string;
14497
14624
  };
14498
14625
  export type WorkflowRollbackHandler<T = unknown> = (
14499
14626
  ctx: WorkflowRollbackContext<T>,
14500
14627
  ) => Promise<void>;
14501
14628
  export type WorkflowStepRollbackOptions<T = unknown> = {
14502
- rollback?: WorkflowRollbackHandler<T>;
14503
- rollbackConfig?: WorkflowStepConfig;
14629
+ rollback: WorkflowRollbackHandler<T>;
14630
+ rollbackConfig?: WorkflowStepRollbackConfig;
14504
14631
  };
14505
14632
  export abstract class WorkflowStep {
14506
14633
  do<T extends Rpc.Serializable<T>>(
@@ -15469,7 +15596,8 @@ declare namespace TailStream {
15469
15596
  | "loadShed"
15470
15597
  | "responseStreamDisconnected"
15471
15598
  | "scriptNotFound"
15472
- | "internalError";
15599
+ | "internalError"
15600
+ | "exceededWallTime";
15473
15601
  interface ScriptVersion {
15474
15602
  readonly id: string;
15475
15603
  readonly tag?: string;