/** One-time agent provisioning: schema migrations, agent/entity/room setup, and embedding dimensions. Hosts invoke it after runtime initialization. */ import type { Character } from "./types/agent.js"; import type { IDatabaseAdapter } from "./types/database.js"; import type { UUID } from "./types/primitives.js"; import type { IAgentRuntime } from "./types/runtime.js"; export interface ProvisionAgentOptions { /** Run plugin schema migrations (DDL). Default true for daemon. */ runMigrations?: boolean; } /** Runs registered plugin schema migrations through the adapter. Hosts opt into this provisioning step separately from runtime initialization. */ export declare function runPluginMigrations(runtime: IAgentRuntime): Promise; /** * Ensure agent row exists, then entity, self-room, and self-participant. * Uses batch adapter APIs (getAgentsByIds, createEntities, getRoomsByIds, etc.). * WHY: Agent must exist before the runtime can store memories/tasks; self-room and * participant are required for core conversation flow. */ export declare function ensureAgentInfrastructure(runtime: IAgentRuntime): Promise; /** * Set embedding dimension on the adapter from config (no LLM call). * Reads EMBEDDING_DIMENSIONS (plural, what the runtime embedder uses) or * EMBEDDING_DIMENSION (singular); plural wins on conflict. Skips if neither set. * WHY no LLM: Avoids a model call at boot; set the dimension in character * settings when using this path. If unset, embedding search may fail until dimension is set. */ export declare function ensureEmbeddingDimension(runtime: IAgentRuntime): Promise; /** Provisions a long-lived agent after runtime initialization, with optional schema migrations. */ export declare function provisionAgent(runtime: IAgentRuntime, options?: ProvisionAgentOptions): Promise; /** * Read agent from DB and merge settings/secrets into the given character. * Returns a new Character; does not mutate the input. * If no agent exists in DB, returns the character unchanged. * Call before constructing the runtime so the runtime gets merged settings. * WHY before runtime: The runtime constructor does not touch the DB; the host * loads DB-backed config once and passes the merged character in. */ export declare function mergeDbSettings(character: Character, adapter: IDatabaseAdapter, agentId: UUID): Promise;