import { z } from "zod"; import { type AutomationMode } from "./modes.js"; import { type InteractionEvent } from "./events.js"; export declare const SessionKindSchema: z.ZodEnum<["chat", "book-create", "book", "short", "play", "script", "storyboard", "interactive-film", "edit", "interactive-film-authoring"]>; export type SessionKind = z.infer; export declare const PlayModeSchema: z.ZodEnum<["open", "guided"]>; export type PlayMode = z.infer; export declare const PendingDecisionSchema: z.ZodObject<{ kind: z.ZodString; bookId: z.ZodString; chapterNumber: z.ZodOptional; summary: z.ZodString; }, "strip", z.ZodTypeAny, { kind: string; summary: string; bookId: string; chapterNumber?: number | undefined; }, { kind: string; summary: string; bookId: string; chapterNumber?: number | undefined; }>; export type PendingDecision = z.infer; export declare const PendingProposedActionSchema: z.ZodObject<{ action: z.ZodString; targetSessionKind: z.ZodEnum<["chat", "book-create", "book", "short", "play", "script", "storyboard", "interactive-film", "edit", "interactive-film-authoring"]>; instruction: z.ZodString; title: z.ZodOptional; summary: z.ZodOptional; playMode: z.ZodOptional>; requestedSkills: z.ZodOptional>; actionPayload: z.ZodOptional>; }, "strip", z.ZodTypeAny, { action: string; instruction: string; targetSessionKind: "chat" | "script" | "storyboard" | "interactive-film" | "play" | "short" | "book" | "book-create" | "edit" | "interactive-film-authoring"; title?: string | undefined; summary?: string | undefined; playMode?: "open" | "guided" | undefined; requestedSkills?: string[] | undefined; actionPayload?: Record | undefined; }, { action: string; instruction: string; targetSessionKind: "chat" | "script" | "storyboard" | "interactive-film" | "play" | "short" | "book" | "book-create" | "edit" | "interactive-film-authoring"; title?: string | undefined; summary?: string | undefined; playMode?: "open" | "guided" | undefined; requestedSkills?: string[] | undefined; actionPayload?: Record | undefined; }>; export type PendingProposedAction = z.infer; export declare const PipelineStageSchema: z.ZodObject<{ label: z.ZodString; status: z.ZodEnum<["pending", "active", "completed"]>; }, "strip", z.ZodTypeAny, { status: "active" | "completed" | "pending"; label: string; }, { status: "active" | "completed" | "pending"; label: string; }>; export type PipelineStage = z.infer; export declare const ToolExecutionSchema: z.ZodObject<{ id: z.ZodString; tool: z.ZodString; agent: z.ZodOptional; label: z.ZodString; status: z.ZodEnum<["running", "processing", "completed", "error"]>; args: z.ZodOptional>; result: z.ZodOptional; details: z.ZodOptional; error: z.ZodOptional; stages: z.ZodOptional; }, "strip", z.ZodTypeAny, { status: "active" | "completed" | "pending"; label: string; }, { status: "active" | "completed" | "pending"; label: string; }>, "many">>; startedAt: z.ZodNumber; completedAt: z.ZodOptional; }, "strip", z.ZodTypeAny, { status: "completed" | "running" | "error" | "processing"; id: string; label: string; tool: string; startedAt: number; error?: string | undefined; details?: unknown; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }, { status: "completed" | "running" | "error" | "processing"; id: string; label: string; tool: string; startedAt: number; error?: string | undefined; details?: unknown; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }>; export type ToolExecution = z.infer; export declare const InteractionMessageSchema: z.ZodObject<{ role: z.ZodEnum<["user", "assistant", "system"]>; content: z.ZodString; thinking: z.ZodOptional; toolExecutions: z.ZodOptional; label: z.ZodString; status: z.ZodEnum<["running", "processing", "completed", "error"]>; args: z.ZodOptional>; result: z.ZodOptional; details: z.ZodOptional; error: z.ZodOptional; stages: z.ZodOptional; }, "strip", z.ZodTypeAny, { status: "active" | "completed" | "pending"; label: string; }, { status: "active" | "completed" | "pending"; label: string; }>, "many">>; startedAt: z.ZodNumber; completedAt: z.ZodOptional; }, "strip", z.ZodTypeAny, { status: "completed" | "running" | "error" | "processing"; id: string; label: string; tool: string; startedAt: number; error?: string | undefined; details?: unknown; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }, { status: "completed" | "running" | "error" | "processing"; id: string; label: string; tool: string; startedAt: number; error?: string | undefined; details?: unknown; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }>, "many">>; timestamp: z.ZodNumber; }, "strip", z.ZodTypeAny, { content: string; role: "user" | "assistant" | "system"; timestamp: number; thinking?: string | undefined; toolExecutions?: { status: "completed" | "running" | "error" | "processing"; id: string; label: string; tool: string; startedAt: number; error?: string | undefined; details?: unknown; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }[] | undefined; }, { content: string; role: "user" | "assistant" | "system"; timestamp: number; thinking?: string | undefined; toolExecutions?: { status: "completed" | "running" | "error" | "processing"; id: string; label: string; tool: string; startedAt: number; error?: string | undefined; details?: unknown; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }[] | undefined; }>; export type InteractionMessage = z.infer; export declare const BookCreationDraftSchema: z.ZodObject<{ concept: z.ZodString; title: z.ZodOptional; genre: z.ZodOptional; platform: z.ZodOptional; language: z.ZodOptional>; targetChapters: z.ZodOptional; chapterWordCount: z.ZodOptional; blurb: z.ZodOptional; worldPremise: z.ZodOptional; settingNotes: z.ZodOptional; protagonist: z.ZodOptional; supportingCast: z.ZodOptional; conflictCore: z.ZodOptional; volumeOutline: z.ZodOptional; constraints: z.ZodOptional; authorIntent: z.ZodOptional; currentFocus: z.ZodOptional; nextQuestion: z.ZodOptional; missingFields: z.ZodDefault>; readyToCreate: z.ZodDefault; }, "strip", z.ZodTypeAny, { concept: string; missingFields: string[]; readyToCreate: boolean; title?: string | undefined; platform?: string | undefined; genre?: string | undefined; targetChapters?: number | undefined; chapterWordCount?: number | undefined; language?: "zh" | "en" | undefined; protagonist?: string | undefined; authorIntent?: string | undefined; currentFocus?: string | undefined; volumeOutline?: string | undefined; blurb?: string | undefined; worldPremise?: string | undefined; settingNotes?: string | undefined; supportingCast?: string | undefined; conflictCore?: string | undefined; constraints?: string | undefined; nextQuestion?: string | undefined; }, { concept: string; title?: string | undefined; platform?: string | undefined; genre?: string | undefined; targetChapters?: number | undefined; chapterWordCount?: number | undefined; language?: "zh" | "en" | undefined; protagonist?: string | undefined; authorIntent?: string | undefined; currentFocus?: string | undefined; volumeOutline?: string | undefined; blurb?: string | undefined; worldPremise?: string | undefined; settingNotes?: string | undefined; supportingCast?: string | undefined; conflictCore?: string | undefined; constraints?: string | undefined; nextQuestion?: string | undefined; missingFields?: string[] | undefined; readyToCreate?: boolean | undefined; }>; export type BookCreationDraft = z.infer; export declare const DraftRoundSchema: z.ZodObject<{ roundId: z.ZodNumber; userMessage: z.ZodString; assistantRaw: z.ZodString; fieldsUpdated: z.ZodDefault>; summary: z.ZodDefault; timestamp: z.ZodNumber; }, "strip", z.ZodTypeAny, { summary: string; timestamp: number; roundId: number; userMessage: string; assistantRaw: string; fieldsUpdated: string[]; }, { timestamp: number; roundId: number; userMessage: string; assistantRaw: string; summary?: string | undefined; fieldsUpdated?: string[] | undefined; }>; export type DraftRound = z.infer; export declare const InteractionSessionSchema: z.ZodObject<{ sessionId: z.ZodString; projectRoot: z.ZodString; sessionKind: z.ZodOptional>; playMode: z.ZodOptional>; modelOverride: z.ZodOptional; activeBookId: z.ZodOptional; activeChapterNumber: z.ZodOptional; creationDraft: z.ZodOptional; genre: z.ZodOptional; platform: z.ZodOptional; language: z.ZodOptional>; targetChapters: z.ZodOptional; chapterWordCount: z.ZodOptional; blurb: z.ZodOptional; worldPremise: z.ZodOptional; settingNotes: z.ZodOptional; protagonist: z.ZodOptional; supportingCast: z.ZodOptional; conflictCore: z.ZodOptional; volumeOutline: z.ZodOptional; constraints: z.ZodOptional; authorIntent: z.ZodOptional; currentFocus: z.ZodOptional; nextQuestion: z.ZodOptional; missingFields: z.ZodDefault>; readyToCreate: z.ZodDefault; }, "strip", z.ZodTypeAny, { concept: string; missingFields: string[]; readyToCreate: boolean; title?: string | undefined; platform?: string | undefined; genre?: string | undefined; targetChapters?: number | undefined; chapterWordCount?: number | undefined; language?: "zh" | "en" | undefined; protagonist?: string | undefined; authorIntent?: string | undefined; currentFocus?: string | undefined; volumeOutline?: string | undefined; blurb?: string | undefined; worldPremise?: string | undefined; settingNotes?: string | undefined; supportingCast?: string | undefined; conflictCore?: string | undefined; constraints?: string | undefined; nextQuestion?: string | undefined; }, { concept: string; title?: string | undefined; platform?: string | undefined; genre?: string | undefined; targetChapters?: number | undefined; chapterWordCount?: number | undefined; language?: "zh" | "en" | undefined; protagonist?: string | undefined; authorIntent?: string | undefined; currentFocus?: string | undefined; volumeOutline?: string | undefined; blurb?: string | undefined; worldPremise?: string | undefined; settingNotes?: string | undefined; supportingCast?: string | undefined; conflictCore?: string | undefined; constraints?: string | undefined; nextQuestion?: string | undefined; missingFields?: string[] | undefined; readyToCreate?: boolean | undefined; }>>; draftRounds: z.ZodDefault>; summary: z.ZodDefault; timestamp: z.ZodNumber; }, "strip", z.ZodTypeAny, { summary: string; timestamp: number; roundId: number; userMessage: string; assistantRaw: string; fieldsUpdated: string[]; }, { timestamp: number; roundId: number; userMessage: string; assistantRaw: string; summary?: string | undefined; fieldsUpdated?: string[] | undefined; }>, "many">>; automationMode: z.ZodDefault>; messages: z.ZodDefault; content: z.ZodString; thinking: z.ZodOptional; toolExecutions: z.ZodOptional; label: z.ZodString; status: z.ZodEnum<["running", "processing", "completed", "error"]>; args: z.ZodOptional>; result: z.ZodOptional; details: z.ZodOptional; error: z.ZodOptional; stages: z.ZodOptional; }, "strip", z.ZodTypeAny, { status: "active" | "completed" | "pending"; label: string; }, { status: "active" | "completed" | "pending"; label: string; }>, "many">>; startedAt: z.ZodNumber; completedAt: z.ZodOptional; }, "strip", z.ZodTypeAny, { status: "completed" | "running" | "error" | "processing"; id: string; label: string; tool: string; startedAt: number; error?: string | undefined; details?: unknown; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }, { status: "completed" | "running" | "error" | "processing"; id: string; label: string; tool: string; startedAt: number; error?: string | undefined; details?: unknown; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }>, "many">>; timestamp: z.ZodNumber; }, "strip", z.ZodTypeAny, { content: string; role: "user" | "assistant" | "system"; timestamp: number; thinking?: string | undefined; toolExecutions?: { status: "completed" | "running" | "error" | "processing"; id: string; label: string; tool: string; startedAt: number; error?: string | undefined; details?: unknown; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }[] | undefined; }, { content: string; role: "user" | "assistant" | "system"; timestamp: number; thinking?: string | undefined; toolExecutions?: { status: "completed" | "running" | "error" | "processing"; id: string; label: string; tool: string; startedAt: number; error?: string | undefined; details?: unknown; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }[] | undefined; }>, "many">>; events: z.ZodDefault; bookId: z.ZodOptional; chapterNumber: z.ZodOptional; detail: z.ZodOptional; }, "strip", z.ZodTypeAny, { status: "completed" | "writing" | "failed" | "blocked" | "idle" | "planning" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human"; kind: string; timestamp: number; bookId?: string | undefined; chapterNumber?: number | undefined; detail?: string | undefined; }, { status: "completed" | "writing" | "failed" | "blocked" | "idle" | "planning" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human"; kind: string; timestamp: number; bookId?: string | undefined; chapterNumber?: number | undefined; detail?: string | undefined; }>, "many">>; pendingDecision: z.ZodOptional; summary: z.ZodString; }, "strip", z.ZodTypeAny, { kind: string; summary: string; bookId: string; chapterNumber?: number | undefined; }, { kind: string; summary: string; bookId: string; chapterNumber?: number | undefined; }>>; pendingProposedAction: z.ZodOptional; instruction: z.ZodString; title: z.ZodOptional; summary: z.ZodOptional; playMode: z.ZodOptional>; requestedSkills: z.ZodOptional>; actionPayload: z.ZodOptional>; }, "strip", z.ZodTypeAny, { action: string; instruction: string; targetSessionKind: "chat" | "script" | "storyboard" | "interactive-film" | "play" | "short" | "book" | "book-create" | "edit" | "interactive-film-authoring"; title?: string | undefined; summary?: string | undefined; playMode?: "open" | "guided" | undefined; requestedSkills?: string[] | undefined; actionPayload?: Record | undefined; }, { action: string; instruction: string; targetSessionKind: "chat" | "script" | "storyboard" | "interactive-film" | "play" | "short" | "book" | "book-create" | "edit" | "interactive-film-authoring"; title?: string | undefined; summary?: string | undefined; playMode?: "open" | "guided" | undefined; requestedSkills?: string[] | undefined; actionPayload?: Record | undefined; }>>; currentExecution: z.ZodOptional; bookId: z.ZodOptional; chapterNumber: z.ZodOptional; stageLabel: z.ZodOptional; }, "strip", z.ZodTypeAny, { status: "completed" | "writing" | "failed" | "blocked" | "idle" | "planning" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human"; bookId?: string | undefined; chapterNumber?: number | undefined; stageLabel?: string | undefined; }, { status: "completed" | "writing" | "failed" | "blocked" | "idle" | "planning" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human"; bookId?: string | undefined; chapterNumber?: number | undefined; stageLabel?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { events: { status: "completed" | "writing" | "failed" | "blocked" | "idle" | "planning" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human"; kind: string; timestamp: number; bookId?: string | undefined; chapterNumber?: number | undefined; detail?: string | undefined; }[]; messages: { content: string; role: "user" | "assistant" | "system"; timestamp: number; thinking?: string | undefined; toolExecutions?: { status: "completed" | "running" | "error" | "processing"; id: string; label: string; tool: string; startedAt: number; error?: string | undefined; details?: unknown; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }[] | undefined; }[]; sessionId: string; projectRoot: string; draftRounds: { summary: string; timestamp: number; roundId: number; userMessage: string; assistantRaw: string; fieldsUpdated: string[]; }[]; automationMode: "auto" | "manual" | "semi"; playMode?: "open" | "guided" | undefined; sessionKind?: "chat" | "script" | "storyboard" | "interactive-film" | "play" | "short" | "book" | "book-create" | "edit" | "interactive-film-authoring" | undefined; modelOverride?: string | undefined; activeBookId?: string | undefined; activeChapterNumber?: number | undefined; creationDraft?: { concept: string; missingFields: string[]; readyToCreate: boolean; title?: string | undefined; platform?: string | undefined; genre?: string | undefined; targetChapters?: number | undefined; chapterWordCount?: number | undefined; language?: "zh" | "en" | undefined; protagonist?: string | undefined; authorIntent?: string | undefined; currentFocus?: string | undefined; volumeOutline?: string | undefined; blurb?: string | undefined; worldPremise?: string | undefined; settingNotes?: string | undefined; supportingCast?: string | undefined; conflictCore?: string | undefined; constraints?: string | undefined; nextQuestion?: string | undefined; } | undefined; pendingDecision?: { kind: string; summary: string; bookId: string; chapterNumber?: number | undefined; } | undefined; pendingProposedAction?: { action: string; instruction: string; targetSessionKind: "chat" | "script" | "storyboard" | "interactive-film" | "play" | "short" | "book" | "book-create" | "edit" | "interactive-film-authoring"; title?: string | undefined; summary?: string | undefined; playMode?: "open" | "guided" | undefined; requestedSkills?: string[] | undefined; actionPayload?: Record | undefined; } | undefined; currentExecution?: { status: "completed" | "writing" | "failed" | "blocked" | "idle" | "planning" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human"; bookId?: string | undefined; chapterNumber?: number | undefined; stageLabel?: string | undefined; } | undefined; }, { sessionId: string; projectRoot: string; events?: { status: "completed" | "writing" | "failed" | "blocked" | "idle" | "planning" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human"; kind: string; timestamp: number; bookId?: string | undefined; chapterNumber?: number | undefined; detail?: string | undefined; }[] | undefined; messages?: { content: string; role: "user" | "assistant" | "system"; timestamp: number; thinking?: string | undefined; toolExecutions?: { status: "completed" | "running" | "error" | "processing"; id: string; label: string; tool: string; startedAt: number; error?: string | undefined; details?: unknown; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }[] | undefined; }[] | undefined; playMode?: "open" | "guided" | undefined; sessionKind?: "chat" | "script" | "storyboard" | "interactive-film" | "play" | "short" | "book" | "book-create" | "edit" | "interactive-film-authoring" | undefined; modelOverride?: string | undefined; activeBookId?: string | undefined; activeChapterNumber?: number | undefined; creationDraft?: { concept: string; title?: string | undefined; platform?: string | undefined; genre?: string | undefined; targetChapters?: number | undefined; chapterWordCount?: number | undefined; language?: "zh" | "en" | undefined; protagonist?: string | undefined; authorIntent?: string | undefined; currentFocus?: string | undefined; volumeOutline?: string | undefined; blurb?: string | undefined; worldPremise?: string | undefined; settingNotes?: string | undefined; supportingCast?: string | undefined; conflictCore?: string | undefined; constraints?: string | undefined; nextQuestion?: string | undefined; missingFields?: string[] | undefined; readyToCreate?: boolean | undefined; } | undefined; draftRounds?: { timestamp: number; roundId: number; userMessage: string; assistantRaw: string; summary?: string | undefined; fieldsUpdated?: string[] | undefined; }[] | undefined; automationMode?: "auto" | "manual" | "semi" | undefined; pendingDecision?: { kind: string; summary: string; bookId: string; chapterNumber?: number | undefined; } | undefined; pendingProposedAction?: { action: string; instruction: string; targetSessionKind: "chat" | "script" | "storyboard" | "interactive-film" | "play" | "short" | "book" | "book-create" | "edit" | "interactive-film-authoring"; title?: string | undefined; summary?: string | undefined; playMode?: "open" | "guided" | undefined; requestedSkills?: string[] | undefined; actionPayload?: Record | undefined; } | undefined; currentExecution?: { status: "completed" | "writing" | "failed" | "blocked" | "idle" | "planning" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human"; bookId?: string | undefined; chapterNumber?: number | undefined; stageLabel?: string | undefined; } | undefined; }>; export type InteractionSession = z.infer; export declare const BookSessionSchema: z.ZodObject<{ sessionId: z.ZodString; bookId: z.ZodNullable>; sessionKind: z.ZodOptional>; playMode: z.ZodOptional>; title: z.ZodDefault>; messages: z.ZodDefault; content: z.ZodString; thinking: z.ZodOptional; toolExecutions: z.ZodOptional; label: z.ZodString; status: z.ZodEnum<["running", "processing", "completed", "error"]>; args: z.ZodOptional>; result: z.ZodOptional; details: z.ZodOptional; error: z.ZodOptional; stages: z.ZodOptional; }, "strip", z.ZodTypeAny, { status: "active" | "completed" | "pending"; label: string; }, { status: "active" | "completed" | "pending"; label: string; }>, "many">>; startedAt: z.ZodNumber; completedAt: z.ZodOptional; }, "strip", z.ZodTypeAny, { status: "completed" | "running" | "error" | "processing"; id: string; label: string; tool: string; startedAt: number; error?: string | undefined; details?: unknown; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }, { status: "completed" | "running" | "error" | "processing"; id: string; label: string; tool: string; startedAt: number; error?: string | undefined; details?: unknown; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }>, "many">>; timestamp: z.ZodNumber; }, "strip", z.ZodTypeAny, { content: string; role: "user" | "assistant" | "system"; timestamp: number; thinking?: string | undefined; toolExecutions?: { status: "completed" | "running" | "error" | "processing"; id: string; label: string; tool: string; startedAt: number; error?: string | undefined; details?: unknown; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }[] | undefined; }, { content: string; role: "user" | "assistant" | "system"; timestamp: number; thinking?: string | undefined; toolExecutions?: { status: "completed" | "running" | "error" | "processing"; id: string; label: string; tool: string; startedAt: number; error?: string | undefined; details?: unknown; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }[] | undefined; }>, "many">>; creationDraft: z.ZodOptional; genre: z.ZodOptional; platform: z.ZodOptional; language: z.ZodOptional>; targetChapters: z.ZodOptional; chapterWordCount: z.ZodOptional; blurb: z.ZodOptional; worldPremise: z.ZodOptional; settingNotes: z.ZodOptional; protagonist: z.ZodOptional; supportingCast: z.ZodOptional; conflictCore: z.ZodOptional; volumeOutline: z.ZodOptional; constraints: z.ZodOptional; authorIntent: z.ZodOptional; currentFocus: z.ZodOptional; nextQuestion: z.ZodOptional; missingFields: z.ZodDefault>; readyToCreate: z.ZodDefault; }, "strip", z.ZodTypeAny, { concept: string; missingFields: string[]; readyToCreate: boolean; title?: string | undefined; platform?: string | undefined; genre?: string | undefined; targetChapters?: number | undefined; chapterWordCount?: number | undefined; language?: "zh" | "en" | undefined; protagonist?: string | undefined; authorIntent?: string | undefined; currentFocus?: string | undefined; volumeOutline?: string | undefined; blurb?: string | undefined; worldPremise?: string | undefined; settingNotes?: string | undefined; supportingCast?: string | undefined; conflictCore?: string | undefined; constraints?: string | undefined; nextQuestion?: string | undefined; }, { concept: string; title?: string | undefined; platform?: string | undefined; genre?: string | undefined; targetChapters?: number | undefined; chapterWordCount?: number | undefined; language?: "zh" | "en" | undefined; protagonist?: string | undefined; authorIntent?: string | undefined; currentFocus?: string | undefined; volumeOutline?: string | undefined; blurb?: string | undefined; worldPremise?: string | undefined; settingNotes?: string | undefined; supportingCast?: string | undefined; conflictCore?: string | undefined; constraints?: string | undefined; nextQuestion?: string | undefined; missingFields?: string[] | undefined; readyToCreate?: boolean | undefined; }>>; draftRounds: z.ZodDefault>; summary: z.ZodDefault; timestamp: z.ZodNumber; }, "strip", z.ZodTypeAny, { summary: string; timestamp: number; roundId: number; userMessage: string; assistantRaw: string; fieldsUpdated: string[]; }, { timestamp: number; roundId: number; userMessage: string; assistantRaw: string; summary?: string | undefined; fieldsUpdated?: string[] | undefined; }>, "many">>; events: z.ZodDefault; bookId: z.ZodOptional; chapterNumber: z.ZodOptional; detail: z.ZodOptional; }, "strip", z.ZodTypeAny, { status: "completed" | "writing" | "failed" | "blocked" | "idle" | "planning" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human"; kind: string; timestamp: number; bookId?: string | undefined; chapterNumber?: number | undefined; detail?: string | undefined; }, { status: "completed" | "writing" | "failed" | "blocked" | "idle" | "planning" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human"; kind: string; timestamp: number; bookId?: string | undefined; chapterNumber?: number | undefined; detail?: string | undefined; }>, "many">>; currentExecution: z.ZodOptional; bookId: z.ZodOptional; chapterNumber: z.ZodOptional; stageLabel: z.ZodOptional; }, "strip", z.ZodTypeAny, { status: "completed" | "writing" | "failed" | "blocked" | "idle" | "planning" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human"; bookId?: string | undefined; chapterNumber?: number | undefined; stageLabel?: string | undefined; }, { status: "completed" | "writing" | "failed" | "blocked" | "idle" | "planning" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human"; bookId?: string | undefined; chapterNumber?: number | undefined; stageLabel?: string | undefined; }>>; createdAt: z.ZodNumber; updatedAt: z.ZodNumber; }, "strip", z.ZodTypeAny, { title: string | null; createdAt: number; updatedAt: number; events: { status: "completed" | "writing" | "failed" | "blocked" | "idle" | "planning" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human"; kind: string; timestamp: number; bookId?: string | undefined; chapterNumber?: number | undefined; detail?: string | undefined; }[]; messages: { content: string; role: "user" | "assistant" | "system"; timestamp: number; thinking?: string | undefined; toolExecutions?: { status: "completed" | "running" | "error" | "processing"; id: string; label: string; tool: string; startedAt: number; error?: string | undefined; details?: unknown; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }[] | undefined; }[]; bookId: string | null; sessionId: string; draftRounds: { summary: string; timestamp: number; roundId: number; userMessage: string; assistantRaw: string; fieldsUpdated: string[]; }[]; playMode?: "open" | "guided" | undefined; sessionKind?: "chat" | "script" | "storyboard" | "interactive-film" | "play" | "short" | "book" | "book-create" | "edit" | "interactive-film-authoring" | undefined; creationDraft?: { concept: string; missingFields: string[]; readyToCreate: boolean; title?: string | undefined; platform?: string | undefined; genre?: string | undefined; targetChapters?: number | undefined; chapterWordCount?: number | undefined; language?: "zh" | "en" | undefined; protagonist?: string | undefined; authorIntent?: string | undefined; currentFocus?: string | undefined; volumeOutline?: string | undefined; blurb?: string | undefined; worldPremise?: string | undefined; settingNotes?: string | undefined; supportingCast?: string | undefined; conflictCore?: string | undefined; constraints?: string | undefined; nextQuestion?: string | undefined; } | undefined; currentExecution?: { status: "completed" | "writing" | "failed" | "blocked" | "idle" | "planning" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human"; bookId?: string | undefined; chapterNumber?: number | undefined; stageLabel?: string | undefined; } | undefined; }, { createdAt: number; updatedAt: number; bookId: string | null; sessionId: string; title?: string | null | undefined; events?: { status: "completed" | "writing" | "failed" | "blocked" | "idle" | "planning" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human"; kind: string; timestamp: number; bookId?: string | undefined; chapterNumber?: number | undefined; detail?: string | undefined; }[] | undefined; messages?: { content: string; role: "user" | "assistant" | "system"; timestamp: number; thinking?: string | undefined; toolExecutions?: { status: "completed" | "running" | "error" | "processing"; id: string; label: string; tool: string; startedAt: number; error?: string | undefined; details?: unknown; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }[] | undefined; }[] | undefined; playMode?: "open" | "guided" | undefined; sessionKind?: "chat" | "script" | "storyboard" | "interactive-film" | "play" | "short" | "book" | "book-create" | "edit" | "interactive-film-authoring" | undefined; creationDraft?: { concept: string; title?: string | undefined; platform?: string | undefined; genre?: string | undefined; targetChapters?: number | undefined; chapterWordCount?: number | undefined; language?: "zh" | "en" | undefined; protagonist?: string | undefined; authorIntent?: string | undefined; currentFocus?: string | undefined; volumeOutline?: string | undefined; blurb?: string | undefined; worldPremise?: string | undefined; settingNotes?: string | undefined; supportingCast?: string | undefined; conflictCore?: string | undefined; constraints?: string | undefined; nextQuestion?: string | undefined; missingFields?: string[] | undefined; readyToCreate?: boolean | undefined; } | undefined; draftRounds?: { timestamp: number; roundId: number; userMessage: string; assistantRaw: string; summary?: string | undefined; fieldsUpdated?: string[] | undefined; }[] | undefined; currentExecution?: { status: "completed" | "writing" | "failed" | "blocked" | "idle" | "planning" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human"; bookId?: string | undefined; chapterNumber?: number | undefined; stageLabel?: string | undefined; } | undefined; }>; export type BookSession = z.infer; export declare const GlobalSessionSchema: z.ZodObject<{ activeBookId: z.ZodOptional>; automationMode: z.ZodDefault>; }, "strip", z.ZodTypeAny, { automationMode: "auto" | "manual" | "semi"; activeBookId?: string | undefined; }, { activeBookId?: string | undefined; automationMode?: "auto" | "manual" | "semi" | undefined; }>; export type GlobalSession = z.infer; export declare function createBookSession(bookId: string | null, sessionId?: string, sessionKind?: SessionKind, options?: { readonly playMode?: PlayMode; }): BookSession; export declare function appendBookSessionMessage(session: BookSession, message: InteractionMessage): BookSession; export declare function bindActiveBook(session: InteractionSession, bookId: string, chapterNumber?: number): InteractionSession; export declare function clearPendingDecision(session: InteractionSession): InteractionSession; export declare function updateCreationDraft(session: InteractionSession, draft: BookCreationDraft): InteractionSession; export declare function clearCreationDraft(session: InteractionSession): InteractionSession; export declare function updateAutomationMode(session: InteractionSession, automationMode: AutomationMode): InteractionSession; export declare function appendInteractionMessage(session: InteractionSession, message: InteractionMessage): InteractionSession; export declare function appendInteractionEvent(session: InteractionSession, event: InteractionEvent): InteractionSession; //# sourceMappingURL=session.d.ts.map