tf-types 0.1.6

Core semantic types, traits, and schemas powering the TrustForge protocol.
Documentation
// GENERATED by `tf-schema codegen --target rust` — DO NOT EDIT BY HAND.

#![allow(unused_imports, non_camel_case_types, non_snake_case, clippy::all)]

use serde::{Deserialize, Serialize};
use super::*;

/// Declarative manifest describing a TrustForge plugin. See TF-0008.
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct PluginManifest {
    /// Version of the plugin-manifest schema itself.
    pub plugin_version: PluginManifest_PluginVersion,
    /// Reverse-DNS-style plugin identifier, e.g. com.example.my-plugin.
    pub plugin_id: String,
    /// Actor URI the plugin operates as once loaded. Use tf:actor:plugin:...
    pub actor_id: ActorId,
    /// Plugin runtime kind.
    pub kind: PluginManifest_Kind,
    /// Path (relative to the manifest) to the plugin entry point — a .js/.ts/.mjs module for native, or a .wasm file for WASM.
    pub entry: String,
    /// Base64-encoded ed25519 public key that signs this manifest.
    pub identity_pub: String,
    /// Signature envelope over the canonical form of this manifest with signature.signature cleared.
    pub signature: SignatureEnvelope,
    /// Capabilities the plugin declares it needs. Enforced by the registry + guard.
    pub capabilities: Vec<Capability>,
    /// WASM-only: host functions the plugin is allowed to import. The registry enforces that only these imports are supplied.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub imports: Option<Vec<String>>,
    /// Optional proof level at which this plugin's actions should be emitted.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub proof_profile: Option<ProofLevel>,
    /// Conformance profile labels this plugin claims (e.g. tf-plugin-compatible, tf-bridge-compatible). The registry surfaces this so daemons can refuse plugins that don't claim a profile they require.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub conformance_profile: Option<Vec<String>>,
    /// Human-readable description.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub description: Option<String>,
}

/// Plugin runtime kind.
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub enum PluginManifest_Kind {
    #[serde(rename = "native")]
    Native,
    #[serde(rename = "wasm")]
    Wasm,
}

/// Version of the plugin-manifest schema itself.
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub enum PluginManifest_PluginVersion {
    #[serde(rename = "1")]
    V1,
}