/** * Work-session markers — which increment (or declared small fix) an agent * session is working on. * * `~/.specweave/sessions/.json` is written whenever a session touches * an increment (any ledger append, `create-increment`, `verify`, `complete`) or * declares `specweave small-fix`. The required-increment guard reads it to * decide whether an edit is planned work. Like the Studio thread binding it * holds no task state and every write is best-effort. * * @module core/tasks/work-session */ export interface WorkSessionMarker { version: 1; sessionId: string; kind: 'increment' | 'small-fix'; /** Increment folder name; null for a small fix. */ incrementId: string | null; /** Project root whose `.specweave` holds the increment or the small-fix log. */ root: string; /** What wrote the marker: a ledger event type, `create`, `verify`, `complete` or `small-fix`. */ event: string; reason?: string; at: string; } /** Where the marker of `sessionId` lives. */ export declare function workSessionFile(sessionId: string, home?: string): string; export declare function readWorkSession(sessionId: string | undefined, home?: string): WorkSessionMarker | null; export declare function recordWorkSession(marker: Omit, opts?: { home?: string; }): void; /** * The current session and SpecWithCode thread now work on the increment in * `incrementDir`. Used by every command that touches an increment, whether or * not it appends to the ledger. */ export declare function recordIncrementWork(incrementDir: string, event: { t?: string; e: string; at?: string; }, opts?: { sessionId?: string; env?: NodeJS.ProcessEnv; home?: string; }): void; /** Log of `specweave small-fix` exemptions, relative to the project root. */ export declare const SMALL_FIX_LOG: string; export interface SmallFixEntry { at: string; by: string; reason: string; session?: string; /** SpecWithCode thread id (`SPECWEAVE_STUDIO_THREAD_ID`). */ thread?: string; model?: string; } export declare function readSmallFixes(projectRoot: string): SmallFixEntry[]; //# sourceMappingURL=work-session.d.ts.map