agent-joule/README.md
David Charlot be2f4956a5 Step 6 (Phase 2): make agent-zed the Joule Code reference consumer
Positions agent-zed as the reference editor for the Joule Code open standard and
wires it to the standard's reference library.

- Joule meter emits a real receipt: agent_zed_panel session_receipt() now builds
  a joule_code_receipt::Receipt from the ACP agent's real token_usage — tier L4
  (the ACP frontier agent is the cascade's Wire tier), Energy::from_tokens →
  Estimator provenance (honest: no hardware energy interface in path yet). The
  panel surfaces it as '⚡ N J this session (est.) · L4' with the provenance and
  tier shown. Same number as before, now sourced from the standard's type, not
  inline constants.
- Depends on joule-code-schema + joule-code-receipt as path deps against the
  sibling open-standards checkout (becomes git/crates.io at publish; the standard
  is the single source of truth, not vendored).
- JOULE_CODE.md: clause-by-clause conformance map (SPEC → module): no-capture
  implemented & verified (PRIVACY_HARDENING), receipt implemented (estimated),
  cascade L4 done / L0-L3 pending (JouleClaw), cargo + CI conformance pending.
- README rewritten to position agent-zed as the Joule Code reference consumer,
  preserving Zed upstream attribution and the GPL/Apache licence posture.

Verified: cargo build --bin agent-zed = 0 errors; clean startup (0 panics) with
the new dependency. joule-code-rs workspace tests + conformance harness already
green (committed in open-standards b838b86).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-02 14:17:09 -04:00

4 KiB

agent-zed — Joule Code reference consumer

agent-zed is the reference editor for Joule Code, the Transaction Science open standard for energy-attributed, federated, no-phone-home agentic coding. It is a hard fork of the Zed editor, stripped of its cloud ties and rebuilt around the Joule Code commitments: drive vendors' own logged-in coding agents over ACP, meter every turn in joules, and never phone home.

It is not a paid coding tool with a token markup. The protocol is owned by no one; agent-zed is one (SOTA) implementation of it.

What it does

  • Federates frontier coding agents. Connect Claude Code, Gemini, or Codex from one panel. agent-zed launches the vendor's own logged-in CLI over the Agent Client Protocol (ACP) — the vendor's client owns its credential; agent-zed never sees or transports a token. These agents are the Joule Code cascade's L4 (Wire) tier.
  • Meters energy. Every session surfaces a real joule-code-receipt::Receipt: ⚡ N J this session (est.) · L4. The number is computed from the agent's actual reported token usage; the est. is honest — it is an Estimator reading because no hardware energy interface is in the path yet (Joule Code SPEC §6). When a metered backend is present, the same surface shows a measured figure.
  • Does not phone home. Sign-in, telemetry, crash upload, and auto-update are removed; a build-level egress backstop makes Zed-host URLs unreachable; the ACP-registry auto-fetch is off. Startup is network-silent — verified by packet capture. See PRIVACY_HARDENING.md.

Joule Code conformance

agent-zed implements the Joule Code v0.1 commitments it is positioned to carry — the no-capture posture (verified) and a live receipt surface — and binds the federation legs as the cascade's L4 tier. The full clause-by-clause map (what is implemented, partial, and pending) is in JOULE_CODE.md. The standard's lean reference library (joule-code-rs) and conformance suite live in the open-standards repository; agent-zed consumes it as a dependency rather than vendoring a copy.

Build and run

cargo build --bin agent-zed
./target/debug/agent-zed

Open the federation panel with ctrl-cmd-a. Connecting an agent requires that vendor's CLI to be installed and logged in (e.g. claude, gemini); registry agents are fetched via npx on first connect. A local OpenAI-compatible model (e.g. vLLM at localhost:8000) is registered as a direct provider — the cascade's L3 (local model) tier.

For building on each platform, the upstream Zed development guides still apply: macOS, Linux, Windows.

Licence

agent-zed inherits Zed's GPL-3.0-or-later licence (LICENSE-GPL; portions Apache-2.0, LICENSE-APACHE). The Joule Code standard it consumes is separately and permissively licensed (Apache-2.0 reference code, CC-BY-4.0 spec text); a GPL reference editor consuming a permissive standard is intentional.

License information for third-party dependencies must be correctly provided for CI to pass; agent-zed retains Zed's cargo-about setup under script/licenses/.

Upstream

agent-zed is a hard fork of zed-industries/zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter, developed by Zed Industries, Inc. All credit for the editor foundation is theirs. agent-zed diverges in one direction: removing the cloud dependencies and building the Joule Code substrate in their place. Upstream documentation, contribution guidance, and community links live at zed.dev and the upstream repository.