open-standards/joule-code/examples/l3-jouleclaw/Cargo.toml
Transaction Science a6ee726b2f joule-code L3: receipts priced by the fabric — ModelBased, end to end
The fabric arc reaches the standard's receipts. The hybrid
backend wraps every complete() in an attribution-ledger
window: GFLOPs recorded per fabric member that ACTUALLY ran
each matmul, priced by the machine's IOReport calibration.
The summed figure rides LlmResponse.energy_joules, and the
L3 stage now grades it correctly per SPEC §6:

  backend reports a figure  →  estimated_uj, ModelBased
                               (a calibrated per-operation
                               model — precisely what §6
                               defines ModelBased to mean)
  no figure                 →  catalog constant, Estimator
                               (the honest old behavior,
                               unchanged for Echo/llama.cpp)

Live, real checkpoint (Mellum2, fabric ON):

  "The capital of France is" → " Paris.  \nParis is"
  fabric-priced energy: 113.0 J (ModelBased)

A coding-cascade L3 receipt now carries energy from the
silicon that actually executed the call — attributed per
member, priced by a calibration metered on this machine —
instead of a 1.0 J placeholder. The provenance ladder is
exercised end to end: Estimator (catalog) → ModelBased
(fabric ledger × calibration) → HwShunt (a meter wrapping
the whole call, as the joule-fix harness already does).

Test updated to the new contract: Some(>0) with the fabric
on, honest None without — both branches printed.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-06-11 12:50:15 -04:00

26 lines
1.5 KiB
TOML

# Standalone example (own workspace) — does NOT join joule-code-rs's workspace, so
# the standard's lib stays free of a JouleClaw dependency. This is a *consumer
# binding*: how to wire JouleClaw's L3 (Model) tier into the Joule Code cascade.
[workspace]
[package]
name = "l3-jouleclaw-binding"
version = "0.1.0"
edition = "2021"
rust-version = "1.96"
license = "Apache-2.0"
description = "Example binding: JouleClaw's L3 model tier (jouleclaw-llm LlmBackend) as a Joule Code cascade FnStage. Verified model-free via EchoBackend; a real backend (vLLM, or jouleclaw-runtime GGUF) drops into the same slot."
publish = false
[dependencies]
joule-code-schema = { path = "../../joule-code-rs/crates/joule-code-schema" }
joule-code-cargo = { path = "../../joule-code-rs/crates/joule-code-cargo" }
joule-code-receipt = { path = "../../joule-code-rs/crates/joule-code-receipt" }
joule-code-cascade = { path = "../../joule-code-rs/crates/joule-code-cascade" }
jouleclaw-llm = { path = "../../../jouleclaw/jouleclaw-rs/crates/jouleclaw-llm" }
jouleclaw-energy = { path = "../../../jouleclaw/jouleclaw-rs/crates/jouleclaw-energy", features = ["ioreport"] }
# JouleClaw's own from-scratch GGUF tensor runtime (no llama.cpp, no FFI) —
# the in-process L3 backend.
jouleclaw-runtime = { path = "../../../jouleclaw/jouleclaw-rs/crates/jouleclaw-runtime" }
jouleclaw-loader-gguf = { path = "../../../jouleclaw/jouleclaw-rs/crates/jouleclaw-loader-gguf", features = ["rayon", "fabric"] }
serde_json = "1"