#!/usr/bin/env node import { Command } from "commander"; import { checkLoginStatus } from "./bilibili/http.js"; import { loginWithQr } from "./bilibili/qr-login.js"; import { readAsrState, type AsrStateKind, type AsrDeviceReadiness, type AsrDevicePreference, type AsrExecutionProfile, type AsrFailureCategory, type AsrMigrationStatus, type AsrModelKey } from "./asr/state.js"; import { type InstallResult } from "./asr/installer.js"; type AsrSetupResult = Pick; export declare function parseModelChoice(input: string): AsrModelKey | null; export declare function parseDeviceChoice(input: string): AsrDevicePreference | null; export declare function configureCredentials(askHiddenFn?: (question: string) => Promise): Promise; export interface DoctorStatus { package_name: string; version: string; runtime: { node: string; platform: string; arch: string; }; credentials: { configured: boolean; source: "env" | "global_config" | "none"; loadable: boolean; }; asr: { status: AsrStateKind; model: AsrModelKey | null; device: AsrExecutionProfile["device"] | null; compute_type: AsrExecutionProfile["computeType"] | null; device_readiness: AsrDeviceReadiness; migration_status: AsrMigrationStatus | null; failure_category: AsrFailureCategory | null; }; status: "locally_ready" | "needs_credentials"; next_steps: string[]; } export declare function buildDoctorStatus(readAsrStateFn?: typeof readAsrState, asrPaths?: import("./asr/state.js").AsrPaths): DoctorStatus; export declare function doctorCommand(json: boolean, statusBuilder?: () => DoctorStatus): void; export interface SetupCredentialsOptions { /** 非交互模式:绝不提示,也绝不从 stdin/argv 读取凭据值 */ nonInteractive?: boolean; /** 允许列表内的 ASR 模型(仅非交互模式可用) */ asrModel?: AsrModelKey; /** 受控的 ASR 设备偏好(仅与非交互模型选择同用) */ asrDevice?: AsrDevicePreference; } export declare function setupAuthentication(ask?: (question: string, signal?: AbortSignal) => Promise, verify?: typeof checkLoginStatus, acquireQr?: typeof loginWithQr): Promise; export declare function setupCredentials(configure?: () => Promise, runAsr?: (modelKey: AsrModelKey, devicePreference: AsrDevicePreference) => Promise, askHiddenFn?: (question: string) => Promise, options?: SetupCredentialsOptions): Promise; export declare function createCli(): Command; export {}; //# sourceMappingURL=cli.d.ts.map