import { type HarperAttribute } from './schemas/derive.ts';
type ExportTypes = Record<string, boolean> | undefined;
interface ResourceRegistryEntry {
    Resource: ResourceClassLike;
    path: string;
    exportTypes?: ExportTypes;
    hasSubPaths?: boolean;
    relativeURL?: string;
}
interface ResourceClassLike {
    prototype?: Record<string, unknown>;
    databaseName?: string;
    tableName?: string;
    primaryKey?: string;
    attributes?: HarperAttribute[];
    description?: string;
    hidden?: boolean;
    properties?: Record<string, unknown>;
    outputSchemas?: {
        [verb: string]: object;
    };
    mcp?: {
        annotations?: {
            [verb: string]: ToolAnnotationsLike;
        };
    };
    get?: (target: unknown, request: unknown, data?: unknown) => unknown;
    put?: (target: unknown, data: unknown, request: unknown) => unknown;
    post?: (target: unknown, data: unknown, request: unknown) => unknown;
    patch?: (target: unknown, data: unknown, request: unknown) => unknown;
    delete?: (target: unknown, request: unknown, data?: unknown) => unknown;
    search?: (target: unknown, request: unknown) => unknown;
    loadAsInstance?: boolean;
    /**
     * Component-author opt-in: expose non-verb instance methods as MCP tools.
     * Each entry maps an instance-method name to an MCP tool descriptor.
     * RBAC stays as whatever the Resource's method itself enforces; the MCP
     * layer does not invent new ACLs for these.
     */
    mcpTools?: ReadonlyArray<{
        name: string;
        method: string;
        description?: string;
        inputSchema?: object;
        annotations?: ToolAnnotationsLike;
    }>;
}
interface ToolAnnotationsLike {
    readOnlyHint?: boolean;
    destructiveHint?: boolean;
    idempotentHint?: boolean;
    openWorldHint?: boolean;
}
type ResourcesRegistry = Map<string, ResourceRegistryEntry>;
type RequestTargetCtor = new () => Record<string, unknown> & {
    conditions?: unknown[];
    operator?: string;
    limit?: number;
    offset?: number;
    select?: string[];
    id?: unknown;
};
export declare function _setResourcesForTest(r: ResourcesRegistry | undefined): void;
export declare function _setRequestTargetForTest(ctor: RequestTargetCtor | undefined): void;
export declare function _resetCustomToolWarningsForTest(): void;
/**
 * Idempotent registration — walk the Resources Map, register verb tools
 * for each entry that passes the exportTypes + verb-presence filters.
 * Re-invocation overwrites prior tool entries (Map.set semantics).
 */
export declare function registerApplicationTools(): void;
export {};
