@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,
@@ -3825,6 +3833,28 @@ interface EventSourceEventSourceInit {
3825
3833
  withCredentials?: boolean;
3826
3834
  fetcher?: Fetcher;
3827
3835
  }
3836
+ interface ExecOutput {
3837
+ readonly stdout: ArrayBuffer;
3838
+ readonly stderr: ArrayBuffer;
3839
+ readonly exitCode: number;
3840
+ }
3841
+ interface ContainerExecOptions {
3842
+ cwd?: string;
3843
+ env?: Record<string, string>;
3844
+ user?: string;
3845
+ stdin?: ReadableStream | "pipe";
3846
+ stdout?: "pipe" | "ignore";
3847
+ stderr?: "pipe" | "ignore" | "combined";
3848
+ }
3849
+ interface ExecProcess {
3850
+ readonly stdin: WritableStream | null;
3851
+ readonly stdout: ReadableStream | null;
3852
+ readonly stderr: ReadableStream | null;
3853
+ readonly pid: number;
3854
+ readonly exitCode: Promise<number>;
3855
+ output(): Promise<ExecOutput>;
3856
+ kill(signal?: number): void;
3857
+ }
3828
3858
  interface Container {
3829
3859
  get running(): boolean;
3830
3860
  start(options?: ContainerStartupOptions): void;
@@ -3842,6 +3872,7 @@ interface Container {
3842
3872
  options: ContainerSnapshotOptions,
3843
3873
  ): Promise<ContainerSnapshot>;
3844
3874
  interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
3875
+ exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
3845
3876
  }
3846
3877
  interface ContainerDirectorySnapshot {
3847
3878
  id: string;
@@ -4016,11 +4047,62 @@ interface Tracing {
4016
4047
  callback: (span: Span, ...args: A) => T,
4017
4048
  ...args: A
4018
4049
  ): T;
4050
+ startActiveSpan<T, A extends unknown[]>(
4051
+ name: string,
4052
+ callback: (span: Span, ...args: A) => T,
4053
+ ...args: A
4054
+ ): T;
4019
4055
  Span: typeof Span;
4020
4056
  }
4021
4057
  declare abstract class Span {
4022
4058
  get isTraced(): boolean;
4023
4059
  setAttribute(key: string, value?: boolean | number | string): void;
4060
+ end(): void;
4061
+ }
4062
+ /**
4063
+ * Represents the identity of a user authenticated via Cloudflare Access.
4064
+ * This matches the result of calling /cdn-cgi/access/get-identity.
4065
+ *
4066
+ * The exact structure of the returned object depends on the identity provider
4067
+ * configuration for the Access application. The fields below represent commonly
4068
+ * available properties, but additional provider-specific fields may be present.
4069
+ */
4070
+ interface CloudflareAccessIdentity extends Record<string, unknown> {
4071
+ /** The user's email address, if available from the identity provider. */
4072
+ email?: string;
4073
+ /** The user's display name. */
4074
+ name?: string;
4075
+ /** The user's unique identifier. */
4076
+ user_uuid?: string;
4077
+ /** The Cloudflare account ID. */
4078
+ account_id?: string;
4079
+ /** Login timestamp (Unix epoch seconds). */
4080
+ iat?: number;
4081
+ /** The user's IP address at authentication time. */
4082
+ ip?: string;
4083
+ /** Authentication methods used (e.g., "pwd"). */
4084
+ amr?: string[];
4085
+ /** Identity provider information. */
4086
+ idp?: {
4087
+ id: string;
4088
+ type: string;
4089
+ };
4090
+ /** Geographic information about where the user authenticated. */
4091
+ geo?: {
4092
+ country: string;
4093
+ };
4094
+ /** Group memberships from the identity provider. */
4095
+ groups?: Array<{
4096
+ id: string;
4097
+ name: string;
4098
+ email?: string;
4099
+ }>;
4100
+ /** Device posture check results, keyed by check ID. */
4101
+ devicePosture?: Record<string, unknown>;
4102
+ /** True if the user connected via Cloudflare WARP. */
4103
+ is_warp?: boolean;
4104
+ /** True if the user is authenticated via Cloudflare Gateway. */
4105
+ is_gateway?: boolean;
4024
4106
  }
4025
4107
  // ============================================================================
4026
4108
  // Agent Memory
@@ -12171,87 +12253,6 @@ declare abstract class BrowserRun {
12171
12253
  options: BrowserRunMarkdownOptions,
12172
12254
  ): Promise<Response>;
12173
12255
  }
12174
- interface BasicImageTransformations {
12175
- /**
12176
- * Maximum width in image pixels. The value must be an integer.
12177
- */
12178
- width?: number;
12179
- /**
12180
- * Maximum height in image pixels. The value must be an integer.
12181
- */
12182
- height?: number;
12183
- /**
12184
- * Resizing mode as a string. It affects interpretation of width and height
12185
- * options:
12186
- * - scale-down: Similar to contain, but the image is never enlarged. If
12187
- * the image is larger than given width or height, it will be resized.
12188
- * Otherwise its original size will be kept.
12189
- * - contain: Resizes to maximum size that fits within the given width and
12190
- * height. If only a single dimension is given (e.g. only width), the
12191
- * image will be shrunk or enlarged to exactly match that dimension.
12192
- * Aspect ratio is always preserved.
12193
- * - cover: Resizes (shrinks or enlarges) to fill the entire area of width
12194
- * and height. If the image has an aspect ratio different from the ratio
12195
- * of width and height, it will be cropped to fit.
12196
- * - crop: The image will be shrunk and cropped to fit within the area
12197
- * specified by width and height. The image will not be enlarged. For images
12198
- * smaller than the given dimensions it's the same as scale-down. For
12199
- * images larger than the given dimensions, it's the same as cover.
12200
- * See also trim.
12201
- * - pad: Resizes to the maximum size that fits within the given width and
12202
- * height, and then fills the remaining area with a background color
12203
- * (white by default). Use of this mode is not recommended, as the same
12204
- * effect can be more efficiently achieved with the contain mode and the
12205
- * CSS object-fit: contain property.
12206
- * - squeeze: Stretches and deforms to the width and height given, even if it
12207
- * breaks aspect ratio
12208
- */
12209
- fit?: "scale-down" | "contain" | "cover" | "crop" | "pad" | "squeeze";
12210
- /**
12211
- * Image segmentation using artificial intelligence models. Sets pixels not
12212
- * within selected segment area to transparent e.g "foreground" sets every
12213
- * background pixel as transparent.
12214
- */
12215
- segment?: "foreground";
12216
- /**
12217
- * When cropping with fit: "cover", this defines the side or point that should
12218
- * be left uncropped. The value is either a string
12219
- * "left", "right", "top", "bottom", "auto", or "center" (the default),
12220
- * or an object {x, y} containing focal point coordinates in the original
12221
- * image expressed as fractions ranging from 0.0 (top or left) to 1.0
12222
- * (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
12223
- * crop bottom or left and right sides as necessary, but won’t crop anything
12224
- * from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
12225
- * preserve as much as possible around a point at 20% of the height of the
12226
- * source image.
12227
- */
12228
- gravity?:
12229
- | "face"
12230
- | "left"
12231
- | "right"
12232
- | "top"
12233
- | "bottom"
12234
- | "center"
12235
- | "auto"
12236
- | "entropy"
12237
- | BasicImageTransformationsGravityCoordinates;
12238
- /**
12239
- * Background color to add underneath the image. Applies only to images with
12240
- * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
12241
- * hsl(…), etc.)
12242
- */
12243
- background?: string;
12244
- /**
12245
- * Number of degrees (90, 180, 270) to rotate the image by. width and height
12246
- * options refer to axes after rotation.
12247
- */
12248
- rotate?: 0 | 90 | 180 | 270 | 360;
12249
- }
12250
- interface BasicImageTransformationsGravityCoordinates {
12251
- x?: number;
12252
- y?: number;
12253
- mode?: "remainder" | "box-center";
12254
- }
12255
12256
  /**
12256
12257
  * In addition to the properties you can set in the RequestInit dict
12257
12258
  * that you pass as an argument to the Request constructor, you can
@@ -12327,6 +12328,17 @@ interface RequestInitCfProperties extends Record<string, unknown> {
12327
12328
  cacheReserveMinimumFileSize?: number;
12328
12329
  scrapeShield?: boolean;
12329
12330
  apps?: boolean;
12331
+ /**
12332
+ * Controls whether an outbound gRPC-web subrequest from this Worker is
12333
+ * converted to gRPC at the Cloudflare edge.
12334
+ *
12335
+ * - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
12336
+ * - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
12337
+ *
12338
+ * Provides per-request control over the same edge conversion behavior
12339
+ * gated by the `auto_grpc_convert` compatibility flag.
12340
+ */
12341
+ grpcWeb?: "passthrough" | "convert";
12330
12342
  image?: RequestInitCfPropertiesImage;
12331
12343
  minify?: RequestInitCfPropertiesImageMinify;
12332
12344
  mirage?: boolean;
@@ -12347,6 +12359,209 @@ interface RequestInitCfProperties extends Record<string, unknown> {
12347
12359
  */
12348
12360
  resolveOverride?: string;
12349
12361
  }
12362
+ interface BasicImageTransformations {
12363
+ /**
12364
+ * Maximum width in image pixels. The value must be an integer.
12365
+ */
12366
+ width?: number;
12367
+ /**
12368
+ * Maximum height in image pixels. The value must be an integer.
12369
+ */
12370
+ height?: number;
12371
+ /**
12372
+ * When cropping with fit: "cover", this defines the side or point that should
12373
+ * be left uncropped. The value is either a string
12374
+ * "left", "right", "top", "bottom", "auto", or "center" (the default),
12375
+ * or an object {x, y} containing focal point coordinates in the original
12376
+ * image expressed as fractions ranging from 0.0 (top or left) to 1.0
12377
+ * (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
12378
+ * crop bottom or left and right sides as necessary, but won’t crop anything
12379
+ * from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
12380
+ * preserve as much as possible around a point at 20% of the height of the
12381
+ * source image.
12382
+ */
12383
+ gravity?:
12384
+ | "face"
12385
+ | "left"
12386
+ | "right"
12387
+ | "top"
12388
+ | "bottom"
12389
+ | "center"
12390
+ | "auto"
12391
+ | "entropy"
12392
+ | BasicImageTransformationsGravityCoordinates;
12393
+ /**
12394
+ * Specifies how closely the image is cropped toward detected faces when combined
12395
+ * with the gravity=face option. Accepts a valid range between 0.0 (includes as much
12396
+ * of the background as possible) and 1.0 (crops the image as closely to the face as
12397
+ * possible). The default is 0.
12398
+ */
12399
+ zoom?: number;
12400
+ /**
12401
+ * Resizing mode as a string. It affects interpretation of width and height
12402
+ * options:
12403
+ * - scale-down: Similar to contain, but the image is never enlarged. If
12404
+ * the image is larger than given width or height, it will be resized.
12405
+ * Otherwise its original size will be kept.
12406
+ * - scale-up: Similar to contain, but the image is never shrunk. If the
12407
+ * image is smaller than the given width or height, it will be resized.
12408
+ * Otherwise its original size will be kept.
12409
+ * - contain: Resizes to maximum size that fits within the given width and
12410
+ * height. If only a single dimension is given (e.g. only width), the
12411
+ * image will be shrunk or enlarged to exactly match that dimension.
12412
+ * Aspect ratio is always preserved.
12413
+ * - cover: Resizes (shrinks or enlarges) to fill the entire area of width
12414
+ * and height. If the image has an aspect ratio different from the ratio
12415
+ * of width and height, it will be cropped to fit.
12416
+ * - crop: The image will be shrunk and cropped to fit within the area
12417
+ * specified by width and height. The image will not be enlarged. For images
12418
+ * smaller than the given dimensions it's the same as scale-down. For
12419
+ * images larger than the given dimensions, it's the same as cover.
12420
+ * See also trim.
12421
+ * - pad: Resizes to the maximum size that fits within the given width and
12422
+ * height, and then fills the remaining area with a background color
12423
+ * (white by default). Use of this mode is not recommended, as the same
12424
+ * effect can be more efficiently achieved with the contain mode and the
12425
+ * CSS object-fit: contain property.
12426
+ * - squeeze: Stretches and deforms to the width and height given, even if it
12427
+ * breaks aspect ratio
12428
+ */
12429
+ fit?:
12430
+ | "scale-down"
12431
+ | "scale-up"
12432
+ | "contain"
12433
+ | "cover"
12434
+ | "crop"
12435
+ | "pad"
12436
+ | "squeeze";
12437
+ /**
12438
+ * Allows you to trim your image. Takes dpr into account and is performed before
12439
+ * resizing or rotation.
12440
+ *
12441
+ * It can be used as:
12442
+ * - left, top, right, bottom - it will specify the number of pixels to cut
12443
+ * off each side
12444
+ * - width, height - the width/height you'd like to end up with - can be used
12445
+ * in combination with the properties above
12446
+ * - border - this will automatically trim the surroundings of an image based on
12447
+ * it's color. It consists of three properties:
12448
+ * - color: rgb or hex representation of the color you wish to trim (todo: verify the rgba bit)
12449
+ * - tolerance: difference from color to treat as color
12450
+ * - keep: the number of pixels of border to keep
12451
+ */
12452
+ trim?:
12453
+ | "border"
12454
+ | {
12455
+ top?: number;
12456
+ bottom?: number;
12457
+ left?: number;
12458
+ right?: number;
12459
+ width?: number;
12460
+ height?: number;
12461
+ border?:
12462
+ | boolean
12463
+ | {
12464
+ color?: string;
12465
+ tolerance?: number;
12466
+ keep?: number;
12467
+ };
12468
+ };
12469
+ /**
12470
+ * Background color to add underneath the image. Applies only to images with
12471
+ * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
12472
+ * hsl(…), etc.)
12473
+ */
12474
+ background?: string;
12475
+ /**
12476
+ * Flips the images horizontally, vertically, or both. Flipping is applied before
12477
+ * rotation, so if you apply flip=h,rotate=90 then the image will be flipped
12478
+ * horizontally, then rotated by 90 degrees.
12479
+ */
12480
+ flip?: "h" | "v" | "hv";
12481
+ /**
12482
+ * Number of degrees (90, 180, 270) to rotate the image by. width and height
12483
+ * options refer to axes after rotation.
12484
+ */
12485
+ rotate?: 0 | 90 | 180 | 270 | 360;
12486
+ /**
12487
+ * Strength of sharpening filter to apply to the image. Floating-point
12488
+ * number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
12489
+ * recommended value for downscaled images.
12490
+ */
12491
+ sharpen?: number;
12492
+ /**
12493
+ * Radius of a blur filter (approximate gaussian). Maximum supported radius
12494
+ * is 250.
12495
+ */
12496
+ blur?: number;
12497
+ /**
12498
+ * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12499
+ * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12500
+ * ignored.
12501
+ */
12502
+ contrast?: number;
12503
+ /**
12504
+ * Increase brightness by a factor. A value of 1.0 equals no change, a value
12505
+ * of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
12506
+ * 0 is ignored.
12507
+ */
12508
+ brightness?: number;
12509
+ /**
12510
+ * Increase exposure by a factor. A value of 1.0 equals no change, a value of
12511
+ * 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
12512
+ */
12513
+ gamma?: number;
12514
+ /**
12515
+ * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12516
+ * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12517
+ * ignored.
12518
+ */
12519
+ saturation?: number;
12520
+ /**
12521
+ * Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
12522
+ * easier to specify higher-DPI sizes in <img srcset>.
12523
+ */
12524
+ dpr?: number;
12525
+ /**
12526
+ * Adds a border around the image. The border is added after resizing. Border
12527
+ * width takes dpr into account, and can be specified either using a single
12528
+ * width property, or individually for each side.
12529
+ */
12530
+ border?:
12531
+ | {
12532
+ color: string;
12533
+ width: number;
12534
+ }
12535
+ | {
12536
+ color: string;
12537
+ top: number;
12538
+ right: number;
12539
+ bottom: number;
12540
+ left: number;
12541
+ };
12542
+ /**
12543
+ * Image segmentation using artificial intelligence models. Sets pixels not
12544
+ * within selected segment area to transparent e.g "foreground" sets every
12545
+ * background pixel as transparent.
12546
+ */
12547
+ segment?: "foreground";
12548
+ /**
12549
+ * Controls the algorithm used when an image needs to be enlarged. This
12550
+ * parameter works with any fit mode that upscales, such as `contain`,
12551
+ * `cover`, and `scale-up`. It has no effect when `fit=scale-down` or when
12552
+ * the target dimensions are smaller than the source.
12553
+ * - interpolate: Uses bicubic interpolation, which may reduce image quality.
12554
+ * This is the default behavior when `upscale` is not specified.
12555
+ * - generate: Uses AI upscaling to produce sharper, more detailed results
12556
+ * when enlarging images.
12557
+ */
12558
+ upscale?: "interpolate" | "generate";
12559
+ }
12560
+ interface BasicImageTransformationsGravityCoordinates {
12561
+ x?: number;
12562
+ y?: number;
12563
+ mode?: "remainder" | "box-center";
12564
+ }
12350
12565
  interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
12351
12566
  /**
12352
12567
  * Absolute URL of the image file to use for the drawing. It can be any of
@@ -12400,43 +12615,6 @@ interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
12400
12615
  right?: number;
12401
12616
  }
12402
12617
  interface RequestInitCfPropertiesImage extends BasicImageTransformations {
12403
- /**
12404
- * Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
12405
- * easier to specify higher-DPI sizes in <img srcset>.
12406
- */
12407
- dpr?: number;
12408
- /**
12409
- * Allows you to trim your image. Takes dpr into account and is performed before
12410
- * resizing or rotation.
12411
- *
12412
- * It can be used as:
12413
- * - left, top, right, bottom - it will specify the number of pixels to cut
12414
- * off each side
12415
- * - width, height - the width/height you'd like to end up with - can be used
12416
- * in combination with the properties above
12417
- * - border - this will automatically trim the surroundings of an image based on
12418
- * it's color. It consists of three properties:
12419
- * - color: rgb or hex representation of the color you wish to trim (todo: verify the rgba bit)
12420
- * - tolerance: difference from color to treat as color
12421
- * - keep: the number of pixels of border to keep
12422
- */
12423
- trim?:
12424
- | "border"
12425
- | {
12426
- top?: number;
12427
- bottom?: number;
12428
- left?: number;
12429
- right?: number;
12430
- width?: number;
12431
- height?: number;
12432
- border?:
12433
- | boolean
12434
- | {
12435
- color?: string;
12436
- tolerance?: number;
12437
- keep?: number;
12438
- };
12439
- };
12440
12618
  /**
12441
12619
  * Quality setting from 1-100 (useful values are in 60-90 range). Lower values
12442
12620
  * make images look worse, but load faster. The default is 85. It applies only
@@ -12486,17 +12664,6 @@ interface RequestInitCfPropertiesImage extends BasicImageTransformations {
12486
12664
  * output formats always discard metadata.
12487
12665
  */
12488
12666
  metadata?: "keep" | "copyright" | "none";
12489
- /**
12490
- * Strength of sharpening filter to apply to the image. Floating-point
12491
- * number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
12492
- * recommended value for downscaled images.
12493
- */
12494
- sharpen?: number;
12495
- /**
12496
- * Radius of a blur filter (approximate gaussian). Maximum supported radius
12497
- * is 250.
12498
- */
12499
- blur?: number;
12500
12667
  /**
12501
12668
  * Overlays are drawn in the order they appear in the array (last array
12502
12669
  * entry is the topmost layer).
@@ -12508,52 +12675,6 @@ interface RequestInitCfPropertiesImage extends BasicImageTransformations {
12508
12675
  * the origin.
12509
12676
  */
12510
12677
  "origin-auth"?: "share-publicly";
12511
- /**
12512
- * Adds a border around the image. The border is added after resizing. Border
12513
- * width takes dpr into account, and can be specified either using a single
12514
- * width property, or individually for each side.
12515
- */
12516
- border?:
12517
- | {
12518
- color: string;
12519
- width: number;
12520
- }
12521
- | {
12522
- color: string;
12523
- top: number;
12524
- right: number;
12525
- bottom: number;
12526
- left: number;
12527
- };
12528
- /**
12529
- * Increase brightness by a factor. A value of 1.0 equals no change, a value
12530
- * of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
12531
- * 0 is ignored.
12532
- */
12533
- brightness?: number;
12534
- /**
12535
- * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12536
- * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12537
- * ignored.
12538
- */
12539
- contrast?: number;
12540
- /**
12541
- * Increase exposure by a factor. A value of 1.0 equals no change, a value of
12542
- * 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
12543
- */
12544
- gamma?: number;
12545
- /**
12546
- * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12547
- * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12548
- * ignored.
12549
- */
12550
- saturation?: number;
12551
- /**
12552
- * Flips the images horizontally, vertically, or both. Flipping is applied before
12553
- * rotation, so if you apply flip=h,rotate=90 then the image will be flipped
12554
- * horizontally, then rotated by 90 degrees.
12555
- */
12556
- flip?: "h" | "v" | "hv";
12557
12678
  /**
12558
12679
  * Slightly reduces latency on a cache miss by selecting a
12559
12680
  * quickest-to-compress file format, at a cost of increased file size and
@@ -14493,6 +14614,10 @@ declare namespace CloudflareWorkersModule {
14493
14614
  timeout?: WorkflowTimeoutDuration | number;
14494
14615
  sensitive?: WorkflowStepSensitivity;
14495
14616
  };
14617
+ export type WorkflowStepRollbackConfig = Pick<
14618
+ WorkflowStepConfig,
14619
+ "retries" | "timeout"
14620
+ >;
14496
14621
  export type WorkflowCronSchedule = {
14497
14622
  /** Cron expression that triggered this event. */
14498
14623
  cron: string;
@@ -14521,16 +14646,18 @@ declare namespace CloudflareWorkersModule {
14521
14646
  config: WorkflowStepConfig;
14522
14647
  };
14523
14648
  export type WorkflowRollbackContext<T = unknown> = {
14649
+ ctx: WorkflowStepContext;
14524
14650
  error: Error;
14525
14651
  output: T | undefined;
14652
+ /** @deprecated Use `ctx.step.name` and `ctx.step.count` instead. */
14526
14653
  stepName: string;
14527
14654
  };
14528
14655
  export type WorkflowRollbackHandler<T = unknown> = (
14529
14656
  ctx: WorkflowRollbackContext<T>,
14530
14657
  ) => Promise<void>;
14531
14658
  export type WorkflowStepRollbackOptions<T = unknown> = {
14532
- rollback?: WorkflowRollbackHandler<T>;
14533
- rollbackConfig?: WorkflowStepConfig;
14659
+ rollback: WorkflowRollbackHandler<T>;
14660
+ rollbackConfig?: WorkflowStepRollbackConfig;
14534
14661
  };
14535
14662
  export abstract class WorkflowStep {
14536
14663
  do<T extends Rpc.Serializable<T>>(
@@ -15499,7 +15626,8 @@ declare namespace TailStream {
15499
15626
  | "loadShed"
15500
15627
  | "responseStreamDisconnected"
15501
15628
  | "scriptNotFound"
15502
- | "internalError";
15629
+ | "internalError"
15630
+ | "exceededWallTime";
15503
15631
  interface ScriptVersion {
15504
15632
  readonly id: string;
15505
15633
  readonly tag?: string;