import { z } from "zod"; import { type PlayEvent } from "../models/play.js"; import type { PlayGraphSnapshot } from "./play-file-db.js"; import type { PlayGraphDB } from "./play-db-factory.js"; declare const PlayTranscriptTurnSchema: z.ZodObject<{ role: z.ZodEnum<["user", "assistant", "system", "tool"]>; content: z.ZodString; timestamp: z.ZodNumber; }, "strip", z.ZodTypeAny, { content: string; role: "user" | "assistant" | "system" | "tool"; timestamp: number; }, { content: string; role: "user" | "assistant" | "system" | "tool"; timestamp: number; }>; export type PlayTranscriptTurn = z.infer; declare const PlayWorldSchema: z.ZodObject<{ id: z.ZodString; title: z.ZodString; premise: z.ZodDefault; worldContract: z.ZodDefault; visualContract: z.ZodDefault; mode: z.ZodDefault>; language: z.ZodDefault>; createdAt: z.ZodString; updatedAt: z.ZodString; }, "strip", z.ZodTypeAny, { id: string; title: string; language: "zh" | "en"; createdAt: string; updatedAt: string; mode: "open" | "guided"; premise: string; worldContract: string; visualContract: string; }, { id: string; title: string; createdAt: string; updatedAt: string; language?: "zh" | "en" | undefined; mode?: "open" | "guided" | undefined; premise?: string | undefined; worldContract?: string | undefined; visualContract?: string | undefined; }>; export type PlayWorld = z.infer; export type PlayWorldInput = Omit, "createdAt" | "updatedAt"> & { readonly createdAt?: string; readonly updatedAt?: string; }; export interface PlayRunSummary { readonly id: string; readonly updatedAt: string; readonly eventCount: number; readonly transcriptCount: number; } export interface PlayRunSnapshot { readonly id: string; readonly turn: number; readonly createdAt: string; readonly eventsRaw: string; readonly transcriptRaw: string; readonly currentStateRaw: string; readonly sceneProjection: string; readonly stateProjection: string; readonly graph: PlayGraphSnapshot; } export declare class PlayStore { private readonly projectRoot; constructor(projectRoot: string); worldDir(worldId: string): string; runDir(worldId: string, runId: string): string; ensureWorld(worldId: string): Promise; createWorld(input: PlayWorldInput): Promise; removeWorld(worldId: string): Promise; updateWorld(worldId: string, patch: Partial>): Promise; loadWorld(worldId: string): Promise; listWorlds(): Promise; ensureRun(worldId: string, runId: string): Promise; listRuns(worldId: string): Promise; appendEvent(worldId: string, runId: string, event: PlayEvent): Promise; appendRawEventLine(worldId: string, runId: string, line: string): Promise; readEvents(worldId: string, runId: string): Promise; appendTranscriptTurn(worldId: string, runId: string, turn: PlayTranscriptTurn): Promise; readTranscript(worldId: string, runId: string): Promise; saveCurrentState(worldId: string, runId: string, state: unknown): Promise; loadCurrentState(worldId: string, runId: string): Promise; writeProjection(worldId: string, runId: string, relativePath: string, content: string): Promise; readProjection(worldId: string, runId: string, relativePath: string): Promise; captureRunSnapshot(worldId: string, runId: string, input: { readonly id: string; readonly turn: number; readonly graph: PlayGraphSnapshot; }): Promise; saveCheckpoint(worldId: string, runId: string, snapshot: PlayRunSnapshot): Promise; loadCheckpoint(worldId: string, runId: string, checkpointId: string): Promise; saveVariant(worldId: string, runId: string, turn: number, snapshot: PlayRunSnapshot): Promise; loadVariant(worldId: string, runId: string, turn: number, variantId: string): Promise; restoreRunSnapshot(worldId: string, runId: string, snapshot: PlayRunSnapshot, db: PlayGraphDB): Promise; private eventsPath; private transcriptPath; private appendJsonLine; private readJsonLines; private readOptionalRunFile; private loadSnapshotFile; private safeRunChildPath; } export {}; //# sourceMappingURL=play-store.d.ts.map