Skip to main content
delegate/spawn/fan_out return operation receipts; join references operation IDs. WorkGraph records work ownership and attempts; it is not a worker executor. LocalWorkScheduler resolves descriptors through application-provided callables. handoff changes the owner of the same work item and fences the old source; fork branches independently. Transfer admission is not destination task completion. 完整可运行教程 / Complete tutorial · API index Signatures and fields below are extracted from the pinned source. Signatures are reference material, not standalone programs. Source links bind the same runtime baseline. Any does not imply arbitrary objects are supported; use the behavioral contract above and the linked tutorial. Handoff persists its declaration, prepared ownership transfer and descriptor, then transfer_admitted before invoking the scheduler. The receipt acknowledges transfer admission only; outcome_unknown=True means destination execution is not yet known. A callable returning None is not task completion. The destination uses the existing restore/CAS to persist ownership_committed, then its own running and business terminal state. Late source callbacks cannot write the Session head. A restored current owner can reconcile the transfer without the source process. An admitted operation whose invocation was lost is not replayed; waiting policy, business retries and manual reconciliation remain application responsibilities.

Session

Source @ 19f6258 Usage and executable example Usage fragment: continues with objects from the linked complete tutorial; not a standalone program.

Session.delegate

Source

Session.spawn

Source

Session.fan_out

Source

Session.join

Source

Session.handoff

Source

WorkGraph

Source @ 19f6258 Usage and executable example Usage fragment: continues with objects from the linked complete tutorial; not a standalone program.

WorkGraph.from_canonical_dict

Source

WorkItem

Source @ 19f6258 Usage and executable example Usage fragment: continues with objects from the linked complete tutorial; not a standalone program.

WorkAttempt

Source @ 19f6258 Usage and executable example Usage fragment: continues with objects from the linked complete tutorial; not a standalone program.

DurableWorkRuntime

Source @ 19f6258 Usage and executable example Usage fragment: continues with objects from the linked complete tutorial; not a standalone program.

LocalWorkScheduler

Source @ 19f6258 Usage and executable example Usage fragment: continues with objects from the linked complete tutorial; not a standalone program.

WorkRuntimeError

Source @ 19f6258 Usage and executable example Usage fragment: continues with objects from the linked complete tutorial; not a standalone program.

Confirmed dispatch rejection and destination recovery

A handoff receipt with state=dispatch_not_started, admission_state=closed, and outcome_unknown=false proves the scheduler created no worker. Its terminal_receipt_ref records the safe dispatch reason. Calling handoff again with the same operation and payload returns this fact; changing the payload conflicts. Rebind the destination Agent and resources in a new composition, call composition.restore(session_id), then session.run(). No scheduler retry is needed. After an uncertain dispatch, the outcome stays unknown and recovery does not automatically replay effects. Scheduler callable return is not task completion. Terminal reconciliation requires descriptor work/session and explicit context transfer linkage to the current owner generation; an Agent name or an ID suffix is not lineage. Historical unbound descriptors remain unresolved. Prior terminal receipts and unrelated work remain unchanged. Compatibility: dispatch_not_started is a new member of the existing strict operation-state vocabulary. Historical readers reject this value and must upgrade; they must not reinterpret it as admitted/unknown. Historical handoff descriptors without explicit transfer linkage remain unresolved instead of attributing another work item’s terminal.