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

推荐订阅源

J
Java Code Geeks
M
MIT News - Artificial intelligence
D
Docker
S
SegmentFault 最新的问题
B
Blog
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
博客园 - 【当耐特】
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
腾讯CDC
阮一峰的网络日志
阮一峰的网络日志
U
Unit 42
C
Check Point Blog
GbyAI
GbyAI
美团技术团队
Recent Announcements
Recent Announcements
F
Fortinet All Blogs
量子位
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
G
Google Developers 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
Validate Codex app-server command overrides (#84417) · op...
TurboTheTurt · 2026-05-22 · via Recent Commits to openclaw:main

@@ -48,6 +48,27 @@ export type ResolveWindowsSpawnProgramCandidateParams = Omit<

4848

ResolveWindowsSpawnProgramParams,

4949

"allowShellFallback"

5050

>;

51+

export type WindowsSpawnCommandInlineArgs = {

52+

executable: string;

53+

arguments: string;

54+

};

55+56+

const INLINE_ARGUMENT_EXECUTABLES = new Set([

57+

"node",

58+

"node.exe",

59+

"npm",

60+

"npm.cmd",

61+

"npm.exe",

62+

"npx",

63+

"npx.cmd",

64+

"npx.exe",

65+

"pnpm",

66+

"pnpm.cmd",

67+

"pnpm.exe",

68+

"yarn",

69+

"yarn.cmd",

70+

"yarn.exe",

71+

]);

51725273

function isFilePath(candidate: string): boolean {

5374

try {

@@ -57,6 +78,49 @@ function isFilePath(candidate: string): boolean {

5778

}

5879

}

598081+

function readCommandToken(command: string): { token: string; rest: string } | null {

82+

const trimmed = command.trim();

83+

if (!trimmed) {

84+

return null;

85+

}

86+

if (trimmed.startsWith('"')) {

87+

const closeIndex = trimmed.indexOf('"', 1);

88+

if (closeIndex <= 0) {

89+

return null;

90+

}

91+

return {

92+

token: trimmed.slice(1, closeIndex),

93+

rest: trimmed.slice(closeIndex + 1).trim(),

94+

};

95+

}

96+

const match = trimmed.match(/^(\S+)\s+(.+)$/);

97+

if (!match) {

98+

return null;

99+

}

100+

return {

101+

token: match[1] ?? "",

102+

rest: (match[2] ?? "").trim(),

103+

};

104+

}

105+106+

export function detectWindowsSpawnCommandInlineArgs(

107+

command: string,

108+

): WindowsSpawnCommandInlineArgs | null {

109+

const parsed = readCommandToken(command);

110+

if (!parsed?.rest) {

111+

return null;

112+

}

113+

const normalizedToken = parsed.token.replace(/\\/g, "/");

114+

const executable = normalizeLowercaseStringOrEmpty(path.posix.basename(normalizedToken));

115+

if (!INLINE_ARGUMENT_EXECUTABLES.has(executable)) {

116+

return null;

117+

}

118+

return {

119+

executable: parsed.token,

120+

arguments: parsed.rest,

121+

};

122+

}

123+60124

/** Resolve a Windows command name through PATH and PATHEXT so wrapper inspection sees the real file. */

61125

export function resolveWindowsExecutablePath(command: string, env: NodeJS.ProcessEnv): string {

62126

if (command.includes("/") || command.includes("\\") || path.isAbsolute(command)) {

@@ -214,6 +278,12 @@ export function resolveWindowsSpawnProgramCandidate(

214278

resolution: "direct",

215279

};

216280

}

281+

const inlineArgs = detectWindowsSpawnCommandInlineArgs(params.command);

282+

if (inlineArgs) {

283+

throw new Error(

284+

`Windows spawn command must be an executable path only; "${inlineArgs.executable}" was configured with inline arguments "${inlineArgs.arguments}". Put arguments in the caller's args array instead.`,

285+

);

286+

}

217287218288

const resolvedCommand = resolveWindowsExecutablePath(params.command, env);

219289

const ext = normalizeLowercaseStringOrEmpty(path.extname(resolvedCommand));