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(client)!: split TypedClient/ContractClient and overhaul the client surface
Wave 3 of the v8 review remediation (items 11-18):
- 11: TypedClient is now connection-scoped (no type parameter):
static create({ client, interceptors }) holds the schedule-presence
check + eager ensureConnected; for(contract) hands out memoized,
identity-stable ContractClient<TContract> bindings (the renamed old
class, constructor @internal). createOrThrow and the create options'
contract field are removed; ContractClient is exported.
- 12: handle.result() output-validation errors now carry the real
workflow NAME (the workflowId was passed as workflowName);
WorkflowValidationError gains a workflowId field, populated on
start/execute/signalWithStart/result paths.
- 13: schedule parity — tagged ScheduleAlreadyExistsError /
ScheduleNotFoundError classified from Temporal's ScheduleAlreadyRunning /
ScheduleNotFoundError; create returns Err(ScheduleAlreadyExistsError);
handle methods return AsyncResult<void, ScheduleNotFoundError>;
new update + backfill on the typed handle and list on the typed
schedule client; TypedScheduleClient constructor is @internal.
- 14: readonly raw escape hatch on the TypedClient root; typed workflow
handles carry runId + firstExecutionRunId (signaledRunId stays on
signalWithStart's); getHandle is now SYNCHRONOUS returning
Result<handle, WorkflowNotInContractError> and accepts runId +
GetWorkflowHandleOptions (firstExecutionRunId interlock); typed
startUpdate beside executeUpdate with a parsed-on-receive result().
- 15: WorkflowNotFoundError renamed WorkflowNotInContractError (it
squatted on the SDK's execution-not-found name);
WorkflowExecutionNotFoundError unchanged.
- 16: deleted the six unused ClientInfer* type exports; fixed the
inverted direction comment in types.ts; {} fallbacks are now
Record<never, never>.
- 17: executeWorkflow composes classifyStartError + the new shared
classifyExecutionResultError (rehydrate-then-classify) helper, also
used by handle.result().
- 18: TSDoc/doc polish (orphaned TypedSearchAttributeMap doc, "Thrown
when" -> "Surfaced on the Err channel when", module docs above
imports, readonly handle/error fields, typeof-per-kind runtime checks
for search-attribute VALUES, fixed interceptors.ts combinator names,
README rewritten to the TypedClient.create({ client }).for(contract)
two-step with .get()); payload arguments are omittable when the
schema accepts undefined (input-less signals/queries/updates send
empty args); expanded type-level and unit/integration suites incl.
second-contract fixtures proving one root drives two task queues.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments