@workflow/world-testing 5.0.0-beta.51 → 5.0.0-beta.53

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.
@@ -27226,7 +27226,8 @@ var init_ansi = __esm({
27226
27226
  // ../core/dist/log-format.js
27227
27227
  function composeLogLine(prefix, message, metadata) {
27228
27228
  const [framing, ...rest] = message.split("\n");
27229
- const body = rest.join("\n");
27229
+ const embeddedBody = rest.join("\n");
27230
+ const body = embeddedBody.trim() ? embeddedBody : pickString(metadata ?? {}, "errorStack") ?? "";
27230
27231
  const fields = renderStructuredFields(framing ?? "", body, metadata);
27231
27232
  const trimmedBody = trimStackBody(body);
27232
27233
  const lines = [
@@ -27254,6 +27255,7 @@ function renderStructuredFields(framing, body, metadata) {
27254
27255
  "errorName",
27255
27256
  "errorMessage",
27256
27257
  "errorStack",
27258
+ "errorCause",
27257
27259
  "hint",
27258
27260
  "attempt",
27259
27261
  "retryCount"
@@ -27261,7 +27263,8 @@ function renderStructuredFields(framing, body, metadata) {
27261
27263
  const lines = [];
27262
27264
  const errorName = pickString(metadata, "errorName");
27263
27265
  const attribution = pickString(metadata, "errorAttribution");
27264
- if (errorName || attribution) {
27266
+ const nameEchoedByStack = errorName !== null && stackHeaderNames(body, errorName);
27267
+ if (attribution || errorName && !nameEchoedByStack) {
27265
27268
  const badge = attribution ? attribution === "sdk" ? magenta("sdk error") : red("user error") : "";
27266
27269
  const cls = errorName ? bold(errorName) : "";
27267
27270
  const sep = badge && cls ? dim(" \xB7 ") : "";
@@ -27295,6 +27298,10 @@ function renderStructuredFields(framing, body, metadata) {
27295
27298
  if (errorMessage && !redundant.has("errorMessage")) {
27296
27299
  lines.push(` ${kvKey("error")} ${formatPassthroughValue(errorMessage)}`);
27297
27300
  }
27301
+ const errorCause = pickString(metadata, "errorCause");
27302
+ if (errorCause && !body.includes(errorCause)) {
27303
+ lines.push(` ${kvKey("cause")} ${formatPassthroughValue(errorCause)}`);
27304
+ }
27298
27305
  const hint2 = pickString(metadata, "hint");
27299
27306
  if (hint2) {
27300
27307
  lines.push(` ${hint(hint2)}`);
@@ -27350,6 +27357,10 @@ function isFrameworkFrame(line) {
27350
27357
  }
27351
27358
  return false;
27352
27359
  }
27360
+ function stackHeaderNames(body, errorName) {
27361
+ const header = body.split("\n", 1)[0]?.trim() ?? "";
27362
+ return header === errorName || header.startsWith(`${errorName}:`);
27363
+ }
27353
27364
  function pickString(metadata, key) {
27354
27365
  const v = metadata[key];
27355
27366
  return typeof v === "string" && v.length > 0 ? v : null;
@@ -27388,6 +27399,7 @@ var init_log_format = __esm({
27388
27399
  MAX_VISIBLE_FRAMES = 6;
27389
27400
  __name(trimStackBody, "trimStackBody");
27390
27401
  __name(isFrameworkFrame, "isFrameworkFrame");
27402
+ __name(stackHeaderNames, "stackHeaderNames");
27391
27403
  __name(pickString, "pickString");
27392
27404
  __name(kvKey, "kvKey");
27393
27405
  __name(formatIdRow, "formatIdRow");
@@ -32157,14 +32169,14 @@ var version2;
32157
32169
  var init_version = __esm({
32158
32170
  "../core/dist/version.js"() {
32159
32171
  "use strict";
32160
- version2 = "5.0.0-beta.51";
32172
+ version2 = "5.0.0-beta.53";
32161
32173
  }
32162
32174
  });
32163
32175
 
32164
32176
  // ../core/dist/runtime/helpers.js
32165
32177
  function getWorkflowQueueName(workflowName, namespace) {
32166
32178
  if (!SAFE_WORKFLOW_NAME_PATTERN.test(workflowName)) {
32167
- throw new Error(`Invalid workflow name "${workflowName}": must only contain alphanumeric characters, underscores, hyphens, dots, forward slashes, or at signs`);
32179
+ throw new Error(`Invalid workflow name "${workflowName}": must only contain alphanumeric characters, underscores, hyphens, dots, forward slashes, at signs, parentheses, or square brackets`);
32168
32180
  }
32169
32181
  const prefix = getQueueTopicPrefix("workflow", resolveQueueNamespace(namespace));
32170
32182
  return `${prefix}${workflowName}`;
@@ -32322,7 +32334,7 @@ var init_helpers = __esm({
32322
32334
  init_version();
32323
32335
  init_get_world_lazy();
32324
32336
  DEFAULT_HEALTH_CHECK_TIMEOUT = 3e4;
32325
- SAFE_WORKFLOW_NAME_PATTERN = /^[a-zA-Z0-9_\-./@]+$/;
32337
+ SAFE_WORKFLOW_NAME_PATTERN = /^[a-zA-Z0-9_\-./@()[\]]+$/;
32326
32338
  __name(getWorkflowQueueName, "getWorkflowQueueName");
32327
32339
  generateId = monotonicFactory();
32328
32340
  __name(getHealthCheckStreamName, "getHealthCheckStreamName");
@@ -38599,6 +38611,13 @@ async function getForwardedWritableEncryptionKey(runId, deploymentId, encryption
38599
38611
  "encrypt"
38600
38612
  ]) : void 0;
38601
38613
  }
38614
+ function lazyForwardedWritableEncryptionKey(runId, deploymentId, encryptionPublicKey) {
38615
+ let keyPromise;
38616
+ return () => {
38617
+ keyPromise ??= getForwardedWritableEncryptionKey(runId, deploymentId, encryptionPublicKey);
38618
+ return keyPromise;
38619
+ };
38620
+ }
38602
38621
  function tagForwardedWritableTarget(writable, { deploymentId, encryptionPublicKey }) {
38603
38622
  if (typeof deploymentId === "string") {
38604
38623
  Object.defineProperty(writable, STREAM_SERVER_DEPLOYMENT_ID_SYMBOL, {
@@ -38749,7 +38768,7 @@ function getExternalRevivers(global2 = globalThis, ops, runId, cryptoKey, option
38749
38768
  }, "ReadableStream"),
38750
38769
  WritableStream: /* @__PURE__ */ __name((value) => {
38751
38770
  const targetRunId = typeof value.runId === "string" ? value.runId : runId;
38752
- const targetKey = targetRunId === runId ? cryptoKey : getForwardedWritableEncryptionKey(targetRunId, value.deploymentId, value.encryptionPublicKey);
38771
+ const targetKey = targetRunId === runId ? cryptoKey : lazyForwardedWritableEncryptionKey(targetRunId, value.deploymentId, value.encryptionPublicKey);
38753
38772
  return createForwardedWritable({
38754
38773
  global: global2,
38755
38774
  ops,
@@ -38895,7 +38914,7 @@ function getStepRevivers(global2 = globalThis, ops, runId, cryptoKey, deployment
38895
38914
  WritableStream: /* @__PURE__ */ __name((value) => {
38896
38915
  const targetRunId = typeof value.runId === "string" ? value.runId : runId;
38897
38916
  const targetDeploymentId = typeof value.deploymentId === "string" ? value.deploymentId : targetRunId === runId ? deploymentId : void 0;
38898
- const targetKey = targetRunId === runId ? cryptoKey : getForwardedWritableEncryptionKey(targetRunId, targetDeploymentId, value.encryptionPublicKey);
38917
+ const targetKey = targetRunId === runId ? cryptoKey : lazyForwardedWritableEncryptionKey(targetRunId, targetDeploymentId, value.encryptionPublicKey);
38899
38918
  const serialize3 = getSerializeStream(getStepReducers(global2, ops, targetRunId, targetKey), targetKey);
38900
38919
  const serverWritable = new WorkflowServerWritableStream(targetRunId, value.name);
38901
38920
  const state = createFlushableState();
@@ -39457,6 +39476,7 @@ var init_serialization2 = __esm({
39457
39476
  __name(reviveAbortSignal, "reviveAbortSignal");
39458
39477
  __name(getCommonRevivers2, "getCommonRevivers");
39459
39478
  __name(getForwardedWritableEncryptionKey, "getForwardedWritableEncryptionKey");
39479
+ __name(lazyForwardedWritableEncryptionKey, "lazyForwardedWritableEncryptionKey");
39460
39480
  __name(tagForwardedWritableTarget, "tagForwardedWritableTarget");
39461
39481
  __name(createForwardedWritable, "createForwardedWritable");
39462
39482
  __name(getRunReadableStream, "getRunReadableStream");
@@ -39971,7 +39991,7 @@ __name(start, "start");
39971
39991
  value: "start",
39972
39992
  configurable: true
39973
39993
  });
39974
- })(start, "step//@workflow/core/runtime/start@5.0.0-beta.51//start");
39994
+ })(start, "step//@workflow/core/runtime/start@5.0.0-beta.53//start");
39975
39995
 
39976
39996
  // ../core/dist/runtime/runs.js
39977
39997
  async function wakeUpRun(world, runId, options) {
@@ -40434,7 +40454,7 @@ var Run = class _Run {
40434
40454
  value: "wakeUp",
40435
40455
  configurable: true
40436
40456
  });
40437
- })(Run.prototype["wakeUp"], "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#wakeUp");
40457
+ })(Run.prototype["wakeUp"], "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#wakeUp");
40438
40458
  (function(__wf_fn, __wf_id) {
40439
40459
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
40440
40460
  __wf_reg.set(__wf_id, __wf_fn);
@@ -40443,7 +40463,7 @@ var Run = class _Run {
40443
40463
  value: "cancel",
40444
40464
  configurable: true
40445
40465
  });
40446
- })(Run.prototype["cancel"], "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#cancel");
40466
+ })(Run.prototype["cancel"], "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#cancel");
40447
40467
  (function(__wf_fn, __wf_id) {
40448
40468
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
40449
40469
  __wf_reg.set(__wf_id, __wf_fn);
@@ -40452,7 +40472,7 @@ var Run = class _Run {
40452
40472
  value: "getReadable",
40453
40473
  configurable: true
40454
40474
  });
40455
- })(Run.prototype["getReadable"], "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#getReadable");
40475
+ })(Run.prototype["getReadable"], "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#getReadable");
40456
40476
  (function(__wf_fn, __wf_id) {
40457
40477
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
40458
40478
  __wf_reg.set(__wf_id, __wf_fn);
@@ -40461,7 +40481,7 @@ var Run = class _Run {
40461
40481
  value: "getWritable",
40462
40482
  configurable: true
40463
40483
  });
40464
- })(Run.prototype["getWritable"], "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#getWritable");
40484
+ })(Run.prototype["getWritable"], "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#getWritable");
40465
40485
  (function(__wf_fn, __wf_id) {
40466
40486
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
40467
40487
  __wf_reg.set(__wf_id, __wf_fn);
@@ -40470,7 +40490,7 @@ var Run = class _Run {
40470
40490
  value: "exists",
40471
40491
  configurable: true
40472
40492
  });
40473
- })(Object.getOwnPropertyDescriptor(Run.prototype, "exists").get, "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#exists");
40493
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "exists").get, "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#exists");
40474
40494
  (function(__wf_fn, __wf_id) {
40475
40495
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
40476
40496
  __wf_reg.set(__wf_id, __wf_fn);
@@ -40479,7 +40499,7 @@ var Run = class _Run {
40479
40499
  value: "status",
40480
40500
  configurable: true
40481
40501
  });
40482
- })(Object.getOwnPropertyDescriptor(Run.prototype, "status").get, "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#status");
40502
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "status").get, "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#status");
40483
40503
  (function(__wf_fn, __wf_id) {
40484
40504
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
40485
40505
  __wf_reg.set(__wf_id, __wf_fn);
@@ -40488,7 +40508,7 @@ var Run = class _Run {
40488
40508
  value: "returnValue",
40489
40509
  configurable: true
40490
40510
  });
40491
- })(Object.getOwnPropertyDescriptor(Run.prototype, "returnValue").get, "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#returnValue");
40511
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "returnValue").get, "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#returnValue");
40492
40512
  (function(__wf_fn, __wf_id) {
40493
40513
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
40494
40514
  __wf_reg.set(__wf_id, __wf_fn);
@@ -40497,7 +40517,7 @@ var Run = class _Run {
40497
40517
  value: "workflowName",
40498
40518
  configurable: true
40499
40519
  });
40500
- })(Object.getOwnPropertyDescriptor(Run.prototype, "workflowName").get, "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#workflowName");
40520
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "workflowName").get, "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#workflowName");
40501
40521
  (function(__wf_fn, __wf_id) {
40502
40522
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
40503
40523
  __wf_reg.set(__wf_id, __wf_fn);
@@ -40506,7 +40526,7 @@ var Run = class _Run {
40506
40526
  value: "createdAt",
40507
40527
  configurable: true
40508
40528
  });
40509
- })(Object.getOwnPropertyDescriptor(Run.prototype, "createdAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#createdAt");
40529
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "createdAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#createdAt");
40510
40530
  (function(__wf_fn, __wf_id) {
40511
40531
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
40512
40532
  __wf_reg.set(__wf_id, __wf_fn);
@@ -40515,7 +40535,7 @@ var Run = class _Run {
40515
40535
  value: "startedAt",
40516
40536
  configurable: true
40517
40537
  });
40518
- })(Object.getOwnPropertyDescriptor(Run.prototype, "startedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#startedAt");
40538
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "startedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#startedAt");
40519
40539
  (function(__wf_fn, __wf_id) {
40520
40540
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
40521
40541
  __wf_reg.set(__wf_id, __wf_fn);
@@ -40524,7 +40544,7 @@ var Run = class _Run {
40524
40544
  value: "completedAt",
40525
40545
  configurable: true
40526
40546
  });
40527
- })(Object.getOwnPropertyDescriptor(Run.prototype, "completedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#completedAt");
40547
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "completedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#completedAt");
40528
40548
  (function(__wf_cls, __wf_id) {
40529
40549
  var __wf_sym = /* @__PURE__ */ Symbol.for("workflow-class-registry"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
40530
40550
  __wf_reg.set(__wf_id, __wf_cls);
@@ -40534,7 +40554,7 @@ var Run = class _Run {
40534
40554
  enumerable: false,
40535
40555
  configurable: false
40536
40556
  });
40537
- })(Run, "class//@workflow/core/runtime/run@5.0.0-beta.51//Run");
40557
+ })(Run, "class//@workflow/core/runtime/run@5.0.0-beta.53//Run");
40538
40558
 
40539
40559
  // ../workflow/dist/stdlib.js
40540
40560
  async function fetch2(...args) {
@@ -22114,27 +22114,25 @@ var init_node_http_flag2 = __esm({
22114
22114
  async function reenqueueActiveRuns(runs, enqueue, label, namespace) {
22115
22115
  const workflowQueuePrefix = getQueueTopicPrefix2("workflow", resolveQueueNamespace2(namespace));
22116
22116
  let reenqueued = 0;
22117
- for (const status of ["pending", "running"]) {
22118
- let cursor;
22119
- let hasMore = true;
22120
- while (hasMore) {
22121
- const page = await runs.list({
22122
- status,
22123
- resolveData: "none",
22124
- pagination: { cursor }
22125
- });
22126
- for (const run3 of page.data) {
22127
- try {
22128
- const queueName = `${workflowQueuePrefix}${run3.workflowName}`;
22129
- await enqueue(queueName, { runId: run3.runId });
22130
- reenqueued++;
22131
- } catch (err) {
22132
- console.warn(`[${label}] Failed to re-enqueue run ${run3.runId}: ${err}`);
22133
- }
22117
+ let cursor;
22118
+ let hasMore = true;
22119
+ while (hasMore) {
22120
+ const page = await runs.list({
22121
+ status: ["pending", "running"],
22122
+ resolveData: "none",
22123
+ pagination: { cursor }
22124
+ });
22125
+ for (const run3 of page.data) {
22126
+ try {
22127
+ const queueName = `${workflowQueuePrefix}${run3.workflowName}`;
22128
+ await enqueue(queueName, { runId: run3.runId });
22129
+ reenqueued++;
22130
+ } catch (err) {
22131
+ console.warn(`[${label}] Failed to re-enqueue run ${run3.runId}: ${err}`);
22134
22132
  }
22135
- hasMore = page.hasMore;
22136
- cursor = page.cursor ?? void 0;
22137
22133
  }
22134
+ hasMore = page.hasMore;
22135
+ cursor = page.cursor ?? void 0;
22138
22136
  }
22139
22137
  if (reenqueued > 0 && isDebugEnabled()) {
22140
22138
  console.debug(`[${label}] Re-enqueued ${reenqueued} active run(s) on startup`);
@@ -56417,8 +56415,11 @@ function createRunsStorage(basedir, tag) {
56417
56415
  if (params?.workflowName && run3.workflowName !== params.workflowName) {
56418
56416
  return false;
56419
56417
  }
56420
- if (params?.status && run3.status !== params.status) {
56421
- return false;
56418
+ if (params?.status !== void 0) {
56419
+ const statuses = Array.isArray(params.status) ? params.status : [params.status];
56420
+ if (!statuses.includes(run3.status)) {
56421
+ return false;
56422
+ }
56422
56423
  }
56423
56424
  return true;
56424
56425
  }, "filter"),
@@ -61823,7 +61824,7 @@ var version4;
61823
61824
  var init_version3 = __esm({
61824
61825
  "../world-vercel/dist/version.js"() {
61825
61826
  "use strict";
61826
- version4 = "5.0.0-beta.46";
61827
+ version4 = "5.0.0-beta.48";
61827
61828
  }
61828
61829
  });
61829
61830
 
@@ -62132,7 +62133,15 @@ var init_http_client = __esm({
62132
62133
  // Covers H2 stream timeout, frameError and GOAWAY (undici InformationalError).
62133
62134
  "UND_ERR_INFO",
62134
62135
  "UND_ERR_HEADERS_TIMEOUT",
62135
- "UND_ERR_BODY_TIMEOUT"
62136
+ "UND_ERR_BODY_TIMEOUT",
62137
+ // Node can surface these directly instead of undici's UND_ERR_INFO. Once
62138
+ // repeated, retire the pool even when classification used its fallback.
62139
+ // Keep this scoped to session/stream failures: ERR_HTTP2_* also contains
62140
+ // request-validation and caller-cancellation errors a new pool cannot fix.
62141
+ "ERR_HTTP2_GOAWAY_SESSION",
62142
+ "ERR_HTTP2_INVALID_SESSION",
62143
+ "ERR_HTTP2_SESSION_ERROR",
62144
+ "ERR_HTTP2_STREAM_ERROR"
62136
62145
  ]);
62137
62146
  MAX_CAUSE_DEPTH = 8;
62138
62147
  __name(isRecyclableTransportError, "isRecyclableTransportError");
@@ -62326,6 +62335,38 @@ function getTransientTransportCode(error121) {
62326
62335
  }
62327
62336
  return void 0;
62328
62337
  }
62338
+ function validateHttpUrl(url3) {
62339
+ const { protocol, username, password } = new URL(url3);
62340
+ if (protocol !== "http:" && protocol !== "https:") {
62341
+ throw new TypeError(`Unsupported URL protocol ${protocol}; expected http: or https:`);
62342
+ }
62343
+ if (username || password) {
62344
+ throw new TypeError("HTTP(S) URLs with embedded credentials are unsupported");
62345
+ }
62346
+ }
62347
+ function describeTransportFailure(error121) {
62348
+ const known = getTransientTransportCode(error121);
62349
+ if (known)
62350
+ return known;
62351
+ let firstCode;
62352
+ let innermostName;
62353
+ let current = error121;
62354
+ for (let depth = 0; current && depth < 8; depth++) {
62355
+ const { code: code3, name, message } = current;
62356
+ if (name === "Error" && message === "bad port" && code3 === void 0) {
62357
+ return void 0;
62358
+ }
62359
+ if (typeof code3 === "string" && code3) {
62360
+ if (REQUEST_CONSTRUCTION_ERROR_CODES.has(code3))
62361
+ return void 0;
62362
+ firstCode ??= code3;
62363
+ }
62364
+ if (typeof name === "string" && name)
62365
+ innermostName = name;
62366
+ current = current.cause;
62367
+ }
62368
+ return firstCode ?? innermostName ?? "unknown";
62369
+ }
62329
62370
  function getVercelDiagnostics(headers) {
62330
62371
  return DIAGNOSTIC_HEADERS.flatMap((header) => {
62331
62372
  const value = headers.get(header);
@@ -62450,6 +62491,7 @@ function recordClientSpanStatus(span, status) {
62450
62491
  async function instrumentedFetch(opts) {
62451
62492
  const { method, url: url3, headers, body, dispatcher, peerService, timeoutMs = getRequestTimeoutMs(), signal: callerSignal, injectTraceContext: injectTraceContext2 = true, cacheBust = true, logLabel, buildError, spanName, attributes, durationAttribute, onTransportOutcome, deferTransportSuccessUntilBody = false, onRequestDispatched, transportErrorCode = "TRANSPORT" } = opts;
62452
62493
  const label = logLabel ?? url3;
62494
+ validateHttpUrl(url3);
62453
62495
  return withHttpClientSpan({ method, url: url3, peerService, spanName, attributes }, async (span) => {
62454
62496
  if (injectTraceContext2)
62455
62497
  await injectTraceContextIntoHeaders(headers);
@@ -62457,13 +62499,13 @@ async function instrumentedFetch(opts) {
62457
62499
  headers.set("X-Request-Time", Date.now().toString());
62458
62500
  const timeoutSignal = timeoutMs != null ? AbortSignal.timeout(timeoutMs) : void 0;
62459
62501
  const signal = callerSignal && timeoutSignal ? AbortSignal.any([callerSignal, timeoutSignal]) : callerSignal ?? timeoutSignal;
62502
+ const nodeAgents = dispatcher ? void 0 : getNodeHttpAgents();
62503
+ span?.setAttributes({
62504
+ ...WorkflowHttpTransport(nodeAgents ? "node-http" : "undici")
62505
+ });
62460
62506
  const start3 = Date.now();
62461
62507
  let response;
62462
62508
  try {
62463
- const nodeAgents = dispatcher ? void 0 : getNodeHttpAgents();
62464
- span?.setAttributes({
62465
- ...WorkflowHttpTransport(nodeAgents ? "node-http" : "undici")
62466
- });
62467
62509
  const request = nodeAgents ? nodeHttpFetch(url3, {
62468
62510
  method,
62469
62511
  headers,
@@ -62501,7 +62543,7 @@ async function instrumentedFetch(opts) {
62501
62543
  span?.recordException?.(timeoutError);
62502
62544
  throw timeoutError;
62503
62545
  }
62504
- const transportCode = getTransientTransportCode(error121);
62546
+ const transportCode = describeTransportFailure(error121);
62505
62547
  if (transportCode) {
62506
62548
  const message = `${method} ${label} transport failure after ${elapsed}ms (${transportCode})`;
62507
62549
  const errorCode = transportErrorCode === "STREAM_ERROR" ? "STREAM_ERROR" : "TRANSPORT";
@@ -62568,7 +62610,7 @@ async function instrumentedFetch(opts) {
62568
62610
  return response;
62569
62611
  });
62570
62612
  }
62571
- var import_oidc, REQUEST_TIMEOUT_MS, TRANSIENT_TRANSPORT_ERROR_CODES, getRequestTimeoutMs, HTTP_DEBUG_ENABLED, DIAGNOSTIC_HEADERS;
62613
+ var import_oidc, REQUEST_TIMEOUT_MS, TRANSIENT_TRANSPORT_ERROR_CODES, REQUEST_CONSTRUCTION_ERROR_CODES, getRequestTimeoutMs, HTTP_DEBUG_ENABLED, DIAGNOSTIC_HEADERS;
62572
62614
  var init_http_core = __esm({
62573
62615
  "../world-vercel/dist/http-core.js"() {
62574
62616
  "use strict";
@@ -62596,6 +62638,21 @@ var init_http_core = __esm({
62596
62638
  "ETIMEDOUT"
62597
62639
  ]);
62598
62640
  __name(getTransientTransportCode, "getTransientTransportCode");
62641
+ __name(validateHttpUrl, "validateHttpUrl");
62642
+ REQUEST_CONSTRUCTION_ERROR_CODES = /* @__PURE__ */ new Set([
62643
+ "ERR_INVALID_URL",
62644
+ "ERR_INVALID_ARG_TYPE",
62645
+ "ERR_INVALID_ARG_VALUE",
62646
+ "ERR_INVALID_CHAR",
62647
+ "ERR_INVALID_HTTP_TOKEN",
62648
+ "ERR_HTTP_INVALID_HEADER_VALUE",
62649
+ "ERR_UNESCAPED_CHARACTERS",
62650
+ // Undici validates request options and headers during dispatch, after
62651
+ // Fetch has constructed the Request (e.g. unsupported Expect headers).
62652
+ "UND_ERR_INVALID_ARG",
62653
+ "UND_ERR_NOT_SUPPORTED"
62654
+ ]);
62655
+ __name(describeTransportFailure, "describeTransportFailure");
62599
62656
  getRequestTimeoutMs = /* @__PURE__ */ __name(() => envNumber2("WORKFLOW_REQUEST_TIMEOUT_MS", REQUEST_TIMEOUT_MS, {
62600
62657
  integer: true,
62601
62658
  min: 1e4,
@@ -62658,6 +62715,7 @@ async function makeRequest({ endpoint, options = {}, config: config4 = {}, schem
62658
62715
  const method = (options.method || "GET").toUpperCase();
62659
62716
  const { baseUrl, headers } = await getHttpConfig(config4);
62660
62717
  const url3 = `${baseUrl}${endpoint}`;
62718
+ validateHttpUrl(url3);
62661
62719
  return trace4(`http ${method}`, { kind: await getSpanKind3("CLIENT") }, async (span) => {
62662
62720
  span?.setAttributes(httpClientSpanAttributes({
62663
62721
  method,
@@ -62678,13 +62736,15 @@ async function makeRequest({ endpoint, options = {}, config: config4 = {}, schem
62678
62736
  headers.set("X-Request-Time", Date.now().toString());
62679
62737
  const timeoutSignal = AbortSignal.timeout(getRequestTimeoutMs());
62680
62738
  const signal = options.signal ? AbortSignal.any([options.signal, timeoutSignal]) : timeoutSignal;
62739
+ const nodeAgents = getNodeHttpAgents(config4);
62740
+ const undiciRequest = nodeAgents ? void 0 : new Request(url3, { ...options, body, headers, signal });
62741
+ const undiciDispatcher = nodeAgents ? void 0 : getDispatcher(config4);
62742
+ span?.setAttributes({
62743
+ ...WorkflowHttpTransport(nodeAgents ? "node-http" : "undici")
62744
+ });
62681
62745
  const fetchStart = Date.now();
62682
62746
  let response;
62683
62747
  try {
62684
- const nodeAgents = getNodeHttpAgents(config4);
62685
- span?.setAttributes({
62686
- ...WorkflowHttpTransport(nodeAgents ? "node-http" : "undici")
62687
- });
62688
62748
  response = nodeAgents ? await nodeHttpFetch(url3, {
62689
62749
  method,
62690
62750
  headers,
@@ -62696,9 +62756,9 @@ async function makeRequest({ endpoint, options = {}, config: config4 = {}, schem
62696
62756
  // no stalled-socket deadline.
62697
62757
  headersTimeoutMs: NODE_HTTP_HEADERS_TIMEOUT_MS,
62698
62758
  bodyTimeoutMs: NODE_HTTP_BODY_TIMEOUT_MS
62699
- }) : await fetch(new Request(url3, { ...options, body, headers, signal }), {
62759
+ }) : await fetch(undiciRequest, {
62700
62760
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- undici v7 dispatcher types don't match @types/node's RequestInit
62701
- dispatcher: getDispatcher(config4)
62761
+ dispatcher: undiciDispatcher
62702
62762
  });
62703
62763
  } catch (error121) {
62704
62764
  const elapsed = Date.now() - fetchStart;
@@ -62708,7 +62768,7 @@ async function makeRequest({ endpoint, options = {}, config: config4 = {}, schem
62708
62768
  span?.recordException?.(timeoutError);
62709
62769
  throw timeoutError;
62710
62770
  }
62711
- const transportCode = getTransientTransportCode(error121);
62771
+ const transportCode = describeTransportFailure(error121);
62712
62772
  if (transportCode) {
62713
62773
  if (retryConnectTimeout && canRetryRead && transportCode === "UND_ERR_CONNECT_TIMEOUT" && attempt === 0) {
62714
62774
  await new Promise((resolve3) => setTimeout(resolve3, BODY_PARSE_RETRY_BASE_MS));
@@ -74988,7 +75048,7 @@ function isRetryableEventPostError(err) {
74988
75048
  if (EntityConflictError2.is(err) || RunExpiredError2.is(err) || TooEarlyError.is(err) || ThrottleError2.is(err)) {
74989
75049
  return false;
74990
75050
  }
74991
- if (WorkflowWorldError2.is(err)) {
75051
+ if (WorkflowWorldError2.is(err) || StreamError2.is(err)) {
74992
75052
  if (err.code === "PARSE_ERROR")
74993
75053
  return true;
74994
75054
  if (err.code === "TRANSPORT")
@@ -74996,6 +75056,14 @@ function isRetryableEventPostError(err) {
74996
75056
  if (typeof err.status === "number") {
74997
75057
  return err.status >= 500 && err.status <= 599;
74998
75058
  }
75059
+ if (err.code === "STREAM_ERROR") {
75060
+ return !collectErrorMarkers(err).some((marker) => [
75061
+ "AbortError",
75062
+ "ABORT_ERR",
75063
+ "UND_ERR_ABORTED",
75064
+ "ERR_HTTP2_STREAM_CANCEL"
75065
+ ].includes(marker));
75066
+ }
74999
75067
  }
75000
75068
  return collectErrorMarkers(err).some((m) => TRANSIENT_CODES.has(m));
75001
75069
  }
@@ -75426,7 +75494,7 @@ async function fetchV4(url3, init, config4, opName, attributes) {
75426
75494
  }
75427
75495
  } catch (cause) {
75428
75496
  noteEventsTransportOutcome(dispatcher, cause);
75429
- const transportCode = getTransientTransportCode(cause);
75497
+ const transportCode = describeTransportFailure(cause);
75430
75498
  controller.error(transportCode ? new StreamError2(`v4 ${opName}: response stream transport failure (${transportCode})`, { cause, url: url3 }) : cause);
75431
75499
  }
75432
75500
  },
@@ -76262,6 +76330,9 @@ async function listWorkflowRuns(params = {}, config4) {
76262
76330
  const searchParams = new URLSearchParams();
76263
76331
  if (workflowName)
76264
76332
  searchParams.set("workflowName", workflowName);
76333
+ if (Array.isArray(status)) {
76334
+ throw new WorkflowWorldError2("listWorkflowRuns: status does not support an array of statuses on world-vercel yet; pass a single status", { code: "INVALID_ARGUMENT", field: "status" });
76335
+ }
76265
76336
  if (status)
76266
76337
  searchParams.set("status", status);
76267
76338
  if (pagination?.limit)
@@ -78958,7 +79029,8 @@ var init_global2 = __esm({
78958
79029
  // ../core/dist/log-format.js
78959
79030
  function composeLogLine2(prefix, message, metadata) {
78960
79031
  const [framing, ...rest] = message.split("\n");
78961
- const body = rest.join("\n");
79032
+ const embeddedBody = rest.join("\n");
79033
+ const body = embeddedBody.trim() ? embeddedBody : pickString2(metadata ?? {}, "errorStack") ?? "";
78962
79034
  const fields = renderStructuredFields2(framing ?? "", body, metadata);
78963
79035
  const trimmedBody = trimStackBody2(body);
78964
79036
  const lines = [`${prefix} ${framing ?? ""}`];
@@ -78987,6 +79059,7 @@ function renderStructuredFields2(framing, body, metadata) {
78987
79059
  "errorName",
78988
79060
  "errorMessage",
78989
79061
  "errorStack",
79062
+ "errorCause",
78990
79063
  "hint",
78991
79064
  "attempt",
78992
79065
  "retryCount"
@@ -78994,7 +79067,8 @@ function renderStructuredFields2(framing, body, metadata) {
78994
79067
  const lines = [];
78995
79068
  const errorName = pickString2(metadata, "errorName");
78996
79069
  const attribution = pickString2(metadata, "errorAttribution");
78997
- if (errorName || attribution) {
79070
+ const nameEchoedByStack = errorName !== null && stackHeaderNames2(body, errorName);
79071
+ if (attribution || errorName && !nameEchoedByStack) {
78998
79072
  const badge = attribution ? attribution === "sdk" ? magenta2("sdk error") : red2("user error") : "";
78999
79073
  const cls = errorName ? bold2(errorName) : "";
79000
79074
  const sep2 = badge && cls ? dim2(" \xB7 ") : "";
@@ -79028,6 +79102,10 @@ function renderStructuredFields2(framing, body, metadata) {
79028
79102
  if (errorMessage && !redundant.has("errorMessage")) {
79029
79103
  lines.push(` ${kvKey2("error")} ${formatPassthroughValue2(errorMessage)}`);
79030
79104
  }
79105
+ const errorCause = pickString2(metadata, "errorCause");
79106
+ if (errorCause && !body.includes(errorCause)) {
79107
+ lines.push(` ${kvKey2("cause")} ${formatPassthroughValue2(errorCause)}`);
79108
+ }
79031
79109
  const hint3 = pickString2(metadata, "hint");
79032
79110
  if (hint3) {
79033
79111
  lines.push(` ${hint2(hint3)}`);
@@ -79090,6 +79168,10 @@ function isFrameworkFrame2(line) {
79090
79168
  }
79091
79169
  return false;
79092
79170
  }
79171
+ function stackHeaderNames2(body, errorName) {
79172
+ const header = body.split("\n", 1)[0]?.trim() ?? "";
79173
+ return header === errorName || header.startsWith(`${errorName}:`);
79174
+ }
79093
79175
  function pickString2(metadata, key) {
79094
79176
  const v = metadata[key];
79095
79177
  return typeof v === "string" && v.length > 0 ? v : null;
@@ -79129,6 +79211,7 @@ var init_log_format2 = __esm({
79129
79211
  MAX_VISIBLE_FRAMES2 = 6;
79130
79212
  __name(trimStackBody2, "trimStackBody");
79131
79213
  __name(isFrameworkFrame2, "isFrameworkFrame");
79214
+ __name(stackHeaderNames2, "stackHeaderNames");
79132
79215
  __name(pickString2, "pickString");
79133
79216
  __name(kvKey2, "kvKey");
79134
79217
  __name(formatIdRow2, "formatIdRow");
@@ -85917,14 +86000,14 @@ var version5;
85917
86000
  var init_version4 = __esm({
85918
86001
  "../core/dist/version.js"() {
85919
86002
  "use strict";
85920
- version5 = "5.0.0-beta.51";
86003
+ version5 = "5.0.0-beta.53";
85921
86004
  }
85922
86005
  });
85923
86006
 
85924
86007
  // ../core/dist/runtime/helpers.js
85925
86008
  function getWorkflowQueueName2(workflowName, namespace) {
85926
86009
  if (!SAFE_WORKFLOW_NAME_PATTERN2.test(workflowName)) {
85927
- throw new Error(`Invalid workflow name "${workflowName}": must only contain alphanumeric characters, underscores, hyphens, dots, forward slashes, or at signs`);
86010
+ throw new Error(`Invalid workflow name "${workflowName}": must only contain alphanumeric characters, underscores, hyphens, dots, forward slashes, at signs, parentheses, or square brackets`);
85928
86011
  }
85929
86012
  const prefix = getQueueTopicPrefix2("workflow", resolveQueueNamespace2(namespace));
85930
86013
  return `${prefix}${workflowName}`;
@@ -86345,7 +86428,7 @@ var init_helpers3 = __esm({
86345
86428
  init_telemetry4();
86346
86429
  init_version4();
86347
86430
  init_get_world_lazy2();
86348
- SAFE_WORKFLOW_NAME_PATTERN2 = /^[a-zA-Z0-9_\-./@]+$/;
86431
+ SAFE_WORKFLOW_NAME_PATTERN2 = /^[a-zA-Z0-9_\-./@()[\]]+$/;
86349
86432
  __name(getWorkflowQueueName2, "getWorkflowQueueName");
86350
86433
  generateId2 = monotonicFactory2();
86351
86434
  __name(getHealthCheckStreamName2, "getHealthCheckStreamName");
@@ -87773,6 +87856,13 @@ async function getForwardedWritableEncryptionKey2(runId, deploymentId, encryptio
87773
87856
  const rawKey = deploymentId ? await world.getEncryptionKeyForRun(runId, { deploymentId }) : await world.getEncryptionKeyForRun(await world.runs.get(runId));
87774
87857
  return rawKey ? await importKey2(rawKey, ["encrypt"]) : void 0;
87775
87858
  }
87859
+ function lazyForwardedWritableEncryptionKey2(runId, deploymentId, encryptionPublicKey) {
87860
+ let keyPromise;
87861
+ return () => {
87862
+ keyPromise ??= getForwardedWritableEncryptionKey2(runId, deploymentId, encryptionPublicKey);
87863
+ return keyPromise;
87864
+ };
87865
+ }
87776
87866
  function tagForwardedWritableTarget2(writable, { deploymentId, encryptionPublicKey }) {
87777
87867
  if (typeof deploymentId === "string") {
87778
87868
  Object.defineProperty(writable, STREAM_SERVER_DEPLOYMENT_ID_SYMBOL2, {
@@ -87924,7 +88014,7 @@ function getExternalRevivers2(global2 = globalThis, ops, runId, cryptoKey, optio
87924
88014
  }, "ReadableStream"),
87925
88015
  WritableStream: /* @__PURE__ */ __name((value) => {
87926
88016
  const targetRunId = typeof value.runId === "string" ? value.runId : runId;
87927
- const targetKey = targetRunId === runId ? cryptoKey : getForwardedWritableEncryptionKey2(targetRunId, value.deploymentId, value.encryptionPublicKey);
88017
+ const targetKey = targetRunId === runId ? cryptoKey : lazyForwardedWritableEncryptionKey2(targetRunId, value.deploymentId, value.encryptionPublicKey);
87928
88018
  return createForwardedWritable2({
87929
88019
  global: global2,
87930
88020
  ops,
@@ -88181,7 +88271,7 @@ function getStepRevivers2(global2 = globalThis, ops, runId, cryptoKey, deploymen
88181
88271
  WritableStream: /* @__PURE__ */ __name((value) => {
88182
88272
  const targetRunId = typeof value.runId === "string" ? value.runId : runId;
88183
88273
  const targetDeploymentId = typeof value.deploymentId === "string" ? value.deploymentId : targetRunId === runId ? deploymentId : void 0;
88184
- const targetKey = targetRunId === runId ? cryptoKey : getForwardedWritableEncryptionKey2(targetRunId, targetDeploymentId, value.encryptionPublicKey);
88274
+ const targetKey = targetRunId === runId ? cryptoKey : lazyForwardedWritableEncryptionKey2(targetRunId, targetDeploymentId, value.encryptionPublicKey);
88185
88275
  const serialize5 = getSerializeStream2(getStepReducers2(global2, ops, targetRunId, targetKey), targetKey);
88186
88276
  const serverWritable = new WorkflowServerWritableStream2(targetRunId, value.name);
88187
88277
  const state = createFlushableState2();
@@ -88808,6 +88898,7 @@ var init_serialization4 = __esm({
88808
88898
  __name(reviveAbortSignal2, "reviveAbortSignal");
88809
88899
  __name(getCommonRevivers4, "getCommonRevivers");
88810
88900
  __name(getForwardedWritableEncryptionKey2, "getForwardedWritableEncryptionKey");
88901
+ __name(lazyForwardedWritableEncryptionKey2, "lazyForwardedWritableEncryptionKey");
88811
88902
  __name(tagForwardedWritableTarget2, "tagForwardedWritableTarget");
88812
88903
  __name(createForwardedWritable2, "createForwardedWritable");
88813
88904
  __name(getRunReadableStream2, "getRunReadableStream");
@@ -89375,6 +89466,41 @@ function getErrorStack(v) {
89375
89466
  }
89376
89467
  return "";
89377
89468
  }
89469
+ function describeErrorLink(value) {
89470
+ if (typeof value !== "object" || value === null) {
89471
+ return String(value);
89472
+ }
89473
+ const { name, message, code: code3 } = value;
89474
+ const label = typeof name === "string" && name ? name : "Error";
89475
+ const text = typeof message === "string" && message ? `${label}: ${message}` : label;
89476
+ return typeof code3 === "string" && code3 && !text.includes(code3) ? `${text} (${code3})` : text;
89477
+ }
89478
+ function formatErrorCauseChain(value) {
89479
+ const lines = [];
89480
+ const seen = /* @__PURE__ */ new Set();
89481
+ try {
89482
+ for (let current = causeOf(value); current != null && lines.length <= MAX_CAUSE_LINKS; current = causeOf(current)) {
89483
+ if (typeof current !== "object") {
89484
+ lines.push(String(current));
89485
+ break;
89486
+ }
89487
+ if (seen.has(current))
89488
+ break;
89489
+ seen.add(current);
89490
+ lines.push(describeErrorLink(current), ...aggregatedLinks(current));
89491
+ }
89492
+ } catch {
89493
+ lines.push("[unavailable cause]");
89494
+ }
89495
+ return lines.length > MAX_CAUSE_LINKS ? [...lines.slice(0, MAX_CAUSE_LINKS), "\u2026"].join("\n") : lines.join("\n");
89496
+ }
89497
+ function causeOf(value) {
89498
+ return typeof value === "object" && value !== null ? value.cause : void 0;
89499
+ }
89500
+ function aggregatedLinks(value) {
89501
+ const errors = value.errors;
89502
+ return Array.isArray(errors) ? errors.slice(0, MAX_CAUSE_LINKS).map(describeErrorLink) : [];
89503
+ }
89378
89504
  function isAbortError(value) {
89379
89505
  return typeof value === "object" && value !== null && "name" in value && value.name === "AbortError" && "message" in value && typeof value.message === "string" && (!("stack" in value) || value.stack === void 0 || typeof value.stack === "string");
89380
89506
  }
@@ -89439,12 +89565,18 @@ async function normalizeUnknownError(value) {
89439
89565
  }
89440
89566
  return normalizeSyncError(value);
89441
89567
  }
89568
+ var MAX_CAUSE_LINKS;
89442
89569
  var init_types4 = __esm({
89443
89570
  "../core/dist/types.js"() {
89444
89571
  "use strict";
89445
89572
  init_dist7();
89446
89573
  __name(getErrorName, "getErrorName");
89447
89574
  __name(getErrorStack, "getErrorStack");
89575
+ MAX_CAUSE_LINKS = 4;
89576
+ __name(describeErrorLink, "describeErrorLink");
89577
+ __name(formatErrorCauseChain, "formatErrorCauseChain");
89578
+ __name(causeOf, "causeOf");
89579
+ __name(aggregatedLinks, "aggregatedLinks");
89448
89580
  __name(isAbortError, "isAbortError");
89449
89581
  __name(promoteAbortErrorToFatal, "promoteAbortErrorToFatal");
89450
89582
  __name(isThenable, "isThenable");
@@ -128248,7 +128380,8 @@ var init_ansi = __esm2({
128248
128380
  });
128249
128381
  function composeLogLine(prefix, message, metadata) {
128250
128382
  const [framing, ...rest] = message.split("\n");
128251
- const body = rest.join("\n");
128383
+ const embeddedBody = rest.join("\n");
128384
+ const body = embeddedBody.trim() ? embeddedBody : pickString(metadata ?? {}, "errorStack") ?? "";
128252
128385
  const fields = renderStructuredFields(framing ?? "", body, metadata);
128253
128386
  const trimmedBody = trimStackBody(body);
128254
128387
  const lines = [
@@ -128277,6 +128410,7 @@ function renderStructuredFields(framing, body, metadata) {
128277
128410
  "errorName",
128278
128411
  "errorMessage",
128279
128412
  "errorStack",
128413
+ "errorCause",
128280
128414
  "hint",
128281
128415
  "attempt",
128282
128416
  "retryCount"
@@ -128284,7 +128418,8 @@ function renderStructuredFields(framing, body, metadata) {
128284
128418
  const lines = [];
128285
128419
  const errorName = pickString(metadata, "errorName");
128286
128420
  const attribution = pickString(metadata, "errorAttribution");
128287
- if (errorName || attribution) {
128421
+ const nameEchoedByStack = errorName !== null && stackHeaderNames(body, errorName);
128422
+ if (attribution || errorName && !nameEchoedByStack) {
128288
128423
  const badge = attribution ? attribution === "sdk" ? magenta("sdk error") : red("user error") : "";
128289
128424
  const cls = errorName ? bold(errorName) : "";
128290
128425
  const sep2 = badge && cls ? dim(" \xB7 ") : "";
@@ -128318,6 +128453,10 @@ function renderStructuredFields(framing, body, metadata) {
128318
128453
  if (errorMessage && !redundant.has("errorMessage")) {
128319
128454
  lines.push(` ${kvKey("error")} ${formatPassthroughValue(errorMessage)}`);
128320
128455
  }
128456
+ const errorCause = pickString(metadata, "errorCause");
128457
+ if (errorCause && !body.includes(errorCause)) {
128458
+ lines.push(` ${kvKey("cause")} ${formatPassthroughValue(errorCause)}`);
128459
+ }
128321
128460
  const hint22 = pickString(metadata, "hint");
128322
128461
  if (hint22) {
128323
128462
  lines.push(` ${hint(hint22)}`);
@@ -128376,6 +128515,11 @@ function isFrameworkFrame(line) {
128376
128515
  return false;
128377
128516
  }
128378
128517
  __name(isFrameworkFrame, "isFrameworkFrame");
128518
+ function stackHeaderNames(body, errorName) {
128519
+ const header = body.split("\n", 1)[0]?.trim() ?? "";
128520
+ return header === errorName || header.startsWith(`${errorName}:`);
128521
+ }
128522
+ __name(stackHeaderNames, "stackHeaderNames");
128379
128523
  function pickString(metadata, key) {
128380
128524
  const v = metadata[key];
128381
128525
  return typeof v === "string" && v.length > 0 ? v : null;
@@ -128418,6 +128562,7 @@ var init_log_format = __esm2({
128418
128562
  MAX_VISIBLE_FRAMES = 6;
128419
128563
  __name2(trimStackBody, "trimStackBody");
128420
128564
  __name2(isFrameworkFrame, "isFrameworkFrame");
128565
+ __name2(stackHeaderNames, "stackHeaderNames");
128421
128566
  __name2(pickString, "pickString");
128422
128567
  __name2(kvKey, "kvKey");
128423
128568
  __name2(formatIdRow, "formatIdRow");
@@ -133277,12 +133422,12 @@ var version2;
133277
133422
  var init_version = __esm2({
133278
133423
  "../core/dist/version.js"() {
133279
133424
  "use strict";
133280
- version2 = "5.0.0-beta.51";
133425
+ version2 = "5.0.0-beta.53";
133281
133426
  }
133282
133427
  });
133283
133428
  function getWorkflowQueueName(workflowName, namespace) {
133284
133429
  if (!SAFE_WORKFLOW_NAME_PATTERN.test(workflowName)) {
133285
- throw new Error(`Invalid workflow name "${workflowName}": must only contain alphanumeric characters, underscores, hyphens, dots, forward slashes, or at signs`);
133430
+ throw new Error(`Invalid workflow name "${workflowName}": must only contain alphanumeric characters, underscores, hyphens, dots, forward slashes, at signs, parentheses, or square brackets`);
133286
133431
  }
133287
133432
  const prefix = getQueueTopicPrefix("workflow", resolveQueueNamespace(namespace));
133288
133433
  return `${prefix}${workflowName}`;
@@ -133451,7 +133596,7 @@ var init_helpers = __esm2({
133451
133596
  init_version();
133452
133597
  init_get_world_lazy();
133453
133598
  DEFAULT_HEALTH_CHECK_TIMEOUT = 3e4;
133454
- SAFE_WORKFLOW_NAME_PATTERN = /^[a-zA-Z0-9_\-./@]+$/;
133599
+ SAFE_WORKFLOW_NAME_PATTERN = /^[a-zA-Z0-9_\-./@()[\]]+$/;
133455
133600
  __name2(getWorkflowQueueName, "getWorkflowQueueName");
133456
133601
  generateId = monotonicFactory();
133457
133602
  __name2(getHealthCheckStreamName, "getHealthCheckStreamName");
@@ -139829,6 +139974,14 @@ async function getForwardedWritableEncryptionKey(runId, deploymentId, encryption
139829
139974
  ]) : void 0;
139830
139975
  }
139831
139976
  __name(getForwardedWritableEncryptionKey, "getForwardedWritableEncryptionKey");
139977
+ function lazyForwardedWritableEncryptionKey(runId, deploymentId, encryptionPublicKey) {
139978
+ let keyPromise;
139979
+ return () => {
139980
+ keyPromise ??= getForwardedWritableEncryptionKey(runId, deploymentId, encryptionPublicKey);
139981
+ return keyPromise;
139982
+ };
139983
+ }
139984
+ __name(lazyForwardedWritableEncryptionKey, "lazyForwardedWritableEncryptionKey");
139832
139985
  function tagForwardedWritableTarget(writable, { deploymentId, encryptionPublicKey }) {
139833
139986
  if (typeof deploymentId === "string") {
139834
139987
  Object.defineProperty(writable, STREAM_SERVER_DEPLOYMENT_ID_SYMBOL, {
@@ -139982,7 +140135,7 @@ function getExternalRevivers(global2 = globalThis, ops, runId, cryptoKey, option
139982
140135
  }, "ReadableStream"),
139983
140136
  WritableStream: /* @__PURE__ */ __name2((value) => {
139984
140137
  const targetRunId = typeof value.runId === "string" ? value.runId : runId;
139985
- const targetKey = targetRunId === runId ? cryptoKey : getForwardedWritableEncryptionKey(targetRunId, value.deploymentId, value.encryptionPublicKey);
140138
+ const targetKey = targetRunId === runId ? cryptoKey : lazyForwardedWritableEncryptionKey(targetRunId, value.deploymentId, value.encryptionPublicKey);
139986
140139
  return createForwardedWritable({
139987
140140
  global: global2,
139988
140141
  ops,
@@ -140129,7 +140282,7 @@ function getStepRevivers(global2 = globalThis, ops, runId, cryptoKey, deployment
140129
140282
  WritableStream: /* @__PURE__ */ __name2((value) => {
140130
140283
  const targetRunId = typeof value.runId === "string" ? value.runId : runId;
140131
140284
  const targetDeploymentId = typeof value.deploymentId === "string" ? value.deploymentId : targetRunId === runId ? deploymentId : void 0;
140132
- const targetKey = targetRunId === runId ? cryptoKey : getForwardedWritableEncryptionKey(targetRunId, targetDeploymentId, value.encryptionPublicKey);
140285
+ const targetKey = targetRunId === runId ? cryptoKey : lazyForwardedWritableEncryptionKey(targetRunId, targetDeploymentId, value.encryptionPublicKey);
140133
140286
  const serialize32 = getSerializeStream(getStepReducers(global2, ops, targetRunId, targetKey), targetKey);
140134
140287
  const serverWritable = new WorkflowServerWritableStream(targetRunId, value.name);
140135
140288
  const state = createFlushableState();
@@ -140717,6 +140870,7 @@ var init_serialization2 = __esm2({
140717
140870
  __name2(reviveAbortSignal, "reviveAbortSignal");
140718
140871
  __name2(getCommonRevivers2, "getCommonRevivers");
140719
140872
  __name2(getForwardedWritableEncryptionKey, "getForwardedWritableEncryptionKey");
140873
+ __name2(lazyForwardedWritableEncryptionKey, "lazyForwardedWritableEncryptionKey");
140720
140874
  __name2(tagForwardedWritableTarget, "tagForwardedWritableTarget");
140721
140875
  __name2(createForwardedWritable, "createForwardedWritable");
140722
140876
  __name2(getRunReadableStream, "getRunReadableStream");
@@ -141221,7 +141375,7 @@ __name2(start, "start");
141221
141375
  value: "start",
141222
141376
  configurable: true
141223
141377
  });
141224
- })(start, "step//@workflow/core/runtime/start@5.0.0-beta.51//start");
141378
+ })(start, "step//@workflow/core/runtime/start@5.0.0-beta.53//start");
141225
141379
  async function wakeUpRun(world, runId, options) {
141226
141380
  try {
141227
141381
  const run22 = await world.runs.get(runId, {
@@ -141688,7 +141842,7 @@ var Run = class _Run {
141688
141842
  value: "wakeUp",
141689
141843
  configurable: true
141690
141844
  });
141691
- })(Run.prototype["wakeUp"], "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#wakeUp");
141845
+ })(Run.prototype["wakeUp"], "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#wakeUp");
141692
141846
  (function(__wf_fn, __wf_id) {
141693
141847
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
141694
141848
  __wf_reg.set(__wf_id, __wf_fn);
@@ -141697,7 +141851,7 @@ var Run = class _Run {
141697
141851
  value: "cancel",
141698
141852
  configurable: true
141699
141853
  });
141700
- })(Run.prototype["cancel"], "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#cancel");
141854
+ })(Run.prototype["cancel"], "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#cancel");
141701
141855
  (function(__wf_fn, __wf_id) {
141702
141856
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
141703
141857
  __wf_reg.set(__wf_id, __wf_fn);
@@ -141706,7 +141860,7 @@ var Run = class _Run {
141706
141860
  value: "getReadable",
141707
141861
  configurable: true
141708
141862
  });
141709
- })(Run.prototype["getReadable"], "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#getReadable");
141863
+ })(Run.prototype["getReadable"], "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#getReadable");
141710
141864
  (function(__wf_fn, __wf_id) {
141711
141865
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
141712
141866
  __wf_reg.set(__wf_id, __wf_fn);
@@ -141715,7 +141869,7 @@ var Run = class _Run {
141715
141869
  value: "getWritable",
141716
141870
  configurable: true
141717
141871
  });
141718
- })(Run.prototype["getWritable"], "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#getWritable");
141872
+ })(Run.prototype["getWritable"], "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#getWritable");
141719
141873
  (function(__wf_fn, __wf_id) {
141720
141874
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
141721
141875
  __wf_reg.set(__wf_id, __wf_fn);
@@ -141724,7 +141878,7 @@ var Run = class _Run {
141724
141878
  value: "exists",
141725
141879
  configurable: true
141726
141880
  });
141727
- })(Object.getOwnPropertyDescriptor(Run.prototype, "exists").get, "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#exists");
141881
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "exists").get, "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#exists");
141728
141882
  (function(__wf_fn, __wf_id) {
141729
141883
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
141730
141884
  __wf_reg.set(__wf_id, __wf_fn);
@@ -141733,7 +141887,7 @@ var Run = class _Run {
141733
141887
  value: "status",
141734
141888
  configurable: true
141735
141889
  });
141736
- })(Object.getOwnPropertyDescriptor(Run.prototype, "status").get, "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#status");
141890
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "status").get, "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#status");
141737
141891
  (function(__wf_fn, __wf_id) {
141738
141892
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
141739
141893
  __wf_reg.set(__wf_id, __wf_fn);
@@ -141742,7 +141896,7 @@ var Run = class _Run {
141742
141896
  value: "returnValue",
141743
141897
  configurable: true
141744
141898
  });
141745
- })(Object.getOwnPropertyDescriptor(Run.prototype, "returnValue").get, "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#returnValue");
141899
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "returnValue").get, "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#returnValue");
141746
141900
  (function(__wf_fn, __wf_id) {
141747
141901
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
141748
141902
  __wf_reg.set(__wf_id, __wf_fn);
@@ -141751,7 +141905,7 @@ var Run = class _Run {
141751
141905
  value: "workflowName",
141752
141906
  configurable: true
141753
141907
  });
141754
- })(Object.getOwnPropertyDescriptor(Run.prototype, "workflowName").get, "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#workflowName");
141908
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "workflowName").get, "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#workflowName");
141755
141909
  (function(__wf_fn, __wf_id) {
141756
141910
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
141757
141911
  __wf_reg.set(__wf_id, __wf_fn);
@@ -141760,7 +141914,7 @@ var Run = class _Run {
141760
141914
  value: "createdAt",
141761
141915
  configurable: true
141762
141916
  });
141763
- })(Object.getOwnPropertyDescriptor(Run.prototype, "createdAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#createdAt");
141917
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "createdAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#createdAt");
141764
141918
  (function(__wf_fn, __wf_id) {
141765
141919
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
141766
141920
  __wf_reg.set(__wf_id, __wf_fn);
@@ -141769,7 +141923,7 @@ var Run = class _Run {
141769
141923
  value: "startedAt",
141770
141924
  configurable: true
141771
141925
  });
141772
- })(Object.getOwnPropertyDescriptor(Run.prototype, "startedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#startedAt");
141926
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "startedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#startedAt");
141773
141927
  (function(__wf_fn, __wf_id) {
141774
141928
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
141775
141929
  __wf_reg.set(__wf_id, __wf_fn);
@@ -141778,7 +141932,7 @@ var Run = class _Run {
141778
141932
  value: "completedAt",
141779
141933
  configurable: true
141780
141934
  });
141781
- })(Object.getOwnPropertyDescriptor(Run.prototype, "completedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#completedAt");
141935
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "completedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#completedAt");
141782
141936
  (function(__wf_cls, __wf_id) {
141783
141937
  var __wf_sym = /* @__PURE__ */ Symbol.for("workflow-class-registry"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
141784
141938
  __wf_reg.set(__wf_id, __wf_cls);
@@ -141788,7 +141942,7 @@ var Run = class _Run {
141788
141942
  enumerable: false,
141789
141943
  configurable: false
141790
141944
  });
141791
- })(Run, "class//@workflow/core/runtime/run@5.0.0-beta.51//Run");
141945
+ })(Run, "class//@workflow/core/runtime/run@5.0.0-beta.53//Run");
141792
141946
  async function fetch2(...args) {
141793
141947
  return globalThis.fetch(...args);
141794
141948
  }
@@ -148012,12 +148166,21 @@ function workflowEntrypoint(workflowCode2, options) {
148012
148166
  workflowRunId: runId,
148013
148167
  errorCode,
148014
148168
  errorName,
148015
- // The console renderer drops `errorStack` on the
148016
- // assumption that the message body carries it, and
148017
- // this message has no body, so without this row the
148018
- // terminal error's text never reaches the console.
148169
+ // This message has no body, so the console
148170
+ // renderer promotes `errorStack` into one and
148171
+ // shows `errorMessage` on its own row when the
148172
+ // throw produced no stack to carry it.
148019
148173
  errorMessage,
148020
- errorStack
148174
+ errorStack,
148175
+ // Neither of those reaches a wrapped error's
148176
+ // reason: `TypeError: fetch failed` carries an
148177
+ // empty message by design and a stack of pure
148178
+ // `node:internal/` frames, and the world layer's
148179
+ // own wrappers name the request that failed
148180
+ // rather than what failed about it. Undefined
148181
+ // when there is no cause, so the row disappears
148182
+ // for an ordinary user throw.
148183
+ errorCause: formatErrorCauseChain(terminalError) || void 0
148021
148184
  });
148022
148185
  if (types9.isNativeError(terminalError) && errorStack) {
148023
148186
  terminalError.stack = errorStack;
@@ -148956,11 +149119,11 @@ var Run = class _Run {
148956
149119
  return this.getWritable();
148957
149120
  }
148958
149121
  };
148959
- Run.prototype["wakeUp"] = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.51//Run#wakeUp");
148960
- Run.prototype["cancel"] = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.51//Run#cancel");
148961
- Run.prototype["getReadable"] = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.51//Run#getReadable");
148962
- Run.prototype["getWritable"] = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.51//Run#getWritable");
148963
- var __step_Run$exists = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.51//Run#exists");
149122
+ Run.prototype["wakeUp"] = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.53//Run#wakeUp");
149123
+ Run.prototype["cancel"] = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.53//Run#cancel");
149124
+ Run.prototype["getReadable"] = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.53//Run#getReadable");
149125
+ Run.prototype["getWritable"] = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.53//Run#getWritable");
149126
+ var __step_Run$exists = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.53//Run#exists");
148964
149127
  Object.defineProperty(Run.prototype, "exists", {
148965
149128
  get() {
148966
149129
  return __step_Run$exists.call(this);
@@ -148968,7 +149131,7 @@ Object.defineProperty(Run.prototype, "exists", {
148968
149131
  configurable: true,
148969
149132
  enumerable: false
148970
149133
  });
148971
- var __step_Run$status = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.51//Run#status");
149134
+ var __step_Run$status = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.53//Run#status");
148972
149135
  Object.defineProperty(Run.prototype, "status", {
148973
149136
  get() {
148974
149137
  return __step_Run$status.call(this);
@@ -148976,7 +149139,7 @@ Object.defineProperty(Run.prototype, "status", {
148976
149139
  configurable: true,
148977
149140
  enumerable: false
148978
149141
  });
148979
- var __step_Run$returnValue = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.51//Run#returnValue");
149142
+ var __step_Run$returnValue = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.53//Run#returnValue");
148980
149143
  Object.defineProperty(Run.prototype, "returnValue", {
148981
149144
  get() {
148982
149145
  return __step_Run$returnValue.call(this);
@@ -148984,7 +149147,7 @@ Object.defineProperty(Run.prototype, "returnValue", {
148984
149147
  configurable: true,
148985
149148
  enumerable: false
148986
149149
  });
148987
- var __step_Run$workflowName = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.51//Run#workflowName");
149150
+ var __step_Run$workflowName = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.53//Run#workflowName");
148988
149151
  Object.defineProperty(Run.prototype, "workflowName", {
148989
149152
  get() {
148990
149153
  return __step_Run$workflowName.call(this);
@@ -148992,7 +149155,7 @@ Object.defineProperty(Run.prototype, "workflowName", {
148992
149155
  configurable: true,
148993
149156
  enumerable: false
148994
149157
  });
148995
- var __step_Run$createdAt = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.51//Run#createdAt");
149158
+ var __step_Run$createdAt = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.53//Run#createdAt");
148996
149159
  Object.defineProperty(Run.prototype, "createdAt", {
148997
149160
  get() {
148998
149161
  return __step_Run$createdAt.call(this);
@@ -149000,7 +149163,7 @@ Object.defineProperty(Run.prototype, "createdAt", {
149000
149163
  configurable: true,
149001
149164
  enumerable: false
149002
149165
  });
149003
- var __step_Run$startedAt = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.51//Run#startedAt");
149166
+ var __step_Run$startedAt = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.53//Run#startedAt");
149004
149167
  Object.defineProperty(Run.prototype, "startedAt", {
149005
149168
  get() {
149006
149169
  return __step_Run$startedAt.call(this);
@@ -149008,7 +149171,7 @@ Object.defineProperty(Run.prototype, "startedAt", {
149008
149171
  configurable: true,
149009
149172
  enumerable: false
149010
149173
  });
149011
- var __step_Run$completedAt = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.51//Run#completedAt");
149174
+ var __step_Run$completedAt = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.53//Run#completedAt");
149012
149175
  Object.defineProperty(Run.prototype, "completedAt", {
149013
149176
  get() {
149014
149177
  return __step_Run$completedAt.call(this);
@@ -149025,7 +149188,7 @@ Object.defineProperty(Run.prototype, "completedAt", {
149025
149188
  enumerable: false,
149026
149189
  configurable: false
149027
149190
  });
149028
- })(Run, "class//@workflow/core/runtime/run@5.0.0-beta.51//Run");
149191
+ })(Run, "class//@workflow/core/runtime/run@5.0.0-beta.53//Run");
149029
149192
 
149030
149193
  // ../core/dist/workflow/create-hook.js
149031
149194
  aliasSerializationClass(RUN_CLASS_ID, Run);
@@ -156621,7 +156784,7 @@ globalThis.__private_workflows.set("workflow//./workflows/inline-execution//hook
156621
156784
  var latestNoOpWarning = globalSingleton("@workflow/core//latestNoOpWarning", 1, () => ({
156622
156785
  warned: false
156623
156786
  }));
156624
- var start = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/start@5.0.0-beta.51//start");
156787
+ var start = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/start@5.0.0-beta.53//start");
156625
156788
 
156626
156789
  // workflows/lineage.ts
156627
156790
  var noop = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//./workflows/lineage//noop");
@@ -3,42 +3,42 @@
3
3
  "steps": {
4
4
  "core/dist/runtime/run.js": {
5
5
  "Run#cancel": {
6
- "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#cancel"
6
+ "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#cancel"
7
7
  },
8
8
  "Run#completedAt": {
9
- "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#completedAt"
9
+ "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#completedAt"
10
10
  },
11
11
  "Run#createdAt": {
12
- "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#createdAt"
12
+ "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#createdAt"
13
13
  },
14
14
  "Run#exists": {
15
- "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#exists"
15
+ "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#exists"
16
16
  },
17
17
  "Run#getReadable": {
18
- "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#getReadable"
18
+ "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#getReadable"
19
19
  },
20
20
  "Run#getWritable": {
21
- "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#getWritable"
21
+ "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#getWritable"
22
22
  },
23
23
  "Run#returnValue": {
24
- "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#returnValue"
24
+ "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#returnValue"
25
25
  },
26
26
  "Run#startedAt": {
27
- "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#startedAt"
27
+ "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#startedAt"
28
28
  },
29
29
  "Run#status": {
30
- "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#status"
30
+ "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#status"
31
31
  },
32
32
  "Run#wakeUp": {
33
- "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#wakeUp"
33
+ "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#wakeUp"
34
34
  },
35
35
  "Run#workflowName": {
36
- "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.51//Run#workflowName"
36
+ "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.53//Run#workflowName"
37
37
  }
38
38
  },
39
39
  "core/dist/runtime/start.js": {
40
40
  "start": {
41
- "stepId": "step//@workflow/core/runtime/start@5.0.0-beta.51//start"
41
+ "stepId": "step//@workflow/core/runtime/start@5.0.0-beta.53//start"
42
42
  }
43
43
  },
44
44
  "workflow/dist/internal/builtins.js": {
@@ -1298,7 +1298,7 @@
1298
1298
  "data": {
1299
1299
  "label": "start",
1300
1300
  "nodeKind": "step",
1301
- "stepId": "step//@workflow/core/runtime/start@5.0.0-beta.51//start"
1301
+ "stepId": "step//@workflow/core/runtime/start@5.0.0-beta.53//start"
1302
1302
  }
1303
1303
  },
1304
1304
  {
@@ -1405,7 +1405,7 @@
1405
1405
  "data": {
1406
1406
  "label": "start",
1407
1407
  "nodeKind": "step",
1408
- "stepId": "step//@workflow/core/runtime/start@5.0.0-beta.51//start"
1408
+ "stepId": "step//@workflow/core/runtime/start@5.0.0-beta.53//start"
1409
1409
  }
1410
1410
  },
1411
1411
  {
@@ -1466,7 +1466,7 @@
1466
1466
  "data": {
1467
1467
  "label": "start",
1468
1468
  "nodeKind": "step",
1469
- "stepId": "step//@workflow/core/runtime/start@5.0.0-beta.51//start"
1469
+ "stepId": "step//@workflow/core/runtime/start@5.0.0-beta.53//start"
1470
1470
  }
1471
1471
  },
1472
1472
  {
@@ -1767,7 +1767,7 @@
1767
1767
  "classes": {
1768
1768
  "core/dist/runtime/run.js": {
1769
1769
  "Run": {
1770
- "classId": "class//@workflow/core/runtime/run@5.0.0-beta.51//Run"
1770
+ "classId": "class//@workflow/core/runtime/run@5.0.0-beta.53//Run"
1771
1771
  }
1772
1772
  }
1773
1773
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workflow/world-testing",
3
- "version": "5.0.0-beta.51",
3
+ "version": "5.0.0-beta.53",
4
4
  "description": "Testing utilities and World implementation for Workflow SDK",
5
5
  "main": "dist/src/index.mjs",
6
6
  "files": [
@@ -17,13 +17,13 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@hono/node-server": "1.19.13",
20
- "@workflow/cli": "5.0.0-beta.51",
21
- "@workflow/core": "5.0.0-beta.51",
22
- "@workflow/world": "5.0.0-beta.35",
20
+ "@workflow/cli": "5.0.0-beta.53",
21
+ "@workflow/core": "5.0.0-beta.53",
22
+ "@workflow/world": "5.0.0-beta.36",
23
23
  "chalk": "5.6.2",
24
24
  "hono": "4.12.25",
25
25
  "jsonlines": "0.1.1",
26
- "workflow": "5.0.0-beta.51",
26
+ "workflow": "5.0.0-beta.53",
27
27
  "zod": "~4.5.4"
28
28
  },
29
29
  "devDependencies": {