Lands the joule-code-jcp bridge crate: Joule Code as a JCP
consumer. The cascade's stop-at-first-close rule picks the
cheapest sufficient tier; this crate adds "…and
authorized" — every stage consultation is decided by the
JCP runtime against a delegation chain BEFORE the stage
runs.
tier as action l0…l4 are the verbs a grant must name;
no l4 action in the chain → no remote
frontier agent, ever, structurally
energy as budget each tier debits its energy class
(honest Estimator provenance, µJ
order-of-magnitude markers per SPEC
§1.1; with_costs() substitutes real
meter figures) from EVERY link of the
chain via decide_chained
denial as fallthrough
a denied tier returns None — the
cascade falls through exactly as if
the tier could not close, because for
this caller it can't
everything seals allow and deny alike seal as chained
JCR-1 receipts (seal_chained), the
full grant-id chain in each
API: JcpGate::new(chain, caller, steward) → gate.wrap(stage)
composes with any Stage; spent() / receipts() expose
the ledger. Time is an input (set_now), not ambient.
Builds and tests green against jcp v0.3 (trust roots,
chained receipts). Fix relative path depth on the jcp-rs
path deps (../../../../jcp from the crate dir — the
original ../../../ resolved inside joule-code/ and the
crate never built).
4 tests; joule-code workspace: 33 green.
Co-Authored-By: Claude Fable 5 <[email protected]>
19 lines
635 B
TOML
19 lines
635 B
TOML
[package]
|
|
name = "joule-code-jcp"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
rust-version.workspace = true
|
|
|
|
[dependencies]
|
|
joule-code-schema = { workspace = true }
|
|
joule-code-cascade = { workspace = true }
|
|
jcp-schema = { path = "../../../../jcp/jcp-rs/crates/jcp-schema" }
|
|
jcp-grant = { path = "../../../../jcp/jcp-rs/crates/jcp-grant" }
|
|
jcp-runtime = { path = "../../../../jcp/jcp-rs/crates/jcp-runtime" }
|
|
jcp-receipt = { path = "../../../../jcp/jcp-rs/crates/jcp-receipt" }
|
|
ed25519-dalek = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
joule-code-receipt = { workspace = true }
|