//! Vocabulary hive-c0re's job queue shares with its clients: what a //! permission change carries ([`PermPayload`]) and the scheduler's //! lifecycle [`State`]. //! //! A `Source` enum lived here too — where a job came from, rendered as the //! "why" chip. It was a field on the DAG container, and it went with it: a //! job is its nodes now, and a node says what it does rather than who asked //! for it. //! //! **The typed `DagView`/`NodeView` projection that used to live here is //! gone.** One graph is served one way now — `hive_jobq_wire`'s generic //! `GraphNode`, over the `QueueNodes` socket request and //! `GET /api/jobq/graph` — so there is no second shape to keep in //! agreement with the first. Queue internals (node kinds, edges, //! scheduling) live in `hive-c0re::job_queue`. //! Semantics: `docs/coordinator.md::Job queue`. use serde::{Deserialize, Serialize}; pub use hive_jobq::State; /// Kind-specific payload for `Template::PermChange` DAGs. #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(tag = "type", rename_all = "snake_case")] pub enum PermPayload { /// Set the tool groups for one agent (`tool-groups.json`). ToolGroups { groups: Vec }, /// Set the capabilities for one agent (`capabilities.json`). Capabilities { caps: Vec }, /// Set both perm-types in one entry — the batch /// `POST /api/permissions` path. `None` leaves that file untouched; /// present fields commit together and rebuild once. Combined { groups: Option>, caps: Option>, }, } /// Node id. Carries the scheduler crate's globally-monotonic node id /// (`hive_jobq::NodeId`) verbatim on the wire — unique across all DAGs, not /// just within one. Consumers treat it opaquely (grouping + dep matching), /// so the widening from the old dag-local `u32` is transparent. pub type NodeId = u64;