import { z } from 'zod';
import type { PluginId, RunId } from '../ids/index.js';
import type { ToolResult } from '../tool/index.js';
export type PluginScope = 'project' | 'user';
export declare function assertPluginScope(scope: PluginScope): void;
export type PluginStatus = 'installed' | 'enabled' | 'disabled' | 'error';
export declare function assertPluginStatus(status: PluginStatus): void;
export type PluginContributionType = 'tool' | 'skill' | 'hook' | 'mcp_server' | 'connector' | 'persona';
export declare function assertPluginContributionType(type: PluginContributionType): void;
export type PluginHookEvent = 'run_start' | 'run_end' | 'pre_tool_use' | 'post_tool_use' | 'pre_llm_call' | 'post_llm_call' | 'iteration_start' | 'iteration_end';
export declare function assertPluginHookEvent(event: PluginHookEvent): void;
export interface PluginHookContext {
    readonly runId: RunId;
    readonly pluginId: PluginId;
    readonly event: PluginHookEvent;
    readonly toolName?: string;
    readonly toolInput?: unknown;
    readonly toolResult?: ToolResult;
    readonly iteration?: number;
}
export type PluginHookResult = {
    action: 'continue';
} | {
    action: 'skip';
    reason: string;
} | {
    action: 'modify';
    input: unknown;
} | {
    action: 'error';
    message: string;
} | {
    action: 'resume';
    input: string;
} | {
    action: 'retry';
};
export declare function assertPluginHookResult(result: PluginHookResult): asserts result;
export interface PluginHookDefinition {
    readonly event: PluginHookEvent;
    readonly handler: (context: PluginHookContext) => Promise<PluginHookResult>;
}
export interface PluginMCPServerConfig {
    readonly name: string;
    readonly command: string;
    readonly args?: readonly string[];
    readonly env?: Readonly<Record<string, string>>;
}
export interface PluginManifest {
    readonly name: string;
    readonly version: string;
    readonly description: string;
    readonly author?: string;
    readonly tools?: readonly string[];
    readonly skills?: readonly string[];
    readonly hooks?: readonly string[];
    readonly mcpServers?: readonly PluginMCPServerConfig[];
    readonly connectors?: readonly string[];
    readonly personas?: readonly string[];
}
export declare const PluginMCPServerConfigSchema: z.ZodObject<{
    name: z.ZodString;
    command: z.ZodString;
    args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, "strip", z.ZodTypeAny, {
    name: string;
    command: string;
    args?: string[] | undefined;
    env?: Record<string, string> | undefined;
}, {
    name: string;
    command: string;
    args?: string[] | undefined;
    env?: Record<string, string> | undefined;
}>;
export declare const PluginManifestSchema: z.ZodObject<{
    name: z.ZodString;
    version: z.ZodString;
    description: z.ZodString;
    author: z.ZodOptional<z.ZodString>;
    tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    skills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    hooks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    mcpServers: z.ZodOptional<z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        command: z.ZodString;
        args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    }, "strip", z.ZodTypeAny, {
        name: string;
        command: string;
        args?: string[] | undefined;
        env?: Record<string, string> | undefined;
    }, {
        name: string;
        command: string;
        args?: string[] | undefined;
        env?: Record<string, string> | undefined;
    }>, "many">>;
    connectors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    personas: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
    name: string;
    version: string;
    description: string;
    author?: string | undefined;
    tools?: string[] | undefined;
    skills?: string[] | undefined;
    hooks?: string[] | undefined;
    mcpServers?: {
        name: string;
        command: string;
        args?: string[] | undefined;
        env?: Record<string, string> | undefined;
    }[] | undefined;
    connectors?: string[] | undefined;
    personas?: string[] | undefined;
}, {
    name: string;
    version: string;
    description: string;
    author?: string | undefined;
    tools?: string[] | undefined;
    skills?: string[] | undefined;
    hooks?: string[] | undefined;
    mcpServers?: {
        name: string;
        command: string;
        args?: string[] | undefined;
        env?: Record<string, string> | undefined;
    }[] | undefined;
    connectors?: string[] | undefined;
    personas?: string[] | undefined;
}>;
export interface PluginDefinition {
    readonly id: PluginId;
    readonly manifest: PluginManifest;
    readonly scope: PluginScope;
    readonly status: PluginStatus;
    readonly rootDir: string;
    readonly installedAt: number;
    readonly enabledAt?: number;
    readonly error?: string;
}
export type PluginLifecycleEvent = {
    type: 'plugin_installed';
    pluginId: PluginId;
    name: string;
    scope: PluginScope;
} | {
    type: 'plugin_enabled';
    pluginId: PluginId;
    name: string;
} | {
    type: 'plugin_disabled';
    pluginId: PluginId;
    name: string;
} | {
    type: 'plugin_uninstalled';
    pluginId: PluginId;
    name: string;
} | {
    type: 'plugin_error';
    pluginId: PluginId;
    name: string;
    error: string;
} | {
    type: 'plugin_hook_executed';
    pluginId: PluginId;
    hookEvent: PluginHookEvent;
    durationMs: number;
};
export type PluginEventListener = (event: PluginLifecycleEvent) => void;
//# sourceMappingURL=index.d.ts.map