⏱️nexus_scheduler::scheduler
Struct TaskCreatedEvent
Emitted when a [Task] is created.
Struct TaskPausedEvent
Emitted when a [Task] is paused.
Struct TaskResumedEvent
Emitted when a [Task] is resumed.
Struct TaskCanceledEvent
Emitted when future [Task] work is canceled.
Struct TaskRejectedEvent
Emitted when current runtime permanently rejects a proposal.
Existing [DAGExecution] obligations remain valid. The controller can reclaim the proposal reserve through [close] or [close_as_agent] after all admitted obligations drain.
Struct TaskClosedEvent
Emitted when a [Task] is finalized and releases its owned resources.
Struct OccurrenceScheduledEvent
Emitted when a [Task] allocates one [Occurrence] identity.
Struct OccurrenceAdvertisedEvent
Emitted when an [Occurrence] becomes the Task's dispatch candidate.
Allocation and dispatch readiness are distinct. An occurrence may exist while another execution occupies the Task's capacity. Every transition into the advertised state emits this event so leaders can discover the candidate after capacity is restored.
Struct OccurrenceWithdrawnEvent
Emitted when an [Occurrence] leaves its schedule without dispatch.
Struct OccurrenceMissedEvent
Emitted when an advertised occurrence expires.
Struct OccurrenceDispatchedEvent
Emitted when a leader dispatches an occurrence.
Struct OccurrenceSettledEvent
Emitted after terminal occurrence settlement.
Enum SettlementStatus
Settlement state visible to Task callers.
Constants
Function bind_runtime
Bind the immutable authority root to this Scheduler package lineage.
This is a one time deployment transition. Later Scheduler releases use [activate_runtime] with the same stable [UpgradeCap] object.
Function activate_runtime
Activate this Scheduler release as the only protocol effect facade.
Function new_user_task
Creates an address controlled and user funded [Task] for one agent skill.
Function new_agent_task
Creates an Agent controlled [Task] funded by its payment vault.
Function new_default_task
Creates an address controlled [Task] for the default executor.
Function share
Shares a fully composed Task.
Function schedule
Atomically accepts one occurrence under an address controller.
The fixed authority read makes an explicit WorkAdmission disable roll back this entire caller transaction before any proposal state can persist.
Function schedule_as_agent
Atomically accepts one occurrence under an Agent controller.
Function set_recurrence
Atomically accepts one lazy recurrence under an address controller.
Function set_recurrence_as_agent
Atomically accepts one lazy recurrence under an Agent controller.
Function clear_recurrence
Clears recurring work under an address controller.
Function clear_recurrence_as_agent
Clears recurring work under an Agent controller.
Function pause
Pauses address controlled dispatch.
Function pause_as_agent
Pauses Agent controlled dispatch.
Function resume
Resumes address controlled dispatch.
Function resume_as_agent
Resumes Agent controlled dispatch.
Function cancel
Cancels future work under an address controller.
Function cancel_as_agent
Cancels future work under an Agent controller.
Function refill
Refills an address funded Task reserve and advertises restored work.
Function refill_from_agent
Refills an Agent funded Task reserve and advertises restored work.
Function expire
Expires exactly the advertised occurrence.
Function expire_with_gas_charge
Expires the advertised occurrence and consumes its leader submission gas charge.
Function admit_next
Admits exactly one accepted occurrence into a funded protocol obligation.
Proposal metadata is never runtime authority. The current runtime revalidates its contract, Agent skill revision, policies, leader, DAG, authorization, and funding before [DAGExecution] creation. A later WorkAdmission disable does not revoke an occurrence whose scheduling transaction already succeeded.
Function reject_next
Commits a proven permanent rejection and makes the reserve reclaimable.
An abort cannot represent rejection because it would roll back the Task transition and any charge. Only the selected current leader may commit this transition, and the reason is derived entirely from onchain state. Selection derives from the Task and occurrence identity, then alternates the stake-weighted primary and backup every 30-second submission window using the supplied Clock. The budget check runs before the Task mutation.
Function settle
Settles one execution back into its owning Task.
Function close
Finalizes an address controlled [Task] and refunds its recorded source.
Function close_as_agent
Finalizes an Agent controlled [Task] and refunds its vault.
Function continue_on_failure
Returns the default continue behavior.
Function pause_on_failure
Returns explicit pause behavior.
Function is_continue
Returns whether a failure mode continues.
Function advertised_occurrence
Returns the advertised occurrence.
Function is_idle
Returns whether no future occurrence exists.
Function is_exhausted
Returns whether the skill occurrence quota is exhausted.
Function is_awaiting_funds
Returns whether one occurrence cannot currently be funded.
Function can_close
Returns whether the Task may be closed.
Function settlement_is_pending
Returns whether settlement is pending.
Function settlement_is_succeeded
Returns whether settlement succeeded.
Function settlement_is_failed
Returns whether settlement failed.
Last updated

