import { z } from "zod"; import { type AutomationMode } from "./modes.js"; import { type InteractionEvent } from "./events.js"; export declare const PendingDecisionSchema: z.ZodObject<{ kind: z.ZodString; bookId: z.ZodString; chapterNumber: z.ZodOptional; summary: z.ZodString; }, "strip", z.ZodTypeAny, { bookId: string; kind: string; summary: string; chapterNumber?: number | undefined; }, { bookId: string; kind: string; summary: string; chapterNumber?: number | undefined; }>; export type PendingDecision = 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" | "error" | "running" | "processing"; id: string; tool: string; label: string; startedAt: number; error?: string | undefined; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; details?: unknown; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }, { status: "completed" | "error" | "running" | "processing"; id: string; tool: string; label: string; startedAt: number; error?: string | undefined; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; details?: unknown; 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" | "error" | "running" | "processing"; id: string; tool: string; label: string; startedAt: number; error?: string | undefined; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; details?: unknown; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }, { status: "completed" | "error" | "running" | "processing"; id: string; tool: string; label: string; startedAt: number; error?: string | undefined; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; details?: unknown; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }>, "many">>; timestamp: z.ZodNumber; }, "strip", z.ZodTypeAny, { role: "system" | "user" | "assistant"; content: string; timestamp: number; thinking?: string | undefined; toolExecutions?: { status: "completed" | "error" | "running" | "processing"; id: string; tool: string; label: string; startedAt: number; error?: string | undefined; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; details?: unknown; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }[] | undefined; }, { role: "system" | "user" | "assistant"; content: string; timestamp: number; thinking?: string | undefined; toolExecutions?: { status: "completed" | "error" | "running" | "processing"; id: string; tool: string; label: string; startedAt: number; error?: string | undefined; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; details?: unknown; 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, { timestamp: number; summary: string; 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; 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, { timestamp: number; summary: string; 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" | "error" | "running" | "processing"; id: string; tool: string; label: string; startedAt: number; error?: string | undefined; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; details?: unknown; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }, { status: "completed" | "error" | "running" | "processing"; id: string; tool: string; label: string; startedAt: number; error?: string | undefined; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; details?: unknown; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }>, "many">>; timestamp: z.ZodNumber; }, "strip", z.ZodTypeAny, { role: "system" | "user" | "assistant"; content: string; timestamp: number; thinking?: string | undefined; toolExecutions?: { status: "completed" | "error" | "running" | "processing"; id: string; tool: string; label: string; startedAt: number; error?: string | undefined; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; details?: unknown; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }[] | undefined; }, { role: "system" | "user" | "assistant"; content: string; timestamp: number; thinking?: string | undefined; toolExecutions?: { status: "completed" | "error" | "running" | "processing"; id: string; tool: string; label: string; startedAt: number; error?: string | undefined; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; details?: unknown; 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" | "planning" | "idle" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human" | "blocked" | "failed"; kind: string; timestamp: number; bookId?: string | undefined; chapterNumber?: number | undefined; detail?: string | undefined; }, { status: "completed" | "writing" | "planning" | "idle" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human" | "blocked" | "failed"; kind: string; timestamp: number; bookId?: string | undefined; chapterNumber?: number | undefined; detail?: string | undefined; }>, "many">>; pendingDecision: z.ZodOptional; summary: z.ZodString; }, "strip", z.ZodTypeAny, { bookId: string; kind: string; summary: string; chapterNumber?: number | undefined; }, { bookId: string; kind: string; summary: string; chapterNumber?: number | undefined; }>>; currentExecution: z.ZodOptional; bookId: z.ZodOptional; chapterNumber: z.ZodOptional; stageLabel: z.ZodOptional; }, "strip", z.ZodTypeAny, { status: "completed" | "writing" | "planning" | "idle" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human" | "blocked" | "failed"; bookId?: string | undefined; chapterNumber?: number | undefined; stageLabel?: string | undefined; }, { status: "completed" | "writing" | "planning" | "idle" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human" | "blocked" | "failed"; bookId?: string | undefined; chapterNumber?: number | undefined; stageLabel?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { events: { status: "completed" | "writing" | "planning" | "idle" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human" | "blocked" | "failed"; kind: string; timestamp: number; bookId?: string | undefined; chapterNumber?: number | undefined; detail?: string | undefined; }[]; messages: { role: "system" | "user" | "assistant"; content: string; timestamp: number; thinking?: string | undefined; toolExecutions?: { status: "completed" | "error" | "running" | "processing"; id: string; tool: string; label: string; startedAt: number; error?: string | undefined; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; details?: unknown; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }[] | undefined; }[]; sessionId: string; projectRoot: string; draftRounds: { timestamp: number; summary: string; roundId: number; userMessage: string; assistantRaw: string; fieldsUpdated: string[]; }[]; automationMode: "auto" | "semi" | "manual"; 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?: { bookId: string; kind: string; summary: string; chapterNumber?: number | undefined; } | undefined; currentExecution?: { status: "completed" | "writing" | "planning" | "idle" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human" | "blocked" | "failed"; bookId?: string | undefined; chapterNumber?: number | undefined; stageLabel?: string | undefined; } | undefined; }, { sessionId: string; projectRoot: string; events?: { status: "completed" | "writing" | "planning" | "idle" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human" | "blocked" | "failed"; kind: string; timestamp: number; bookId?: string | undefined; chapterNumber?: number | undefined; detail?: string | undefined; }[] | undefined; messages?: { role: "system" | "user" | "assistant"; content: string; timestamp: number; thinking?: string | undefined; toolExecutions?: { status: "completed" | "error" | "running" | "processing"; id: string; tool: string; label: string; startedAt: number; error?: string | undefined; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; details?: unknown; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }[] | undefined; }[] | 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" | "semi" | "manual" | undefined; pendingDecision?: { bookId: string; kind: string; summary: string; chapterNumber?: number | undefined; } | undefined; currentExecution?: { status: "completed" | "writing" | "planning" | "idle" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human" | "blocked" | "failed"; 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>; 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" | "error" | "running" | "processing"; id: string; tool: string; label: string; startedAt: number; error?: string | undefined; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; details?: unknown; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }, { status: "completed" | "error" | "running" | "processing"; id: string; tool: string; label: string; startedAt: number; error?: string | undefined; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; details?: unknown; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }>, "many">>; timestamp: z.ZodNumber; }, "strip", z.ZodTypeAny, { role: "system" | "user" | "assistant"; content: string; timestamp: number; thinking?: string | undefined; toolExecutions?: { status: "completed" | "error" | "running" | "processing"; id: string; tool: string; label: string; startedAt: number; error?: string | undefined; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; details?: unknown; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }[] | undefined; }, { role: "system" | "user" | "assistant"; content: string; timestamp: number; thinking?: string | undefined; toolExecutions?: { status: "completed" | "error" | "running" | "processing"; id: string; tool: string; label: string; startedAt: number; error?: string | undefined; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; details?: unknown; 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, { timestamp: number; summary: string; 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" | "planning" | "idle" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human" | "blocked" | "failed"; kind: string; timestamp: number; bookId?: string | undefined; chapterNumber?: number | undefined; detail?: string | undefined; }, { status: "completed" | "writing" | "planning" | "idle" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human" | "blocked" | "failed"; 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" | "planning" | "idle" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human" | "blocked" | "failed"; bookId?: string | undefined; chapterNumber?: number | undefined; stageLabel?: string | undefined; }, { status: "completed" | "writing" | "planning" | "idle" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human" | "blocked" | "failed"; 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" | "planning" | "idle" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human" | "blocked" | "failed"; kind: string; timestamp: number; bookId?: string | undefined; chapterNumber?: number | undefined; detail?: string | undefined; }[]; messages: { role: "system" | "user" | "assistant"; content: string; timestamp: number; thinking?: string | undefined; toolExecutions?: { status: "completed" | "error" | "running" | "processing"; id: string; tool: string; label: string; startedAt: number; error?: string | undefined; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; details?: unknown; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }[] | undefined; }[]; bookId: string | null; sessionId: string; draftRounds: { timestamp: number; summary: string; roundId: number; userMessage: string; assistantRaw: string; fieldsUpdated: string[]; }[]; 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" | "planning" | "idle" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human" | "blocked" | "failed"; 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" | "planning" | "idle" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human" | "blocked" | "failed"; kind: string; timestamp: number; bookId?: string | undefined; chapterNumber?: number | undefined; detail?: string | undefined; }[] | undefined; messages?: { role: "system" | "user" | "assistant"; content: string; timestamp: number; thinking?: string | undefined; toolExecutions?: { status: "completed" | "error" | "running" | "processing"; id: string; tool: string; label: string; startedAt: number; error?: string | undefined; agent?: string | undefined; args?: Record | undefined; result?: string | undefined; details?: unknown; stages?: { status: "active" | "completed" | "pending"; label: string; }[] | undefined; completedAt?: number | undefined; }[] | undefined; }[] | 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" | "planning" | "idle" | "composing" | "assessing" | "repairing" | "persisting" | "waiting_human" | "blocked" | "failed"; 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" | "semi" | "manual"; activeBookId?: string | undefined; }, { activeBookId?: string | undefined; automationMode?: "auto" | "semi" | "manual" | undefined; }>; export type GlobalSession = z.infer; export declare function createBookSession(bookId: string | null, sessionId?: string): 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