/** * Arial Server - State management (multi-repo) */ import type { Spec, SpecStatus, SpecSummary, QueueCounts, Owner, RepoState } from "../types.js"; export declare function getServerDir(dataDir: string): string; export declare function getStatePath(dataDir: string): string; export declare function getLogsDir(dataDir: string): string; export declare function getWorktreesDir(repoPath: string): string; export declare function getWorktreePath(repoPath: string, specId: string): string; export declare function getSpecLogPath(dataDir: string, specId: string): string; export declare function shortId(): string; export interface StateStore { getSpec(id: string): Spec | undefined; getAllSpecs(): Spec[]; getSpecsByRepo(repoId: string): Spec[]; getSpecsByStatus(status: SpecStatus): Spec[]; getRepoState(repoId: string): RepoState | undefined; getAllRepoStates(): Record; getBuildQueue(repoId: string): string[]; getMergeQueue(repoId: string): string[]; getQueueCounts(repoId?: string): QueueCounts; getQueuePosition(specId: string): number; getGlobalActiveAgents(): number; initRepo(repoId: string): void; addSpec(input: { id: string; repoId: string; repoPath: string; title: string; content: string; owner: Owner; userId?: string; extends?: import("../types.js").SpecReference[]; }): Spec; updateSpecStatus(id: string, status: SpecStatus, extra?: Partial): void; addLogLine(specId: string, line: string): void; removeFromBuildQueue(repoId: string, specId: string): void; addToMergeQueue(repoId: string, specId: string): void; removeFromMergeQueue(repoId: string, specId: string): void; updateRepoStatus(repoId: string, status: RepoState["status"]): void; incrementRepoActiveAgents(repoId: string): void; decrementRepoActiveAgents(repoId: string): void; save(): Promise; load(): Promise; } /** * Create a state store for managing server state (multi-repo) */ export declare function createStateStore(dataDir: string, repoIds: string[]): StateStore; /** * Convert Spec to SpecSummary (for API responses) */ export declare function toSpecSummary(spec: Spec): SpecSummary; //# sourceMappingURL=store.d.ts.map