1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// GENERATED by `tf-schema codegen --target rust` — DO NOT EDIT BY HAND.
#![allow(unused_imports, non_camel_case_types, non_snake_case, clippy::all)]
use serde::{Deserialize, Serialize};
use super::*;
/// Catalog entry for one dangerous action.
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct CatalogEntry {
/// Dotted action name, e.g. file.delete.
pub name: ActionName,
/// Danger categories assigned to this action.
pub danger_tags: Vec<DangerTag>,
/// Risk class the catalog recommends.
pub default_risk: RiskClass,
/// Approval requirement the catalog recommends.
pub default_approval: ApprovalRequirement,
/// Whether this action is intrinsically reversible.
#[serde(skip_serializing_if = "Option::is_none", default)]
pub default_reversible: Option<bool>,
/// Tags that any contract using this action MUST also declare. Used by the deep validator.
#[serde(skip_serializing_if = "Option::is_none", default)]
pub mandatory_tags: Option<Vec<DangerTag>>,
/// Human-readable description of why this action is dangerous.
pub description: String,
}
/// Canonical catalog of action names with their danger tags and default enforcement. Consumed by the agent-contract deep validator and AI integration guide.
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct DangerousActions {
/// Version of the dangerous-actions catalog schema itself.
pub dangerous_actions_version: DangerousActions_DangerousActionsVersion,
/// Stable catalog identifier, e.g. tf-dangerous-std.
pub catalog_id: String,
/// Human-readable description of this catalog.
#[serde(skip_serializing_if = "Option::is_none", default)]
pub description: Option<String>,
/// Known-dangerous action entries. Contracts should cross-reference this catalog when declaring danger_tags.
pub actions: Vec<CatalogEntry>,
}
/// Version of the dangerous-actions catalog schema itself.
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub enum DangerousActions_DangerousActionsVersion {
#[serde(rename = "1")]
V1,
}