Skip to main content

plexus_substrate/activations/cone/
methods.rs

1/// Identifier types for the Cone plugin
2///
3/// Provides flexible identification of cones by name or UUID.
4
5use schemars::JsonSchema;
6use serde::{Deserialize, Serialize};
7use uuid::Uuid;
8
9/// Identifier for a cone - either by name or UUID
10///
11/// CLI usage: Just pass the name or UUID directly (e.g., "my-assistant" or "550e8400-...")
12/// The CLI/API will handle the conversion to the appropriate lookup type.
13#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
14#[serde(tag = "type", rename_all = "snake_case")]
15pub enum ConeIdentifier {
16    /// Lookup cone by its human-readable name
17    ByName {
18        /// Cone name (supports partial matching, e.g., "assistant" or "assistant#550e")
19        name: String,
20    },
21    /// Lookup cone by its UUID
22    ById {
23        /// Cone UUID
24        id: Uuid,
25    },
26}