mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 09:41:11 +00:00
fix: unblock claude docker live lanes
This commit is contained in:
@@ -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}/
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
;;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<Record<string, unknown>>;
|
||||
};
|
||||
models?: { providers?: Record<string, unknown> };
|
||||
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")),
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user