AutopilotDeps
Defined in: src/autopilot.ts:63
Properties
Section titled “Properties”classify
Section titled “classify”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).
Parameters
Section titled “Parameters”string[]
taskPrompt
Section titled “taskPrompt”string
string
Returns
Section titled “Returns”Promise<AutopilotVerdict>
fullAuto
Section titled “fullAuto”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.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”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).
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
onComplete?
Section titled “onComplete?”
optionalonComplete?: (id,summary) =>void
Defined in: src/autopilot.ts:102
Fired when autopilot marks a session complete (non-PR deliverable done).
Parameters
Section titled “Parameters”string
summary
Section titled “summary”string
Returns
Section titled “Returns”void
onPause
Section titled “onPause”onPause: (
id,question) =>void
Defined in: src/autopilot.ts:100
Fired when autopilot hands a session back for a genuine question / step-cap.
Parameters
Section titled “Parameters”string
question
Section titled “question”string
Returns
Section titled “Returns”void
onState?
Section titled “onState?”
optionalonState?: (id) =>void
Defined in: src/autopilot.ts:104
Fired after any autopilot-field mutation (pause / clear) so the wiring can emit a live event.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
openLocalPr
Section titled “openLocalPr”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.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
paneAlive
Section titled “paneAlive”paneAlive: (
id) =>boolean
Defined in: src/autopilot.ts:76
Whether the session’s herdr pane is currently live.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”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).
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”GitState | null
readTail
Section titled “readTail”readTail: (
id) =>string[]
Defined in: src/autopilot.ts:78
Visible terminal tail for a session (herdr.read → tailLines).
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string[]
refreshPr?
Section titled “refreshPr?”
optionalrefreshPr?: (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.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
resume
Section titled “resume”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.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”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.
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”boolean
stepCap?
Section titled “stepCap?”
optionalstepCap?:number
Defined in: src/autopilot.ts:105
store:
Pick<SessionStore,"get"|"list"|"getRepoConfig"|"setAutopilotState"|"setAutoMergeState">
Defined in: src/autopilot.ts:64