@nwire/forge 0.9.2 → 0.10.0

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 (291) hide show
  1. package/README.md +133 -155
  2. package/dist/foundation.d.ts +0 -13
  3. package/dist/foundation.js +2 -13
  4. package/dist/framework-events.d.ts +51 -54
  5. package/dist/framework-events.js +18 -65
  6. package/dist/{cli-runner.d.ts → helpers/cli-runner.d.ts} +2 -3
  7. package/dist/{cli-runner.js → helpers/cli-runner.js} +11 -27
  8. package/dist/{public-marker.d.ts → helpers/public-marker.d.ts} +0 -1
  9. package/dist/{public-marker.js → helpers/public-marker.js} +0 -1
  10. package/dist/{response.d.ts → helpers/response.d.ts} +0 -1
  11. package/dist/{response.js → helpers/response.js} +0 -1
  12. package/dist/helpers/retry-helpers.d.ts +22 -0
  13. package/dist/helpers/retry-helpers.js +43 -0
  14. package/dist/{validate.d.ts → helpers/validate.d.ts} +0 -1
  15. package/dist/{validate.js → helpers/validate.js} +0 -1
  16. package/dist/index.d.ts +42 -48
  17. package/dist/index.js +47 -55
  18. package/dist/{event-message.d.ts → messages/event-message.d.ts} +0 -1
  19. package/dist/{event-message.js → messages/event-message.js} +0 -1
  20. package/dist/{dev-logger.d.ts → observability/dev-logger.d.ts} +2 -2
  21. package/dist/{dev-logger.js → observability/dev-logger.js} +0 -30
  22. package/dist/{define-action.d.ts → primitives/define-action.d.ts} +0 -1
  23. package/dist/{define-action.js → primitives/define-action.js} +0 -1
  24. package/dist/{define-actor.d.ts → primitives/define-actor.d.ts} +0 -1
  25. package/dist/{define-actor.js → primitives/define-actor.js} +0 -1
  26. package/dist/{define-cron.d.ts → primitives/define-cron.d.ts} +0 -1
  27. package/dist/{define-cron.js → primitives/define-cron.js} +0 -1
  28. package/dist/{define-error.d.ts → primitives/define-error.d.ts} +0 -1
  29. package/dist/{define-error.js → primitives/define-error.js} +0 -1
  30. package/dist/{define-external-call.d.ts → primitives/define-external-call.d.ts} +0 -1
  31. package/dist/{define-external-call.js → primitives/define-external-call.js} +0 -1
  32. package/dist/{define-handler.d.ts → primitives/define-handler.d.ts} +29 -2
  33. package/dist/{define-handler.js → primitives/define-handler.js} +13 -2
  34. package/dist/{define-inbound-webhook.d.ts → primitives/define-inbound-webhook.d.ts} +1 -2
  35. package/dist/{define-inbound-webhook.js → primitives/define-inbound-webhook.js} +1 -2
  36. package/dist/{define-inbox.d.ts → primitives/define-inbox.d.ts} +0 -1
  37. package/dist/{define-inbox.js → primitives/define-inbox.js} +0 -1
  38. package/dist/{define-outbox.d.ts → primitives/define-outbox.d.ts} +0 -1
  39. package/dist/{define-outbox.js → primitives/define-outbox.js} +0 -1
  40. package/dist/{define-projection.d.ts → primitives/define-projection.d.ts} +0 -1
  41. package/dist/{define-projection.js → primitives/define-projection.js} +0 -1
  42. package/dist/{define-query.d.ts → primitives/define-query.d.ts} +1 -2
  43. package/dist/{define-query.js → primitives/define-query.js} +1 -2
  44. package/dist/{define-schema.d.ts → primitives/define-schema.d.ts} +1 -2
  45. package/dist/{define-schema.js → primitives/define-schema.js} +1 -2
  46. package/dist/{define-upcaster.d.ts → primitives/define-upcaster.d.ts} +0 -1
  47. package/dist/{define-upcaster.js → primitives/define-upcaster.js} +0 -1
  48. package/dist/{define-workflow.d.ts → primitives/define-workflow.d.ts} +2 -3
  49. package/dist/{define-workflow.js → primitives/define-workflow.js} +2 -3
  50. package/dist/runtime/create-forge-app.d.ts +64 -0
  51. package/dist/runtime/create-forge-app.js +78 -0
  52. package/dist/runtime/forge-dispatcher.d.ts +148 -0
  53. package/dist/{runtime.js → runtime/forge-dispatcher.js} +242 -571
  54. package/dist/runtime/forge-plugin.d.ts +59 -0
  55. package/dist/runtime/forge-plugin.js +121 -0
  56. package/dist/runtime/forge-types.d.ts +204 -0
  57. package/dist/runtime/forge-types.js +5 -0
  58. package/dist/{actor-store.d.ts → stores/actor-store.d.ts} +1 -2
  59. package/dist/{actor-store.js → stores/actor-store.js} +0 -1
  60. package/dist/{idempotency-store.d.ts → stores/idempotency-store.d.ts} +0 -1
  61. package/dist/{idempotency-store.js → stores/idempotency-store.js} +0 -1
  62. package/dist/{projection-store.d.ts → stores/projection-store.d.ts} +0 -1
  63. package/dist/{projection-store.js → stores/projection-store.js} +0 -1
  64. package/dist/{workflow-timer-store.d.ts → stores/workflow-timer-store.d.ts} +0 -1
  65. package/dist/{workflow-timer-store.js → stores/workflow-timer-store.js} +0 -1
  66. package/package.json +11 -11
  67. package/dist/__tests__/action-hooks.test.d.ts +0 -8
  68. package/dist/__tests__/action-hooks.test.d.ts.map +0 -1
  69. package/dist/__tests__/action-hooks.test.js +0 -95
  70. package/dist/__tests__/action-hooks.test.js.map +0 -1
  71. package/dist/__tests__/actor-methods.test.d.ts +0 -9
  72. package/dist/__tests__/actor-methods.test.d.ts.map +0 -1
  73. package/dist/__tests__/actor-methods.test.js +0 -210
  74. package/dist/__tests__/actor-methods.test.js.map +0 -1
  75. package/dist/__tests__/actor-schema-bound.test.d.ts +0 -6
  76. package/dist/__tests__/actor-schema-bound.test.d.ts.map +0 -1
  77. package/dist/__tests__/actor-schema-bound.test.js +0 -112
  78. package/dist/__tests__/actor-schema-bound.test.js.map +0 -1
  79. package/dist/__tests__/actor-workflow-hooks.test.d.ts +0 -8
  80. package/dist/__tests__/actor-workflow-hooks.test.d.ts.map +0 -1
  81. package/dist/__tests__/actor-workflow-hooks.test.js +0 -106
  82. package/dist/__tests__/actor-workflow-hooks.test.js.map +0 -1
  83. package/dist/__tests__/app-capabilities.test.d.ts +0 -19
  84. package/dist/__tests__/app-capabilities.test.d.ts.map +0 -1
  85. package/dist/__tests__/app-capabilities.test.js +0 -57
  86. package/dist/__tests__/app-capabilities.test.js.map +0 -1
  87. package/dist/__tests__/cli-runner.test.d.ts +0 -6
  88. package/dist/__tests__/cli-runner.test.d.ts.map +0 -1
  89. package/dist/__tests__/cli-runner.test.js +0 -158
  90. package/dist/__tests__/cli-runner.test.js.map +0 -1
  91. package/dist/__tests__/create-app.test.d.ts +0 -18
  92. package/dist/__tests__/create-app.test.d.ts.map +0 -1
  93. package/dist/__tests__/create-app.test.js +0 -189
  94. package/dist/__tests__/create-app.test.js.map +0 -1
  95. package/dist/__tests__/cross-service-bus.test.d.ts +0 -8
  96. package/dist/__tests__/cross-service-bus.test.d.ts.map +0 -1
  97. package/dist/__tests__/cross-service-bus.test.js +0 -139
  98. package/dist/__tests__/cross-service-bus.test.js.map +0 -1
  99. package/dist/__tests__/define-schema.test.d.ts +0 -5
  100. package/dist/__tests__/define-schema.test.d.ts.map +0 -1
  101. package/dist/__tests__/define-schema.test.js +0 -83
  102. package/dist/__tests__/define-schema.test.js.map +0 -1
  103. package/dist/__tests__/dev-logger.test.d.ts +0 -9
  104. package/dist/__tests__/dev-logger.test.d.ts.map +0 -1
  105. package/dist/__tests__/dev-logger.test.js +0 -126
  106. package/dist/__tests__/dev-logger.test.js.map +0 -1
  107. package/dist/__tests__/external-call.test.d.ts +0 -14
  108. package/dist/__tests__/external-call.test.d.ts.map +0 -1
  109. package/dist/__tests__/external-call.test.js +0 -99
  110. package/dist/__tests__/external-call.test.js.map +0 -1
  111. package/dist/__tests__/framework-events.test.d.ts +0 -13
  112. package/dist/__tests__/framework-events.test.d.ts.map +0 -1
  113. package/dist/__tests__/framework-events.test.js +0 -204
  114. package/dist/__tests__/framework-events.test.js.map +0 -1
  115. package/dist/__tests__/inline-handler.test.d.ts +0 -8
  116. package/dist/__tests__/inline-handler.test.d.ts.map +0 -1
  117. package/dist/__tests__/inline-handler.test.js +0 -101
  118. package/dist/__tests__/inline-handler.test.js.map +0 -1
  119. package/dist/__tests__/lifecycle-logging.test.d.ts +0 -12
  120. package/dist/__tests__/lifecycle-logging.test.d.ts.map +0 -1
  121. package/dist/__tests__/lifecycle-logging.test.js +0 -114
  122. package/dist/__tests__/lifecycle-logging.test.js.map +0 -1
  123. package/dist/__tests__/middleware.test.d.ts +0 -7
  124. package/dist/__tests__/middleware.test.d.ts.map +0 -1
  125. package/dist/__tests__/middleware.test.js +0 -109
  126. package/dist/__tests__/middleware.test.js.map +0 -1
  127. package/dist/__tests__/module-needs.test.d.ts +0 -10
  128. package/dist/__tests__/module-needs.test.d.ts.map +0 -1
  129. package/dist/__tests__/module-needs.test.js +0 -77
  130. package/dist/__tests__/module-needs.test.js.map +0 -1
  131. package/dist/__tests__/module-topo-sort.test.d.ts +0 -15
  132. package/dist/__tests__/module-topo-sort.test.d.ts.map +0 -1
  133. package/dist/__tests__/module-topo-sort.test.js +0 -105
  134. package/dist/__tests__/module-topo-sort.test.js.map +0 -1
  135. package/dist/__tests__/multi-tenancy.test.d.ts +0 -10
  136. package/dist/__tests__/multi-tenancy.test.d.ts.map +0 -1
  137. package/dist/__tests__/multi-tenancy.test.js +0 -122
  138. package/dist/__tests__/multi-tenancy.test.js.map +0 -1
  139. package/dist/__tests__/needs-topology.test.d.ts +0 -11
  140. package/dist/__tests__/needs-topology.test.d.ts.map +0 -1
  141. package/dist/__tests__/needs-topology.test.js +0 -82
  142. package/dist/__tests__/needs-topology.test.js.map +0 -1
  143. package/dist/__tests__/plugin-app-narrow.test.d.ts +0 -12
  144. package/dist/__tests__/plugin-app-narrow.test.d.ts.map +0 -1
  145. package/dist/__tests__/plugin-app-narrow.test.js +0 -77
  146. package/dist/__tests__/plugin-app-narrow.test.js.map +0 -1
  147. package/dist/__tests__/plugin-closure.test.d.ts +0 -15
  148. package/dist/__tests__/plugin-closure.test.d.ts.map +0 -1
  149. package/dist/__tests__/plugin-closure.test.js +0 -140
  150. package/dist/__tests__/plugin-closure.test.js.map +0 -1
  151. package/dist/__tests__/plugin-stress.test.d.ts +0 -21
  152. package/dist/__tests__/plugin-stress.test.d.ts.map +0 -1
  153. package/dist/__tests__/plugin-stress.test.js +0 -203
  154. package/dist/__tests__/plugin-stress.test.js.map +0 -1
  155. package/dist/__tests__/plugin.test.d.ts +0 -10
  156. package/dist/__tests__/plugin.test.d.ts.map +0 -1
  157. package/dist/__tests__/plugin.test.js +0 -225
  158. package/dist/__tests__/plugin.test.js.map +0 -1
  159. package/dist/__tests__/primitives.test.d.ts +0 -9
  160. package/dist/__tests__/primitives.test.d.ts.map +0 -1
  161. package/dist/__tests__/primitives.test.js +0 -434
  162. package/dist/__tests__/primitives.test.js.map +0 -1
  163. package/dist/__tests__/production-readiness.test.d.ts +0 -22
  164. package/dist/__tests__/production-readiness.test.d.ts.map +0 -1
  165. package/dist/__tests__/production-readiness.test.js +0 -196
  166. package/dist/__tests__/production-readiness.test.js.map +0 -1
  167. package/dist/__tests__/provider.test.d.ts +0 -6
  168. package/dist/__tests__/provider.test.d.ts.map +0 -1
  169. package/dist/__tests__/provider.test.js +0 -122
  170. package/dist/__tests__/provider.test.js.map +0 -1
  171. package/dist/__tests__/public-marker.test.d.ts +0 -7
  172. package/dist/__tests__/public-marker.test.d.ts.map +0 -1
  173. package/dist/__tests__/public-marker.test.js +0 -58
  174. package/dist/__tests__/public-marker.test.js.map +0 -1
  175. package/dist/__tests__/retry-dlq.test.d.ts +0 -6
  176. package/dist/__tests__/retry-dlq.test.d.ts.map +0 -1
  177. package/dist/__tests__/retry-dlq.test.js +0 -68
  178. package/dist/__tests__/retry-dlq.test.js.map +0 -1
  179. package/dist/__tests__/validate.test.d.ts +0 -5
  180. package/dist/__tests__/validate.test.d.ts.map +0 -1
  181. package/dist/__tests__/validate.test.js +0 -53
  182. package/dist/__tests__/validate.test.js.map +0 -1
  183. package/dist/__tests__/workflow-saga.test.d.ts +0 -7
  184. package/dist/__tests__/workflow-saga.test.d.ts.map +0 -1
  185. package/dist/__tests__/workflow-saga.test.js +0 -265
  186. package/dist/__tests__/workflow-saga.test.js.map +0 -1
  187. package/dist/actor-store.d.ts.map +0 -1
  188. package/dist/actor-store.js.map +0 -1
  189. package/dist/cli-runner.d.ts.map +0 -1
  190. package/dist/cli-runner.js.map +0 -1
  191. package/dist/create-app.d.ts +0 -146
  192. package/dist/create-app.d.ts.map +0 -1
  193. package/dist/create-app.js +0 -703
  194. package/dist/create-app.js.map +0 -1
  195. package/dist/define-action.d.ts.map +0 -1
  196. package/dist/define-action.js.map +0 -1
  197. package/dist/define-actor.d.ts.map +0 -1
  198. package/dist/define-actor.js.map +0 -1
  199. package/dist/define-app.d.ts +0 -104
  200. package/dist/define-app.d.ts.map +0 -1
  201. package/dist/define-app.js +0 -49
  202. package/dist/define-app.js.map +0 -1
  203. package/dist/define-cron.d.ts.map +0 -1
  204. package/dist/define-cron.js.map +0 -1
  205. package/dist/define-error.d.ts.map +0 -1
  206. package/dist/define-error.js.map +0 -1
  207. package/dist/define-external-call.d.ts.map +0 -1
  208. package/dist/define-external-call.js.map +0 -1
  209. package/dist/define-handler.d.ts.map +0 -1
  210. package/dist/define-handler.js.map +0 -1
  211. package/dist/define-inbound-webhook.d.ts.map +0 -1
  212. package/dist/define-inbound-webhook.js.map +0 -1
  213. package/dist/define-inbox.d.ts.map +0 -1
  214. package/dist/define-inbox.js.map +0 -1
  215. package/dist/define-initializer.d.ts +0 -54
  216. package/dist/define-initializer.d.ts.map +0 -1
  217. package/dist/define-initializer.js +0 -38
  218. package/dist/define-initializer.js.map +0 -1
  219. package/dist/define-middleware.d.ts +0 -8
  220. package/dist/define-middleware.d.ts.map +0 -1
  221. package/dist/define-middleware.js +0 -8
  222. package/dist/define-middleware.js.map +0 -1
  223. package/dist/define-model.d.ts +0 -10
  224. package/dist/define-model.d.ts.map +0 -1
  225. package/dist/define-model.js +0 -13
  226. package/dist/define-model.js.map +0 -1
  227. package/dist/define-module.d.ts +0 -160
  228. package/dist/define-module.d.ts.map +0 -1
  229. package/dist/define-module.js +0 -63
  230. package/dist/define-module.js.map +0 -1
  231. package/dist/define-outbox.d.ts.map +0 -1
  232. package/dist/define-outbox.js.map +0 -1
  233. package/dist/define-plugin.d.ts +0 -195
  234. package/dist/define-plugin.d.ts.map +0 -1
  235. package/dist/define-plugin.js +0 -220
  236. package/dist/define-plugin.js.map +0 -1
  237. package/dist/define-projection.d.ts.map +0 -1
  238. package/dist/define-projection.js.map +0 -1
  239. package/dist/define-provider.d.ts +0 -49
  240. package/dist/define-provider.d.ts.map +0 -1
  241. package/dist/define-provider.js +0 -45
  242. package/dist/define-provider.js.map +0 -1
  243. package/dist/define-query.d.ts.map +0 -1
  244. package/dist/define-query.js.map +0 -1
  245. package/dist/define-resolver.d.ts +0 -111
  246. package/dist/define-resolver.d.ts.map +0 -1
  247. package/dist/define-resolver.js +0 -146
  248. package/dist/define-resolver.js.map +0 -1
  249. package/dist/define-schema.d.ts.map +0 -1
  250. package/dist/define-schema.js.map +0 -1
  251. package/dist/define-upcaster.d.ts.map +0 -1
  252. package/dist/define-upcaster.js.map +0 -1
  253. package/dist/define-workflow.d.ts.map +0 -1
  254. package/dist/define-workflow.js.map +0 -1
  255. package/dist/dev-logger.d.ts.map +0 -1
  256. package/dist/dev-logger.js.map +0 -1
  257. package/dist/event-message.d.ts.map +0 -1
  258. package/dist/event-message.js.map +0 -1
  259. package/dist/foundation.d.ts.map +0 -1
  260. package/dist/foundation.js.map +0 -1
  261. package/dist/framework-event-bus.d.ts +0 -13
  262. package/dist/framework-event-bus.d.ts.map +0 -1
  263. package/dist/framework-event-bus.js +0 -13
  264. package/dist/framework-event-bus.js.map +0 -1
  265. package/dist/framework-events.d.ts.map +0 -1
  266. package/dist/framework-events.js.map +0 -1
  267. package/dist/idempotency-store.d.ts.map +0 -1
  268. package/dist/idempotency-store.js.map +0 -1
  269. package/dist/index.d.ts.map +0 -1
  270. package/dist/index.js.map +0 -1
  271. package/dist/module-surface.d.ts +0 -47
  272. package/dist/module-surface.d.ts.map +0 -1
  273. package/dist/module-surface.js +0 -65
  274. package/dist/module-surface.js.map +0 -1
  275. package/dist/projection-store.d.ts.map +0 -1
  276. package/dist/projection-store.js.map +0 -1
  277. package/dist/public-marker.d.ts.map +0 -1
  278. package/dist/public-marker.js.map +0 -1
  279. package/dist/response.d.ts.map +0 -1
  280. package/dist/response.js.map +0 -1
  281. package/dist/runtime.d.ts +0 -621
  282. package/dist/runtime.d.ts.map +0 -1
  283. package/dist/runtime.js.map +0 -1
  284. package/dist/validate.d.ts.map +0 -1
  285. package/dist/validate.js.map +0 -1
  286. package/dist/when.d.ts +0 -101
  287. package/dist/when.d.ts.map +0 -1
  288. package/dist/when.js +0 -57
  289. package/dist/when.js.map +0 -1
  290. package/dist/workflow-timer-store.d.ts.map +0 -1
  291. package/dist/workflow-timer-store.js.map +0 -1
package/dist/runtime.d.ts DELETED
@@ -1,621 +0,0 @@
1
- /**
2
- * Runtime — the framework's dispatch + apply pipeline.
3
- *
4
- * Responsibilities:
5
- * 1. Register actions, actors, handlers, and `when` reactions.
6
- * 2. `dispatch(action, input, envelope?)` — runs the action's handler,
7
- * collects returned events, atomically: applies them to actors, runs
8
- * reactions, schedules new timers, cancels old timers.
9
- * 3. `publish(events, envelope)` — runs the apply-actors-and-reactions step
10
- * for events produced outside a handler (rare; mostly internal).
11
- * 4. `request(action, input)` — invoked from inside a handler to call
12
- * another action with a derived child envelope. Returns the inner
13
- * handler's result.
14
- *
15
- * The runtime owns commit atomicity:
16
- * - All actor state changes from one event-publish either ALL persist or
17
- * NONE persist (in-memory is naturally atomic; persistent stores rely
18
- * on the adapter's transaction primitives).
19
- * - Events fan out to actors first, then workflow reactions, then
20
- * projections.
21
- */
22
- import { type Hook } from "@nwire/hooks";
23
- import { Runtime as RuntimeBase, type HookStepTelemetry, type LifecycleTelemetry, type RuntimeOptions as RuntimeBaseOptions, type SerializedError, type TelemetryListener as RuntimeTelemetryListener } from "@nwire/app";
24
- import type { z } from "zod";
25
- import { type ZodTypeAny } from "@nwire/messages";
26
- import { type MessageEnvelope } from "@nwire/envelope";
27
- import type { ActionDefinition, ActionInput, ActionResult } from "./define-action.js";
28
- import type { HandlerContext, HandlerDefinition } from "./define-handler.js";
29
- import type { ExternalCallDefinition, ExternalCallExecutor } from "./define-external-call.js";
30
- import { type ActorDefinition } from "./define-actor.js";
31
- import type { WorkflowDefinition } from "./define-workflow.js";
32
- import { type WorkflowTimerStore } from "./workflow-timer-store.js";
33
- import { type ActorStore } from "./actor-store.js";
34
- import { type EventMessage } from "./event-message.js";
35
- import type { ProjectionDefinition } from "./define-projection.js";
36
- import { type ProjectionStore } from "./projection-store.js";
37
- import { type IdempotencyStore } from "./idempotency-store.js";
38
- import type { QueryDefinition } from "./define-query.js";
39
- import { type DeadLetterSink } from "@nwire/dead-letter";
40
- import type { EventBus } from "@nwire/bus";
41
- export type { SerializedError } from "@nwire/app";
42
- /**
43
- * `DispatchMiddleware` — onion-style extension point around action dispatch.
44
- *
45
- * runtime.use(async (next, action, input, ctx) => {
46
- * const start = performance.now()
47
- * try {
48
- * return await next()
49
- * } finally {
50
- * ctx.logger.info('dispatched', {
51
- * action: action.name,
52
- * durationMs: performance.now() - start
53
- * })
54
- * }
55
- * })
56
- *
57
- * Tightens the base `@nwire/app.DispatchMiddleware` with forge's
58
- * action / input / handler-context types. Middlewares run OUTSIDE the
59
- * retry loop — one pass per dispatch. Registration order = execution
60
- * order; the first `runtime.use(m)` is the outermost layer. Koa/express
61
- * semantics.
62
- */
63
- export type DispatchMiddleware = (next: () => Promise<EventMessage | EventMessage[] | Record<string, unknown> | void>, action: ActionDefinition, input: any, ctx: HandlerContext) => Promise<EventMessage | EventMessage[] | Record<string, unknown> | void>;
64
- /**
65
- * Per-action `action.before:<name>` hook context. Chain steps inspect
66
- * the input + envelope-bound ctx; setting `vetoed = true` (typically by
67
- * returning false from a plugin's `before(actionName, …)` handler) cleanly
68
- * cancels the dispatch — no events emitted, the dispatcher returns void.
69
- */
70
- export interface ActionBeforeHookCtx {
71
- readonly action: ActionDefinition;
72
- readonly input: unknown;
73
- readonly ctx: HandlerContext;
74
- vetoed?: boolean;
75
- }
76
- /**
77
- * Per-action `action.after:<name>` hook context. Runs after a successful
78
- * handler invocation, before the parallel `ActionCompleted` framework
79
- * event fires. Observation-only — there's no veto path; throwing is
80
- * logged but does NOT undo the already-published events.
81
- */
82
- export interface ActionAfterHookCtx {
83
- readonly action: ActionDefinition;
84
- readonly input: unknown;
85
- readonly result: unknown;
86
- readonly durationMs: number;
87
- }
88
- /**
89
- * Per-actor `actor.transition:<name>` hook context. Runs after an actor's
90
- * state has been saved (committed), before legacy plugin-supplied
91
- * `actorTransitionHooks` fire. Observation-focused — the transition has
92
- * already happened by the time the hook runs.
93
- */
94
- export interface ActorTransitionHookCtx {
95
- readonly actor: ActorDefinition;
96
- readonly key: string;
97
- readonly fromState: string;
98
- readonly toState: string;
99
- readonly triggeringEvent: EventMessage;
100
- readonly envelope: MessageEnvelope;
101
- }
102
- /**
103
- * Per-workflow `workflow.fire:<name>` hook context. Wraps every saga
104
- * invocation triggered by a subscribed event. Plugins can use the hook
105
- * to time fires, log correlation keys, or observe drift between event
106
- * stream and saga state.
107
- */
108
- export interface WorkflowFireHookCtx {
109
- readonly workflow: WorkflowDefinition;
110
- readonly event: EventMessage;
111
- readonly envelope: MessageEnvelope;
112
- readonly correlationKey: string;
113
- }
114
- /**
115
- * `Telemetry` — the canonical tagged-union stream of every domain-significant
116
- * thing the runtime does. One tap (`runtime.onTelemetry`) gets every kind,
117
- * letting Studio (and any future observability adapter) reconstruct the full
118
- * domain story without hooking individual lifecycle sites.
119
- *
120
- * Every record carries `appName` and a `ts` (ISO timestamp). Domain records
121
- * additionally carry an `envelope` for correlation/causation; orchestrator
122
- * records (external calls, queue jobs, cron) may or may not depending on
123
- * whether they're inside an envelope-scoped context.
124
- *
125
- * Forge WIDENS the base `Telemetry` union from `@nwire/app` (which ships only
126
- * the generic `hook.step` + `lifecycle` kinds) with CQRS-specific kinds.
127
- * Adding a new kind is additive — consumers ignore unknown kinds.
128
- */
129
- export type Telemetry = HookStepTelemetry | LifecycleTelemetry | {
130
- readonly kind: "action.dispatched";
131
- readonly action: string;
132
- readonly input: unknown;
133
- readonly envelope: MessageEnvelope;
134
- readonly appName: string;
135
- readonly ts: string;
136
- } | {
137
- readonly kind: "action.completed";
138
- readonly action: string;
139
- readonly durationMs: number;
140
- readonly emittedEvents: readonly string[];
141
- readonly envelope: MessageEnvelope;
142
- readonly appName: string;
143
- readonly ts: string;
144
- } | {
145
- readonly kind: "action.failed";
146
- readonly action: string;
147
- readonly attempt: number;
148
- readonly maxAttempts: number;
149
- readonly willRetry: boolean;
150
- readonly error: SerializedError;
151
- readonly envelope: MessageEnvelope;
152
- readonly appName: string;
153
- readonly ts: string;
154
- } | {
155
- readonly kind: "event.published";
156
- readonly event: EventMessage;
157
- readonly envelope: MessageEnvelope;
158
- /** 'in-process' = emitted by a handler here. 'external' = arrived from the bus. */
159
- readonly source: "in-process" | "external";
160
- readonly appName: string;
161
- readonly ts: string;
162
- } | {
163
- readonly kind: "event.deduped";
164
- readonly event: EventMessage;
165
- readonly envelope: MessageEnvelope;
166
- /** Which apply path detected the duplicate — same legend as published. */
167
- readonly source: "in-process" | "external";
168
- readonly appName: string;
169
- readonly ts: string;
170
- } | {
171
- readonly kind: "actor.transitioned";
172
- readonly actor: string;
173
- readonly key: string;
174
- readonly tenant: string;
175
- readonly from: string;
176
- readonly to: string;
177
- readonly triggeringEvent: string;
178
- readonly envelope: MessageEnvelope;
179
- readonly appName: string;
180
- readonly ts: string;
181
- } | {
182
- readonly kind: "projection.folded";
183
- readonly projection: string;
184
- readonly event: string;
185
- readonly tenant: string;
186
- readonly durationMs: number;
187
- readonly envelope: MessageEnvelope;
188
- readonly appName: string;
189
- readonly ts: string;
190
- } | {
191
- readonly kind: "projection.failed";
192
- readonly projection: string;
193
- readonly event: string;
194
- readonly tenant: string;
195
- readonly durationMs: number;
196
- readonly error: SerializedError;
197
- readonly envelope: MessageEnvelope;
198
- readonly appName: string;
199
- readonly ts: string;
200
- } | {
201
- readonly kind: "reaction.fired";
202
- readonly sourceEvent: string;
203
- readonly durationMs: number;
204
- readonly envelope: MessageEnvelope;
205
- readonly appName: string;
206
- readonly ts: string;
207
- } | {
208
- readonly kind: "reaction.failed";
209
- readonly sourceEvent: string;
210
- readonly error: SerializedError;
211
- readonly envelope: MessageEnvelope;
212
- readonly appName: string;
213
- readonly ts: string;
214
- /** Set when the failure happened inside a named workflow. */
215
- readonly workflow?: string;
216
- /** 1-based attempt index that produced this failure. */
217
- readonly attempt?: number;
218
- /** Total attempts allowed by the workflow's retry policy. */
219
- readonly maxAttempts?: number;
220
- /** True if another retry will be tried after this failure. */
221
- readonly willRetry?: boolean;
222
- } | {
223
- readonly kind: "reaction.exhausted";
224
- readonly workflow: string;
225
- readonly sourceEvent: string;
226
- readonly attempts: number;
227
- readonly error: SerializedError;
228
- readonly envelope: MessageEnvelope;
229
- readonly appName: string;
230
- readonly ts: string;
231
- } | {
232
- readonly kind: "query.executed";
233
- readonly query: string;
234
- readonly input: unknown;
235
- readonly durationMs: number;
236
- readonly tenant: string;
237
- readonly appName: string;
238
- readonly ts: string;
239
- } | {
240
- readonly kind: "timer.scheduled";
241
- readonly actor: string;
242
- readonly key: string;
243
- readonly timer: string;
244
- readonly action: string;
245
- readonly fireAt: number;
246
- readonly tenant: string;
247
- readonly appName: string;
248
- readonly ts: string;
249
- } | {
250
- readonly kind: "timer.fired";
251
- readonly actor: string;
252
- readonly key: string;
253
- readonly timer: string;
254
- readonly action: string;
255
- readonly lateByMs: number;
256
- readonly tenant: string;
257
- readonly appName: string;
258
- readonly ts: string;
259
- } | {
260
- readonly kind: "dlq.recorded";
261
- readonly action: string;
262
- readonly attempts: number;
263
- readonly error: SerializedError;
264
- readonly envelope: MessageEnvelope;
265
- readonly appName: string;
266
- readonly ts: string;
267
- } | {
268
- readonly kind: "external.call.started";
269
- readonly call: string;
270
- readonly target: string;
271
- readonly idempotencyKey?: string;
272
- readonly envelope?: MessageEnvelope;
273
- readonly appName: string;
274
- readonly ts: string;
275
- } | {
276
- readonly kind: "external.call.completed";
277
- readonly call: string;
278
- readonly target: string;
279
- readonly durationMs: number;
280
- readonly status?: number;
281
- readonly idempotencyKey?: string;
282
- readonly envelope?: MessageEnvelope;
283
- readonly appName: string;
284
- readonly ts: string;
285
- } | {
286
- readonly kind: "external.call.failed";
287
- readonly call: string;
288
- readonly target: string;
289
- readonly attempt: number;
290
- readonly willRetry: boolean;
291
- readonly error: SerializedError;
292
- readonly envelope?: MessageEnvelope;
293
- readonly appName: string;
294
- readonly ts: string;
295
- } | {
296
- readonly kind: "inbound.webhook.received";
297
- readonly webhook: string;
298
- readonly source: string;
299
- readonly signatureValid: boolean;
300
- readonly dedupHit: boolean;
301
- readonly routedTo?: string;
302
- readonly appName: string;
303
- readonly ts: string;
304
- } | {
305
- readonly kind: "outbox.flushed";
306
- readonly outbox: string;
307
- readonly events: number;
308
- readonly durationMs: number;
309
- readonly failed: number;
310
- readonly appName: string;
311
- readonly ts: string;
312
- } | {
313
- readonly kind: "inbox.dedup.hit";
314
- readonly inbox: string;
315
- readonly messageId: string;
316
- readonly firstSeenAt: string;
317
- readonly appName: string;
318
- readonly ts: string;
319
- } | {
320
- readonly kind: "queue.job.enqueued";
321
- readonly queue: string;
322
- readonly jobId: string;
323
- readonly delay?: number;
324
- readonly appName: string;
325
- readonly ts: string;
326
- } | {
327
- readonly kind: "queue.job.started";
328
- readonly queue: string;
329
- readonly jobId: string;
330
- readonly waitedMs: number;
331
- readonly appName: string;
332
- readonly ts: string;
333
- } | {
334
- readonly kind: "queue.job.completed";
335
- readonly queue: string;
336
- readonly jobId: string;
337
- readonly durationMs: number;
338
- readonly ok: boolean;
339
- readonly appName: string;
340
- readonly ts: string;
341
- } | {
342
- readonly kind: "cron.fired";
343
- readonly schedule: string;
344
- readonly cronName: string;
345
- readonly expected: string;
346
- readonly actual: string;
347
- readonly lateByMs: number;
348
- readonly appName: string;
349
- readonly ts: string;
350
- };
351
- /**
352
- * Subscriber type for `runtime.onTelemetry` — narrowed to forge's widened
353
- * `Telemetry` union (CQRS kinds + the generic kinds inherited from
354
- * `@nwire/app`).
355
- */
356
- export type TelemetryListener = RuntimeTelemetryListener<Telemetry>;
357
- /**
358
- * Per-dispatch options. The wire (HTTP, queue, CLI) owns the AbortController
359
- * and passes its `signal` here when the caller can disappear mid-request:
360
- *
361
- * const controller = new AbortController()
362
- * req.on('close', () => controller.abort())
363
- * await runtime.dispatch(action, input, envelope, { signal: controller.signal })
364
- *
365
- * The runtime threads `signal` onto `ctx.signal` and checks `signal.aborted`
366
- * between retry attempts. Handlers may opt-in to mid-handler observation via
367
- * `ctx.signal.throwIfAborted()` at await points.
368
- */
369
- export interface DispatchOptions {
370
- readonly signal?: AbortSignal;
371
- }
372
- export interface RuntimeOptions extends RuntimeBaseOptions {
373
- readonly actorStore?: ActorStore;
374
- readonly projectionStore?: ProjectionStore;
375
- readonly deadLetterSink?: DeadLetterSink;
376
- /**
377
- * Envelope-level dedup table. Defaults to `InMemoryIdempotencyStore`.
378
- * The runtime consults this before applying any event so duplicate
379
- * `envelope.messageId` values (queue redrives, bus replays) apply
380
- * exactly once. Provide a durable adapter to make dedup survive
381
- * process restarts.
382
- */
383
- readonly idempotencyStore?: IdempotencyStore;
384
- /**
385
- * Cross-service event bus (`@nwire/bus`). When provided AND
386
- * `publishToBus: true`, the runtime fans every published event to the
387
- * bus in addition to the in-process apply. Bus-received events arrive
388
- * via `applyExternalEvent` (no re-publish to bus).
389
- */
390
- readonly bus?: EventBus;
391
- /** Pass-through fan-out: publish in-process events to the bus too. */
392
- readonly publishToBus?: boolean;
393
- /**
394
- * Saga timer store. Defaults to `InMemoryWorkflowTimerStore`. Replace
395
- * with a durable adapter (Mongo/Redis/Postgres) to make sagas survive
396
- * process restarts.
397
- */
398
- readonly workflowTimerStore?: WorkflowTimerStore;
399
- }
400
- /** Alias for the telemetry union — exported for consumers wiring Studio / OTel. */
401
- export type TelemetryRecord = Telemetry;
402
- /** Discriminant of a {@link TelemetryRecord}. */
403
- export type TelemetryEventKind = Telemetry["kind"];
404
- /** Public runtime contract — use when typing container resolves or test harnesses. */
405
- export interface RuntimeContract {
406
- dispatch<A extends ActionDefinition>(action: A, input: ActionInput<A>, parentEnvelope?: MessageEnvelope, opts?: DispatchOptions): Promise<ActionResult<A>>;
407
- findActionByName(name: string): ActionDefinition | undefined;
408
- onTelemetry(listener: TelemetryListener): () => void;
409
- }
410
- export declare class Runtime extends RuntimeBase implements RuntimeContract {
411
- private readonly handlers;
412
- private readonly actors;
413
- /**
414
- * Workflows keyed by event name. Built from each registered workflow's
415
- * `subscribedEvents`. On publish, every workflow listening to an event
416
- * gets `_fire`d with runtime-bound effects.
417
- */
418
- private readonly workflowsByEvent;
419
- /**
420
- * Per-workflow instance state — keyed first by workflow name, then by
421
- * correlation key. In-memory for slice 1; future adapters (Mongo, Redis)
422
- * plug in via a WorkflowStore contract analogous to ActorStore.
423
- */
424
- private readonly workflowInstances;
425
- private workflowInstanceStore;
426
- private readonly projections;
427
- private readonly projectionsByEvent;
428
- private readonly queries;
429
- private readonly externalCalls;
430
- private readonly externalCallExecutors;
431
- private readonly actorStore;
432
- private readonly projectionStore;
433
- private readonly deadLetterSink;
434
- /**
435
- * Per-action `action.before:<name>` hooks. Pre-created at
436
- * `registerHandler()` so they show up in `listHooks()` + scan + Studio
437
- * even before any plugin's `before(name, …)` sugar runs. Adopted into
438
- * the canonical telemetry stream so each chain step emits `hook.step`
439
- * observations.
440
- */
441
- private readonly actionBeforeHooks;
442
- /** Per-action `action.after:<name>` hooks. Pre-created identically. */
443
- private readonly actionAfterHooks;
444
- /**
445
- * Per-actor `actor.transition:<name>` hooks. Pre-created at
446
- * `registerActor()` time. Adopted into the canonical telemetry stream
447
- * so each chain step emits `hook.step` observations — same model as
448
- * `actionBeforeHooks` / `actionAfterHooks`.
449
- */
450
- private readonly perActorHooks;
451
- /** Per-workflow `workflow.fire:<name>` hooks. Pre-created at registration. */
452
- private readonly perWorkflowHooks;
453
- private readonly actorTransitionHooks;
454
- private readonly bus?;
455
- private readonly publishToBus;
456
- /** Known external events — set by createApp from modules' needs.externalEvents. */
457
- private readonly externalEventNames;
458
- /** Public-event names (visibility: 'public') — set by createApp from modules' events. */
459
- private readonly publicEventNames;
460
- /** Saga timer store (default in-memory; pluggable via RuntimeOptions). */
461
- readonly workflowTimerStore: WorkflowTimerStore;
462
- /** Envelope-level dedup table — see RuntimeOptions.idempotencyStore. */
463
- readonly idempotencyStore: IdempotencyStore;
464
- constructor(options?: RuntimeOptions);
465
- /**
466
- * Tap into the canonical telemetry stream — narrowed to forge's widened
467
- * `Telemetry` union. Delegates to the base `Runtime.onTelemetry` but
468
- * locks the listener's record type to forge's CQRS-aware shape so
469
- * `rec.kind === "event.published"` narrowing works for consumers.
470
- */
471
- onTelemetry<T = Telemetry>(listener: RuntimeTelemetryListener<T>): () => void;
472
- offTelemetry<T = Telemetry>(listener: RuntimeTelemetryListener<T>): void;
473
- /**
474
- * Register a dispatch middleware. Narrows the base `use(middleware)` to
475
- * forge's tightened `DispatchMiddleware` shape so middleware authors
476
- * see typed `action: ActionDefinition` / `ctx: HandlerContext`. The base
477
- * runtime sees its `unknown`-typed shape; the cast is safe — every call
478
- * site we control hands the same `(action, input, ctx)` triple forge's
479
- * dispatcher pushes through `dispatchHook.run(...)`.
480
- */
481
- use(middleware: DispatchMiddleware): void;
482
- /** Internal — createApp registers known external event names. */
483
- registerExternalEvent(eventName: string): void;
484
- /** Internal — createApp registers public event names (visibility: 'public'). */
485
- registerPublicEvent(eventName: string): void;
486
- /** Internal — createApp registers actor-transition hooks from plugins. */
487
- registerActorTransitionHook(hook: (actor: ActorDefinition, key: string, fromState: string, toState: string, event: EventMessage, envelope: MessageEnvelope) => Promise<void> | void): void;
488
- registerHandler(handler: HandlerDefinition<any>): void;
489
- /**
490
- * Get (or lazily create + adopt) the per-action `action.before:<name>`
491
- * hook. Plugin authors normally reach this via `plugin.before(name, …)`;
492
- * this method is also public so test code + custom orchestrators can
493
- * register chain steps or taps directly.
494
- */
495
- ensureActionBeforeHook(actionName: string): Hook<ActionBeforeHookCtx>;
496
- /** Get (or lazily create + adopt) the per-action `action.after:<name>` hook. */
497
- ensureActionAfterHook(actionName: string): Hook<ActionAfterHookCtx>;
498
- /**
499
- * Get (or lazily create + adopt) the per-actor `actor.transition:<name>`
500
- * hook. Plugin authors reach this via `runtime.ensureActorTransitionHook(name)`
501
- * to attach chain steps or taps; the dispatcher runs the hook after the
502
- * actor's state has been saved.
503
- */
504
- ensureActorTransitionHook(actorName: string): Hook<ActorTransitionHookCtx>;
505
- /**
506
- * Get (or lazily create + adopt) the per-workflow `workflow.fire:<name>`
507
- * hook. Runs around every workflow invocation triggered by a subscribed
508
- * event — see `runWorkflows`.
509
- */
510
- ensureWorkflowFireHook(workflowName: string): Hook<WorkflowFireHookCtx>;
511
- registerActor(actor: ActorDefinition): void;
512
- /** Internal — createApp registers each module's workflows. */
513
- registerWorkflow(workflow: WorkflowDefinition): void;
514
- registerProjection(projection: ProjectionDefinition<any>): void;
515
- registerQuery(query: QueryDefinition<any, any, any>): void;
516
- /**
517
- * Register an external-call declaration. Modules announce their external
518
- * calls so Studio + the static graph see them; wires (adapters) call
519
- * `registerExternalCallExecutor` to provide the transport.
520
- */
521
- registerExternalCall(def: ExternalCallDefinition<any, any>): void;
522
- /**
523
- * Bind an executor (HTTP client / SDK wrapper / test mock) to a declared
524
- * external call. Lookup is by `def.name`. Called by wires/adapters at
525
- * boot. Idempotent: re-registering replaces the executor (useful for
526
- * swapping mocks in tests).
527
- */
528
- registerExternalCallExecutor<TRequest extends ZodTypeAny, TResponse extends ZodTypeAny>(def: ExternalCallDefinition<TRequest, TResponse>, executor: ExternalCallExecutor<TRequest, TResponse>): void;
529
- executeExternalCall<TRequest extends ZodTypeAny, TResponse extends ZodTypeAny>(def: ExternalCallDefinition<TRequest, TResponse>, request: z.output<TRequest>, envelope?: MessageEnvelope): Promise<z.output<TResponse>>;
530
- query<TResult = unknown>(queryName: string, input: unknown, tenant?: string): Promise<TResult>;
531
- getActorStore(): ActorStore;
532
- getProjectionStore(): ProjectionStore;
533
- listHandlers(): readonly string[];
534
- listActors(): readonly string[];
535
- listProjections(): readonly string[];
536
- listQueries(): readonly string[];
537
- listExternalCalls(): readonly string[];
538
- getExternalCall(name: string): ExternalCallDefinition<any, any> | undefined;
539
- /**
540
- * Walk every registered actor's instances; for each `activeTimers[name]`
541
- * with `fireAt <= now`, dispatch the timer's action. Removes fired timers
542
- * from the instance's `activeTimers` map.
543
- *
544
- * Returns the count of timers that fired. Idempotent: a timer's `fireAt`
545
- * is not bumped, so a second call after `now` advances will not re-fire
546
- * the same timer (it was removed).
547
- *
548
- * For tests: pass `now` to fast-forward (`runtime.fireDueTimers(Date.now() + 3 * 86400_000)`).
549
- * For production: a transport (BullMQ, polling worker) calls this on an
550
- * interval; see `startTimerScheduler(app, intervalMs)` in `create-app.ts`.
551
- */
552
- fireDueTimers(now?: number): Promise<number>;
553
- /**
554
- * Resolve an action definition by its routing name. Used by execute/send
555
- * to support the callable form `execute(myAction(input))` — the
556
- * `CommandMessage` carries only the name; the runtime looks up the actual
557
- * action from the registered handler map.
558
- */
559
- findActionByName(name: string): ActionDefinition | undefined;
560
- /**
561
- * Drain every due saga timer from the workflow timer store and route
562
- * each as a synthetic event back into the originating workflow. The
563
- * store removes drained timers atomically (see `WorkflowTimerStore`
564
- * contract); calling `fireDueWorkflowTimers` twice with the same `now`
565
- * MUST be a no-op the second time.
566
- *
567
- * Returns the count of timers fired.
568
- *
569
- * Tests: pass `now` to fast-forward
570
- * (`runtime.fireDueWorkflowTimers(new Date(Date.now() + 8 * 86400_000))`).
571
- * Production: the same polling loop that calls `fireDueTimers` calls
572
- * this — they share the timer tick infrastructure.
573
- */
574
- fireDueWorkflowTimers(now?: Date): Promise<number>;
575
- /**
576
- * Run an action through its handler, then atomically apply returned events.
577
- * Returns the handler's raw return value (events) for callers that want it.
578
- */
579
- dispatch<A extends ActionDefinition>(action: A, input: ActionInput<A>, parentEnvelope?: MessageEnvelope, opts?: DispatchOptions): Promise<ActionResult<A>>;
580
- /**
581
- * Apply a batch of events: route to actors (state transitions + assigns +
582
- * timer scheduling), fold projections, then fire workflows. Used internally
583
- * by `dispatch` and exposed for tests and rare external publishes.
584
- */
585
- publish(events: readonly EventMessage[], parentEnvelope: MessageEnvelope): Promise<void>;
586
- /**
587
- * Apply an event that arrived from the cross-service bus. Same pipeline
588
- * as `publish` (actors → projections → workflows) but does NOT re-publish
589
- * to the bus — avoids fan-out loops between services. The runtime tracks
590
- * which event names it declared as external (via createApp's wiring of
591
- * modules' `needs.externalEvents`); calls for other names throw to catch
592
- * misconfigured subscriptions early.
593
- */
594
- applyExternalEvent(eventName: string, payload: unknown, envelope: MessageEnvelope): Promise<void>;
595
- private foldProjections;
596
- private applyToActors;
597
- private extractKey;
598
- private applyEventToActor;
599
- private applyEventToActorLocked;
600
- private computeTimersForState;
601
- /**
602
- * Fire every workflow subscribed to `event`. Each workflow receives a
603
- * runtime-bound effects bag: `send`/`enqueue` go through `dispatch` for
604
- * retry + telemetry parity with action handlers; `publish` goes back
605
- * through `this.publish` so derived events flow through the full
606
- * actors → projections → workflows pipeline (translator pattern).
607
- *
608
- * Telemetry emits as `workflow.fired` / `workflow.failed`.
609
- */
610
- private runWorkflows;
611
- private buildHandlerContext;
612
- private loadActorView;
613
- /** Test/inspection seam — read what's in the DLQ. */
614
- getDeadLetterSink(): DeadLetterSink;
615
- }
616
- /**
617
- * Parse a delay string like '3d', '90s', '4h' into milliseconds.
618
- * Supports: ms, s, m, h, d. Numbers without units treated as milliseconds.
619
- */
620
- export declare function parseDelay(value: string): number;
621
- //# sourceMappingURL=runtime.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,EAAQ,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EACL,OAAO,IAAI,WAAW,EAItB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,cAAc,IAAI,kBAAkB,EACzC,KAAK,eAAe,EACpB,KAAK,iBAAiB,IAAI,wBAAwB,EACnD,MAAM,YAAY,CAAC;AAKpB,OAAO,KAAK,EAAE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