JCP stops being only specified and starts being consumed. Three sibling standards now gate their real dispatch through Grants, the deterministic runtime, and sealed JCR-1 receipts — each via a small adapter crate with tests proving the gate: - jouleclaw-jcp: GatedTool wraps any jouleclaw-mcp MeteredTool so every MCP dispatch is decided against a signed delegation chain BEFORE a byte reaches the tool. The tool's stable id is the content-addressed resource (a same-named tool on another server is a different audience), the call's energy estimate is debited pre-dispatch, and every decision seals. Tests: a granted tool dispatches and debits; an ungranted tool named by a poisoned result NEVER runs (panicking stub proves it) and the refusal is sealed evidence; the budget stops a runaway loop at exactly the wall. - sandbox-jcp: JcpGate in front of Host::run_and_seal. The Grant binds to the unit's image BY CONTENT ADDRESS — one flipped image byte is a different audience, denied wrong-resource before the executor is ever invoked. The declared energy ceiling is debited from the chain pre-run (enforce before the side effect; energy never refunds), and a revoked grant goes dark. Two receipts per run: the JCP authorization + the sandbox's metered, attested execution, both JCR-1. - joule-code-jcp: GatedStage wraps any cascade Stage so every tier consultation is decided pre-dispatch — the tier is the action, the source tree the content-addressed resource, the tier's energy class the debit. Cheapest sufficient AND authorized: a grant that doesn't name l4 means the remote-frontier escape hatch never fires even when it would close the request; an exhausted budget stops it with a sealed budget-exceeded deny; receipts aggregate per-tier from evidence. Cross-standard path deps inside the monorepo (../../../../jcp/jcp-rs). Each adapter crate is tested in its own workspace; READMEs updated (jcp gains a "Consumers in this repository" section). Co-Authored-By: Claude Opus 4.8 <[email protected]>
21 lines
704 B
TOML
21 lines
704 B
TOML
[package]
|
|
name = "sandbox-jcp"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
|
|
[dependencies]
|
|
sandbox-schema = { workspace = true }
|
|
sandbox-capability = { workspace = true }
|
|
sandbox-runtime = { 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 }
|
|
thiserror = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
sandbox-meter = { workspace = true }
|
|
sandbox-attest = { workspace = true }
|