@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.
@@ -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
@@ -12150,87 +12232,6 @@ declare abstract class BrowserRun {
12150
12232
  options: BrowserRunMarkdownOptions,
12151
12233
  ): Promise<Response>;
12152
12234
  }
12153
- interface BasicImageTransformations {
12154
- /**
12155
- * Maximum width in image pixels. The value must be an integer.
12156
- */
12157
- width?: number;
12158
- /**
12159
- * Maximum height in image pixels. The value must be an integer.
12160
- */
12161
- height?: number;
12162
- /**
12163
- * Resizing mode as a string. It affects interpretation of width and height
12164
- * options:
12165
- * - scale-down: Similar to contain, but the image is never enlarged. If
12166
- * the image is larger than given width or height, it will be resized.
12167
- * Otherwise its original size will be kept.
12168
- * - contain: Resizes to maximum size that fits within the given width and
12169
- * height. If only a single dimension is given (e.g. only width), the
12170
- * image will be shrunk or enlarged to exactly match that dimension.
12171
- * Aspect ratio is always preserved.
12172
- * - cover: Resizes (shrinks or enlarges) to fill the entire area of width
12173
- * and height. If the image has an aspect ratio different from the ratio
12174
- * of width and height, it will be cropped to fit.
12175
- * - crop: The image will be shrunk and cropped to fit within the area
12176
- * specified by width and height. The image will not be enlarged. For images
12177
- * smaller than the given dimensions it's the same as scale-down. For
12178
- * images larger than the given dimensions, it's the same as cover.
12179
- * See also trim.
12180
- * - pad: Resizes to the maximum size that fits within the given width and
12181
- * height, and then fills the remaining area with a background color
12182
- * (white by default). Use of this mode is not recommended, as the same
12183
- * effect can be more efficiently achieved with the contain mode and the
12184
- * CSS object-fit: contain property.
12185
- * - squeeze: Stretches and deforms to the width and height given, even if it
12186
- * breaks aspect ratio
12187
- */
12188
- fit?: "scale-down" | "contain" | "cover" | "crop" | "pad" | "squeeze";
12189
- /**
12190
- * Image segmentation using artificial intelligence models. Sets pixels not
12191
- * within selected segment area to transparent e.g "foreground" sets every
12192
- * background pixel as transparent.
12193
- */
12194
- segment?: "foreground";
12195
- /**
12196
- * When cropping with fit: "cover", this defines the side or point that should
12197
- * be left uncropped. The value is either a string
12198
- * "left", "right", "top", "bottom", "auto", or "center" (the default),
12199
- * or an object {x, y} containing focal point coordinates in the original
12200
- * image expressed as fractions ranging from 0.0 (top or left) to 1.0
12201
- * (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
12202
- * crop bottom or left and right sides as necessary, but won’t crop anything
12203
- * from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
12204
- * preserve as much as possible around a point at 20% of the height of the
12205
- * source image.
12206
- */
12207
- gravity?:
12208
- | "face"
12209
- | "left"
12210
- | "right"
12211
- | "top"
12212
- | "bottom"
12213
- | "center"
12214
- | "auto"
12215
- | "entropy"
12216
- | BasicImageTransformationsGravityCoordinates;
12217
- /**
12218
- * Background color to add underneath the image. Applies only to images with
12219
- * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
12220
- * hsl(…), etc.)
12221
- */
12222
- background?: string;
12223
- /**
12224
- * Number of degrees (90, 180, 270) to rotate the image by. width and height
12225
- * options refer to axes after rotation.
12226
- */
12227
- rotate?: 0 | 90 | 180 | 270 | 360;
12228
- }
12229
- interface BasicImageTransformationsGravityCoordinates {
12230
- x?: number;
12231
- y?: number;
12232
- mode?: "remainder" | "box-center";
12233
- }
12234
12235
  /**
12235
12236
  * In addition to the properties you can set in the RequestInit dict
12236
12237
  * that you pass as an argument to the Request constructor, you can
@@ -12306,6 +12307,17 @@ interface RequestInitCfProperties extends Record<string, unknown> {
12306
12307
  cacheReserveMinimumFileSize?: number;
12307
12308
  scrapeShield?: boolean;
12308
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";
12309
12321
  image?: RequestInitCfPropertiesImage;
12310
12322
  minify?: RequestInitCfPropertiesImageMinify;
12311
12323
  mirage?: boolean;
@@ -12326,6 +12338,209 @@ interface RequestInitCfProperties extends Record<string, unknown> {
12326
12338
  */
12327
12339
  resolveOverride?: string;
12328
12340
  }
12341
+ interface BasicImageTransformations {
12342
+ /**
12343
+ * Maximum width in image pixels. The value must be an integer.
12344
+ */
12345
+ width?: number;
12346
+ /**
12347
+ * Maximum height in image pixels. The value must be an integer.
12348
+ */
12349
+ height?: number;
12350
+ /**
12351
+ * When cropping with fit: "cover", this defines the side or point that should
12352
+ * be left uncropped. The value is either a string
12353
+ * "left", "right", "top", "bottom", "auto", or "center" (the default),
12354
+ * or an object {x, y} containing focal point coordinates in the original
12355
+ * image expressed as fractions ranging from 0.0 (top or left) to 1.0
12356
+ * (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
12357
+ * crop bottom or left and right sides as necessary, but won’t crop anything
12358
+ * from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
12359
+ * preserve as much as possible around a point at 20% of the height of the
12360
+ * source image.
12361
+ */
12362
+ gravity?:
12363
+ | "face"
12364
+ | "left"
12365
+ | "right"
12366
+ | "top"
12367
+ | "bottom"
12368
+ | "center"
12369
+ | "auto"
12370
+ | "entropy"
12371
+ | BasicImageTransformationsGravityCoordinates;
12372
+ /**
12373
+ * Specifies how closely the image is cropped toward detected faces when combined
12374
+ * with the gravity=face option. Accepts a valid range between 0.0 (includes as much
12375
+ * of the background as possible) and 1.0 (crops the image as closely to the face as
12376
+ * possible). The default is 0.
12377
+ */
12378
+ zoom?: number;
12379
+ /**
12380
+ * Resizing mode as a string. It affects interpretation of width and height
12381
+ * options:
12382
+ * - scale-down: Similar to contain, but the image is never enlarged. If
12383
+ * the image is larger than given width or height, it will be resized.
12384
+ * Otherwise its original size will be kept.
12385
+ * - scale-up: Similar to contain, but the image is never shrunk. If the
12386
+ * image is smaller than the given width or height, it will be resized.
12387
+ * Otherwise its original size will be kept.
12388
+ * - contain: Resizes to maximum size that fits within the given width and
12389
+ * height. If only a single dimension is given (e.g. only width), the
12390
+ * image will be shrunk or enlarged to exactly match that dimension.
12391
+ * Aspect ratio is always preserved.
12392
+ * - cover: Resizes (shrinks or enlarges) to fill the entire area of width
12393
+ * and height. If the image has an aspect ratio different from the ratio
12394
+ * of width and height, it will be cropped to fit.
12395
+ * - crop: The image will be shrunk and cropped to fit within the area
12396
+ * specified by width and height. The image will not be enlarged. For images
12397
+ * smaller than the given dimensions it's the same as scale-down. For
12398
+ * images larger than the given dimensions, it's the same as cover.
12399
+ * See also trim.
12400
+ * - pad: Resizes to the maximum size that fits within the given width and
12401
+ * height, and then fills the remaining area with a background color
12402
+ * (white by default). Use of this mode is not recommended, as the same
12403
+ * effect can be more efficiently achieved with the contain mode and the
12404
+ * CSS object-fit: contain property.
12405
+ * - squeeze: Stretches and deforms to the width and height given, even if it
12406
+ * breaks aspect ratio
12407
+ */
12408
+ fit?:
12409
+ | "scale-down"
12410
+ | "scale-up"
12411
+ | "contain"
12412
+ | "cover"
12413
+ | "crop"
12414
+ | "pad"
12415
+ | "squeeze";
12416
+ /**
12417
+ * Allows you to trim your image. Takes dpr into account and is performed before
12418
+ * resizing or rotation.
12419
+ *
12420
+ * It can be used as:
12421
+ * - left, top, right, bottom - it will specify the number of pixels to cut
12422
+ * off each side
12423
+ * - width, height - the width/height you'd like to end up with - can be used
12424
+ * in combination with the properties above
12425
+ * - border - this will automatically trim the surroundings of an image based on
12426
+ * it's color. It consists of three properties:
12427
+ * - color: rgb or hex representation of the color you wish to trim (todo: verify the rgba bit)
12428
+ * - tolerance: difference from color to treat as color
12429
+ * - keep: the number of pixels of border to keep
12430
+ */
12431
+ trim?:
12432
+ | "border"
12433
+ | {
12434
+ top?: number;
12435
+ bottom?: number;
12436
+ left?: number;
12437
+ right?: number;
12438
+ width?: number;
12439
+ height?: number;
12440
+ border?:
12441
+ | boolean
12442
+ | {
12443
+ color?: string;
12444
+ tolerance?: number;
12445
+ keep?: number;
12446
+ };
12447
+ };
12448
+ /**
12449
+ * Background color to add underneath the image. Applies only to images with
12450
+ * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
12451
+ * hsl(…), etc.)
12452
+ */
12453
+ background?: string;
12454
+ /**
12455
+ * Flips the images horizontally, vertically, or both. Flipping is applied before
12456
+ * rotation, so if you apply flip=h,rotate=90 then the image will be flipped
12457
+ * horizontally, then rotated by 90 degrees.
12458
+ */
12459
+ flip?: "h" | "v" | "hv";
12460
+ /**
12461
+ * Number of degrees (90, 180, 270) to rotate the image by. width and height
12462
+ * options refer to axes after rotation.
12463
+ */
12464
+ rotate?: 0 | 90 | 180 | 270 | 360;
12465
+ /**
12466
+ * Strength of sharpening filter to apply to the image. Floating-point
12467
+ * number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
12468
+ * recommended value for downscaled images.
12469
+ */
12470
+ sharpen?: number;
12471
+ /**
12472
+ * Radius of a blur filter (approximate gaussian). Maximum supported radius
12473
+ * is 250.
12474
+ */
12475
+ blur?: number;
12476
+ /**
12477
+ * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12478
+ * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12479
+ * ignored.
12480
+ */
12481
+ contrast?: number;
12482
+ /**
12483
+ * Increase brightness by a factor. A value of 1.0 equals no change, a value
12484
+ * of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
12485
+ * 0 is ignored.
12486
+ */
12487
+ brightness?: number;
12488
+ /**
12489
+ * Increase exposure by a factor. A value of 1.0 equals no change, a value of
12490
+ * 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
12491
+ */
12492
+ gamma?: number;
12493
+ /**
12494
+ * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12495
+ * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12496
+ * ignored.
12497
+ */
12498
+ saturation?: number;
12499
+ /**
12500
+ * Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
12501
+ * easier to specify higher-DPI sizes in <img srcset>.
12502
+ */
12503
+ dpr?: number;
12504
+ /**
12505
+ * Adds a border around the image. The border is added after resizing. Border
12506
+ * width takes dpr into account, and can be specified either using a single
12507
+ * width property, or individually for each side.
12508
+ */
12509
+ border?:
12510
+ | {
12511
+ color: string;
12512
+ width: number;
12513
+ }
12514
+ | {
12515
+ color: string;
12516
+ top: number;
12517
+ right: number;
12518
+ bottom: number;
12519
+ left: number;
12520
+ };
12521
+ /**
12522
+ * Image segmentation using artificial intelligence models. Sets pixels not
12523
+ * within selected segment area to transparent e.g "foreground" sets every
12524
+ * background pixel as transparent.
12525
+ */
12526
+ segment?: "foreground";
12527
+ /**
12528
+ * Controls the algorithm used when an image needs to be enlarged. This
12529
+ * parameter works with any fit mode that upscales, such as `contain`,
12530
+ * `cover`, and `scale-up`. It has no effect when `fit=scale-down` or when
12531
+ * the target dimensions are smaller than the source.
12532
+ * - interpolate: Uses bicubic interpolation, which may reduce image quality.
12533
+ * This is the default behavior when `upscale` is not specified.
12534
+ * - generate: Uses AI upscaling to produce sharper, more detailed results
12535
+ * when enlarging images.
12536
+ */
12537
+ upscale?: "interpolate" | "generate";
12538
+ }
12539
+ interface BasicImageTransformationsGravityCoordinates {
12540
+ x?: number;
12541
+ y?: number;
12542
+ mode?: "remainder" | "box-center";
12543
+ }
12329
12544
  interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
12330
12545
  /**
12331
12546
  * Absolute URL of the image file to use for the drawing. It can be any of
@@ -12379,43 +12594,6 @@ interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
12379
12594
  right?: number;
12380
12595
  }
12381
12596
  interface RequestInitCfPropertiesImage extends BasicImageTransformations {
12382
- /**
12383
- * Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
12384
- * easier to specify higher-DPI sizes in <img srcset>.
12385
- */
12386
- dpr?: number;
12387
- /**
12388
- * Allows you to trim your image. Takes dpr into account and is performed before
12389
- * resizing or rotation.
12390
- *
12391
- * It can be used as:
12392
- * - left, top, right, bottom - it will specify the number of pixels to cut
12393
- * off each side
12394
- * - width, height - the width/height you'd like to end up with - can be used
12395
- * in combination with the properties above
12396
- * - border - this will automatically trim the surroundings of an image based on
12397
- * it's color. It consists of three properties:
12398
- * - color: rgb or hex representation of the color you wish to trim (todo: verify the rgba bit)
12399
- * - tolerance: difference from color to treat as color
12400
- * - keep: the number of pixels of border to keep
12401
- */
12402
- trim?:
12403
- | "border"
12404
- | {
12405
- top?: number;
12406
- bottom?: number;
12407
- left?: number;
12408
- right?: number;
12409
- width?: number;
12410
- height?: number;
12411
- border?:
12412
- | boolean
12413
- | {
12414
- color?: string;
12415
- tolerance?: number;
12416
- keep?: number;
12417
- };
12418
- };
12419
12597
  /**
12420
12598
  * Quality setting from 1-100 (useful values are in 60-90 range). Lower values
12421
12599
  * make images look worse, but load faster. The default is 85. It applies only
@@ -12465,17 +12643,6 @@ interface RequestInitCfPropertiesImage extends BasicImageTransformations {
12465
12643
  * output formats always discard metadata.
12466
12644
  */
12467
12645
  metadata?: "keep" | "copyright" | "none";
12468
- /**
12469
- * Strength of sharpening filter to apply to the image. Floating-point
12470
- * number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
12471
- * recommended value for downscaled images.
12472
- */
12473
- sharpen?: number;
12474
- /**
12475
- * Radius of a blur filter (approximate gaussian). Maximum supported radius
12476
- * is 250.
12477
- */
12478
- blur?: number;
12479
12646
  /**
12480
12647
  * Overlays are drawn in the order they appear in the array (last array
12481
12648
  * entry is the topmost layer).
@@ -12487,52 +12654,6 @@ interface RequestInitCfPropertiesImage extends BasicImageTransformations {
12487
12654
  * the origin.
12488
12655
  */
12489
12656
  "origin-auth"?: "share-publicly";
12490
- /**
12491
- * Adds a border around the image. The border is added after resizing. Border
12492
- * width takes dpr into account, and can be specified either using a single
12493
- * width property, or individually for each side.
12494
- */
12495
- border?:
12496
- | {
12497
- color: string;
12498
- width: number;
12499
- }
12500
- | {
12501
- color: string;
12502
- top: number;
12503
- right: number;
12504
- bottom: number;
12505
- left: number;
12506
- };
12507
- /**
12508
- * Increase brightness by a factor. A value of 1.0 equals no change, a value
12509
- * of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
12510
- * 0 is ignored.
12511
- */
12512
- brightness?: number;
12513
- /**
12514
- * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12515
- * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12516
- * ignored.
12517
- */
12518
- contrast?: number;
12519
- /**
12520
- * Increase exposure by a factor. A value of 1.0 equals no change, a value of
12521
- * 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
12522
- */
12523
- gamma?: number;
12524
- /**
12525
- * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12526
- * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12527
- * ignored.
12528
- */
12529
- saturation?: number;
12530
- /**
12531
- * Flips the images horizontally, vertically, or both. Flipping is applied before
12532
- * rotation, so if you apply flip=h,rotate=90 then the image will be flipped
12533
- * horizontally, then rotated by 90 degrees.
12534
- */
12535
- flip?: "h" | "v" | "hv";
12536
12657
  /**
12537
12658
  * Slightly reduces latency on a cache miss by selecting a
12538
12659
  * quickest-to-compress file format, at a cost of increased file size and
@@ -14472,6 +14593,10 @@ declare namespace CloudflareWorkersModule {
14472
14593
  timeout?: WorkflowTimeoutDuration | number;
14473
14594
  sensitive?: WorkflowStepSensitivity;
14474
14595
  };
14596
+ export type WorkflowStepRollbackConfig = Pick<
14597
+ WorkflowStepConfig,
14598
+ "retries" | "timeout"
14599
+ >;
14475
14600
  export type WorkflowCronSchedule = {
14476
14601
  /** Cron expression that triggered this event. */
14477
14602
  cron: string;
@@ -14500,16 +14625,18 @@ declare namespace CloudflareWorkersModule {
14500
14625
  config: WorkflowStepConfig;
14501
14626
  };
14502
14627
  export type WorkflowRollbackContext<T = unknown> = {
14628
+ ctx: WorkflowStepContext;
14503
14629
  error: Error;
14504
14630
  output: T | undefined;
14631
+ /** @deprecated Use `ctx.step.name` and `ctx.step.count` instead. */
14505
14632
  stepName: string;
14506
14633
  };
14507
14634
  export type WorkflowRollbackHandler<T = unknown> = (
14508
14635
  ctx: WorkflowRollbackContext<T>,
14509
14636
  ) => Promise<void>;
14510
14637
  export type WorkflowStepRollbackOptions<T = unknown> = {
14511
- rollback?: WorkflowRollbackHandler<T>;
14512
- rollbackConfig?: WorkflowStepConfig;
14638
+ rollback: WorkflowRollbackHandler<T>;
14639
+ rollbackConfig?: WorkflowStepRollbackConfig;
14513
14640
  };
14514
14641
  export abstract class WorkflowStep {
14515
14642
  do<T extends Rpc.Serializable<T>>(
@@ -15478,7 +15605,8 @@ declare namespace TailStream {
15478
15605
  | "loadShed"
15479
15606
  | "responseStreamDisconnected"
15480
15607
  | "scriptNotFound"
15481
- | "internalError";
15608
+ | "internalError"
15609
+ | "exceededWallTime";
15482
15610
  interface ScriptVersion {
15483
15611
  readonly id: string;
15484
15612
  readonly tag?: string;