mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-17 15:34:54 +00:00
Branding. The reported "OpenAI Codex" was not a banner — the TUI banner has said "Welcome to Code" all along. It was the model describing itself. Every request carries BASE_INSTRUCTIONS, and `zen5-coder` matches none of the OpenAI slug prefixes in find_family_for_model, so it lands on derive_default_model_family -> core/prompt.md, whose first line read "You are a coding agent running in the Codex CLI ... led by OpenAI". The agent was told who it was, and it answered honestly. Fixed the harness identity in all eight prompts (keeping each model's own identity: "based on GPT-5" stays, the harness around it becomes Hanzo Dev), the per-turn header, approval and model pickers, the login success page, MCP tool titles and approval prompts on both client and server sides, seatbelt policy header, cloud copy, two stale User-Agents, and the CLI hints that named the wrong binary. Golden JSON fixtures moved with the code they assert. Deliberately NOT changed, because they are wire and not text: `OPENAI_*` and `CODEX_*` env vars, the `codex`/`codex-reply` MCP tool names and the `code-mcp-server` server name (hosts key allowlists off them), `codex.*` OTEL event names, the `openai` provider id, model slugs, `~/.code` on disk, and the `https://api.openai.com/auth` JWT claim namespace. Control. `cli/src/proto.rs` was a complete bidirectional control plane — Submission JSON lines in, Event JSON lines out, the whole `Op` set including QueueUserInput — exported from lib.rs with no subcommand to reach it. Wired it up as `dev proto`. That is the difference between interrupting a turn and steering one: `app-server`'s sendUserMessage hardcodes Op::UserInput, which calls sess.abort() and restarts the turn. $ printf '%s\n' '{"id":"s1","op":{"type":"interrupt"}}' \ '{"id":"s2","op":{"type":"shutdown"}}' | dev proto {"id":"","event_seq":0,"msg":{"type":"session_configured", "session_id":"4d82071e-...","model":"zen5-coder",...}} {"id":"s2","event_seq":1,"msg":{"type":"shutdown_complete"}} Also: upstream-merge.yml polled openai/codex every 30 minutes. That is the wrong upstream (codex-rs reaches us through just-every) and a cron cannot work against a disjoint history anyway — it needs a hand-supplied merge base. Retargeted to just-every/code and made it manual, pointing at the procedure in LLM.md. Purged @just-every/code from the release and recovery pipelines, which would otherwise have published our binaries under their scope. Co-authored-by: Hanzo Dev <[email protected]>
53 lines
1.4 KiB
Nix
53 lines
1.4 KiB
Nix
{ pkgs, monorep-deps ? [], ... }:
|
|
let
|
|
env = {
|
|
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig:$PKG_CONFIG_PATH";
|
|
};
|
|
in
|
|
rec {
|
|
package = pkgs.rustPlatform.buildRustPackage {
|
|
inherit env;
|
|
pname = "code-rs";
|
|
version = "0.1.0";
|
|
cargoLock = {
|
|
lockFile = ./Cargo.lock;
|
|
outputHashes = {
|
|
"mcp-types-0.0.0" = "sha256-BGpEuNXky7neVIQQHqyqRjoa/wemfp6zj+usJlkRN+g=";
|
|
"ratatui-0.29.0" = "sha256-HBvT5c8GsiCxMffNjJGLmHnvG77A6cqEL+1ARurBXho=";
|
|
};
|
|
};
|
|
|
|
doCheck = false;
|
|
# Cargo.toml depends on ../codex-rs, so point the builder at the
|
|
# repository root and then cd back into this package's directory.
|
|
src = ../.;
|
|
sourceRoot = "${baseNameOf ../.}/${baseNameOf ./.}";
|
|
nativeBuildInputs = with pkgs; [
|
|
pkg-config
|
|
openssl
|
|
];
|
|
meta = with pkgs.lib; {
|
|
description = "Hanzo Dev — the Hanzo coding agent (Rust implementation)";
|
|
license = licenses.asl20;
|
|
homepage = "https://github.com/hanzoai/dev";
|
|
};
|
|
};
|
|
devShell = pkgs.mkShell {
|
|
inherit env;
|
|
name = "code-rs-dev";
|
|
packages = monorep-deps ++ [
|
|
pkgs.cargo
|
|
package
|
|
];
|
|
shellHook = ''
|
|
echo "Entering development shell for code-rs"
|
|
alias codex="cd ${package.src}/tui; cargo run; cd -"
|
|
${pkgs.rustPlatform.cargoSetupHook}
|
|
'';
|
|
};
|
|
app = {
|
|
type = "app";
|
|
program = "${package}/bin/codex";
|
|
};
|
|
}
|