// Models
export { BookConfigSchema, PlatformSchema, GenreSchema, BookStatusSchema, FanficModeSchema, normalizePlatformId, normalizePlatformOrOther } from "./models/book.js";
export { ChapterMetaSchema, ChapterStatusSchema } from "./models/chapter.js";
export { ProjectConfigSchema, LLMConfigSchema, AgentLLMOverrideSchema, DetectionConfigSchema, QualityGatesSchema, FoundationConfigSchema, WritingConfigSchema, InputGovernanceModeSchema } from "./models/project.js";
export { GenreProfileSchema, parseGenreProfile } from "./models/genre-profile.js";
export { BookRulesSchema, parseBookRules, tryParseBookRulesFrontmatter } from "./models/book-rules.js";
export { LengthCountingModeSchema, LengthNormalizeModeSchema, LengthSpecSchema, LengthTelemetrySchema, LengthWarningSchema } from "./models/length-governance.js";
export { RuntimeStateLanguageSchema, StateManifestSchema, HookStatusSchema, HookRecordSchema, HooksStateSchema, ChapterSummaryRowSchema, ChapterSummariesStateSchema, CurrentStateFactSchema, CurrentStateStateSchema, CurrentStatePatchSchema, HookOpsSchema, NewHookCandidateSchema, RuntimeStateDeltaSchema, } from "./models/runtime-state.js";
export { ChapterMemoSchema, ChapterIntentSchema, ContextSourceSchema, ContextPackageSchema, RuleLayerScopeSchema, RuleLayerSchema, OverrideEdgeSchema, ActiveOverrideSchema, RuleStackSectionsSchema, RuleStackSchema, ChapterTraceSchema, } from "./models/input-governance.js";
export { PlannerAgent } from "./agents/planner.js";
export { ComposerAgent, composeGovernedChapter, } from "./agents/composer.js";
export { PLANNER_MEMO_SYSTEM_PROMPT, PLANNER_MEMO_USER_TEMPLATE, buildPlannerUserMessage, buildGoldenOpeningGuidance, } from "./agents/planner-prompts.js";
export { gatherPlanningMaterials, } from "./utils/planning-materials.js";
export { buildProxyFetchInit, fetchWithProxy, resolveProxyUrl, } from "./utils/proxy-fetch.js";
export { assertSafeBookId, deriveBookIdFromTitle, isSafeBookId } from "./utils/book-id.js";
export { safeChildPath } from "./utils/path-safety.js";
export { AutomationModeSchema, normalizeAutomationMode, } from "./interaction/modes.js";
export { InteractionIntentTypeSchema, InteractionRequestSchema, } from "./interaction/intents.js";
export { ExecutionStatusSchema, ExecutionStateSchema, InteractionEventSchema, isTerminalExecutionStatus, } from "./interaction/events.js";
export { BookCreationDraftSchema, DraftRoundSchema, PendingDecisionSchema, InteractionMessageSchema, InteractionSessionSchema, bindActiveBook, clearCreationDraft, clearPendingDecision, updateAutomationMode, updateCreationDraft, appendInteractionMessage, appendInteractionEvent, BookSessionSchema, GlobalSessionSchema, createBookSession, appendBookSessionMessage, } from "./interaction/session.js";
export { resolveProjectSessionPath, createProjectSession, loadProjectSession, persistProjectSession, resolveSessionActiveBook, loadGlobalSession, persistGlobalSession, } from "./interaction/project-session-store.js";
export { loadBookSession, persistBookSession, listBookSessions, renameBookSession, deleteBookSession, migrateBookSession, createAndPersistBookSession, SessionAlreadyMigratedError, } from "./interaction/book-session-store.js";
export { appendManualSessionMessages, appendTranscriptEvent, sessionsDir, readTranscriptEvents, nextTranscriptSeq, transcriptPath, legacyBookSessionPath, } from "./interaction/session-transcript.js";
export { cleanRestoredAgentMessages, committedMessageEvents, deriveBookSessionFromTranscript, restoreAgentMessagesFromTranscript, } from "./interaction/session-transcript-restore.js";
export { MessageEventSchema, RequestCommittedEventSchema, RequestFailedEventSchema, RequestStartedEventSchema, SessionCreatedEventSchema, SessionMetadataUpdatedEventSchema, TranscriptEventSchema, } from "./interaction/session-transcript-schema.js";
export { routeInteractionRequest } from "./interaction/request-router.js";
export { routeNaturalLanguageIntent, } from "./interaction/nl-router.js";
export { processProjectInteractionInput, processProjectInteractionRequest, } from "./interaction/project-control.js";
export { createInteractionToolsFromDeps } from "./interaction/project-tools.js";
export { buildExportArtifact, writeExportArtifact } from "./interaction/export-artifact.js";
export { normalizeTruthFileName, classifyTruthAuthority, } from "./interaction/truth-authority.js";
export { executeEditTransaction, planEditTransaction, } from "./interaction/edit-controller.js";
export { runInteractionRequest, } from "./interaction/runtime.js";
export { parseDraftDirectives, createDirectiveStreamFilter, } from "./interaction/draft-directive-parser.js";
export { SHORT_FICTION_DEFAULT_CHAPTERS, SHORT_FICTION_MIN_CHAPTERS, SHORT_FICTION_MAX_CHAPTERS, SHORT_FICTION_DEFAULT_CHARS_PER_CHAPTER, SHORT_FICTION_MIN_CHARS_PER_CHAPTER, SHORT_FICTION_MAX_CHARS_PER_CHAPTER, ShortFictionOutlineAgent, ShortFictionOutlineReviewerAgent, ShortFictionOutlineReviserAgent, ShortFictionWriterAgent, ShortFictionDraftReviewerAgent, ShortFictionDraftReviserAgent, ShortFictionPackagingAgent, parseShortFictionBatchDraft, validateShortFictionDraftForFinal, renderShortFictionDraftMarkdown, } from "./agents/short-fiction.js";
export { generateShortFictionCover, runShortFictionProduction, extractResponsesImageBase64, resolveCoverApiKey, } from "./pipeline/short-fiction-runner.js";
// Agent (pi-agent integration)
export * from "./agent/index.js";
// LLM
export { createLLMClient, chatCompletion, chatWithTools, createStreamMonitor, PartialResponseError } from "./llm/provider.js";
export { SERVICE_PRESETS, SERVICE_TO_PI_PROVIDER, resolveServicePreset, resolveServiceProviderFamily, resolveServicePiProvider, resolveServiceModelsBaseUrl, guessServiceFromBaseUrl, listModelsForService, listServicesWithModelCount, } from "./llm/service-presets.js";
export { resolveServiceModel } from "./llm/service-resolver.js";
export { loadSecrets, saveSecrets, getServiceApiKey } from "./llm/secrets.js";
export { COVER_PROVIDER_PRESETS, coverSecretKey, resolveCoverProviderPreset, } from "./llm/cover-providers.js";
export { migrateConfig } from "./llm/config-migration.js";
export { getAllEndpoints, getEndpoint } from "./llm/providers/index.js";
export { probeModelsFromUpstream } from "./llm/providers/probe.js";
// Agents
export { BaseAgent } from "./agents/base.js";
export { ArchitectAgent } from "./agents/architect.js";
export { WriterAgent } from "./agents/writer.js";
export { LengthNormalizerAgent } from "./agents/length-normalizer.js";
export { ContinuityAuditor } from "./agents/continuity.js";
export { ReviserAgent, DEFAULT_REVISE_MODE } from "./agents/reviser.js";
export { PolisherAgent } from "./agents/polisher.js";
export { RadarAgent } from "./agents/radar.js";
export { FanqieRadarSource, QidianRadarSource, TextRadarSource } from "./agents/radar-source.js";
export { readGenreProfile, readBookRules, listAvailableGenres, getBuiltinGenresDir } from "./agents/rules-reader.js";
export { buildWriterSystemPrompt, buildGoldenOpeningDiscipline } from "./agents/writer-prompts.js";
export { analyzeAITells } from "./agents/ai-tells.js";
export { analyzeSensitiveWords } from "./agents/sensitive-words.js";
export { detectAIContent } from "./agents/detector.js";
export { analyzeStyle } from "./agents/style-analyzer.js";
export { analyzeDetectionInsights } from "./agents/detection-insights.js";
export { validatePostWrite, detectParagraphLengthDrift, detectParagraphShapeWarnings, detectDuplicateTitle } from "./agents/post-write-validator.js";
export { ChapterAnalyzerAgent } from "./agents/chapter-analyzer.js";
export { parseWriterOutput, parseCreativeOutput } from "./agents/writer-parser.js";
export { buildSettlerSystemPrompt, buildSettlerUserPrompt } from "./agents/settler-prompts.js";
export { parseSettlementOutput } from "./agents/settler-parser.js";
export { parseSettlerDeltaOutput } from "./agents/settler-delta-parser.js";
export { FanficCanonImporter } from "./agents/fanfic-canon-importer.js";
export { getFanficDimensionConfig, FANFIC_DIMENSIONS } from "./agents/fanfic-dimensions.js";
export { buildFanficCanonSection, buildCharacterVoiceProfiles, buildFanficModeInstructions } from "./agents/fanfic-prompt-sections.js";
export * from "./prompts/index.js";
// Utils
export { isNewLayoutBook } from "./utils/outline-paths.js";
export { fetchUrl, searchWeb } from "./utils/web-search.js";
export { filterHooks, filterSummaries, filterSubplots, filterEmotionalArcs, filterCharacterMatrix } from "./utils/context-filter.js";
export { extractPOVFromOutline, filterMatrixByPOV, filterHooksByPOV } from "./utils/pov-filter.js";
export { ConsolidatorAgent } from "./agents/consolidator.js";
export { MemoryDB } from "./state/memory-db.js";
export { StateValidatorAgent } from "./agents/state-validator.js";
export { loadRuntimeStateSnapshot, buildRuntimeStateArtifacts, saveRuntimeStateSnapshot, loadNarrativeMemorySeed, loadSnapshotCurrentStateFacts } from "./state/runtime-state-store.js";
export { splitChapters } from "./utils/chapter-splitter.js";
export { countChapterLength, resolveLengthCountingMode, formatLengthCount, buildLengthSpec, isOutsideSoftRange, isOutsideHardRange, chooseNormalizeMode } from "./utils/length-metrics.js";
export { createLogger, createStderrSink, createJsonLineSink, nullSink } from "./utils/logger.js";
export { loadProjectConfig, GLOBAL_CONFIG_DIR, GLOBAL_ENV_PATH, isApiKeyOptionalForEndpoint } from "./utils/config-loader.js";
export { resolveEffectiveLLMConfig } from "./utils/effective-llm-config.js";
export { loadLLMEnvLayers, mergeEnvMaps, studioIgnoredEnv, cliOverlayEnv, legacyEnv } from "./utils/llm-env.js";
export { computeAnalytics } from "./utils/analytics.js";
export { collectStaleHookDebt, evaluateHookAdmission, classifyHookDisposition, } from "./utils/hook-governance.js";
export { arbitrateRuntimeStateDeltaHooks } from "./utils/hook-arbiter.js";
export { analyzeHookHealth } from "./utils/hook-health.js";
// Pipeline
export { PipelineRunner } from "./pipeline/runner.js";
export { Scheduler } from "./pipeline/scheduler.js";
export { runAgentLoop, AGENT_TOOLS as AGENT_TOOLS } from "./pipeline/agent.js";
export { detectChapter, detectAndRewrite, loadDetectionHistory } from "./pipeline/detection-runner.js";
// State
export { StateManager } from "./state/manager.js";
export { bootstrapStructuredStateFromMarkdown } from "./state/state-bootstrap.js";
export { renderCurrentStateProjection, renderHooksProjection, renderChapterSummariesProjection } from "./state/state-projections.js";
export { applyRuntimeStateDelta } from "./state/state-reducer.js";
export { validateRuntimeState } from "./state/state-validator.js";
// Notify
export { dispatchNotification, dispatchWebhookEvent } from "./notify/dispatcher.js";
export async function sendTelegram(config, message) {
    const transport = await import("./notify/telegram.js");
    await transport.sendTelegram(config, message);
}
export async function sendFeishu(config, title, text) {
    const transport = await import("./notify/feishu.js");
    await transport.sendFeishu(config, title, text);
}
export async function sendWechatWork(config, text) {
    const transport = await import("./notify/wechat-work.js");
    await transport.sendWechatWork(config, text);
}
export async function sendWebhook(config, payload) {
    const transport = await import("./notify/webhook.js");
    await transport.sendWebhook(config, payload);
}
//# sourceMappingURL=index.js.map