/**
 * Agent private API registry.
 *
 * Provides a typed, extensible request-response API over the existing agent WS
 * connection. Each method is registered with a role (read/write) for authorization.
 *
 * Adding a new API method:
 * 1. Add the typed method + return type in @kici-dev/sdk (api-types.ts)
 * 2. Call registry.register('namespace.method', 'read', handler) here
 *
 * The agent sends { type: 'agent.api.request', method, params } and receives
 * { type: 'agent.api.response', result?, error? } back.
 */
/** Authorization roles for API methods. */
export type ApiRole = 'read' | 'write';
/** Handler function for an API method. */
export type ApiHandler = (agentId: string, params: Record<string, unknown>) => Promise<unknown>;
/**
 * Registry for agent private API methods.
 *
 * Methods are dot-namespaced (e.g., 'infrastructure.list') and each has an
 * associated role. The orchestrator checks the caller's allowed roles before
 * invoking the handler.
 */
export declare class AgentApiRegistry {
    private readonly methods;
    /**
     * Register an API method.
     *
     * @param method - Dot-namespaced method name (e.g., 'infrastructure.list')
     * @param role - Required role to call this method
     * @param handler - Async handler that receives agentId and params, returns result
     */
    register(method: string, role: ApiRole, handler: ApiHandler): void;
    /**
     * Handle an API request.
     *
     * @param agentId - The calling agent's ID
     * @param method - Requested method name
     * @param params - Method parameters
     * @param allowedRoles - Roles the caller is authorized for
     * @returns The method's result
     * @throws Error if method not found or role not authorized
     */
    handle(agentId: string, method: string, params: Record<string, unknown>, allowedRoles: ApiRole[]): Promise<unknown>;
    /** Get all registered method names (for diagnostics). */
    getMethods(): string[];
}
//# sourceMappingURL=agent-api-registry.d.ts.map