Skip to main content

combs_mesh/blocks/
orchestration.rs

1//! `orc` — orchestration directives for runtimes.
2
3use serde::{Deserialize, Serialize};
4
5/// Orchestration block: an ordered list of key/value directives.
6#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7pub struct OrchestrationBlock {
8    /// The directives.
9    #[serde(default)]
10    pub directives: Vec<OrchestrationDirective>,
11}
12
13/// A single directive.
14#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15pub struct OrchestrationDirective {
16    /// What the directive does.
17    pub kind: DirectiveKind,
18    /// Key (meaning depends on `kind`).
19    pub key: String,
20    /// Value (meaning depends on `kind`).
21    #[serde(default)]
22    pub value: String,
23}
24
25/// The kind of orchestration directive.
26#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
27pub enum DirectiveKind {
28    /// Runtime should schedule work.
29    Todo,
30    /// Runtime should wait.
31    Wait,
32    /// Informational note.
33    Note,
34    /// Warning.
35    Warning,
36    /// Attention sink hint for inference runtimes.
37    AttentionSink,
38    /// Address map entry for mesh routing.
39    AddressMap,
40}