/**
 * Derive the human-facing doc web URL from the open-api host + document id.
 * The open-api host (open.feishu.cn / open.larksuite.com) is region-specific;
 * the web doc lives on the corresponding product domain. This is a best-effort
 * canonical URL — a tenant with a vanity subdomain may render its own host, but
 * the product-domain URL still resolves for the user.
 */
export function docWebUrl(host: any, id: any): string;
/**
 * Parse a Lark/Feishu doc reference (raw token OR URL) into { type, token }.
 *   - .../docx/<token>  → { type:'docx', token }
 *   - .../wiki/<token>  → { type:'wiki', token } (resolved to its docx obj_token)
 *   - bare token        → { type:'docx', token }
 * Returns null when nothing usable can be extracted. Pure + side-effect-free.
 */
export function parseLarkDocRef(ref: any): {
    type: string;
    token: string;
};
/**
 * Map a small, common subset of markdown into Lark Docx block objects.
 * Each block is a single line: headings (#/##/### → heading1/2/3), bullets
 * (- / *), ordered (1.), everything else a text paragraph. Inline marks are
 * kept as literal text (content is preserved; we don't emit Lark text-element
 * styles — honest + robust). Empty lines are skipped (Lark rejects empty text
 * blocks). Bounded by the caller's chunking to MAX_BLOCK_CHILDREN per request.
 */
export function markdownToLarkBlocks(markdown: any): {
    [x: string]: number | {
        elements: {
            text_run: {
                content: string;
            };
        }[];
        style: {};
    };
    block_type: number;
}[];
export function _resetLarkDocsTokenCache(): void;
export namespace larkDocsSkill {
    let id: string;
    let serverName: string;
    let allowedTools: string[];
    let requiresIntegration: "lark";
    let description: string;
    let envKeys: any[];
    let promptFragment: string;
    /**
     * Spawn the GENERIC skill MCP server (bin/mcp-skill.mjs) pointing at this
     * module's larkDocsSkill export, so the AGENT gets real mcp__larkdocs__*
     * tools. Auth flows through the INHERITED env (PROJECT_API_TOKEN →
     * resolveIntegrationToken('lark')), so no provider-specific env keys are
     * needed here. When unconnected, handleToolCall returns { ok:false, error }.
     */
    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: {
                documentId: {
                    type: string;
                    description: string;
                };
                title?: undefined;
                markdown?: undefined;
                text?: undefined;
                folderToken?: undefined;
                imagePath?: undefined;
                width?: undefined;
                height?: undefined;
                fileType?: undefined;
                commentId?: undefined;
            };
            required: string[];
        };
    } | {
        name: string;
        description: string;
        input_schema: {
            type: string;
            properties: {
                title: {
                    type: string;
                    description: string;
                };
                markdown: {
                    type: string;
                    description: string;
                };
                text: {
                    type: string;
                    description: string;
                };
                folderToken: {
                    type: string;
                    description: string;
                };
                documentId?: undefined;
                imagePath?: undefined;
                width?: undefined;
                height?: undefined;
                fileType?: undefined;
                commentId?: undefined;
            };
            required: string[];
        };
    } | {
        name: string;
        description: string;
        input_schema: {
            type: string;
            properties: {
                documentId: {
                    type: string;
                    description: string;
                };
                markdown: {
                    type: string;
                    description: string;
                };
                text: {
                    type: string;
                    description: string;
                };
                title?: undefined;
                folderToken?: undefined;
                imagePath?: undefined;
                width?: undefined;
                height?: undefined;
                fileType?: undefined;
                commentId?: undefined;
            };
            required: string[];
        };
    } | {
        name: string;
        description: string;
        input_schema: {
            type: string;
            properties: {
                documentId: {
                    type: string;
                    description: string;
                };
                imagePath: {
                    type: string;
                    description: string;
                };
                width: {
                    type: string;
                    description: string;
                };
                height: {
                    type: string;
                    description: string;
                };
                title?: undefined;
                markdown?: undefined;
                text?: undefined;
                folderToken?: undefined;
                fileType?: undefined;
                commentId?: undefined;
            };
            required: string[];
        };
    } | {
        name: string;
        description: string;
        input_schema: {
            type: string;
            properties: {
                documentId: {
                    type: string;
                    description: string;
                };
                fileType: {
                    type: string;
                    description: string;
                };
                title?: undefined;
                markdown?: undefined;
                text?: undefined;
                folderToken?: undefined;
                imagePath?: undefined;
                width?: undefined;
                height?: undefined;
                commentId?: undefined;
            };
            required: string[];
        };
    } | {
        name: string;
        description: string;
        input_schema: {
            type: string;
            properties: {
                documentId: {
                    type: string;
                    description: string;
                };
                text: {
                    type: string;
                    description: string;
                };
                fileType: {
                    type: string;
                    description: string;
                };
                title?: undefined;
                markdown?: undefined;
                folderToken?: undefined;
                imagePath?: undefined;
                width?: undefined;
                height?: undefined;
                commentId?: undefined;
            };
            required: string[];
        };
    } | {
        name: string;
        description: string;
        input_schema: {
            type: string;
            properties: {
                documentId: {
                    type: string;
                    description: string;
                };
                commentId: {
                    type: string;
                    description: string;
                };
                text: {
                    type: string;
                    description: string;
                };
                fileType: {
                    type: string;
                    description: string;
                };
                title?: undefined;
                markdown?: undefined;
                folderToken?: undefined;
                imagePath?: undefined;
                width?: undefined;
                height?: undefined;
            };
            required: string[];
        };
    })[];
}
