You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(examples)!: port to the v8 split API and demonstrate signals, queries, errors, and schedules
Port the order-processing example to the TypedClient/ContractClient split
(TypedClient.create({ client }).get() + .for(contract), synchronous
getHandle, qualifyFailure) and extend it across the advertised surface:
an approval signal + payload-less defineSignal() cancellation, an
argument-less defineQuery({ output }) status query, a PaymentDeclined
typed contract error travelling activity -> workflow -> client (matched
with P.tag), and a schedule-driven activity-less cleanupExpiredOrders
workflow with the ScheduleAlreadyExistsError create-if-absent idiom.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Shared contract package — domain schemas and the workflow/activitydefinitions imported by both the worker and the client
9
+
Shared contract package — domain schemas plus the workflow, activity, signal, query, and typed-error definitions imported by both the worker and the client (composition-first with the `define*` helpers)
Worker with Clean Architecture; activities return `AsyncResult` from unthrown
13
+
Worker with Clean Architecture; activities return `AsyncResult` from unthrown, the workflow handles signals/queries via `context.defineSignal`/`defineQuery`, and a schedule-driven cleanup workflow shows the activity-less workflow shape
Standalone client demonstrating interaction with the shared contract
17
+
Standalone client demonstrating the `TypedClient.create({ client }).for(contract)` split: typed signals (with and without payload), an argument-less query, a typed `PaymentDeclined`contract error matched with `P.tag`, and a recurring schedule with the create-if-absent idiom
18
18
19
19
**Note**: The client example works with the worker implementation seamlessly through the shared contract (`orderProcessingContract`).
0 commit comments