@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.
@@ -477,7 +477,8 @@ interface ExecutionContext<Props = unknown> {
477
477
  passThroughOnException(): void;
478
478
  readonly props: Props;
479
479
  cache?: CacheContext;
480
- tracing?: Tracing;
480
+ readonly access?: CloudflareAccessContext;
481
+ tracing: Tracing;
481
482
  }
482
483
  type ExportedHandlerFetchHandler<
483
484
  Env = unknown,
@@ -576,6 +577,10 @@ interface CachePurgeOptions {
576
577
  interface CacheContext {
577
578
  purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
578
579
  }
580
+ interface CloudflareAccessContext {
581
+ readonly aud: string;
582
+ getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
583
+ }
579
584
  declare abstract class ColoLocalActorNamespace {
580
585
  get(actorId: string): Fetcher;
581
586
  }
@@ -641,6 +646,8 @@ type DurableObjectLocationHint =
641
646
  | "weur"
642
647
  | "eeur"
643
648
  | "apac"
649
+ | "apac-ne"
650
+ | "apac-se"
644
651
  | "oc"
645
652
  | "afr"
646
653
  | "me";
@@ -782,6 +789,7 @@ interface DurableObjectFacets {
782
789
  ): Fetcher<T>;
783
790
  abort(name: string, reason: any): void;
784
791
  delete(name: string): void;
792
+ clone(src: string, dst: string): void;
785
793
  }
786
794
  interface FacetStartupOptions<
787
795
  T extends Rpc.DurableObjectBranded | undefined = undefined,
@@ -3836,6 +3844,28 @@ interface EventSourceEventSourceInit {
3836
3844
  withCredentials?: boolean;
3837
3845
  fetcher?: Fetcher;
3838
3846
  }
3847
+ interface ExecOutput {
3848
+ readonly stdout: ArrayBuffer;
3849
+ readonly stderr: ArrayBuffer;
3850
+ readonly exitCode: number;
3851
+ }
3852
+ interface ContainerExecOptions {
3853
+ cwd?: string;
3854
+ env?: Record<string, string>;
3855
+ user?: string;
3856
+ stdin?: ReadableStream | "pipe";
3857
+ stdout?: "pipe" | "ignore";
3858
+ stderr?: "pipe" | "ignore" | "combined";
3859
+ }
3860
+ interface ExecProcess {
3861
+ readonly stdin: WritableStream | null;
3862
+ readonly stdout: ReadableStream | null;
3863
+ readonly stderr: ReadableStream | null;
3864
+ readonly pid: number;
3865
+ readonly exitCode: Promise<number>;
3866
+ output(): Promise<ExecOutput>;
3867
+ kill(signal?: number): void;
3868
+ }
3839
3869
  interface Container {
3840
3870
  get running(): boolean;
3841
3871
  start(options?: ContainerStartupOptions): void;
@@ -3853,6 +3883,7 @@ interface Container {
3853
3883
  options: ContainerSnapshotOptions,
3854
3884
  ): Promise<ContainerSnapshot>;
3855
3885
  interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
3886
+ exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
3856
3887
  }
3857
3888
  interface ContainerDirectorySnapshot {
3858
3889
  id: string;
@@ -4027,11 +4058,62 @@ interface Tracing {
4027
4058
  callback: (span: Span, ...args: A) => T,
4028
4059
  ...args: A
4029
4060
  ): T;
4061
+ startActiveSpan<T, A extends unknown[]>(
4062
+ name: string,
4063
+ callback: (span: Span, ...args: A) => T,
4064
+ ...args: A
4065
+ ): T;
4030
4066
  Span: typeof Span;
4031
4067
  }
4032
4068
  declare abstract class Span {
4033
4069
  get isTraced(): boolean;
4034
4070
  setAttribute(key: string, value?: boolean | number | string): void;
4071
+ end(): void;
4072
+ }
4073
+ /**
4074
+ * Represents the identity of a user authenticated via Cloudflare Access.
4075
+ * This matches the result of calling /cdn-cgi/access/get-identity.
4076
+ *
4077
+ * The exact structure of the returned object depends on the identity provider
4078
+ * configuration for the Access application. The fields below represent commonly
4079
+ * available properties, but additional provider-specific fields may be present.
4080
+ */
4081
+ interface CloudflareAccessIdentity extends Record<string, unknown> {
4082
+ /** The user's email address, if available from the identity provider. */
4083
+ email?: string;
4084
+ /** The user's display name. */
4085
+ name?: string;
4086
+ /** The user's unique identifier. */
4087
+ user_uuid?: string;
4088
+ /** The Cloudflare account ID. */
4089
+ account_id?: string;
4090
+ /** Login timestamp (Unix epoch seconds). */
4091
+ iat?: number;
4092
+ /** The user's IP address at authentication time. */
4093
+ ip?: string;
4094
+ /** Authentication methods used (e.g., "pwd"). */
4095
+ amr?: string[];
4096
+ /** Identity provider information. */
4097
+ idp?: {
4098
+ id: string;
4099
+ type: string;
4100
+ };
4101
+ /** Geographic information about where the user authenticated. */
4102
+ geo?: {
4103
+ country: string;
4104
+ };
4105
+ /** Group memberships from the identity provider. */
4106
+ groups?: Array<{
4107
+ id: string;
4108
+ name: string;
4109
+ email?: string;
4110
+ }>;
4111
+ /** Device posture check results, keyed by check ID. */
4112
+ devicePosture?: Record<string, unknown>;
4113
+ /** True if the user connected via Cloudflare WARP. */
4114
+ is_warp?: boolean;
4115
+ /** True if the user is authenticated via Cloudflare Gateway. */
4116
+ is_gateway?: boolean;
4035
4117
  }
4036
4118
  // ============================================================================
4037
4119
  // Agent Memory
@@ -12182,87 +12264,6 @@ declare abstract class BrowserRun {
12182
12264
  options: BrowserRunMarkdownOptions,
12183
12265
  ): Promise<Response>;
12184
12266
  }
12185
- interface BasicImageTransformations {
12186
- /**
12187
- * Maximum width in image pixels. The value must be an integer.
12188
- */
12189
- width?: number;
12190
- /**
12191
- * Maximum height in image pixels. The value must be an integer.
12192
- */
12193
- height?: number;
12194
- /**
12195
- * Resizing mode as a string. It affects interpretation of width and height
12196
- * options:
12197
- * - scale-down: Similar to contain, but the image is never enlarged. If
12198
- * the image is larger than given width or height, it will be resized.
12199
- * Otherwise its original size will be kept.
12200
- * - contain: Resizes to maximum size that fits within the given width and
12201
- * height. If only a single dimension is given (e.g. only width), the
12202
- * image will be shrunk or enlarged to exactly match that dimension.
12203
- * Aspect ratio is always preserved.
12204
- * - cover: Resizes (shrinks or enlarges) to fill the entire area of width
12205
- * and height. If the image has an aspect ratio different from the ratio
12206
- * of width and height, it will be cropped to fit.
12207
- * - crop: The image will be shrunk and cropped to fit within the area
12208
- * specified by width and height. The image will not be enlarged. For images
12209
- * smaller than the given dimensions it's the same as scale-down. For
12210
- * images larger than the given dimensions, it's the same as cover.
12211
- * See also trim.
12212
- * - pad: Resizes to the maximum size that fits within the given width and
12213
- * height, and then fills the remaining area with a background color
12214
- * (white by default). Use of this mode is not recommended, as the same
12215
- * effect can be more efficiently achieved with the contain mode and the
12216
- * CSS object-fit: contain property.
12217
- * - squeeze: Stretches and deforms to the width and height given, even if it
12218
- * breaks aspect ratio
12219
- */
12220
- fit?: "scale-down" | "contain" | "cover" | "crop" | "pad" | "squeeze";
12221
- /**
12222
- * Image segmentation using artificial intelligence models. Sets pixels not
12223
- * within selected segment area to transparent e.g "foreground" sets every
12224
- * background pixel as transparent.
12225
- */
12226
- segment?: "foreground";
12227
- /**
12228
- * When cropping with fit: "cover", this defines the side or point that should
12229
- * be left uncropped. The value is either a string
12230
- * "left", "right", "top", "bottom", "auto", or "center" (the default),
12231
- * or an object {x, y} containing focal point coordinates in the original
12232
- * image expressed as fractions ranging from 0.0 (top or left) to 1.0
12233
- * (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
12234
- * crop bottom or left and right sides as necessary, but won’t crop anything
12235
- * from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
12236
- * preserve as much as possible around a point at 20% of the height of the
12237
- * source image.
12238
- */
12239
- gravity?:
12240
- | "face"
12241
- | "left"
12242
- | "right"
12243
- | "top"
12244
- | "bottom"
12245
- | "center"
12246
- | "auto"
12247
- | "entropy"
12248
- | BasicImageTransformationsGravityCoordinates;
12249
- /**
12250
- * Background color to add underneath the image. Applies only to images with
12251
- * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
12252
- * hsl(…), etc.)
12253
- */
12254
- background?: string;
12255
- /**
12256
- * Number of degrees (90, 180, 270) to rotate the image by. width and height
12257
- * options refer to axes after rotation.
12258
- */
12259
- rotate?: 0 | 90 | 180 | 270 | 360;
12260
- }
12261
- interface BasicImageTransformationsGravityCoordinates {
12262
- x?: number;
12263
- y?: number;
12264
- mode?: "remainder" | "box-center";
12265
- }
12266
12267
  /**
12267
12268
  * In addition to the properties you can set in the RequestInit dict
12268
12269
  * that you pass as an argument to the Request constructor, you can
@@ -12338,6 +12339,17 @@ interface RequestInitCfProperties extends Record<string, unknown> {
12338
12339
  cacheReserveMinimumFileSize?: number;
12339
12340
  scrapeShield?: boolean;
12340
12341
  apps?: boolean;
12342
+ /**
12343
+ * Controls whether an outbound gRPC-web subrequest from this Worker is
12344
+ * converted to gRPC at the Cloudflare edge.
12345
+ *
12346
+ * - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
12347
+ * - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
12348
+ *
12349
+ * Provides per-request control over the same edge conversion behavior
12350
+ * gated by the `auto_grpc_convert` compatibility flag.
12351
+ */
12352
+ grpcWeb?: "passthrough" | "convert";
12341
12353
  image?: RequestInitCfPropertiesImage;
12342
12354
  minify?: RequestInitCfPropertiesImageMinify;
12343
12355
  mirage?: boolean;
@@ -12358,6 +12370,209 @@ interface RequestInitCfProperties extends Record<string, unknown> {
12358
12370
  */
12359
12371
  resolveOverride?: string;
12360
12372
  }
12373
+ interface BasicImageTransformations {
12374
+ /**
12375
+ * Maximum width in image pixels. The value must be an integer.
12376
+ */
12377
+ width?: number;
12378
+ /**
12379
+ * Maximum height in image pixels. The value must be an integer.
12380
+ */
12381
+ height?: number;
12382
+ /**
12383
+ * When cropping with fit: "cover", this defines the side or point that should
12384
+ * be left uncropped. The value is either a string
12385
+ * "left", "right", "top", "bottom", "auto", or "center" (the default),
12386
+ * or an object {x, y} containing focal point coordinates in the original
12387
+ * image expressed as fractions ranging from 0.0 (top or left) to 1.0
12388
+ * (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
12389
+ * crop bottom or left and right sides as necessary, but won’t crop anything
12390
+ * from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
12391
+ * preserve as much as possible around a point at 20% of the height of the
12392
+ * source image.
12393
+ */
12394
+ gravity?:
12395
+ | "face"
12396
+ | "left"
12397
+ | "right"
12398
+ | "top"
12399
+ | "bottom"
12400
+ | "center"
12401
+ | "auto"
12402
+ | "entropy"
12403
+ | BasicImageTransformationsGravityCoordinates;
12404
+ /**
12405
+ * Specifies how closely the image is cropped toward detected faces when combined
12406
+ * with the gravity=face option. Accepts a valid range between 0.0 (includes as much
12407
+ * of the background as possible) and 1.0 (crops the image as closely to the face as
12408
+ * possible). The default is 0.
12409
+ */
12410
+ zoom?: number;
12411
+ /**
12412
+ * Resizing mode as a string. It affects interpretation of width and height
12413
+ * options:
12414
+ * - scale-down: Similar to contain, but the image is never enlarged. If
12415
+ * the image is larger than given width or height, it will be resized.
12416
+ * Otherwise its original size will be kept.
12417
+ * - scale-up: Similar to contain, but the image is never shrunk. If the
12418
+ * image is smaller than the given width or height, it will be resized.
12419
+ * Otherwise its original size will be kept.
12420
+ * - contain: Resizes to maximum size that fits within the given width and
12421
+ * height. If only a single dimension is given (e.g. only width), the
12422
+ * image will be shrunk or enlarged to exactly match that dimension.
12423
+ * Aspect ratio is always preserved.
12424
+ * - cover: Resizes (shrinks or enlarges) to fill the entire area of width
12425
+ * and height. If the image has an aspect ratio different from the ratio
12426
+ * of width and height, it will be cropped to fit.
12427
+ * - crop: The image will be shrunk and cropped to fit within the area
12428
+ * specified by width and height. The image will not be enlarged. For images
12429
+ * smaller than the given dimensions it's the same as scale-down. For
12430
+ * images larger than the given dimensions, it's the same as cover.
12431
+ * See also trim.
12432
+ * - pad: Resizes to the maximum size that fits within the given width and
12433
+ * height, and then fills the remaining area with a background color
12434
+ * (white by default). Use of this mode is not recommended, as the same
12435
+ * effect can be more efficiently achieved with the contain mode and the
12436
+ * CSS object-fit: contain property.
12437
+ * - squeeze: Stretches and deforms to the width and height given, even if it
12438
+ * breaks aspect ratio
12439
+ */
12440
+ fit?:
12441
+ | "scale-down"
12442
+ | "scale-up"
12443
+ | "contain"
12444
+ | "cover"
12445
+ | "crop"
12446
+ | "pad"
12447
+ | "squeeze";
12448
+ /**
12449
+ * Allows you to trim your image. Takes dpr into account and is performed before
12450
+ * resizing or rotation.
12451
+ *
12452
+ * It can be used as:
12453
+ * - left, top, right, bottom - it will specify the number of pixels to cut
12454
+ * off each side
12455
+ * - width, height - the width/height you'd like to end up with - can be used
12456
+ * in combination with the properties above
12457
+ * - border - this will automatically trim the surroundings of an image based on
12458
+ * it's color. It consists of three properties:
12459
+ * - color: rgb or hex representation of the color you wish to trim (todo: verify the rgba bit)
12460
+ * - tolerance: difference from color to treat as color
12461
+ * - keep: the number of pixels of border to keep
12462
+ */
12463
+ trim?:
12464
+ | "border"
12465
+ | {
12466
+ top?: number;
12467
+ bottom?: number;
12468
+ left?: number;
12469
+ right?: number;
12470
+ width?: number;
12471
+ height?: number;
12472
+ border?:
12473
+ | boolean
12474
+ | {
12475
+ color?: string;
12476
+ tolerance?: number;
12477
+ keep?: number;
12478
+ };
12479
+ };
12480
+ /**
12481
+ * Background color to add underneath the image. Applies only to images with
12482
+ * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
12483
+ * hsl(…), etc.)
12484
+ */
12485
+ background?: string;
12486
+ /**
12487
+ * Flips the images horizontally, vertically, or both. Flipping is applied before
12488
+ * rotation, so if you apply flip=h,rotate=90 then the image will be flipped
12489
+ * horizontally, then rotated by 90 degrees.
12490
+ */
12491
+ flip?: "h" | "v" | "hv";
12492
+ /**
12493
+ * Number of degrees (90, 180, 270) to rotate the image by. width and height
12494
+ * options refer to axes after rotation.
12495
+ */
12496
+ rotate?: 0 | 90 | 180 | 270 | 360;
12497
+ /**
12498
+ * Strength of sharpening filter to apply to the image. Floating-point
12499
+ * number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
12500
+ * recommended value for downscaled images.
12501
+ */
12502
+ sharpen?: number;
12503
+ /**
12504
+ * Radius of a blur filter (approximate gaussian). Maximum supported radius
12505
+ * is 250.
12506
+ */
12507
+ blur?: number;
12508
+ /**
12509
+ * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12510
+ * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12511
+ * ignored.
12512
+ */
12513
+ contrast?: number;
12514
+ /**
12515
+ * Increase brightness by a factor. A value of 1.0 equals no change, a value
12516
+ * of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
12517
+ * 0 is ignored.
12518
+ */
12519
+ brightness?: number;
12520
+ /**
12521
+ * Increase exposure by a factor. A value of 1.0 equals no change, a value of
12522
+ * 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
12523
+ */
12524
+ gamma?: number;
12525
+ /**
12526
+ * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12527
+ * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12528
+ * ignored.
12529
+ */
12530
+ saturation?: number;
12531
+ /**
12532
+ * Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
12533
+ * easier to specify higher-DPI sizes in <img srcset>.
12534
+ */
12535
+ dpr?: number;
12536
+ /**
12537
+ * Adds a border around the image. The border is added after resizing. Border
12538
+ * width takes dpr into account, and can be specified either using a single
12539
+ * width property, or individually for each side.
12540
+ */
12541
+ border?:
12542
+ | {
12543
+ color: string;
12544
+ width: number;
12545
+ }
12546
+ | {
12547
+ color: string;
12548
+ top: number;
12549
+ right: number;
12550
+ bottom: number;
12551
+ left: number;
12552
+ };
12553
+ /**
12554
+ * Image segmentation using artificial intelligence models. Sets pixels not
12555
+ * within selected segment area to transparent e.g "foreground" sets every
12556
+ * background pixel as transparent.
12557
+ */
12558
+ segment?: "foreground";
12559
+ /**
12560
+ * Controls the algorithm used when an image needs to be enlarged. This
12561
+ * parameter works with any fit mode that upscales, such as `contain`,
12562
+ * `cover`, and `scale-up`. It has no effect when `fit=scale-down` or when
12563
+ * the target dimensions are smaller than the source.
12564
+ * - interpolate: Uses bicubic interpolation, which may reduce image quality.
12565
+ * This is the default behavior when `upscale` is not specified.
12566
+ * - generate: Uses AI upscaling to produce sharper, more detailed results
12567
+ * when enlarging images.
12568
+ */
12569
+ upscale?: "interpolate" | "generate";
12570
+ }
12571
+ interface BasicImageTransformationsGravityCoordinates {
12572
+ x?: number;
12573
+ y?: number;
12574
+ mode?: "remainder" | "box-center";
12575
+ }
12361
12576
  interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
12362
12577
  /**
12363
12578
  * Absolute URL of the image file to use for the drawing. It can be any of
@@ -12411,43 +12626,6 @@ interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
12411
12626
  right?: number;
12412
12627
  }
12413
12628
  interface RequestInitCfPropertiesImage extends BasicImageTransformations {
12414
- /**
12415
- * Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
12416
- * easier to specify higher-DPI sizes in <img srcset>.
12417
- */
12418
- dpr?: number;
12419
- /**
12420
- * Allows you to trim your image. Takes dpr into account and is performed before
12421
- * resizing or rotation.
12422
- *
12423
- * It can be used as:
12424
- * - left, top, right, bottom - it will specify the number of pixels to cut
12425
- * off each side
12426
- * - width, height - the width/height you'd like to end up with - can be used
12427
- * in combination with the properties above
12428
- * - border - this will automatically trim the surroundings of an image based on
12429
- * it's color. It consists of three properties:
12430
- * - color: rgb or hex representation of the color you wish to trim (todo: verify the rgba bit)
12431
- * - tolerance: difference from color to treat as color
12432
- * - keep: the number of pixels of border to keep
12433
- */
12434
- trim?:
12435
- | "border"
12436
- | {
12437
- top?: number;
12438
- bottom?: number;
12439
- left?: number;
12440
- right?: number;
12441
- width?: number;
12442
- height?: number;
12443
- border?:
12444
- | boolean
12445
- | {
12446
- color?: string;
12447
- tolerance?: number;
12448
- keep?: number;
12449
- };
12450
- };
12451
12629
  /**
12452
12630
  * Quality setting from 1-100 (useful values are in 60-90 range). Lower values
12453
12631
  * make images look worse, but load faster. The default is 85. It applies only
@@ -12497,17 +12675,6 @@ interface RequestInitCfPropertiesImage extends BasicImageTransformations {
12497
12675
  * output formats always discard metadata.
12498
12676
  */
12499
12677
  metadata?: "keep" | "copyright" | "none";
12500
- /**
12501
- * Strength of sharpening filter to apply to the image. Floating-point
12502
- * number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
12503
- * recommended value for downscaled images.
12504
- */
12505
- sharpen?: number;
12506
- /**
12507
- * Radius of a blur filter (approximate gaussian). Maximum supported radius
12508
- * is 250.
12509
- */
12510
- blur?: number;
12511
12678
  /**
12512
12679
  * Overlays are drawn in the order they appear in the array (last array
12513
12680
  * entry is the topmost layer).
@@ -12519,52 +12686,6 @@ interface RequestInitCfPropertiesImage extends BasicImageTransformations {
12519
12686
  * the origin.
12520
12687
  */
12521
12688
  "origin-auth"?: "share-publicly";
12522
- /**
12523
- * Adds a border around the image. The border is added after resizing. Border
12524
- * width takes dpr into account, and can be specified either using a single
12525
- * width property, or individually for each side.
12526
- */
12527
- border?:
12528
- | {
12529
- color: string;
12530
- width: number;
12531
- }
12532
- | {
12533
- color: string;
12534
- top: number;
12535
- right: number;
12536
- bottom: number;
12537
- left: number;
12538
- };
12539
- /**
12540
- * Increase brightness by a factor. A value of 1.0 equals no change, a value
12541
- * of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
12542
- * 0 is ignored.
12543
- */
12544
- brightness?: 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
- contrast?: number;
12551
- /**
12552
- * Increase exposure by a factor. A value of 1.0 equals no change, a value of
12553
- * 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
12554
- */
12555
- gamma?: number;
12556
- /**
12557
- * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12558
- * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12559
- * ignored.
12560
- */
12561
- saturation?: number;
12562
- /**
12563
- * Flips the images horizontally, vertically, or both. Flipping is applied before
12564
- * rotation, so if you apply flip=h,rotate=90 then the image will be flipped
12565
- * horizontally, then rotated by 90 degrees.
12566
- */
12567
- flip?: "h" | "v" | "hv";
12568
12689
  /**
12569
12690
  * Slightly reduces latency on a cache miss by selecting a
12570
12691
  * quickest-to-compress file format, at a cost of increased file size and
@@ -14504,6 +14625,10 @@ declare namespace CloudflareWorkersModule {
14504
14625
  timeout?: WorkflowTimeoutDuration | number;
14505
14626
  sensitive?: WorkflowStepSensitivity;
14506
14627
  };
14628
+ export type WorkflowStepRollbackConfig = Pick<
14629
+ WorkflowStepConfig,
14630
+ "retries" | "timeout"
14631
+ >;
14507
14632
  export type WorkflowCronSchedule = {
14508
14633
  /** Cron expression that triggered this event. */
14509
14634
  cron: string;
@@ -14532,16 +14657,18 @@ declare namespace CloudflareWorkersModule {
14532
14657
  config: WorkflowStepConfig;
14533
14658
  };
14534
14659
  export type WorkflowRollbackContext<T = unknown> = {
14660
+ ctx: WorkflowStepContext;
14535
14661
  error: Error;
14536
14662
  output: T | undefined;
14663
+ /** @deprecated Use `ctx.step.name` and `ctx.step.count` instead. */
14537
14664
  stepName: string;
14538
14665
  };
14539
14666
  export type WorkflowRollbackHandler<T = unknown> = (
14540
14667
  ctx: WorkflowRollbackContext<T>,
14541
14668
  ) => Promise<void>;
14542
14669
  export type WorkflowStepRollbackOptions<T = unknown> = {
14543
- rollback?: WorkflowRollbackHandler<T>;
14544
- rollbackConfig?: WorkflowStepConfig;
14670
+ rollback: WorkflowRollbackHandler<T>;
14671
+ rollbackConfig?: WorkflowStepRollbackConfig;
14545
14672
  };
14546
14673
  export abstract class WorkflowStep {
14547
14674
  do<T extends Rpc.Serializable<T>>(
@@ -15510,7 +15637,8 @@ declare namespace TailStream {
15510
15637
  | "loadShed"
15511
15638
  | "responseStreamDisconnected"
15512
15639
  | "scriptNotFound"
15513
- | "internalError";
15640
+ | "internalError"
15641
+ | "exceededWallTime";
15514
15642
  interface ScriptVersion {
15515
15643
  readonly id: string;
15516
15644
  readonly tag?: string;