The `jcp` demo scripts its agent loop with fixed costs, and built each with Energy::measured(...): every allowed row was debited and sealed as a HwShunt reading of a tool call that never ran, and the receipt line read `allow · 50000 µJ · HwShunt`. No tool runs in the demo, so nothing read those figures. The rows now come from `script()`, each cost Energy::estimator(...) with no measured figure; the figures are unchanged, so the budget still runs out at the last row. The demo says the costs are scripted and sealed as estimates, and the meter line now also prints the probe's own grade (the probe is the demo's one real measurement). jcp/README.md's demo block is updated to the output, with the read-again row it had dropped. Tests: a unit test checks every scripted cost is Estimator with no measured figure and decodes the signed core of the last allow's receipt (energy_provenance "Estimator"); tests/demo.rs runs the built binary and checks the printed receipt line is graded Estimator, never HwShunt. Co-Authored-By: Claude Opus 5.5 <[email protected]>
25 lines
507 B
TOML
25 lines
507 B
TOML
[package]
|
|
name = "jcp-cli"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
rust-version.workspace = true
|
|
|
|
[[bin]]
|
|
name = "jcp"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
jcp-schema = { workspace = true }
|
|
jcp-grant = { workspace = true }
|
|
jcp-runtime = { workspace = true }
|
|
jcp-receipt = { workspace = true }
|
|
jcp-energy = { workspace = true }
|
|
ed25519-dalek = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
serde_json = { workspace = true }
|
|
|
|
[lints]
|
|
workspace = true
|