import type { PortableTool } from "../portable-tool.js";
import type { HookPoint, HookHandler } from "../../contracts/hooks.js";
import type { WorkspaceSkill } from "../skill-system/skill-types.js";
export type PluginHookPhase = "preToolUse" | "postToolUse" | "onTurnStart" | "onTurnEnd" | "onSessionEnd";
/** Map plugin hook phases to internal HookPoint names */
export declare const PLUGIN_HOOK_MAP: Record<PluginHookPhase, HookPoint>;
export interface PluginApi {
    /** Register a tool that will be available to the LLM. */
    registerTool(tool: PortableTool): void;
    /** Register a hook at a specific lifecycle phase. */
    registerHook(phase: PluginHookPhase, handler: HookHandler<any>): void;
    /** Register a skill (Markdown instructions + metadata). */
    registerSkill(skill: WorkspaceSkill): void;
    /** Get plugin-scoped configuration (from openclaw/plugins/name/config.json). */
    getConfig(): Record<string, unknown>;
    /**
     * Set an activation check function. When it returns false, the plugin's
     * tools and hooks are temporarily deactivated. Results are cached for
     * `ttlMs` (default: 60 000) to avoid expensive re-checks.
     */
    setActivationCheck(checkFn: () => boolean | Promise<boolean>, ttlMs?: number): void;
    /** Plugin's own name (directory name). */
    readonly pluginName: string;
}
/**
 * Every plugin must export a `register` function.
 * Called once during plugin loading.
 */
export interface PluginModule {
    register(api: PluginApi): void | Promise<void>;
}
export interface LoadedPlugin {
    name: string;
    directory: string;
    toolCount: number;
    hookCount: number;
    skillCount: number;
}
