export interface WorldEntry { key: string[]; keysecondary: string[]; comment: string; content: string; constant: boolean; vectorized: boolean; selective: boolean; selectiveLogic: number; addMemo: boolean; order: number; position: number; disable: boolean; ignoreBudget: boolean; excludeRecursion: boolean; preventRecursion: boolean; matchPersonaDescription: boolean; matchCharacterDescription: boolean; matchCharacterPersonality: boolean; matchCharacterDepthPrompt: boolean; matchScenario: boolean; matchCreatorNotes: boolean; delayUntilRecursion: boolean; probability: number; useProbability: boolean; depth: number; outletName: string; group: string; groupOverride: boolean; groupWeight: number; scanDepth: number | null; caseSensitive: boolean | null; matchWholeWords: boolean | null; useGroupScoring: boolean; automationId: string; role: number; sticky: number; cooldown: number; delay: number; triggers: unknown[]; uid: number; displayIndex: number; extensions: Record; [extra: string]: unknown; } export interface WorldBook { entries: Record; [extra: string]: unknown; } /** * List world book JSON files in a directory. */ export declare function listWorlds(dir: string): string[]; /** * Read a world book from a JSON file. */ export declare function readWorld(filePath: string): WorldBook; /** * Write a world book to a JSON file. */ export declare function writeWorld(filePath: string, world: WorldBook): void; /** * Get a single entry from a world book by its key (the object key in entries, e.g. "0", "1"). */ export declare function getWorldEntry(world: WorldBook, entryId: string): WorldEntry | undefined; /** * Get summary list of all entries: id, comment, key, enabled/disabled. */ export declare function getWorldEntrySummaries(world: WorldBook): Array<{ id: string; comment: string; keys: string[]; disabled: boolean; constant: boolean; position: number; order: number; contentLength: number; }>; /** * Set/update a world entry. If entryId is not provided, creates a new entry. * Partial updates are supported - only provided fields will be overwritten. */ export declare function setWorldEntry(world: WorldBook, entryId: string | undefined, updates: Partial): { world: WorldBook; entryId: string; }; /** * Delete a world entry by its ID. */ export declare function deleteWorldEntry(world: WorldBook, entryId: string): boolean; /** * Extract a world book into workspace files. * Creates: workspace/worlds/{name}/_meta.json + {seq}_{comment}.json per entry */ export declare function extractWorldToWorkspace(worldPath: string, workspaceDir: string): { outDir: string; entryFiles: string[]; }; /** * Apply workspace files back to the original world book JSON. */ export declare function applyWorldFromWorkspace(worldDir: string, outputPath?: string): string;