Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/interplane-mv/blob/main/rust/crates/interplane-crossveil/src/lib.rs # interplane-mv INTERPLANE: open interoperability protocol between AI models and agent runtimes. Models express intent. Runtimes retain authority. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `interplane-mv / rust / crates / interplane-crossveil / src / lib.rs` 42 lines ยท 1695 bytes Raw Blame History 1 //! Crossveil: the authority boundary. A runtime adapter supplies `decide` and `execute`; the 2 //! [`Pipeline`] enforces the CORE.md / CROSSVEIL.md invariants around them and never fabricates, 3 //! caches, upgrades or reuses a decision. 4 use interplane_core::{CapabilityRequest, Catalog, Decision, Exposure, Party, ToolResult}; 5 use serde_json::Value; 6 7 pub mod mock; 8 pub mod pipeline; 9 10 pub use mock::{mock_mapping_table, mock_mapping_table_stale, mock_table_by_name, MockRuntime}; 11 pub use pipeline::{ 12 capability_request_digest, ObservedRecord, PendingApproval, Pipeline, Refusal, TurnOutcome, 13 }; 14 15 /// What the pipeline passes through, untouched, to the runtime callbacks. 16 #[derive(Debug, Clone)] 17 pub struct CallContext { 18 pub trace_id: String, 19 pub message_id: String, 20 pub parent_id: Option, 21 pub model: Party, 22 /// Runtime-local session handle the adapter may attach. 23 pub session: Option, 24 /// What the model could see when it produced this request (0.3 cut P3). Always computed by 25 /// the pipeline from its own input ledger, never read from the model or the envelope. 26 pub exposure: Option, 27 } 28 29 /// The two callbacks that touch a runtime, plus its catalog. 30 pub trait RuntimeAuthority { 31 fn runtime_id(&self) -> &str; 32 /// The runtime's authority decision. Called for every mapped request. 33 fn decide(&mut self, req: &CapabilityRequest, ctx: &CallContext) -> Decision; 34 /// Called only after `decide` returned `authorized` for this exact request. 35 fn execute( 36 &mut self, 37 req: &CapabilityRequest, 38 decision: &Decision, 39 ctx: &CallContext, 40 ) -> ToolResult; 41 fn catalog(&self) -> Catalog; 42 }