mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-19 16:39:50 +00:00
fix(security): add --proto '=https' to all curl executable downloads (#2160)
42 curl calls downloading JS bundles, CLI binaries, and gh CLI tarballs were missing --proto '=https', allowing protocol downgrade attacks on hostile networks. PR #2138 fixed bun installer calls; this closes the remaining gap for executable downloads. Fixes applied: - sh/{sprite,aws,gcp,hetzner,daytona,local}/{claude,codex,openclaw,opencode,kilocode,hermes,zeroclaw}.sh (42 files) - sh/cli/install.sh (cli.js download) - sh/shared/github-auth.sh (keyring, API, tarball downloads) Agent: security-auditor Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
251ddf2967
commit
1097f055c3
45 changed files with 47 additions and 47 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@openrouter/spawn",
|
||||
"version": "0.12.12",
|
||||
"version": "0.12.13",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"spawn": "cli.js"
|
||||
|
|
|
|||
|
|
@ -28,6 +28,6 @@ fi
|
|||
# Remote — download and run compiled TypeScript bundle
|
||||
AWS_JS=$(mktemp)
|
||||
trap 'rm -f "$AWS_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/aws-latest/aws.js" -o "$AWS_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/aws-latest/aws.js" -o "$AWS_JS" \
|
||||
|| { printf '\033[0;31mFailed to download aws.js\033[0m\n' >&2; exit 1; }
|
||||
exec bun run "$AWS_JS" claude "$@"
|
||||
|
|
|
|||
|
|
@ -28,6 +28,6 @@ fi
|
|||
# Remote — download and run compiled TypeScript bundle
|
||||
AWS_JS=$(mktemp)
|
||||
trap 'rm -f "$AWS_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/aws-latest/aws.js" -o "$AWS_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/aws-latest/aws.js" -o "$AWS_JS" \
|
||||
|| { printf '\033[0;31mFailed to download aws.js\033[0m\n' >&2; exit 1; }
|
||||
exec bun run "$AWS_JS" codex "$@"
|
||||
|
|
|
|||
|
|
@ -28,6 +28,6 @@ fi
|
|||
# Remote — download and run compiled TypeScript bundle
|
||||
AWS_JS=$(mktemp)
|
||||
trap 'rm -f "$AWS_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/aws-latest/aws.js" -o "$AWS_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/aws-latest/aws.js" -o "$AWS_JS" \
|
||||
|| { printf '\033[0;31mFailed to download aws.js\033[0m\n' >&2; exit 1; }
|
||||
exec bun run "$AWS_JS" hermes "$@"
|
||||
|
|
|
|||
|
|
@ -28,6 +28,6 @@ fi
|
|||
# Remote — download and run compiled TypeScript bundle
|
||||
AWS_JS=$(mktemp)
|
||||
trap 'rm -f "$AWS_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/aws-latest/aws.js" -o "$AWS_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/aws-latest/aws.js" -o "$AWS_JS" \
|
||||
|| { printf '\033[0;31mFailed to download aws.js\033[0m\n' >&2; exit 1; }
|
||||
exec bun run "$AWS_JS" kilocode "$@"
|
||||
|
|
|
|||
|
|
@ -28,6 +28,6 @@ fi
|
|||
# Remote — download and run compiled TypeScript bundle
|
||||
AWS_JS=$(mktemp)
|
||||
trap 'rm -f "$AWS_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/aws-latest/aws.js" -o "$AWS_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/aws-latest/aws.js" -o "$AWS_JS" \
|
||||
|| { printf '\033[0;31mFailed to download aws.js\033[0m\n' >&2; exit 1; }
|
||||
exec bun run "$AWS_JS" openclaw "$@"
|
||||
|
|
|
|||
|
|
@ -28,6 +28,6 @@ fi
|
|||
# Remote — download and run compiled TypeScript bundle
|
||||
AWS_JS=$(mktemp)
|
||||
trap 'rm -f "$AWS_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/aws-latest/aws.js" -o "$AWS_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/aws-latest/aws.js" -o "$AWS_JS" \
|
||||
|| { printf '\033[0;31mFailed to download aws.js\033[0m\n' >&2; exit 1; }
|
||||
exec bun run "$AWS_JS" opencode "$@"
|
||||
|
|
|
|||
|
|
@ -28,6 +28,6 @@ fi
|
|||
# Remote — download and run compiled TypeScript bundle
|
||||
AWS_JS=$(mktemp)
|
||||
trap 'rm -f "$AWS_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/aws-latest/aws.js" -o "$AWS_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/aws-latest/aws.js" -o "$AWS_JS" \
|
||||
|| { printf '\033[0;31mFailed to download aws.js\033[0m\n' >&2; exit 1; }
|
||||
exec bun run "$AWS_JS" zeroclaw "$@"
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ build_and_install() {
|
|||
trap 'rm -rf "${tmpdir}"' EXIT
|
||||
|
||||
log_step "Downloading pre-built CLI binary..."
|
||||
curl -fsSL "https://github.com/${SPAWN_REPO}/releases/download/cli-latest/cli.js" -o "${tmpdir}/cli.js"
|
||||
curl -fsSL --proto '=https' "https://github.com/${SPAWN_REPO}/releases/download/cli-latest/cli.js" -o "${tmpdir}/cli.js"
|
||||
if [ ! -s "${tmpdir}/cli.js" ]; then
|
||||
log_error "Failed to download pre-built binary"
|
||||
exit 1
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fi
|
|||
# Remote — download bundled daytona.js from GitHub release
|
||||
DAYTONA_JS=$(mktemp)
|
||||
trap 'rm -f "$DAYTONA_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/daytona-latest/daytona.js" -o "$DAYTONA_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/daytona-latest/daytona.js" -o "$DAYTONA_JS" \
|
||||
|| { printf '\033[0;31mFailed to download daytona.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$DAYTONA_JS" claude "$@"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fi
|
|||
# Remote — download bundled daytona.js from GitHub release
|
||||
DAYTONA_JS=$(mktemp)
|
||||
trap 'rm -f "$DAYTONA_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/daytona-latest/daytona.js" -o "$DAYTONA_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/daytona-latest/daytona.js" -o "$DAYTONA_JS" \
|
||||
|| { printf '\033[0;31mFailed to download daytona.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$DAYTONA_JS" codex "$@"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fi
|
|||
# Remote — download bundled daytona.js from GitHub release
|
||||
DAYTONA_JS=$(mktemp)
|
||||
trap 'rm -f "$DAYTONA_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/daytona-latest/daytona.js" -o "$DAYTONA_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/daytona-latest/daytona.js" -o "$DAYTONA_JS" \
|
||||
|| { printf '\033[0;31mFailed to download daytona.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$DAYTONA_JS" hermes "$@"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fi
|
|||
# Remote — download bundled daytona.js from GitHub release
|
||||
DAYTONA_JS=$(mktemp)
|
||||
trap 'rm -f "$DAYTONA_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/daytona-latest/daytona.js" -o "$DAYTONA_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/daytona-latest/daytona.js" -o "$DAYTONA_JS" \
|
||||
|| { printf '\033[0;31mFailed to download daytona.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$DAYTONA_JS" kilocode "$@"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fi
|
|||
# Remote — download bundled daytona.js from GitHub release
|
||||
DAYTONA_JS=$(mktemp)
|
||||
trap 'rm -f "$DAYTONA_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/daytona-latest/daytona.js" -o "$DAYTONA_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/daytona-latest/daytona.js" -o "$DAYTONA_JS" \
|
||||
|| { printf '\033[0;31mFailed to download daytona.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$DAYTONA_JS" openclaw "$@"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fi
|
|||
# Remote — download bundled daytona.js from GitHub release
|
||||
DAYTONA_JS=$(mktemp)
|
||||
trap 'rm -f "$DAYTONA_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/daytona-latest/daytona.js" -o "$DAYTONA_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/daytona-latest/daytona.js" -o "$DAYTONA_JS" \
|
||||
|| { printf '\033[0;31mFailed to download daytona.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$DAYTONA_JS" opencode "$@"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fi
|
|||
# Remote — download bundled daytona.js from GitHub release
|
||||
DAYTONA_JS=$(mktemp)
|
||||
trap 'rm -f "$DAYTONA_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/daytona-latest/daytona.js" -o "$DAYTONA_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/daytona-latest/daytona.js" -o "$DAYTONA_JS" \
|
||||
|| { printf '\033[0;31mFailed to download daytona.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$DAYTONA_JS" zeroclaw "$@"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fi
|
|||
# Remote — download bundled gcp.js from GitHub release
|
||||
GCP_JS=$(mktemp)
|
||||
trap 'rm -f "$GCP_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/gcp-latest/gcp.js" -o "$GCP_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/gcp-latest/gcp.js" -o "$GCP_JS" \
|
||||
|| { printf '\033[0;31mFailed to download gcp.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$GCP_JS" claude "$@"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fi
|
|||
# Remote — download bundled gcp.js from GitHub release
|
||||
GCP_JS=$(mktemp)
|
||||
trap 'rm -f "$GCP_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/gcp-latest/gcp.js" -o "$GCP_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/gcp-latest/gcp.js" -o "$GCP_JS" \
|
||||
|| { printf '\033[0;31mFailed to download gcp.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$GCP_JS" codex "$@"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fi
|
|||
# Remote — download bundled gcp.js from GitHub release
|
||||
GCP_JS=$(mktemp)
|
||||
trap 'rm -f "$GCP_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/gcp-latest/gcp.js" -o "$GCP_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/gcp-latest/gcp.js" -o "$GCP_JS" \
|
||||
|| { printf '\033[0;31mFailed to download gcp.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$GCP_JS" hermes "$@"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fi
|
|||
# Remote — download bundled gcp.js from GitHub release
|
||||
GCP_JS=$(mktemp)
|
||||
trap 'rm -f "$GCP_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/gcp-latest/gcp.js" -o "$GCP_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/gcp-latest/gcp.js" -o "$GCP_JS" \
|
||||
|| { printf '\033[0;31mFailed to download gcp.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$GCP_JS" kilocode "$@"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fi
|
|||
# Remote — download bundled gcp.js from GitHub release
|
||||
GCP_JS=$(mktemp)
|
||||
trap 'rm -f "$GCP_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/gcp-latest/gcp.js" -o "$GCP_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/gcp-latest/gcp.js" -o "$GCP_JS" \
|
||||
|| { printf '\033[0;31mFailed to download gcp.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$GCP_JS" openclaw "$@"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fi
|
|||
# Remote — download bundled gcp.js from GitHub release
|
||||
GCP_JS=$(mktemp)
|
||||
trap 'rm -f "$GCP_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/gcp-latest/gcp.js" -o "$GCP_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/gcp-latest/gcp.js" -o "$GCP_JS" \
|
||||
|| { printf '\033[0;31mFailed to download gcp.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$GCP_JS" opencode "$@"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fi
|
|||
# Remote — download bundled gcp.js from GitHub release
|
||||
GCP_JS=$(mktemp)
|
||||
trap 'rm -f "$GCP_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/gcp-latest/gcp.js" -o "$GCP_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/gcp-latest/gcp.js" -o "$GCP_JS" \
|
||||
|| { printf '\033[0;31mFailed to download gcp.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$GCP_JS" zeroclaw "$@"
|
||||
|
|
|
|||
|
|
@ -23,6 +23,6 @@ fi
|
|||
|
||||
HETZNER_JS=$(mktemp)
|
||||
trap 'rm -f "$HETZNER_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/hetzner-latest/hetzner.js" -o "$HETZNER_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/hetzner-latest/hetzner.js" -o "$HETZNER_JS" \
|
||||
|| { printf '\033[0;31mFailed to download hetzner.js\033[0m\n' >&2; exit 1; }
|
||||
exec bun run "$HETZNER_JS" claude "$@"
|
||||
|
|
|
|||
|
|
@ -23,6 +23,6 @@ fi
|
|||
|
||||
HETZNER_JS=$(mktemp)
|
||||
trap 'rm -f "$HETZNER_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/hetzner-latest/hetzner.js" -o "$HETZNER_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/hetzner-latest/hetzner.js" -o "$HETZNER_JS" \
|
||||
|| { printf '\033[0;31mFailed to download hetzner.js\033[0m\n' >&2; exit 1; }
|
||||
exec bun run "$HETZNER_JS" codex "$@"
|
||||
|
|
|
|||
|
|
@ -28,6 +28,6 @@ fi
|
|||
# Remote — download and run compiled TypeScript bundle
|
||||
HETZNER_JS=$(mktemp)
|
||||
trap 'rm -f "$HETZNER_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/hetzner-latest/hetzner.js" -o "$HETZNER_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/hetzner-latest/hetzner.js" -o "$HETZNER_JS" \
|
||||
|| { printf '\033[0;31mFailed to download hetzner.js\033[0m\n' >&2; exit 1; }
|
||||
exec bun run "$HETZNER_JS" hermes "$@"
|
||||
|
|
|
|||
|
|
@ -23,6 +23,6 @@ fi
|
|||
|
||||
HETZNER_JS=$(mktemp)
|
||||
trap 'rm -f "$HETZNER_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/hetzner-latest/hetzner.js" -o "$HETZNER_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/hetzner-latest/hetzner.js" -o "$HETZNER_JS" \
|
||||
|| { printf '\033[0;31mFailed to download hetzner.js\033[0m\n' >&2; exit 1; }
|
||||
exec bun run "$HETZNER_JS" kilocode "$@"
|
||||
|
|
|
|||
|
|
@ -23,6 +23,6 @@ fi
|
|||
|
||||
HETZNER_JS=$(mktemp)
|
||||
trap 'rm -f "$HETZNER_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/hetzner-latest/hetzner.js" -o "$HETZNER_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/hetzner-latest/hetzner.js" -o "$HETZNER_JS" \
|
||||
|| { printf '\033[0;31mFailed to download hetzner.js\033[0m\n' >&2; exit 1; }
|
||||
exec bun run "$HETZNER_JS" openclaw "$@"
|
||||
|
|
|
|||
|
|
@ -23,6 +23,6 @@ fi
|
|||
|
||||
HETZNER_JS=$(mktemp)
|
||||
trap 'rm -f "$HETZNER_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/hetzner-latest/hetzner.js" -o "$HETZNER_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/hetzner-latest/hetzner.js" -o "$HETZNER_JS" \
|
||||
|| { printf '\033[0;31mFailed to download hetzner.js\033[0m\n' >&2; exit 1; }
|
||||
exec bun run "$HETZNER_JS" opencode "$@"
|
||||
|
|
|
|||
|
|
@ -23,6 +23,6 @@ fi
|
|||
|
||||
HETZNER_JS=$(mktemp)
|
||||
trap 'rm -f "$HETZNER_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/hetzner-latest/hetzner.js" -o "$HETZNER_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/hetzner-latest/hetzner.js" -o "$HETZNER_JS" \
|
||||
|| { printf '\033[0;31mFailed to download hetzner.js\033[0m\n' >&2; exit 1; }
|
||||
exec bun run "$HETZNER_JS" zeroclaw "$@"
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ fi
|
|||
# Remote — download bundled local.js from GitHub release
|
||||
LOCAL_JS=$(mktemp)
|
||||
trap 'rm -f "$LOCAL_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/local-latest/local.js" -o "$LOCAL_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/local-latest/local.js" -o "$LOCAL_JS" \
|
||||
|| { printf '\033[0;31mFailed to download local.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$LOCAL_JS" claude "$@"
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ fi
|
|||
# Remote — download bundled local.js from GitHub release
|
||||
LOCAL_JS=$(mktemp)
|
||||
trap 'rm -f "$LOCAL_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/local-latest/local.js" -o "$LOCAL_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/local-latest/local.js" -o "$LOCAL_JS" \
|
||||
|| { printf '\033[0;31mFailed to download local.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$LOCAL_JS" codex "$@"
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ fi
|
|||
# Remote — download bundled local.js from GitHub release
|
||||
LOCAL_JS=$(mktemp)
|
||||
trap 'rm -f "$LOCAL_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/local-latest/local.js" -o "$LOCAL_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/local-latest/local.js" -o "$LOCAL_JS" \
|
||||
|| { printf '\033[0;31mFailed to download local.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$LOCAL_JS" hermes "$@"
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ fi
|
|||
# Remote — download bundled local.js from GitHub release
|
||||
LOCAL_JS=$(mktemp)
|
||||
trap 'rm -f "$LOCAL_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/local-latest/local.js" -o "$LOCAL_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/local-latest/local.js" -o "$LOCAL_JS" \
|
||||
|| { printf '\033[0;31mFailed to download local.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$LOCAL_JS" kilocode "$@"
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ fi
|
|||
# Remote — download bundled local.js from GitHub release
|
||||
LOCAL_JS=$(mktemp)
|
||||
trap 'rm -f "$LOCAL_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/local-latest/local.js" -o "$LOCAL_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/local-latest/local.js" -o "$LOCAL_JS" \
|
||||
|| { printf '\033[0;31mFailed to download local.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$LOCAL_JS" openclaw "$@"
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ fi
|
|||
# Remote — download bundled local.js from GitHub release
|
||||
LOCAL_JS=$(mktemp)
|
||||
trap 'rm -f "$LOCAL_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/local-latest/local.js" -o "$LOCAL_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/local-latest/local.js" -o "$LOCAL_JS" \
|
||||
|| { printf '\033[0;31mFailed to download local.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$LOCAL_JS" opencode "$@"
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ fi
|
|||
# Remote — download bundled local.js from GitHub release
|
||||
LOCAL_JS=$(mktemp)
|
||||
trap 'rm -f "$LOCAL_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/local-latest/local.js" -o "$LOCAL_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/local-latest/local.js" -o "$LOCAL_JS" \
|
||||
|| { printf '\033[0;31mFailed to download local.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$LOCAL_JS" zeroclaw "$@"
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ _install_gh_apt() {
|
|||
if [[ "$(id -u)" -ne 0 ]]; then SUDO="sudo"; fi
|
||||
|
||||
log_info "Adding GitHub CLI APT repository..."
|
||||
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
|
||||
curl -fsSL --proto '=https' https://cli.github.com/packages/githubcli-archive-keyring.gpg \
|
||||
| ${SUDO} dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg 2>/dev/null
|
||||
${SUDO} chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
|
||||
printf 'deb [arch=%s signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main\n' \
|
||||
|
|
@ -130,7 +130,7 @@ _detect_gh_platform() {
|
|||
# Fetch the latest gh release version string from GitHub API
|
||||
_fetch_gh_latest_version() {
|
||||
local latest_version
|
||||
latest_version=$(curl -fsSL "https://api.github.com/repos/cli/cli/releases/latest" \
|
||||
latest_version=$(curl -fsSL --proto '=https' "https://api.github.com/repos/cli/cli/releases/latest" \
|
||||
| grep '"tag_name"' | sed 's/.*"v\([^"]*\)".*/\1/') || {
|
||||
log_error "Failed to fetch latest gh release version"
|
||||
return 1
|
||||
|
|
@ -156,7 +156,7 @@ _download_and_install_gh() {
|
|||
local tmpdir
|
||||
tmpdir=$(mktemp -d)
|
||||
|
||||
curl -fsSL "${url}" -o "${tmpdir}/${tarball}" || {
|
||||
curl -fsSL --proto '=https' "${url}" -o "${tmpdir}/${tarball}" || {
|
||||
log_error "Failed to download ${url}"
|
||||
rm -rf "${tmpdir}"
|
||||
return 1
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fi
|
|||
# Remote — download bundled sprite.js from GitHub release
|
||||
SPRITE_JS=$(mktemp)
|
||||
trap 'rm -f "$SPRITE_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/sprite-latest/sprite.js" -o "$SPRITE_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/sprite-latest/sprite.js" -o "$SPRITE_JS" \
|
||||
|| { printf '\033[0;31mFailed to download sprite.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$SPRITE_JS" claude "$@"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fi
|
|||
# Remote — download bundled sprite.js from GitHub release
|
||||
SPRITE_JS=$(mktemp)
|
||||
trap 'rm -f "$SPRITE_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/sprite-latest/sprite.js" -o "$SPRITE_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/sprite-latest/sprite.js" -o "$SPRITE_JS" \
|
||||
|| { printf '\033[0;31mFailed to download sprite.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$SPRITE_JS" codex "$@"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fi
|
|||
# Remote — download bundled sprite.js from GitHub release
|
||||
SPRITE_JS=$(mktemp)
|
||||
trap 'rm -f "$SPRITE_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/sprite-latest/sprite.js" -o "$SPRITE_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/sprite-latest/sprite.js" -o "$SPRITE_JS" \
|
||||
|| { printf '\033[0;31mFailed to download sprite.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$SPRITE_JS" hermes "$@"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fi
|
|||
# Remote — download bundled sprite.js from GitHub release
|
||||
SPRITE_JS=$(mktemp)
|
||||
trap 'rm -f "$SPRITE_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/sprite-latest/sprite.js" -o "$SPRITE_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/sprite-latest/sprite.js" -o "$SPRITE_JS" \
|
||||
|| { printf '\033[0;31mFailed to download sprite.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$SPRITE_JS" kilocode "$@"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fi
|
|||
# Remote — download bundled sprite.js from GitHub release
|
||||
SPRITE_JS=$(mktemp)
|
||||
trap 'rm -f "$SPRITE_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/sprite-latest/sprite.js" -o "$SPRITE_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/sprite-latest/sprite.js" -o "$SPRITE_JS" \
|
||||
|| { printf '\033[0;31mFailed to download sprite.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$SPRITE_JS" openclaw "$@"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fi
|
|||
# Remote — download bundled sprite.js from GitHub release
|
||||
SPRITE_JS=$(mktemp)
|
||||
trap 'rm -f "$SPRITE_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/sprite-latest/sprite.js" -o "$SPRITE_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/sprite-latest/sprite.js" -o "$SPRITE_JS" \
|
||||
|| { printf '\033[0;31mFailed to download sprite.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$SPRITE_JS" opencode "$@"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fi
|
|||
# Remote — download bundled sprite.js from GitHub release
|
||||
SPRITE_JS=$(mktemp)
|
||||
trap 'rm -f "$SPRITE_JS"' EXIT
|
||||
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/sprite-latest/sprite.js" -o "$SPRITE_JS" \
|
||||
curl -fsSL --proto '=https' "https://github.com/OpenRouterTeam/spawn/releases/download/sprite-latest/sprite.js" -o "$SPRITE_JS" \
|
||||
|| { printf '\033[0;31mFailed to download sprite.js\033[0m\n' >&2; exit 1; }
|
||||
|
||||
exec bun run "$SPRITE_JS" zeroclaw "$@"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue