Skip to main content

synapto_interface/
cognitive.rs

1use crate::plugin::MessageChannel;
2use schemars::JsonSchema;
3use serde::{Deserialize, Serialize};
4
5#[doc = " Output message intended to be spoken by the system."]
6#[derive(Serialize, Deserialize, JsonSchema, PartialEq, Eq, Debug, Clone)]
7pub struct CognitiveOutputSpeech {
8    #[doc = " The target channel for the speech output."]
9    pub target_channel: MessageChannel,
10    #[doc = " The text to be spoken."]
11    pub text: String,
12}
13
14#[doc = " Current operational state of the cognitive loop."]
15#[derive(Serialize, Deserialize, JsonSchema, PartialEq, Eq, Debug, Clone)]
16pub enum CognitiveState {
17    #[doc = " The AI is actively thinking/processing."]
18    Thinking,
19    #[doc = " The AI is performing document search or RAG."]
20    Searching,
21    #[doc = " The AI is executing an external command."]
22    Acting,
23    #[doc = " The AI is waiting for new input."]
24    Idle,
25}
26
27#[doc = " Update event for the system's cognitive state."]
28#[derive(Serialize, Deserialize, JsonSchema, PartialEq, Eq, Debug, Clone)]
29pub struct CognitiveStateUpdate {
30    #[doc = " The context of the state update (e.g. plugin-specific metadata)."]
31    pub context: serde_json::Value,
32    #[doc = " The new cognitive state."]
33    pub state: CognitiveState,
34}
35
36#[derive(
37    Serialize,
38    Deserialize,
39    JsonSchema,
40    PartialEq,
41    Eq,
42    Debug,
43    Clone,
44    derive_more :: Display,
45    derive_more :: From,
46    derive_more :: Deref,
47)]
48pub struct CognitiveReasoning(pub String);