/** * APIClaw auth-config — Modal-style TOML config at ~/.apiclaw.toml * * Single source of truth for CLI, MCP server, and HTTP runtimes that * import @nordsym/apiclaw/auth. Replaces the JSON files in ~/.apiclaw/ * but reads them as a fallback for back-compat. * * File permissions: 0o600. */ /** TOML key login writes and execute reads. Not api_key. */ export declare const SESSION_TOKEN_TOML_KEY = "session_token"; export interface AuthConfig { workspaceId: string; email: string; sessionToken: string; apiKey?: string; mcpToken?: string; createdAt: number; lastUsedAt?: number; } /** * Read auth config. Tries ~/.apiclaw.toml first, then falls back to the * legacy JSON files written by older session.ts versions. */ export declare function readAuthConfig(): AuthConfig | null; /** * Write auth config to ~/.apiclaw.toml with mode 0o600. * Best-effort migration: if legacy ~/.apiclaw/session exists, leave it * (session.ts continues to read it) so older binaries on the same machine * keep working until the next install bump. */ export declare function writeAuthConfig(cfg: AuthConfig): void; /** * Update only lastUsedAt without rewriting the rest. Useful for the MCP * server's session-touch on each call. */ export declare function touchAuthConfig(): void; /** * Clear ~/.apiclaw.toml (and the legacy files). Used by `apiclaw auth logout`. */ export declare function clearAuthConfig(): void; export declare const AUTH_CONFIG_PATH: string; //# sourceMappingURL=auth-config.d.ts.map