/** * The dispatcher loop. * * One tick turns the tracker's ready queue into running omp sessions. Every * limit that decides whether work starts is read from the store, never asked of * the model: a worker told to respect a budget will eventually talk itself out * of it, so concurrency, daily volume, spend and per-issue attempts are counted * here and enforced before anything is claimed. * * The passes themselves live in `daemon/`, one module per seam of the `Deps` * struct they all take; this file composes them. It is the fleet's import * surface, not a compatibility shim — better than twenty files and the whole * test suite naming an internal module each, and the reason a pass can move * between modules without a single caller changing. The order below is the * dependency order the directory is built in: the shared seam first, the * process that runs it all last. */ import { clearPauseIfUnchanged, isPaused, pausedAt, pausedPath, pauseInstance, pauseProvenance, pauseSourceToken, setPaused } from "./pause.ts"; export type { DaemonOpts, DrainSignal, ExtendTurnLimitResult, IntegrityGate, RetainedCleanupCursor, SessionError, StallGate, TurnLimitController, TurnLimitRegistry, WorkerControlRegistry, WorkerControlResult, WorkerControlSlot, } from "./daemon/deps.ts"; export { completionLastError, exhaustedSessionReason, verbDeps } from "./daemon/deps.ts"; export type { CreateDrainOptions, DrainProblem, DrainRecord, DrainVerdict } from "./daemon/drain.ts"; export { cancelDrain, consumeDrain, createDrain, drainPath, markDrained, readDrain } from "./daemon/drain.ts"; export type { AdmissionAckRecord } from "./daemon/ack.ts"; export { admissionAckPath, daemonGeneration, readAdmissionAck, wakeDaemon, writeAdmissionAck } from "./daemon/ack.ts"; export type { IntegrityVerdict } from "./daemon/integrity.ts"; export { checkIntegrity, manifestDiff, markPaged, packageManifest } from "./daemon/integrity.ts"; export type { CiOwnedGate } from "./daemon/brief.ts"; export { ANSWERED_BLOCK_PROMPT, buildBrief, renderAnsweredBlockPrompt, workerGateGroups } from "./daemon/brief.ts"; export type { OrchestratorRestartOutcome, StallVerdict } from "./daemon/supervision.ts"; export { checkStall, restartWedgedOrchestrator, wakeOrchestratorForBlockedRun, wakeOrchestratorForMetConditions, watchOrchestrator, watchWorkerProgress, } from "./daemon/supervision.ts"; export { reconcilePanes } from "./daemon/panes.ts"; export type { WorkerPool } from "./daemon/admission-pass.ts"; export { createWorkerPool, dispatchAdmissions, summarizeDispatch, summarizeHeldPass } from "./daemon/admission-pass.ts"; export { createTurnLimitRegistry, createWorkerControlRegistry, handleIssue, inheritedPrForContinuation, shouldContinueAfterTurnsCap, verifyPushedGreenClaim, workerReleaseBlockRecorder, } from "./daemon/dispatch.ts"; export type { ReviewLaunchDecision } from "./daemon/review.ts"; export { ADJUDICATION_MAX_TURNS, applyAdjudicationDispositions, dispatchReviewAdjudications, dispatchReviewRevisions, handleReviewAdjudication, handleReviewRevision, reconcileCrashedReviewRevisions, resolveReviewLaunch, } from "./daemon/review.ts"; export { dispatchToSpecGrooming, handleToSpecGrooming, promoteGroomedVerdict } from "./daemon/groom-pass.ts"; export { cleanupRetainedRuns, reconcileHistoricalInfra, watchBaseHealth, watchMergedBase } from "./daemon/settle-pass.ts"; export type { DaemonHealth, DaemonHealthSnapshot, DrainStatus, QueuePreview, ReportingSummary, StatusSnapshot, } from "./daemon/views.ts"; export { daemonHealth, daemonHealthSnapshot, formatBaseHealth, formatDispatchSummary, formatFreezes, formatReleaseGrants, prepareConductor, previewProject, previewQueue, reportingSummary, statusSnapshot, statusSnapshotFromStore, } from "./daemon/views.ts"; export type { DaemonHttpDeps, DaemonHttpProjectDeps } from "./daemon/http.ts"; export { daemonHttpResponse, turnLimitResponse, workerControlResponse } from "./daemon/http.ts"; export { mineIntakeSignals, runDbSnapshotCadence, tick, upgradeVerifyDepsFor } from "./daemon/tick.ts"; export type { DispatchLoopOptions, DispatchPace, Tier1DiversionFacts } from "./daemon/runtime.ts"; export { createDispatchPace, orchestratorStandingOrders, runDaemon, runDispatchLoop, tier1DiversionLine } from "./daemon/runtime.ts"; // ------------------------------------------------------------------- pause // The sentinel itself lives in `pause.ts` (#938): this module imports // `doctor.ts`, so a health check that needs to read a fence cannot import back // here. Re-exported so every existing `from "./daemon.ts"` import still // resolves — the move is structural, not a change of surface. export { clearPauseIfUnchanged, isPaused, pausedAt, pausedPath, pauseInstance, pauseProvenance, pauseSourceToken, setPaused, };