- Auth module: WeChat OAuth2 scan-to-login flow with terminal QR code - Token persistence to ~/.openclaw/wechat-access-auth.json (chmod 600) - Token resolution: config > saved state > interactive login - Invite code verification (configurable bypass) - Production/test environment support - AGP WebSocket client with heartbeat, reconnect, wake detection - Message handler: Agent dispatch with streaming text and tool calls - Random device GUID generation (persisted, no real machine ID)
20 lines
559 B
TypeScript
20 lines
559 B
TypeScript
/**
|
|
* @file auth/index.ts
|
|
* @description 认证模块导出
|
|
*/
|
|
|
|
export type {
|
|
QClawEnvironment,
|
|
LoginCredentials,
|
|
PersistedAuthState,
|
|
QClawApiResponse,
|
|
} from "./types.js";
|
|
export { TokenExpiredError } from "./types.js";
|
|
|
|
export { getEnvironment } from "./environments.js";
|
|
export { getDeviceGuid } from "./device-guid.js";
|
|
export { QClawAPI } from "./qclaw-api.js";
|
|
export { loadState, saveState, clearState } from "./state-store.js";
|
|
export { performLogin } from "./wechat-login.js";
|
|
export type { PerformLoginOptions } from "./wechat-login.js";
|