惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
C
Check Point Blog
J
Java Code Geeks
腾讯CDC
Apple Machine Learning Research
Apple Machine Learning Research
宝玉的分享
宝玉的分享
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
量子位
Google DeepMind News
Google DeepMind News
I
InfoQ
The GitHub Blog
The GitHub Blog
aimingoo的专栏
aimingoo的专栏
N
Netflix TechBlog - Medium
Hugging Face - Blog
Hugging Face - Blog
博客园 - Franky
V
V2EX
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
小众软件
小众软件
博客园_首页
人人都是产品经理
人人都是产品经理
博客园 - 聂微东
IT之家
IT之家

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
docs: document cli agent helpers · openclaw/openclaw@34f7d78
steipete · 2026-06-04 · via Recent Commits to openclaw:main

@@ -1,3 +1,7 @@

1+

/**

2+

* Reads and refreshes credentials stored by external CLI runtimes such as

3+

* Claude Code, Codex, Gemini, and MiniMax.

4+

*/

15

import { execFileSync, execSync } from "node:child_process";

26

import { createHash } from "node:crypto";

37

import fs from "node:fs";

@@ -36,13 +40,15 @@ let codexCliCache: CachedValue<CodexCliCredential> | null = null;

3640

let minimaxCliCache: CachedValue<MiniMaxCliCredential> | null = null;

3741

let geminiCliCache: CachedValue<GeminiCliCredential> | null = null;

384243+

/** Clears in-memory CLI credential caches for isolated tests. */

3944

export function resetCliCredentialCachesForTest(): void {

4045

claudeCliCache = null;

4146

codexCliCache = null;

4247

minimaxCliCache = null;

4348

geminiCliCache = null;

4449

}

455051+

/** Credential shape parsed from Claude Code CLI storage. */

4652

export type ClaudeCliCredential =

4753

| {

4854

type: "oauth";

@@ -58,6 +64,7 @@ export type ClaudeCliCredential =

5864

expires: number;

5965

};

606667+

/** Credential shape parsed from Codex CLI storage. */

6168

export type CodexCliCredential = {

6269

type: "oauth";

6370

provider: OAuthProvider;

@@ -68,6 +75,7 @@ export type CodexCliCredential = {

6875

idToken?: string;

6976

};

707778+

/** Credential shape parsed from MiniMax portal CLI storage. */

7179

export type MiniMaxCliCredential = {

7280

type: "oauth";

7381

provider: "minimax-portal";

@@ -76,6 +84,7 @@ export type MiniMaxCliCredential = {

7684

expires: number;

7785

};

788687+

/** Credential shape parsed from Gemini CLI storage. */

7988

export type GeminiCliCredential = {

8089

type: "oauth";

8190

provider: "google-gemini-cli";

@@ -437,6 +446,7 @@ function readClaudeCliKeychainCredentials(

437446

}

438447

}

439448449+

/** Reads Claude CLI credentials from macOS Keychain or the CLI credential file. */

440450

export function readClaudeCliCredentials(options?: {

441451

allowKeychainPrompt?: boolean;

442452

platform?: NodeJS.Platform;

@@ -494,6 +504,7 @@ export function readClaudeCliCredentialsCached(options?: {

494504

});

495505

}

496506507+

/** Writes refreshed Claude OAuth tokens back to the Claude CLI macOS Keychain item. */

497508

export function writeClaudeCliKeychainCredentials(

498509

newCredentials: OAuthCredentials,

499510

options?: { execFileSync?: ExecFileSyncFn },

@@ -550,6 +561,7 @@ export function writeClaudeCliKeychainCredentials(

550561

}

551562

}

552563564+

/** Writes refreshed Claude OAuth tokens back to the Claude CLI credential file. */

553565

export function writeClaudeCliFileCredentials(

554566

newCredentials: OAuthCredentials,

555567

options?: ClaudeCliFileOptions,

@@ -592,6 +604,7 @@ export function writeClaudeCliFileCredentials(

592604

}

593605

}

594606607+

/** Writes refreshed Claude OAuth tokens to the preferred Claude CLI credential store. */

595608

export function writeClaudeCliCredentials(

596609

newCredentials: OAuthCredentials,

597610

options?: ClaudeCliWriteOptions,

@@ -612,6 +625,7 @@ export function writeClaudeCliCredentials(

612625

return writeFile(newCredentials, { homeDir: options?.homeDir });

613626

}

614627628+

/** Reads Codex CLI OAuth credentials from Keychain or CODEX_HOME auth.json. */

615629

export function readCodexCliCredentials(options?: {

616630

codexHome?: string;

617631

allowKeychainPrompt?: boolean;

@@ -673,6 +687,7 @@ export function readCodexCliCredentials(options?: {

673687

};

674688

}

675689690+

/** Reads Codex CLI credentials with optional short-lived cache and file fingerprinting. */

676691

export function readCodexCliCredentialsCached(options?: {

677692

codexHome?: string;

678693

allowKeychainPrompt?: boolean;

@@ -703,6 +718,7 @@ export function readCodexCliCredentialsCached(options?: {

703718

});

704719

}

705720721+

/** Reads MiniMax CLI credentials with optional short-lived cache. */

706722

export function readMiniMaxCliCredentialsCached(options?: {

707723

ttlMs?: number;

708724

homeDir?: string;

@@ -720,6 +736,7 @@ export function readMiniMaxCliCredentialsCached(options?: {

720736

});

721737

}

722738739+

/** Reads Gemini CLI credentials with optional short-lived cache. */

723740

export function readGeminiCliCredentialsCached(options?: {

724741

ttlMs?: number;

725742

homeDir?: string;