@blokjs/runner 0.2.1 → 0.4.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 (159) hide show
  1. package/dist/Blok.js +11 -11
  2. package/dist/Blok.js.map +1 -1
  3. package/dist/Configuration.d.ts +39 -2
  4. package/dist/Configuration.js +337 -28
  5. package/dist/Configuration.js.map +1 -1
  6. package/dist/ConfigurationResolver.d.ts +9 -0
  7. package/dist/ConfigurationResolver.js +17 -1
  8. package/dist/ConfigurationResolver.js.map +1 -1
  9. package/dist/PayloadTooLargeError.d.ts +19 -0
  10. package/dist/PayloadTooLargeError.js +29 -0
  11. package/dist/PayloadTooLargeError.js.map +1 -0
  12. package/dist/RunCancelledError.d.ts +17 -0
  13. package/dist/RunCancelledError.js +25 -0
  14. package/dist/RunCancelledError.js.map +1 -0
  15. package/dist/RunnerSteps.js +363 -23
  16. package/dist/RunnerSteps.js.map +1 -1
  17. package/dist/RuntimeAdapterNode.d.ts +32 -2
  18. package/dist/RuntimeAdapterNode.js +122 -27
  19. package/dist/RuntimeAdapterNode.js.map +1 -1
  20. package/dist/SubworkflowNode.d.ts +75 -0
  21. package/dist/SubworkflowNode.js +221 -0
  22. package/dist/SubworkflowNode.js.map +1 -0
  23. package/dist/TriggerBase.d.ts +128 -0
  24. package/dist/TriggerBase.js +808 -6
  25. package/dist/TriggerBase.js.map +1 -1
  26. package/dist/WaitDispatchRequest.d.ts +38 -0
  27. package/dist/WaitDispatchRequest.js +13 -0
  28. package/dist/WaitDispatchRequest.js.map +1 -0
  29. package/dist/WaitNode.d.ts +23 -0
  30. package/dist/WaitNode.js +26 -0
  31. package/dist/WaitNode.js.map +1 -0
  32. package/dist/adapters/BunRuntimeAdapter.d.ts +1 -0
  33. package/dist/adapters/BunRuntimeAdapter.js +1 -0
  34. package/dist/adapters/BunRuntimeAdapter.js.map +1 -1
  35. package/dist/adapters/DockerRuntimeAdapter.d.ts +2 -1
  36. package/dist/adapters/DockerRuntimeAdapter.js +10 -1
  37. package/dist/adapters/DockerRuntimeAdapter.js.map +1 -1
  38. package/dist/adapters/HttpRuntimeAdapter.d.ts +26 -5
  39. package/dist/adapters/HttpRuntimeAdapter.js +97 -16
  40. package/dist/adapters/HttpRuntimeAdapter.js.map +1 -1
  41. package/dist/adapters/NodeJsRuntimeAdapter.d.ts +1 -0
  42. package/dist/adapters/NodeJsRuntimeAdapter.js +1 -0
  43. package/dist/adapters/NodeJsRuntimeAdapter.js.map +1 -1
  44. package/dist/adapters/RuntimeAdapter.d.ts +17 -0
  45. package/dist/adapters/WasmRuntimeAdapter.d.ts +1 -0
  46. package/dist/adapters/WasmRuntimeAdapter.js +1 -0
  47. package/dist/adapters/WasmRuntimeAdapter.js.map +1 -1
  48. package/dist/adapters/grpc/GrpcChannelOptions.d.ts +31 -0
  49. package/dist/adapters/grpc/GrpcChannelOptions.js +68 -0
  50. package/dist/adapters/grpc/GrpcChannelOptions.js.map +1 -0
  51. package/dist/adapters/grpc/GrpcClientPool.d.ts +43 -0
  52. package/dist/adapters/grpc/GrpcClientPool.js +89 -0
  53. package/dist/adapters/grpc/GrpcClientPool.js.map +1 -0
  54. package/dist/adapters/grpc/GrpcCodec.d.ts +226 -0
  55. package/dist/adapters/grpc/GrpcCodec.js +275 -0
  56. package/dist/adapters/grpc/GrpcCodec.js.map +1 -0
  57. package/dist/adapters/grpc/GrpcErrors.d.ts +59 -0
  58. package/dist/adapters/grpc/GrpcErrors.js +190 -0
  59. package/dist/adapters/grpc/GrpcErrors.js.map +1 -0
  60. package/dist/adapters/grpc/GrpcHealthChecker.d.ts +69 -0
  61. package/dist/adapters/grpc/GrpcHealthChecker.js +96 -0
  62. package/dist/adapters/grpc/GrpcHealthChecker.js.map +1 -0
  63. package/dist/adapters/grpc/GrpcRuntimeAdapter.d.ts +98 -0
  64. package/dist/adapters/grpc/GrpcRuntimeAdapter.js +478 -0
  65. package/dist/adapters/grpc/GrpcRuntimeAdapter.js.map +1 -0
  66. package/dist/adapters/grpc/index.d.ts +13 -0
  67. package/dist/adapters/grpc/index.js +14 -0
  68. package/dist/adapters/grpc/index.js.map +1 -0
  69. package/dist/adapters/grpc/proto/blok/runtime/v1/runtime.proto +302 -0
  70. package/dist/adapters/grpc/types.d.ts +97 -0
  71. package/dist/adapters/grpc/types.js +41 -0
  72. package/dist/adapters/grpc/types.js.map +1 -0
  73. package/dist/adapters/transport.d.ts +108 -0
  74. package/dist/adapters/transport.js +196 -0
  75. package/dist/adapters/transport.js.map +1 -0
  76. package/dist/concurrency/ConcurrencyBackend.d.ts +61 -0
  77. package/dist/concurrency/ConcurrencyBackend.js +20 -0
  78. package/dist/concurrency/ConcurrencyBackend.js.map +1 -0
  79. package/dist/concurrency/ConcurrencyLimitError.d.ts +37 -0
  80. package/dist/concurrency/ConcurrencyLimitError.js +16 -0
  81. package/dist/concurrency/ConcurrencyLimitError.js.map +1 -0
  82. package/dist/concurrency/NatsKvConcurrencyBackend.d.ts +64 -0
  83. package/dist/concurrency/NatsKvConcurrencyBackend.js +297 -0
  84. package/dist/concurrency/NatsKvConcurrencyBackend.js.map +1 -0
  85. package/dist/concurrency/QueueExpiredError.d.ts +40 -0
  86. package/dist/concurrency/QueueExpiredError.js +15 -0
  87. package/dist/concurrency/QueueExpiredError.js.map +1 -0
  88. package/dist/concurrency/createConcurrencyBackend.d.ts +23 -0
  89. package/dist/concurrency/createConcurrencyBackend.js +34 -0
  90. package/dist/concurrency/createConcurrencyBackend.js.map +1 -0
  91. package/dist/concurrency/readConcurrencyConfig.d.ts +60 -0
  92. package/dist/concurrency/readConcurrencyConfig.js +60 -0
  93. package/dist/concurrency/readConcurrencyConfig.js.map +1 -0
  94. package/dist/idempotency/resolveIdempotencyKey.d.ts +20 -0
  95. package/dist/idempotency/resolveIdempotencyKey.js +37 -0
  96. package/dist/idempotency/resolveIdempotencyKey.js.map +1 -0
  97. package/dist/index.d.ts +35 -3
  98. package/dist/index.js +61 -2
  99. package/dist/index.js.map +1 -1
  100. package/dist/monitoring/ConcurrencyMetrics.d.ts +56 -0
  101. package/dist/monitoring/ConcurrencyMetrics.js +107 -0
  102. package/dist/monitoring/ConcurrencyMetrics.js.map +1 -0
  103. package/dist/monitoring/JanitorMetrics.d.ts +27 -0
  104. package/dist/monitoring/JanitorMetrics.js +48 -0
  105. package/dist/monitoring/JanitorMetrics.js.map +1 -0
  106. package/dist/scheduling/DebounceCoordinator.d.ts +88 -0
  107. package/dist/scheduling/DebounceCoordinator.js +141 -0
  108. package/dist/scheduling/DebounceCoordinator.js.map +1 -0
  109. package/dist/scheduling/DeferredDispatchSignal.d.ts +50 -0
  110. package/dist/scheduling/DeferredDispatchSignal.js +14 -0
  111. package/dist/scheduling/DeferredDispatchSignal.js.map +1 -0
  112. package/dist/scheduling/DeferredRunScheduler.d.ts +68 -0
  113. package/dist/scheduling/DeferredRunScheduler.js +154 -0
  114. package/dist/scheduling/DeferredRunScheduler.js.map +1 -0
  115. package/dist/scheduling/readSchedulingConfig.d.ts +24 -0
  116. package/dist/scheduling/readSchedulingConfig.js +52 -0
  117. package/dist/scheduling/readSchedulingConfig.js.map +1 -0
  118. package/dist/testing/WorkflowTestRunner.js +12 -0
  119. package/dist/testing/WorkflowTestRunner.js.map +1 -1
  120. package/dist/timeouts/StepTimeoutError.d.ts +22 -0
  121. package/dist/timeouts/StepTimeoutError.js +31 -0
  122. package/dist/timeouts/StepTimeoutError.js.map +1 -0
  123. package/dist/tracing/InMemoryRunStore.d.ts +28 -1
  124. package/dist/tracing/InMemoryRunStore.js +150 -0
  125. package/dist/tracing/InMemoryRunStore.js.map +1 -1
  126. package/dist/tracing/Janitor.d.ts +70 -0
  127. package/dist/tracing/Janitor.js +150 -0
  128. package/dist/tracing/Janitor.js.map +1 -0
  129. package/dist/tracing/PostgresRunStore.d.ts +30 -0
  130. package/dist/tracing/PostgresRunStore.js +435 -3
  131. package/dist/tracing/PostgresRunStore.js.map +1 -1
  132. package/dist/tracing/RunStore.d.ts +100 -1
  133. package/dist/tracing/RunTracker.d.ts +261 -11
  134. package/dist/tracing/RunTracker.js +691 -11
  135. package/dist/tracing/RunTracker.js.map +1 -1
  136. package/dist/tracing/SqliteRunStore.d.ts +23 -1
  137. package/dist/tracing/SqliteRunStore.js +421 -6
  138. package/dist/tracing/SqliteRunStore.js.map +1 -1
  139. package/dist/tracing/TraceRouter.d.ts +20 -2
  140. package/dist/tracing/TraceRouter.js +494 -9
  141. package/dist/tracing/TraceRouter.js.map +1 -1
  142. package/dist/tracing/sanitize.d.ts +11 -0
  143. package/dist/tracing/sanitize.js +29 -0
  144. package/dist/tracing/sanitize.js.map +1 -1
  145. package/dist/tracing/types.d.ts +429 -11
  146. package/dist/types/GlobalOptions.d.ts +9 -2
  147. package/dist/utils/createChildContext.d.ts +32 -0
  148. package/dist/utils/createChildContext.js +113 -0
  149. package/dist/utils/createChildContext.js.map +1 -0
  150. package/dist/workflow/PersistenceHelper.d.ts +46 -0
  151. package/dist/workflow/PersistenceHelper.js +57 -0
  152. package/dist/workflow/PersistenceHelper.js.map +1 -0
  153. package/dist/workflow/WorkflowNormalizer.d.ts +79 -0
  154. package/dist/workflow/WorkflowNormalizer.js +486 -0
  155. package/dist/workflow/WorkflowNormalizer.js.map +1 -0
  156. package/dist/workflow/WorkflowRegistry.d.ts +64 -0
  157. package/dist/workflow/WorkflowRegistry.js +81 -0
  158. package/dist/workflow/WorkflowRegistry.js.map +1 -0
  159. package/package.json +10 -7
@@ -1,4 +1,14 @@
1
1
  import LocalStorage from "./LocalStorage";
2
+ import { normalizeWorkflow } from "./workflow/WorkflowNormalizer";
3
+ /**
4
+ * ConfigurationResolver loads a workflow from any registered storage target
5
+ * (filesystem, in-memory, etc.) and runs it through the v1→v2 normalizer
6
+ * before returning it to the caller.
7
+ *
8
+ * This is the single pinch point for workflow loading — every trigger
9
+ * (HTTP, Cron, future) goes through here, so the normalizer applies once
10
+ * regardless of how the workflow is fetched.
11
+ */
2
12
  export default class ConfigurationResolver {
3
13
  targets = {};
4
14
  globalOptions = {};
@@ -9,7 +19,13 @@ export default class ConfigurationResolver {
9
19
  this.globalOptions = opts;
10
20
  }
11
21
  async get(target, name) {
12
- return await this.targets[target].get(name, this.globalOptions.workflows);
22
+ const raw = await this.targets[target].get(name, this.globalOptions.workflows);
23
+ // Normalize v1 → v2 (or pass v2 through). Always returns the
24
+ // canonical internal shape that Configuration.getSteps consumes.
25
+ // Cast back to `unknown` so the existing call-site (`Configuration.init`)
26
+ // continues to use its own untyped projections — no type churn beyond
27
+ // this one point.
28
+ return normalizeWorkflow(raw, name);
13
29
  }
14
30
  }
15
31
  //# sourceMappingURL=ConfigurationResolver.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigurationResolver.js","sourceRoot":"","sources":["../src/ConfigurationResolver.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAI1C,MAAM,CAAC,OAAO,OAAO,qBAAqB;IACjC,OAAO,GAAY,EAAE,CAAC;IACtB,aAAa,GAAiC,EAAE,CAAC;IAEzD,YAAY,IAAmB;QAC9B,IAAI,CAAC,OAAO,GAAG;YACd,KAAK,EAAE,IAAI,YAAY,EAAE;SACzB,CAAC;QAEF,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,MAAc,EAAE,IAAY;QACrC,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAC3E,CAAC;CACD"}
1
+ {"version":3,"file":"ConfigurationResolver.js","sourceRoot":"","sources":["../src/ConfigurationResolver.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAG1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,OAAO,qBAAqB;IACjC,OAAO,GAAY,EAAE,CAAC;IACtB,aAAa,GAAiC,EAAE,CAAC;IAEzD,YAAY,IAAmB;QAC9B,IAAI,CAAC,OAAO,GAAG;YACd,KAAK,EAAE,IAAI,YAAY,EAAE;SACzB,CAAC;QAEF,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,MAAc,EAAE,IAAY;QACrC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QAC/E,6DAA6D;QAC7D,iEAAiE;QACjE,0EAA0E;QAC1E,sEAAsE;QACtE,kBAAkB;QAClB,OAAO,iBAAiB,CAAC,GAAG,EAAE,IAAI,CAA0E,CAAC;IAC9G,CAAC;CACD"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * PR 2 follow-up · A4 fix.
3
+ *
4
+ * Thrown by `HttpTrigger.extractDispatchPayload` when a request body
5
+ * would push the durable scheduler row past `BLOK_DISPATCH_PAYLOAD_MAX_BYTES`
6
+ * (default 1MB). Distinct error class so the HTTP transport can translate
7
+ * to `413 Payload Too Large` with structured info instead of a generic 500.
8
+ *
9
+ * Operators tune the cap via `BLOK_DISPATCH_PAYLOAD_MAX_BYTES` (number,
10
+ * bytes). Authors with large-payload workflows (file uploads, etc.) can
11
+ * either raise the cap, pre-strip the body before deferring, or skip
12
+ * durable persistence entirely (don't override `extractDispatchPayload`).
13
+ */
14
+ export declare class PayloadTooLargeError extends Error {
15
+ readonly actualBytes: number;
16
+ readonly maxBytes: number;
17
+ constructor(actualBytes: number, maxBytes: number, message?: string);
18
+ }
19
+ export declare function isPayloadTooLargeError(err: unknown): err is PayloadTooLargeError;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * PR 2 follow-up · A4 fix.
3
+ *
4
+ * Thrown by `HttpTrigger.extractDispatchPayload` when a request body
5
+ * would push the durable scheduler row past `BLOK_DISPATCH_PAYLOAD_MAX_BYTES`
6
+ * (default 1MB). Distinct error class so the HTTP transport can translate
7
+ * to `413 Payload Too Large` with structured info instead of a generic 500.
8
+ *
9
+ * Operators tune the cap via `BLOK_DISPATCH_PAYLOAD_MAX_BYTES` (number,
10
+ * bytes). Authors with large-payload workflows (file uploads, etc.) can
11
+ * either raise the cap, pre-strip the body before deferring, or skip
12
+ * durable persistence entirely (don't override `extractDispatchPayload`).
13
+ */
14
+ export class PayloadTooLargeError extends Error {
15
+ actualBytes;
16
+ maxBytes;
17
+ constructor(actualBytes, maxBytes, message) {
18
+ super(message ??
19
+ `Dispatch payload too large for durable scheduling: ${actualBytes} bytes exceeds cap of ${maxBytes} bytes (configurable via BLOK_DISPATCH_PAYLOAD_MAX_BYTES).`);
20
+ this.name = "PayloadTooLargeError";
21
+ this.actualBytes = actualBytes;
22
+ this.maxBytes = maxBytes;
23
+ Object.setPrototypeOf(this, PayloadTooLargeError.prototype);
24
+ }
25
+ }
26
+ export function isPayloadTooLargeError(err) {
27
+ return err instanceof PayloadTooLargeError;
28
+ }
29
+ //# sourceMappingURL=PayloadTooLargeError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PayloadTooLargeError.js","sourceRoot":"","sources":["../src/PayloadTooLargeError.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IACrC,WAAW,CAAS;IACpB,QAAQ,CAAS;IAE1B,YAAY,WAAmB,EAAE,QAAgB,EAAE,OAAgB;QAClE,KAAK,CACJ,OAAO;YACN,sDAAsD,WAAW,yBAAyB,QAAQ,4DAA4D,CAC/J,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;IAC7D,CAAC;CACD;AAED,MAAM,UAAU,sBAAsB,CAAC,GAAY;IAClD,OAAO,GAAG,YAAY,oBAAoB,CAAC;AAC5C,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Tier 2 follow-up · thrown by `RunnerSteps` between steps when the
3
+ * run's `ctx.signal.aborted` flips to true (typically because an
4
+ * operator called `POST /__blok/runs/:runId/cancel` on a `running`
5
+ * run).
6
+ *
7
+ * Distinct from `Error` so `TriggerBase.run`'s catch block can:
8
+ * - Skip `failRun` (status is already `"cancelled"` via the
9
+ * tracker's `abortRunningRun` flow).
10
+ * - Re-throw so transport layers can surface the cancellation
11
+ * appropriately (HTTP 499 / Worker ACK).
12
+ */
13
+ export declare class RunCancelledError extends Error {
14
+ readonly runId?: string;
15
+ constructor(runId?: string, message?: string);
16
+ }
17
+ export declare function isRunCancelledError(err: unknown): err is RunCancelledError;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Tier 2 follow-up · thrown by `RunnerSteps` between steps when the
3
+ * run's `ctx.signal.aborted` flips to true (typically because an
4
+ * operator called `POST /__blok/runs/:runId/cancel` on a `running`
5
+ * run).
6
+ *
7
+ * Distinct from `Error` so `TriggerBase.run`'s catch block can:
8
+ * - Skip `failRun` (status is already `"cancelled"` via the
9
+ * tracker's `abortRunningRun` flow).
10
+ * - Re-throw so transport layers can surface the cancellation
11
+ * appropriately (HTTP 499 / Worker ACK).
12
+ */
13
+ export class RunCancelledError extends Error {
14
+ runId;
15
+ constructor(runId, message) {
16
+ super(message ?? `Run ${runId ?? "(unknown)"} cancelled via AbortSignal`);
17
+ this.name = "RunCancelledError";
18
+ this.runId = runId;
19
+ Object.setPrototypeOf(this, RunCancelledError.prototype);
20
+ }
21
+ }
22
+ export function isRunCancelledError(err) {
23
+ return err instanceof RunCancelledError;
24
+ }
25
+ //# sourceMappingURL=RunCancelledError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RunCancelledError.js","sourceRoot":"","sources":["../src/RunCancelledError.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAClC,KAAK,CAAU;IAExB,YAAY,KAAc,EAAE,OAAgB;QAC3C,KAAK,CAAC,OAAO,IAAI,OAAO,KAAK,IAAI,WAAW,4BAA4B,CAAC,CAAC;QAC1E,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;QAChC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC1D,CAAC;CACD;AAED,MAAM,UAAU,mBAAmB,CAAC,GAAY;IAC/C,OAAO,GAAG,YAAY,iBAAiB,CAAC;AACzC,CAAC"}
@@ -1,6 +1,58 @@
1
1
  import { GlobalError } from "@blokjs/shared";
2
+ import { RunCancelledError } from "./RunCancelledError";
3
+ import { WaitDispatchRequest } from "./WaitDispatchRequest";
4
+ import { resolveIdempotencyKey } from "./idempotency/resolveIdempotencyKey";
5
+ import { StepTimeoutError } from "./timeouts/StepTimeoutError";
2
6
  import { RunTracker } from "./tracing/RunTracker";
3
7
  import { sanitize } from "./tracing/sanitize";
8
+ import { applyStepOutput } from "./workflow/PersistenceHelper";
9
+ /**
10
+ * Default TTL for idempotency cache entries when the step author does not
11
+ * pass `idempotencyKeyTTL` explicitly. 24 hours, matching Trigger.dev's
12
+ * default and the decision recorded in the Tier 1 ROADMAP session.
13
+ */
14
+ const DEFAULT_IDEMPOTENCY_TTL_MS = 24 * 60 * 60 * 1000;
15
+ /**
16
+ * Compute the delay before retry attempt N+1 using capped exponential
17
+ * backoff. Mirrors Trigger.dev's `retry` semantics — no jitter by default.
18
+ *
19
+ * `delay = min(maxTimeoutInMs, minTimeoutInMs * factor^(attempt - 1))`
20
+ *
21
+ * Defaults: min=1000, max=30000, factor=2 — same as Trigger.dev.
22
+ */
23
+ function computeBackoff(config, attempt) {
24
+ const min = config.minTimeoutInMs ?? 1000;
25
+ const max = config.maxTimeoutInMs ?? 30000;
26
+ const factor = config.factor ?? 2;
27
+ const raw = min * factor ** Math.max(0, attempt - 1);
28
+ return Math.min(max, Math.floor(raw));
29
+ }
30
+ function sleep(ms) {
31
+ return new Promise((resolve) => {
32
+ setTimeout(resolve, ms);
33
+ });
34
+ }
35
+ /**
36
+ * Tier 2 quick-wins — wrap a Promise in a setTimeout-based timeout
37
+ * race. On timeout, rejects with `StepTimeoutError`. The underlying
38
+ * `fn()` continues to run (no AbortSignal cancellation in v1) but
39
+ * the runner has already moved on — orphaned resolution settles
40
+ * harmlessly into the void.
41
+ */
42
+ function wrapWithTimeout(fn, ms, stepName) {
43
+ return new Promise((resolve, reject) => {
44
+ const timer = setTimeout(() => {
45
+ reject(new StepTimeoutError(stepName, ms));
46
+ }, ms);
47
+ fn().then((value) => {
48
+ clearTimeout(timer);
49
+ resolve(value);
50
+ }, (err) => {
51
+ clearTimeout(timer);
52
+ reject(err);
53
+ });
54
+ });
55
+ }
4
56
  export default class RunnerSteps {
5
57
  /**
6
58
  * Executes a series of steps in the given context.
@@ -23,8 +75,34 @@ export default class RunnerSteps {
23
75
  let flow_steps = [];
24
76
  let flow_step = 0;
25
77
  let stepName = "";
78
+ // PR 4 — wait.for / wait.until resume cursor.
79
+ //
80
+ // On `dispatchDeferred` re-entry from a wait step, the runner
81
+ // must skip past pre-wait steps that already completed in the
82
+ // previous pass. `lastCompletedStepIndex` is set on the run
83
+ // record before each WaitDispatchRequest throw and read here
84
+ // at runSteps entry. Default `-1` = no resume; runner starts
85
+ // at i = 0.
86
+ const persistedRun = !deep && tracker && traceRunId ? tracker.getStore().getRun(traceRunId) : undefined;
87
+ const resumeFromIndex = persistedRun?.lastCompletedStepIndex !== undefined ? persistedRun.lastCompletedStepIndex + 1 : 0;
26
88
  for (let i = 0; i < steps.length; i++) {
27
89
  const step = steps[i];
90
+ // PR 4 — skip pre-wait steps on resume. State + NodeRuns
91
+ // from the first pass are still on `ctx.state` / in the
92
+ // store; the runner just advances past them.
93
+ if (i < resumeFromIndex) {
94
+ ctx.logger.log(`[step ${i + 1}/${steps.length}] ${step.name} → skipped (resumed past wait at lastCompletedStepIndex=${persistedRun?.lastCompletedStepIndex})`);
95
+ continue;
96
+ }
97
+ // Tier 2 follow-up · cooperative cancellation. Operators can
98
+ // abort `running` runs via `POST /__blok/runs/:runId/cancel`,
99
+ // which fires the ctx's AbortController. The check is between
100
+ // steps so a long-running step's `step.process()` doesn't have
101
+ // to consult the signal itself (though nodes that want finer
102
+ // granularity can read `ctx.signal.aborted` themselves).
103
+ if (ctx.signal?.aborted) {
104
+ throw new RunCancelledError(traceRunId);
105
+ }
28
106
  if (!step.active) {
29
107
  // Track skipped nodes
30
108
  if (tracker && traceRunId) {
@@ -38,47 +116,292 @@ export default class RunnerSteps {
38
116
  if (!step.flow) {
39
117
  // --- Trace: start node ---
40
118
  let nodeRunId;
119
+ const stepAny = step;
120
+ const stepType = stepAny.type || "unknown";
121
+ // Runtime nodes (RuntimeAdapterNode) expose `transport` so
122
+ // operators can tell at a glance whether the step ran via
123
+ // HTTP, gRPC, or in-process module nodes. Module/local
124
+ // nodes don't carry the field — prefix stays one-tag.
125
+ const transport = stepAny.transport;
126
+ const stepPrefix = transport
127
+ ? `[step ${i + 1}/${steps.length}] ${step.name} (${stepType}, ${transport})`
128
+ : `[step ${i + 1}/${steps.length}] ${step.name} (${stepType})`;
129
+ // --- Step metadata for runtime adapters ---
130
+ // Populate `ctx._stepInfo` so adapters (e.g. GrpcRuntimeAdapter)
131
+ // can report the step's position in the workflow without each
132
+ // adapter having to plumb its own counter. Set unconditionally —
133
+ // independent of whether tracing is enabled.
134
+ ctx._stepInfo = {
135
+ name: step.name,
136
+ index: i,
137
+ total: steps.length,
138
+ depth: depthLevel,
139
+ };
41
140
  if (tracker && traceRunId) {
42
- const stepAny = step;
43
141
  const configAny = ctx.config;
142
+ // Tier 2 #4 sub-workflow: capture the `wait` mode so
143
+ // Studio can render `↳ async` (wait:false) vs `↳ sub`
144
+ // (wait:true / default) in StepRail. Only meaningful
145
+ // for subworkflow steps; undefined elsewhere.
146
+ const subworkflowWait = stepType === "subworkflow" ? stepAny.wait : undefined;
147
+ // PR 5 E3 — surface sub-workflow nesting depth.
148
+ // `_subworkflowDepth` on ctx is set by SubworkflowNode +
149
+ // createChildContext; the parent's invocation of a
150
+ // child step has depth = parent.depth + 1. Top-level =
151
+ // 1; nested = 2+. Only meaningful for subworkflow steps.
152
+ const subworkflowDepth = stepType === "subworkflow"
153
+ ? (ctx._subworkflowDepth ?? 0) + 1
154
+ : undefined;
44
155
  const nodeRun = tracker.startNode(traceRunId, {
45
156
  nodeName: step.name,
46
- nodeType: stepAny.type || "unknown",
157
+ nodeType: stepType,
47
158
  runtimeKind: stepAny.runtime,
48
159
  inputs: sanitize(configAny?.[step.name]?.inputs ?? stepAny.config),
49
160
  depth: depthLevel,
50
161
  stepIndex: i,
162
+ wait: subworkflowWait,
163
+ subworkflowDepth,
51
164
  });
52
165
  nodeRunId = nodeRun.id;
53
166
  ctx._traceNodeId = nodeRunId;
54
167
  }
55
- try {
56
- const model = await step.process(ctx, step);
57
- ctx.response = model.data;
58
- // --- Trace: complete or fail node ---
59
- if (tracker && nodeRunId) {
60
- if (ctx.response.error) {
61
- const errMsg = typeof ctx.response.error === "string"
62
- ? ctx.response.error
63
- : ctx.response.error.message || "Node error";
64
- tracker.failNode(nodeRunId, new Error(errMsg));
168
+ // === PR 4: wait.for(duration) / wait.until(date) step ===
169
+ // Two paths:
170
+ // 1. First pass: compute deadline, mark NodeRun complete
171
+ // (the wait step has no `process()` body), set the
172
+ // run's resume cursor (lastCompletedStepIndex = i - 1),
173
+ // throw WaitDispatchRequest. TriggerBase translates to
174
+ // DeferredDispatchSignal 202 Accepted.
175
+ // 2. Re-entry (dispatchDeferred): the resume cursor logic
176
+ // at the top of runSteps already skipped indices < i.
177
+ // For the wait step itself at i = lastCompletedStepIndex
178
+ // + 1, treat it as satisfied and advance.
179
+ // Detection: existence of run.scheduledAt + wait step =
180
+ // we're on the second pass.
181
+ if (stepType === "wait") {
182
+ const waitForMs = stepAny.waitForMs;
183
+ const waitUntil = stepAny.waitUntil;
184
+ // Compute the deadline (resolves $-proxy and ISO strings).
185
+ // Review fix-up · BUG-2. A malformed `until` string used to
186
+ // silently fall through to `Date.now()` (immediate no-op).
187
+ // Authors expecting "wait until tomorrow" with a typo got a
188
+ // no-op with no warning — the worst kind of footgun. Throw
189
+ // instead so the failure surfaces immediately, both in the
190
+ // run trace + Studio's error surface.
191
+ const computeDeadline = () => {
192
+ if (typeof waitForMs === "number")
193
+ return Date.now() + waitForMs;
194
+ if (typeof waitUntil === "number")
195
+ return waitUntil;
196
+ if (typeof waitUntil === "string") {
197
+ // Try parsing as a number first (ms-since-epoch as a string).
198
+ const asNum = Number(waitUntil);
199
+ if (!Number.isNaN(asNum))
200
+ return asNum;
201
+ // ISO-date string.
202
+ const t = Date.parse(waitUntil);
203
+ if (!Number.isNaN(t))
204
+ return t;
205
+ // Fail-fast on unparseable strings (the helpful path).
206
+ throw new Error(`wait.until: cannot parse '${waitUntil}' as a number or date. Use ms-since-epoch (number or numeric string) or a valid ISO date string.`);
207
+ }
208
+ // Schema rejects this combination, but defensive: treat
209
+ // unsupported input as immediate so the runner doesn't
210
+ // hang on a never-firing timer.
211
+ return Date.now();
212
+ };
213
+ // Detect re-entry: on first pass the run has no
214
+ // scheduledAt (or it's from trigger-level delay); on
215
+ // re-entry from a wait dispatch, the run was marked
216
+ // `delayed` with scheduledAt set to the wait deadline.
217
+ const isReentry = ctx._blokDispatchReentry === true &&
218
+ resumeFromIndex > 0 &&
219
+ i === resumeFromIndex;
220
+ const deadline = computeDeadline();
221
+ const now = Date.now();
222
+ if (isReentry || deadline <= now) {
223
+ // Wait already satisfied (timer fired AND we're on
224
+ // re-entry past the deadline) OR the deadline is
225
+ // in the past (e.g., wait.for(0) or wait.until(<past>)).
226
+ // Mark NodeRun complete and advance.
227
+ if (tracker && nodeRunId) {
228
+ tracker.completeNode(nodeRunId, { __waited__: true, deadline });
65
229
  }
66
- else {
67
- tracker.completeNode(nodeRunId, sanitize(ctx.response.data));
230
+ ctx.logger.log(`[step ${i + 1}/${steps.length}] ${step.name} (wait) → satisfied`);
231
+ // Advance the resume cursor so a subsequent wait at a
232
+ // later index can rely on it.
233
+ if (tracker && traceRunId) {
234
+ tracker.getStore().updateRun(traceRunId, { lastCompletedStepIndex: i });
68
235
  }
236
+ continue;
237
+ }
238
+ // First pass: schedule + throw WaitDispatchRequest.
239
+ // Set resume cursor BEFORE throwing so re-entry knows
240
+ // where to pick up. Cursor = i - 1 (the last non-wait
241
+ // step that completed).
242
+ if (tracker && traceRunId) {
243
+ tracker.getStore().updateRun(traceRunId, {
244
+ lastCompletedStepIndex: i - 1,
245
+ });
246
+ }
247
+ ctx.logger.log(`[step ${i + 1}/${steps.length}] ${step.name} (wait) → scheduled (deadline=${new Date(deadline).toISOString()})`);
248
+ throw new WaitDispatchRequest({
249
+ scheduledAt: deadline,
250
+ stepIndex: i,
251
+ stepId: step.name,
252
+ lastCompletedStepIndex: i - 1,
253
+ });
254
+ }
255
+ // === Tier 1: idempotency cache lookup ===
256
+ // Resolve the step's idempotency key against the live ctx,
257
+ // then consult the cache. On hit, short-circuit step.process
258
+ // entirely: replay the cached result through the same v2
259
+ // persistence rules (ephemeral / spread / as), mark the
260
+ // node cached for tracing, log "cached", and skip to the
261
+ // next step. Caching layers ABOVE PersistenceHelper —
262
+ // applyStepOutput's rules apply identically to cached and
263
+ // freshly-computed results.
264
+ const workflowName = ctx.workflow_name ?? "";
265
+ const cacheStore = tracker && traceRunId ? tracker.getStore() : null;
266
+ const resolvedIdemKey = cacheStore && workflowName ? resolveIdempotencyKey(step.idempotencyKey, ctx) : null;
267
+ if (cacheStore && resolvedIdemKey && nodeRunId) {
268
+ const hit = cacheStore.getIdempotencyCache(workflowName, step.name, resolvedIdemKey);
269
+ if (hit) {
270
+ applyStepOutput(ctx, step, { data: hit.data });
271
+ ctx.response = hit.data;
272
+ tracker?.markNodeCached(nodeRunId, {
273
+ sourceRunId: hit.sourceRunId,
274
+ sourceNodeRunId: hit.sourceNodeRunId,
275
+ cachedAt: hit.cachedAt,
276
+ }, hit.data);
277
+ ctx.logger.log(`${stepPrefix} → cached (from run ${hit.sourceRunId})`);
278
+ continue;
69
279
  }
70
- if (ctx.response.error)
71
- throw ctx.response.error;
72
280
  }
73
- catch (nodeErr) {
74
- // --- Trace: fail node on exception ---
75
- if (tracker && nodeRunId) {
76
- const existing = tracker.getNodeRun(nodeRunId);
77
- if (existing && existing.status === "running") {
78
- tracker.failNode(nodeRunId, nodeErr instanceof Error ? nodeErr : new Error(String(nodeErr)));
281
+ ctx.logger.log(`${stepPrefix} → started`);
282
+ const stepStart = performance.now();
283
+ // === Tier 1: retry loop ===
284
+ // Wraps step.process() with capped exponential backoff per
285
+ // `step.retry`. Default `maxAttempts: 1` preserves
286
+ // pre-Phase-4 behaviour exactly (single attempt, no retry).
287
+ // Soft errors (model.data.error returned from the SDK)
288
+ // participate in retry alongside thrown errors — both flow
289
+ // through the catch block below.
290
+ const retryConfig = step.retry;
291
+ const maxAttempts = retryConfig ? Math.max(1, retryConfig.maxAttempts) : 1;
292
+ // Tier 2 quick-wins — per-attempt timeout. When unset, the
293
+ // step runs without a cap. Numeric `maxDurationMs` arrives
294
+ // pre-parsed from `Configuration` (string `"30s"` →
295
+ // `30000` via `parseDuration`).
296
+ const maxDurationMs = step.maxDurationMs;
297
+ let attempt = 0;
298
+ while (true) {
299
+ attempt += 1;
300
+ try {
301
+ const processInvocation = () => step.process(ctx, step);
302
+ const model = typeof maxDurationMs === "number" && maxDurationMs > 0
303
+ ? await wrapWithTimeout(processInvocation, maxDurationMs, step.name)
304
+ : await processInvocation();
305
+ ctx.response = model.data;
306
+ // Treat soft errors (data carries `.error`) the same as
307
+ // thrown errors so retry semantics are uniform.
308
+ if (ctx.response?.error) {
309
+ throw ctx.response.error;
310
+ }
311
+ // === Tier 1: idempotency cache write ===
312
+ // Cache on the success path only — failed steps are
313
+ // re-runnable. Honour `idempotencyKeyTTL` per step;
314
+ // default 24h. A TTL of 0 stores an immediately-
315
+ // expired entry (useful as a kill-switch).
316
+ if (cacheStore && resolvedIdemKey && nodeRunId && traceRunId) {
317
+ const ttlField = step.idempotencyKeyTTL;
318
+ const ttlMs = typeof ttlField === "number" ? ttlField : DEFAULT_IDEMPOTENCY_TTL_MS;
319
+ const now = Date.now();
320
+ const expiresAt = ttlMs > 0 ? now + ttlMs : now - 1;
321
+ cacheStore.setIdempotencyCache(workflowName, step.name, resolvedIdemKey, {
322
+ data: model.data,
323
+ cachedAt: now,
324
+ expiresAt,
325
+ sourceRunId: traceRunId,
326
+ sourceNodeRunId: nodeRunId,
327
+ });
328
+ }
329
+ const stepDuration = (performance.now() - stepStart).toFixed(1);
330
+ // --- Trace: complete node ---
331
+ if (tracker && nodeRunId) {
332
+ // `_stepMetrics` is stashed on ctx by RuntimeAdapterNode
333
+ // when an adapter returns metrics (gRPC wire bytes,
334
+ // duration, cpu, memory). Threading it through
335
+ // `completeNode` is what gets the metrics into the
336
+ // run store + NODE_COMPLETED event payload — Studio's
337
+ // inspector reads them from there.
338
+ const ctxAny = ctx;
339
+ const stepMetrics = ctxAny._stepMetrics;
340
+ ctxAny._stepMetrics = undefined;
341
+ tracker.completeNode(nodeRunId, sanitize(ctx.response.data), stepMetrics);
342
+ // PR 4 — advance the resume cursor after each
343
+ // successful non-wait step. A subsequent wait step
344
+ // reads this value to set its own cursor before
345
+ // throwing WaitDispatchRequest. Only at top-level
346
+ // (deep=false); nested branch flow doesn't update.
347
+ if (!deep && traceRunId) {
348
+ tracker.getStore().updateRun(traceRunId, { lastCompletedStepIndex: i });
349
+ }
350
+ }
351
+ const attemptSuffix = attempt > 1 ? ` after ${attempt} attempts` : "";
352
+ ctx.logger.log(`${stepPrefix} → completed (${stepDuration}ms${attemptSuffix})`);
353
+ break;
354
+ }
355
+ catch (nodeErr) {
356
+ if (attempt < maxAttempts && retryConfig) {
357
+ // More attempts remain — record this as a soft
358
+ // failure and back off before retrying. The node
359
+ // stays in `running` status; failNode is the
360
+ // terminal call.
361
+ if (tracker && nodeRunId) {
362
+ tracker.recordNodeAttemptFailed(nodeRunId, { attempt, error: nodeErr });
363
+ }
364
+ const backoffMs = computeBackoff(retryConfig, attempt);
365
+ const errMsg = nodeErr instanceof Error ? nodeErr.message : String(nodeErr);
366
+ ctx.logger.log(`${stepPrefix} → attempt ${attempt}/${maxAttempts} failed (${errMsg}), retrying in ${backoffMs}ms`);
367
+ await sleep(backoffMs);
368
+ continue;
369
+ }
370
+ // Final attempt — fail the node and propagate the
371
+ // enriched error so RunnerSteps' outer catch can
372
+ // wrap it as a GlobalError.
373
+ if (tracker && nodeRunId) {
374
+ const existing = tracker.getNodeRun(nodeRunId);
375
+ if (existing && existing.status === "running") {
376
+ tracker.failNode(nodeRunId, nodeErr instanceof Error ? nodeErr : new Error(String(nodeErr)));
377
+ }
378
+ }
379
+ // Tier 2 quick-wins — final-attempt timeout flips
380
+ // the run to "timedOut" (distinct from "failed").
381
+ // Only when the FINAL error was a StepTimeoutError;
382
+ // mixed failures (some retries timed out, final
383
+ // retry threw a different error) keep the normal
384
+ // "failed" status.
385
+ if (tracker &&
386
+ traceRunId &&
387
+ typeof maxDurationMs === "number" &&
388
+ maxDurationMs > 0 &&
389
+ nodeErr instanceof StepTimeoutError) {
390
+ tracker.markRunTimedOut(traceRunId, {
391
+ stepId: step.name,
392
+ maxDurationMs,
393
+ attemptsExhausted: attempt,
394
+ });
79
395
  }
396
+ const stepDuration = (performance.now() - stepStart).toFixed(1);
397
+ const attemptSuffix = attempt > 1 ? ` after ${attempt} attempts` : "";
398
+ ctx.logger.log(`${stepPrefix} → FAILED (${stepDuration}ms${attemptSuffix})`);
399
+ // Enrich error with step context so developers know which step failed
400
+ const originalMsg = nodeErr instanceof Error ? nodeErr.message : String(nodeErr);
401
+ const enrichedError = new Error(`${stepPrefix} failed: ${originalMsg}`);
402
+ enrichedError.cause = nodeErr;
403
+ throw enrichedError;
80
404
  }
81
- throw nodeErr;
82
405
  }
83
406
  }
84
407
  else {
@@ -95,6 +418,23 @@ export default class RunnerSteps {
95
418
  }
96
419
  }
97
420
  catch (e) {
421
+ // PR 1 follow-up · A2 fix companion. RunCancelledError carries
422
+ // the cancellation contract end-to-end — wrapping it as
423
+ // GlobalError would defeat TriggerBase.run's `instanceof
424
+ // RunCancelledError` discrimination and the run would get
425
+ // failRun'd on top of an already-cancelled status. Pass through
426
+ // untouched so the catch in TriggerBase.run sees the right type.
427
+ if (e instanceof RunCancelledError) {
428
+ throw e;
429
+ }
430
+ // PR 4 — WaitDispatchRequest is the wait.for / wait.until
431
+ // step's signal to TriggerBase that it should schedule a
432
+ // deferred dispatch. Same pass-through rationale as
433
+ // RunCancelledError — the catch in TriggerBase.run translates
434
+ // it to DeferredDispatchSignal + 202.
435
+ if (e instanceof WaitDispatchRequest) {
436
+ throw e;
437
+ }
98
438
  let error_context = {};
99
439
  if (e instanceof GlobalError) {
100
440
  error_context = e;
@@ -1 +1 @@
1
- {"version":3,"file":"RunnerSteps.js","sourceRoot":"","sources":["../src/RunnerSteps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,WAAW,EAA4B,MAAM,gBAAgB,CAAC;AAErF,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,MAAM,CAAC,OAAO,OAAgB,WAAW;IACxC;;;;;;;;;OASG;IACH,KAAK,CAAC,QAAQ,CAAC,GAAY,EAAE,KAAiB,EAAE,IAAI,GAAG,KAAK,EAAE,SAAS,GAAG,EAAE;QAC3E,GAAG,CAAC,MAAM,GAAG,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC;QAE/B,MAAM,UAAU,GAAI,GAA+B,CAAC,WAAiC,CAAC;QACtF,MAAM,OAAO,GAAG,UAAU,CA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