@workflow/web 5.0.0-beta.42 → 5.0.0-beta.44

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.
Files changed (23) hide show
  1. package/build/client/assets/{arrow-up-right-D39pnGsD.js → arrow-up-right-AtCpRI70.js} +1 -1
  2. package/build/client/assets/{highlighted-body-B3W2YXNL-Dc1dLaUr.js → highlighted-body-B3W2YXNL-BPRwlr7r.js} +1 -1
  3. package/build/client/assets/{home-C6CuMqQu.js → home-BMHSjdeg.js} +3 -3
  4. package/build/client/assets/{loader-circle-BOxaTUjK.js → loader-circle-abAcDEYl.js} +1 -1
  5. package/build/client/assets/{manifest-cf88886b.js → manifest-a9a8ec99.js} +1 -1
  6. package/build/client/assets/{mermaid-3ZIDBTTL-gEw-Ch1C.js → mermaid-3ZIDBTTL-CrfHaTou.js} +368 -294
  7. package/build/client/assets/{root-BfhMCbkz.js → root-e8qlLJiK.js} +3 -3
  8. package/build/client/assets/{run-detail-DKz7lp2q.js → run-detail-CrWq-9Tk.js} +172 -56
  9. package/build/client/assets/{workflow-graph-viewer-CxrWityD.js → workflow-graph-viewer-CFAXloBw.js} +1 -1
  10. package/build/client/assets/{zstd-browser-decoder-CAEVa0bm.js → zstd-browser-decoder-B9DmHkyE.js} +1 -1
  11. package/build/server/assets/{app-SrggQnfh.js → app-wed_Qw3X.js} +1773 -856
  12. package/build/server/assets/{highlighted-body-B3W2YXNL-DMhwZQgG.js → highlighted-body-B3W2YXNL-imLU-Cvz.js} +5 -4
  13. package/build/server/assets/{index-ByPjQpgH.js → index-Dsr6TVhD.js} +1 -1
  14. package/build/server/assets/{index-DsnQrgwB.js → index-DxLR22JW.js} +80 -71
  15. package/build/server/assets/{mermaid-3ZIDBTTL-CK9fLYE8.js → mermaid-3ZIDBTTL-CgaDjNgb.js} +5 -4
  16. package/build/server/assets/{token-sFDUVNm0.js → token-CA6-cBL4.js} +1 -1
  17. package/build/server/assets/{token-util-CighjZkT.js → token-util-BNjC27Tj.js} +1 -1
  18. package/build/server/assets/{websocket-server-BADWB2u5.js → websocket-server-S8DMC969.js} +1 -1
  19. package/build/server/assets/{wrapper-Bwi-W3ol.js → wrapper-DeK0m2tW.js} +7 -6
  20. package/build/server/assets/{ws-transport-DaZsgQ2B.js → ws-transport-DdxSF5J6.js} +44 -25
  21. package/build/server/assets/{zstd-browser-decoder-dRi0VqoM.js → zstd-browser-decoder-Cd_DTxZV.js} +5 -4
  22. package/build/server/index.js +7 -6
  23. package/package.json +8 -8
@@ -2,7 +2,7 @@ import { createRequire as __wkfCreateRequire } from "node:module";
2
2
  if (typeof require === "undefined") {
3
3
  globalThis.require = __wkfCreateRequire(import.meta.url);
4
4
  }
5
- import { aQ as reactExports, aR as R, aS as Ks, aT as jsxRuntimeExports, aU as Qe } from "./app-SrggQnfh.js";
5
+ import { aY as reactExports, aZ as R, a_ as Ks, a$ as jsxRuntimeExports, b0 as Qe } from "./app-wed_Qw3X.js";
6
6
  import "node:stream";
7
7
  import "stream";
8
8
  import "util";
@@ -21,16 +21,17 @@ import "node:fs";
21
21
  import "node:os";
22
22
  import "node:child_process";
23
23
  import "node:timers/promises";
24
+ import "node:buffer";
25
+ import "node:http";
26
+ import "node:https";
27
+ import "node:zlib";
24
28
  import "events";
25
29
  import "node:assert";
26
30
  import "node:net";
27
- import "node:http";
28
31
  import "node:querystring";
29
32
  import "node:events";
30
33
  import "node:diagnostics_channel";
31
34
  import "node:tls";
32
- import "node:buffer";
33
- import "node:zlib";
34
35
  import "node:perf_hooks";
35
36
  import "node:util/types";
36
37
  import "node:sqlite";
@@ -1137,7 +1137,7 @@ function requireWebsocket() {
1137
1137
  const DEFAULT_MAX_PAYLOAD = 256 * 1024;
1138
1138
  async function loadWebSocketServer() {
1139
1139
  try {
1140
- const ws = await import("./wrapper-Bwi-W3ol.js");
1140
+ const ws = await import("./wrapper-DeK0m2tW.js");
1141
1141
  return ws.WebSocketServer;
1142
1142
  } catch {
1143
1143
  throw new Error(
@@ -2,8 +2,8 @@ import { createRequire as __wkfCreateRequire } from "node:module";
2
2
  if (typeof require === "undefined") {
3
3
  globalThis.require = __wkfCreateRequire(import.meta.url);
4
4
  }
5
- import { H as HookSchema } from "./app-SrggQnfh.js";
6
- import { A, a, b, c, d, e, f, g, h, i, j, k, l, B, m, n, o, p, C, D, q, E, r, s, t, u, v, F, w, x, y, z, G, I, J, L, M, P, K, Q, O, R, S, T, U, V, W, X, Y, Z, _, $, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP } from "./app-SrggQnfh.js";
5
+ import { H as HookSchema } from "./app-wed_Qw3X.js";
6
+ import { A, a, b, c, d, e, f, g, h, i, j, k, l, B, m, n, o, p, C, D, q, E, r, s, t, u, v, F, w, x, y, z, G, I, J, L, M, K, O, P, Q, R, S, T, U, V, W, X, Y, Z, _, $, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX } from "./app-wed_Qw3X.js";
7
7
  import "node:stream";
8
8
  import "stream";
9
9
  import "util";
@@ -22,16 +22,17 @@ import "node:fs";
22
22
  import "node:os";
23
23
  import "node:child_process";
24
24
  import "node:timers/promises";
25
+ import "node:buffer";
26
+ import "node:http";
27
+ import "node:https";
28
+ import "node:zlib";
25
29
  import "events";
26
30
  import "node:assert";
27
31
  import "node:net";
28
- import "node:http";
29
32
  import "node:querystring";
30
33
  import "node:events";
31
34
  import "node:diagnostics_channel";
32
35
  import "node:tls";
33
- import "node:buffer";
34
- import "node:zlib";
35
36
  import "node:perf_hooks";
36
37
  import "node:util/types";
37
38
  import "node:sqlite";
@@ -86,71 +87,79 @@ export {
86
87
  HookSchema,
87
88
  L as LegacySerializedDataSchemaV1,
88
89
  M as MessageId,
90
+ K as NODE_HTTP_DEFAULT,
91
+ O as NODE_HTTP_ENV_VAR,
89
92
  P as PARENT_RUN_ID_ATTRIBUTE,
90
- K as PaginatedResponseSchema,
91
- Q as QueuePayloadSchema,
92
- O as QueuePrefix,
93
- R as RESERVED_ATTRIBUTE_KEY_PREFIX,
94
- S as ROOT_RUN_ID_ATTRIBUTE,
95
- T as RunInputSchema,
96
- U as SPEC_VERSION_CURRENT,
97
- V as SPEC_VERSION_LEGACY,
98
- W as SPEC_VERSION_MAX_SUPPORTED,
99
- X as SPEC_VERSION_SUPPORTS_ATTRIBUTES,
100
- Y as SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT,
101
- Z as SPEC_VERSION_SUPPORTS_COMPRESSION,
102
- _ as SPEC_VERSION_SUPPORTS_SLOT_IDENTITY,
103
- $ as STEP_EVENT_TYPES,
104
- a0 as SerializedDataSchema,
105
- a1 as StepSchema,
106
- a2 as StepStatusSchema,
107
- a3 as StructuredErrorSchema,
108
- a4 as TERMINAL_RUN_EVENT_TYPES,
109
- a5 as TERMINAL_STEP_EVENT_TYPES,
110
- a6 as TERMINAL_STEP_STATUSES,
111
- a7 as TERMINAL_WORKFLOW_RUN_STATUSES,
112
- a8 as TerminalRunEventTypeSchema,
113
- a9 as TerminalStepStatusSchema,
114
- aa as TerminalWorkflowRunStatusSchema,
115
- ab as ValidQueueName,
116
- ac as WAIT_EVENT_TYPES,
117
- ad as WaitSchema,
118
- ae as WaitStatusSchema,
119
- af as WorkflowInvokePayloadSchema,
120
- ag as WorkflowRunBaseSchema,
121
- ah as WorkflowRunSchema,
122
- ai as WorkflowRunStatusSchema,
123
- aj as applyAttributeChanges,
124
- ak as entityEventClass,
125
- al as envNumber,
126
- am as eventIdToSlot,
127
- an as getEventDataPayloadField,
128
- ao as getEventDataRefFields,
129
- ap as getMaxEventsPerRun,
130
- aq as getQueueTopicPrefix,
131
- ar as isChildEntityCreationEvent,
132
- as as isChildEntityCreationEventType,
133
- at as isHookEventRequiringExistence,
134
- au as isHookLifecycleEventType,
135
- av as isLegacySpecVersion,
136
- aw as isSlotBody,
137
- ax as isSlotEventId,
138
- ay as isStepEventType,
139
- az as isTerminalRunEventType,
140
- aA as isTerminalStepEventType,
141
- aB as isTerminalStepStatus,
142
- aC as isTerminalWorkflowRunStatus,
143
- aD as isWaitEventType,
144
- aE as parseQueueName,
145
- aF as reenqueueActiveRuns,
146
- aG as requiresNewerWorld,
147
- aH as resolveQueueNamespace,
148
- aI as slotToEventId,
149
- aJ as stripEventDataRefs,
150
- aK as ulidToDate,
151
- aL as validateAttributeChanges,
152
- aM as validateAttributeKey,
153
- aN as validateAttributeValue,
154
- aO as validateUlidTimestamp,
155
- aP as workflowRunIdSchema
93
+ Q as PaginatedResponseSchema,
94
+ R as QueuePayloadSchema,
95
+ S as QueuePrefix,
96
+ T as RESERVED_ATTRIBUTE_KEY_PREFIX,
97
+ U as ROOT_RUN_ID_ATTRIBUTE,
98
+ V as RunInputSchema,
99
+ W as SEALED_LOG_ENV_VAR,
100
+ X as SPEC_VERSION_CURRENT,
101
+ Y as SPEC_VERSION_LEGACY,
102
+ Z as SPEC_VERSION_MAX_SUPPORTED,
103
+ _ as SPEC_VERSION_SUPPORTS_ATTRIBUTES,
104
+ $ as SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT,
105
+ a0 as SPEC_VERSION_SUPPORTS_COMPRESSION,
106
+ a1 as SPEC_VERSION_SUPPORTS_SEALED_LOG,
107
+ a2 as SPEC_VERSION_SUPPORTS_SLOT_IDENTITY,
108
+ a3 as STEP_EVENT_TYPES,
109
+ a4 as SerializedDataSchema,
110
+ a5 as StepSchema,
111
+ a6 as StepStatusSchema,
112
+ a7 as StructuredErrorSchema,
113
+ a8 as TERMINAL_RUN_EVENT_TYPES,
114
+ a9 as TERMINAL_STEP_EVENT_TYPES,
115
+ aa as TERMINAL_STEP_STATUSES,
116
+ ab as TERMINAL_WORKFLOW_RUN_STATUSES,
117
+ ac as TerminalRunEventTypeSchema,
118
+ ad as TerminalStepStatusSchema,
119
+ ae as TerminalWorkflowRunStatusSchema,
120
+ af as ValidQueueName,
121
+ ag as WAIT_EVENT_TYPES,
122
+ ah as WaitSchema,
123
+ ai as WaitStatusSchema,
124
+ aj as WorkflowInvokePayloadSchema,
125
+ ak as WorkflowRunBaseSchema,
126
+ al as WorkflowRunSchema,
127
+ am as WorkflowRunStatusSchema,
128
+ an as applyAttributeChanges,
129
+ ao as entityEventClass,
130
+ ap as envFlag,
131
+ aq as envNumber,
132
+ ar as eventIdToSlot,
133
+ as as getEventDataPayloadField,
134
+ at as getEventDataRefFields,
135
+ au as getMaxEventsPerRun,
136
+ av as getQueueTopicPrefix,
137
+ aw as isChildEntityCreationEvent,
138
+ ax as isChildEntityCreationEventType,
139
+ ay as isHookEventRequiringExistence,
140
+ az as isHookLifecycleEventType,
141
+ aA as isLegacySpecVersion,
142
+ aB as isNodeHttpEnabled,
143
+ aC as isSealedNoopEvent,
144
+ aD as isSlotBody,
145
+ aE as isSlotEventId,
146
+ aF as isStepEventType,
147
+ aG as isTerminalRunEventType,
148
+ aH as isTerminalStepEventType,
149
+ aI as isTerminalStepStatus,
150
+ aJ as isTerminalWorkflowRunStatus,
151
+ aK as isWaitEventType,
152
+ aL as mintedSpecVersion,
153
+ aM as parseQueueName,
154
+ aN as reenqueueActiveRuns,
155
+ aO as requiresNewerWorld,
156
+ aP as resolveQueueNamespace,
157
+ aQ as slotToEventId,
158
+ aR as stripEventDataRefs,
159
+ aS as ulidToDate,
160
+ aT as validateAttributeChanges,
161
+ aU as validateAttributeKey,
162
+ aV as validateAttributeValue,
163
+ aW as validateUlidTimestamp,
164
+ aX as workflowRunIdSchema
156
165
  };
@@ -2,7 +2,7 @@ import { createRequire as __wkfCreateRequire } from "node:module";
2
2
  if (typeof require === "undefined") {
3
3
  globalThis.require = __wkfCreateRequire(import.meta.url);
4
4
  }
5
- import { N as Nt } from "./app-SrggQnfh.js";
5
+ import { N as Nt } from "./app-wed_Qw3X.js";
6
6
  import "node:stream";
7
7
  import "stream";
8
8
  import "util";
@@ -21,16 +21,17 @@ import "node:fs";
21
21
  import "node:os";
22
22
  import "node:child_process";
23
23
  import "node:timers/promises";
24
+ import "node:buffer";
25
+ import "node:http";
26
+ import "node:https";
27
+ import "node:zlib";
24
28
  import "events";
25
29
  import "node:assert";
26
30
  import "node:net";
27
- import "node:http";
28
31
  import "node:querystring";
29
32
  import "node:events";
30
33
  import "node:diagnostics_channel";
31
34
  import "node:tls";
32
- import "node:buffer";
33
- import "node:zlib";
34
35
  import "node:perf_hooks";
35
36
  import "node:util/types";
36
37
  import "node:sqlite";
@@ -2,7 +2,7 @@ import { createRequire as __wkfCreateRequire } from "node:module";
2
2
  if (typeof require === "undefined") {
3
3
  globalThis.require = __wkfCreateRequire(import.meta.url);
4
4
  }
5
- import { b9 as requireTokenError, b8 as requireTokenUtil, b7 as getDefaultExportFromCjs } from "./app-SrggQnfh.js";
5
+ import { bj as requireTokenError, bi as requireTokenUtil, bh as getDefaultExportFromCjs } from "./app-wed_Qw3X.js";
6
6
  function _mergeNamespaces(n, m) {
7
7
  for (var i = 0; i < m.length; i++) {
8
8
  const e = m[i];
@@ -2,7 +2,7 @@ import { createRequire as __wkfCreateRequire } from "node:module";
2
2
  if (typeof require === "undefined") {
3
3
  globalThis.require = __wkfCreateRequire(import.meta.url);
4
4
  }
5
- import { b7 as getDefaultExportFromCjs, b8 as requireTokenUtil } from "./app-SrggQnfh.js";
5
+ import { bh as getDefaultExportFromCjs, bi as requireTokenUtil } from "./app-wed_Qw3X.js";
6
6
  function _mergeNamespaces(n, m) {
7
7
  for (var i = 0; i < m.length; i++) {
8
8
  const e = m[i];
@@ -2,7 +2,7 @@ import { createRequire as __wkfCreateRequire } from "node:module";
2
2
  if (typeof require === "undefined") {
3
3
  globalThis.require = __wkfCreateRequire(import.meta.url);
4
4
  }
5
- import { ba as getAugmentedNamespace, b7 as getDefaultExportFromCjs } from "./app-SrggQnfh.js";
5
+ import { bk as getAugmentedNamespace, bh as getDefaultExportFromCjs } from "./app-wed_Qw3X.js";
6
6
  import require$$0$2 from "stream";
7
7
  import require$$0$3 from "events";
8
8
  import require$$2$1 from "http";
@@ -2,9 +2,9 @@ import { createRequire as __wkfCreateRequire } from "node:module";
2
2
  if (typeof require === "undefined") {
3
3
  globalThis.require = __wkfCreateRequire(import.meta.url);
4
4
  }
5
- import { W as WebSocket } from "./websocket-server-BADWB2u5.js";
6
- import { p, r, s, w, a, e, b } from "./websocket-server-BADWB2u5.js";
7
- import "./app-SrggQnfh.js";
5
+ import { W as WebSocket } from "./websocket-server-S8DMC969.js";
6
+ import { p, r, s, w, a, e, b } from "./websocket-server-S8DMC969.js";
7
+ import "./app-wed_Qw3X.js";
8
8
  import "node:stream";
9
9
  import "stream";
10
10
  import "util";
@@ -23,16 +23,17 @@ import "node:fs";
23
23
  import "node:os";
24
24
  import "node:child_process";
25
25
  import "node:timers/promises";
26
+ import "node:buffer";
27
+ import "node:http";
28
+ import "node:https";
29
+ import "node:zlib";
26
30
  import "events";
27
31
  import "node:assert";
28
32
  import "node:net";
29
- import "node:http";
30
33
  import "node:querystring";
31
34
  import "node:events";
32
35
  import "node:diagnostics_channel";
33
36
  import "node:tls";
34
- import "node:buffer";
35
- import "node:zlib";
36
37
  import "node:perf_hooks";
37
38
  import "node:util/types";
38
39
  import "node:sqlite";
@@ -5,8 +5,8 @@ import { createRequire as __wkfCreateRequire } from "node:module";
5
5
  if (typeof require === "undefined") {
6
6
  globalThis.require = __wkfCreateRequire(import.meta.url);
7
7
  }
8
- import { aW as isWsEventsTransportEnabled, aX as getHttpUrl, aY as getHttpConfig, aZ as headersToRecord, a_ as getRequestTimeoutMs, a$ as injectTraceContextIntoHeaders, b0 as withHttpClientSpan, b1 as ErrorType, b2 as WorkflowWsReconnectAttempt, b3 as NetworkProtocolName, b4 as WorkflowEventsTransport, b5 as distExports, b6 as decodeFrames } from "./app-SrggQnfh.js";
9
- import { W as WebSocket } from "./websocket-server-BADWB2u5.js";
8
+ import { b2 as isWsEventsTransportEnabled, b3 as getHttpUrl, b4 as globalSingleton, b5 as version, b6 as getHttpConfig, b7 as headersToRecord, b8 as getRequestTimeoutMs, b9 as injectTraceContextIntoHeaders, ba as withHttpClientSpan, bb as ErrorType, bc as WorkflowWsReconnectAttempt, bd as NetworkProtocolName, be as WorkflowEventsTransport, bf as distExports, bg as decodeFrames } from "./app-wed_Qw3X.js";
9
+ import { W as WebSocket } from "./websocket-server-S8DMC969.js";
10
10
  import "node:stream";
11
11
  import "stream";
12
12
  import "util";
@@ -25,16 +25,17 @@ import "node:fs";
25
25
  import "node:os";
26
26
  import "node:child_process";
27
27
  import "node:timers/promises";
28
+ import "node:buffer";
29
+ import "node:http";
30
+ import "node:https";
31
+ import "node:zlib";
28
32
  import "events";
29
33
  import "node:assert";
30
34
  import "node:net";
31
- import "node:http";
32
35
  import "node:querystring";
33
36
  import "node:events";
34
37
  import "node:diagnostics_channel";
35
38
  import "node:tls";
36
- import "node:buffer";
37
- import "node:zlib";
38
39
  import "node:perf_hooks";
39
40
  import "node:util/types";
40
41
  import "node:sqlite";
@@ -106,15 +107,15 @@ class WsEventsTransport {
106
107
  __publicField(this, "reconnectTimer", null);
107
108
  /** Number of `open()` calls not yet matched by a `release()`. The socket goes
108
109
  * away at zero. A refcount rather than a flag because concurrent invocations
109
- * for one run share this instance see `open`. */
110
+ * for one run share this instance; see `open`. */
110
111
  __publicField(this, "openCount", 0);
111
112
  /** Set by `close()`. Suppresses reconnects so an intentional teardown can't
112
113
  * be undone by the close handler it triggers. */
113
114
  __publicField(this, "closed", false);
114
115
  /** Reason from the most recent `drain`, consumed by the close that follows. */
115
116
  __publicField(this, "lastDrainReason", null);
116
- /** A drain said the *token* expired, not that the socket aged out the next
117
- * connect must not reuse the same bearer. */
117
+ /** A drain said the *token* expired, not that the socket aged out, so the
118
+ * next connect must not reuse the same bearer. */
118
119
  __publicField(this, "needsFreshToken", false);
119
120
  /** Authorization the current socket was opened with, so a forced refresh can
120
121
  * tell whether it actually produced a new one. */
@@ -159,7 +160,7 @@ class WsEventsTransport {
159
160
  }
160
161
  /**
161
162
  * Claim the channel and start connecting. Called once per invocation that
162
- * intends to write, at the point the run id is known connecting lazily on
163
+ * intends to write, at the point the run id is known. Connecting lazily on
163
164
  * the first write instead bills the handshake (plus the OIDC mint riding it)
164
165
  * to whichever event happens to be written first; when that's a `step_started`
165
166
  * issued as the step body already runs, its server-recorded timestamp lands
@@ -210,7 +211,7 @@ class WsEventsTransport {
210
211
  /**
211
212
  * Drop the socket and evict this transport from the cache. Terminal, not a
212
213
  * pause: the instance stays closed and a later `openWsChannel` for the same
213
- * run constructs a fresh one. Idempotent. Safe with work in flight those
214
+ * run constructs a fresh one. Idempotent. Safe with work in flight: those
214
215
  * requests fail through the socket's own `close` handler, same as any other
215
216
  * close.
216
217
  */
@@ -223,8 +224,9 @@ class WsEventsTransport {
223
224
  clearTimeout(this.reconnectTimer);
224
225
  this.reconnectTimer = null;
225
226
  }
226
- if (transports.get(this.wsUrl) === this)
227
- transports.delete(this.wsUrl);
227
+ if (wsState.transports.get(this.wsUrl) === this) {
228
+ wsState.transports.delete(this.wsUrl);
229
+ }
228
230
  const conn = this.connection;
229
231
  this.connection = null;
230
232
  conn == null ? void 0 : conn.ws.close(1e3, reason);
@@ -240,7 +242,7 @@ class WsEventsTransport {
240
242
  return this.connecting;
241
243
  }
242
244
  /**
243
- * Resolve the headers for one upgrade request once per socket, since the
245
+ * Resolve the headers for one upgrade request, once per socket, since the
244
246
  * bearer only rides the upgrade. Re-resolving per socket is what lets a
245
247
  * reconnect pick up a fresh token rather than replaying an expired one.
246
248
  *
@@ -436,13 +438,13 @@ class WsEventsTransport {
436
438
  conn.pending.clear();
437
439
  }
438
440
  /**
439
- * Fail every waiter on `conn` and drop the socket for a reply that can't be
441
+ * Fail every waiter on `conn` and drop the socket, for a reply that can't be
440
442
  * correlated to a caller, and for a request that outlived its deadline. The
441
443
  * whole connection goes because each case says the stream itself is no longer
442
444
  * understood; logging and moving on would leave the originating request in
443
445
  * `pending` with nothing able to answer it until the server drains (~680s),
444
446
  * well past the waiting invocation's `maxDuration`. The socket's own `close`
445
- * handler does the teardown and schedules the reconnect failing the waiters
447
+ * handler does the teardown and schedules the reconnect; failing the waiters
446
448
  * here is what makes callers see this diagnosis, not a bare close code.
447
449
  */
448
450
  failConnection(conn, message) {
@@ -452,12 +454,31 @@ class WsEventsTransport {
452
454
  conn.ws.close();
453
455
  }
454
456
  }
455
- const transports = /* @__PURE__ */ new Map();
457
+ const wsState = globalSingleton(
458
+ // Keyed by package version, unlike the state that holds only plain data.
459
+ // Two different published versions of this package can share one process (a
460
+ // transitive dependency pinning an older `@workflow/core`, which depends on
461
+ // this package by exact version), and this Map holds `WsEventsTransport`
462
+ // instances. An unversioned key would hand one version's write path an object
463
+ // built by the other version's class, and `events-v4.ts` would then frame and
464
+ // parse against a protocol the other copy may not share. There is no version
465
+ // negotiation on this socket to catch that. `shapeVersion` cannot express it:
466
+ // the container shape is stable, the hazard is in the contents. Two versions
467
+ // therefore keep separate registries, which costs a second socket and is what
468
+ // happened before this package was bundled anyway.
469
+ `@workflow/world-vercel//wsEventsTransports@${version}`,
470
+ 1,
471
+ () => ({
472
+ transports: /* @__PURE__ */ new Map(),
473
+ loggedWsProxyFallback: false,
474
+ loggedWsInUse: false
475
+ })
476
+ );
456
477
  function getWsEventsTransport(wsUrl, getHeaders) {
457
- let transport = transports.get(wsUrl);
478
+ let transport = wsState.transports.get(wsUrl);
458
479
  if (!transport) {
459
480
  transport = new WsEventsTransport(wsUrl, getHeaders);
460
- transports.set(wsUrl, transport);
481
+ wsState.transports.set(wsUrl, transport);
461
482
  }
462
483
  return transport;
463
484
  }
@@ -473,8 +494,8 @@ function openWsChannel(runId, config) {
473
494
  const resolved = resolveChannelUrl(runId, config);
474
495
  if (!resolved)
475
496
  return void 0;
476
- if (!loggedWsInUse) {
477
- loggedWsInUse = true;
497
+ if (!wsState.loggedWsInUse) {
498
+ wsState.loggedWsInUse = true;
478
499
  console.log(`world-vercel: using ws events transport (${resolved}).`);
479
500
  }
480
501
  const transport = getWsEventsTransport(resolved, async ({ forceRefresh }) => {
@@ -501,13 +522,11 @@ async function refreshOidcTokenBestEffort() {
501
522
  } catch {
502
523
  }
503
524
  }
504
- let loggedWsProxyFallback = false;
505
- let loggedWsInUse = false;
506
525
  function resolveChannelUrl(runId, config) {
507
526
  const { baseUrl, usingProxy } = getHttpUrl(config);
508
527
  if (usingProxy) {
509
- if (!loggedWsProxyFallback) {
510
- loggedWsProxyFallback = true;
528
+ if (!wsState.loggedWsProxyFallback) {
529
+ wsState.loggedWsProxyFallback = true;
511
530
  console.warn(`world-vercel: ws events transport requested but a World with projectConfig (api-workflow proxy, resolved baseUrl: ${baseUrl}) is active — falling back.`);
512
531
  }
513
532
  return null;
@@ -518,7 +537,7 @@ function resolveWsTransport(runId, config) {
518
537
  const wsUrl = resolveChannelUrl(runId, config);
519
538
  if (!wsUrl)
520
539
  return null;
521
- const transport = transports.get(wsUrl);
540
+ const transport = wsState.transports.get(wsUrl);
522
541
  return transport ? { transport, wsUrl } : null;
523
542
  }
524
543
  export {
@@ -2,7 +2,7 @@ import { createRequire as __wkfCreateRequire } from "node:module";
2
2
  if (typeof require === "undefined") {
3
3
  globalThis.require = __wkfCreateRequire(import.meta.url);
4
4
  }
5
- import { aV as registerZstdDecoder } from "./app-SrggQnfh.js";
5
+ import { b1 as registerZstdDecoder } from "./app-wed_Qw3X.js";
6
6
  import "node:stream";
7
7
  import "stream";
8
8
  import "util";
@@ -21,16 +21,17 @@ import "node:fs";
21
21
  import "node:os";
22
22
  import "node:child_process";
23
23
  import "node:timers/promises";
24
+ import "node:buffer";
25
+ import "node:http";
26
+ import "node:https";
27
+ import "node:zlib";
24
28
  import "events";
25
29
  import "node:assert";
26
30
  import "node:net";
27
- import "node:http";
28
31
  import "node:querystring";
29
32
  import "node:events";
30
33
  import "node:diagnostics_channel";
31
34
  import "node:tls";
32
- import "node:buffer";
33
- import "node:zlib";
34
35
  import "node:perf_hooks";
35
36
  import "node:util/types";
36
37
  import "node:sqlite";
@@ -2,7 +2,7 @@ import { createRequire as __wkfCreateRequire } from "node:module";
2
2
  if (typeof require === "undefined") {
3
3
  globalThis.require = __wkfCreateRequire(import.meta.url);
4
4
  }
5
- import { bb, bc } from "./assets/app-SrggQnfh.js";
5
+ import { bl, bm } from "./assets/app-wed_Qw3X.js";
6
6
  import "express";
7
7
  import "node:stream";
8
8
  import "stream";
@@ -22,16 +22,17 @@ import "node:fs";
22
22
  import "node:os";
23
23
  import "node:child_process";
24
24
  import "node:timers/promises";
25
+ import "node:buffer";
26
+ import "node:http";
27
+ import "node:https";
28
+ import "node:zlib";
25
29
  import "events";
26
30
  import "node:assert";
27
31
  import "node:net";
28
- import "node:http";
29
32
  import "node:querystring";
30
33
  import "node:events";
31
34
  import "node:diagnostics_channel";
32
35
  import "node:tls";
33
- import "node:buffer";
34
- import "node:zlib";
35
36
  import "node:perf_hooks";
36
37
  import "node:util/types";
37
38
  import "node:sqlite";
@@ -47,6 +48,6 @@ import "os";
47
48
  import "net";
48
49
  import "node:assert/strict";
49
50
  export {
50
- bb as app,
51
- bc as createFetchHandler
51
+ bl as app,
52
+ bm as createFetchHandler
52
53
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@workflow/web",
3
3
  "description": "Workflow Observability UI",
4
- "version": "5.0.0-beta.42",
4
+ "version": "5.0.0-beta.44",
5
5
  "type": "module",
6
6
  "private": false,
7
7
  "files": [
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "express": "^5.2.1",
43
43
  "swr": "^2.3.6",
44
- "@workflow/world-local": "5.0.0-beta.36"
44
+ "@workflow/world-local": "5.0.0-beta.38"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@biomejs/biome": "^2.4.4",
@@ -86,12 +86,12 @@
86
86
  "typescript": "^6.0.3",
87
87
  "vite": "^6",
88
88
  "vitest": "^3.2.7",
89
- "@workflow/core": "5.0.0-beta.42",
90
- "@workflow/errors": "5.0.0-beta.17",
91
- "@workflow/utils": "5.0.0-beta.8",
92
- "@workflow/web-shared": "5.0.0-beta.42",
93
- "@workflow/world": "5.0.0-beta.27",
94
- "@workflow/world-vercel": "5.0.0-beta.38"
89
+ "@workflow/errors": "5.0.0-beta.18",
90
+ "@workflow/core": "5.0.0-beta.44",
91
+ "@workflow/utils": "5.0.0-beta.9",
92
+ "@workflow/web-shared": "5.0.0-beta.44",
93
+ "@workflow/world": "5.0.0-beta.29",
94
+ "@workflow/world-vercel": "5.0.0-beta.40"
95
95
  },
96
96
  "scripts": {
97
97
  "dev": "react-router dev",