Public declaration syntax from forge-rs/crates/forge-identity/src/local_dev/persistence.rs Original source SHA-256: e334b9cb607d4201382f7975f68d5b2e300ced8bc910420b264128e4c55c986a Function bodies and constant values are omitted. This is not the complete implementation. Source line 28 pub const PROFILE_SCHEMA_VERSION: u32; Source line 42 #[derive(Debug, Clone, Serialize, Deserialize)] pub struct PersistedProfile { /// Schema version for forward compatibility. pub schema_version: u32, /// ISO 8601 timestamp of when the profile was first created. pub created_at: String, /// The profile name (e.g., `"default"`, `"alice"`). pub profile_name: String, /// The 16-character hex machine identifier. pub machine_id: String, /// The root identity data. pub root: PersistedDevIdentity, /// The local organization context. pub org: PersistedOrg, /// Cached agent identities, keyed by agent name. pub agents: BTreeMap } Source line 61 #[derive(Debug, Clone, Serialize, Deserialize)] pub struct PersistedDevIdentity { /// The `did:forge-dev:...` identifier string. pub did: String, /// The entity kind (e.g., `"mhr"`, `"agent"`). pub kind: String, /// The 32-byte Ed25519 signing key, hex-encoded. pub signing_key_hex: String, /// The full OAS Identity Document serialized as a JSON string. pub document_json: String, /// The number of derivation steps from root. pub lineage_depth: u32, /// The org ID this identity belongs to. pub org_id: String, /// ISO 8601 timestamp of when this identity was created. pub created_at: String } Source line 80 #[derive(Debug, Clone, Serialize, Deserialize)] pub struct PersistedOrg { /// The org identifier (e.g., `"forge-dev-org:local"`). pub id: String, /// The org display name. pub name: String } Source line 101 #[cfg(not(target_arch = "wasm32"))] pub fn default_profile_path() -> ForgeIdentityResult; Source line 132 #[cfg(not(target_arch = "wasm32"))] pub fn named_profile_path(profile_name: &str) -> ForgeIdentityResult; Source line 161 #[cfg(not(target_arch = "wasm32"))] pub fn save_profile(profile: &PersistedProfile, path: &Path) -> ForgeIdentityResult<()>; Source line 213 #[cfg(not(target_arch = "wasm32"))] pub fn load_profile(path: &Path) -> ForgeIdentityResult;