open-standards/joulehook/joulehook-rs/crates/joulehook-proxy/Cargo.toml
Transaction Science b0ea7eda50 joulehook: the deployable meter — joulehook-proxy (OpenAI-shaped base_url proxy)
The meter seam's deployable form (SPEC §4 Proxy): point a host's model base_url at
joulehook-proxy and every call is capped + sealed. Per request it injects the
configured joule ceiling (inject_ceiling), forwards to the Mesh upstream, and seals
the response's usage.energy as an efficiency/1 receipt (bridge_receipt_default).
tiny_http server + ureq client. Integration-tested against a localhost mock upstream:
the mock echoes the injected ceiling (7mJ) and the proxy seals the efficiency receipt;
an unreachable upstream is a 502, not a panic. Also dedups the meter steward into
joulehook-meter (METER_STEWARD + bridge_receipt_default). 24 tests; clippy-clean.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-04 20:38:32 -04:00

19 lines
565 B
TOML

[package]
name = "joulehook-proxy"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
description = "JouleHook — the meter-seam proxy (joulehook/1 §4): an OpenAI-shaped base_url proxy that injects the joule ceiling and seals each serve's energy as efficiency/1. Point a host's model base_url at it."
[[bin]]
name = "joulehook-proxy"
path = "src/main.rs"
[dependencies]
joulehook-meter = { path = "../joulehook-meter" }
tiny_http = "0.12"
ureq = "2"
serde_json = "1"
hex = "0.4"