Skip to content

AppDeps

Defined in: src/server.ts:151

optional activity?: object

Defined in: src/server.ts:186

Last-emitted activity signal per running session, for client bootstrap; absent in tests that skip it.

snapshot(): Record<string, SessionActivity>

Record<string, SessionActivity>


optional autoMerge?: object

Defined in: src/server.ts:331

Full-auto merge train snapshot; absent in tests that don’t exercise it.

snapshot(): Promise<AutoMergeStatus[]>

Promise<AutoMergeStatus[]>


optional backlog?: Pick<CountsService, "counts">

Defined in: src/server.ts:267

Backlog counts service; absent in tests that don’t exercise it.


optional claudeAlive?: object

Defined in: src/server.ts:190

Last-swept claude-process liveness per session (does a claude process still live in the worktree?), for client bootstrap; updates flow via the session:claude-alive event. Absent in tests that skip it.

snapshot(): Record<string, boolean>

Record<string, boolean>


optional diagnostics?: Pick<DiagnosticsService, "current" | "check" | "fix">

Defined in: src/server.ts:166

environment-readiness diagnostics (issue #623); absent in tests that don’t wire it.


optional distiller?: object

Defined in: src/server.ts:276

Learning distiller — manual trigger for the proposal pass over a repo’s transcripts. Optional so environments/tests that don’t wire it still type-check; the route no-ops the trigger when absent. Wired to the real DistillerService in index.ts.

distillNow: (repoPath) => void

string

void

optional health?: () => object

object

consecutiveFailures: number

lastFailure: { at: number; reason: string; repoPath: string; } | null

ok: boolean


optional docAgent?: object

Defined in: src/server.ts:309

PR-gated AI doc agent (issue #882). Optional + flag-gated (config.docAgentEnabled); the route 404s when the flag is off or the service is unwired. Wired to DocAgentService in index.ts.

consider: (repoPath) => Promise<DocAgentResult>

string

Promise<DocAgentResult>


optional drain?: object

Defined in: src/server.ts:317

Self-draining work queue snapshot; absent in tests that don’t exercise it.

approveEpicNext(repoPath): void

Operator approves the next epic-attended spawn for the given repo.

string

void

buildEpic(repoPath, run): Promise<Epic | null>

Assemble the live Epic for a repo’s running epic (server routes + pump).

string

EpicRun

Promise<Epic | null>

queue(repoPath): Promise<QueuedItem[]>

string

Promise<QueuedItem[]>

retainClaim(id): void

One-shot: keep ACTIVE_LABEL on the next session:archived for this id (a relaunch is not a retire — the actively-worked issue stays claimed).

string

void

snapshot(): Promise<DrainStatus[]>

Promise<DrainStatus[]>

tick(): Promise<void>

Drive one pump cycle across all drain-enabled repos.

Promise<void>


events: EventHub

Defined in: src/server.ts:154


optional githubOwnersRunner?: GhOutRunner

Defined in: src/server.ts:340

Injectable stdout gh runner for GET /api/github/owners. Absent in production (listGithubOwners falls back to the real gh runner); tests inject a fake so the owner-enumeration route can be exercised without hitting GitHub.


optional githubReposRunner?: GhOutRunner

Defined in: src/server.ts:344

Injectable stdout gh runner for GET /api/github/repos. Absent in production (listGithubRepos falls back to the real gh runner); tests inject a fake so the repo-enumeration route can be exercised without hitting GitHub.


optional gitignoreAdopter?: object

Defined in: src/server.ts:313

Open a PR adding Shepherd’s managed .shepherd-* ignore block to a repo’s .gitignore.

adopt: (repoPath) => Promise<AdoptResult>

string

Promise<AdoptResult>


optional herdDigest?: object

Defined in: src/server.ts:258

Herd Rundown digest — the daily cross-session attention synthesis. Absent in tests that don’t exercise it. snapshot is the latest stored digest (null when none yet); currentFingerprint re-derives the herd’s live attention surface so the GET route can compute staleCount (drift since the digest was generated); regenerate forces a fresh spawn.

currentFingerprint(): Record<string, string[]>

Record<string, string[]>

regenerate(): Promise<"error" | "started" | "empty" | "in-flight">

Promise<"error" | "started" | "empty" | "in-flight">

snapshot(): HerdDigest | null

HerdDigest | null


optional herdr?: Pick<HerdrDriver, "list">

Defined in: src/server.ts:176

Herdr driver (for liveness checks). Absent in some tests; gate fails open.


optional herdrUpdates?: Pick<HerdrUpdateService, "current" | "apply">

Defined in: src/server.ts:164

herdr-version tracker + applier; absent in environments where it isn’t wired.


optional hooks?: object

Defined in: src/server.ts:215

Phase-0 hook ingest ring buffer (issue #704); absent in tests/envs that skip it. record is observe-only here — it forwards to signals only when Task 3 wires onSignal (the hooksSignals flag).

allSubagentsSnapshot(): Record<string, SubagentEntry[]>

Every tracked session’s sub-agent roster, keyed by sessionId (Phase 3, #710); served at GET /api/subagents for a global bootstrap, mirror of activity.

Record<string, SubagentEntry[]>

record(id, ev): void

string

HookEvent

void

snapshot(id): HookEvent[]

string

HookEvent[]


optional mergeSuggest?: object

Defined in: src/server.ts:298

Background merge-suggestion pass — manual per-repo trigger (“Suggest merges now”). Optional so tests that don’t wire it still type-check; route no-ops when absent.

mergeNow: (repoPath) => void

string

void


optional newProjectGhRunner?: GhRunner

Defined in: src/server.ts:336

Injectable gh CLI runner for the POST /api/projects remote step. Absent in production (createProject falls back to the real gh runner); tests inject a fake so the route’s partial-success mapping can be exercised WITHOUT creating real GitHub repos.


optional optimizer?: object

Defined in: src/server.ts:287

Learning optimizer — operator-triggered LLM rewrite pass over flagged (“not working”) rules. Optional so tests that don’t wire it still type-check; routes no-op when absent. Wired to the real OptimizerService in index.ts.

optional health?: () => object

object

consecutiveFailures: number

lastFailure: { at: number; reason: string; repoPath: string; } | null

ok: boolean

optimizeAllFlagged: (repoPath) => void

string

void

optimizeOne: (id) => void

string

void


optional ownsPr?: (s, headSha) => boolean | null

Defined in: src/server.ts:184

Whether a name-matched terminal PR’s head commit belongs to the session’s branch — same guard the poller injects, so the on-demand git endpoint can’t flip GitRail to a false MERGED on a reused-name collision. Absent → unguarded (tests).

Session

string

boolean | null


optional planGate?: object

Defined in: src/server.ts:235

Trigger an adversarial plan review for a session on demand (the /review-plan route). Wired to PlanGateService.consider in index.ts; absent in tests that don’t exercise it.

consider(session): Promise<PlanReviewTrigger>

Session

Promise<PlanReviewTrigger>

optional dismiss(session): void

Reset the plan-gate round WITHOUT re-delivering findings (dismiss the quota block).

Session

void

optional resume(session): boolean

Reset the plan-gate round so the quota block clears, re-delivering findings to the agent.

Session

boolean


optional planGateCache?: object

Defined in: src/server.ts:229

Snapshot of plan-gate verdicts keyed by session id (+ in-flight reviewer ids); absent in tests that skip it. The parallel of reviewCache for the pre-execution plan gate.

optional reviewing(): string[]

string[]

snapshot(): Record<string, PlanGate>

Record<string, PlanGate>


optional poller?: Pick<StatusPoller, "acknowledgeStall" | "ingestActivity" | "ingestNotification">

Defined in: src/server.ts:211

Status poller; used to manually dismiss a stall flag (acknowledgeStall) and, when hooksSignals is on, as the Phase-1 signal sink the index.ts onSignal closure feeds push events to (ingestActivity / ingestNotification — issue #704). The route itself never calls the ingest methods; the onSignal closure in index.ts does.


optional prCache?: PrCache

Defined in: src/server.ts:179

In-memory PR-status cache surfaced in the list overview; absent in tests that don’t exercise it.


optional presence?: Pick<Presence, "set" | "drop">

Defined in: src/server.ts:206

Active-window tracker fed by /events presence frames; gates push suppression.


optional preview?: object

Defined in: src/server.ts:197

Live preview port per session, for client bootstrap; absent until PreviewService is wired (Task 2+). session:preview events are emitted via PreviewService.onChange in index.ts.

snapshot(): Record<string, SessionPreviewState>

Record<string, SessionPreviewState>


optional previewServe?: object

Defined in: src/server.ts:202

Tailscale serve registration status per session slot; absent when auto-serve is disabled or tailscale is unavailable. Merged into /api/preview responses.

snapshot(): Record<string, "ok" | "failed">

Record<string, "ok" | "failed">


optional promoter?: object

Defined in: src/server.ts:303

Promote a curated rule into the repo’s CLAUDE.md via an auto-opened PR, or a cross-repo recurrence rule into the user-global ~/.claude/CLAUDE.md directly (#872).

promote: (id) => Promise<PromoteResult>

string

Promise<PromoteResult>

promoteGlobal: (rule) => Promise<PromoteResult>

string

Promise<PromoteResult>


optional push?: Pick<PushService, "publicKey" | "subscribe" | "unsubscribe">

Defined in: src/server.ts:204

Web Push delivery; absent in tests that don’t exercise notifications.


optional recap?: object

Defined in: src/server.ts:252

Force-regenerate a session recap on demand (the /recap/regenerate route).

regenerate(session): Promise<"error" | "started" | "empty">

Session

Promise<"error" | "started" | "empty">


optional recapCache?: object

Defined in: src/server.ts:250

Snapshot of session recaps keyed by session id; absent in tests that skip it.

snapshot(): Record<string, Recap>

Record<string, Recap>


optional refreshBacklog?: (repoDir) => Promise<void>

Defined in: src/server.ts:272

Force-refresh one repo’s backlog counts (bypassing the read-TTL) and push the rebuilt overview to every client. Fired after a mutation that changes a repo’s open issue/PR counts (e.g. a merge) so the counters + headline drop the item immediately instead of lingering until the next warm poll. Absent in tests.

string

Promise<void>


optional refreshUsage?: () => Promise<UsageLimits>

Defined in: src/server.ts:158

Force a /usage re-scrape (calibration) and return fresh limits; absent in tests that don’t wire the live calibrator (the route then falls back to the current snapshot).

Promise<UsageLimits>


optional resolveForge?: (repoDir) => GitForge | null

Defined in: src/server.ts:160

Resolve the git forge for a repo dir; null when none is configured.

string

GitForge | null


optional reviewCache?: object

Defined in: src/server.ts:223

Snapshot of critic verdicts keyed by session id (+ in-flight run ids); absent in tests that skip it.

optional reviewing(): string[]

string[]

snapshot(): Record<string, ReviewVerdict>

Record<string, ReviewVerdict>


optional reviewTrigger?: object

Defined in: src/server.ts:244

Operator-initiated critic review (the POST /review-pr route). Wired to ReviewService.forceReview in index.ts; absent in tests that don’t exercise it.

optional clearStallState(session): void

Reset escalation counters WITHOUT re-triggering a review (dismiss the quota block).

Session

void

force(session, git): Promise<ReviewOutcome>

Session

GitState

Promise<ReviewOutcome>


service: SessionService

Defined in: src/server.ts:153


optional starPrompt?: object

Defined in: src/server.ts:169

GitHub-star nudge: tracks first-use + the operator’s choice, stars the repo via gh. Absent in tests that don’t exercise it.

dismiss(): StarPromptStatus

StarPromptStatus

snooze(): StarPromptStatus

StarPromptStatus

star(): Promise<StarPromptStatus>

Promise<StarPromptStatus>

status(): StarPromptStatus

StarPromptStatus


store: SessionStore

Defined in: src/server.ts:152


optional updates?: Pick<UpdateService, "current" | "apply"> & Partial<Pick<UpdateService, "applyState">>

Defined in: src/server.ts:162

Self-update tracker; absent in environments where it isn’t wired.


usageLimits: Pick<UsageLimitsService, "limits">

Defined in: src/server.ts:155


optional verifyKey?: () => Promise<VerifyKeyResult>

Defined in: src/server.ts:265

Verify the configured api-key authenticates end-to-end (the /settings/verify-key route); absent in environments where it isn’t wired. Returns only {ok,reason?,detail?} — no key/path.

Promise<VerifyKeyResult>


optional workingBlocked?: object

Defined in: src/server.ts:194

Sessions herdr reports blocked whose TUI shows a live turn spinner (working-while-blocked display flag), for client bootstrap; updates flow via the session:working-blocked event. Absent in tests that skip it.

snapshot(): Record<string, boolean>

Record<string, boolean>