Public declaration syntax from forge-rs/harness-runtime/src/spine/client.rs Original source SHA-256: 2934108ef2b6c7eca1557d2d7e395946184a1d50f77ec63babac7eeaeaf720c5 Function bodies and constant values are omitted. This is not the complete implementation. Source line 38 pub const MAP_BASE_URL_ENV: &str; Source line 40 pub const MAP_AUTH_TYPE_ENV: &str; Source line 42 pub const MAP_TENANT_ID_ENV: &str; Source line 44 pub const MAP_AGENT_DID_ENV: &str; Source line 46 pub const MAP_SCOPES_ENV: &str; Source line 48 pub const MAP_TIMEOUT_MS_ENV: &str; Source line 50 pub const MAP_MAX_RETRIES_ENV: &str; Source line 56 pub const MAP_BEARER_TOKEN_ENV: &str; Source line 59 pub const MIM_VERSION: &str; Source line 61 pub const DEFAULT_MODULE_VERSION: &str; Source line 63 pub const DEFAULT_TIMEOUT: Duration; Source line 66 pub const DEFAULT_MAX_RETRIES: u32; Source line 69 pub const RETRY_BACKOFF: Duration; Source line 79 #[derive(Clone, Debug)] pub struct MapSpineConfig { /// MAP daemon base URL (no trailing slash). pub base_url: String, /// `x-l1fe-auth-type` header value. pub auth_type: String, /// `x-l1fe-tenant-id` header value; omitted when unset. pub tenant_id: Option, /// Sender DID (`x-l1fe-agent-did` + envelope sender). pub agent_did: String, /// Scopes sent on every dispatch. pub scopes: Vec, /// Per-attempt HTTP timeout. pub timeout: Duration, /// Retries after the first attempt. pub max_retries: u32, /// Protocol module version requested on dispatch. pub module_version: String, /// Optional bearer token for daemons in local development auth mode /// (`MAP_BEARER_TOKEN`). Wire-only; never logged or recorded. pub bearer_token: Option } Source line 104 pub fn from_env() -> Option; Source line 114 pub fn for_base_url(base_url: impl Into) -> Self; Source line 161 #[derive(Debug, Clone, PartialEq, Eq, Serialize)] #[serde(rename_all = "snake_case")] pub enum SpineDispatchStatus { /// The spine answered 2xx with a contract-shaped body. Ok, /// The spine answered a non-success status (a real answer, believed). RemoteStatus, /// The dispatch never reached a MAP answer after retries. Transport, /// A 2xx body broke the response contract. InvalidResponse, } Source line 175 #[derive(Debug, Clone, PartialEq, Serialize)] pub struct SpineDispatchRecord { /// Protocol dispatched to (e.g. `MIND`). pub protocol: String, /// Operation dispatched (e.g. `store_memory`). pub operation: String, /// The HTTP path the envelope was projected onto. pub endpoint: String, /// Local correlation id (the request envelope's id). pub correlation_id: String, /// The daemon's `requestId`, when it returned one. pub remote_request_id: Option, /// The W3C `traceparent` sent on the wire. pub traceparent: String, /// Attempts made (1 + retries). pub attempts: u32, /// Terminal outcome of the dispatch. pub status: SpineDispatchStatus, /// Upstream HTTP status, when the spine answered. pub http_status: Option } Source line 199 #[derive(Debug, Clone)] pub struct SpineDispatch { /// The protocol module's response payload, passed through verbatim. pub output: Value, /// The exact MAP envelope message sent (`{ header, payload }`, /// mirroring the `map.json` schema) — the auditable request record, /// kept for evidence bundles the way ONE's client keeps /// `request_envelope`. pub request_envelope: Value, /// The audit record for this dispatch (also appended to the client's /// dispatch log). pub record: SpineDispatchRecord } Source line 215 #[derive(Clone)] pub struct MapSpineClient { } Source line 223 pub fn new(config: MapSpineConfig) -> Result; Source line 236 pub fn from_env() -> Option; Source line 241 pub fn is_configured() -> bool; Source line 246 pub fn config(&self) -> &MapSpineConfig; Source line 252 pub fn dispatch_log(&self) -> Vec; Source line 266 pub async fn health_check(&self) -> bool; Source line 282 #[instrument(skip(self, input))] pub async fn invoke( &self, protocol: &str, operation: &str, input: Value, ) -> Result;