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

推荐订阅源

云风的 BLOG
云风的 BLOG
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 叶小钗
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
酷 壳 – CoolShell
酷 壳 – CoolShell
月光博客
月光博客
人人都是产品经理
人人都是产品经理
宝玉的分享
宝玉的分享
博客园 - 司徒正美
WordPress大学
WordPress大学
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
Vercel News
Vercel News
T
The Blog of Author Tim Ferriss
T
Tailwind CSS Blog
A
About on SuperTechFans
Apple Machine Learning Research
Apple Machine Learning Research
L
LangChain Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
Visual Studio Blog
S
SegmentFault 最新的问题
Google DeepMind News
Google DeepMind News
博客园 - 聂微东

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(e2e): repair omitted Codex platform package · opencla...
vincentkoc · 2026-06-16 · via Recent Commits to openclaw:main

@@ -9,6 +9,84 @@ interface PluginIsolationOptions {

99

nodeCommand?: string;

1010

}

111112+

export function posixCodexPlatformPackageRepairFunction(): string {

13+

return `repair_missing_codex_platform_package() {

14+

output_file="$1"

15+

grep -F 'Missing optional dependency @openai/codex-' "$output_file" >/dev/null 2>&1 || return 1

16+

state_home="\${OPENCLAW_PARALLELS_HOME:-\${HOME:-}}"

17+

codex_manifest=""

18+

for candidate in "$state_home"/.openclaw/npm/projects/*/node_modules/@openclaw/codex/package.json; do

19+

[ -f "$candidate" ] || continue

20+

codex_manifest="$candidate"

21+

break

22+

done

23+

if [ -z "$codex_manifest" ]; then

24+

echo "codex-platform-repair: managed Codex project not found" >&2

25+

return 1

26+

fi

27+

project_root="\${codex_manifest%/node_modules/@openclaw/codex/package.json}"

28+

cache_dir="$(mktemp -d "\${TMPDIR:-/tmp}/openclaw-npm-cache.XXXXXX")"

29+

echo "codex-platform-repair: retrying managed npm install once with a fresh cache" >&2

30+

repair_rc=0

31+

(

32+

cd "$project_root"

33+

NPM_CONFIG_CACHE="$cache_dir" npm_config_cache="$cache_dir" npm install --omit=dev --omit=peer --legacy-peer-deps --ignore-scripts --no-audit --no-fund

34+

) || repair_rc=$?

35+

rm -rf "$cache_dir"

36+

if [ "$repair_rc" -ne 0 ]; then

37+

echo "codex-platform-repair: npm install failed with exit code $repair_rc" >&2

38+

return "$repair_rc"

39+

fi

40+

echo "codex-platform-repair: managed npm install completed" >&2

41+

}`;

42+

}

43+44+

export function windowsCodexPlatformPackageRepairFunction(): string {

45+

return String.raw`function Repair-MissingCodexPlatformPackage {

46+

param([object[]] $Output)

47+

$outputText = $Output | Out-String

48+

if ($outputText -notmatch [regex]::Escape('Missing optional dependency @openai/codex-')) {

49+

return $false

50+

}

51+

$projectsRoot = Join-Path $env:USERPROFILE '.openclaw\npm\projects'

52+

$codexManifest = Get-ChildItem -Path $projectsRoot -Filter package.json -File -Recurse -ErrorAction SilentlyContinue |

53+

Where-Object { $_.FullName -match 'node_modules[\\/]@openclaw[\\/]codex[\\/]package\.json$' } |

54+

Select-Object -First 1

55+

if (-not $codexManifest) {

56+

Write-Warning 'codex-platform-repair: managed Codex project not found'

57+

return $false

58+

}

59+

$projectRoot = $codexManifest.Directory.Parent.Parent.Parent.FullName

60+

$cacheDir = Join-Path ([System.IO.Path]::GetTempPath()) ('openclaw-npm-cache-' + [guid]::NewGuid().ToString('N'))

61+

$oldUpperCache = [Environment]::GetEnvironmentVariable('NPM_CONFIG_CACHE', 'Process')

62+

$oldLowerCache = [Environment]::GetEnvironmentVariable('npm_config_cache', 'Process')

63+

$pushedLocation = $false

64+

$repairExit = 1

65+

try {

66+

New-Item -ItemType Directory -Path $cacheDir -Force | Out-Null

67+

[Environment]::SetEnvironmentVariable('NPM_CONFIG_CACHE', $cacheDir, 'Process')

68+

[Environment]::SetEnvironmentVariable('npm_config_cache', $cacheDir, 'Process')

69+

Push-Location $projectRoot

70+

$pushedLocation = $true

71+

Write-Host 'codex-platform-repair: retrying managed npm install once with a fresh cache'

72+

$repairOutput = & npm.cmd install --omit=dev --omit=peer --legacy-peer-deps --ignore-scripts --no-audit --no-fund 2>&1

73+

$repairExit = $LASTEXITCODE

74+

if ($null -ne $repairOutput) { $repairOutput | ForEach-Object { Write-Host $_ } }

75+

} finally {

76+

if ($pushedLocation) { Pop-Location }

77+

[Environment]::SetEnvironmentVariable('NPM_CONFIG_CACHE', $oldUpperCache, 'Process')

78+

[Environment]::SetEnvironmentVariable('npm_config_cache', $oldLowerCache, 'Process')

79+

Remove-Item $cacheDir -Force -Recurse -ErrorAction SilentlyContinue

80+

}

81+

if ($repairExit -ne 0) {

82+

Write-Warning "codex-platform-repair: npm install failed with exit code $repairExit"

83+

return $false

84+

}

85+

Write-Host 'codex-platform-repair: managed npm install completed'

86+

return $true

87+

}`;

88+

}

89+1290

export function providerOnlyPluginId(modelId: string, fallbackPluginId: string): string {

1391

return providerIdFromModelId(modelId) || fallbackPluginId;

1492

}