Skip to main content

Module scheduler

Module scheduler 

Source
Expand description

Background Cloud work, started once at MCP startup.

The scheduler never runs inside a tool call and never blocks one: it is a low-priority thread that renews the lease when due (and, with later packages, drains the outbox and pulls knowledge). Offline or a lapsed lease only pauses Cloud traffic; local tools are unaffected.

Enums§

TickOutcome
What one scheduler pass did.

Functions§

nudge_policy
Ask the scheduler to pull the policy now: Cloud announced version (policy.advanced), or the bus reconnected (None). A hint only: the pull verifies the signed bundle before anything applies, and acks it.
spawn
Start the scheduler thread unless Cloud is disabled. The thread runs the passes while this machine has a usable session and waits for one (a cloud connect) before and after (#1314). Returns None when Cloud is disabled at start.
tick
One pass at local time now. A pass that stops (disabled, not connected, revoked, lapsed, …) also stops every local recording for Cloud (K2 review 2, N1): nothing is collected while no pass runs.