import { OrgDaemon, type RunningOrg } from './daemon.js'; import type { OrgRole } from './types.js'; /** Deliver the messages queued in the org inbox for `roleId` now that it is * live — only its own: messages for other roles stay queued (#557 review). * Endpoint entries stay queued (M2: delivered by POST), and a role that is * not live after all gets its messages put back. Called after every lazy * spawn that may follow a deferral: the deferred-spawn loops here and * dispatchReadyTasks's lazy spawn (e.g. after a reload reopens the org). */ export declare function deliverQueuedFor(daemon: OrgDaemon, name: string, running: RunningOrg, roleId: string): Promise; /** Start an offline org in the background so queued messages get drained. * Fire-and-forget — errors are logged but don't propagate to the sender. */ export declare function autoWake(daemon: OrgDaemon, name: string): void; /** #4: bounded whole-org restart after the boss terminally crashes. Stops the * dead run and re-launches it with fresh sessions (shedding any bloated * context). Capped at MAX_BOSS_RESTARTS per explicit start so a crashing boss * can't loop forever; beyond the cap it gives up and lets the idle watchdog * shut the run down for a human. */ export declare function scheduleBossRestart(daemon: OrgDaemon, name: string): void; /** A role that failed its resource gate isn't abandoned — keep polling for * capacity in the background (bounded, ~30 min) and spawn it the moment * resources free up, instead of silently running the org shorthanded. Same * deferral as the concurrency one (runDeferredSpawn): the role stays a known * assignee and its tasks go out once it is up. */ export declare function scheduleDeferredSpawn(daemon: OrgDaemon, name: string, running: RunningOrg, role: OrgRole, spawnRole: (role: OrgRole) => void): void; /** Bug 4: a role deferred because the org is already at its * run_config.max_concurrent_agents ceiling isn't abandoned either — poll * until a slot frees up (another role in this org ends, crashes, or is * stopped — activeRoleCount() recomputes live each check, so nothing here * needs to explicitly track "a slot freed") and spawn it then (~15 min at * 5s intervals before giving up loudly). */ export declare function scheduleConcurrencyDeferredSpawn(daemon: OrgDaemon, name: string, running: RunningOrg, role: OrgRole, spawnRole: (role: OrgRole) => void): void; //# sourceMappingURL=scheduler-integration.d.ts.map