/**
 * Character Settings Storage
 *
 * Stores global secrets in the character's settings.secrets object.
 * This is the primary storage for agent-level configuration and API keys.
 *
 * Note: This implementation directly accesses character.settings rather than
 * using getSetting()/setSetting() because those methods don't support object
 * values - they only return primitives (string | boolean | number | null).
 */
import type { IAgentRuntime } from "../../../types/index.ts";
import { type KeyManager } from "../crypto/index.ts";
import type { SecretConfig, SecretContext, SecretMetadata, StorageBackend } from "../types.ts";
import { BaseSecretStorage } from "./interface.ts";
/**
 * Character settings-based storage for global secrets
 *
 * Secrets are stored in character.settings.secrets with metadata
 * tracked separately for configuration management.
 */
export declare class CharacterSettingsStorage extends BaseSecretStorage {
    readonly storageType: StorageBackend;
    private runtime;
    private keyManager;
    private initialized;
    constructor(runtime: IAgentRuntime, keyManager: KeyManager);
    initialize(): Promise<void>;
    /**
     * Ensure the character.settings.secrets structure exists
     */
    private ensureSettingsStructure;
    exists(key: string, _context: SecretContext): Promise<boolean>;
    get(key: string, context: SecretContext): Promise<string | null>;
    set(key: string, value: string, context: SecretContext, config?: Partial<SecretConfig>): Promise<boolean>;
    delete(key: string, _context: SecretContext): Promise<boolean>;
    list(_context: SecretContext): Promise<SecretMetadata>;
    getConfig(key: string, context: SecretContext): Promise<SecretConfig | null>;
    updateConfig(key: string, _context: SecretContext, config: Partial<SecretConfig>): Promise<boolean>;
    /**
     * Get the secrets object from character settings
     *
     * Accesses character.settings.secrets directly instead of using getSetting()
     * because getSetting() only returns primitives, not objects.
     */
    private getSecretsObject;
    /**
     * Migrate legacy environment variable format to new format
     */
    migrateFromEnvVars(envVarPrefix?: string): Promise<number>;
    /**
     * Get a secret as an environment variable (for backward compatibility)
     */
    getAsEnvVar(key: string): Promise<string | null>;
    /**
     * Sync a secret to process.env (for plugins that read env vars directly)
     */
    syncToEnv(key: string, envVarName?: string): Promise<boolean>;
    /**
     * Sync all secrets to process.env
     */
    syncAllToEnv(): Promise<number>;
}
//# sourceMappingURL=character-store.d.ts.map