Reject manifests from a newer schema than this CLI understands.
(&self)
| 186 | |
| 187 | /// Reject manifests from a newer schema than this CLI understands. |
| 188 | pub fn check_schema(&self) -> AgentResult<()> { |
| 189 | if self.schema != SUPPORTED_SCHEMA { |
| 190 | return Err(AgentError::Integration { |
| 191 | agent: self.agent.clone(), |
| 192 | reason: format!( |
| 193 | "unsupported manifest schema {} (this CLI understands schema {})", |
| 194 | self.schema, SUPPORTED_SCHEMA |
| 195 | ), |
| 196 | }); |
| 197 | } |
| 198 | Ok(()) |
| 199 | } |
| 200 | |
| 201 | /// Enforce the package's `requires.atomic` gate against the running CLI. |
| 202 | pub fn check_cli_version(&self, cli_version: &str) -> AgentResult<()> { |