@workflow/core 5.0.0-beta.5 → 5.0.0-beta.50

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 (310) hide show
  1. package/dist/attribute-changes.d.ts +5 -0
  2. package/dist/attribute-changes.d.ts.map +1 -0
  3. package/dist/attribute-changes.js +25 -0
  4. package/dist/capabilities.d.ts +35 -2
  5. package/dist/capabilities.d.ts.map +1 -1
  6. package/dist/capabilities.js +74 -5
  7. package/dist/capture-stack.d.ts +1 -1
  8. package/dist/capture-stack.js +2 -2
  9. package/dist/class-serialization.d.ts +32 -0
  10. package/dist/class-serialization.d.ts.map +1 -1
  11. package/dist/class-serialization.js +37 -1
  12. package/dist/classify-error.d.ts +19 -3
  13. package/dist/classify-error.d.ts.map +1 -1
  14. package/dist/classify-error.js +98 -6
  15. package/dist/context-violation-error.d.ts +5 -5
  16. package/dist/context-violation-error.d.ts.map +1 -1
  17. package/dist/context-violation-error.js +8 -6
  18. package/dist/create-hook.d.ts +72 -7
  19. package/dist/create-hook.d.ts.map +1 -1
  20. package/dist/create-hook.js +1 -1
  21. package/dist/define-hook.js +2 -2
  22. package/dist/describe-error.d.ts +7 -7
  23. package/dist/describe-error.d.ts.map +1 -1
  24. package/dist/describe-error.js +97 -12
  25. package/dist/encryption.d.ts +38 -4
  26. package/dist/encryption.d.ts.map +1 -1
  27. package/dist/encryption.js +96 -14
  28. package/dist/events-consumer.d.ts +271 -0
  29. package/dist/events-consumer.d.ts.map +1 -1
  30. package/dist/events-consumer.js +646 -42
  31. package/dist/flushable-stream.d.ts +56 -1
  32. package/dist/flushable-stream.d.ts.map +1 -1
  33. package/dist/flushable-stream.js +123 -11
  34. package/dist/global.d.ts +36 -2
  35. package/dist/global.d.ts.map +1 -1
  36. package/dist/global.js +21 -6
  37. package/dist/index.d.ts +2 -1
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +3 -2
  40. package/dist/log-format.d.ts +2 -2
  41. package/dist/log-format.js +7 -7
  42. package/dist/logger.d.ts +1 -0
  43. package/dist/logger.d.ts.map +1 -1
  44. package/dist/logger.js +10 -6
  45. package/dist/private.d.ts +226 -9
  46. package/dist/private.d.ts.map +1 -1
  47. package/dist/private.js +626 -7
  48. package/dist/replay-payload-cache.d.ts +64 -0
  49. package/dist/replay-payload-cache.d.ts.map +1 -0
  50. package/dist/replay-payload-cache.js +158 -0
  51. package/dist/runtime/compute-instance.d.ts +13 -0
  52. package/dist/runtime/compute-instance.d.ts.map +1 -0
  53. package/dist/runtime/compute-instance.js +14 -0
  54. package/dist/runtime/constants.d.ts +315 -0
  55. package/dist/runtime/constants.d.ts.map +1 -1
  56. package/dist/runtime/constants.js +502 -16
  57. package/dist/runtime/count-step-started-events.d.ts +52 -0
  58. package/dist/runtime/count-step-started-events.d.ts.map +1 -0
  59. package/dist/runtime/count-step-started-events.js +72 -0
  60. package/dist/runtime/deployment-guard.d.ts +99 -0
  61. package/dist/runtime/deployment-guard.d.ts.map +1 -0
  62. package/dist/runtime/deployment-guard.js +154 -0
  63. package/dist/runtime/get-port-lazy.d.ts +15 -0
  64. package/dist/runtime/get-port-lazy.d.ts.map +1 -1
  65. package/dist/runtime/get-port-lazy.js +75 -6
  66. package/dist/runtime/get-world-lazy.d.ts +5 -14
  67. package/dist/runtime/get-world-lazy.d.ts.map +1 -1
  68. package/dist/runtime/get-world-lazy.js +19 -29
  69. package/dist/runtime/helpers.d.ts +341 -29
  70. package/dist/runtime/helpers.d.ts.map +1 -1
  71. package/dist/runtime/helpers.js +559 -57
  72. package/dist/runtime/quickjs-assets.generated.d.ts +14 -0
  73. package/dist/runtime/quickjs-assets.generated.d.ts.map +1 -0
  74. package/dist/runtime/quickjs-assets.generated.js +30 -0
  75. package/dist/runtime/quickjs-entrypoint.d.ts +136 -0
  76. package/dist/runtime/quickjs-entrypoint.d.ts.map +1 -0
  77. package/dist/runtime/quickjs-entrypoint.js +1686 -0
  78. package/dist/runtime/quickjs-runtime.d.ts +244 -0
  79. package/dist/runtime/quickjs-runtime.d.ts.map +1 -0
  80. package/dist/runtime/quickjs-runtime.js +2427 -0
  81. package/dist/runtime/quickjs-serde.d.ts +107 -0
  82. package/dist/runtime/quickjs-serde.d.ts.map +1 -0
  83. package/dist/runtime/quickjs-serde.js +2159 -0
  84. package/dist/runtime/replay-budget.d.ts +97 -0
  85. package/dist/runtime/replay-budget.d.ts.map +1 -0
  86. package/dist/runtime/replay-budget.js +139 -0
  87. package/dist/runtime/replay-recovery-reporter.d.ts +36 -0
  88. package/dist/runtime/replay-recovery-reporter.d.ts.map +1 -0
  89. package/dist/runtime/replay-recovery-reporter.js +64 -0
  90. package/dist/runtime/resume-hook.d.ts +91 -8
  91. package/dist/runtime/resume-hook.d.ts.map +1 -1
  92. package/dist/runtime/resume-hook.js +512 -89
  93. package/dist/runtime/resume-latency.d.ts +150 -0
  94. package/dist/runtime/resume-latency.d.ts.map +1 -0
  95. package/dist/runtime/resume-latency.js +155 -0
  96. package/dist/runtime/run-id-time.d.ts +19 -0
  97. package/dist/runtime/run-id-time.d.ts.map +1 -0
  98. package/dist/runtime/run-id-time.js +42 -0
  99. package/dist/runtime/run.d.ts +72 -7
  100. package/dist/runtime/run.d.ts.map +1 -1
  101. package/dist/runtime/run.js +280 -53
  102. package/dist/runtime/runs.d.ts +54 -3
  103. package/dist/runtime/runs.d.ts.map +1 -1
  104. package/dist/runtime/runs.js +126 -16
  105. package/dist/runtime/start.d.ts +101 -2
  106. package/dist/runtime/start.d.ts.map +1 -1
  107. package/dist/runtime/start.js +352 -61
  108. package/dist/runtime/step-executor.d.ts +205 -5
  109. package/dist/runtime/step-executor.d.ts.map +1 -1
  110. package/dist/runtime/step-executor.js +760 -127
  111. package/dist/runtime/step-latency.d.ts +220 -0
  112. package/dist/runtime/step-latency.d.ts.map +1 -0
  113. package/dist/runtime/step-latency.js +215 -0
  114. package/dist/runtime/step-ownership.d.ts +72 -0
  115. package/dist/runtime/step-ownership.d.ts.map +1 -0
  116. package/dist/runtime/step-ownership.js +114 -0
  117. package/dist/runtime/step-single-flight.d.ts +12 -0
  118. package/dist/runtime/step-single-flight.d.ts.map +1 -0
  119. package/dist/runtime/step-single-flight.js +75 -0
  120. package/dist/runtime/suspension-handler.d.ts +269 -7
  121. package/dist/runtime/suspension-handler.d.ts.map +1 -1
  122. package/dist/runtime/suspension-handler.js +1253 -125
  123. package/dist/runtime/unserializable-step.d.ts +34 -0
  124. package/dist/runtime/unserializable-step.d.ts.map +1 -0
  125. package/dist/runtime/unserializable-step.js +52 -0
  126. package/dist/runtime/vm-mode.d.ts +44 -0
  127. package/dist/runtime/vm-mode.d.ts.map +1 -0
  128. package/dist/runtime/vm-mode.js +62 -0
  129. package/dist/runtime/vm-serde-bundle.generated.d.ts +14 -0
  130. package/dist/runtime/vm-serde-bundle.generated.d.ts.map +1 -0
  131. package/dist/runtime/vm-serde-bundle.generated.js +16 -0
  132. package/dist/runtime/wait-continuation.d.ts +106 -0
  133. package/dist/runtime/wait-continuation.d.ts.map +1 -0
  134. package/dist/runtime/wait-continuation.js +136 -0
  135. package/dist/runtime/wait-until.d.ts +18 -0
  136. package/dist/runtime/wait-until.d.ts.map +1 -0
  137. package/dist/runtime/wait-until.js +42 -0
  138. package/dist/runtime/world-compatibility.d.ts +32 -0
  139. package/dist/runtime/world-compatibility.d.ts.map +1 -0
  140. package/dist/runtime/world-compatibility.js +44 -0
  141. package/dist/runtime/world-init.d.ts +17 -42
  142. package/dist/runtime/world-init.d.ts.map +1 -1
  143. package/dist/runtime/world-init.js +18 -43
  144. package/dist/runtime/world.d.ts +14 -2
  145. package/dist/runtime/world.d.ts.map +1 -1
  146. package/dist/runtime/world.js +75 -19
  147. package/dist/runtime.d.ts +10 -6
  148. package/dist/runtime.d.ts.map +1 -1
  149. package/dist/runtime.js +3741 -490
  150. package/dist/sealed-box.d.ts +167 -0
  151. package/dist/sealed-box.d.ts.map +1 -0
  152. package/dist/sealed-box.js +571 -0
  153. package/dist/serialization/client.d.ts +3 -3
  154. package/dist/serialization/client.d.ts.map +1 -1
  155. package/dist/serialization/client.js +8 -4
  156. package/dist/serialization/codec-devalue-vm.d.ts +16 -0
  157. package/dist/serialization/codec-devalue-vm.d.ts.map +1 -0
  158. package/dist/serialization/codec-devalue-vm.js +148 -0
  159. package/dist/serialization/codec-devalue.d.ts +1 -1
  160. package/dist/serialization/codec-devalue.d.ts.map +1 -1
  161. package/dist/serialization/codec-devalue.js +24 -6
  162. package/dist/serialization/codec.d.ts +37 -2
  163. package/dist/serialization/codec.d.ts.map +1 -1
  164. package/dist/serialization/codec.js +2 -2
  165. package/dist/serialization/compression.d.ts +105 -0
  166. package/dist/serialization/compression.d.ts.map +1 -0
  167. package/dist/serialization/compression.js +261 -0
  168. package/dist/serialization/encryption.d.ts +119 -17
  169. package/dist/serialization/encryption.d.ts.map +1 -1
  170. package/dist/serialization/encryption.js +152 -17
  171. package/dist/serialization/errors.d.ts +13 -0
  172. package/dist/serialization/errors.d.ts.map +1 -1
  173. package/dist/serialization/errors.js +20 -2
  174. package/dist/serialization/format.d.ts +6 -6
  175. package/dist/serialization/format.js +7 -7
  176. package/dist/serialization/hardened.d.ts +156 -0
  177. package/dist/serialization/hardened.d.ts.map +1 -0
  178. package/dist/serialization/hardened.js +538 -0
  179. package/dist/serialization/index.d.ts +10 -8
  180. package/dist/serialization/index.d.ts.map +1 -1
  181. package/dist/serialization/index.js +10 -8
  182. package/dist/serialization/reducers/class-vm.d.ts +20 -0
  183. package/dist/serialization/reducers/class-vm.d.ts.map +1 -0
  184. package/dist/serialization/reducers/class-vm.js +77 -0
  185. package/dist/serialization/reducers/class.d.ts.map +1 -1
  186. package/dist/serialization/reducers/class.js +11 -6
  187. package/dist/serialization/reducers/common-vm.d.ts +15 -0
  188. package/dist/serialization/reducers/common-vm.d.ts.map +1 -0
  189. package/dist/serialization/reducers/common-vm.js +616 -0
  190. package/dist/serialization/reducers/common.d.ts +1 -1
  191. package/dist/serialization/reducers/common.d.ts.map +1 -1
  192. package/dist/serialization/reducers/common.js +202 -62
  193. package/dist/serialization/reducers/step-function-vm.d.ts +44 -0
  194. package/dist/serialization/reducers/step-function-vm.d.ts.map +1 -0
  195. package/dist/serialization/reducers/step-function-vm.js +97 -0
  196. package/dist/serialization/reducers/step-function.d.ts.map +1 -1
  197. package/dist/serialization/reducers/step-function.js +25 -9
  198. package/dist/serialization/step.d.ts +4 -4
  199. package/dist/serialization/step.d.ts.map +1 -1
  200. package/dist/serialization/step.js +9 -5
  201. package/dist/serialization/types.d.ts +80 -1
  202. package/dist/serialization/types.d.ts.map +1 -1
  203. package/dist/serialization/types.js +15 -1
  204. package/dist/serialization/workflow-vm.d.ts +29 -0
  205. package/dist/serialization/workflow-vm.d.ts.map +1 -0
  206. package/dist/serialization/workflow-vm.js +74 -0
  207. package/dist/serialization-format.d.ts +64 -8
  208. package/dist/serialization-format.d.ts.map +1 -1
  209. package/dist/serialization-format.js +225 -73
  210. package/dist/serialization.d.ts +262 -34
  211. package/dist/serialization.d.ts.map +1 -1
  212. package/dist/serialization.js +1879 -274
  213. package/dist/set-attributes.d.ts +13 -0
  214. package/dist/set-attributes.d.ts.map +1 -0
  215. package/dist/set-attributes.js +60 -0
  216. package/dist/source-map.d.ts +25 -0
  217. package/dist/source-map.d.ts.map +1 -1
  218. package/dist/source-map.js +154 -10
  219. package/dist/step/context-storage.d.ts +61 -2
  220. package/dist/step/context-storage.d.ts.map +1 -1
  221. package/dist/step/context-storage.js +7 -5
  222. package/dist/step/writable-stream.d.ts +3 -3
  223. package/dist/step/writable-stream.d.ts.map +1 -1
  224. package/dist/step/writable-stream.js +72 -9
  225. package/dist/step.d.ts.map +1 -1
  226. package/dist/step.js +148 -27
  227. package/dist/symbols.d.ts +50 -0
  228. package/dist/symbols.d.ts.map +1 -1
  229. package/dist/symbols.js +51 -1
  230. package/dist/telemetry/semantic-conventions.d.ts +397 -2
  231. package/dist/telemetry/semantic-conventions.d.ts.map +1 -1
  232. package/dist/telemetry/semantic-conventions.js +297 -3
  233. package/dist/telemetry.d.ts +91 -0
  234. package/dist/telemetry.d.ts.map +1 -1
  235. package/dist/telemetry.js +244 -17
  236. package/dist/test-support/orchestrator-context.d.ts +25 -0
  237. package/dist/test-support/orchestrator-context.d.ts.map +1 -0
  238. package/dist/test-support/orchestrator-context.js +101 -0
  239. package/dist/types.d.ts +6 -0
  240. package/dist/types.d.ts.map +1 -1
  241. package/dist/types.js +23 -1
  242. package/dist/util.d.ts +0 -5
  243. package/dist/util.d.ts.map +1 -1
  244. package/dist/util.js +1 -15
  245. package/dist/version.d.ts +1 -1
  246. package/dist/version.d.ts.map +1 -1
  247. package/dist/version.js +2 -2
  248. package/dist/vm/index.d.ts.map +1 -1
  249. package/dist/vm/index.js +84 -14
  250. package/dist/vm/script-cache.d.ts +26 -0
  251. package/dist/vm/script-cache.d.ts.map +1 -0
  252. package/dist/vm/script-cache.js +131 -0
  253. package/dist/vm/uint8array-base64.js +1 -1
  254. package/dist/workflow/abort-controller.d.ts +2 -2
  255. package/dist/workflow/abort-controller.d.ts.map +1 -1
  256. package/dist/workflow/abort-controller.js +88 -21
  257. package/dist/workflow/attribute-dispatcher.d.ts +6 -0
  258. package/dist/workflow/attribute-dispatcher.d.ts.map +1 -0
  259. package/dist/workflow/attribute-dispatcher.js +45 -0
  260. package/dist/workflow/create-hook.d.ts.map +1 -1
  261. package/dist/workflow/create-hook.js +24 -3
  262. package/dist/workflow/get-workflow-metadata.js +2 -2
  263. package/dist/workflow/hook.d.ts.map +1 -1
  264. package/dist/workflow/hook.js +304 -47
  265. package/dist/workflow/index.d.ts +1 -0
  266. package/dist/workflow/index.d.ts.map +1 -1
  267. package/dist/workflow/index.js +2 -1
  268. package/dist/workflow/set-attributes.d.ts +68 -0
  269. package/dist/workflow/set-attributes.d.ts.map +1 -0
  270. package/dist/workflow/set-attributes.js +60 -0
  271. package/dist/workflow/sleep.d.ts.map +1 -1
  272. package/dist/workflow/sleep.js +58 -12
  273. package/dist/workflow/world-init-stub.d.ts +3 -3
  274. package/dist/workflow/world-init-stub.js +4 -4
  275. package/dist/workflow.d.ts +95 -3
  276. package/dist/workflow.d.ts.map +1 -1
  277. package/dist/workflow.js +895 -561
  278. package/docs/api-reference/create-hook.mdx +89 -10
  279. package/docs/api-reference/create-webhook.mdx +16 -15
  280. package/docs/api-reference/define-hook.mdx +35 -33
  281. package/docs/api-reference/fatal-error.mdx +30 -8
  282. package/docs/api-reference/fetch.mdx +14 -10
  283. package/docs/api-reference/get-step-metadata.mdx +2 -2
  284. package/docs/api-reference/get-workflow-metadata.mdx +3 -3
  285. package/docs/api-reference/get-writable.mdx +7 -7
  286. package/docs/api-reference/index.mdx +4 -1
  287. package/docs/api-reference/retryable-error.mdx +1 -1
  288. package/docs/api-reference/set-attributes.mdx +61 -0
  289. package/docs/api-reference/sleep.mdx +4 -4
  290. package/docs/foundations/cancellation.mdx +31 -32
  291. package/docs/foundations/errors-and-retries.mdx +42 -11
  292. package/docs/foundations/hooks.mdx +64 -35
  293. package/docs/foundations/idempotency.mdx +244 -12
  294. package/docs/foundations/index.mdx +1 -23
  295. package/docs/foundations/meta.json +2 -1
  296. package/docs/foundations/serialization.mdx +21 -22
  297. package/docs/foundations/starting-workflows.mdx +106 -30
  298. package/docs/foundations/streaming.mdx +107 -59
  299. package/docs/foundations/versioning.mdx +263 -0
  300. package/docs/foundations/workflows-and-steps.mdx +9 -9
  301. package/docs/how-it-works/cancellation.mdx +63 -63
  302. package/docs/how-it-works/code-transform.mdx +83 -67
  303. package/docs/how-it-works/encryption.mdx +30 -26
  304. package/docs/how-it-works/event-sourcing.mdx +98 -34
  305. package/docs/how-it-works/framework-integrations.mdx +96 -337
  306. package/docs/how-it-works/understanding-directives.mdx +22 -22
  307. package/package.json +24 -15
  308. package/dist/runtime/step-handler.d.ts +0 -2
  309. package/dist/runtime/step-handler.d.ts.map +0 -1
  310. package/dist/runtime/step-handler.js +0 -776
@@ -9,48 +9,38 @@
9
9
  *
10
10
  * Resolution order, in priority:
11
11
  *
12
- * 1. `globalThis[WorldCacheKey]` populated by a successful prior
12
+ * 1. `globalThis[WorldCacheKey]`: populated by a successful prior
13
13
  * `getWorld()` call. This is the steady-state hot path.
14
- * 2. `globalThis[GetWorldFnKey]` populated by the module-load side
14
+ * 2. `globalThis[GetWorldFnKey]`: populated by the module-load side
15
15
  * effect at the bottom of `./world.ts`. Fires on every server bundle
16
- * that reaches this file via `workflow/api` (which imports
16
+ * that reaches this file via `workflow` or `workflow/api` (which import
17
17
  * `./world-init.ts` for its side effect; see that file for the full
18
- * rationale). This is the cold-start path for routes that consume
19
- * `start` without any prior workflow run.
20
- * 3. Dynamic `import('./world.js')` — last-resort fallback for
21
- * environments where neither (1) nor (2) is available (CJS test
22
- * runners, scripts that import deeply into `@workflow/core` without
23
- * going through `workflow/api`, future bundlers we haven't validated).
24
- * The specifier is built at runtime so esbuild can't trace it into
25
- * step bundles. Note: this branch is unreliable in webpack-bundled
26
- * routes because webpack inlines this module into the route file and
27
- * the relative path resolves against the bundle location — paths (1)
28
- * and (2) cover those cases instead.
18
+ * rationale). This is the cold-start path for routes that consume host
19
+ * helpers without any prior workflow run.
29
20
  */
21
+ import { assertWorldSupportsRuntimeProtocol } from './world-compatibility.js';
30
22
  const WorldCacheKey = Symbol.for('@workflow/world//cache');
31
23
  const WorldCachePromiseKey = Symbol.for('@workflow/world//cachePromise');
32
24
  const GetWorldFnKey = Symbol.for('@workflow/world//getWorldFn');
33
25
  export async function getWorldLazy() {
34
26
  const g = globalThis;
35
- if (g[WorldCacheKey])
27
+ if (g[WorldCacheKey]) {
28
+ assertWorldSupportsRuntimeProtocol(g[WorldCacheKey]);
36
29
  return g[WorldCacheKey];
30
+ }
37
31
  if (g[WorldCachePromiseKey]) {
38
32
  g[WorldCacheKey] = await g[WorldCachePromiseKey];
33
+ assertWorldSupportsRuntimeProtocol(g[WorldCacheKey]);
39
34
  return g[WorldCacheKey];
40
35
  }
41
- // If world.ts is statically present in this bundle, it has registered
42
- // getWorld on globalThis at module load. Prefer that over the dynamic
43
- // import fallback, which doesn't survive Next.js inlining get-world-lazy
44
- // into a route bundle (the relative './world.js' resolves against the
45
- // bundled location, where no sibling world.js exists).
36
+ // world-init statically imports world.ts in host bundles, which registers
37
+ // getWorld on globalThis at module load.
46
38
  const getWorldFn = g[GetWorldFnKey];
47
- if (getWorldFn)
48
- return getWorldFn();
49
- // Last resort: dynamic import for environments where world.ts wasn't
50
- // bundled but is reachable as a sibling module on disk. The specifier is
51
- // built at runtime so esbuild can't trace it into the step bundle.
52
- const worldPath = ['./world', 'js'].join('.');
53
- const { getWorld } = await import(worldPath);
54
- return getWorld();
39
+ if (getWorldFn) {
40
+ const world = await getWorldFn();
41
+ assertWorldSupportsRuntimeProtocol(world);
42
+ return world;
43
+ }
44
+ throw new Error('Workflow world runtime was not initialized. Import from the host workflow entrypoints (`workflow`, `workflow/api`, or `workflow/runtime`) so @workflow/core/runtime/world-init can register getWorld before getWorldLazy() is used.');
55
45
  }
56
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LXdvcmxkLWxhenkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcnVudGltZS9nZXQtd29ybGQtbGF6eS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQTRCRztBQUlILE1BQU0sYUFBYSxHQUFHLE1BQU0sQ0FBQyxHQUFHLENBQUMsd0JBQXdCLENBQUMsQ0FBQztBQUMzRCxNQUFNLG9CQUFvQixHQUFHLE1BQU0sQ0FBQyxHQUFHLENBQUMsK0JBQStCLENBQUMsQ0FBQztBQUN6RSxNQUFNLGFBQWEsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDLDZCQUE2QixDQUFDLENBQUM7QUFFaEUsTUFBTSxDQUFDLEtBQUssVUFBVSxZQUFZO0lBQ2hDLE1BQU0sQ0F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
1
- import type { Event, HealthCheckPayload, ValidQueueName, WorkflowRun, World } from '@workflow/world';
2
- import { type CryptoKey } from '../encryption.js';
1
+ import type { CreateEventParams, CreateEventRequest, Event, EventResult, HealthCheckPayload, ValidQueueName, WorkflowRun, World } from '@workflow/world';
2
+ import { type PayloadKey } from '../serialization/encryption.js';
3
3
  /**
4
4
  * Validates a workflow name and returns the corresponding queue name.
5
5
  * Ensures the workflow name only contains safe characters before
6
6
  * interpolating it into the queue name string.
7
7
  */
8
- export declare function getWorkflowQueueName(workflowName: string): ValidQueueName;
8
+ export declare function getWorkflowQueueName(workflowName: string, namespace?: string): ValidQueueName;
9
9
  /**
10
10
  * Result of a health check operation.
11
11
  */
@@ -17,6 +17,35 @@ export interface HealthCheckResult {
17
17
  latencyMs?: number;
18
18
  /** Spec version of the responding deployment */
19
19
  specVersion?: number;
20
+ /**
21
+ * `@workflow/core` version of the responding deployment, used for
22
+ * capability detection (see `getRunCapabilities`). Omitted when the
23
+ * responding deployment did not provide the field as a string:
24
+ * for example, an older `@workflow/core` that predates this field,
25
+ * or a non-JSON plain-text health response.
26
+ */
27
+ workflowCoreVersion?: string;
28
+ /**
29
+ * The target run's X25519 public key (base64), returned only when the probe
30
+ * carried a `runId` and the responding deployment has encryption enabled.
31
+ *
32
+ * Lets a cross-deployment `start()` seal the workflow arguments using a
33
+ * response it was already waiting on, instead of making a separate
34
+ * key-lookup request.
35
+ */
36
+ encryptionPublicKey?: string;
37
+ /**
38
+ * The responding deployment's `HOOK_RESUME_INPUT_VERSION`: the protocol
39
+ * version at which the *consumer* (queue-message target) materializes the
40
+ * `hook_received` event from `hookInput` on replay. A cross-deployment
41
+ * `start()` stamps the *target's* value (not the caller's) into the new
42
+ * run's `executionContext.hookResumeInputVersion`. Current producers write
43
+ * the event durably before publishing the wake and do not read the marker;
44
+ * OLDER producers still gate their lazy path on it, so it keeps being
45
+ * stamped. Omitted when the responding deployment predates this field,
46
+ * which fails that gate closed.
47
+ */
48
+ hookResumeInputVersion?: number;
20
49
  }
21
50
  /**
22
51
  * Checks if the given message is a health check payload.
@@ -28,17 +57,62 @@ export declare function parseHealthCheckPayload(message: unknown): HealthCheckPa
28
57
  * The caller can listen to this stream to get the health check response.
29
58
  *
30
59
  * @param healthCheck - The parsed health check payload
31
- * @param endpoint - Which endpoint is responding ('workflow' or 'step')
32
60
  */
33
- export declare function handleHealthCheckMessage(healthCheck: HealthCheckPayload, endpoint: 'workflow' | 'step', worldSpecVersion?: number): Promise<void>;
34
- export type HealthCheckEndpoint = 'workflow' | 'step';
61
+ export declare function handleHealthCheckMessage(healthCheck: HealthCheckPayload, worldSpecVersion?: number): Promise<void>;
35
62
  export interface HealthCheckOptions {
36
63
  /** Timeout in milliseconds to wait for health check response. Default: 30000 (30s) */
37
64
  timeout?: number;
38
65
  /** Deployment ID to send the health check to. Falls back to process.env.VERCEL_DEPLOYMENT_ID. */
39
66
  deploymentId?: string;
67
+ /**
68
+ * The run id the caller is about to create. When set, the responding
69
+ * deployment derives that run's public key locally and returns it as
70
+ * `encryptionPublicKey`, letting a cross-deployment `start()` seal the
71
+ * workflow arguments without a separate key lookup.
72
+ */
73
+ runId?: string;
74
+ /**
75
+ * Queue namespace of the target deployment (e.g. `'eve'` for topics like
76
+ * `__eve_wkf_workflow_*`). Falls back to `WORKFLOW_QUEUE_NAMESPACE` in the
77
+ * calling process. Cross-context callers (e.g. the observability
78
+ * dashboard) must pass the target deployment's namespace explicitly:
79
+ * the env fallback resolves in the caller's process, and a message
80
+ * published to a mismatched topic has no consumer, so the check would
81
+ * always time out.
82
+ */
83
+ namespace?: string;
40
84
  }
41
- export declare function healthCheck(world: World, endpoint: HealthCheckEndpoint, options?: HealthCheckOptions): Promise<HealthCheckResult>;
85
+ export declare function healthCheck(world: World, options?: HealthCheckOptions): Promise<HealthCheckResult>;
86
+ /**
87
+ * Appends events whose IDs are not already present in `target`.
88
+ *
89
+ * Pass the IDs currently present in `target` when appending repeatedly to the
90
+ * same array. The set is updated alongside `target`.
91
+ *
92
+ * Events are appended in the order the World returned them, and are not
93
+ * re-sorted. Every append source is already in canonical order relative to the
94
+ * tail (a cursor-delimited page, or a write-response delta), so receipt order is
95
+ * the order to keep, and re-sorting here would only cost a pass over the log.
96
+ * Nothing downstream may assume the tail is the newest event. See
97
+ * {@link maxEventSlot}.
98
+ */
99
+ export declare function appendUniqueEvents(target: Event[], events: readonly Event[], targetIds?: Set<string>): void;
100
+ /**
101
+ * Inserts `event` into `target` at the position that keeps `target` ordered by
102
+ * ascending `eventId`, or no-ops if an event with the same `eventId` is already
103
+ * present (idempotent).
104
+ *
105
+ * `preloadedEvents` is loaded `sortOrder: 'asc'` and is never re-sorted
106
+ * client-side, so a `hook_received` spliced in by the lazy-resume consumer must
107
+ * land in `eventId` order: a plain `push` would place a late-committing
108
+ * earlier event after events that sort before it, corrupting replay.
109
+ *
110
+ * Lexicographic string order is the log's order: a slot id is a fixed-width
111
+ * zero-padded position, so comparing the strings compares the positions. This
112
+ * needs no parse of its own for that reason, and the comparison is exact rather
113
+ * than a reconstruction.
114
+ */
115
+ export declare function insertEventByEventId(target: Event[], event: Event): void;
42
116
  /**
43
117
  * Loads workflow run events by iterating through all pages of paginated
44
118
  * results. Events are returned in chronological (ascending) order for
@@ -50,15 +124,264 @@ export declare function healthCheck(world: World, endpoint: HealthCheckEndpoint,
50
124
  * The returned cursor can be passed back in on a subsequent call for
51
125
  * incremental loading.
52
126
  */
53
- export declare function loadWorkflowRunEvents(runId: string, afterCursor?: string): Promise<{
127
+ export declare function loadWorkflowRunEvents(runId: string, afterCursor?: string): Promise<LoadedEventLog>;
128
+ /**
129
+ * The runtime's loaded event-log snapshot: the events replayed so far and the
130
+ * cursor positioned after them. Handed to helpers that derive the precondition
131
+ * snapshot from it; they do not mutate it.
132
+ */
133
+ export interface LoadedEventLog {
54
134
  events: Event[];
55
135
  cursor: string | null;
136
+ }
137
+ /**
138
+ * Extend a loaded log with a page that continues it — a listed page, or the
139
+ * inline delta a write handed back — and move its read position with it.
140
+ *
141
+ * The cursor is only advanced when the page carries one, so a source with no
142
+ * position of its own (a skipped-slot report) cannot walk the read position
143
+ * past events it did not carry. Appending does not re-sort; see
144
+ * {@link appendUniqueEvents} for why receipt order is the order to keep.
145
+ */
146
+ export declare function appendEventLog(log: LoadedEventLog, appended: {
147
+ events: readonly Event[];
148
+ cursor?: string | null;
149
+ }): void;
150
+ /**
151
+ * Whether a replay refuses to run over a log with a hole in it (see
152
+ * {@link findEventSlotGap}). **On by default**; set
153
+ * `WORKFLOW_SLOT_GAP_CHECK=0` to replay across holes instead.
154
+ *
155
+ * A World that allocates a position at the moment it commits leaves no hole
156
+ * behind when a write fails, so density is a property the log has by
157
+ * construction rather than one this check maintains. What the check is for is
158
+ * the reads and the Worlds where that does not hold, and by the time it runs
159
+ * the benign explanations are spent: a position missing because a concurrent
160
+ * commit is not visible yet clears on a re-read, which is what
161
+ * {@link settleEventSlotGap} does first.
162
+ *
163
+ * What is left is a hole that persists, and its two causes are
164
+ * indistinguishable from the log. Either a World allocated the position outside
165
+ * the commit and lost the write, in which case nothing happened there and
166
+ * replaying past it is correct, or an event that did happen is missing, in
167
+ * which case replaying past it decides a branch on absence and produces a wrong
168
+ * result with nothing to show for it. Failing is the recoverable side of that
169
+ * trade, and this is the way back out if a fleet turns out to carry holes of
170
+ * the first kind.
171
+ */
172
+ export declare function isSlotGapCheckEnabled(): boolean;
173
+ /**
174
+ * Merge the events a bump-and-report write handed back into the log it was
175
+ * derived from, and answer how many of them were new.
176
+ *
177
+ * Unlike {@link appendUniqueEvents}, this re-sorts. The reported events occupy
178
+ * slots *below* the write that reported them, so appending them would put them
179
+ * after events they precede. Sorting by id restores the World's canonical order
180
+ * rather than guessing at it: a slot id is that order, written down.
181
+ */
182
+ export declare function mergeReportedEvents(target: Event[], events: readonly Event[]): number;
183
+ /** What {@link absorbSkippedSlotReport} did with a write's report. */
184
+ export interface SkippedSlotReport {
185
+ /** How many of the reported events were new to the log. Zero if dropped. */
186
+ added: number;
187
+ /** How many events the report offered, whether or not they were taken. */
188
+ offered: number;
189
+ /** The report was truncated, so it was dropped whole instead of merged. */
190
+ truncated: boolean;
191
+ }
192
+ /**
193
+ * Apply a write's skipped-slot report to the log it was derived from, deciding
194
+ * whether the report may be taken at all.
195
+ *
196
+ * Every replay-context write can come back carrying the events on the slots it
197
+ * skipped over, and every caller wants the same thing from them: fold them in
198
+ * so the writes that follow name a position above them, and so the replay
199
+ * resuming from this log sees them without a reload.
200
+ *
201
+ * The one policy is that a **truncated report is dropped whole**. It covers a
202
+ * span of positions but carries only some of the events on them, so merging it
203
+ * would raise the log's highest position past a position whose event is
204
+ * missing. Later writes read that maximum to say what they have seen, so each
205
+ * would claim a position it never saw, and the World only reports the span a
206
+ * write skips: it would never send the missing one. Dropping costs one more
207
+ * round of the same events on the next write and keeps the log a prefix of the
208
+ * truth, which the note above {@link mergeReportedEvents} explains is always an
209
+ * available answer.
210
+ *
211
+ * Callers that log do so from the returned counts; the decision is not theirs
212
+ * to re-derive.
213
+ */
214
+ export declare function absorbSkippedSlotReport(target: Event[], result: {
215
+ events?: readonly Event[];
216
+ hasMore?: boolean;
217
+ }): SkippedSlotReport;
218
+ /**
219
+ * The highest slot the loaded log occupies, or `undefined` for an empty log.
220
+ *
221
+ * The maximum, not the count, and the two are not interchangeable even though
222
+ * a healthy log makes them equal. A World hands a position to the insert that
223
+ * occupies it, so a write that never lands leaves no hole behind and the log
224
+ * stays dense. What the count cannot survive is a *partial* read: a log
225
+ * assembled from a truncated report, or read while a concurrent write is
226
+ * committing, holds fewer events than its highest position. Counting those
227
+ * would make the next write claim to have seen less than it has, so the World
228
+ * would report the same events back to it on every attempt.
229
+ *
230
+ * A hole below the maximum is therefore a property of the read, not of the log,
231
+ * which is what lets {@link settleEventSlotGap} re-read instead of giving up.
232
+ *
233
+ * @throws if any event id carries no slot. Every World the runtime replays
234
+ * against numbers events by slot, so an id that does not is a broken log rather
235
+ * than an older one, and a maximum derived by skipping it would understate the
236
+ * log to every write that reads it.
237
+ */
238
+ export declare function maxEventSlot(events: readonly Event[]): number | undefined;
239
+ /** A position the log skips over, described well enough to name in an error. */
240
+ export interface EventSlotGap {
241
+ /** The lowest slot below the log's maximum that no event occupies. */
242
+ firstMissingSlot: number;
243
+ /** How many slots below the maximum no event occupies. */
244
+ missingCount: number;
245
+ /** The highest slot the log occupies. */
246
+ maxSlot: number;
247
+ }
248
+ /**
249
+ * The hole in a loaded log, or `undefined` when there is none to find.
250
+ *
251
+ * The World allocates every position, so a log that holds `n` events below slot
252
+ * `n` is missing one. That matters before a replay
253
+ * and nowhere else: the replay reads the log as the complete record of what has
254
+ * happened, and an absent position is indistinguishable from an event that
255
+ * never occurred. The branch it would have decided gets decided the other way,
256
+ * and the run diverges quietly rather than failing.
257
+ *
258
+ * Order-independent, unlike the equivalent audit the World runs over a page it
259
+ * just read. A loaded log is assembled from listed pages plus whatever a
260
+ * bump-and-report write handed back, and while {@link mergeReportedEvents}
261
+ * restores id order, a check that can fail a healthy run should not depend on
262
+ * that having happened.
263
+ *
264
+ * The first slot is never counted. It belongs to `run_created`, which `start()`
265
+ * posts concurrently with the queue send, so a log read in that window
266
+ * legitimately begins at the second slot and fills in on its own. Every replay
267
+ * that races a run's own start would otherwise report a hole.
268
+ *
269
+ * Returns `undefined` for an empty log, which has no density to check.
270
+ *
271
+ * @throws if any event id carries no slot, for the reason {@link maxEventSlot}
272
+ * gives.
273
+ */
274
+ export declare function findEventSlotGap(events: readonly Event[]): EventSlotGap | undefined;
275
+ /**
276
+ * How many times a detected hole is re-read before the log is taken at its
277
+ * word, and the backoff before each re-read (doubling per attempt).
278
+ *
279
+ * A hole can be transient. The World allocates a slot inside the insert that
280
+ * occupies it, so two concurrent writers can collide, one retry past the other,
281
+ * and the higher slot commit first, leaving a window in which the lower one is
282
+ * genuinely absent from a strongly-consistent read and fills in a moment later.
283
+ * The window is one commit wide, so a short backoff clears it; anything that
284
+ * survives all three re-reads is a position no write will ever occupy.
285
+ */
286
+ export declare const SLOT_GAP_RECHECK_ATTEMPTS = 3;
287
+ /**
288
+ * Re-read a log that looks holey until the hole fills in or the re-reads run
289
+ * out, and return the settled log alongside the hole that survived.
290
+ *
291
+ * Reads are strongly consistent, so a hole is not an artifact of *when* the log
292
+ * was read, but it can be an artifact of a write that had not committed yet
293
+ * (see {@link SLOT_GAP_RECHECK_ATTEMPTS}). Distinguishing the two costs a
294
+ * re-read, which is only ever paid by a replay that already found a hole.
295
+ *
296
+ * The reload is full rather than incremental: the missing position is below the
297
+ * log's maximum, so a cursor-anchored read starts past it and can never see it
298
+ * arrive.
299
+ */
300
+ export declare function settleEventSlotGap(runId: string, loaded: LoadedEventLog): Promise<{
301
+ log: LoadedEventLog;
302
+ gap: EventSlotGap | undefined;
56
303
  }>;
304
+ /**
305
+ * How much of its run's log a replay-context event creation had loaded when it
306
+ * decided to write, as the highest slot that log occupies.
307
+ *
308
+ * One integer says it because the World keeps its positions dense: a writer
309
+ * that names slot N is claiming to hold every event from 1 to N and nothing
310
+ * above. The World answers by numbering the write above whatever the log has
311
+ * actually reached and handing back the events on the slots in between: the
312
+ * ones this writer decided without.
313
+ *
314
+ * Density is the World's invariant, not a claim about this particular read. A
315
+ * reader that is short of a position it holds no event for names a lower N,
316
+ * which understates what it has seen and only costs it a wider report. Naming
317
+ * a position it cannot account for is the direction that is unsafe, which is
318
+ * why {@link slotSnapshotParams} takes the maximum rather than the count.
319
+ *
320
+ * Its own object rather than a bare number so a call site cannot half-send it,
321
+ * and so the empty case spreads to nothing.
322
+ */
323
+ export interface SlotSnapshotParams {
324
+ eventCount?: number;
325
+ }
326
+ /**
327
+ * Build the slot snapshot to attach to a replay-context event creation.
328
+ *
329
+ * Empty for an empty log, which is the state a `run_created` write is issued
330
+ * from: there is no position held yet to name.
331
+ *
332
+ * The maximum rather than the length, for the reason {@link maxEventSlot}
333
+ * gives: a partially-read log holds fewer events than its highest position, and
334
+ * counting those would make the write claim to have seen less than it has, so
335
+ * the World would report the same events back on every attempt.
336
+ */
337
+ export declare function slotSnapshotParams(events: readonly Event[]): SlotSnapshotParams;
338
+ /**
339
+ * The events a rejecting World attached to a `PreconditionFailedError`, when it
340
+ * returned the ones the client's snapshot was missing inline.
341
+ *
342
+ * Returns `null` for anything else: no details, a World that did not implement
343
+ * this, or a payload that does not narrow cleanly. Callers fall back to
344
+ * reloading the event log, which is always correct; this is untrusted-shaped
345
+ * data on a failure path, so nothing here is repaired.
346
+ *
347
+ * `runId` is the caller's run. Every event must belong to it: the delta is
348
+ * merged straight into the replay's log, and one foreign event there is a
349
+ * corrupt log rather than a corrected one: the replay would consume a
350
+ * correlation id for an event that does not exist on this run.
351
+ */
352
+ export declare function preconditionEventDelta(error: unknown, runId: string): {
353
+ events: Event[];
354
+ cursor: string | null;
355
+ } | null;
356
+ /** Creates one event on a bound run, carrying replay-recovery telemetry. */
357
+ export type EventCreator = (data: CreateEventRequest, params?: CreateEventParams) => Promise<EventResult>;
57
358
  /**
58
359
  * Wraps a request/response handler and adds a health check "mode"
59
360
  * based on the presence of a `__health` query parameter.
60
361
  */
61
362
  export declare function withHealthCheck(handler: (req: Request) => Promise<Response>, worldSpecVersion?: number): (req: Request) => Promise<Response>;
363
+ /**
364
+ * Idempotency key for a step's background-dispatch queue message, scoped to
365
+ * the step's IDENTITY, correlation id plus (hashed) step name, rather than
366
+ * the bare correlation id.
367
+ *
368
+ * The scoping matters for resilient step dispatch under the precondition
369
+ * guard: a guard-rejected `step_created` leaves its (revoked) step message in
370
+ * flight, and the corrected replay may re-derive the same correlation id for
371
+ * a DIFFERENT step. Under a bare-correlationId key the corrected replay's
372
+ * dispatch would silently dedupe against the revoked in-flight message,
373
+ * which then resolves `skipped` against the re-created entity (the server's
374
+ * stepName fence rejects its bare start), and the legitimate step would
375
+ * never be executed. Scoping by step name keeps every dedup property that
376
+ * matters (crash recovery re-dispatch, concurrent handlers, the delayed
377
+ * retry sharing the suspension re-dispatch's key: all name the same step)
378
+ * while letting the corrected schedule's dispatch through.
379
+ *
380
+ * Every producer of a step-dispatch (or step-retry) message must use this
381
+ * key. Cross-version mixing is not a concern: queue messages are pinned to
382
+ * the deployment that produced them, so one run never sees two key schemes.
383
+ */
384
+ export declare function stepDispatchIdempotencyKey(correlationId: string, stepName: string): string;
62
385
  /**
63
386
  * Queues a message to the specified queue with tracing.
64
387
  */
@@ -72,26 +395,15 @@ export declare function getQueueOverhead(message: {
72
395
  [k: string]: number;
73
396
  } | undefined;
74
397
  /**
75
- * Returns a memoized accessor for the per-run AES-256 encryption key.
76
- *
77
- * The first call resolves the key via `world.getEncryptionKeyForRun` (which
78
- * may do HKDF derivation locally on Vercel, or a network fetch from
79
- * external contexts) and imports it as a `CryptoKey`; subsequent calls
80
- * await the same cached promise. If the world doesn't support encryption
81
- * or the run has no key configured, the cached value is `undefined`.
82
- *
83
- * Used by step / workflow handlers to defer the (potentially expensive)
84
- * key fetch until the first code path that actually needs it — typically
85
- * input hydration on the success path, or error dehydration on a failure
86
- * path. Both paths can race-call the accessor without triggering duplicate
87
- * fetches.
88
- *
89
- * Errors thrown by `getEncryptionKeyForRun` propagate to every caller
90
- * (the cached promise rejects). This is intentional: when encryption is
91
- * configured, we never want to silently fall back to plaintext
92
- * serialization. A propagated error in an event-emission path leaves the
93
- * outer try/catch to log and surface the issue; the queue's redelivery
94
- * semantics will retry the key fetch on the next attempt.
398
+ * Resolve the run's full payload-encryption capability. This includes the
399
+ * symmetric key and X25519 keypair needed to open cross-run sealed payloads.
400
+ * Missing world support or key material resolves to `undefined`; lookup and
401
+ * derivation failures propagate rather than silently falling back to plaintext.
402
+ */
403
+ export declare function resolveRunEncryptionKey(world: World, runOrId: WorkflowRun | string, context?: Record<string, unknown>): Promise<PayloadKey | undefined>;
404
+ /**
405
+ * Return a lazy, memoized accessor around {@link resolveRunEncryptionKey}.
406
+ * Concurrent callers share the same promise, including its rejection.
95
407
  */
96
- export declare function memoizeEncryptionKey(world: World, runOrId: WorkflowRun | string): () => Promise<CryptoKey | undefined>;
408
+ export declare function memoizeEncryptionKey(world: World, runOrId: WorkflowRun | string): () => Promise<PayloadKey | undefined>;
97
409
  //# sourceMappingURL=helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/runtime/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,KAAK,EACN,MAAM,iBAAiB,CAAC;AAQzB,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,kBAAkB,CAAC;AAiB7D;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc,CAOzE;AAWD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,OAAO,GACf,kBAAkB,GAAG,SAAS,CAMhC;AAYD;;;;;;GAMG;AACH,wBAAsB,wBAAwB,CAC5C,WAAW,EAAE,kBAAkB,EAC/B,QAAQ,EAAE,UAAU,GAAG,MAAM,EAC7B,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,CAAC,IAAI,CAAC,CAgBf;AAED,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,MAAM,CAAC;AAEtD,MAAM,WAAW,kBAAkB;IACjC,sFAAsF;IACtF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iGAAiG;IACjG,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAoGD,wBAAsB,WAAW,CAC/B,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,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