Skip to content

AutopilotDeps

Defined in: src/autopilot.ts:63

classify: (tail, taskPrompt, label) => Promise<AutopilotVerdict>

Defined in: src/autopilot.ts:69

Classify why an agent stopped (src/autopilot-llm.classifyStop, pre-bound to herdr+model).

string[]

string

string

Promise<AutopilotVerdict>


fullAuto: (id) => boolean

Defined in: src/autopilot.ts:94

Whether this session is in full-auto (autopilot ∧ auto-merge). When true, autopilot does NOT stand down at PR-open — it keeps unblocking procedural gates so a rebase can finish.

string

boolean


hasPr: (id) => boolean

Defined in: src/autopilot.ts:81

Whether the session already has a PR in any state (open/merged/closed). True → autopilot stands down (open = critic territory; merged/closed = pre-PR mission over).

string

boolean


optional onComplete?: (id, summary) => void

Defined in: src/autopilot.ts:102

Fired when autopilot marks a session complete (non-PR deliverable done).

string

string

void


onPause: (id, question) => void

Defined in: src/autopilot.ts:100

Fired when autopilot hands a session back for a genuine question / step-cap.

string

string

void


optional onState?: (id) => void

Defined in: src/autopilot.ts:104

Fired after any autopilot-field mutation (pause / clear) so the wiring can emit a live event.

string

void


openLocalPr: (id) => Promise<void>

Defined in: src/autopilot.ts:86

Register a lightweight (local) session’s pseudo-PR server-side. Replaces the forge-mode open-a-PR steer for a lightweight repo: the agent has no gh, so the deliberate completion barrier runs here instead of being typed into the PTY. Best-effort — the wiring guards a rejection so a failure never crashes the autopilot tick.

string

Promise<void>


paneAlive: (id) => boolean

Defined in: src/autopilot.ts:76

Whether the session’s herdr pane is currently live.

string

boolean


prGit: (id) => GitState | null

Defined in: src/autopilot.ts:91

The cached PR snapshot for a session (the PR poller’s last poll), or null when there is none. The recurring tick reads this directly — NOT off a session:git emit — so it can re-engage an idle agent stuck on an UNCHANGED open+red head, the case the event-driven onGit/considerCi path structurally cannot reach (the poller only emits on a state change).

string

GitState | null


readTail: (id) => string[]

Defined in: src/autopilot.ts:78

Visible terminal tail for a session (herdr.read → tailLines).

string

string[]


optional refreshPr?: (id) => void

Defined in: src/autopilot.ts:98

Kick a fresh PR-status poll (best-effort, fire-and-forget). Called when a session settles so the hasPr snapshot — which otherwise lags on a ~120s cadence — catches a PR the agent just opened before autopilot redundantly steers it to open one.

string

void


resume: (id) => unknown

Defined in: src/autopilot.ts:74

Resume an exited session so it can be steered (SessionService.resume, async — the awaited result decides). truthy resolved value = ok.

string

unknown


steer: (id, text) => boolean

Defined in: src/autopilot.ts:71

Steer text into the session’s live PTY (SessionService.reply). false = didn’t land.

string

string

boolean


optional stepCap?: number

Defined in: src/autopilot.ts:105


store: Pick<SessionStore, "get" | "list" | "getRepoConfig" | "setAutopilotState" | "setAutoMergeState">

Defined in: src/autopilot.ts:64