@workflow/world-testing 5.0.0-beta.28 → 5.0.0-beta.29

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.
@@ -6,6 +6,16 @@
6
6
  "stepId": "step//./workflows/addition//add"
7
7
  }
8
8
  },
9
+ "workflows/hooks.ts": {
10
+ "writeEvent": {
11
+ "stepId": "step//./workflows/hooks//writeEvent"
12
+ }
13
+ },
14
+ "workflows/null-byte.ts": {
15
+ "nullByteStep": {
16
+ "stepId": "step//./workflows/null-byte//nullByteStep"
17
+ }
18
+ },
9
19
  "workflows/retriable-and-fatal.ts": {
10
20
  "stepThatFails": {
11
21
  "stepId": "step//./workflows/retriable-and-fatal//stepThatFails"
@@ -14,19 +24,30 @@
14
24
  "stepId": "step//./workflows/retriable-and-fatal//stepThatThrowsRetryableError"
15
25
  }
16
26
  },
27
+ "workflows/signal-cost.ts": {
28
+ "trivialStep": {
29
+ "stepId": "step//./workflows/signal-cost//trivialStep"
30
+ }
31
+ },
17
32
  "workflows/noop.ts": {
18
33
  "noop": {
19
34
  "stepId": "step//./workflows/noop//noop"
20
35
  }
21
36
  },
22
- "workflows/hooks.ts": {
23
- "writeEvent": {
24
- "stepId": "step//./workflows/hooks//writeEvent"
37
+ "workflows/inline-execution.ts": {
38
+ "add": {
39
+ "stepId": "step//./workflows/inline-execution//add"
40
+ },
41
+ "closeOutputStream": {
42
+ "stepId": "step//./workflows/inline-execution//closeOutputStream"
43
+ },
44
+ "writeToStream": {
45
+ "stepId": "step//./workflows/inline-execution//writeToStream"
25
46
  }
26
47
  },
27
- "workflows/signal-cost.ts": {
28
- "trivialStep": {
29
- "stepId": "step//./workflows/signal-cost//trivialStep"
48
+ "core/dist/runtime/start.js": {
49
+ "start": {
50
+ "stepId": "step//@workflow/core/runtime/start@5.0.0-beta.29//start"
30
51
  }
31
52
  },
32
53
  "workflow/dist/stdlib.js": {
@@ -34,11 +55,6 @@
34
55
  "stepId": "step//./workflow/dist/stdlib//fetch"
35
56
  }
36
57
  },
37
- "workflows/null-byte.ts": {
38
- "nullByteStep": {
39
- "stepId": "step//./workflows/null-byte//nullByteStep"
40
- }
41
- },
42
58
  "workflow/dist/internal/builtins.js": {
43
59
  "__builtin_response_array_buffer": {
44
60
  "stepId": "__builtin_response_array_buffer"
@@ -53,52 +69,36 @@
53
69
  "stepId": "__builtin_set_attributes"
54
70
  }
55
71
  },
56
- "workflows/inline-execution.ts": {
57
- "add": {
58
- "stepId": "step//./workflows/inline-execution//add"
59
- },
60
- "closeOutputStream": {
61
- "stepId": "step//./workflows/inline-execution//closeOutputStream"
62
- },
63
- "writeToStream": {
64
- "stepId": "step//./workflows/inline-execution//writeToStream"
65
- }
66
- },
67
- "core/dist/runtime/start.js": {
68
- "start": {
69
- "stepId": "step//@workflow/core/runtime/start@5.0.0-beta.28//start"
70
- }
71
- },
72
72
  "core/dist/runtime/run.js": {
73
73
  "Run#cancel": {
74
- "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.28//Run#cancel"
74
+ "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.29//Run#cancel"
75
75
  },
76
76
  "Run#completedAt": {
77
- "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.28//Run#completedAt"
77
+ "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.29//Run#completedAt"
78
78
  },
79
79
  "Run#createdAt": {
80
- "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.28//Run#createdAt"
80
+ "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.29//Run#createdAt"
81
81
  },
82
82
  "Run#exists": {
83
- "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.28//Run#exists"
83
+ "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.29//Run#exists"
84
84
  },
85
85
  "Run#getReadable": {
86
- "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.28//Run#getReadable"
86
+ "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.29//Run#getReadable"
87
87
  },
88
88
  "Run#returnValue": {
89
- "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.28//Run#returnValue"
89
+ "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.29//Run#returnValue"
90
90
  },
91
91
  "Run#startedAt": {
92
- "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.28//Run#startedAt"
92
+ "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.29//Run#startedAt"
93
93
  },
94
94
  "Run#status": {
95
- "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.28//Run#status"
95
+ "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.29//Run#status"
96
96
  },
97
97
  "Run#wakeUp": {
98
- "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.28//Run#wakeUp"
98
+ "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.29//Run#wakeUp"
99
99
  },
100
100
  "Run#workflowName": {
101
- "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.28//Run#workflowName"
101
+ "stepId": "step//@workflow/core/runtime/run@5.0.0-beta.29//Run#workflowName"
102
102
  }
103
103
  }
104
104
  },
@@ -227,16 +227,16 @@
227
227
  }
228
228
  }
229
229
  },
230
- "workflows/retriable-and-fatal.ts": {
231
- "retryableAndFatalErrorWorkflow": {
232
- "workflowId": "workflow//./workflows/retriable-and-fatal//retryableAndFatalErrorWorkflow",
230
+ "workflows/hooks.ts": {
231
+ "collectWithHook": {
232
+ "workflowId": "workflow//./workflows/hooks//collectWithHook",
233
233
  "graph": {
234
234
  "nodes": [
235
235
  {
236
236
  "id": "start",
237
237
  "type": "workflowStart",
238
238
  "data": {
239
- "label": "Start: retryableAndFatalErrorWorkflow",
239
+ "label": "Start: collectWithHook",
240
240
  "nodeKind": "workflow_start"
241
241
  }
242
242
  },
@@ -244,9 +244,22 @@
244
244
  "id": "node_0",
245
245
  "type": "step",
246
246
  "data": {
247
- "label": "stepThatThrowsRetryableError",
247
+ "label": "writeEvent",
248
248
  "nodeKind": "step",
249
- "stepId": "step//./workflows/retriable-and-fatal//stepThatThrowsRetryableError"
249
+ "stepId": "step//./workflows/hooks//writeEvent"
250
+ }
251
+ },
252
+ {
253
+ "id": "node_1",
254
+ "type": "step",
255
+ "data": {
256
+ "label": "writeEvent",
257
+ "nodeKind": "step",
258
+ "stepId": "step//./workflows/hooks//writeEvent"
259
+ },
260
+ "metadata": {
261
+ "loopId": "loop_0",
262
+ "loopIsAwait": true
250
263
  }
251
264
  },
252
265
  {
@@ -266,8 +279,20 @@
266
279
  "type": "default"
267
280
  },
268
281
  {
269
- "id": "e_node_0_end",
282
+ "id": "e_node_1_back_node_1",
283
+ "source": "node_1",
284
+ "target": "node_1",
285
+ "type": "loop"
286
+ },
287
+ {
288
+ "id": "e_node_0_node_1",
270
289
  "source": "node_0",
290
+ "target": "node_1",
291
+ "type": "default"
292
+ },
293
+ {
294
+ "id": "e_node_1_end",
295
+ "source": "node_1",
271
296
  "target": "end",
272
297
  "type": "default"
273
298
  }
@@ -275,16 +300,16 @@
275
300
  }
276
301
  }
277
302
  },
278
- "workflows/noop.ts": {
279
- "brokenWf": {
280
- "workflowId": "workflow//./workflows/noop//brokenWf",
303
+ "workflows/null-byte.ts": {
304
+ "nullByteWorkflow": {
305
+ "workflowId": "workflow//./workflows/null-byte//nullByteWorkflow",
281
306
  "graph": {
282
307
  "nodes": [
283
308
  {
284
309
  "id": "start",
285
310
  "type": "workflowStart",
286
311
  "data": {
287
- "label": "Start: brokenWf",
312
+ "label": "Start: nullByteWorkflow",
288
313
  "nodeKind": "workflow_start"
289
314
  }
290
315
  },
@@ -292,18 +317,9 @@
292
317
  "id": "node_0",
293
318
  "type": "step",
294
319
  "data": {
295
- "label": "noop",
296
- "nodeKind": "step",
297
- "stepId": "step//./workflows/noop//noop"
298
- }
299
- },
300
- {
301
- "id": "node_1",
302
- "type": "step",
303
- "data": {
304
- "label": "noop",
320
+ "label": "nullByteStep",
305
321
  "nodeKind": "step",
306
- "stepId": "step//./workflows/noop//noop"
322
+ "stepId": "step//./workflows/null-byte//nullByteStep"
307
323
  }
308
324
  },
309
325
  {
@@ -323,14 +339,8 @@
323
339
  "type": "default"
324
340
  },
325
341
  {
326
- "id": "e_node_0_node_1",
342
+ "id": "e_node_0_end",
327
343
  "source": "node_0",
328
- "target": "node_1",
329
- "type": "default"
330
- },
331
- {
332
- "id": "e_node_1_end",
333
- "source": "node_1",
334
344
  "target": "end",
335
345
  "type": "default"
336
346
  }
@@ -338,16 +348,16 @@
338
348
  }
339
349
  }
340
350
  },
341
- "workflows/hooks.ts": {
342
- "collectWithHook": {
343
- "workflowId": "workflow//./workflows/hooks//collectWithHook",
351
+ "workflows/retriable-and-fatal.ts": {
352
+ "retryableAndFatalErrorWorkflow": {
353
+ "workflowId": "workflow//./workflows/retriable-and-fatal//retryableAndFatalErrorWorkflow",
344
354
  "graph": {
345
355
  "nodes": [
346
356
  {
347
357
  "id": "start",
348
358
  "type": "workflowStart",
349
359
  "data": {
350
- "label": "Start: collectWithHook",
360
+ "label": "Start: retryableAndFatalErrorWorkflow",
351
361
  "nodeKind": "workflow_start"
352
362
  }
353
363
  },
@@ -355,22 +365,9 @@
355
365
  "id": "node_0",
356
366
  "type": "step",
357
367
  "data": {
358
- "label": "writeEvent",
359
- "nodeKind": "step",
360
- "stepId": "step//./workflows/hooks//writeEvent"
361
- }
362
- },
363
- {
364
- "id": "node_1",
365
- "type": "step",
366
- "data": {
367
- "label": "writeEvent",
368
+ "label": "stepThatThrowsRetryableError",
368
369
  "nodeKind": "step",
369
- "stepId": "step//./workflows/hooks//writeEvent"
370
- },
371
- "metadata": {
372
- "loopId": "loop_0",
373
- "loopIsAwait": true
370
+ "stepId": "step//./workflows/retriable-and-fatal//stepThatThrowsRetryableError"
374
371
  }
375
372
  },
376
373
  {
@@ -390,20 +387,8 @@
390
387
  "type": "default"
391
388
  },
392
389
  {
393
- "id": "e_node_1_back_node_1",
394
- "source": "node_1",
395
- "target": "node_1",
396
- "type": "loop"
397
- },
398
- {
399
- "id": "e_node_0_node_1",
390
+ "id": "e_node_0_end",
400
391
  "source": "node_0",
401
- "target": "node_1",
402
- "type": "default"
403
- },
404
- {
405
- "id": "e_node_1_end",
406
- "source": "node_1",
407
392
  "target": "end",
408
393
  "type": "default"
409
394
  }
@@ -468,16 +453,16 @@
468
453
  }
469
454
  }
470
455
  },
471
- "workflows/null-byte.ts": {
472
- "nullByteWorkflow": {
473
- "workflowId": "workflow//./workflows/null-byte//nullByteWorkflow",
456
+ "workflows/noop.ts": {
457
+ "brokenWf": {
458
+ "workflowId": "workflow//./workflows/noop//brokenWf",
474
459
  "graph": {
475
460
  "nodes": [
476
461
  {
477
462
  "id": "start",
478
463
  "type": "workflowStart",
479
464
  "data": {
480
- "label": "Start: nullByteWorkflow",
465
+ "label": "Start: brokenWf",
481
466
  "nodeKind": "workflow_start"
482
467
  }
483
468
  },
@@ -485,9 +470,18 @@
485
470
  "id": "node_0",
486
471
  "type": "step",
487
472
  "data": {
488
- "label": "nullByteStep",
473
+ "label": "noop",
489
474
  "nodeKind": "step",
490
- "stepId": "step//./workflows/null-byte//nullByteStep"
475
+ "stepId": "step//./workflows/noop//noop"
476
+ }
477
+ },
478
+ {
479
+ "id": "node_1",
480
+ "type": "step",
481
+ "data": {
482
+ "label": "noop",
483
+ "nodeKind": "step",
484
+ "stepId": "step//./workflows/noop//noop"
491
485
  }
492
486
  },
493
487
  {
@@ -507,8 +501,14 @@
507
501
  "type": "default"
508
502
  },
509
503
  {
510
- "id": "e_node_0_end",
504
+ "id": "e_node_0_node_1",
511
505
  "source": "node_0",
506
+ "target": "node_1",
507
+ "type": "default"
508
+ },
509
+ {
510
+ "id": "e_node_1_end",
511
+ "source": "node_1",
512
512
  "target": "end",
513
513
  "type": "default"
514
514
  }
@@ -1420,7 +1420,7 @@
1420
1420
  "classes": {
1421
1421
  "core/dist/runtime/run.js": {
1422
1422
  "Run": {
1423
- "classId": "class//@workflow/core/runtime/run@5.0.0-beta.28//Run"
1423
+ "classId": "class//@workflow/core/runtime/run@5.0.0-beta.29//Run"
1424
1424
  }
1425
1425
  }
1426
1426
  }
@@ -16500,7 +16500,7 @@ var init_serialization = __esm({
16500
16500
  });
16501
16501
 
16502
16502
  // ../world/dist/events.js
16503
- var EventTypeSchema, TerminalRunEventTypeSchema, TERMINAL_RUN_EVENT_TYPES, BaseEventSchema, StepCompletedEventSchema, StepFailedEventSchema, StepRetryingEventSchema, StepStartedEventSchema, StepCreatedEventSchema, HookCreatedEventSchema, HookReceivedEventSchema, HookDisposedEventSchema, HookConflictEventSchema, WaitCreatedEventSchema, WaitCompletedEventSchema, AttributeWriterSchema, AttrSetEventSchema, RunCreatedEventSchema, RunStartedEventSchema, RunCompletedEventSchema, RunFailedEventSchema, RunCancelledEventSchema, CreateEventSchema, AllEventsSchema, EventSchema;
16503
+ var EventTypeSchema, TerminalRunEventTypeSchema, TERMINAL_RUN_EVENT_TYPES, BaseEventSchema, stepLatencyTelemetryFields, StepCompletedEventSchema, StepFailedEventSchema, StepRetryingEventSchema, StepStartedEventSchema, StepCreatedEventSchema, HookCreatedEventSchema, HookReceivedEventSchema, HookDisposedEventSchema, HookConflictEventSchema, WaitCreatedEventSchema, WaitCompletedEventSchema, AttributeWriterSchema, AttrSetEventSchema, RunCreatedEventSchema, RunStartedEventSchema, RunCompletedEventSchema, RunFailedEventSchema, RunCancelledEventSchema, CreateEventSchema, AllEventsSchema, EventSchema;
16504
16504
  var init_events = __esm({
16505
16505
  "../world/dist/events.js"() {
16506
16506
  "use strict";
@@ -16542,6 +16542,22 @@ var init_events = __esm({
16542
16542
  correlationId: external_exports.string().optional(),
16543
16543
  specVersion: external_exports.number().optional()
16544
16544
  });
16545
+ stepLatencyTelemetryFields = {
16546
+ // Time-to-first-step: milliseconds from run creation until the run's first
16547
+ // step body began executing, minus time spent committing hook_created
16548
+ // events. Only reported when nothing else (hooks received, waits,
16549
+ // attributes, other steps) happened before the first step.
16550
+ ttfs: external_exports.number().optional(),
16551
+ // Step-to-step overhead: milliseconds between the previous step's terminal
16552
+ // event and this step's body beginning to execute. Only reported when the
16553
+ // two steps ran back-to-back (the previous event-log entry is a
16554
+ // step_completed/step_failed).
16555
+ stso: external_exports.number().optional(),
16556
+ // Names of the runtime's optional startup-latency optimizations that were
16557
+ // active for this measurement (e.g. 'turbo', 'lazyStepStart',
16558
+ // 'optimisticStart'), so latency metrics can be segmented by them.
16559
+ optimizations: external_exports.array(external_exports.string()).optional()
16560
+ };
16545
16561
  StepCompletedEventSchema = BaseEventSchema.extend({
16546
16562
  eventType: external_exports.literal("step_completed"),
16547
16563
  correlationId: external_exports.string(),
@@ -16551,7 +16567,8 @@ var init_events = __esm({
16551
16567
  // the key without an extra run lookup on this hot per-step write.
16552
16568
  // Optional: older runtimes omit it and the backend falls back to a read.
16553
16569
  workflowName: external_exports.string().optional(),
16554
- result: SerializedDataSchema
16570
+ result: SerializedDataSchema,
16571
+ ...stepLatencyTelemetryFields
16555
16572
  })
16556
16573
  });
16557
16574
  StepFailedEventSchema = BaseEventSchema.extend({
@@ -16561,7 +16578,8 @@ var init_events = __esm({
16561
16578
  stepName: external_exports.string().optional(),
16562
16579
  // The thrown value, serialized via the workflow serialization pipeline.
16563
16580
  // Can be any JavaScript value (string, number, object, Error, etc.)
16564
- error: SerializedDataSchema
16581
+ error: SerializedDataSchema,
16582
+ ...stepLatencyTelemetryFields
16565
16583
  })
16566
16584
  });
16567
16585
  StepRetryingEventSchema = BaseEventSchema.extend({
@@ -16708,7 +16726,13 @@ var init_events = __esm({
16708
16726
  })
16709
16727
  });
16710
16728
  RunCancelledEventSchema = BaseEventSchema.extend({
16711
- eventType: external_exports.literal("run_cancelled")
16729
+ eventType: external_exports.literal("run_cancelled"),
16730
+ eventData: external_exports.object({
16731
+ // Optional free-text reason for the cancellation. Kept as small
16732
+ // plaintext metadata (like run_failed's errorCode) so it survives
16733
+ // resolveData: 'none' and can be displayed without decryption.
16734
+ cancelReason: external_exports.string().max(512).optional()
16735
+ }).optional()
16712
16736
  });
16713
16737
  CreateEventSchema = external_exports.discriminatedUnion("eventType", [
16714
16738
  // Run lifecycle events
@@ -19687,7 +19711,7 @@ function SemanticConvention(...names) {
19687
19711
  value
19688
19712
  ]));
19689
19713
  }
19690
- var WorkflowName, WorkflowOperation, WorkflowRunId, WorkflowRunStatus, WorkflowStartedAt, WorkflowEventsCount, WorkflowArgumentsCount, WorkflowResultType, WorkflowTracePropagated, WorkflowTraceMode, WorkflowTurbo, WorkflowErrorName, WorkflowErrorMessage, WorkflowErrorCode, WorkflowStepsCreated, WorkflowHooksCreated, WorkflowWaitsCreated, WorkflowRouteType, WorkflowRouteHandlerCached, WorkflowRouteInvocationCount, WorkflowRouteEntrypointAgeMs, WorkflowRouteModuleBodyInitMs, StepName, StepId, StepAttempt, StepStatus, StepMaxRetries, StepTracePropagated, StepSkipped, StepSkipReason, StepArgumentsCount, StepResultType, StepErrorName, StepErrorMessage, StepFatalError, StepRetryExhausted, StepRetryTimeoutSeconds, StepRetryWillRetry, MessagingSystem, MessagingDestinationName, MessagingMessageId, MessagingOperationType, QueueOverheadMs, DeploymentId, HookToken, HookId, HookFound, WebhookHandlersTriggered, WorkflowSuspensionState, WorkflowSuspensionHookCount, WorkflowSuspensionStepCount, WorkflowSuspensionWaitCount, HttpRequestMethod, HttpRoute, UrlFull, ServerAddress, ServerPort, HttpResponseStatusCode, ErrorType, WorldParseFormat, WorkflowEventsPagesLoaded, QueueDeserializeTimeMs, QueueExecutionTimeMs, QueueSerializeTimeMs, SerializationOperation, SerializationCompressed, SerializationCodec, SerializationUncompressedBytes, SerializationStoredBytes, SerializationCompressionRatio, PeerService, RpcSystem, RpcService, RpcMethod, ErrorRetryable, ErrorCategory;
19714
+ var WorkflowName, WorkflowOperation, WorkflowRunId, WorkflowRunStatus, WorkflowStartedAt, WorkflowEventsCount, WorkflowArgumentsCount, WorkflowResultType, WorkflowTracePropagated, WorkflowTraceMode, WorkflowTurbo, WorkflowErrorName, WorkflowErrorMessage, WorkflowErrorCode, WorkflowStepsCreated, WorkflowHooksCreated, WorkflowWaitsCreated, WorkflowRouteType, WorkflowRouteHandlerCached, WorkflowRouteInvocationCount, WorkflowRouteEntrypointAgeMs, WorkflowRouteModuleBodyInitMs, StepName, StepId, StepAttempt, StepStatus, StepMaxRetries, StepTracePropagated, StepTtfsMs, StepStsoMs, StepLatencyOptimizations, StepSkipped, StepSkipReason, StepArgumentsCount, StepResultType, StepErrorName, StepErrorMessage, StepFatalError, StepRetryExhausted, StepRetryTimeoutSeconds, StepRetryWillRetry, MessagingSystem, MessagingDestinationName, MessagingMessageId, MessagingOperationType, QueueOverheadMs, DeploymentId, HookToken, HookId, HookFound, WebhookHandlersTriggered, WorkflowSuspensionState, WorkflowSuspensionHookCount, WorkflowSuspensionStepCount, WorkflowSuspensionWaitCount, HttpRequestMethod, HttpRoute, UrlFull, ServerAddress, ServerPort, HttpResponseStatusCode, ErrorType, WorldParseFormat, WorkflowEventsPagesLoaded, QueueDeserializeTimeMs, QueueExecutionTimeMs, QueueSerializeTimeMs, SerializationOperation, SerializationCompressed, SerializationCodec, SerializationUncompressedBytes, SerializationStoredBytes, SerializationCompressionRatio, PeerService, RpcSystem, RpcService, RpcMethod, ErrorRetryable, ErrorCategory;
19691
19715
  var init_semantic_conventions = __esm({
19692
19716
  "../core/dist/telemetry/semantic-conventions.js"() {
19693
19717
  "use strict";
@@ -19720,6 +19744,9 @@ var init_semantic_conventions = __esm({
19720
19744
  StepStatus = SemanticConvention("step.status");
19721
19745
  StepMaxRetries = SemanticConvention("step.max_retries");
19722
19746
  StepTracePropagated = SemanticConvention("step.trace.propagated");
19747
+ StepTtfsMs = SemanticConvention("step.ttfs_ms");
19748
+ StepStsoMs = SemanticConvention("step.stso_ms");
19749
+ StepLatencyOptimizations = SemanticConvention("step.latency_optimizations");
19723
19750
  StepSkipped = SemanticConvention("step.skipped");
19724
19751
  StepSkipReason = SemanticConvention("step.skip_reason");
19725
19752
  StepArgumentsCount = SemanticConvention("step.arguments.count");
@@ -24248,7 +24275,7 @@ var version2;
24248
24275
  var init_version = __esm({
24249
24276
  "../core/dist/version.js"() {
24250
24277
  "use strict";
24251
- version2 = "5.0.0-beta.28";
24278
+ version2 = "5.0.0-beta.29";
24252
24279
  }
24253
24280
  });
24254
24281
 
@@ -27511,7 +27538,7 @@ __name(start, "start");
27511
27538
  value: "start",
27512
27539
  configurable: true
27513
27540
  });
27514
- })(start, "step//@workflow/core/runtime/start@5.0.0-beta.28//start");
27541
+ })(start, "step//@workflow/core/runtime/start@5.0.0-beta.29//start");
27515
27542
 
27516
27543
  // ../core/dist/runtime/runs.js
27517
27544
  async function wakeUpRun(world, runId, options) {
@@ -27681,12 +27708,21 @@ var Run = class _Run {
27681
27708
  }
27682
27709
  /**
27683
27710
  * Cancels the workflow run.
27711
+ *
27712
+ * @param options - Optional cancellation settings. `cancelReason` records a
27713
+ * free-text reason (max 512 chars) on the run_cancelled event, surfaced in
27714
+ * the run detail view.
27684
27715
  */
27685
- async cancel() {
27716
+ async cancel(options) {
27686
27717
  const world = await this.#lazyWorldPromise;
27687
27718
  await world.events.create(this.runId, {
27688
27719
  eventType: "run_cancelled",
27689
- specVersion: SPEC_VERSION_CURRENT
27720
+ specVersion: SPEC_VERSION_CURRENT,
27721
+ ...options?.cancelReason !== void 0 ? {
27722
+ eventData: {
27723
+ cancelReason: options.cancelReason
27724
+ }
27725
+ } : {}
27690
27726
  });
27691
27727
  }
27692
27728
  /**
@@ -27838,7 +27874,7 @@ var Run = class _Run {
27838
27874
  value: "wakeUp",
27839
27875
  configurable: true
27840
27876
  });
27841
- })(Run.prototype["wakeUp"], "step//@workflow/core/runtime/run@5.0.0-beta.28//Run#wakeUp");
27877
+ })(Run.prototype["wakeUp"], "step//@workflow/core/runtime/run@5.0.0-beta.29//Run#wakeUp");
27842
27878
  (function(__wf_fn, __wf_id) {
27843
27879
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
27844
27880
  __wf_reg.set(__wf_id, __wf_fn);
@@ -27847,7 +27883,7 @@ var Run = class _Run {
27847
27883
  value: "cancel",
27848
27884
  configurable: true
27849
27885
  });
27850
- })(Run.prototype["cancel"], "step//@workflow/core/runtime/run@5.0.0-beta.28//Run#cancel");
27886
+ })(Run.prototype["cancel"], "step//@workflow/core/runtime/run@5.0.0-beta.29//Run#cancel");
27851
27887
  (function(__wf_fn, __wf_id) {
27852
27888
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
27853
27889
  __wf_reg.set(__wf_id, __wf_fn);
@@ -27856,7 +27892,7 @@ var Run = class _Run {
27856
27892
  value: "getReadable",
27857
27893
  configurable: true
27858
27894
  });
27859
- })(Run.prototype["getReadable"], "step//@workflow/core/runtime/run@5.0.0-beta.28//Run#getReadable");
27895
+ })(Run.prototype["getReadable"], "step//@workflow/core/runtime/run@5.0.0-beta.29//Run#getReadable");
27860
27896
  (function(__wf_fn, __wf_id) {
27861
27897
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
27862
27898
  __wf_reg.set(__wf_id, __wf_fn);
@@ -27865,7 +27901,7 @@ var Run = class _Run {
27865
27901
  value: "exists",
27866
27902
  configurable: true
27867
27903
  });
27868
- })(Object.getOwnPropertyDescriptor(Run.prototype, "exists").get, "step//@workflow/core/runtime/run@5.0.0-beta.28//Run#exists");
27904
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "exists").get, "step//@workflow/core/runtime/run@5.0.0-beta.29//Run#exists");
27869
27905
  (function(__wf_fn, __wf_id) {
27870
27906
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
27871
27907
  __wf_reg.set(__wf_id, __wf_fn);
@@ -27874,7 +27910,7 @@ var Run = class _Run {
27874
27910
  value: "status",
27875
27911
  configurable: true
27876
27912
  });
27877
- })(Object.getOwnPropertyDescriptor(Run.prototype, "status").get, "step//@workflow/core/runtime/run@5.0.0-beta.28//Run#status");
27913
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "status").get, "step//@workflow/core/runtime/run@5.0.0-beta.29//Run#status");
27878
27914
  (function(__wf_fn, __wf_id) {
27879
27915
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
27880
27916
  __wf_reg.set(__wf_id, __wf_fn);
@@ -27883,7 +27919,7 @@ var Run = class _Run {
27883
27919
  value: "returnValue",
27884
27920
  configurable: true
27885
27921
  });
27886
- })(Object.getOwnPropertyDescriptor(Run.prototype, "returnValue").get, "step//@workflow/core/runtime/run@5.0.0-beta.28//Run#returnValue");
27922
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "returnValue").get, "step//@workflow/core/runtime/run@5.0.0-beta.29//Run#returnValue");
27887
27923
  (function(__wf_fn, __wf_id) {
27888
27924
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
27889
27925
  __wf_reg.set(__wf_id, __wf_fn);
@@ -27892,7 +27928,7 @@ var Run = class _Run {
27892
27928
  value: "workflowName",
27893
27929
  configurable: true
27894
27930
  });
27895
- })(Object.getOwnPropertyDescriptor(Run.prototype, "workflowName").get, "step//@workflow/core/runtime/run@5.0.0-beta.28//Run#workflowName");
27931
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "workflowName").get, "step//@workflow/core/runtime/run@5.0.0-beta.29//Run#workflowName");
27896
27932
  (function(__wf_fn, __wf_id) {
27897
27933
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
27898
27934
  __wf_reg.set(__wf_id, __wf_fn);
@@ -27901,7 +27937,7 @@ var Run = class _Run {
27901
27937
  value: "createdAt",
27902
27938
  configurable: true
27903
27939
  });
27904
- })(Object.getOwnPropertyDescriptor(Run.prototype, "createdAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.28//Run#createdAt");
27940
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "createdAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.29//Run#createdAt");
27905
27941
  (function(__wf_fn, __wf_id) {
27906
27942
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
27907
27943
  __wf_reg.set(__wf_id, __wf_fn);
@@ -27910,7 +27946,7 @@ var Run = class _Run {
27910
27946
  value: "startedAt",
27911
27947
  configurable: true
27912
27948
  });
27913
- })(Object.getOwnPropertyDescriptor(Run.prototype, "startedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.28//Run#startedAt");
27949
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "startedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.29//Run#startedAt");
27914
27950
  (function(__wf_fn, __wf_id) {
27915
27951
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
27916
27952
  __wf_reg.set(__wf_id, __wf_fn);
@@ -27919,7 +27955,7 @@ var Run = class _Run {
27919
27955
  value: "completedAt",
27920
27956
  configurable: true
27921
27957
  });
27922
- })(Object.getOwnPropertyDescriptor(Run.prototype, "completedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.28//Run#completedAt");
27958
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "completedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.29//Run#completedAt");
27923
27959
  (function(__wf_cls, __wf_id) {
27924
27960
  var __wf_sym = /* @__PURE__ */ Symbol.for("workflow-class-registry"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
27925
27961
  __wf_reg.set(__wf_id, __wf_cls);
@@ -27929,7 +27965,7 @@ var Run = class _Run {
27929
27965
  enumerable: false,
27930
27966
  configurable: false
27931
27967
  });
27932
- })(Run, "class//@workflow/core/runtime/run@5.0.0-beta.28//Run");
27968
+ })(Run, "class//@workflow/core/runtime/run@5.0.0-beta.29//Run");
27933
27969
 
27934
27970
  // ../workflow/dist/stdlib.js
27935
27971
  async function fetch2(...args) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workflow/world-testing",
3
- "version": "5.0.0-beta.28",
3
+ "version": "5.0.0-beta.29",
4
4
  "description": "Testing utilities and World implementation for Workflow SDK",
5
5
  "main": "dist/src/index.mjs",
6
6
  "files": [
@@ -21,12 +21,12 @@
21
21
  "hono": "4.12.25",
22
22
  "jsonlines": "0.1.1",
23
23
  "zod": "~4.3.6",
24
- "@workflow/cli": "5.0.0-beta.28",
25
- "@workflow/core": "5.0.0-beta.28",
24
+ "@workflow/cli": "5.0.0-beta.29",
25
+ "@workflow/core": "5.0.0-beta.29",
26
26
  "@workflow/utils": "5.0.0-beta.6",
27
- "@workflow/world": "5.0.0-beta.16",
28
- "@workflow/world-local": "5.0.0-beta.24",
29
- "workflow": "5.0.0-beta.28"
27
+ "@workflow/world": "5.0.0-beta.17",
28
+ "@workflow/world-local": "5.0.0-beta.25",
29
+ "workflow": "5.0.0-beta.29"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/jsonlines": "0.1.5",