diff --git a/Dockerfile b/Dockerfile index cb254cdc45c..d440ff1c287 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,7 +64,7 @@ WORKDIR /app COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./ COPY ui/package.json ./ui/package.json COPY patches ./patches -COPY scripts/postinstall-bundled-plugins.mjs scripts/npm-runner.mjs ./scripts/ +COPY scripts/postinstall-bundled-plugins.mjs scripts/npm-runner.mjs scripts/windows-cmd-helpers.mjs ./scripts/ COPY --from=ext-deps /out/ ./${OPENCLAW_BUNDLED_PLUGIN_DIR}/ diff --git a/package.json b/package.json index 8734224bb02..8626d2fe714 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,8 @@ "!docs/.i18n/zh-CN.tm.jsonl", "skills/", "scripts/npm-runner.mjs", - "scripts/postinstall-bundled-plugins.mjs" + "scripts/postinstall-bundled-plugins.mjs", + "scripts/windows-cmd-helpers.mjs" ], "type": "module", "main": "dist/index.js", diff --git a/scripts/docker/cleanup-smoke/Dockerfile b/scripts/docker/cleanup-smoke/Dockerfile index 98f85af056e..a25c4ac7b56 100644 --- a/scripts/docker/cleanup-smoke/Dockerfile +++ b/scripts/docker/cleanup-smoke/Dockerfile @@ -19,7 +19,7 @@ COPY ui/package.json ./ui/package.json COPY packages ./packages COPY extensions ./extensions COPY patches ./patches -COPY scripts/postinstall-bundled-plugins.mjs scripts/npm-runner.mjs ./scripts/ +COPY scripts/postinstall-bundled-plugins.mjs scripts/npm-runner.mjs scripts/windows-cmd-helpers.mjs ./scripts/ RUN --mount=type=cache,id=openclaw-pnpm-store,target=/root/.local/share/pnpm/store,sharing=locked \ corepack enable \ && pnpm install --frozen-lockfile diff --git a/scripts/e2e/Dockerfile b/scripts/e2e/Dockerfile index 2a772474730..3023e166fb3 100644 --- a/scripts/e2e/Dockerfile +++ b/scripts/e2e/Dockerfile @@ -22,7 +22,7 @@ COPY --chown=appuser:appuser package.json pnpm-lock.yaml pnpm-workspace.yaml .np COPY --chown=appuser:appuser ui/package.json ./ui/package.json COPY --chown=appuser:appuser extensions ./extensions COPY --chown=appuser:appuser patches ./patches -COPY --chown=appuser:appuser scripts/postinstall-bundled-plugins.mjs scripts/npm-runner.mjs ./scripts/ +COPY --chown=appuser:appuser scripts/postinstall-bundled-plugins.mjs scripts/npm-runner.mjs scripts/windows-cmd-helpers.mjs ./scripts/ RUN --mount=type=cache,id=openclaw-pnpm-store,target=/home/appuser/.local/share/pnpm/store,sharing=locked \ pnpm install --frozen-lockfile diff --git a/scripts/lib/live-docker-auth.sh b/scripts/lib/live-docker-auth.sh index 8b858c55c6b..ae191117ebc 100644 --- a/scripts/lib/live-docker-auth.sh +++ b/scripts/lib/live-docker-auth.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -OPENCLAW_DOCKER_LIVE_AUTH_ALL=(.claude .codex .minimax) +OPENCLAW_DOCKER_LIVE_AUTH_ALL=(.minimax) OPENCLAW_DOCKER_LIVE_AUTH_FILES_ALL=( .codex/auth.json .codex/config.toml @@ -29,12 +29,6 @@ openclaw_live_should_include_auth_dir_for_provider() { local provider provider="$(openclaw_live_trim "${1:-}")" case "$provider" in - anthropic | claude-cli) - printf '%s\n' ".claude" - ;; - codex-cli | openai-codex) - printf '%s\n' ".codex" - ;; minimax | minimax-portal) printf '%s\n' ".minimax" ;; diff --git a/scripts/test-live-acp-bind-docker.sh b/scripts/test-live-acp-bind-docker.sh index 1b2f21d7814..d3935729da9 100644 --- a/scripts/test-live-acp-bind-docker.sh +++ b/scripts/test-live-acp-bind-docker.sh @@ -103,6 +103,7 @@ if ((${#auth_files[@]} > 0)); then for auth_file in "${auth_files[@]}"; do [ -n "$auth_file" ] || continue if [ -f "/host-auth-files/$auth_file" ]; then + mkdir -p "$(dirname "$HOME/$auth_file")" cp "/host-auth-files/$auth_file" "$HOME/$auth_file" chmod u+rw "$HOME/$auth_file" || true fi diff --git a/scripts/test-live-cli-backend-docker.sh b/scripts/test-live-cli-backend-docker.sh index 5e43696e26f..f17ee73da07 100644 --- a/scripts/test-live-cli-backend-docker.sh +++ b/scripts/test-live-cli-backend-docker.sh @@ -96,6 +96,7 @@ if ((${#auth_files[@]} > 0)); then for auth_file in "${auth_files[@]}"; do [ -n "$auth_file" ] || continue if [ -f "/host-auth-files/$auth_file" ]; then + mkdir -p "$(dirname "$HOME/$auth_file")" cp "/host-auth-files/$auth_file" "$HOME/$auth_file" chmod u+rw "$HOME/$auth_file" || true fi diff --git a/scripts/test-live-gateway-models-docker.sh b/scripts/test-live-gateway-models-docker.sh index 0e463dac844..c4119a1c7ee 100755 --- a/scripts/test-live-gateway-models-docker.sh +++ b/scripts/test-live-gateway-models-docker.sh @@ -90,6 +90,7 @@ if ((${#auth_files[@]} > 0)); then for auth_file in "${auth_files[@]}"; do [ -n "$auth_file" ] || continue if [ -f "/host-auth-files/$auth_file" ]; then + mkdir -p "$(dirname "$HOME/$auth_file")" cp "/host-auth-files/$auth_file" "$HOME/$auth_file" chmod u+rw "$HOME/$auth_file" || true fi diff --git a/scripts/test-live-models-docker.sh b/scripts/test-live-models-docker.sh index 9957659f6ba..5915c7aa7bb 100755 --- a/scripts/test-live-models-docker.sh +++ b/scripts/test-live-models-docker.sh @@ -25,7 +25,7 @@ if [[ -n "${OPENCLAW_DOCKER_AUTH_DIRS:-}" ]]; then [[ -n "$auth_file" ]] || continue AUTH_FILES+=("$auth_file") done < <(openclaw_live_collect_auth_files) -elif [[ -n "${OPENCLAW_LIVE_PROVIDERS:-}" && -n "${OPENCLAW_LIVE_GATEWAY_PROVIDERS:-}" ]]; then +elif [[ -n "${OPENCLAW_LIVE_PROVIDERS:-}" || -n "${OPENCLAW_LIVE_GATEWAY_PROVIDERS:-}" ]]; then while IFS= read -r auth_dir; do [[ -n "$auth_dir" ]] || continue AUTH_DIRS+=("$auth_dir") @@ -100,6 +100,7 @@ if ((${#auth_files[@]} > 0)); then for auth_file in "${auth_files[@]}"; do [ -n "$auth_file" ] || continue if [ -f "/host-auth-files/$auth_file" ]; then + mkdir -p "$(dirname "$HOME/$auth_file")" cp "/host-auth-files/$auth_file" "$HOME/$auth_file" chmod u+rw "$HOME/$auth_file" || true fi diff --git a/test/test-env.test.ts b/test/test-env.test.ts index d22e11befc2..5e8c30d8067 100644 --- a/test/test-env.test.ts +++ b/test/test-env.test.ts @@ -69,6 +69,16 @@ describe("installTestEnv", () => { custom: { baseUrl: "https://example.test/v1" }, }, }, + channels: { + telegram: { + streamMode: "block", + chunkMode: "newline", + blockStreaming: true, + draftChunk: { + minChars: 120, + }, + }, + }, }`, ); writeFile(path.join(realHome, ".openclaw", "credentials", "token.txt"), "secret\n"); @@ -101,12 +111,28 @@ describe("installTestEnv", () => { list?: Array>; }; models?: { providers?: Record }; + channels?: { + telegram?: { + streaming?: { + mode?: string; + chunkMode?: string; + block?: { enabled?: boolean }; + preview?: { chunk?: { minChars?: number } }; + }; + }; + }; }; expect(copiedConfig.models?.providers?.custom).toEqual({ baseUrl: "https://example.test/v1" }); expect(copiedConfig.agents?.defaults?.workspace).toBeUndefined(); expect(copiedConfig.agents?.defaults?.agentDir).toBeUndefined(); expect(copiedConfig.agents?.list?.[0]?.workspace).toBeUndefined(); expect(copiedConfig.agents?.list?.[0]?.agentDir).toBeUndefined(); + expect(copiedConfig.channels?.telegram?.streaming).toMatchObject({ + mode: "block", + chunkMode: "newline", + block: { enabled: true }, + preview: { chunk: { minChars: 120 } }, + }); expect( fs.existsSync(path.join(testEnv.tempHome, ".openclaw", "credentials", "token.txt")), diff --git a/test/test-env.ts b/test/test-env.ts index 0302c4de851..ec0eba4d318 100644 --- a/test/test-env.ts +++ b/test/test-env.ts @@ -3,6 +3,7 @@ import fs from "node:fs"; import os from "node:os"; import path from "node:path"; import JSON5 from "json5"; +import { migrateLegacyConfig } from "../src/commands/doctor/shared/legacy-config-migrate.js"; type RestoreEntry = { key: string; value: string | undefined }; @@ -276,7 +277,8 @@ function sanitizeLiveConfig(raw: string): string { }); } - return `${JSON.stringify(parsed, null, 2)}\n`; + const migrated = migrateLegacyConfig(parsed); + return `${JSON.stringify(migrated.config ?? parsed, null, 2)}\n`; } catch { return raw; }