/**
 * Extract a 32-char Notion id from a raw id OR a Notion URL.
 *
 * Notion ids are 32 hex chars, usually rendered dashed
 * (8-4-4-4-12) as a UUID. In URLs they appear undashed, often as the
 * trailing segment after a human slug, e.g.
 *   https://www.notion.so/My-Page-Title-1a2b3c...d4e5  (32 hex at end)
 *   https://www.notion.so/workspace/1a2b...d4e5?pvs=4
 * and may also be passed as a bare dashed UUID or undashed 32-char id.
 *
 * Returns the dashed UUID form (which the Notion REST API accepts), or
 * null if no id can be found.
 */
export function parseNotionId(ref: any): string;
/**
 * Low-level Notion REST helper. Resolves the bearer via
 * resolveIntegrationToken('notion'), sets the required Notion-Version
 * header, retries once on transient auth errors, and returns parsed JSON.
 *
 * Keep this the single auth chokepoint — don't resolve tokens at call sites.
 * `opts.formData`: a FormData body (the file-upload send endpoint is
 * multipart/form-data, not JSON) — fetch sets the multipart boundary itself,
 * so no Content-Type is set for it.
 */
export function notionApi(path: any, opts?: {}): Promise<any>;
/**
 * Map a small, common subset of markdown into Notion block objects.
 * Each block is a single line: headings (#/##/### → heading_1/2/3), bullets
 * (- / *), ordered (1.) — everything else a paragraph. Inline marks are kept
 * as literal text (content preserved; no annotation parsing — honest +
 * robust). Empty lines are skipped. Mirrors larkDocs.js markdownToLarkBlocks.
 */
export function markdownToNotionBlocks(markdown: any): {
    [x: string]: string | {
        rich_text: {
            type: string;
            text: {
                content: string;
            };
        }[];
    };
    object: string;
    type: string;
}[];
export namespace notionSkill {
    let id: string;
    let serverName: string;
    let allowedTools: string[];
    let requiresIntegration: "notion";
    let description: string;
    let promptFragment: string;
    /**
     * Spawn the GENERIC skill MCP server (bin/mcp-skill.mjs) pointing at this
     * module's notionSkill export, so the AGENT gets real mcp__notion__* tools
     * and can pull a referenced page itself (the agent-driven code-review flow).
     *
     * Previously this returned null (no MCP server) because Notion was only ever
     * called by deterministic node code via handleToolCall — there was no agent
     * tool surface. Now the review agent gathers context itself, so it needs the
     * tools. The bin imports ../dist/notion.js (resolved relative to bin/, like
     * mcp-sentry.mjs) and dispatches through handleToolCall; auth flows through
     * the INHERITED env (PROJECT_API_TOKEN → resolveIntegrationToken('notion')),
     * so no provider-specific env keys are needed here. When unconnected,
     * handleToolCall returns { ok:false, error } — the agent tolerates it.
     */
    function resolve(): {
        type: string;
        command: string;
        args: any[];
        env: {};
        description: string;
        alwaysLoad: boolean;
    };
    function handleToolCall(name: any, args: any): Promise<string>;
    let tools: ({
        name: string;
        description: string;
        input_schema: {
            type: string;
            properties: {
                pageId: {
                    type: string;
                    description: string;
                };
                databaseId?: undefined;
                filter?: undefined;
                maxResults?: undefined;
                parentPageId?: undefined;
                title?: undefined;
                markdown?: undefined;
                blocks?: undefined;
                imagePath?: undefined;
                imageUrl?: undefined;
                caption?: undefined;
                blockId?: undefined;
                discussionId?: undefined;
                text?: undefined;
            };
            required: string[];
        };
    } | {
        name: string;
        description: string;
        input_schema: {
            type: string;
            properties: {
                databaseId: {
                    type: string;
                    description: string;
                };
                filter: {
                    type: string;
                    description: string;
                    additionalProperties: boolean;
                };
                maxResults: {
                    type: string;
                    description: string;
                };
                pageId?: undefined;
                parentPageId?: undefined;
                title?: undefined;
                markdown?: undefined;
                blocks?: undefined;
                imagePath?: undefined;
                imageUrl?: undefined;
                caption?: undefined;
                blockId?: undefined;
                discussionId?: undefined;
                text?: undefined;
            };
            required: string[];
        };
    } | {
        name: string;
        description: string;
        input_schema: {
            type: string;
            properties: {
                parentPageId: {
                    type: string;
                    description: string;
                };
                databaseId: {
                    type: string;
                    description: string;
                };
                title: {
                    type: string;
                    description: string;
                };
                markdown: {
                    type: string;
                    description: string;
                };
                blocks: {
                    type: string;
                    description: string;
                    items: {
                        type: string;
                        additionalProperties: boolean;
                    };
                };
                pageId?: undefined;
                filter?: undefined;
                maxResults?: undefined;
                imagePath?: undefined;
                imageUrl?: undefined;
                caption?: undefined;
                blockId?: undefined;
                discussionId?: undefined;
                text?: undefined;
            };
            required: string[];
        };
    } | {
        name: string;
        description: string;
        input_schema: {
            type: string;
            properties: {
                pageId: {
                    type: string;
                    description: string;
                };
                markdown: {
                    type: string;
                    description: string;
                };
                blocks: {
                    type: string;
                    description: string;
                    items: {
                        type: string;
                        additionalProperties: boolean;
                    };
                };
                databaseId?: undefined;
                filter?: undefined;
                maxResults?: undefined;
                parentPageId?: undefined;
                title?: undefined;
                imagePath?: undefined;
                imageUrl?: undefined;
                caption?: undefined;
                blockId?: undefined;
                discussionId?: undefined;
                text?: undefined;
            };
            required: string[];
        };
    } | {
        name: string;
        description: string;
        input_schema: {
            type: string;
            properties: {
                pageId: {
                    type: string;
                    description: string;
                };
                imagePath: {
                    type: string;
                    description: string;
                };
                imageUrl: {
                    type: string;
                    description: string;
                };
                caption: {
                    type: string;
                    description: string;
                };
                databaseId?: undefined;
                filter?: undefined;
                maxResults?: undefined;
                parentPageId?: undefined;
                title?: undefined;
                markdown?: undefined;
                blocks?: undefined;
                blockId?: undefined;
                discussionId?: undefined;
                text?: undefined;
            };
            required: string[];
        };
    } | {
        name: string;
        description: string;
        input_schema: {
            type: string;
            properties: {
                blockId: {
                    type: string;
                    description: string;
                };
                pageId?: undefined;
                databaseId?: undefined;
                filter?: undefined;
                maxResults?: undefined;
                parentPageId?: undefined;
                title?: undefined;
                markdown?: undefined;
                blocks?: undefined;
                imagePath?: undefined;
                imageUrl?: undefined;
                caption?: undefined;
                discussionId?: undefined;
                text?: undefined;
            };
            required: string[];
        };
    } | {
        name: string;
        description: string;
        input_schema: {
            type: string;
            properties: {
                discussionId: {
                    type: string;
                    description: string;
                };
                pageId: {
                    type: string;
                    description: string;
                };
                text: {
                    type: string;
                    description: string;
                };
                databaseId?: undefined;
                filter?: undefined;
                maxResults?: undefined;
                parentPageId?: undefined;
                title?: undefined;
                markdown?: undefined;
                blocks?: undefined;
                imagePath?: undefined;
                imageUrl?: undefined;
                caption?: undefined;
                blockId?: undefined;
            };
            required: string[];
        };
    })[];
}
