mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-26 00:11:15 +00:00
* refactor(agents): trim CLI and transport export seams * chore(deadcode): shrink agents CLI transport baseline
28 lines
655 B
TypeScript
28 lines
655 B
TypeScript
import "./cli-credentials.js";
|
|
|
|
type CliAuthOptions = {
|
|
codexHome?: string;
|
|
allowKeychainPrompt?: boolean;
|
|
platform?: NodeJS.Platform;
|
|
execSync?: (...args: never[]) => unknown;
|
|
};
|
|
|
|
type CliAuthTestApi = {
|
|
readCodexAuth(options?: CliAuthOptions): unknown;
|
|
resetCaches(): void;
|
|
};
|
|
|
|
function getTestApi(): CliAuthTestApi {
|
|
return (globalThis as Record<PropertyKey, unknown>)[
|
|
Symbol.for("openclaw.cliCredentialsTestApi")
|
|
] as CliAuthTestApi;
|
|
}
|
|
|
|
export function readCodexAuth(options?: CliAuthOptions): unknown {
|
|
return getTestApi().readCodexAuth(options);
|
|
}
|
|
|
|
export function resetCliAuthCaches(): void {
|
|
getTestApi().resetCaches();
|
|
}
|