






























@@ -1,14 +1,17 @@
11import { posixAgentWorkspaceScript, windowsAgentWorkspaceScript } from "./agent-workspace.ts";
22import { shellQuote } from "./host-command.ts";
33import { psSingleQuote, windowsOpenClawResolver } from "./powershell.ts";
4-import type { ProviderAuth } from "./types.ts";
4+import type { Provider, ProviderAuth } from "./types.ts";
5566export interface NpmUpdateScriptInput {
77auth: ProviderAuth;
88expectedNeedle: string;
9+provider: Provider;
910updateTarget: string;
1011}
111213+const agentModelTimeoutSeconds = Number(process.env.OPENCLAW_PARALLELS_MODEL_TIMEOUT_S || 300);
14+1215export function macosUpdateScript(input: NpmUpdateScriptInput): string {
1316return String.raw`set -euo pipefail
1417export PATH=/opt/homebrew/bin:/opt/homebrew/opt/node/bin:/opt/homebrew/sbin:/usr/bin:/bin:/usr/sbin:/sbin
@@ -70,6 +73,7 @@ ${posixVersionCheck("/opt/homebrew/bin/openclaw", input.expectedNeedle)}
7073start_openclaw_gateway
7174wait_for_gateway
7275/opt/homebrew/bin/openclaw models set ${shellQuote(input.auth.modelId)}
76+/opt/homebrew/bin/openclaw config set models.providers.${input.provider}.timeoutSeconds ${agentModelTimeoutSeconds} --strict-json
7377/opt/homebrew/bin/openclaw config set agents.defaults.skipBootstrap true --strict-json
7478${posixAgentWorkspaceScript("Parallels npm update smoke test assistant.")}
7579${input.auth.apiKeyEnv}=${shellQuote(input.auth.apiKeyValue)} /opt/homebrew/bin/openclaw agent --local --agent main --session-id parallels-npm-update-macos --message 'Reply with exact ASCII text OK only.' --json`;
@@ -140,6 +144,7 @@ if ($LASTEXITCODE -ne 0) {
140144}
141145Wait-OpenClawGateway
142146Invoke-OpenClaw models set ${psSingleQuote(input.auth.modelId)}
147+Invoke-OpenClaw config set models.providers.${input.provider}.timeoutSeconds ${agentModelTimeoutSeconds} --strict-json
143148Invoke-OpenClaw config set agents.defaults.skipBootstrap true --strict-json
144149${windowsAgentWorkspaceScript("Parallels npm update smoke test assistant.")}
145150Set-Item -Path ('Env:' + ${psSingleQuote(input.auth.apiKeyEnv)}) -Value ${psSingleQuote(input.auth.apiKeyValue)}
@@ -202,6 +207,7 @@ ${posixVersionCheck("openclaw", input.expectedNeedle)}
202207start_openclaw_gateway
203208wait_for_gateway
204209openclaw models set ${shellQuote(input.auth.modelId)}
210+openclaw config set models.providers.${input.provider}.timeoutSeconds ${agentModelTimeoutSeconds} --strict-json
205211openclaw config set agents.defaults.skipBootstrap true --strict-json
206212${posixAgentWorkspaceScript("Parallels npm update smoke test assistant.")}
207213${input.auth.apiKeyEnv}=${shellQuote(input.auth.apiKeyValue)} openclaw agent --local --agent main --session-id parallels-npm-update-linux --message 'Reply with exact ASCII text OK only.' --json`;
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。