67 Commits
Author SHA1 Message Date
zeekayandHanzo Dev 6c7c3d3af4 release: one job on the Mac runner ships all five targets
The GitHub Actions lane was dropped and nothing replaced it, so v0.6.95 was
tagged and never published; npm and every installer still hand out 0.6.94.
The reason given — no runner for four of the five targets — is not true of a
Mac: it builds darwin natively, both linux-musl through cargo-zigbuild and
windows-msvc through cargo-xwin, all verified from this machine. So the
release is .hanzo/workflows/release.yml on the dbc-metal host runner, one
job, every push to main: build, GitHub Release + forge release, npm, Homebrew,
then the bump commit and tag. hanzo_identity guards the new file.

Two things found while proving it end to end:

- `dev login` on the Hanzo path died on a Cloudflare 502 page mid-poll —
  "unexpected token response: <!DOCTYPE html>". A body that is not an OAuth
  error is the edge, not the issuer; keep polling and let the device code's
  lifetime end it.
- The troubleshooting link in agent_tool still pointed at just-every/code.

Merges the forge's 0faa6fe so both remotes share one history; the blob-size
gate it ported into hanzo.yml stays.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-16 14:51:31 -07:00
zeekay eb49cac620 name the env after the product, and the key after the stack it opens
457 sites carried an upstream prefix into every surface a user reaches — shell
exports, docs, CI, the SDK. CODEX_ is not our name and it was never going to
stop arriving on its own: it is what upstream writes, and every sync brings more.

Two namespaces, because they answer different questions.

  DEV_*            the app's own configuration — DEV_HOME, DEV_PROFILE, the rest
  HANZO_API_KEY    a credential for the Hanzo stack, which is not app config

CODEX_API_KEY held the literal string "CODEX_API_KEY", so the rename moves the
value and not just the constant. It becomes HANZO_API_KEY, which is what
create_hanzo_provider already reads through HANZO_MACHINE_ENV_KEYS — one name
for one credential instead of two spellings of it.

vendor/ is untouched, which is the point of vendor/: upstream code keeps
upstream names, and the boundary is a path rather than a habit.
2026-08-08 09:14:56 -07:00
zeekay e45a1532a5 follow the vendored tree to its new path
The move to vendor/ left four references behind. check-codex-path-deps.sh
hard-failed every build ("Expected both code-rs/ and codex-rs/"), and the
auto-review scope excluded a prefix that now matches nothing — so all 5,624
vendored files were eligible for review context. That exclusion is vendor/
now, which covers whatever else we vendor later.
2026-08-07 21:52:03 -07:00
zeekay dc17798598 drop the vendored installer that installs someone else's binary
scripts/install/{install.sh,install.ps1,test_install_sh.py} arrived with the
v0.6.169 merge and nothing in this repo references them. install.sh fetches
releases.openai.com/codex, writes ~/.local/bin/codex, and uninstalls via
@openai/codex — an install path under our name that delivers a different
product.

The installer we actually publish lives in hanzoai/cli and consumes the
canonical <bin>-<os>-<arch>.tar.gz assets release.yml builds. Nothing here
fed it.
2026-08-07 21:01:59 -07:00
zeekayandHanzo Dev 6cbbea2d03 merge: just-every/code v0.6.169 (e4fe007150) — keep Hanzo identity
Our history is just-every's with author emails rewritten, so the graphs are
disjoint and git finds no merge base. Supplied one by hand: d1f1f51a41, the
just-every commit matching our Oct-2025 fork point (22 files apart). 9618
upstream commits, 7004 files, +1.81M/-159k, 37 conflicts.

Resolution:
- Upstream code where our side was the Oct-2025 prototype of a feature they
  have since reimplemented 3-5x larger (agent_runs, browser_sessions,
  history_cell/{agent,browser}, the vt100 harness and its snapshots).
- Upstream's config.rs module split (builder/defaults/sources/validation)
  kept; zen5-coder and the provider-follows-model rule re-applied on top.
- Ours where the file IS the identity: README, package.json, postinstall,
  release notes pipeline, integration-zed.
- Hybrid where upstream improved a file we had branded: updates.rs (their
  release-repo migration, our hanzoai/dev), release.yml (their fail-fast npm
  auth check, our package name), chatwidget.rs (their turn handling, our
  HANZO_USER_KEY hint), exec human output (their 237 lines, our banner).

Superseded and dropped deliberately: our resume_command_name() coder-alias
hack — upstream's derive_resume_command_name() reads the invocation basename
generically, which yields "dev" for us.

LLM.md now records the real topology and the sync point; AGENTS.md and
CLAUDE.md are symlinks to it again. Single parent on purpose: adopting
jecode/main as a second parent would re-import 13,742 commits carrying the
upstream author emails a prior rewrite deliberately removed.

Version 0.2.188 -> 0.2.189.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-05 23:09:12 -07:00
zeekayandHanzo Dev d3d1dfa1d3 dev is ours: the Hanzo Cloud by default, a binary named dev, our namespaces
hanzoai/dev went public defaulting to someone else's cloud. Four things were
wrong, and all four now have a test that fails if they come back.

DEFAULT PROVIDER AND MODEL. built_in_model_providers() gains `hanzo` -- the
Hanzo Cloud at api.hanzo.ai/v1, Responses wire, bearer from HANZO_USER_KEY --
and it is the default. The default model is zen5-coder. This was not cosmetic:
the old default is not in the gateway catalog, so it 400s against our own
cloud. Measured, not assumed:

  POST api.hanzo.ai/v1/responses model=gpt-5-codex -> 400 "model is not
      available. Use GET /v1/models to list available models"
  POST api.hanzo.ai/v1/responses model=zen5-coder  -> 200, clean output

Our own CLI already documented the bug from the other side -- dev.rs says
"Name the model too -- codex's built-in default is not in the gateway catalog
and would 400" and passes `-c model=` on every launch to work around it. It
also asserts that on the native gateway NO model_provider override is needed,
which is only true once `hanzo` is the built-in default. It is now.

zen5-coder over enso because dev is a coding agent and because enso returns
system-prompt text on the Responses wire that dev actually speaks; zen5-coder
returns the answer. Model ids were read from GET /v1/models with a bearer, not
guessed. Other providers stay fully configurable -- this is the default, not
the only choice.

THE LOGIN COMMAND. Messages said `code login` / `codex login`. The real command
is `hanzo auth login` (`hanzo login` is not a command -- it is swallowed as an
AI task). It now lives once, as auth::LOGIN_COMMAND, so no message can drift
into naming a command that does not exist. References to this binary's own
subcommand became `dev login`.

A BINARY NAMED dev. HEAD built `code` and `codex` and nothing named `dev`, so a
release cut today would ship no `dev` -- and `hanzo code` launches a bare `dev`
off PATH, so every new install would break. `dev` is now the canonical bin,
declared first; `code` remains as an alias to the same program, never the
reverse. The CLI identifies as `dev` / "Hanzo Dev", not "OpenAI Codex".

OUR NAMESPACES. The pipeline published to @just-every/* on npm and pushed
formulae to just-every/homebrew-tap. Both of ours already exist and are already
populated at v0.6.91 -- @hanzo/dev plus all five @hanzo/dev-<target> packages,
and hanzoai/homebrew-tap's Formula/hanzo-dev.rb, which installs `dev` and
expects assets named dev-<triple>. Nothing here is squatted; this is our own
distribution, reclaimed. Assets are renamed to match the formula.

Two live supply-chain bugs fell out of that, both worse than a naming problem:
postinstall.js (runs on every npm install) and the tui auto-updater fetched
from a third party's releases -- the updater also told our users to
`npm install -g @just-every/code@latest`. Worse, a shadowed `isWSL` const put
the two fast paths in the temporal dead zone, so their catch blocks swallowed
the error and EVERY install fell through to that download: the five published
platform packages were never used, and the third-party fetch was not an edge
case but the only path that ran. Fixed and exercised in a sandbox across all
three paths. codex-cli/.pack/ -- a committed `npm pack` artifact CI
regenerates, and the reason the bad URL had two homes -- is now untracked.

DURABILITY, because upstream-merge.yml merges openai/codex every 30 minutes.
A one-time edit to a default is a suggestion that survives until the next
merge. Two mechanisms:

  - .github/merge-policy.json prefer_ours_globs listed only codex-rs/** while
    the workspace that SHIPS is code-rs/**, so it protected nothing that
    ships. The identity-bearing code-rs files are now listed.
  - code-rs/core/tests/hanzo_identity.rs asserts all four properties -- the
    provider, a Zen default, a bin named dev, and no third-party publish
    target. Upstream has no such file, so a merge cannot conflict with it or
    carry the guard away with the thing it guards. Policy can be edited;
    a red build cannot be ignored.

The gate is not decorative: it failed on the un-retargeted pipeline
("release.yml still references `@just-every/`") and went green only when the
pipeline was actually fixed.

Verified: cargo build --bin dev clean; hanzo_identity 4/4; code-core lib
332 passed, 1 failed -- git_info::test_collect_git_info_with_remote, which
fails identically on a clean origin/main checkout here because this machine
has a global [email protected]:.insteadof rewrite. Pre-existing and
environmental, not from this change.

  $ dev exec "say OK"        # fresh profile, no config
  Hanzo Dev v0.0.0
  model: zen5-coder
  provider: hanzo

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-01 14:05:00 -07:00
James Peter 6b62985933 fix(release): ensure release notes header matches tag; add guard check. Fixes #326 2025-10-06 20:23:44 +10:00
James Peter e53db0d243 ci(release): reuse dev-fast build for tests and cleanup target 2025-10-06 18:14:50 +10:00
James Peter ab3d651a23 test: run nextest in release and harden smokes 2025-10-06 16:26:26 +10:00
James Peter a1965499d3 fix(ci-tests): call --tests for migrated crates 2025-10-06 10:09:39 +10:00
James Peter 536c1aec8a chore(upstream): strip code branding in docs during diff 2025-10-06 09:07:04 +10:00
James Peter 5f74f7ca81 chore(upstream): drop .DS_Store noise in diff-crates 2025-10-06 09:05:14 +10:00
James Peter bc744fad6f chore(upstream): ignore code prefix in diff crate comparisons 2025-10-06 09:01:17 +10:00
James Peter d5a124fd3a chore(upstream): normalize crate rename noise in diff-crates 2025-10-06 08:59:57 +10:00
James Peter 0089b863d8 fix(workflows): restore release and point to code-rs 2025-10-06 08:54:53 +10:00
James Peter f2f0a07b38 docs: reset roadmap and add maintenance guides 2025-10-05 20:48:06 +10:00
Code Snapshot 337213efa0 code snapshot 2025-10-05 16:22:02 +10:00
James Peter 224af74fc0 chore(workspace): sync codex tree and finish reset plan 2025-10-05 09:04:09 +10:00
James Peter 05cf8e3924 merge(upstream): add automation prompts and exec docs 2025-10-03 14:26:48 +10:00
James Peter 2b8f6d7f2c chore(ci): defer log fetch until run stops 2025-09-25 13:53:51 +10:00
James Peter 8786068dbb fix(ci): exit wait script on first failed job 2025-09-25 13:49:40 +10:00
just-every-code d3a5508879 merge(upstream): sync with openai/codex main; build + guards OK
- Resolve merge conflict in codex-rs/Cargo.lock by adopting upstream version (outside prefer-ours globs).
- Add RUSTUP_HOME export in scripts/upstream-merge/verify.sh to avoid CI HOME permission issues during cargo check.
- Verified via scripts/upstream-merge/verify.sh: build-fast OK, API check OK, static guards OK, branding clean.
2025-09-24 17:21:07 +00:00
James Peter 73c76dde73 feat(scripts): add failure log dump option
Extend wait-for-gh-run.sh with --failure-logs and fold docs under a How to Git Push section.
2025-09-22 13:31:37 +10:00
James Peter f9c92a7cd1 feat(scripts): add gh run waiter utility
Introduce wait-for-gh-run.sh to poll workflows and document usage in AGENTS.md.
2025-09-22 12:53:17 +10:00
James Peter 8b3a076fe8 fix(scripts/test-responses): prefer .code directory 2025-09-19 14:41:25 +10:00
James Peter 35e3f53306 feat: add long run calculator script 2025-09-18 17:15:28 +10:00
Michael BolinandGitHub 280db51126 fix: make GitHub Action publish to npm using trusted publishing (#3431) 2025-09-16 20:33:59 -07:00
James Peter d0e710dc05 ci(upstream-merge): make branding guide-only
- Remove auto-branding worktree + commit and failing guard
- Keep perma-deleted guard; generate VERIFY_branding.log for guidance
- verify.sh: record branding findings as notice, never fail rc; write branding log

Rationale: branding should be a suggestion, not a gate. Code/maintainers can
apply suggested changes explicitly in follow-ups while upstream merge is gated
solely by build + API invariants.
2025-09-15 10:25:20 +10:00
James Peter d359017037 chore(ci/upstream-merge): add branding guard + auto-fix step for TUI/CLI\n\nAdd non-fixing verify step to flag newly introduced user-visible 'Codex' strings\nunder TUI/CLI paths vs origin/<branch>. Add CI job to auto-fix branding in the\nmerge worktree using a safe single-line quoted-string replacement script. 2025-09-13 13:47:39 +10:00
James Peter 8386ed45ba fix(core/client): switch tool type to 'web_search' to avoid 400 Unsupported tool error\n\nThe Responses API rejects 'web_search_preview' with 400 (Unsupported tool type).\nUse the supported 'web_search' tool id. Update test payload generator accordingly. 2025-09-13 13:47:34 +10:00
James Peter 235fe713cd fix(tui/spinner): use active auth preference for custom spinner generation\n\n- Prefer ChatGPT auth when session uses ChatGPT; otherwise use API key\n- Avoids 401 retry loops when background thread created a fresh AuthManager\n- Matches request shape that succeeds in harness (responses=v1, session handling) 2025-09-13 00:33:37 +10:00
James Peter 993b7e419c feat(dev): add scripts/test-responses.js to probe Responses API with ChatGPT/API-key auth\n\n- Reads /auth.json; supports --auth chatgpt|api-key|auto\n- Tests: base, json-schema, tools-web-search, tools-web-search-preview, store\n- Uses Responses v1; non-streaming by default for clear error capture\n- Prints status + x-request-id and error excerpts 2025-09-13 00:02:33 +10:00
James Peter 73db995f1f ci(proxy): set Responses v1 and fail-fast on 5xx\n\n- scripts/openai-proxy.js default RESPONSES_BETA=responses=v1\n- Workflows (issue-code, issue-comment, release, upstream-merge): EXIT_ON_5XX=1 and RESPONSES_BETA=responses=v1\n\nFix: API-key 2nd-call 500s addressed in client; proxy now aligned with production headers 2025-09-12 23:57:18 +10:00
James Peter 169c80f972 chore(proxy): add STRICT_HEADERS and RESPONSES_BETA override; minimal allowlist mode 2025-09-12 23:24:59 +10:00
James Peter fa3518f5f7 chore(proxy): add debug toggles and error-body logging\n\n- Options: DISABLE_KEEPALIVE, FORCE_CLOSE, NO_GZIP, STRIP_SESSION_ID, IDEMPOTENCY_KEY=auto, LOG_ERROR_BODY(+_BYTES)\n- Helps isolate Responses API 500s on subsequent requests 2025-09-12 23:11:31 +10:00
James Peter 6fee6e3e95 ci(proxy): centralize OpenAI proxy to scripts/openai-proxy.js and use across workflows\n\n- Replace inline JS proxies in upstream-merge, issue-code, issue-comment, release\n- Shared behavior: SSE defaults, allowlist, header scrubbing, structured logs\n- Supports PORT/OPENAI_BASE_URL/LOG_DEST/EXIT_ON_5XX via env\n- Keeps existing port assignments (5055/5056/5057/5058)\n 2025-09-12 22:43:05 +10:00
James Peter 17f3ea5f15 chore(dev): add local OpenAI proxy script replicating upstream-merge settings\n\n- scripts/openai-proxy.js mirrors CI proxy (allowlist, SSE defaults, header scrubbing)\n- Usage docs in file header; supports PORT and OPENAI_BASE_URL\n- For local runs: set proxy with real OPENAI_API_KEY; run code with OPENAI_BASE_URL=http://127.0.0.1:<port>/v1 and dummy key 2025-09-12 22:18:08 +10:00
James Peter 4b93553dc5 fix(release/homebrew): use local artifacts for sha256; add retry/backoff on remote fetch; avoid failing on CDN propagation
- Prefer release-assets/* when present to compute sha256 for Homebrew formula.\n- Retry curl with backoff if local file missing; print warnings instead of failing.\n- Keep formula URLs pointing to GitHub Releases; add best-effort HEAD checks.\n- Eliminates 404-induced failures right after uploading assets.
2025-09-12 21:51:05 +10:00
James Peter 32561af3aa fix(core/mcp): honor per-server startup_timeout_ms and make tools/list failures non-fatal; add test MCP server + smoke harness to validate slow/fast scenarios
- Add  to  and parse/write in config
- Apply per-server timeout to  and initial
- Treat per-server  errors as non-fatal; record and skip those servers
- Keep manager creation successful even if some servers time out
- Export  so local smoke tool can exercise it
- Add  (stdio JSON-RPC) and  binary for manual validation
- Update TUI  to set  by default

This resolves GitHub issue #91 where a slow MCP server caused manager creation to time out and fail entirely.
2025-09-12 00:10:56 +10:00
James Peter 95a3b15a22 Merge upstream-merge into main: restore fork features and keep upstream improvements
- Core: keep browser_*/agent_* tool exposure and web_fetch in openai_tools; preserve browser gating + screenshot UX; adapt recorder API
- Protocol: keep TS model changes for protocol-ts; align image shape
- Default client: reinstate UA helpers (USER_AGENT_SUFFIX, get_codex_user_agent_default)
- CI/Docs: carry remote minor updates

Build: ./build-fast.sh clean
2025-09-11 20:55:52 +10:00
James Peter 01368915b8 ci(upstream-merge): expand agent context with fork enhancements + generic guards
- Add docs/fork-enhancements.md (initial list; instruct agent to scan repo for more)
- Inject the overview into the merge prompt
- Generalize verify guards to handler↔tool parity by family (browser_*, agent_*, web_fetch), and keep UA/version check

Prevents silent loss of fork features and gives the agent richer context.
2025-09-11 20:12:17 +10:00
James Peter ced6307578 ci(upstream-merge): preserve fork features via policy + guards
- Policy: prefer ours for core files that contain forked functionality (openai_tools, codex.rs, agent_tool, default_client, protocol models)
- Verify: add static guards to fail if browser/agent tools are dropped or UA/version handling is removed
- Workflow: embed explicit invariants in agent prompt (browser/agent tools, screenshot queue, version UA); reference verify guards

Keeps our model-driven tools and UX intact while still adopting safe upstream changes.
2025-09-11 19:34:32 +10:00
just-every-code c4ce551883 Merge remote-tracking branch 'origin/main' into upstream-merge 2025-09-10 02:39:25 +00:00
James Peter 23366b26c8 ux(spinners): keep grouped order and render group headers as dim title rows; add selector arrow back\n\n- Sort spinners by (group,name) from JSON (grouped or flat)\n- Spinner list shows dim group header rows (non-selectable) between groups\n- Selected row gets '› ' arrow and info-colored preview; others dim\n- Add Node script to upgrade spinners.json to grouped format with labels 2025-09-10 12:11:41 +10:00
James Peter 6a28917b7c chore(spinners): add labels + groups to spinners.json via Node script; keep runtime fallbacks\n\n- Script: scripts/upgrade-spinners.js (idempotent; --dry-run supported)\n- JSON now includes {label, group} for each spinner; easier to curate manually\n- spinner.rs reads label/group (with humanize/derive fallback) 2025-09-10 11:57:20 +10:00
just-every-code aedc0cbd76 merge(upstream): merge upstream/main into upstream-merge with policy
- Keep ours for  (resume picker not reintroduced)
- Initially took upstream for core, but reverted to ours to maintain API compatibility and pass build
- Adopted upstream elsewhere where non-conflicting
- Guard: keep codex-core re-exports and models alias intact
- Verify script: disable sccache outside GHA to allow local verify
- Fix: remove unused imports in theme selection view (warnings-as-failure policy)

Build: scripts/upstream-merge/verify.sh => build_fast=ok api_check=ok
2025-09-10 01:15:15 +00:00
just-every-code c09eeb10f0 Merge remote-tracking branch 'origin/main' into upstream-merge 2025-09-10 01:02:55 +00:00
James Peter 45006c1669 ci(upstream-merge): unify Cargo env/caches; drop duplicate caches; keep sccache
Use one CARGO_HOME/CARGO_TARGET_DIR across agent and verify. Remove redundant actions/cache steps; rely on Swatinem/rust-cache and sccache GHA backend for incremental builds. verify.sh now respects env and uses KEEP_ENV=1 so builds share caches.
2025-09-10 08:17:45 +10:00
just-every-code 9bc4d0359b merge(upstream): incorporate openai/codex@83e90ede9 (by-bucket)
- Prefer ours for TUI/CLI and workflows; theirs for protocol where safe
- Adopt upstream rollout_path in NewConversationResponse; wire through SessionConfiguredEvent
- Add TS derives for protocol types to satisfy upstream TS schema
- Keep core API re-exports and models alias intact

Verification: scripts/upstream-merge/verify.sh passed; ./build-fast.sh clean (no warnings)
2025-09-09 07:34:28 +00:00
just-every-code c6e4412afb merge(upstream): merge upstream/main into upstream-merge (by-bucket)
- Keep ours for TUI/CLI/workflows/docs; purge reintroduced rust-ci.yml
- Prefer theirs in protocol/deps; add serde_bytes + ICU/sys-locale/serde_with
- Keep our core codex/shell to preserve API; fix exec AuthMode import
- Make verify.sh CI-safe (no sccache; local CARGO dirs); check api_surface only

Build: ok; Verify: ok
2025-09-09 01:56:14 +00:00