import type { AgentTeamsRuntime, TeamEvent, TeamTeammateSpec } from "@clinebot/agents";
import type { SqliteSessionStore } from "../storage/sqlite-session-store";
import type { SessionSource, SessionStatus } from "../types/common";
import type { SessionManifest } from "./session-manifest";
import { UnifiedSessionPersistenceService } from "./unified-session-persistence-service";
export interface SessionRow {
    sessionId: string;
    source: string;
    pid: number;
    startedAt: string;
    endedAt?: string | null;
    exitCode?: number | null;
    status: SessionStatus;
    statusLock: number;
    interactive: boolean;
    provider: string;
    model: string;
    cwd: string;
    workspaceRoot: string;
    teamName?: string | null;
    enableTools: boolean;
    enableSpawn: boolean;
    enableTeams: boolean;
    parentSessionId?: string | null;
    parentAgentId?: string | null;
    agentId?: string | null;
    conversationId?: string | null;
    isSubagent: boolean;
    prompt?: string | null;
    metadata?: Record<string, unknown> | null;
    transcriptPath: string;
    hookPath: string;
    messagesPath?: string | null;
    updatedAt: string;
}
export interface CreateRootSessionInput {
    sessionId: string;
    source: SessionSource;
    pid: number;
    startedAt: string;
    interactive: boolean;
    provider: string;
    model: string;
    cwd: string;
    workspaceRoot: string;
    teamName?: string;
    enableTools: boolean;
    enableSpawn: boolean;
    enableTeams: boolean;
    prompt?: string;
    metadata?: Record<string, unknown>;
    transcriptPath: string;
    hookPath: string;
    messagesPath: string;
}
export interface CreateRootSessionWithArtifactsInput {
    sessionId: string;
    source: SessionSource;
    pid: number;
    interactive: boolean;
    provider: string;
    model: string;
    cwd: string;
    workspaceRoot: string;
    teamName?: string;
    enableTools: boolean;
    enableSpawn: boolean;
    enableTeams: boolean;
    prompt?: string;
    metadata?: Record<string, unknown>;
    startedAt?: string;
}
export interface RootSessionArtifacts {
    manifestPath: string;
    transcriptPath: string;
    hookPath: string;
    messagesPath: string;
    manifest: SessionManifest;
}
export interface UpsertSubagentInput {
    agentId: string;
    parentAgentId: string;
    conversationId: string;
    prompt?: string;
    rootSessionId?: string;
}
type TeamRuntimeState = ReturnType<AgentTeamsRuntime["exportState"]>;
export interface FileTeamPersistenceStoreOptions {
    teamName: string;
    baseDir?: string;
}
export declare class FileTeamPersistenceStore {
    private readonly dirPath;
    private readonly statePath;
    private readonly taskHistoryPath;
    private readonly teammateSpecs;
    constructor(options: FileTeamPersistenceStoreOptions);
    loadState(): TeamRuntimeState | undefined;
    getTeammateSpecs(): TeamTeammateSpec[];
    upsertTeammateSpec(spec: TeamTeammateSpec): void;
    removeTeammateSpec(agentId: string): void;
    persist(runtime: AgentTeamsRuntime): void;
    appendTaskHistory(event: TeamEvent): void;
    private ensureDir;
    private hasPersistableState;
    private clearPersistedState;
}
export declare class CoreSessionService extends UnifiedSessionPersistenceService {
    private readonly store;
    constructor(store: SqliteSessionStore);
    createRootSession(input: CreateRootSessionInput): void;
}
export {};
//# sourceMappingURL=session-service.d.ts.map