@lotiai/composer 0.4.0 → 0.6.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.
- package/README.md +225 -0
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/async/build/workflow-factory.d.ts +14 -3
- package/dist/internal/async/build/workflow-factory.d.ts.map +1 -1
- package/dist/internal/async/build/workflow-factory.js +201 -30
- package/dist/internal/async/build/workflow-factory.js.map +1 -1
- package/dist/internal/async/execute/temporal-client.d.ts +10 -1
- package/dist/internal/async/execute/temporal-client.d.ts.map +1 -1
- package/dist/internal/async/execute/temporal-client.js +26 -1
- package/dist/internal/async/execute/temporal-client.js.map +1 -1
- package/dist/internal/async/execute/workflow-execution.d.ts +2 -4
- package/dist/internal/async/execute/workflow-execution.d.ts.map +1 -1
- package/dist/internal/async/execute/workflow-execution.js +5 -1
- package/dist/internal/async/execute/workflow-execution.js.map +1 -1
- package/dist/internal/async/metrics/task-queue-metrics.d.ts.map +1 -1
- package/dist/internal/async/metrics/task-queue-metrics.js +4 -8
- package/dist/internal/async/metrics/task-queue-metrics.js.map +1 -1
- package/dist/internal/async/register/activity-worker.d.ts +14 -1
- package/dist/internal/async/register/activity-worker.d.ts.map +1 -1
- package/dist/internal/async/register/activity-worker.js +86 -22
- package/dist/internal/async/register/activity-worker.js.map +1 -1
- package/dist/internal/async/register/generate-workflow-source.d.ts.map +1 -1
- package/dist/internal/async/register/generate-workflow-source.js +5 -1
- package/dist/internal/async/register/generate-workflow-source.js.map +1 -1
- package/dist/internal/async/register/workflow-worker.d.ts +11 -0
- package/dist/internal/async/register/workflow-worker.d.ts.map +1 -1
- package/dist/internal/async/register/workflow-worker.js +7 -3
- package/dist/internal/async/register/workflow-worker.js.map +1 -1
- package/dist/internal/async/register-scripts/start-activity-worker.d.ts.map +1 -1
- package/dist/internal/async/register-scripts/start-activity-worker.js +2 -3
- package/dist/internal/async/register-scripts/start-activity-worker.js.map +1 -1
- package/dist/internal/async/register-scripts/start-workflow-worker.d.ts.map +1 -1
- package/dist/internal/async/register-scripts/start-workflow-worker.js +2 -3
- package/dist/internal/async/register-scripts/start-workflow-worker.js.map +1 -1
- package/dist/internal/async/register-scripts/sync-schedules-via-lambda.d.ts.map +1 -1
- package/dist/internal/async/register-scripts/sync-schedules-via-lambda.js +22 -13
- package/dist/internal/async/register-scripts/sync-schedules-via-lambda.js.map +1 -1
- package/dist/internal/async/register-scripts/sync-schedules.d.ts.map +1 -1
- package/dist/internal/async/register-scripts/sync-schedules.js +6 -3
- package/dist/internal/async/register-scripts/sync-schedules.js.map +1 -1
- package/dist/internal/async/schedule/sync-schedules.d.ts +6 -0
- package/dist/internal/async/schedule/sync-schedules.d.ts.map +1 -1
- package/dist/internal/async/schedule/sync-schedules.js +16 -7
- package/dist/internal/async/schedule/sync-schedules.js.map +1 -1
- package/dist/internal/context-provider.d.ts +43 -1
- package/dist/internal/context-provider.d.ts.map +1 -1
- package/dist/internal/create-composer.js +11 -2
- package/dist/internal/create-composer.js.map +1 -1
- package/dist/internal/dag-sync-step.d.ts +43 -0
- package/dist/internal/dag-sync-step.d.ts.map +1 -1
- package/dist/internal/dag-sync-step.js.map +1 -1
- package/dist/internal/dag-sync-workflow.d.ts +3 -3
- package/dist/internal/dag-sync-workflow.d.ts.map +1 -1
- package/dist/internal/dag-sync-workflow.js +14 -11
- package/dist/internal/dag-sync-workflow.js.map +1 -1
- package/dist/internal/error-for-log.d.ts +16 -0
- package/dist/internal/error-for-log.d.ts.map +1 -0
- package/dist/internal/error-for-log.js +55 -0
- package/dist/internal/error-for-log.js.map +1 -0
- package/dist/internal/errors.d.ts +48 -7
- package/dist/internal/errors.d.ts.map +1 -1
- package/dist/internal/errors.js +68 -26
- package/dist/internal/errors.js.map +1 -1
- package/dist/internal/index.d.ts +2 -2
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/observability.d.ts +5 -2
- package/dist/internal/observability.d.ts.map +1 -1
- package/dist/internal/observability.js +48 -39
- package/dist/internal/observability.js.map +1 -1
- package/dist/internal/poll-codes.d.ts +14 -0
- package/dist/internal/poll-codes.d.ts.map +1 -0
- package/dist/internal/poll-codes.js +17 -0
- package/dist/internal/poll-codes.js.map +1 -0
- package/dist/internal/types.d.ts +28 -0
- package/dist/internal/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -92,6 +92,42 @@ export const generateImage = step<MyBag, MyContext>()({
|
|
|
92
92
|
|
|
93
93
|
`nonRetryableErrorTypes` is matched by exact string against the thrown error's `code` property. When a step throws an error carrying a `code`, the framework maps that code onto `ApplicationFailure.type`, which is the field Temporal compares against the policy — so an error with `code: "CONTENT_REJECTED"` fails the activity on its first attempt when `"CONTENT_REJECTED"` is listed. Errors without a `code` are never matched and stay retryable.
|
|
94
94
|
|
|
95
|
+
#### Waiting on an External System (Async Only)
|
|
96
|
+
|
|
97
|
+
A step that polls a long-running external job should not sleep inside the activity: a worker has few activity slots (15 on the `standard` profile), so when the dependency degrades every slot fills with sleeping pollers and unrelated activities starve behind them.
|
|
98
|
+
|
|
99
|
+
`asyncPoll` moves the wait to the workflow. The step throws `StepNotReadyError` when its work is not finished; the workflow waits on a Temporal timer and re-invokes the activity. Each attempt is an ordinary activity invocation that ends, so the slot is released across the wait.
|
|
100
|
+
|
|
101
|
+
```typescript
|
|
102
|
+
import { step, StepNotReadyError } from "@lotiai/composer";
|
|
103
|
+
|
|
104
|
+
export const awaitClearance = step<MyBag, MyContext>()({
|
|
105
|
+
name: "awaitClearance",
|
|
106
|
+
needs: ["jobId"],
|
|
107
|
+
provides: ["clearance"],
|
|
108
|
+
// Sized for a single HTTP call, because the step no longer waits.
|
|
109
|
+
asyncStartToCloseTimeout: "60 seconds",
|
|
110
|
+
asyncPoll: {
|
|
111
|
+
initialInterval: "2 seconds",
|
|
112
|
+
maximumInterval: "30 seconds",
|
|
113
|
+
timeout: "5 minutes",
|
|
114
|
+
},
|
|
115
|
+
run: async (ctx, bag) => {
|
|
116
|
+
const status = await ctx.api.getJob(bag.jobId);
|
|
117
|
+
if (status.state === "processing") {
|
|
118
|
+
throw new StepNotReadyError({ reason: "job_processing" });
|
|
119
|
+
}
|
|
120
|
+
return { clearance: status.result };
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
The interval grows by `backoffCoefficient` (default 2), is capped at `maximumInterval`, and carries 20% jitter so a shared dependency is not polled in lockstep. `timeout` is a wall-clock ceiling measured against the workflow clock — it counts the time attempts spend running, not only the time spent sleeping — and is checked before each sleep so the final wait cannot overshoot it. Exceeding it fails the step with code `COMPOSER_STEP_POLL_TIMEOUT` (exported as `STEP_POLL_TIMEOUT_CODE`) — map it if you classify failures by code.
|
|
126
|
+
|
|
127
|
+
A not-ready signal is logged at debug rather than error, so a healthy long poll does not emit an error line per tick. The schedule itself is validated before the loop runs: a sub-1 or non-finite `backoffCoefficient`, or a non-positive interval, is rejected rather than silently collapsing every wait to the 1ms floor.
|
|
128
|
+
|
|
129
|
+
Polling does not spend the step's retry budget: `COMPOSER_STEP_NOT_READY` is added to the activity's `nonRetryableErrorTypes` automatically, so Temporal hands control back to the workflow on the first signal rather than retrying first. `asyncRetry` keeps covering genuine transient failures, and any `nonRetryableErrorTypes` the step declares are preserved alongside the signal.
|
|
130
|
+
|
|
95
131
|
### Workflow
|
|
96
132
|
|
|
97
133
|
A **workflow** is a collection of steps with automatic dependency resolution. The framework builds a DAG, plans parallel execution batches, and validates all dependencies at compile-time.
|
|
@@ -267,6 +303,33 @@ Error handler return values:
|
|
|
267
303
|
- `Error` -- propagate or transform the error into the result's `error`
|
|
268
304
|
- Throwing -- `error` will be a `WorkflowErrorHandlerFailure` wrapping both the original error and the handler error
|
|
269
305
|
|
|
306
|
+
#### A Wrapper's Message Is Its Own
|
|
307
|
+
|
|
308
|
+
`WorkflowStepError`, `WorkflowBatchError` and `WorkflowErrorHandlerFailure` carry only
|
|
309
|
+
Composer's context in their `message` -- which workflow, which step, which batch -- and never
|
|
310
|
+
repeat the message of the error they wrap:
|
|
311
|
+
|
|
312
|
+
```typescript
|
|
313
|
+
stepError.message; // 'Workflow "abc" failed at step "insertUser" (batch 2)'
|
|
314
|
+
stepError.originalError.message; // the driver's message, verbatim
|
|
315
|
+
stepError.cause; // the same error, via standard error chaining
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
A wrapper goes everywhere: log lines, span attributes, Temporal event history, a parent
|
|
319
|
+
workflow's failure. Inlining the original's message put that text in all of them at once, and
|
|
320
|
+
for MikroORM/knex that message is the parameter-inlined SQL, quoting real row values.
|
|
321
|
+
|
|
322
|
+
This matters for classifying, not just printing. A wrapper copies the original's `code` so
|
|
323
|
+
`matchesError()` keeps working -- which means a classifier keying on `code` sees what looks
|
|
324
|
+
like the original error. When the message was inlined too, a scrubber that rebuilds a database
|
|
325
|
+
error's message from its structured fields would pass the wrapper through untouched, because
|
|
326
|
+
the wrapper carries `code` but not `severity`, `table` or `constraint`. Read `.cause` or
|
|
327
|
+
`.originalError` to get at the underlying error; do not read a wrapper's `message` expecting
|
|
328
|
+
to find it.
|
|
329
|
+
|
|
330
|
+
`toLogContext()` follows the same rule: it hands the logger the original `Error` object rather
|
|
331
|
+
than a `{ name, message, stack }` projection, so your serializer decides what it looks like.
|
|
332
|
+
|
|
270
333
|
### Context Provider
|
|
271
334
|
|
|
272
335
|
The context provider manages per-step resources (e.g. database connections, loggers). It is configured once via `createComposer` and used automatically for every step execution.
|
|
@@ -307,6 +370,162 @@ const composer = createComposer({
|
|
|
307
370
|
});
|
|
308
371
|
```
|
|
309
372
|
|
|
373
|
+
When Composer logs a failure it puts the **`Error` object itself** on the metadata's `error`
|
|
374
|
+
key, rather than a flattened `{ name, message, stack }`. Deciding what an error looks like in a
|
|
375
|
+
log line is the logger's job, and a projection throws away what that decision needs: a database
|
|
376
|
+
driver error's `code`, `severity`, `table` and `constraint` are gone before the logger sees
|
|
377
|
+
them, leaving it only the message -- which for MikroORM/knex is the parameter-inlined SQL,
|
|
378
|
+
quoting real row values.
|
|
379
|
+
|
|
380
|
+
Give your logger an error serializer. `pino`'s `err` serializer, or your own -- but note that
|
|
381
|
+
Composer's own error classes carry `bagState` (the whole workflow bag) and `originalError` as
|
|
382
|
+
enumerable properties. A serializer that walks enumerable own properties will emit both. Pick
|
|
383
|
+
the fields you want rather than dumping the object:
|
|
384
|
+
|
|
385
|
+
```typescript
|
|
386
|
+
const composer = createComposer({
|
|
387
|
+
contextProvider,
|
|
388
|
+
logger: {
|
|
389
|
+
// ...
|
|
390
|
+
error: (msg, meta) => pino().error({ ...meta, error: serializeError(meta?.error) }, msg),
|
|
391
|
+
},
|
|
392
|
+
});
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
A logger that `JSON.stringify`s its metadata will render an `Error` as `{}` -- that is the
|
|
396
|
+
serializer's absence showing, not Composer withholding anything.
|
|
397
|
+
|
|
398
|
+
This covers the logger Composer was given. It does **not** cover the async path's
|
|
399
|
+
workflow-side logging: `workflow-factory.ts` logs through `@temporalio/workflow`'s `wf.log`,
|
|
400
|
+
which Temporal routes to the logger on its own `Runtime`, not to this one.
|
|
401
|
+
|
|
402
|
+
Composer does not wire the injected logger into that Runtime, and will not. `Runtime.install`
|
|
403
|
+
is process-global and single-shot -- it throws once any worker has started or another
|
|
404
|
+
`install` has run -- so a library that calls it seizes a decision belonging to the host
|
|
405
|
+
process. The supported per-worker alternative does not exist either: `wf.log` is delivered by
|
|
406
|
+
a sink named `__temporal_logger`, and Temporal rejects any sink whose name carries its
|
|
407
|
+
reserved `__temporal_` prefix.
|
|
408
|
+
|
|
409
|
+
It would not restore fidelity in any case. Sink arguments cross the workflow sandbox boundary
|
|
410
|
+
by `postMessage`, which constrains them to primitives -- an `Error` cannot arrive on the other
|
|
411
|
+
side for a serializer to classify. So instead of routing those lines, Composer stops putting
|
|
412
|
+
raw error text in them: the workflow side logs an error's **name and code**, never its
|
|
413
|
+
message, and the same holds for every structure it hands to Temporal (see below).
|
|
414
|
+
|
|
415
|
+
To route the lines themselves, install your own logger before starting any worker. `Runtime`
|
|
416
|
+
is re-exported so this needs no direct dependency on `@temporalio/worker`:
|
|
417
|
+
|
|
418
|
+
```typescript
|
|
419
|
+
import { Runtime } from "@lotiai/composer";
|
|
420
|
+
|
|
421
|
+
Runtime.install({ logger: myLogger });
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
### Error Messages on Trace Spans
|
|
425
|
+
|
|
426
|
+
Span attributes go straight to the trace backend without passing through the logger, so
|
|
427
|
+
whatever redaction the logger applies does not reach them. Composer cannot vouch for a step
|
|
428
|
+
error's message, so by default it attaches **no message to any span** -- only
|
|
429
|
+
`workflow.error.type` / `step.error.type`, a built-in or Composer error name (otherwise `Error`)
|
|
430
|
+
-- and `recordException` is called with a name-only exception rather than the `Error`, whose
|
|
431
|
+
`stack` header line repeats the message.
|
|
432
|
+
|
|
433
|
+
Spans still carry `*.error.type` and `*.error.code` where the error supplies a Composer code or
|
|
434
|
+
a cataloged PostgreSQL SQLSTATE, so a failure is still identifiable in a trace. The span status
|
|
435
|
+
description is empty unless a message is rendered.
|
|
436
|
+
|
|
437
|
+
Supply `traceErrorMessage` to put text back on the span, on your terms:
|
|
438
|
+
|
|
439
|
+
```typescript
|
|
440
|
+
const composer = createComposer({
|
|
441
|
+
contextProvider,
|
|
442
|
+
// Return undefined for an error whose message should stay off the span.
|
|
443
|
+
traceErrorMessage: (error) => {
|
|
444
|
+
const cause = error instanceof WorkflowStepError ? error.originalError : error;
|
|
445
|
+
return isDriverError(cause) ? `${cause.name} ${cause.code}` : cause.message;
|
|
446
|
+
},
|
|
447
|
+
});
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
The error handed to the renderer is Composer's own wrapper, whose message is Composer's own
|
|
451
|
+
context -- `Workflow "..." failed at step "..." (batch 2)` -- and never the wrapped error's.
|
|
452
|
+
Reading `.message` is safe, but it says nothing about why the step failed; the original is on
|
|
453
|
+
`.originalError` / `.cause`, and it is that message the renderer has to decide about. If the
|
|
454
|
+
renderer throws, Composer falls back to attaching no message rather than letting it replace
|
|
455
|
+
the workflow's own error.
|
|
456
|
+
|
|
457
|
+
The full `Error` still reaches the logger either way; this controls the trace sink only. It
|
|
458
|
+
applies to sync workflow runs -- async runs use Temporal's own observability.
|
|
459
|
+
|
|
460
|
+
### Scrubbing Temporal Failures
|
|
461
|
+
|
|
462
|
+
Temporal persists an `ApplicationFailure`'s message and stack in event history and renders
|
|
463
|
+
them in the Temporal UI. Neither passes through any logging redaction, so an activity that
|
|
464
|
+
fails on a driver error puts the inlined SQL, row values and all, at rest outside every
|
|
465
|
+
redaction path.
|
|
466
|
+
|
|
467
|
+
`dataConverter` and `interceptors` are the seams for rewriting a failure before Temporal ever
|
|
468
|
+
sees it. Both are configured once on `temporal`, so every worker Composer starts and every
|
|
469
|
+
client it opens gets them:
|
|
470
|
+
|
|
471
|
+
```typescript
|
|
472
|
+
const composer = createComposer({
|
|
473
|
+
contextProvider,
|
|
474
|
+
temporal: {
|
|
475
|
+
serverAddress: "localhost:7233",
|
|
476
|
+
namespace: "my-namespace",
|
|
477
|
+
serviceName: "my-service",
|
|
478
|
+
// A module with a `failureConverter` named export.
|
|
479
|
+
dataConverter: { failureConverterPath: require.resolve("./scrubbing-failure-converter") },
|
|
480
|
+
interceptors: {
|
|
481
|
+
activity: [() => ({ inbound: { execute: scrubbingExecute } } )],
|
|
482
|
+
},
|
|
483
|
+
},
|
|
484
|
+
});
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
`dataConverter` reaches both worker types **and** the client -- a converter installed only on
|
|
488
|
+
the workers leaves the client unable to decode what they wrote. Of `interceptors`, `activity`
|
|
489
|
+
goes to activity workers and `workflowModules` to workflow workers; neither is forwarded to
|
|
490
|
+
the worker that cannot run it. The `syncSchedules` client gets the converter too -- a
|
|
491
|
+
schedule's `initialData` is encoded there and decoded by the workers.
|
|
492
|
+
|
|
493
|
+
The types you need to write either seam (`DataConverter`, `FailureConverter`, `PayloadCodec`,
|
|
494
|
+
`ActivityInterceptorsFactory`) are re-exported from `@lotiai/composer`, so you do not need a
|
|
495
|
+
direct dependency on the Temporal packages.
|
|
496
|
+
|
|
497
|
+
### What Composer Itself Puts in Event History
|
|
498
|
+
|
|
499
|
+
A failure converter has more to reach than `message` and `stackTrace`, so Composer does not
|
|
500
|
+
rely on one being written. What it hands Temporal carries **no error message of its own**:
|
|
501
|
+
|
|
502
|
+
- A step failure travels as `{ stepName, code, parentCodes, type, cause }` -- no `message`, at
|
|
503
|
+
any depth of the cause chain. It is both an activity argument and an `ApplicationFailure`
|
|
504
|
+
detail, so it lands at rest twice; codes and types classify a failure without quoting the
|
|
505
|
+
row. `matchesError()` is unaffected: it matches on codes, which all survive.
|
|
506
|
+
- `details[0].stack` carries stack **frames** only. V8 opens a stack with its `name: message`
|
|
507
|
+
header, so copying `error.stack` whole put a second copy of the message where a converter
|
|
508
|
+
scrubbing `message` and `stackTrace` would not look.
|
|
509
|
+
- An unhandled workflow error throws with `details: [{ error }, { bag }]`. The bag -- every
|
|
510
|
+
value the workflow touched -- is its own entry, so a converter can drop `details[1]` whole
|
|
511
|
+
without rebuilding the error beside it. Read partial workflow state from `details[1].bag`.
|
|
512
|
+
- A code recovered from a `CODE: message` prefix must be identifier-shaped
|
|
513
|
+
(`[A-Z0-9_]{2,50}`). A bare length cutoff laundered arbitrary message text into `code` --
|
|
514
|
+
`constraint "u_email": Key (email)=(jane@x.com)` yielded a 20-character prefix quoting the
|
|
515
|
+
row -- and `code` is emitted exactly where the message is withheld.
|
|
516
|
+
|
|
517
|
+
Two things still carry text Composer cannot vouch for, both of them yours:
|
|
518
|
+
|
|
519
|
+
- `ApplicationFailure.message` is the failing error's own message, which is what a
|
|
520
|
+
`failureConverter` exists to rewrite. This is the seam's primary job.
|
|
521
|
+
- The error-handler activity returns `{ error: { message, code } }` -- the message of the
|
|
522
|
+
`Error` **your** handler returned. It is an activity **result**, encoded by the payload
|
|
523
|
+
converter rather than the failure converter, so reaching it needs a `payloadCodec`.
|
|
524
|
+
|
|
525
|
+
Connections are cached per converter. Converter paths are compared as strings, but
|
|
526
|
+
`payloadCodecs` entries are compared by object identity -- hold codec instances at module
|
|
527
|
+
scope, or a new connection is opened per call.
|
|
528
|
+
|
|
310
529
|
## CLI
|
|
311
530
|
|
|
312
531
|
The package includes a CLI for building and managing Temporal workflow/activity bundles. It reads configuration from a `composer.build-config.ts` file in your package root.
|
|
@@ -458,6 +677,11 @@ Defaults can be overridden per-deployment via `workerProfiles` in `composer.buil
|
|
|
458
677
|
| Export | Description |
|
|
459
678
|
|--------|-------------|
|
|
460
679
|
| `createComposer` | Create a configured Composer instance |
|
|
680
|
+
| `ComposerConfig` | Type: options accepted by `createComposer` |
|
|
681
|
+
| `ComposerWorkerInterceptors` | Type: worker interceptors forwarded to Temporal |
|
|
682
|
+
| `TraceErrorMessage` | Type: renders an error into span text |
|
|
683
|
+
| `DataConverter`, `FailureConverter`, `PayloadCodec` | Types re-exported from `@temporalio/common` |
|
|
684
|
+
| `ActivityInterceptorsFactory` and friends | Types re-exported from `@temporalio/worker` |
|
|
461
685
|
| `createWorkflow` | Create a workflow with compile-time dependency validation |
|
|
462
686
|
| `step` | Factory for creating type-safe steps |
|
|
463
687
|
| `use` | Compose a child workflow into a parent |
|
|
@@ -467,6 +691,7 @@ Defaults can be overridden per-deployment via `workerProfiles` in `composer.buil
|
|
|
467
691
|
| `startActivityWorker` | Start a Temporal activity worker |
|
|
468
692
|
| `getAllTaskQueues` | Get all configured task queue names |
|
|
469
693
|
| `getTaskQueueForProfile` | Get the task queue for a worker profile |
|
|
694
|
+
| `Runtime` | Temporal's `Runtime`, re-exported so a consumer can install their own workflow logger |
|
|
470
695
|
| `WorkflowStepError` | Error class for step failures |
|
|
471
696
|
| `WorkflowBatchError` | Error class for batch failures |
|
|
472
697
|
| `WorkflowErrorHandlerFailure` | Error class for error handler failures |
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { clearBuildConfigCache, defineBuildConfig, getBuildConfigFilePath, hasBuildConfigFile, type LoadBuildConfigOptions, type LoadedBuildConfig, loadBuildConfig, } from "./build-config/index";
|
|
2
2
|
export type { ComposerBuildConfig, ComposerBuildConfigInput, EnvExclusiveOptIn, } from "./build-config/schema";
|
|
3
|
-
export { type AsyncStepRuntime, type AsyncWorkflowOptions, type Composer, createComposer, createWorkflow, type DurationString, defineSchedule, type ErrorHandler, type FanOut, fanOut, type InferWorkflowResultFromWorkflow, isFanOutStep, type ScheduleDefinition, type ScheduleDefinitionOptions, ScheduleOverlapPolicy, type ScheduleSpec, type Step, type StepContextProvider, type StepRetryPolicy, type SyncComposer, type SyncSchedulesResult, scheduleDefinitionSchema, scheduleOverlapPolicySchema, step, syncSchedules, type TemporalConfig, use, type Workflow, type WorkflowBuilder, type WorkflowResult, } from "./internal";
|
|
3
|
+
export { type AsyncStepRuntime, type AsyncWorkflowOptions, type Composer, type ComposerConfig, type ComposerWorkerInterceptors, createComposer, createWorkflow, type DurationString, defineSchedule, type ErrorHandler, type FanOut, fanOut, type InferWorkflowResultFromWorkflow, isFanOutStep, type ScheduleDefinition, type ScheduleDefinitionOptions, ScheduleOverlapPolicy, type ScheduleSpec, type Step, type StepContextProvider, type StepPollPolicy, type StepRetryPolicy, type SyncComposer, type SyncSchedulesResult, scheduleDefinitionSchema, scheduleOverlapPolicySchema, step, syncSchedules, type TemporalConfig, use, type Workflow, type WorkflowBuilder, type WorkflowResult, } from "./internal";
|
|
4
4
|
export { isScheduleDefinition, isWorkflow, } from "./internal/async/build-scripts/utils/type-guards";
|
|
5
5
|
export { type ActivityWorkerRuntimeConfig, type CombinedWorkerConfig, type CombinedWorkerConfigOptions, DEFAULT_WORKER_PROFILE, getAllTaskQueues, getEffectiveProfileConfig, getEffectiveResources, getTaskQueueForProfile, isValidWorkerProfile, type LoadAndResolveActivityWorkerRuntimeConfigOptions, loadAndResolveActivityWorkerRuntimeConfig, loadAndResolveCombinedWorkerConfigForLocalDev, type ResolveActivityWorkerRuntimeConfigOptions, type ResolvedProfilesForEnvironment, resolveActivityWorkerRuntimeConfig, resolveProfilesForEnvironment, WORKER_PROFILES, type WorkerProfile, type WorkerProfileConfig, } from "./internal/async/config/worker-profiles";
|
|
6
6
|
export { type StartActivityWorkerOptions, startActivityWorker, } from "./internal/async/register-scripts/start-activity-worker";
|
|
@@ -10,7 +10,11 @@ export { runScheduleSync, type SyncScheduleScriptOptions, } from "./internal/asy
|
|
|
10
10
|
export { type RunSyncSchedulesCliOptions, runSyncSchedulesCli, } from "./internal/async/register-scripts/sync-schedules-cli";
|
|
11
11
|
export { type SyncSchedulesViaLambdaOptions, syncSchedulesViaLambda, } from "./internal/async/register-scripts/sync-schedules-via-lambda";
|
|
12
12
|
export { findPackageRoot } from "./internal/async/utils/find-package-root";
|
|
13
|
-
export { type ErrorMatchTarget, matchesError, WorkflowBatchError, WorkflowErrorHandlerFailure, WorkflowStepError, } from "./internal/errors";
|
|
14
|
-
export
|
|
13
|
+
export { type ErrorMatchTarget, matchesError, StepNotReadyError, StepPollTimeoutError, WorkflowBatchError, WorkflowErrorHandlerFailure, WorkflowStepError, } from "./internal/errors";
|
|
14
|
+
export { STEP_NOT_READY_CODE, STEP_POLL_TIMEOUT_CODE } from "./internal/poll-codes";
|
|
15
|
+
export type { ComposerLogger, TraceErrorMessage } from "./internal/types";
|
|
15
16
|
export type { WorkflowExecutionStatusName } from "@temporalio/client";
|
|
17
|
+
export type { DataConverter, FailureConverter, PayloadCodec } from "@temporalio/common";
|
|
18
|
+
export type { ActivityExecuteInput, ActivityInboundCallsInterceptor, ActivityInterceptors, ActivityInterceptorsFactory, } from "@temporalio/worker";
|
|
19
|
+
export { Runtime, type RuntimeOptions } from "@temporalio/worker";
|
|
16
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,EAClB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,mBAAmB,EACnB,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,QAAQ,EACb,cAAc,EACd,cAAc,EACd,KAAK,cAAc,EACnB,cAAc,EACd,KAAK,YAAY,EACjB,KAAK,MAAM,EACX,MAAM,EACN,KAAK,+BAA+B,EACpC,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,qBAAqB,EACrB,KAAK,YAAY,EACjB,KAAK,IAAI,EACT,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,wBAAwB,EACxB,2BAA2B,EAC3B,IAAI,EACJ,aAAa,EACb,KAAK,cAAc,EACnB,GAAG,EACH,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,oBAAoB,EACpB,UAAU,GACX,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EAChC,sBAAsB,EACtB,gBAAgB,EAChB,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,KAAK,gDAAgD,EACrD,yCAAyC,EACzC,6CAA6C,EAC7C,KAAK,yCAAyC,EAC9C,KAAK,8BAA8B,EACnC,kCAAkC,EAClC,6BAA6B,EAC7B,eAAe,EACf,KAAK,aAAa,EAClB,KAAK,mBAAmB,G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0CAA0C,CAAC;AAC3E,OAAO,EACL,KAAK,gBAAgB,EACrB,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,2BAA2B,EAC3B,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpF,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,YAAY,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAGtE,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACxF,YAAY,EACV,oBAAoB,EACpB,+BAA+B,EAC/B,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Composer factory and types
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.WorkflowStepError = exports.WorkflowErrorHandlerFailure = exports.WorkflowBatchError = exports.matchesError = exports.findPackageRoot = exports.syncSchedulesViaLambda = exports.runSyncSchedulesCli = exports.runScheduleSync = exports.startWorkflowWorker = exports.startAllWorkers = exports.startActivityWorker = exports.WORKER_PROFILES = exports.resolveProfilesForEnvironment = exports.resolveActivityWorkerRuntimeConfig = exports.loadAndResolveCombinedWorkerConfigForLocalDev = exports.loadAndResolveActivityWorkerRuntimeConfig = exports.isValidWorkerProfile = exports.getTaskQueueForProfile = exports.getEffectiveResources = exports.getEffectiveProfileConfig = exports.getAllTaskQueues = exports.DEFAULT_WORKER_PROFILE = exports.isWorkflow = exports.isScheduleDefinition = exports.use = exports.syncSchedules = exports.step = exports.scheduleOverlapPolicySchema = exports.scheduleDefinitionSchema = exports.ScheduleOverlapPolicy = exports.isFanOutStep = exports.fanOut = exports.defineSchedule = exports.createWorkflow = exports.createComposer = exports.loadBuildConfig = exports.hasBuildConfigFile = exports.getBuildConfigFilePath = exports.defineBuildConfig = exports.clearBuildConfigCache = void 0;
|
|
4
|
+
exports.Runtime = exports.STEP_POLL_TIMEOUT_CODE = exports.STEP_NOT_READY_CODE = exports.WorkflowStepError = exports.WorkflowErrorHandlerFailure = exports.WorkflowBatchError = exports.StepPollTimeoutError = exports.StepNotReadyError = exports.matchesError = exports.findPackageRoot = exports.syncSchedulesViaLambda = exports.runSyncSchedulesCli = exports.runScheduleSync = exports.startWorkflowWorker = exports.startAllWorkers = exports.startActivityWorker = exports.WORKER_PROFILES = exports.resolveProfilesForEnvironment = exports.resolveActivityWorkerRuntimeConfig = exports.loadAndResolveCombinedWorkerConfigForLocalDev = exports.loadAndResolveActivityWorkerRuntimeConfig = exports.isValidWorkerProfile = exports.getTaskQueueForProfile = exports.getEffectiveResources = exports.getEffectiveProfileConfig = exports.getAllTaskQueues = exports.DEFAULT_WORKER_PROFILE = exports.isWorkflow = exports.isScheduleDefinition = exports.use = exports.syncSchedules = exports.step = exports.scheduleOverlapPolicySchema = exports.scheduleDefinitionSchema = exports.ScheduleOverlapPolicy = exports.isFanOutStep = exports.fanOut = exports.defineSchedule = exports.createWorkflow = exports.createComposer = exports.loadBuildConfig = exports.hasBuildConfigFile = exports.getBuildConfigFilePath = exports.defineBuildConfig = exports.clearBuildConfigCache = void 0;
|
|
5
5
|
var index_1 = require("./build-config/index");
|
|
6
6
|
Object.defineProperty(exports, "clearBuildConfigCache", { enumerable: true, get: function () { return index_1.clearBuildConfigCache; } });
|
|
7
7
|
Object.defineProperty(exports, "defineBuildConfig", { enumerable: true, get: function () { return index_1.defineBuildConfig; } });
|
|
@@ -51,7 +51,17 @@ var find_package_root_1 = require("./internal/async/utils/find-package-root");
|
|
|
51
51
|
Object.defineProperty(exports, "findPackageRoot", { enumerable: true, get: function () { return find_package_root_1.findPackageRoot; } });
|
|
52
52
|
var errors_1 = require("./internal/errors");
|
|
53
53
|
Object.defineProperty(exports, "matchesError", { enumerable: true, get: function () { return errors_1.matchesError; } });
|
|
54
|
+
Object.defineProperty(exports, "StepNotReadyError", { enumerable: true, get: function () { return errors_1.StepNotReadyError; } });
|
|
55
|
+
Object.defineProperty(exports, "StepPollTimeoutError", { enumerable: true, get: function () { return errors_1.StepPollTimeoutError; } });
|
|
54
56
|
Object.defineProperty(exports, "WorkflowBatchError", { enumerable: true, get: function () { return errors_1.WorkflowBatchError; } });
|
|
55
57
|
Object.defineProperty(exports, "WorkflowErrorHandlerFailure", { enumerable: true, get: function () { return errors_1.WorkflowErrorHandlerFailure; } });
|
|
56
58
|
Object.defineProperty(exports, "WorkflowStepError", { enumerable: true, get: function () { return errors_1.WorkflowStepError; } });
|
|
59
|
+
var poll_codes_1 = require("./internal/poll-codes");
|
|
60
|
+
Object.defineProperty(exports, "STEP_NOT_READY_CODE", { enumerable: true, get: function () { return poll_codes_1.STEP_NOT_READY_CODE; } });
|
|
61
|
+
Object.defineProperty(exports, "STEP_POLL_TIMEOUT_CODE", { enumerable: true, get: function () { return poll_codes_1.STEP_POLL_TIMEOUT_CODE; } });
|
|
62
|
+
// Workflow-side `wf.log` lines are routed by Temporal, not by the injected ComposerLogger.
|
|
63
|
+
// Re-exported so a consumer can install their own logger on the Runtime without a direct
|
|
64
|
+
// dependency on @temporalio/worker; Composer never installs one itself. See the README.
|
|
65
|
+
var worker_1 = require("@temporalio/worker");
|
|
66
|
+
Object.defineProperty(exports, "Runtime", { enumerable: true, get: function () { return worker_1.Runtime; } });
|
|
57
67
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,6BAA6B;;;AAE7B,8CAQ8B;AAP5B,8GAAA,qBAAqB,OAAA;AACrB,0GAAA,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AAD5D,yHAAA,mBAAmB,OAAA;AAErB,yGAGqE;AADnE,mIAAA,sBAAsB,OAAA;AAExB,8EAA2E;AAAlE,oHAAA,eAAe,OAAA;AACxB,4CAQ2B;AANzB,sGAAA,YAAY,OAAA;AACZ,2GAAA,iBAAiB,OAAA;AACjB,8GAAA,oBAAoB,OAAA;AACpB,4GAAA,kBAAkB,OAAA;AAClB,qHAAA,2BAA2B,OAAA;AAC3B,2GAAA,iBAAiB,OAAA;AAEnB,oDAAoF;AAA3E,iHAAA,mBAAmB,OAAA;AAAE,oHAAA,sBAAsB,OAAA;AAYpD,2FAA2F;AAC3F,yFAAyF;AACzF,wFAAwF;AACxF,6CAAkE;AAAzD,iGAAA,OAAO,OAAA"}
|
|
@@ -33,7 +33,6 @@ export interface WorkflowInput {
|
|
|
33
33
|
* Includes parentCodes to support LotiError subclass matching via extractIfPresent.
|
|
34
34
|
*/
|
|
35
35
|
export interface SerializedErrorInfo {
|
|
36
|
-
message: string;
|
|
37
36
|
code?: string;
|
|
38
37
|
/** Parent error codes for subclass matching (e.g., NOT_FOUND -> DB_NOT_FOUND) */
|
|
39
38
|
parentCodes?: readonly string[];
|
|
@@ -42,12 +41,15 @@ export interface SerializedErrorInfo {
|
|
|
42
41
|
}
|
|
43
42
|
/**
|
|
44
43
|
* Information about a step failure, passed to error handler activities.
|
|
44
|
+
*
|
|
45
|
+
* Carries no error message. This value is an activity argument and a member of the
|
|
46
|
+
* `ApplicationFailure` details, so both copies land in Temporal event history at rest,
|
|
47
|
+
* where only a `payloadCodec` could reach them. Codes and types classify a failure
|
|
48
|
+
* without quoting whatever the driver put in the message.
|
|
45
49
|
*/
|
|
46
50
|
export interface StepFailureInfo {
|
|
47
51
|
/** Step name that failed */
|
|
48
52
|
stepName: string;
|
|
49
|
-
/** Error message (from outermost error wrapper) */
|
|
50
|
-
message: string;
|
|
51
53
|
/** Error code if available */
|
|
52
54
|
code?: string;
|
|
53
55
|
/** Parent error codes for subclass matching */
|
|
@@ -68,6 +70,8 @@ export interface BatchErrorInfo {
|
|
|
68
70
|
/** All step failures in the batch */
|
|
69
71
|
errors: StepFailureInfo[];
|
|
70
72
|
}
|
|
73
|
+
/** Code carried by the error a FanOut throws when any of its children fail. */
|
|
74
|
+
export declare const FANOUT_CHILD_FAILURE_CODE = "FANOUT_CHILD_FAILURE";
|
|
71
75
|
/**
|
|
72
76
|
* A FanOut entry in a batch. Orchestrates dynamic child workflow parallelism:
|
|
73
77
|
* mapInput activity -> lane-based child workflow execution -> aggregateResults activity.
|
|
@@ -110,6 +114,13 @@ export interface StepActivityConfig {
|
|
|
110
114
|
*/
|
|
111
115
|
nonRetryableErrorTypes?: string[];
|
|
112
116
|
};
|
|
117
|
+
/** Workflow-side poll policy. Mirrors `StepPollPolicy`. */
|
|
118
|
+
poll?: {
|
|
119
|
+
initialInterval: DurationString;
|
|
120
|
+
maximumInterval: DurationString;
|
|
121
|
+
timeout: DurationString;
|
|
122
|
+
backoffCoefficient?: number;
|
|
123
|
+
};
|
|
113
124
|
}
|
|
114
125
|
/**
|
|
115
126
|
* Represents a batch of steps that can execute in parallel.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-factory.d.ts","sourceRoot":"","sources":["../../../../src/internal/async/build/workflow-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"workflow-factory.d.ts","sourceRoot":"","sources":["../../../../src/internal/async/build/workflow-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI1D;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEjC,0BAA0B;IAC1B,QAAQ,CAAC,EA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