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

推荐订阅源

V
Visual Studio Blog
D
DataBreaches.Net
博客园 - 三生石上(FineUI控件)
博客园_首页
T
Tailwind CSS Blog
美团技术团队
Hugging Face - Blog
Hugging Face - Blog
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
云风的 BLOG
云风的 BLOG
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 聂微东
S
SegmentFault 最新的问题
小众软件
小众软件
酷 壳 – CoolShell
酷 壳 – CoolShell
N
Netflix TechBlog - Medium
Jina AI
Jina AI
WordPress大学
WordPress大学
U
Unit 42
J
Java Code Geeks
Blog — PlanetScale
Blog — PlanetScale
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Cloudflare Blog

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
fix(plugins): wrap malformed node proxy payloads · opencl...
vincentkoc · 2026-05-14 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -33,6 +33,7 @@ Docs: https://docs.openclaw.ai

3333

- ClickClack: skip malformed realtime websocket frames instead of stopping the channel monitor on a single bad JSON event.

3434

- Browser tool: treat malformed node proxy `payloadJSON` responses as browser proxy failures instead of leaking raw JSON parser errors.

3535

- Gateway HTTP: match models, session kill, and session history route paths without trusting malformed Host headers, avoiding pre-auth 500s on those endpoints.

36+

- Google Meet/Codex: report malformed node proxy `payloadJSON` responses with plugin-owned errors instead of leaking raw JSON parser failures.

3637

- Models config/auth: stop inferring provider env-var markers from broad `^[A-Z_][A-Z0-9_]*$` strings, and resolve config-backed provider `apiKey` values only through structured env SecretRefs (`secrets.providers[id]` / `secrets.defaults`), so unrelated env vars cannot accidentally become provider credentials. Thanks @sallyom.

3738

- Media fetch: skip allocating and buffering the response body for bodyless media responses (HEAD probes and 204-style empty bodies), avoiding wasted heap on streams that carry no payload. Thanks @shakkernerd.

3839

- CLI/onboarding: forward provider-specific auth flags (e.g. `--openai-api-key`) through the onboarding wizard so they reach provider auth methods via `ctx.opts`, letting `--openai-api-key "$OPENAI_API_KEY"` skip the redundant "use existing env var?" prompt in non-interactive harnesses. (#81669) Thanks @sjf.

Original file line numberDiff line numberDiff line change

@@ -2,10 +2,12 @@ import fs from "node:fs/promises";

22

import os from "node:os";

33

import path from "node:path";

44

import process from "node:process";

5-

import { afterEach, beforeEach, describe, expect, it } from "vitest";

5+

import type { PluginRuntime } from "openclaw/plugin-sdk/plugin-runtime";

6+

import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";

67

import {

78

CODEX_CLI_SESSIONS_LIST_COMMAND,

89

createCodexCliSessionNodeHostCommands,

10+

listCodexCliSessionsOnNode,

911

resolveCodexCliResumeSpawnInvocation,

1012

} from "./node-cli-sessions.js";

1113

@@ -148,4 +150,31 @@ describe("codex cli node sessions", () => {

148150

windowsHide: true,

149151

});

150152

});

153+
154+

it("reports malformed node session payloadJSON with an owned error", async () => {

155+

const runtime = {

156+

nodes: {

157+

list: vi.fn(async () => ({

158+

nodes: [

159+

{

160+

nodeId: "node-1",

161+

connected: true,

162+

commands: [CODEX_CLI_SESSIONS_LIST_COMMAND],

163+

},

164+

],

165+

})),

166+

invoke: vi.fn(async () => ({

167+

ok: true,

168+

payloadJSON: "{not json",

169+

})),

170+

},

171+

} as unknown as PluginRuntime;

172+
173+

await expect(

174+

listCodexCliSessionsOnNode({

175+

runtime,

176+

requestedNode: "node-1",

177+

}),

178+

).rejects.toThrow("Codex CLI node command returned malformed payloadJSON.");

179+

});

151180

});

Original file line numberDiff line numberDiff line change

@@ -624,7 +624,13 @@ function parseCodexCliSessionsListResult(raw: unknown): CodexCliSessionsListResu

624624

function unwrapNodeInvokePayload(raw: unknown): unknown {

625625

const record = isRecord(raw) ? raw : {};

626626

if (typeof record.payloadJSON === "string" && record.payloadJSON.trim()) {

627-

return JSON.parse(record.payloadJSON) as unknown;

627+

try {

628+

return JSON.parse(record.payloadJSON) as unknown;

629+

} catch (error) {

630+

throw new Error("Codex CLI node command returned malformed payloadJSON.", {

631+

cause: error,

632+

});

633+

}

628634

}

629635

if ("payload" in record) {

630636

return record.payload;

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,39 @@

1+

import type { PluginRuntime } from "openclaw/plugin-sdk/plugin-runtime";

2+

import { describe, expect, it, vi } from "vitest";

3+

import { callBrowserProxyOnNode } from "./chrome-browser-proxy.js";

4+
5+

describe("Google Meet Chrome browser proxy", () => {

6+

it("reports malformed node proxy payloadJSON with an owned error", async () => {

7+

const invoke = vi.fn(async () => ({

8+

ok: true,

9+

payloadJSON: "{not json",

10+

}));

11+

const runtime = {

12+

nodes: {

13+

invoke,

14+

},

15+

} as unknown as PluginRuntime;

16+
17+

await expect(

18+

callBrowserProxyOnNode({

19+

runtime,

20+

nodeId: "node-1",

21+

method: "GET",

22+

path: "/tabs",

23+

timeoutMs: 100,

24+

}),

25+

).rejects.toThrow("Google Meet browser proxy returned malformed payloadJSON.");

26+
27+

expect(invoke).toHaveBeenCalledWith({

28+

nodeId: "node-1",

29+

command: "browser.proxy",

30+

params: {

31+

method: "GET",

32+

path: "/tabs",

33+

body: undefined,

34+

timeoutMs: 100,

35+

},

36+

timeoutMs: 5_100,

37+

});

38+

});

39+

});

Original file line numberDiff line numberDiff line change

@@ -148,7 +148,13 @@ export async function resolveChromeNode(params: {

148148

function unwrapNodeInvokePayload(raw: unknown): unknown {

149149

const record = raw && typeof raw === "object" ? (raw as Record<string, unknown>) : {};

150150

if (typeof record.payloadJSON === "string" && record.payloadJSON.trim()) {

151-

return JSON.parse(record.payloadJSON);

151+

try {

152+

return JSON.parse(record.payloadJSON);

153+

} catch (error) {

154+

throw new Error("Google Meet browser proxy returned malformed payloadJSON.", {

155+

cause: error,

156+

});

157+

}

152158

}

153159

if ("payload" in record) {

154160

return record.payload;