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

推荐订阅源

Y
Y Combinator Blog
IT之家
IT之家
博客园_首页
人人都是产品经理
人人都是产品经理
博客园 - Franky
I
InfoQ
Recent Announcements
Recent Announcements
P
Proofpoint News Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
GbyAI
GbyAI
大猫的无限游戏
大猫的无限游戏
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
月光博客
月光博客
Microsoft Security Blog
Microsoft Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
B
Blog RSS Feed
MongoDB | Blog
MongoDB | Blog
雷峰网
雷峰网
博客园 - 聂微东
N
Netflix TechBlog - Medium
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The GitHub Blog
The GitHub Blog
D
Docker

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: relax gateway service path audit · openclaw/openclaw...
steipete · 2026-05-02 · via Recent Commits to openclaw:main

@@ -32,6 +32,7 @@ type MinimalServicePathOptions = {

3232

cwd?: string;

3333

env?: Record<string, string | undefined>;

3434

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

35+

includeMissingUserBinDefaults?: boolean;

3536

};

36373738

type BuildServicePathOptions = MinimalServicePathOptions & {

@@ -168,10 +169,14 @@ function addCommonUserBinDirs(

168169

dirs: string[],

169170

home: string,

170171

existsSync: (candidate: string) => boolean,

172+

includeMissingDefaults: boolean,

171173

): void {

172-

dirs.push(`${home}/.local/bin`);

173-

dirs.push(`${home}/.npm-global/bin`);

174-

dirs.push(`${home}/bin`);

174+

const addDefault = includeMissingDefaults

175+

? (candidate: string) => dirs.push(candidate)

176+

: (candidate: string) => addExistingDir(dirs, candidate, existsSync);

177+

addDefault(`${home}/.local/bin`);

178+

addDefault(`${home}/.npm-global/bin`);

179+

addDefault(`${home}/bin`);

175180

addExistingDir(dirs, `${home}/.volta/bin`, existsSync);

176181

addExistingDir(dirs, `${home}/.asdf/shims`, existsSync);

177182

addExistingDir(dirs, `${home}/.bun/bin`, existsSync);

@@ -196,14 +201,21 @@ function addNixProfileBinDirs(

196201

home: string,

197202

env: Record<string, string | undefined> | undefined,

198203

options: Pick<MinimalServicePathOptions, "cwd" | "home">,

204+

includeMissingDefault: boolean,

205+

existsSync: (candidate: string) => boolean,

199206

): void {

200207

const nixProfiles = env?.NIX_PROFILES?.trim();

201208

if (nixProfiles) {

202209

for (const profile of nixProfiles.split(/\s+/).toReversed()) {

203210

addEnvConfiguredBinDir(dirs, appendSubdir(profile, "bin"), options);

204211

}

205212

} else {

206-

dirs.push(`${home}/.nix-profile/bin`);

213+

const defaultProfileBin = `${home}/.nix-profile/bin`;

214+

if (includeMissingDefault) {

215+

dirs.push(defaultProfileBin);

216+

} else {

217+

addExistingDir(dirs, defaultProfileBin, existsSync);

218+

}

207219

}

208220

}

209221

@@ -229,14 +241,15 @@ function resolveDarwinUserBinDirs(

229241

home: string | undefined,

230242

env?: Record<string, string | undefined>,

231243

existsSync: (candidate: string) => boolean = fs.existsSync,

232-

options: Pick<MinimalServicePathOptions, "cwd" | "home"> = {},

244+

options: Pick<MinimalServicePathOptions, "cwd" | "home" | "includeMissingUserBinDefaults"> = {},

233245

): string[] {

234246

if (!home) {

235247

return [];

236248

}

237249238250

const dirs: string[] = [];

239251

const pathOptions = { ...options, home };

252+

const includeMissingUserBinDefaults = options.includeMissingUserBinDefaults ?? true;

240253241254

// Env-configured bin roots (override defaults when present).

242255

// Note: FNM_DIR on macOS defaults to ~/Library/Application Support/fnm

@@ -250,10 +263,10 @@ function resolveDarwinUserBinDirs(

250263

// pnpm: binary is directly in PNPM_HOME (not in bin subdirectory)

251264252265

// Common user bin directories

253-

addCommonUserBinDirs(dirs, home, existsSync);

266+

addCommonUserBinDirs(dirs, home, existsSync, includeMissingUserBinDefaults);

254267255268

// Nix Home Manager (cross-platform)

256-

addNixProfileBinDirs(dirs, home, env, pathOptions);

269+

addNixProfileBinDirs(dirs, home, env, pathOptions, includeMissingUserBinDefaults, existsSync);

257270258271

// Node version managers - macOS specific paths

259272

// nvm: no stable default path, depends on user's shell configuration

@@ -275,14 +288,15 @@ function resolveLinuxUserBinDirs(

275288

home: string | undefined,

276289

env?: Record<string, string | undefined>,

277290

existsSync: (candidate: string) => boolean = fs.existsSync,

278-

options: Pick<MinimalServicePathOptions, "cwd" | "home"> = {},

291+

options: Pick<MinimalServicePathOptions, "cwd" | "home" | "includeMissingUserBinDefaults"> = {},

279292

): string[] {

280293

if (!home) {

281294

return [];

282295

}

283296284297

const dirs: string[] = [];

285298

const pathOptions = { ...options, home };

299+

const includeMissingUserBinDefaults = options.includeMissingUserBinDefaults ?? true;

286300287301

// Env-configured bin roots (override defaults when present).

288302

addCommonEnvConfiguredBinDirs(dirs, env, pathOptions);

@@ -291,10 +305,10 @@ function resolveLinuxUserBinDirs(

291305

addEnvConfiguredBinDir(dirs, appendSubdir(env?.FNM_DIR, "current/bin"), pathOptions);

292306293307

// Common user bin directories

294-

addCommonUserBinDirs(dirs, home, existsSync);

308+

addCommonUserBinDirs(dirs, home, existsSync, includeMissingUserBinDefaults);

295309296310

// Nix Home Manager (cross-platform)

297-

addNixProfileBinDirs(dirs, home, env, pathOptions);

311+

addNixProfileBinDirs(dirs, home, env, pathOptions, includeMissingUserBinDefaults, existsSync);

298312299313

// Node version managers

300314

addExistingDir(dirs, `${home}/.nvm/current/bin`, existsSync); // nvm with current symlink