Skip to content

ReviewServiceDeps

Defined in: src/review.ts:118

optional autoAddress?: (sessionId, text) => boolean

Defined in: src/review.ts:153

Steer critic findings into a session’s live PTY (typically SessionService.reply). Returns false (or throws — both treated as not-delivered) when the steer can’t land; only a true return advances the round. Absent → the auto-address loop is disabled regardless of per-repo config.

string

string

boolean


optional cap?: number | (() => number)

Defined in: src/review.ts:159

Max auto-address rounds before escalating to the human (default 3). Pass a thunk to read a live, UI-configurable value per-use — the cap is resolved on every read so a settings change takes effect on the next critic run without a restart.


optional computePatchId?: (worktreePath, base) => Promise<{ baseSha: string | null; files: string[]; patchId: string | null; }>

Defined in: src/review.ts:176

Injectable content fingerprint of git diff base...HEAD in the worktree (default: real git patch-id). Returns the patch-id (null when there’s no diff or git fails → never skips), the concrete base SHA it fetched-and-diffed (null on a total git failure → prompt falls back to the local base, backstop is skipped), and the changed-file set (the same fresh base feeds the buildVerdict scope backstop).

string

string

Promise<{ baseSha: string | null; files: string[]; patchId: string | null; }>


optional detectBackend?: () => SandboxBackend

Defined in: src/review.ts:188

Injectable sandbox backend probe seam (tests inject () => null so no real bwrap is spawned). Presence-checked (not ??) because the seam legitimately returns null.

SandboxBackend


herdr: Pick<HerdrDriver, "start" | "stop" | "list" | "closeTab">

Defined in: src/review.ts:133


optional membraneEnv?: () => object

Defined in: src/review.ts:190

Injectable membrane env seam (tests inject a stub so no host paths are touched).

object

claudeDir: string

optional extraEnv?: Record<string, string>

home: string

nodeBinReal: string


optional model?: string | null

Defined in: src/review.ts:160


optional now?: () => number

Defined in: src/review.ts:161

number


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

Defined in: src/review.ts:146

Fired each tick a critic is still running, with its latest meaningful tool-use summary (e.g. ”$ git diff”, “read review.ts”) — surfaced live in the UI badge tooltip so the operator can see what the critic is doing, not just that it’s busy. Only fired when a summary is available; the run-ended (onReviewing false) signal clears it client-side.

string

string

void


onChange: (id, verdict) => void

Defined in: src/review.ts:136

string

ReviewVerdict

void


optional onReviewing?: (id, reviewing) => void

Defined in: src/review.ts:138

Fired when a critic run starts (true) and when it ends (false) for a session.

string

boolean

void


optional readActivity?: (worktreePath, criticSessionId) => string | null

Defined in: src/review.ts:182

Injectable reader for the critic’s latest tool-use summary (default: parse its JSONL transcript via readActivitySignal). null = no parseable activity yet.

string

string

string | null


optional readUsage?: (worktreePath, criticSessionId) => Promise<SessionUsage | null>

Defined in: src/review.ts:185

Injectable reader of a finished reviewer’s token totals from its transcript (default: readSessionUsage). null = transcript missing/unreadable → totals stay null.

string

string

Promise<SessionUsage | null>


optional readVerdict?: (worktreePath) => VerdictRead<RawVerdict>

Defined in: src/review.ts:170

Injectable verdict reader (default: read VERDICT_FILE from the worktree). 3-way result so tick() can fail fast on a present-but-unparseable verdict and gate a repaired parse on the critic spawn having finished.

string

VerdictRead<RawVerdict>


resolveForge: (repoPath) => GitForge | null

Defined in: src/review.ts:135

string

GitForge | null


store: Pick<SessionStore, "getRepoConfig" | "getReview" | "putReview" | "bumpReviewHead" | "dropReview" | "snapshotReviews" | "addSignal" | "recordReviewerSpawn" | "completeReviewerSpawn" | "listReviewerSpawns" | "get">

Defined in: src/review.ts:119


optional timeoutMs?: number

Defined in: src/review.ts:162


worktree: Pick<WorktreeMgr, "createDetached" | "remove" | "gitCommonDir">

Defined in: src/review.ts:134


optional worktreeExists?: (p) => boolean

Defined in: src/review.ts:166

default: existsSync — whether a reviewer’s disposable worktree is still on disk. reapOrphans() uses it to tell a true restart-orphan (worktree survives) from an already-finalized review (finalize reaps the worktree).

string

boolean