Skip to content

SessionStore

Defined in: src/store.ts:493

new SessionStore(path): SessionStore

Defined in: src/store.ts:495

string

SessionStore

ackEpicMigrations(repoPath, parentIssueNumber): void

Defined in: src/store.ts:1214

Acknowledge a completed epic’s landing-PR migrations (#645): stamp migrationsAckedAt AND dismiss the row in one operator action. migrationsAckedAt is the durable audit record of WHEN the human acknowledged; the coupled dismissedAt is what actually clears the band and prevents a re-prompt (listEpicCompleted filters dismissedAt IS NULL).

string

number

void


addHeldTask(row): void

Defined in: src/store.ts:3165

number

string

CreateSessionInput

string

void


addLearning(input): Learning

Defined in: src/store.ts:2396

string[]

string

string

string

string[]

Learning


addMergeSuggestion(input): MergeSuggestion

Defined in: src/store.ts:2716

Persist a background merge suggestion.

MergeSuggestionKind

string

string

string | null

string[] | null

string

string[]

string | null

MergeSuggestion


addSignal(input): Signal

Defined in: src/store.ts:2089

SignalKind

string

string

string | null

Signal


archive(id): void

Defined in: src/store.ts:1502

string

void


attributeInjected(ids, opts): void

Defined in: src/store.ts:2611

For each id: bump injectedCount + stamp lastUsedAt; bump helpfulCount only when good. Empty ids → no-op.

string[]

boolean

void


autoOptimizedAt(id): number | null

Defined in: src/store.ts:2888

Server-internal getter: the timestamp when reviseLearning last ran on this id. Exposed so tests can assert the autoOptimizedAt stamp without reaching into private db.

string

number | null


bumpPrReviewHead(repoPath, prNumber, headSha, now): void

Defined in: src/store.ts:3124

Re-point an existing pr_review at a new head without changing the verdict. No-op when no row exists.

string

number

string

number

void


bumpReviewHead(sessionId, headSha, updatedAt): void

Defined in: src/store.ts:1634

Re-point an existing verdict at a new head without re-reviewing. Used when a head change (rebase/force-push) leaves the reviewed diff content-identical (same patchId): the prior decision/findings/rounds still apply, so only headSha + updatedAt move.

string

string

number

void


clearEpicBaseMismatch(repoPath, parentIssueNumber, childNumber): void

Defined in: src/store.ts:1065

Clear a child’s base-mismatch marker (the PR was re-targeted / merged correctly).

string

number

number

void


completeReviewerSpawn(reviewerSessionId, u, completedAt): void

Defined in: src/store.ts:2043

Fill a spawn’s token totals + completedAt once its transcript is read. No-op when the reviewerSessionId is unknown (the WHERE simply matches nothing).

string

SessionUsage

number

void


countHeldTasks(): number

Defined in: src/store.ts:3198

number


countSessionBlockingSignals(sessionId): number

Defined in: src/store.ts:2633

COUNT of blocking signals (block/stall/critic) for a session.

string

number


create(input): Session

Defined in: src/store.ts:1281

NewSession

Session


deletePushSub(endpoint): void

Defined in: src/store.ts:893

string

void


dismissEpicCompleted(repoPath, parentIssueNumber): void

Defined in: src/store.ts:1228

Mark a completed epic as dismissed (hides it from listEpicCompleted). At land-time there’s no explicit dismiss call: the aggregate landing PR’s Closes #<parent> closes the parent on merge, and the autoDismissClosed reconcile (src/server.ts) then dismisses the band once the parent is confidently closed.

string

number

void


dropPlanGate(sessionId): void

Defined in: src/store.ts:1718

string

void


dropRecap(sessionId): void

Defined in: src/store.ts:1871

string

void


dropReview(sessionId): void

Defined in: src/store.ts:1610

string

void


ensureLocalPr(repoPath, branch, base): LocalPr

Defined in: src/store.ts:844

string

string

string

LocalPr


generatingHerdDigests(): HerdDigest[]

Defined in: src/store.ts:1975

Rows currently in-flight — used by the service’s finalize loop (restart-safe).

HerdDigest[]


generatingRecaps(): Recap[]

Defined in: src/store.ts:1848

Rows currently in-flight — used by the service’s finalize loop (restart-safe).

Recap[]


get(id): Session | null

Defined in: src/store.ts:1337

string

Session | null


getBuildQueue(sessionId): BuildQueue

Defined in: src/store.ts:2939

string

BuildQueue


getCaps(): CapRow[]

Defined in: src/store.ts:1512

CapRow[]

CapStore.getCaps


getCreditSnapshot(): CreditSnapshot | null

Defined in: src/store.ts:1527

CreditSnapshot | null

CreditStore.getCreditSnapshot


getEpicBaseMismatch(repoPath, parentIssueNumber, childNumber): { actualBase: string; checkedAt: number; prNumber: number | null; } | null

Defined in: src/store.ts:1073

A single child’s marker (or null) — drives the doRetire throttle read.

string

number

number

{ actualBase: string; checkedAt: number; prNumber: number | null; } | null


getEpicRun(repoPath): EpicRun | null

Defined in: src/store.ts:931

string

EpicRun | null


getHeldTask(id): HeldTask | null

Defined in: src/store.ts:3186

string

HeldTask | null


getHerdDigest(dayKey): HerdDigest | null

Defined in: src/store.ts:1931

string

HerdDigest | null


getLatestHerdDigest(): HerdDigest | null

Defined in: src/store.ts:1938

HerdDigest | null


getLearning(id): Learning | null

Defined in: src/store.ts:2480

string

Learning | null


getLocalPr(repoPath, branch): LocalPr | null

Defined in: src/store.ts:855

string

string

LocalPr | null


getLocalPrByNumber(number): LocalPr | null

Defined in: src/store.ts:865

number

LocalPr | null


getMergePassSignature(key): string

Defined in: src/store.ts:2826

Signature of the active-rule set the last merge pass processed for a scope (<repoPath> for intra, __cross__ for the global pass). Lets the background pass skip re-spawning when nothing changed. Empty string when never run.

string

string


getMergeSuggestion(id): MergeSuggestion | null

Defined in: src/store.ts:2786

string

MergeSuggestion | null


getOrInitEpicIntegrationBranch(repoPath, parentIssueNumber, derived): string

Defined in: src/store.ts:963

Single source of truth for an epic’s pinned integration-branch name (#645), keyed PER EPIC (repoPath, parentIssueNumber). The name derives from the parent title, but the title can be edited mid-run — re-deriving everywhere would re-point new spawns + the landing base and orphan children already merged on the old branch. So we pin it once on first sight and read it forever: an existing pin is returned as-is; otherwise derived is persisted for THIS epic and returned. Per-epic keying is load-bearing — epic_run is one-row-per-repo and superseded when a new epic starts, so a repo-scoped pin would be inherited by the next epic and would be wrong for a superseded epic’s still-pending landing PR.

string

number

string

string


getPlanGate(sessionId): PlanGate | null

Defined in: src/store.ts:1683

string

PlanGate | null


getPrReview(repoPath, prNumber): PrReview | null

Defined in: src/store.ts:3085

string

number

PrReview | null


getPushPrefs(endpoint): PushPrefs | null

Defined in: src/store.ts:914

string

PushPrefs | null


getRecap(sessionId): Recap | null

Defined in: src/store.ts:1790

string

Recap | null


getRepoConfig(repoPath): RepoConfig

Defined in: src/store.ts:775

string

RepoConfig


getRetiredSeenAt(repoPath): number

Defined in: src/store.ts:2861

Return the last time the user acknowledged retired rules for a repo (epoch ms). Defaults to 0 when never set.

string

number


getReview(sessionId): ReviewVerdict | null

Defined in: src/store.ts:1564

string

ReviewVerdict | null


getSetting(key): string | null

Defined in: src/store.ts:759

string

string | null


getSignalsByIds(ids): Signal[]

Defined in: src/store.ts:2926

Resolve cited evidence signal ids to their full rows (newest first), for the drawer’s “where did this come from” view. Ids that no longer resolve (pruned signals) are silently dropped, so the result can be shorter than ids. Empty in, empty out.

string[]

Signal[]


hasEpicCompleted(repoPath, parentIssueNumber): boolean

Defined in: src/store.ts:1130

True if an epic_completed row exists for this key, regardless of dismissedAt. Used by the backfill pre-check so a dismissed-but-idle run isn’t re-backfilled.

string

number

boolean


hasIssueLog(sessionId, key): boolean

Defined in: src/store.ts:1615

string

string

boolean


incrementLearningIneffective(id, signalIds): Learning | null

Defined in: src/store.ts:2519

Bump ineffectiveCount for an active/promoted rule (self-audit, spec §5) by the number of signalIds not already counted against it, recording them so a later re-distill over the same rolling window can’t re-count the same evidence. A no-op (returns null) for proposed/dismissed/missing rules, or when every cited signal was already counted — keeping “Not working (N)” honest.

string

string[]

Learning | null


ineffectiveSignalsFor(id): Signal[]

Defined in: src/store.ts:2588

Resolve the stored ineffectiveSignalIds for a rule to full Signal rows. Server-side only — ineffectiveSignalIds is intentionally absent from the Learning type and hydrateLearning. Returns [] for missing/unflagged rules.

string

Signal[]


lastUsedByRepo(): Record<string, number>

Defined in: src/store.ts:1479

Map of repoPath → most-recent session createdAt (across all sessions, incl. archived).

Record<string, number>


list(opts?): Session[]

Defined in: src/store.ts:1344

boolean

Session[]


listActiveLearnings(repoPath): Learning[]

Defined in: src/store.ts:2461

Active + promoted rules for a repo, for prompt injection (spec §4a). Oldest-updated first.

string

Learning[]


listAllActiveLearnings(): Learning[]

Defined in: src/store.ts:2707

Active + promoted rules across ALL repos (Phase 4 cross-repo recurrence pass). Oldest-updated first.

Learning[]


listBuildQueues(): BuildQueue[]

Defined in: src/store.ts:3049

Return one BuildQueue per session that has ≥1 step, via a single JOIN. Sessions with no steps are omitted entirely.

BuildQueue[]


listEpicBaseMismatches(repoPath, parentIssueNumber): object[]

Defined in: src/store.ts:1091

All parked children for one epic — fed into assembleEpic for the actionable warnings.

string

number

object[]


listEpicCompleted(repoPath?): object[]

Defined in: src/store.ts:1139

All non-dismissed completed epics, optionally filtered by repoPath, newest-completed first.

string

object[]


listEpicIntegrated(repoPath, parentIssueNumber): Set<number>

Defined in: src/store.ts:1011

Child #s squash-merged into the integration branch for one epic.

string

number

Set<number>


listEpicIntegratedDetails(repoPath, parentIssueNumber): object[]

Defined in: src/store.ts:1019

All integrated child rows for one epic, with PR details and mergedAt timestamp.

string

number

object[]


listEpicRuns(): EpicRun[]

Defined in: src/store.ts:940

All persisted epic_run rows (one per repo). Mirrors getEpicRun’s row shape.

EpicRun[]


listHeldTasks(): HeldTask[]

Defined in: src/store.ts:3179

HeldTask[]


listLearnings(repoPath, opts?): Learning[]

Defined in: src/store.ts:2447

string

LearningStatus

Learning[]


listMergeSuggestions(opts?): MergeSuggestion[]

Defined in: src/store.ts:2760

MergeSuggestionKind

string

MergeSuggestionStatus

MergeSuggestion[]


listPendingLearnings(): Learning[]

Defined in: src/store.ts:2915

Learning[]


listPushSubs(): StoredPushSub[]

Defined in: src/store.ts:897

StoredPushSub[]


listRecentlyArchived(sinceMs): Session[]

Defined in: src/store.ts:1355

Archived sessions retired since sinceMs, newest-first — drives the read-only “recently done” surface (recaps survive worktree teardown).

number

Session[]


listRepoPathsWithInjectableLearnings(): string[]

Defined in: src/store.ts:2473

Distinct repoPaths that have ≥1 active/promoted (injectable) rule, for the cross-repo injectable sweep (GET /api/learnings/injectable).

string[]


listRepoPathsWithRetiredLearnings(): string[]

Defined in: src/store.ts:2871

Distinct repoPaths that have ≥1 retired rule, for the cross-repo injectable sweep.

string[]


listRetiredLearnings(repoPath): Learning[]

Defined in: src/store.ts:2849

Retired rules for a repo, newest-updated first.

string

Learning[]


listReviewerSpawns(): ReviewerSpawnRow[]

Defined in: src/store.ts:2070

All reviewer-spawn rows, oldest-spawned first. Column names already match the ReviewerSpawnRow fields, so a direct cast suffices.

ReviewerSpawnRow[]


listSignals(repoPath, opts?): Signal[]

Defined in: src/store.ts:2110

string

number

number

Signal[]


listSubsumedLearnings(targetId): Learning[]

Defined in: src/store.ts:2695

Rules soft-retired by being merged into targetId (Phase 4 citation list). Scoped to status=‘retired’ AND retiredReason=‘merged’ so a since-restored member (which has its mergedIntoId cleared) can never reappear here. Newest-retired first.

string

Learning[]


markIssueLog(sessionId, key): void

Defined in: src/store.ts:1623

string

string

void


markLocalPrMerged(number): void

Defined in: src/store.ts:875

number

void


markRetiredSeen(repoPath, ts): void

Defined in: src/store.ts:2866

Record that the user has seen retired rules for a repo up to ts (epoch ms).

string

number

void


mergeLearning(id, rule, rationale?): Learning | null

Defined in: src/store.ts:2571

Deliberate inverse of reviseLearning: enriches a rule’s text while PRESERVING all effectiveness counters (helpfulCount, injectedCount, ineffectiveCount, lastUsedAt, evidenceCount, ineffectiveSignalIds). Use when the distiller wants to apply an mem0-style UPDATE — merging richer text into an existing rule so the help-rate record carries forward. Unlike reviseLearning, this does NOT reset counters and does NOT stamp autoOptimizedAt. Hard-guards active-only: promoted rules have their text mirrored in CLAUDE.md verbatim and must never be silently rewritten here.

string

string

string

Learning | null


mergeSuggestionSignatures(opts): Set<string>

Defined in: src/store.ts:2808

Signatures of suggestions of a kind, so a background pass can skip re-proposing a group the operator already has (or rejected). intra is scoped to a repo; cross is global (repoPath ignored).

cross additionally includes applied: promoting a cross group to the global CLAUDE.md (#872) leaves its member rules ACTIVE, so without this carve-out the next cross pass would re-detect and re-suggest the same group. intra-apply retires its members, so the group can’t recur — applied is intentionally excluded there.

MergeSuggestionKind

string

Set<string>


overnightDelta(sinceTs): object

Defined in: src/store.ts:1984

Overnight delta since sinceTs: PRs merged (from issue_log merged:<pr> stamps) and sessions archived after that instant. Feeds the rundown’s “while you were away” summary.

number

object

archivedSessions: object[]

mergedPrs: number[]


pendingLearningCount(): number

Defined in: src/store.ts:2907

number


promoteLearning(id, prUrl): Learning | null

Defined in: src/store.ts:2897

active → promoted, recording the CLAUDE.md PR url (spec §4b). Returns null when the rule is missing or not in a state that allows promotion.

string

string

Learning | null


pruneArchivedSessions(opts): number

Defined in: src/store.ts:2139

Delete archived sessions beyond the retention window — those older than maxAgeMs OR ranked past the newest keepNewest (global, union: whichever evicts first). Only status = 'archived' rows are eligible; live sessions are never touched. Each victim’s reviews row is cascaded in the same transaction so it can’t orphan. signals are left to their own prune. Age and rank both key off COALESCE(archivedAt, updatedAt, createdAt) so legacy archived rows predating the archivedAt column still sort/expire correctly. Returns the number of sessions removed.

number

number

number


pruneOrphanInjectedLearnings(): void

Defined in: src/store.ts:2880

Delete session_injected_learnings rows whose session no longer exists.

void


pruneOrphanMergeSuggestions(): void

Defined in: src/store.ts:2837

Drop pending suggestions whose member rules no longer all exist (a member was hard- deleted, or — for safety — left the schema). Keeps the drawer from offering a merge that can’t apply. Applied/dismissed rows are kept as history.

void


pruneReviewerSpawns(beforeTs): number

Defined in: src/store.ts:2078

Drop reviewer-spawn rows older than beforeTs (own retention sweep — these are decoupled from the session archive path on purpose). Returns the count removed.

number

number


pruneSignals(beforeTs): number

Defined in: src/store.ts:2122

number

number


putCap(row): void

Defined in: src/store.ts:1518

CapRow

void

CapStore.putCap


putCreditSnapshot(row): void

Defined in: src/store.ts:1537

CreditSnapshot

void

CreditStore.putCreditSnapshot


putHerdDigest(d): void

Defined in: src/store.ts:1945

HerdDigest

void


putPlanGate(g): void

Defined in: src/store.ts:1693

PlanGate

void


putPrReview(r): void

Defined in: src/store.ts:3104

PrReview

void


putPushSub(sub, ua): void

Defined in: src/store.ts:883

PushSubInput

string

void


putRecap(recap): void

Defined in: src/store.ts:1801

Recap

void


putReview(v): void

Defined in: src/store.ts:1575

ReviewVerdict

void


recentSessionCountsByRepo(since): Record<string, number>

Defined in: src/store.ts:1493

Map of repoPath → count of sessions (agents) created since since (ms epoch). Drives the “recently worked on” shortcut in the repo picker — a measure of how many agents were run on each repo in the recent window, across all sessions.

number

Record<string, number>


recordEpicBaseMismatch(repoPath, parentIssueNumber, childNumber, m): void

Defined in: src/store.ts:1047

Park a child whose PR targets the wrong base. Upsert — refreshes actualBase/prNumber/checkedAt (checkedAt is the throttle anchor, so it must advance on every recheck).

string

number

number

string

number

number | null

void


recordEpicCompleted(row): void

Defined in: src/store.ts:1110

Record a completed epic (all children done-in-epic). Idempotent upsert. On conflict, refreshes parentTitle/completedAt/childrenJson but leaves dismissedAt untouched so a previously dismissed epic never resurrects.

string

number

number

string

string

void


recordEpicIntegrated(repoPath, parentIssueNumber, childNumber, pr?, mergedBase?): void

Defined in: src/store.ts:984

Record that a child PR was squash-merged into the epic integration branch. Idempotent (PK upsert) — the drain may re-observe a merge across pumps. On conflict, updates only PR columns (guarded by COALESCE so a null re-observe cannot clobber previously-recorded good values). createdAt is never overwritten.

string

number

number

number

string

string

void


recordInjectedLearnings(sessionId, ids): void

Defined in: src/store.ts:2599

Record that a set of learning ids were injected into a session’s context. INSERT OR IGNORE keeps it idempotent. Empty ids → no-op. No counter bump.

string

string[]

void


recordReviewerSpawn(r): void

Defined in: src/store.ts:2025

Record a freshly-spawned reviewer session. Token/completed columns stay NULL until finalize (completeReviewerSpawn). A plain INSERT is correct — every spawn forces a fresh reviewerSessionId UUID, so the PK never collides.

"review" | "plan_gate" | "recap" | "rundown"

string | null

string

number

string

string

void


removeHeldTask(id): void

Defined in: src/store.ts:3194

string

void


replaceBuildQueue(sessionId, steps): BuildQueue

Defined in: src/store.ts:2965

string

BuildStepInput[]

BuildQueue


restoreLearning(id): Learning | null

Defined in: src/store.ts:2660

retired → retiredFromStatus (or ‘active’); clears retiredAt/retiredReason/retiredFromStatus, and clears mergedIntoId so a rule restored after a Phase-4 consolidation carries no dangling citation back to its former survivor. Returns null when not retired or missing.

string

Learning | null


retireLearning(id, reason): Learning | null

Defined in: src/store.ts:2645

active|promoted → retired; sets retiredAt, retiredReason, retiredFromStatus, updatedAt. Returns the updated Learning, or null for illegal source state / missing row.

string

string

Learning | null


retireLearningMerged(sourceId, targetId): Learning | null

Defined in: src/store.ts:2679

Soft-retire a rule that was consolidated into another (Phase 4 merge): same as retireLearning(id, "merged") but also records mergedIntoId = targetId as the retained citation back to the surviving rule. active|promoted → retired only.

string

string

Learning | null


reviseLearning(id, rule, rationale?): Learning | null

Defined in: src/store.ts:2548

Replace a flagged rule’s text (and optionally rationale) and clear the visible ineffective flag. Only operates on active/promoted rules; no-ops for proposed/dismissed/missing. Blank rewrites are rejected (returns null). PRESERVES ineffectiveSignalIds so the dedup set survives the revision — only genuinely new failure signals can re-raise the flag after an optimization. RESETS the effectiveness baseline (helpfulCount/injectedCount/lastUsedAt) to zero: the rule’s help-rate measures CURRENT text, so a rewrite is a fresh artifact that must re-earn its record. Without this, an auto-optimized rule would inherit the old text’s poor help-rate and shouldRetire would re-trip on the cumulative Wilson bound at the first fresh ineffective signal — hollowing out the “second chance” the auto-optimize flag promises (the n_min gate also re-applies, so the rewrite must accrue fresh injections before it can retire).

string

string

string

Learning | null


setAutoMergeState(id, patch): void

Defined in: src/store.ts:1462

Update full-auto merge fields. enabled: override (boolean|null). rebaseCount: absolute. rebaseHead: the head SHA last steered for (string), or null to clear.

string

boolean | null

number

string | null

void


setAutopilotState(id, patch): void

Defined in: src/store.ts:1429

Patch a session’s autopilot fields. Only the provided keys are written.

string

boolean

boolean | null

boolean

string | null

number

void


setBuildQueueApproved(sessionId, approved): void

Defined in: src/store.ts:3039

Flip the human-curation gate for a session’s queue.

string

boolean

void


setBuildStepStatus(sessionId, stepId, status): boolean

Defined in: src/store.ts:3012

Update the status of a single step. Returns true when the TARGET row was actually changed (unchanged contract; the cascade below is additive).

Monotonic forward-fill: when a step is advanced to active or done, every EARLIER step still pending is auto-completed to done, in the same transaction. The build-queue contract is ordered execution (“work the steps in order”), so reaching step N implies steps before it are done — this keeps the displayed status from lagging actual progress even when the agent under-reports (e.g. marks a later step but never the earlier ones). Deterministic and server-side: needs zero agent compliance.

Strictly monotonic + safe: only pending → done, only at LOWER positions; never un-completes a step, never touches later steps, and never overrides skipped (an explicit terminal state the agent sets to drop a step). A step the agent silently jumped over (left pending) is treated as done — the reasonable default under the ordered contract; the agent has the explicit skipped status if it means otherwise. Only fires on active/done, never on pending (un-set) or skipped.

string

string

BuildStepStatus

boolean


setEpicLandingPr(repoPath, parentIssueNumber, fields): void

Defined in: src/store.ts:1183

Write the Stage B (#635) landing-PR resolution onto a completed epic. Direct UPDATE (not part of recordEpicCompleted’s preserve-by-omission upsert).

string

number

number

number | null

string | null

EpicLandingState

void


setEpicMigrationPaths(repoPath, parentIssueNumber, paths): void

Defined in: src/store.ts:1203

Persist the migration paths detected in a completed epic’s landing PR (#645). Stored as a JSON array; an empty array clears any prior detection. Direct UPDATE, mirroring setEpicLandingPr’s style.

string

number

string[]

void


setEpicRun(r): void

Defined in: src/store.ts:946

EpicRun

void


setHaltReason(id, reason, haltedAt): void

Defined in: src/store.ts:2012

string

"error" | "usage_limit" | "completed" | "operator" | null

number | null

void


setLearningScope(id, globs): Learning | null

Defined in: src/store.ts:2502

Replace a rule’s scope globs (operator edit, #842). Runs the same sanitizeScopeGlobs the distiller uses — normalize to repo-relative form, drop empty/over-long patterns, dedupe, and cap the count — so both paths persist identical, bounded scope; [] makes it an Always-rule again. No-op (returns null) for a missing rule.

string

string[]

Learning | null


setLearningStatus(id, status, rule?): Learning | null

Defined in: src/store.ts:2485

string

LearningStatus

string

Learning | null


setMergePassSignature(key, sig): void

Defined in: src/store.ts:2830

string

string

void


setMergeSuggestionStatus(id, status): MergeSuggestion | null

Defined in: src/store.ts:2793

string

MergeSuggestionStatus

MergeSuggestion | null


setPlanPhase(id, phase): void

Defined in: src/store.ts:2004

string

"planning" | "executing" | null

void


setPushPrefs(endpoint, prefs): boolean

Defined in: src/store.ts:922

Update a device’s category selection; false when no such subscription exists.

string

PushPrefs

boolean


setRecapPendingDiff(sessionId, files): void

Defined in: src/store.ts:1864

Set/clear the transient diff carrier used by finalize’s block-join. Server-only — never read by the client-facing getRecap/snapshotRecaps paths. Pass [] to clear.

string

DiffFile[]

void


setRepoConfig(repoPath, cfg): void

Defined in: src/store.ts:788

string

RepoConfig

void


setSandboxState(id, patch): void

Defined in: src/store.ts:1405

Patch a session’s applied sandbox state (set at spawn by the sandbox wrapper). Only the provided keys are written.

string

SandboxProfile | null

boolean

boolean

boolean

void


setSetting(key, value): void

Defined in: src/store.ts:766

string

string

void


snapshotPlanGates(): Record<string, PlanGate>

Defined in: src/store.ts:1722

Record<string, PlanGate>


snapshotRecaps(): Record<string, Recap>

Defined in: src/store.ts:1834

All recaps except empty ones — the UI never shows an empty recap.

Record<string, Recap>


snapshotReviews(): Record<string, ReviewVerdict>

Defined in: src/store.ts:1642

Record<string, ReviewVerdict>


takeSessionInjectedLearnings(sessionId): string[]

Defined in: src/store.ts:2623

Return and delete the learningIds recorded for a session. A second call returns [].

string

string[]


update(id, patch): void

Defined in: src/store.ts:1365

string

Partial<Pick<Session, "name" | "status" | "lastState" | "branch" | "herdrAgentId" | "readyToMerge" | "mergingSince" | "mergingTrainId" | "mergingPrNumber">>

void