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

推荐订阅源

IT之家
IT之家
Last Week in AI
Last Week in AI
博客园_首页
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
人人都是产品经理
人人都是产品经理
V
Visual Studio Blog
宝玉的分享
宝玉的分享
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
T
Tailwind CSS Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
量子位
博客园 - 聂微东
S
SegmentFault 最新的问题
博客园 - 司徒正美
罗磊的独立博客
V
V2EX
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
美团技术团队
小众软件
小众软件
Jina AI
Jina AI

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
feat(codex): support app-server secret refs (#94324) · op...
kevinlin-ope · 2026-06-19 · via Recent Commits to openclaw:main

@@ -28,6 +28,10 @@ function resolveRuntimeForTest(params: RuntimeOptionsParams = {}) {

2828

return resolveCodexAppServerRuntimeOptions({ env: {}, requirementsToml: null, ...params });

2929

}

303031+

function envRef(id: string) {

32+

return { source: "env" as const, provider: "default", id };

33+

}

34+3135

function requireRecord(value: unknown, label: string): Record<string, unknown> {

3236

if (!value || typeof value !== "object" || Array.isArray(value)) {

3337

throw new Error(`Expected ${label}`);

@@ -413,6 +417,65 @@ describe("Codex app-server config", () => {

413417

});

414418

});

415419420+

it("passes resolved app-server SecretInput strings through to auth token and headers", () => {

421+

const runtime = resolveRuntimeForTest({

422+

pluginConfig: {

423+

appServer: {

424+

transport: "websocket",

425+

url: "wss://codex-app-server.example.internal/ws",

426+

authToken: " resolved-capability-token ",

427+

headers: {

428+

" x-codex-client-session-token ": " resolved-session-token ",

429+

Authorization: " Bearer explicit-token ",

430+

},

431+

},

432+

},

433+

});

434+435+

expectFields(runtime.start, "runtime start", {

436+

authToken: "resolved-capability-token",

437+

headers: {

438+

"x-codex-client-session-token": "resolved-session-token",

439+

Authorization: "Bearer explicit-token",

440+

},

441+

});

442+

});

443+444+

it("rejects unresolved app-server auth token SecretRefs at runtime option resolution", () => {

445+

expect(() =>

446+

resolveRuntimeForTest({

447+

pluginConfig: {

448+

appServer: {

449+

transport: "websocket",

450+

url: "wss://codex-app-server.example.internal/ws",

451+

authToken: envRef("CODEX_APP_SERVER_TOKEN"),

452+

},

453+

},

454+

}),

455+

).toThrow(

456+

'plugins.entries.codex.config.appServer.authToken: unresolved SecretRef "env:default:CODEX_APP_SERVER_TOKEN"',

457+

);

458+

});

459+460+

it("rejects unresolved app-server header SecretRefs at runtime option resolution", () => {

461+

expect(() =>

462+

resolveRuntimeForTest({

463+

pluginConfig: {

464+

appServer: {

465+

transport: "websocket",

466+

url: "wss://codex-app-server.example.internal/ws",

467+

authToken: "capability-token",

468+

headers: {

469+

"x-codex-client-session-token": envRef("CODEX_CLIENT_SESSION_TOKEN"),

470+

},

471+

},

472+

},

473+

}),

474+

).toThrow(

475+

'plugins.entries.codex.config.appServer.headers.x-codex-client-session-token: unresolved SecretRef "env:default:CODEX_CLIENT_SESSION_TOKEN"',

476+

);

477+

});

478+416479

it("treats IPv6 loopback websocket app-servers as local loopback", () => {

417480

const runtime = resolveRuntimeForTest({

418481

pluginConfig: {

@@ -2314,6 +2377,47 @@ allowed_sandbox_modes = ["read-only", "workspace-write"]

23142377

expect(second).not.toContain("sk-second");

23152378

});

231623792380+

it("derives distinct shared-client keys for distinct headers without exposing them", () => {

2381+

const first = codexAppServerStartOptionsKey({

2382+

transport: "websocket",

2383+

command: "codex",

2384+

args: [],

2385+

url: "ws://127.0.0.1:39175",

2386+

headers: {

2387+

Authorization: "Bearer first",

2388+

"x-codex-client-session-token": "session-first",

2389+

},

2390+

});

2391+

const second = codexAppServerStartOptionsKey({

2392+

transport: "websocket",

2393+

command: "codex",

2394+

args: [],

2395+

url: "ws://127.0.0.1:39175",

2396+

headers: {

2397+

Authorization: "Bearer second",

2398+

"x-codex-client-session-token": "session-second",

2399+

},

2400+

});

2401+2402+

expect(first).not.toEqual(second);

2403+

expect(

2404+

codexAppServerStartOptionsKey({

2405+

transport: "websocket",

2406+

command: "codex",

2407+

args: [],

2408+

url: "ws://127.0.0.1:39175",

2409+

headers: {

2410+

Authorization: "Bearer first",

2411+

"x-codex-client-session-token": "session-first",

2412+

},

2413+

}),

2414+

).toEqual(first);

2415+

expect(first).not.toContain("Bearer first");

2416+

expect(first).not.toContain("session-first");

2417+

expect(second).not.toContain("Bearer second");

2418+

expect(second).not.toContain("session-second");

2419+

});

2420+23172421

it("keeps secret-derived shared-client keys stable across module reloads", async () => {

23182422

const startOptions = {

23192423

transport: "websocket" as const,