mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-17 15:34:54 +00:00
`codex-cli/` published `@hanzo/dev`, so the directory carrying our npm package was named after someone else's product. It is `npm/`. `patches/codex.json` is `patches/upstream.json` — it anchors edits against upstream, and the file should say so rather than name one of them. Deleted outright: `justfile`, whose first line was `set working-directory := "codex-rs"` for a directory this repository has never had; `announcement_tip.toml`, an example file for a TUI we do not ship; and `.codex/` and `.code/`, which held upstream's own process skills — babysit-pr, codex-bug, pushing-ci-changes — that were never ours. Three branding leaks a real run turned up, none of which the help text showed: `dev exec` announced "OpenAI Codex v0.7.0-dev.1" as its first line, the status card was missed when the session header was anchored, and both bubblewrap warnings said "Codex's Linux sandbox". README: say what ships. It claimed the agent drives a browser, which is the port that has not landed, and showed a screenshot of it doing so. Both are gone until the bridge is back. The model count is "hundreds" — `/v1/models` answers 458 today, an earlier line here said "over 500", and hanzo.ai derives its own count precisely because typed ones drift. Document the npm install beside the curl one; both give the same build.
88 lines
2.6 KiB
Bash
Executable File
88 lines
2.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
||
|
||
# Install native runtime dependencies for codex-cli.
|
||
#
|
||
# Usage
|
||
# install_native_deps.sh [--workflow-url URL] [DEV_CLI_ROOT]
|
||
#
|
||
# The optional RELEASE_ROOT is the path that contains package.json. Omitting
|
||
# it installs the binaries into the repository's own bin/ folder to support
|
||
# local development.
|
||
|
||
set -euo pipefail
|
||
|
||
# ------------------
|
||
# Parse arguments
|
||
# ------------------
|
||
|
||
DEV_CLI_ROOT=""
|
||
|
||
# Until we start publishing stable GitHub releases, we have to grab the binaries
|
||
# from the GitHub Action that created them. Update the URL below to point to the
|
||
# appropriate workflow run:
|
||
WORKFLOW_URL="" # Optional override; if empty, caller must pass --workflow-url
|
||
|
||
while [[ $# -gt 0 ]]; do
|
||
case "$1" in
|
||
--workflow-url)
|
||
shift || { echo "--workflow-url requires an argument"; exit 1; }
|
||
if [ -n "$1" ]; then
|
||
WORKFLOW_URL="$1"
|
||
fi
|
||
;;
|
||
*)
|
||
if [[ -z "$DEV_CLI_ROOT" ]]; then
|
||
DEV_CLI_ROOT="$1"
|
||
else
|
||
echo "Unexpected argument: $1" >&2
|
||
exit 1
|
||
fi
|
||
;;
|
||
esac
|
||
shift
|
||
done
|
||
|
||
# ----------------------------------------------------------------------------
|
||
# Determine where the binaries should be installed.
|
||
# ----------------------------------------------------------------------------
|
||
|
||
if [ -n "$DEV_CLI_ROOT" ]; then
|
||
# The caller supplied a release root directory.
|
||
BIN_DIR="$DEV_CLI_ROOT/bin"
|
||
else
|
||
# No argument; fall back to the repo’s own bin directory.
|
||
# Resolve the path of this script, then walk up to the repo root.
|
||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||
DEV_CLI_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||
BIN_DIR="$DEV_CLI_ROOT/bin"
|
||
fi
|
||
|
||
# Make sure the destination directory exists.
|
||
mkdir -p "$BIN_DIR"
|
||
|
||
# ----------------------------------------------------------------------------
|
||
# Download and decompress the artifacts from the GitHub Actions workflow.
|
||
# ----------------------------------------------------------------------------
|
||
|
||
WORKFLOW_ID="${WORKFLOW_URL##*/}"
|
||
|
||
ARTIFACTS_DIR="$(mktemp -d)"
|
||
trap 'rm -rf "$ARTIFACTS_DIR"' EXIT
|
||
|
||
# NB: The GitHub CLI `gh` must be installed and authenticated.
|
||
gh run download --dir "$ARTIFACTS_DIR" --repo hanzoai/dev "$WORKFLOW_ID"
|
||
|
||
# Each build job uploads its artifact as `binaries-<target>` containing
|
||
# `dev-<target>[.exe].zst`.
|
||
for target in \
|
||
x86_64-unknown-linux-musl \
|
||
aarch64-unknown-linux-musl \
|
||
x86_64-apple-darwin \
|
||
aarch64-apple-darwin \
|
||
x86_64-pc-windows-msvc.exe
|
||
do
|
||
zstd -d "$ARTIFACTS_DIR/binaries-${target%.exe}/dev-$target.zst" -o "$BIN_DIR/dev-$target"
|
||
done
|
||
|
||
echo "Installed native dependencies into $BIN_DIR"
|