






















@@ -1,17 +1,14 @@
11import { posixAgentWorkspaceScript, windowsAgentWorkspaceScript } from "./agent-workspace.ts";
22import { shellQuote } from "./host-command.ts";
33import { psSingleQuote, windowsOpenClawResolver } from "./powershell.ts";
4-import type { Provider, ProviderAuth } from "./types.ts";
4+import type { ProviderAuth } from "./types.ts";
5566export interface NpmUpdateScriptInput {
77auth: ProviderAuth;
88expectedNeedle: string;
9-provider: Provider;
109updateTarget: string;
1110}
121113-const agentModelTimeoutSeconds = Number(process.env.OPENCLAW_PARALLELS_MODEL_TIMEOUT_S || 300);
14-1512export function macosUpdateScript(input: NpmUpdateScriptInput): string {
1613return String.raw`set -euo pipefail
1714export PATH=/opt/homebrew/bin:/opt/homebrew/opt/node/bin:/opt/homebrew/sbin:/usr/bin:/bin:/usr/sbin:/sbin
@@ -73,10 +70,9 @@ ${posixVersionCheck("/opt/homebrew/bin/openclaw", input.expectedNeedle)}
7370start_openclaw_gateway
7471wait_for_gateway
7572/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
7773/opt/homebrew/bin/openclaw config set agents.defaults.skipBootstrap true --strict-json
7874${posixAgentWorkspaceScript("Parallels npm update smoke test assistant.")}
79-${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`;
75+${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.' --timeout 0 --json`;
8076}
81778278export function windowsUpdateScript(input: NpmUpdateScriptInput): string {
@@ -144,11 +140,10 @@ if ($LASTEXITCODE -ne 0) {
144140}
145141Wait-OpenClawGateway
146142Invoke-OpenClaw models set ${psSingleQuote(input.auth.modelId)}
147-Invoke-OpenClaw config set models.providers.${input.provider}.timeoutSeconds ${agentModelTimeoutSeconds} --strict-json
148143Invoke-OpenClaw config set agents.defaults.skipBootstrap true --strict-json
149144${windowsAgentWorkspaceScript("Parallels npm update smoke test assistant.")}
150145Set-Item -Path ('Env:' + ${psSingleQuote(input.auth.apiKeyEnv)}) -Value ${psSingleQuote(input.auth.apiKeyValue)}
151-Invoke-OpenClaw agent --local --agent main --session-id parallels-npm-update-windows --message 'Reply with exact ASCII text OK only.' --json`;
146+Invoke-OpenClaw agent --local --agent main --session-id parallels-npm-update-windows --message 'Reply with exact ASCII text OK only.' --timeout 0 --json`;
152147}
153148154149export function linuxUpdateScript(input: NpmUpdateScriptInput): string {
@@ -207,10 +202,9 @@ ${posixVersionCheck("openclaw", input.expectedNeedle)}
207202start_openclaw_gateway
208203wait_for_gateway
209204openclaw models set ${shellQuote(input.auth.modelId)}
210-openclaw config set models.providers.${input.provider}.timeoutSeconds ${agentModelTimeoutSeconds} --strict-json
211205openclaw config set agents.defaults.skipBootstrap true --strict-json
212206${posixAgentWorkspaceScript("Parallels npm update smoke test assistant.")}
213-${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`;
207+${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.' --timeout 0 --json`;
214208}
215209216210function posixVersionCheck(command: string, expectedNeedle: string): string {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。