mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:00:43 +00:00
test: add Droid ACP bind Docker lane
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
OPENCLAW_DOCKER_LIVE_AUTH_ALL=(.gemini .minimax)
|
||||
OPENCLAW_DOCKER_LIVE_AUTH_ALL=(.factory .gemini .minimax)
|
||||
OPENCLAW_DOCKER_LIVE_AUTH_FILES_ALL=(
|
||||
.codex/auth.json
|
||||
.codex/config.toml
|
||||
@@ -49,6 +49,9 @@ openclaw_live_should_include_auth_dir_for_provider() {
|
||||
local provider
|
||||
provider="$(openclaw_live_trim "${1:-}")"
|
||||
case "$provider" in
|
||||
droid | factory | factory-droid)
|
||||
printf '%s\n' ".factory"
|
||||
;;
|
||||
gemini | gemini-cli | google-gemini-cli)
|
||||
printf '%s\n' ".gemini"
|
||||
;;
|
||||
|
||||
@@ -25,6 +25,7 @@ const DEFAULT_RESOURCE_LIMITS = {
|
||||
live: 9,
|
||||
"live:claude": 4,
|
||||
"live:codex": 4,
|
||||
"live:droid": 4,
|
||||
"live:gemini": 4,
|
||||
"live:opencode": 4,
|
||||
npm: 10,
|
||||
@@ -67,6 +68,9 @@ function liveProviderResource(provider) {
|
||||
if (provider === "codex-cli" || provider === "codex") {
|
||||
return "live:codex";
|
||||
}
|
||||
if (provider === "droid") {
|
||||
return "live:droid";
|
||||
}
|
||||
if (provider === "google-gemini-cli" || provider === "gemini") {
|
||||
return "live:gemini";
|
||||
}
|
||||
@@ -318,6 +322,17 @@ const exclusiveLanes = [
|
||||
weight: 3,
|
||||
},
|
||||
),
|
||||
liveLane(
|
||||
"live-acp-bind-droid",
|
||||
"OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:live-acp-bind:droid",
|
||||
{
|
||||
cacheKey: "acp-bind-droid",
|
||||
provider: "droid",
|
||||
resources: ["npm"],
|
||||
timeoutMs: LIVE_ACP_TIMEOUT_MS,
|
||||
weight: 3,
|
||||
},
|
||||
),
|
||||
liveLane(
|
||||
"live-acp-bind-gemini",
|
||||
"OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:live-acp-bind:gemini",
|
||||
|
||||
@@ -30,10 +30,11 @@ openclaw_live_acp_bind_resolve_auth_provider() {
|
||||
case "${1:-}" in
|
||||
claude) printf '%s\n' "claude-cli" ;;
|
||||
codex) printf '%s\n' "codex-cli" ;;
|
||||
droid) printf '%s\n' "droid" ;;
|
||||
gemini) printf '%s\n' "google-gemini-cli" ;;
|
||||
opencode) printf '%s\n' "opencode" ;;
|
||||
*)
|
||||
echo "Unsupported OPENCLAW_LIVE_ACP_BIND agent: ${1:-} (expected claude, codex, gemini, or opencode)" >&2
|
||||
echo "Unsupported OPENCLAW_LIVE_ACP_BIND agent: ${1:-} (expected claude, codex, droid, gemini, or opencode)" >&2
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
@@ -43,6 +44,7 @@ openclaw_live_acp_bind_resolve_agent_command() {
|
||||
case "${1:-}" in
|
||||
claude) printf '%s' "${OPENCLAW_LIVE_ACP_BIND_AGENT_COMMAND_CLAUDE:-${OPENCLAW_LIVE_ACP_BIND_AGENT_COMMAND:-}}" ;;
|
||||
codex) printf '%s' "${OPENCLAW_LIVE_ACP_BIND_AGENT_COMMAND_CODEX:-${OPENCLAW_LIVE_ACP_BIND_AGENT_COMMAND:-}}" ;;
|
||||
droid) printf '%s' "${OPENCLAW_LIVE_ACP_BIND_AGENT_COMMAND_DROID:-${OPENCLAW_LIVE_ACP_BIND_AGENT_COMMAND:-}}" ;;
|
||||
gemini) printf '%s' "${OPENCLAW_LIVE_ACP_BIND_AGENT_COMMAND_GEMINI:-${OPENCLAW_LIVE_ACP_BIND_AGENT_COMMAND:-}}" ;;
|
||||
opencode) printf '%s' "${OPENCLAW_LIVE_ACP_BIND_AGENT_COMMAND_OPENCODE:-${OPENCLAW_LIVE_ACP_BIND_AGENT_COMMAND:-}}" ;;
|
||||
*) return 1 ;;
|
||||
@@ -95,9 +97,9 @@ export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
|
||||
export COREPACK_HOME="${COREPACK_HOME:-$XDG_CACHE_HOME/node/corepack}"
|
||||
export NPM_CONFIG_CACHE="${NPM_CONFIG_CACHE:-$XDG_CACHE_HOME/npm}"
|
||||
export npm_config_cache="$NPM_CONFIG_CACHE"
|
||||
mkdir -p "$NPM_CONFIG_PREFIX" "$XDG_CACHE_HOME" "$COREPACK_HOME" "$NPM_CONFIG_CACHE"
|
||||
mkdir -p "$NPM_CONFIG_PREFIX" "$HOME/.local/bin" "$XDG_CACHE_HOME" "$COREPACK_HOME" "$NPM_CONFIG_CACHE"
|
||||
chmod 700 "$XDG_CACHE_HOME" "$COREPACK_HOME" "$NPM_CONFIG_CACHE" || true
|
||||
export PATH="$NPM_CONFIG_PREFIX/bin:$PATH"
|
||||
export PATH="$HOME/.local/bin:$NPM_CONFIG_PREFIX/bin:$PATH"
|
||||
if [ "${OPENCLAW_DOCKER_AUTH_PRESTAGED:-0}" != "1" ]; then
|
||||
IFS=',' read -r -a auth_dirs <<<"${OPENCLAW_DOCKER_AUTH_DIRS_RESOLVED:-}"
|
||||
IFS=',' read -r -a auth_files <<<"${OPENCLAW_DOCKER_AUTH_FILES_RESOLVED:-}"
|
||||
@@ -153,6 +155,17 @@ WRAP
|
||||
npm install -g @openai/codex
|
||||
fi
|
||||
;;
|
||||
droid)
|
||||
if ! command -v droid >/dev/null 2>&1; then
|
||||
curl -fsSL https://app.factory.ai/cli | sh
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
fi
|
||||
droid --version
|
||||
if [ -z "${FACTORY_API_KEY:-}" ]; then
|
||||
echo "Droid Docker ACP bind requires FACTORY_API_KEY; Factory OAuth/keyring auth in ~/.factory is not portable into the container." >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
gemini)
|
||||
mkdir -p "$HOME/.gemini"
|
||||
if [ ! -x "$NPM_CONFIG_PREFIX/bin/gemini" ]; then
|
||||
@@ -197,7 +210,7 @@ for token in "${ACP_AGENT_TOKENS[@]}"; do
|
||||
done
|
||||
|
||||
if ((${#ACP_AGENTS[@]} == 0)); then
|
||||
echo "No ACP bind agents selected. Use OPENCLAW_LIVE_ACP_BIND_AGENTS=claude,codex,gemini,opencode." >&2
|
||||
echo "No ACP bind agents selected. Use OPENCLAW_LIVE_ACP_BIND_AGENTS=claude,codex,droid,gemini,opencode." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -283,6 +296,7 @@ for ACP_AGENT in "${ACP_AGENTS[@]}"; do
|
||||
-e OPENCLAW_LIVE_ACP_BIND_ANTHROPIC_API_KEY_OLD="${ANTHROPIC_API_KEY_OLD:-}" \
|
||||
-e GEMINI_API_KEY \
|
||||
-e GOOGLE_API_KEY \
|
||||
-e FACTORY_API_KEY \
|
||||
-e OPENAI_API_KEY \
|
||||
-e OPENCODE_API_KEY \
|
||||
-e OPENCODE_ZEN_API_KEY \
|
||||
|
||||
Reference in New Issue
Block a user