import type { PlatformAdapter, PlatformId } from './base'; /** * 返回 adapter 实例。当前签名是裸 `PlatformAdapter`(generic 默认 `unknown`), * 调用方需要 cast 给具体 `PlatformAdapter` 或 * `PlatformAdapter`。完整收紧需要 `

` * 泛型 + conditional return type,会涉及 detect.ts / connection.ts 多处类型改动, * 留 BACKLOG(PR #4 后续)。 */ export declare function getPlatformAdapter(id: PlatformId): PlatformAdapter; export declare function isValidPlatformId(value: unknown): value is PlatformId; /** * 平台检测优先级: * 1. CLI flag (--platform openclaw|hermes,"auto" 走自动检测) * 2. 环境变量 CUTIE_AGENT_PLATFORM * 3. 已保存的 config.platform * 4. 自动检测:~/.hermes/config.yaml 优先,再 ~/.openclaw/openclaw.json */ export declare function detectPlatform(opts: { cliFlag?: string; configPlatform?: PlatformId; }): PlatformAdapter;