@workflow/world-testing 4.1.0-beta.63 → 4.1.0-beta.64

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.
@@ -52987,7 +52987,7 @@ var RpcService3 = SemanticConvention3("rpc.service");
52987
52987
  var RpcMethod3 = SemanticConvention3("rpc.method");
52988
52988
 
52989
52989
  // ../world-vercel/dist/version.js
52990
- var version2 = "4.1.0-beta.36";
52990
+ var version2 = "4.1.0-beta.37";
52991
52991
 
52992
52992
  // ../world-vercel/dist/utils.js
52993
52993
  var WORKFLOW_SERVER_URL_OVERRIDE = "";
@@ -53646,12 +53646,18 @@ function filterEventData2(event, resolveData) {
53646
53646
  return event;
53647
53647
  }
53648
53648
  __name(filterEventData2, "filterEventData");
53649
- var EventResultWireSchema = zod_default.object({
53649
+ var EventResultResolveWireSchema = zod_default.object({
53650
53650
  event: EventSchema,
53651
53651
  run: WorkflowRunSchema.optional(),
53652
53652
  step: StepWireSchema.optional(),
53653
53653
  hook: HookSchema.optional()
53654
53654
  });
53655
+ var EventResultLazyWireSchema = zod_default.object({
53656
+ event: EventSchema,
53657
+ run: WorkflowRunWireBaseSchema.optional(),
53658
+ step: StepWireSchema.optional(),
53659
+ hook: HookSchema.optional()
53660
+ });
53655
53661
  var EventWithRefsSchema = zod_default.object({
53656
53662
  eventId: zod_default.string(),
53657
53663
  runId: zod_default.string(),
@@ -53843,16 +53849,31 @@ async function createWorkflowRunEvent(id, data, params, config3) {
53843
53849
  }
53844
53850
  const runIdPath = id === null ? "null" : id;
53845
53851
  const remoteRefBehavior = eventsNeedingResolve.has(data.eventType) ? "resolve" : "lazy";
53852
+ if (remoteRefBehavior === "resolve") {
53853
+ const wireResult2 = await makeRequest({
53854
+ endpoint: `/v2/runs/${runIdPath}/events`,
53855
+ options: { method: "POST" },
53856
+ data: { ...data, remoteRefBehavior },
53857
+ config: config3,
53858
+ schema: EventResultResolveWireSchema
53859
+ });
53860
+ return {
53861
+ event: filterEventData2(wireResult2.event, resolveData),
53862
+ run: wireResult2.run,
53863
+ step: wireResult2.step ? deserializeStep(wireResult2.step) : void 0,
53864
+ hook: wireResult2.hook
53865
+ };
53866
+ }
53846
53867
  const wireResult = await makeRequest({
53847
53868
  endpoint: `/v2/runs/${runIdPath}/events`,
53848
53869
  options: { method: "POST" },
53849
53870
  data: { ...data, remoteRefBehavior },
53850
53871
  config: config3,
53851
- schema: EventResultWireSchema
53872
+ schema: EventResultLazyWireSchema
53852
53873
  });
53853
53874
  return {
53854
53875
  event: filterEventData2(wireResult.event, resolveData),
53855
- run: wireResult.run,
53876
+ run: wireResult.run ? deserializeError(wireResult.run) : void 0,
53856
53877
  step: wireResult.step ? deserializeStep(wireResult.step) : void 0,
53857
53878
  hook: wireResult.hook
53858
53879
  };
@@ -58718,7 +58739,7 @@ function getWritable(options = {}) {
58718
58739
  __name(getWritable, "getWritable");
58719
58740
 
58720
58741
  // ../workflow/dist/stdlib.js
58721
- var fetch = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//workflow@4.1.0-beta.62//fetch");
58742
+ var fetch = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//workflow@4.1.0-beta.63//fetch");
58722
58743
 
58723
58744
  // ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.js
58724
58745
  var NEVER = Object.freeze({
@@ -1,17 +1,29 @@
1
1
  {
2
2
  "version": "1.0.0",
3
3
  "steps": {
4
+ "workflows/noop.ts": {
5
+ "noop": {
6
+ "stepId": "step//./workflows/noop//noop"
7
+ }
8
+ },
4
9
  "workflow/dist/stdlib.js": {
5
10
  "fetch": {
6
- "stepId": "step//workflow@4.1.0-beta.62//fetch"
11
+ "stepId": "step//workflow@4.1.0-beta.63//fetch"
7
12
  }
8
13
  },
9
- "workflows/retriable-and-fatal.ts": {
10
- "stepThatFails": {
11
- "stepId": "step//./workflows/retriable-and-fatal//stepThatFails"
12
- },
13
- "stepThatThrowsRetryableError": {
14
- "stepId": "step//./workflows/retriable-and-fatal//stepThatThrowsRetryableError"
14
+ "workflows/null-byte.ts": {
15
+ "nullByteStep": {
16
+ "stepId": "step//./workflows/null-byte//nullByteStep"
17
+ }
18
+ },
19
+ "workflows/hooks.ts": {
20
+ "writeEvent": {
21
+ "stepId": "step//./workflows/hooks//writeEvent"
22
+ }
23
+ },
24
+ "workflows/addition.ts": {
25
+ "add": {
26
+ "stepId": "step//./workflows/addition//add"
15
27
  }
16
28
  },
17
29
  "workflow/dist/internal/builtins.js": {
@@ -25,38 +37,26 @@
25
37
  "stepId": "__builtin_response_text"
26
38
  }
27
39
  },
28
- "workflows/noop.ts": {
29
- "noop": {
30
- "stepId": "step//./workflows/noop//noop"
31
- }
32
- },
33
- "workflows/addition.ts": {
34
- "add": {
35
- "stepId": "step//./workflows/addition//add"
36
- }
37
- },
38
- "workflows/hooks.ts": {
39
- "writeEvent": {
40
- "stepId": "step//./workflows/hooks//writeEvent"
41
- }
42
- },
43
- "workflows/null-byte.ts": {
44
- "nullByteStep": {
45
- "stepId": "step//./workflows/null-byte//nullByteStep"
40
+ "workflows/retriable-and-fatal.ts": {
41
+ "stepThatFails": {
42
+ "stepId": "step//./workflows/retriable-and-fatal//stepThatFails"
43
+ },
44
+ "stepThatThrowsRetryableError": {
45
+ "stepId": "step//./workflows/retriable-and-fatal//stepThatThrowsRetryableError"
46
46
  }
47
47
  }
48
48
  },
49
49
  "workflows": {
50
- "workflows/retriable-and-fatal.ts": {
51
- "retryableAndFatalErrorWorkflow": {
52
- "workflowId": "workflow//./workflows/retriable-and-fatal//retryableAndFatalErrorWorkflow",
50
+ "workflows/noop.ts": {
51
+ "brokenWf": {
52
+ "workflowId": "workflow//./workflows/noop//brokenWf",
53
53
  "graph": {
54
54
  "nodes": [
55
55
  {
56
56
  "id": "start",
57
57
  "type": "workflowStart",
58
58
  "data": {
59
- "label": "Start: retryableAndFatalErrorWorkflow",
59
+ "label": "Start: brokenWf",
60
60
  "nodeKind": "workflow_start"
61
61
  }
62
62
  },
@@ -80,16 +80,16 @@
80
80
  }
81
81
  }
82
82
  },
83
- "workflows/noop.ts": {
84
- "brokenWf": {
85
- "workflowId": "workflow//./workflows/noop//brokenWf",
83
+ "workflows/null-byte.ts": {
84
+ "nullByteWorkflow": {
85
+ "workflowId": "workflow//./workflows/null-byte//nullByteWorkflow",
86
86
  "graph": {
87
87
  "nodes": [
88
88
  {
89
89
  "id": "start",
90
90
  "type": "workflowStart",
91
91
  "data": {
92
- "label": "Start: brokenWf",
92
+ "label": "Start: nullByteWorkflow",
93
93
  "nodeKind": "workflow_start"
94
94
  }
95
95
  },
@@ -113,16 +113,16 @@
113
113
  }
114
114
  }
115
115
  },
116
- "workflows/addition.ts": {
117
- "addition": {
118
- "workflowId": "workflow//./workflows/addition//addition",
116
+ "workflows/hooks.ts": {
117
+ "collectWithHook": {
118
+ "workflowId": "workflow//./workflows/hooks//collectWithHook",
119
119
  "graph": {
120
120
  "nodes": [
121
121
  {
122
122
  "id": "start",
123
123
  "type": "workflowStart",
124
124
  "data": {
125
- "label": "Start: addition",
125
+ "label": "Start: collectWithHook",
126
126
  "nodeKind": "workflow_start"
127
127
  }
128
128
  },
@@ -146,16 +146,16 @@
146
146
  }
147
147
  }
148
148
  },
149
- "workflows/hooks.ts": {
150
- "collectWithHook": {
151
- "workflowId": "workflow//./workflows/hooks//collectWithHook",
149
+ "workflows/addition.ts": {
150
+ "addition": {
151
+ "workflowId": "workflow//./workflows/addition//addition",
152
152
  "graph": {
153
153
  "nodes": [
154
154
  {
155
155
  "id": "start",
156
156
  "type": "workflowStart",
157
157
  "data": {
158
- "label": "Start: collectWithHook",
158
+ "label": "Start: addition",
159
159
  "nodeKind": "workflow_start"
160
160
  }
161
161
  },
@@ -179,16 +179,16 @@
179
179
  }
180
180
  }
181
181
  },
182
- "workflows/null-byte.ts": {
183
- "nullByteWorkflow": {
184
- "workflowId": "workflow//./workflows/null-byte//nullByteWorkflow",
182
+ "workflows/retriable-and-fatal.ts": {
183
+ "retryableAndFatalErrorWorkflow": {
184
+ "workflowId": "workflow//./workflows/retriable-and-fatal//retryableAndFatalErrorWorkflow",
185
185
  "graph": {
186
186
  "nodes": [
187
187
  {
188
188
  "id": "start",
189
189
  "type": "workflowStart",
190
190
  "data": {
191
- "label": "Start: nullByteWorkflow",
191
+ "label": "Start: retryableAndFatalErrorWorkflow",
192
192
  "nodeKind": "workflow_start"
193
193
  }
194
194
  },