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

推荐订阅源

T
Tailwind CSS Blog
博客园 - Franky
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Y
Y Combinator Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 聂微东
L
LangChain Blog
博客园_首页
Recent Announcements
Recent Announcements
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
H
Hackread – Cybersecurity News, Data Breaches, AI and More
爱范儿
爱范儿
博客园 - 叶小钗
博客园 - 【当耐特】
The Cloudflare Blog
J
Java Code Geeks
G
Google Developers Blog
云风的 BLOG
云风的 BLOG
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
aimingoo的专栏
aimingoo的专栏
A
About on SuperTechFans

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(ci): build complete release package artifacts · openc...
steipete · 2026-04-29 · via Recent Commits to openclaw:main

@@ -10,6 +10,7 @@ import {

1010

existsSync,

1111

mkdirSync,

1212

readFileSync,

13+

realpathSync,

1314

rmSync,

1415

writeFileSync,

1516

} from "node:fs";

@@ -1302,7 +1303,9 @@ export function resolveInstalledPrefixDirFromCliPath(cliPath, platform = process

13021303

}

1303130413041305

function readInstalledMetadataFromCliPath(cliPath, platform = process.platform) {

1305-

return readInstalledMetadata(resolveInstalledPrefixDirFromCliPath(cliPath, platform));

1306+

return readInstalledMetadataFromPackageRoot(

1307+

resolveInstalledPackageRootFromCliPath(cliPath, platform),

1308+

);

13061309

}

1307131013081311

function resolveInstalledCliInvocation(cliPath, platform = process.platform) {

@@ -2781,6 +2784,10 @@ async function runOpenClaw(params) {

2781278427822785

function readInstalledPackageManifest(prefixDir) {

27832786

const packageRoot = installedPackageRoot(prefixDir);

2787+

return readInstalledPackageManifestFromPackageRoot(packageRoot);

2788+

}

2789+2790+

function readInstalledPackageManifestFromPackageRoot(packageRoot) {

27842791

const packageJsonPath = join(packageRoot, "package.json");

27852792

if (!existsSync(packageJsonPath)) {

27862793

throw new Error(`Installed package manifest missing: ${packageJsonPath}`);

@@ -2798,6 +2805,15 @@ export function readInstalledVersion(prefixDir) {

2798280527992806

function readInstalledMetadata(prefixDir) {

28002807

const { packageJson, packageRoot } = readInstalledPackageManifest(prefixDir);

2808+

return readInstalledMetadataFromManifest(packageJson, packageRoot);

2809+

}

2810+2811+

function readInstalledMetadataFromPackageRoot(packageRoot) {

2812+

const { packageJson } = readInstalledPackageManifestFromPackageRoot(packageRoot);

2813+

return readInstalledMetadataFromManifest(packageJson, packageRoot);

2814+

}

2815+2816+

function readInstalledMetadataFromManifest(packageJson, packageRoot) {

28012817

const buildInfoPath = join(packageRoot, "dist", "build-info.json");

28022818

if (!existsSync(buildInfoPath)) {

28032819

throw new Error(`Installed build info missing: ${buildInfoPath}`);

@@ -2824,8 +2840,55 @@ function verifyInstalledCandidate(installed, build) {

28242840

}

28252841

}

282628422827-

function installedPackageRoot(prefixDir) {

2828-

return process.platform === "win32"

2843+

export function resolveInstalledPackageRootFromCliPath(

2844+

cliPath,

2845+

platform = process.platform,

2846+

env = process.env,

2847+

) {

2848+

const prefixDir = resolveInstalledPrefixDirFromCliPath(cliPath, platform);

2849+

const candidates = [installedPackageRoot(prefixDir, platform)];

2850+2851+

if (platform !== "win32") {

2852+

const resolvedCliPath = String(cliPath ?? "").trim();

2853+

if (resolvedCliPath) {

2854+

try {

2855+

const realCliPath = realpathSync(resolvedCliPath);

2856+

candidates.push(dirname(realCliPath));

2857+

candidates.push(dirname(dirname(realCliPath)));

2858+

} catch {

2859+

// Some installer shims are shell wrappers, not symlinks. Fall through to

2860+

// common user-local npm prefixes below.

2861+

}

2862+

}

2863+2864+

for (const prefix of [

2865+

env.NPM_CONFIG_PREFIX,

2866+

env.npm_config_prefix,

2867+

env.HOME && join(env.HOME, ".npm-global"),

2868+

env.HOME && join(env.HOME, ".local"),

2869+

]) {

2870+

if (typeof prefix === "string" && prefix.trim()) {

2871+

candidates.push(installedPackageRoot(prefix, platform));

2872+

}

2873+

}

2874+

}

2875+2876+

const checked: string[] = [];

2877+

for (const candidate of candidates) {

2878+

if (!candidate || checked.includes(candidate)) {

2879+

continue;

2880+

}

2881+

checked.push(candidate);

2882+

if (existsSync(join(candidate, "package.json"))) {

2883+

return candidate;

2884+

}

2885+

}

2886+2887+

throw new Error(`Installed package manifest missing. Checked: ${checked.join(", ")}`);

2888+

}

2889+2890+

function installedPackageRoot(prefixDir, platform = process.platform) {

2891+

return platform === "win32"

28292892

? join(prefixDir, "node_modules", "openclaw")

28302893

: join(prefixDir, "lib", "node_modules", "openclaw");

28312894

}