/** Public brain definition contract for external authors. */
type BrainEnvironment = Record<string, string | undefined>;
type PluginConfig = Record<string, unknown>;
interface Plugin {
    readonly id: string;
    readonly version: string;
    readonly type: "core" | "entity" | "service" | "interface";
    readonly packageName: string;
    readonly description?: string;
    readonly dependencies?: string[];
    ready?(): Promise<void>;
    shutdown?(): Promise<void>;
    requiresDaemonStartup?(): boolean;
}
type CapabilityConfig = PluginConfig | ((env: BrainEnvironment) => PluginConfig) | undefined;
type PluginFactory = (config: PluginConfig) => Plugin | Plugin[];
type CapabilityEntry = [
    id: string,
    factory: PluginFactory,
    config: CapabilityConfig
];
type InterfaceConstructor = new (config: PluginConfig) => Plugin;
type InterfaceEntry = [
    id: string,
    constructor: InterfaceConstructor,
    envMapper: (env: BrainEnvironment) => PluginConfig | null
];
type PresetName = "core" | "default" | "full";
type BrainMode = "eval";
interface BrainIdentity {
    characterName: string;
    role: string;
    purpose: string;
    values: string[];
}
interface BrainDefinition {
    name: string;
    version: string;
    model?: string;
    identity?: BrainIdentity;
    agentInstructions?: string[];
    site?: unknown;
    theme?: string;
    capabilities: CapabilityEntry[];
    interfaces: InterfaceEntry[];
    presets?: Partial<Record<PresetName, string[]>>;
    defaultPreset?: PresetName;
    permissions?: unknown;
    deployment?: unknown;
    evalDisable?: string[];
    extra?: Record<string, unknown>;
}
declare function defineBrain(definition: BrainDefinition): BrainDefinition;

/**
 * Pre-v1 external plugin API marker.
 *
 * During alpha, the external plugin API compatibility marker tracks the
 * published @rizom/brain package version. Once the plugin API is declared
 * stable, this can move to an independent semver contract such as 1.0.0.
 */
declare const PLUGIN_API_VERSION: string;

export { PLUGIN_API_VERSION, defineBrain };
export type { BrainDefinition, BrainEnvironment, BrainIdentity, BrainMode, CapabilityConfig, CapabilityEntry, InterfaceConstructor, InterfaceEntry, Plugin, PluginConfig, PluginFactory, PresetName };
