UNPKG

@lark-project/cli

Version:

飞书项目插件开发工具

21 lines (20 loc) 1.04 kB
/** * Reject obviously fake siteDomain values (placeholder patterns). Does NOT * verify reachability — AI can still invent a real-looking internal hostname. * But catches the common fabrication mode (example.com, your-domain, etc.). * On fail: stderr guidance + exit 1. */ export declare function ensureRealSiteDomain(siteDomain: string): void; /** * Build a user-facing authentication guidance message for the given origin. * Format is AI-friendly: clean text with no log4js prefix, structured so the AI * can relay it verbatim to the user (or the user can copy the command directly). */ export declare function buildAuthGuidance(origin: string): string; /** * Preflight credential check for commands that require user identity. * On failure: writes the guidance to stderr as plain text (bypassing log4js * formatting so command lines can be copied without prefix noise) and exits 1. * Token expiry / refresh is still handled in-flight by getToolAuthHeaders(). */ export declare function requireAuth(siteDomain: string): void;