DrainRepoState
Defined in: src/drain-core.ts:74
Everything computeNext needs about ONE repo, assembled by the side-effect harness.
Properties
Section titled “Properties”autoSessions
Section titled “autoSessions”autoSessions:
AutoSessionView[]
Defined in: src/drain-core.ts:91
Non-archived auto sessions for this repo (sessions mid-merge carry git: null).
candidates
Section titled “candidates”candidates:
Issue[]
Defined in: src/drain-core.ts:95
Labeled, ordered backlog issues (see selectCandidates).
creditSpendCeiling
Section titled “creditSpendCeiling”creditSpendCeiling:
number
Defined in: src/drain-core.ts:89
Account-wide ceiling (account currency units); spend strictly above it pauses the drain.
creditSpent
Section titled “creditSpent”creditSpent:
number
Defined in: src/drain-core.ts:87
Paid extra-credit spend this monthly window (account-wide), 0 when none/stale/unknown.
criticEnabled
Section titled “criticEnabled”criticEnabled:
boolean
Defined in: src/drain-core.ts:77
Per-repo critic toggle — when on, a clean verdict for the current head gates merges.
draftMode
Section titled “draftMode”draftMode:
boolean
Defined in: src/drain-core.ts:79
Per-repo draft mode — PRs open as drafts and retire is gated on sign-off.
enabled
Section titled “enabled”enabled:
boolean
Defined in: src/drain-core.ts:75
epicApprovedNext
Section titled “epicApprovedNext”epicApprovedNext:
boolean
Defined in: src/drain-core.ts:99
Epic mode: operator approved the next spawn (consumed on spawn).
epicAttended
Section titled “epicAttended”epicAttended:
boolean
Defined in: src/drain-core.ts:97
Epic mode: when true, hold each spawn until the operator approves it.
epicIntegrationBranch?
Section titled “epicIntegrationBranch?”
optionalepicIntegrationBranch?:string|null
Defined in: src/drain-core.ts:102
Epic mode: the active epic’s integration branch — epic-child spawns base on it. null/undefined for label-drain (spawns base on the default branch).
mappedIssueNumbers
Section titled “mappedIssueNumbers”mappedIssueNumbers:
Set<number>
Defined in: src/drain-core.ts:93
Issue numbers already mapped to a non-archived session (auto OR manual).
maxAuto
Section titled “maxAuto”maxAuto:
number
Defined in: src/drain-core.ts:82
signoffAuthority
Section titled “signoffAuthority”signoffAuthority:
SignoffAuthority
Defined in: src/drain-core.ts:81
Who can sign off a draft-mode PR for retire/merge (“human”|“critic”|“either”).
usageCeilingPct
Section titled “usageCeilingPct”usageCeilingPct:
number
Defined in: src/drain-core.ts:83
usagePct
Section titled “usagePct”usagePct:
number
Defined in: src/drain-core.ts:85
The worse of the 5h / weekly usage windows, 0–100.