Commit Graph
4173 Commits
Author SHA1 Message Date
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
zeekay d3a9c6aa46 docs(readme): name the proximate upstream in the lineage note
This repo forked just-every/code, which forked openai/codex. The note named
only openai/codex, which understates provenance.
2026-08-01 13:28:02 -07:00
zeekayandHanzo Dev 6ba33c7a34 docs: rewrite README as Hanzo Dev
The README was upstream just-every/code text end to end: titled "CODE",
install lines `npx -y @just-every/code` and `npm install -g @just-every/code`
(a third party's package, which resolves and installs), clone URL
just-every/code.git, "Sign in with ChatGPT" as the primary auth, a block
telling readers to install @anthropic-ai/claude-code and @google/gemini-cli,
and an issues link pointing at just-every/code/issues — our support link
sending our users to someone else's tracker.

Replaced with our own copy. Install is `curl -fsSL https://hanzo.sh | sh`
then `hanzo auth login`; the command is `hanzo dev`. Every flag and slash
command listed was read off the shipped binary (hanzo 1.9.18) and the
SlashCommand enum, not copied. Model ids enso / enso-ultra / zen5-coder
verified against catalog.hanzo.ai. Fixed the THEME_CONFIG.md link, which
was a 404 at the repo root — the file lives in docs/.

Does not touch provider or model defaults or the release workflow.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-01 13:26:19 -07:00
zeekayandHanzo Dev 7bd6d859b1 ci(triage): authorize on author association, before the issue is read
The job carries a PAT with org write and feeds attacker-controlled issue text
to an agent. Its only gates were a rate limit and a safety classifier that
reads that same text, so the author decided what the classifier saw. While the
repo was private every actor was an org member and the boundary held
implicitly; publishing removes it. Require OWNER, MEMBER or COLLABORATOR.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-01 12:54:12 -07:00
zeekayandHanzo Dev 4f95fbfd25 ci(release): publish canonical install assets and a checksum per asset
The installer refuses any asset it cannot verify, and resolves exactly one
asset name: <bin>-<os>-<arch>.tar.gz unpacking to a single file named <bin>,
beside <asset>.sha256. Releases carried neither, so a public install could not
complete. Emit both; the Rust-triple assets stay for npm and Homebrew.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-01 12:51:56 -07:00
zeekayandHanzo Dev fd1a6c851f ci: upload-artifact v3 — v4+ is refused by the forge
This workflow runs on git.hanzo.ai, which presents as GHES, and the v4 action
refuses before doing any work:

    GHESNotSupportedError: @actions/artifact v2.0.0+, upload-artifact@v4+ and
    download-artifact@v4+ are not currently supported on GHES.

v4 moved to an artifact API the forge does not implement, so this is a hard
refusal rather than a transient upload error — retrying could never help. The
damaging part is how it presents: the build step passes, the artifact step
fails, and the job reports "failed", so a green build reads as a broken one and
the artifact is silently never produced.

Found on hanzoai/chains, where every VM in a 15-way matrix compiled and then
discarded its binary at this step. Swept the estate for the same pattern.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-31 20:36:41 -07:00
James Peterandzeekay 11fa2750eb fix(tui/auto-drive): block resume while auto-resolve pending 2026-07-31 20:35:36 -07:00
James Peterandzeekay f9b95602b9 fix(tui/tools): group agent and browser tool cells 2026-07-31 20:35:35 -07:00
zooqueenandHanzo Dev 20bf31cfd0 docs: LLM.md is the guide; CLAUDE.md and AGENTS.md are symlinks to it
One file per repo, three names for it. The names exist because different tools
look for different filenames; the CONTENT existing three times is how they drift,
and a drifted agent guide is worse than none — it is confidently wrong.

Where a name already held the only guide, that file BECAME LLM.md byte for byte
rather than being replaced by a copy, so nothing was rewritten or lost.

Repos where two names held genuinely DIFFERENT guides were skipped, not merged:
symlinking there would delete one of them, and choosing which paragraphs survive
is not a sweep's decision.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-29 18:25:13 -07:00
zeekay 56c1dae00f ci: drop the Gitea mirror-sync nudge
Superseded: the Hanzo GitHub App pushes a webhook, so the forge tracks GitHub
without a per-repo workflow. This file called git.hanzo.ai/api/v1/.../mirror-sync
— a Gitea API for a system we no longer drive — and would sit inert in every repo.

One mechanism, in one place, instead of ~350 copies of a cron.
2026-07-27 10:29:44 -07:00
zeekay 5a5522f89e ci: nudge git.hanzo.ai to pull on push
git.hanzo.ai mirrors this repo by PULL on a ~10-minute interval, and arcd runs
CI/CD there — so every push waited out that interval before anything built.
This asks Gitea to pull HEAD immediately.

Latency only: the repo already mirrors via the App webhook, so a missing
HANZO_GIT_TOKEN or a failed curl is non-fatal and never fails the push.
Idempotent (mirror-sync just pulls HEAD) and concurrency-coalesced.
2026-07-27 08:14:28 -07:00
James Peter 30a0a065be Merge branch 'merge/code-branch-20251007-113259' into main 2025-10-08 10:27:28 +10:00
James Peter ba3dd4b8fa fix(history): dedupe assistant messages across finalize/restore 2025-10-07 22:46:12 +10:00
James Peter a6774dbd1f Merge branch 'code-branch-20251007-104544' into main 2025-10-07 21:51:56 +10:00
James Peter 3bc12aeb03 merge local main into code-branch-20251007-104544 before merge 2025-10-07 21:51:56 +10:00
James Peter aa6aaae817 fix(tui/history): clear suppressed exec cells 2025-10-07 21:29:04 +10:00
James Peter 8d138ed9bd UX: match resume hint to coder alias 2025-10-07 21:12:35 +10:00
James Peter 51e8ca93aa Merge branch 'code-branch-20251007-101600' into main 2025-10-07 21:01:44 +10:00
James Peter cd1aa8dc96 fix(tui/resume): avoid duplicate assistant cells on replay 2025-10-07 20:50:32 +10:00
James Peter 382236f47b fix(mcp-server): track acp session_set_model rename 2025-10-07 20:02:39 +10:00
James Peter 2a71c32f13 Merge branch 'code-branch-20251006-101336' into main 2025-10-07 19:44:50 +10:00
James Peter ea441d4833 Merge remote-tracking branch 'origin/main' into code-branch-20251006-101336 2025-10-07 19:44:05 +10:00
James Peter c20501342e test(tui): document vt100 harness and drop flaky regressions 2025-10-07 19:24:36 +10:00
James Peter e9ab41f892 Merge branch 'code-branch-20251006-215207' into main 2025-10-07 13:59:43 +10:00
James Peter abfaf1161c fix(core/rollout): keep agent events untouched when resuming 2025-10-07 13:28:35 +10:00
James Peter a8937812a7 fix(core/rollout): preserve user attachments when resuming 2025-10-07 13:20:26 +10:00
James Peter 48d345db86 test: reintroduce minimal tests 2025-10-07 13:02:00 +10:00
James Peter c494b8c3bb test(config): wrap env var calls in EnvVarGuard drop 2025-10-07 12:40:02 +10:00
James Peter 1e5f7c1391 test(tui/vt100): add explore/reasoning repro harness 2025-10-07 12:31:39 +10:00
James Peter 2e14cf2947 Merge branch 'code-branch-20251006-192649' into main 2025-10-07 07:46:55 +10:00
James Peter d157fff687 merge local main into code-branch-20251006-192649 before merge 2025-10-07 07:46:55 +10:00
James Peter 296a65eba4 Merge branch 'code-branch-20251006-105834' into main 2025-10-07 07:46:37 +10:00
James Peter 6834025471 merge local main into code-branch-20251006-105834 before merge 2025-10-07 07:46:37 +10:00
James Peter 60f0eef0aa merge main into code-branch-20251006-105834 before merge 2025-10-07 07:46:37 +10:00
James Peter 062f0367cd Merge branch 'code-branch-20251006-105837' into main 2025-10-07 07:45:19 +10:00
James Peter e036d07786 merge local main into code-branch-20251006-105837 before merge 2025-10-07 07:45:19 +10:00
James Peter dba58c7edf merge main into code-branch-20251006-105837 before merge 2025-10-07 07:45:19 +10:00
James Peter 77dcba659c fix(tui/resume): bias provider order after restore
- track expected next request ordinal when loading resume snapshots
- add dynamic bias for incoming OrderMeta so resumed turns append
- ensure queued interrupts and exec tools reuse biased order keys
- add regression test confirming resumed output lands at tail

Closes #319
2025-10-07 06:35:44 +10:00
James Peter dd99724659 test(tui/vt100): reproduce bottom clipping regression 2025-10-07 06:07:10 +10:00
James Peter 21a44e68cb fix(tui/spinner): clear footer when agent status stalls
closes #316
2025-10-07 05:43:12 +10:00
James Peter 2459f42769 fix(tui/trust): honor allow_git_writes in trusted workspaces
Closes #314.
2025-10-07 05:22:56 +10:00
James Peter 676a8b6514 Merge branch 'code-branch-20251006-110017' into main 2025-10-07 05:21:30 +10:00
James Peter 21333e8dfe merge local main into code-branch-20251006-110017 before merge 2025-10-07 05:21:30 +10:00
James Peter 6029af9914 merge main into code-branch-20251006-110017 before merge 2025-10-07 05:21:30 +10:00
James Peter b859508134 docs(triage): clarify closing instruction 2025-10-07 04:53:31 +10:00
James Peter 2707dae235 Merge branch 'code-branch-20251006-105956' into main 2025-10-07 04:45:26 +10:00
James Peter 27680a4f7e Merge remote-tracking branch 'origin/main' into code-branch-20251006-105956 2025-10-07 04:44:49 +10:00
James Peter 41532c4e08 test(tui): add vt100 snapshot harness and baselines 2025-10-07 04:26:06 +10:00
James Peter 0806c20a85 fix(tui/composer): support backslash continuation
Fixes #312
2025-10-07 04:18:19 +10:00
James Peter a57ca290e7 fix(core/config): honor legacy AGENTS.md fallback
Fixes #322.
2025-10-07 04:18:18 +10:00