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

推荐订阅源

L
LangChain Blog
B
Blog RSS Feed
阮一峰的网络日志
阮一峰的网络日志
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Help Net Security
MyScale Blog
MyScale Blog
WordPress大学
WordPress大学
Microsoft Azure Blog
Microsoft Azure Blog
GbyAI
GbyAI
小众软件
小众软件
大猫的无限游戏
大猫的无限游戏
Martin Fowler
Martin Fowler
Vercel News
Vercel News
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
Last Week in AI
Last Week in AI
Hugging Face - Blog
Hugging Face - Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 【当耐特】
Google DeepMind News
Google DeepMind News
Engineering at Meta
Engineering at Meta
云风的 BLOG
云风的 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(codex): expose remote node exec as a Codex dynamic to...
vincentkoc · 2026-06-16 · via Recent Commits to openclaw:main

@@ -594,10 +594,36 @@ describe("Codex app-server dynamic tool build", () => {

594594

]);

595595

});

596596597-

it("keeps OpenClaw shell tools for node-targeted Codex app-server runs", async () => {

597+

it("exposes pinned node shell tools for node-targeted Codex app-server runs", async () => {

598+

const execTool = {

599+

...createRuntimeDynamicTool("exec"),

600+

parameters: {

601+

type: "object",

602+

properties: {

603+

command: { type: "string" },

604+

workdir: { type: "string" },

605+

host: { type: "string" },

606+

security: { type: "string" },

607+

ask: { type: "string" },

608+

node: { type: "string" },

609+

},

610+

required: ["command", "host", "node"],

611+

additionalProperties: false,

612+

},

613+

};

614+

vi.mocked(execTool.execute).mockResolvedValueOnce({

615+

content: [

616+

{

617+

type: "text",

618+

text: "Command still running (session exec-1, pid 123). Use process (list/poll/log/write/send-keys/submit/paste/kill/clear/remove) for follow-up.",

619+

},

620+

],

621+

details: { status: "running" },

622+

});

623+

const processTool = createRuntimeDynamicTool("process");

598624

setOpenClawCodingToolsFactoryForTests(() => [

599-

createRuntimeDynamicTool("exec"),

600-

createRuntimeDynamicTool("process"),

625+

execTool,

626+

processTool,

601627

createRuntimeDynamicTool("message"),

602628

]);

603629

const sessionFile = path.join(tempDir, "session.jsonl");

@@ -613,10 +639,50 @@ describe("Codex app-server dynamic tool build", () => {

613639

};

614640615641

const tools = await buildDynamicToolsForTest(params, workspaceDir, {

616-

nativeToolSurfaceEnabled: false,

642+

nativeToolSurfaceEnabled: true,

617643

});

618644619-

expect(tools.map((tool) => tool.name)).toEqual(["message", "exec", "process"]);

645+

expect(tools.map((tool) => tool.name)).toEqual(["message", "node_exec", "node_process"]);

646+

const nodeExec = tools.find((tool) => tool.name === "node_exec");

647+

const nodeProcess = tools.find((tool) => tool.name === "node_process");

648+

expect(nodeExec?.description).toContain("host=node internally");

649+

expect(nodeProcess?.description).toContain("node_exec sessions");

650+

expect(nodeExec?.parameters).toEqual({

651+

type: "object",

652+

properties: {

653+

command: { type: "string" },

654+

workdir: { type: "string" },

655+

},

656+

required: ["command"],

657+

additionalProperties: false,

658+

});

659+

const result = await nodeExec?.execute(

660+

"call-1",

661+

{

662+

command: "pwd",

663+

host: "gateway",

664+

node: "model-selected-node",

665+

security: "full",

666+

ask: "off",

667+

},

668+

undefined,

669+

);

670+

expect(execTool.execute).toHaveBeenCalledWith(

671+

"call-1",

672+

{

673+

command: "pwd",

674+

host: "node",

675+

node: "mac-mini",

676+

},

677+

undefined,

678+

undefined,

679+

);

680+

expect(result?.content).toEqual([

681+

{

682+

type: "text",

683+

text: "Command still running (session exec-1, pid 123). Use node_process (list/poll/log/write/send-keys/submit/paste/kill/clear/remove) for follow-up.",

684+

},

685+

]);

620686621687

const runtimePolicySessionFile = path.join(tempDir, "runtime-policy-session.jsonl");

622688

const runtimePolicyParams = createParams(runtimePolicySessionFile, workspaceDir);

@@ -634,11 +700,15 @@ describe("Codex app-server dynamic tool build", () => {

634700

} as never;

635701

const runtimePolicyTools = await buildDynamicToolsForTest(runtimePolicyParams, workspaceDir, {

636702

sandboxSessionKey: "agent:policy:session-1",

637-

nativeToolSurfaceEnabled: false,

703+

nativeToolSurfaceEnabled: true,

638704

sessionAgentId: "policy",

639705

});

640706641-

expect(runtimePolicyTools.map((tool) => tool.name)).toEqual(["message", "exec", "process"]);

707+

expect(runtimePolicyTools.map((tool) => tool.name)).toEqual([

708+

"message",

709+

"node_exec",

710+

"node_process",

711+

]);

642712

});

643713644714

it("exposes Docker sandbox shell tools when native Code Mode cannot honor sandbox paths", async () => {

@@ -1003,15 +1073,30 @@ describe("Codex app-server dynamic tool build", () => {

10031073

});

1004107410051075

it("normalizes Codex dynamic toolsAllow entries before filtering", () => {

1006-

const tools = ["exec", "sandbox_exec", "sandbox_process", "apply_patch", "read", "message"].map(

1007-

(name) => ({ name }),

1008-

);

1076+

const tools = [

1077+

"exec",

1078+

"sandbox_exec",

1079+

"sandbox_process",

1080+

"node_exec",

1081+

"node_process",

1082+

"apply_patch",

1083+

"read",

1084+

"message",

1085+

].map((name) => ({ name }));

1009108610101087

expect(

10111088

filterCodexDynamicToolsForAllowlist(tools, [" BASH ", "apply-patch", "READ"]).map(

10121089

(tool) => tool.name,

10131090

),

1014-

).toEqual(["exec", "sandbox_exec", "sandbox_process", "apply_patch", "read"]);

1091+

).toEqual([

1092+

"exec",

1093+

"sandbox_exec",

1094+

"sandbox_process",

1095+

"node_exec",

1096+

"node_process",

1097+

"apply_patch",

1098+

"read",

1099+

]);

10151100

});

1016110110171102

it("treats an explicit empty Codex dynamic toolsAllow as no tools", () => {

@@ -1044,7 +1129,7 @@ describe("Codex app-server dynamic tool build", () => {

10441129

expect(shouldEnableCodexAppServerNativeToolSurface(params)).toBe(false);

10451130

});

104611311047-

it("disables Codex native tool surfaces when the effective exec target is node", () => {

1132+

it("keeps Codex native tool surfaces when the effective exec target is node", () => {

10481133

const workspaceDir = path.join(tempDir, "workspace");

10491134

const sessionParams = createParams(path.join(tempDir, "session.jsonl"), workspaceDir);

10501135

sessionParams.disableTools = false;

@@ -1055,16 +1140,16 @@ describe("Codex app-server dynamic tool build", () => {

10551140

ask: "off",

10561141

};

105711421058-

expect(shouldEnableCodexAppServerNativeToolSurface(sessionParams)).toBe(false);

1143+

expect(shouldEnableCodexAppServerNativeToolSurface(sessionParams)).toBe(true);

1059114410601145

sessionParams.toolsAllow = ["*"];

1061-

expect(shouldEnableCodexAppServerNativeToolSurface(sessionParams)).toBe(false);

1146+

expect(shouldEnableCodexAppServerNativeToolSurface(sessionParams)).toBe(true);

1062114710631148

const globalParams = createParams(path.join(tempDir, "global-session.jsonl"), workspaceDir);

10641149

globalParams.disableTools = false;

10651150

globalParams.config = { tools: { exec: { host: "node" } } } as never;

106611511067-

expect(shouldEnableCodexAppServerNativeToolSurface(globalParams)).toBe(false);

1152+

expect(shouldEnableCodexAppServerNativeToolSurface(globalParams)).toBe(true);

1068115310691154

const autoOverrideParams = createParams(

10701155

path.join(tempDir, "auto-override-session.jsonl"),

@@ -1088,7 +1173,7 @@ describe("Codex app-server dynamic tool build", () => {

10881173

shouldEnableCodexAppServerNativeToolSurface(agentParams, undefined, {

10891174

agentId: "main",

10901175

}),

1091-

).toBe(false);

1176+

).toBe(true);

1092117710931178

const runtimePolicyParams = createParams(

10941179

path.join(tempDir, "runtime-policy-session.jsonl"),

@@ -1106,7 +1191,7 @@ describe("Codex app-server dynamic tool build", () => {

11061191

},

11071192

} as never;

110811931109-

expect(shouldEnableCodexAppServerNativeToolSurface(runtimePolicyParams)).toBe(false);

1194+

expect(shouldEnableCodexAppServerNativeToolSurface(runtimePolicyParams)).toBe(true);

11101195

});

1111119611121197

it("disables Codex native tool surfaces whenever an OpenClaw sandbox is active", () => {