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

推荐订阅源

H
Hacker News: Front Page
C
CERT Recently Published Vulnerability Notes
P
Palo Alto Networks Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
Recorded Future
Recorded Future
Latest news
Latest news
Stack Overflow Blog
Stack Overflow Blog
Spread Privacy
Spread Privacy
Google DeepMind News
Google DeepMind News
Recent Announcements
Recent Announcements
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog
Stack Overflow Blog
Stack Overflow Blog
The Cloudflare Blog
A
Arctic Wolf
T
Tenable Blog
S
SegmentFault 最新的问题
C
Cisco Blogs
V
Visual Studio Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
博客园 - 三生石上(FineUI控件)
The GitHub Blog
The GitHub Blog
Hugging Face - Blog
Hugging Face - Blog
GbyAI
GbyAI
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
I
Intezer
MyScale Blog
MyScale Blog
Google Online Security Blog
Google Online Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google DeepMind News
Google DeepMind News
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tor Project blog
J
Java Code Geeks
www.infosecurity-magazine.com
www.infosecurity-magazine.com
U
Unit 42
Simon Willison's Weblog
Simon Willison's Weblog
P
Proofpoint News Feed
The Register - Security
The Register - Security
爱范儿
爱范儿
V
Vulnerabilities – Threatpost
P
Proofpoint News Feed
D
DataBreaches.Net
aimingoo的专栏
aimingoo的专栏
N
Netflix TechBlog - Medium
Apple Machine Learning Research
Apple Machine Learning Research
雷峰网
雷峰网
美团技术团队
N
News and Events Feed by Topic

Recent Commits to openclaw:main

fix: aggressively prune retired model catalogs fix: harden package URL downloads (#85578) ci: retry npm Telegram release dispatch test: isolate Telegram spooled timeout from stall watchdog · openclaw/openclaw@a04566d fix(exec-approvals): add .catch() to expiry delivery fire-and-forget … fix(memory-core): avoid double bulleting promoted snippets (#85724) · openclaw/openclaw@983a3b9 fix(doctor): skip empty entries and memoize routes in plugin session … ci: avoid duplicate release-check auth headers · openclaw/openclaw@6191750 fix: prune retired model catalog entries ci: authenticate release-check reachability fetches · openclaw/openclaw@0c192e2 docs(changelog): note Telegram attachment action fix · openclaw/openclaw@c5f1344 fix(telegram): send attachment paths as media · openclaw/openclaw@fdf01db refactor(telegram): simplify action media sends · openclaw/openclaw@0540025 fix(doctor): canonicalize git checkout detection (#85735) test(ci): update plugin prerelease checkout expectation ci: persist checkout credentials for release validation test(codex): avoid searchable-tool registration flake · openclaw/openclaw@5e8c71b refactor: simplify doctor repair checks (#83753) docs(changelog): credit landed bug sweep PRs · openclaw/openclaw@24de304 perf(utils): preserve message identity in stripInlineDirectiveTagsFro… · openclaw/openclaw@bf84b30 fix(agents): add openai-responses family to non-visible turn retry gu… · openclaw/openclaw@49e9c3e fix(status): show configured cost for aws-sdk models (#85619) · openclaw/openclaw@6e289b4 fix(microsoft-foundry): DeepSeek V4 models incorrectly use openai-com… · openclaw/openclaw@ec43acb fix(skills): show empty state notice in config wizard (#85032) · openclaw/openclaw@74e65f4 test(codex): avoid forced-tool allowlist flake · openclaw/openclaw@ef7e652 fix: avoid gateway startup event-loop stalls test(codex): type forced-tool request mock · openclaw/openclaw@f6ab188 test(codex): avoid forced-tool turn flake · openclaw/openclaw@8d1ab83 test(codex): avoid startup cleanup socket flake fix(gateway): pin relative state dir at startup · openclaw/openclaw@2e5be0c fix(whatsapp): persist inbound delivery in plugin state (#85506) · openclaw/openclaw@b47bace test(codex): make sandbox cleanup proof deterministic fix(cron): route topic targets through channel plugins · openclaw/openclaw@9175491 fix(agents): simplify subagent completion handoff ci(release): isolate npm publish concurrency · openclaw/openclaw@9c26b87 ci(release): allow beta publish after npm preflight · openclaw/openclaw@0e37263 fix(release): allow large beta smoke run lists ci(release): retry child workflow polling · openclaw/openclaw@c689f71 ci(release): poll child workflows through actions api · openclaw/openclaw@e5dab55 fix(bootstrap): guard bootstrap name checks against undefined names (… · openclaw/openclaw@25fa46b fix(cli): waitForever must keep the event loop alive (#85694) · openclaw/openclaw@eca9645 fix(cli-output): ignore cumulative usage from result events in stream… · openclaw/openclaw@84229d9 fix(secrets): show irreversible warning after interactive apply confi… · openclaw/openclaw@bb52b54 fix(agents/harness): pass CLI runtime aliases through to PI in select… · openclaw/openclaw@2c3b7ea docs: add bug-sweep changelog entries fix(release): run npm shims on Windows · openclaw/openclaw@1f32a48 fix(ci): repair crabbox hydrate replay (#85706) · openclaw/openclaw@0d7d99b feat(auth): support named model login profiles fix(gateway): restore WebChat image understanding routing · openclaw/openclaw@55a0c9b fix(anthropic): migrate 1M context to GA handling fix(scripts): resolve Crabbox shims on Windows · openclaw/openclaw@5c535df test(ci): harden installer smoke coverage · openclaw/openclaw@68bcd4e fix(status): bound deep docker audit probes (#85476) · openclaw/openclaw@f7c05dc docs: expand meeting notes docs · openclaw/openclaw@a7e0fa0 fix(cli): validate tasks audit limit (#84901) · openclaw/openclaw@44d470f fix(twitch): preserve newer message handler during cleanup (#85425) · openclaw/openclaw@71ddc01 fix(ci): require live docker credentials by resource · openclaw/openclaw@1e21121 fix(diagnostics): drop snake case otel ids (#72645) · openclaw/openclaw@e0bafc5 fix(ci): clear signal and docs guard blockers (#85693) · openclaw/openclaw@3a1d4dd fix(ci): require factory auth for droid live docker · openclaw/openclaw@cc6c372 fix: honor disabled synthetic auth lookup · openclaw/openclaw@a4a1abb fix(scripts): repair live docker auth shellcheck · openclaw/openclaw@4e34ac4 fix(docker): avoid printing gateway token · openclaw/openclaw@5db773f fix(cli): keep logs follow on live gateway state · openclaw/openclaw@6e3b318 fix(e2e): prefer x64 MinGit on Windows · openclaw/openclaw@15d9134 feat: add meeting notes plugin docs: update changelog for memory artifacts (#85060) (thanks @brokema… · openclaw/openclaw@9e55383 fix(memory-lancedb): expose public memory artifacts · openclaw/openclaw@aac1abe fix(memory): preserve sidecar capability hooks · openclaw/openclaw@e6288ca fix(e2e): scrub Windows update config on PowerShell 5.1 · openclaw/openclaw@6657b49 docs: absorb documentation PR sweep · openclaw/openclaw@2c536a8 fix(agents): stabilize Linux fallback tests · openclaw/openclaw@6b04170 fix(codex): preserve native web search action metadata (#85378) · openclaw/openclaw@bcf756c test: refresh Codex prompt snapshots · openclaw/openclaw@492d656 docs: absorb hook and subagent guidance PRs fix(agents): audit tool policy blocks (#85673) · openclaw/openclaw@09dd051 ci: fix plugin npm bundled dependency install · openclaw/openclaw@d485464 feat(diagnostics): classify skill and tool usage (#80370) docs(skills): clarify control ui recording proof (#85568) · openclaw/openclaw@0b476b9 test(agents): repair main failure fixtures · openclaw/openclaw@c29967b feat(diagnostics): trace gateway secret preparation (#83019) · openclaw/openclaw@4f0c902 fix(diagnostics): harden observability exports and smokes (#85371) · openclaw/openclaw@7f05be0 fix(stepfun): drop stale auth choice metadata · openclaw/openclaw@0b2ab6c test(e2e): sample kitchen sink RSS on Windows · openclaw/openclaw@73c1e37 test(plugins): fail gauntlet on load diagnostics fix(build): preserve tsdown heap floor · openclaw/openclaw@9ff1a43 fix(tools): honor config apiKey in media tool preflight (#85570) · openclaw/openclaw@31c269f fix(e2e): support macOS script wrappers fix(ci): scope changed shrinkwrap checks · openclaw/openclaw@743fd4c chore(ui): refresh fa control ui locale chore(ui): refresh nl control ui locale · openclaw/openclaw@908464b chore(ui): refresh vi control ui locale · openclaw/openclaw@62b75f4 chore(ui): refresh th control ui locale · openclaw/openclaw@fc4ba31 chore(ui): refresh id control ui locale · openclaw/openclaw@5b1bdd1 chore(ui): refresh pl control ui locale · openclaw/openclaw@534d4b1 chore(ui): refresh uk control ui locale · openclaw/openclaw@055c3bd chore(ui): refresh ar control ui locale · openclaw/openclaw@89c5a68 chore(ui): refresh it control ui locale · openclaw/openclaw@44ca805 chore(ui): refresh tr control ui locale chore(ui): refresh fr control ui locale · openclaw/openclaw@2240b0e
fix(scripts): run Windows check commands through shims · openclaw/openclaw@8a94e82
vincentkoc · 2026-05-24 · via Recent Commits to openclaw:main

@@ -2,10 +2,38 @@ import { spawn, spawnSync, type SpawnOptions } from "node:child_process";

22

import { writeFile } from "node:fs/promises";

33

import path from "node:path";

44

import { fileURLToPath } from "node:url";

5+

import { resolveNpmRunner } from "../../npm-runner.mjs";

6+

import { resolvePnpmRunner } from "../../pnpm-runner.mjs";

7+

import { buildCmdExeCommandLine } from "../../windows-cmd-helpers.mjs";

58

import type { CommandResult, RunOptions } from "./types.ts";

69710

export const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../../..");

81112+

type HostCommandInvocation = {

13+

args: string[];

14+

command: string;

15+

env?: NodeJS.ProcessEnv;

16+

shell?: boolean;

17+

windowsVerbatimArguments?: boolean;

18+

};

19+20+

type ResolveHostCommandOptions = {

21+

comSpec?: string;

22+

env?: NodeJS.ProcessEnv;

23+

execPath?: string;

24+

existsSync?: (path: string) => boolean;

25+

platform?: NodeJS.Platform;

26+

};

27+28+

function hostInvocationFromRunner(runner: HostCommandInvocation): HostCommandInvocation {

29+

if (runner.env === undefined) {

30+

const invocation = { ...runner };

31+

delete invocation.env;

32+

return invocation;

33+

}

34+

return runner;

35+

}

36+937

export function say(message: string): void {

1038

process.stdout.write(`==> ${message}\n`);

1139

}

@@ -23,15 +51,81 @@ export function shellQuote(value: string): string {

2351

return `'${value.replaceAll("'", `'"'"'`)}'`;

2452

}

255354+

function portableBasename(value: string): string {

55+

return value.split(/[/\\]/u).at(-1) ?? value;

56+

}

57+58+

function portableExtension(value: string): string {

59+

return path.posix.extname(portableBasename(value)).toLowerCase();

60+

}

61+62+

function isBareCommand(command: string, name: "npm" | "pnpm"): boolean {

63+

return portableBasename(command) === command && command.toLowerCase() === name;

64+

}

65+66+

function resolveEnvValue(env: NodeJS.ProcessEnv, name: string): string | undefined {

67+

const key = Object.keys(env).find((candidate) => candidate.toLowerCase() === name.toLowerCase());

68+

return key === undefined ? undefined : env[key];

69+

}

70+71+

export function resolveHostCommandInvocation(

72+

command: string,

73+

args: string[],

74+

options: ResolveHostCommandOptions = {},

75+

): HostCommandInvocation {

76+

const env = options.env ?? process.env;

77+

const platform = options.platform ?? process.platform;

78+

const comSpec = options.comSpec ?? resolveEnvValue(env, "ComSpec") ?? "cmd.exe";

79+80+

if (isBareCommand(command, "pnpm")) {

81+

const runner = resolvePnpmRunner({

82+

comSpec,

83+

npmExecPath: env.npm_execpath,

84+

nodeExecPath: options.execPath ?? process.execPath,

85+

platform,

86+

pnpmArgs: args,

87+

});

88+

return hostInvocationFromRunner(runner);

89+

}

90+91+

if (isBareCommand(command, "npm")) {

92+

const runner = resolveNpmRunner({

93+

comSpec,

94+

env,

95+

execPath: options.execPath ?? process.execPath,

96+

existsSync: options.existsSync,

97+

npmArgs: args,

98+

platform,

99+

});

100+

return hostInvocationFromRunner(runner);

101+

}

102+103+

const extension = portableExtension(command);

104+

if (platform === "win32" && (extension === ".cmd" || extension === ".bat")) {

105+

return {

106+

args: ["/d", "/s", "/c", buildCmdExeCommandLine(command, args)],

107+

command: comSpec,

108+

shell: false,

109+

windowsVerbatimArguments: true,

110+

};

111+

}

112+113+

return { args, command, shell: false };

114+

}

115+26116

export function run(command: string, args: string[], options: RunOptions = {}): CommandResult {

27-

const result = spawnSync(command, args, {

117+

const env = { ...process.env, ...options.env };

118+

const invocation = resolveHostCommandInvocation(command, args, { env });

119+

const result = spawnSync(invocation.command, invocation.args, {

28120

cwd: options.cwd ?? repoRoot,

29121

encoding: "utf8",

30-

env: { ...process.env, ...options.env },

122+

env: invocation.env ?? env,

31123

input: options.input,

32124

maxBuffer: 50 * 1024 * 1024,

33125

stdio: options.quiet ? ["pipe", "pipe", "pipe"] : ["pipe", "pipe", "pipe"],

126+

shell: invocation.shell,

34127

timeout: options.timeoutMs,

128+

windowsVerbatimArguments: invocation.windowsVerbatimArguments,

35129

});

3613037131

const timedOut = (result.error as NodeJS.ErrnoException | undefined)?.code === "ETIMEDOUT";

@@ -67,10 +161,14 @@ export async function runStreaming(

67161

options: RunOptions & { logPath?: string } = {},

68162

): Promise<number> {

69163

return await new Promise((resolve, reject) => {

70-

const child = spawn(command, args, {

164+

const env = { ...process.env, ...options.env };

165+

const invocation = resolveHostCommandInvocation(command, args, { env });

166+

const child = spawn(invocation.command, invocation.args, {

71167

cwd: options.cwd ?? repoRoot,

72-

env: { ...process.env, ...options.env },

168+

env: invocation.env ?? env,

169+

shell: invocation.shell,

73170

stdio: ["pipe", "pipe", "pipe"],

171+

windowsVerbatimArguments: invocation.windowsVerbatimArguments,

74172

} satisfies SpawnOptions);

7517376174

let log = "";