hushspec 0.1.1

Portable specification types for AI agent security rules
Documentation
// Code generated by scripts/generate_sdk_contracts.py. DO NOT EDIT.
#![allow(dead_code)]

pub const TOP_LEVEL_KEYS: &[&str] = &[
    "hushspec",
    "name",
    "description",
    "extends",
    "merge_strategy",
    "rules",
    "extensions",
    "metadata",
];
pub const RULE_KEYS: &[&str] = &[
    "forbidden_paths",
    "path_allowlist",
    "egress",
    "secret_patterns",
    "patch_integrity",
    "shell_commands",
    "tool_access",
    "computer_use",
    "remote_desktop_channels",
    "input_injection",
];
pub const EXTENSION_KEYS: &[&str] = &["posture", "origins", "detection"];
pub const GOVERNANCE_METADATA_KEYS: &[&str] = &[
    "author",
    "approved_by",
    "approval_date",
    "classification",
    "change_ticket",
    "lifecycle_state",
    "policy_version",
    "effective_date",
    "expiry_date",
];
pub const FORBIDDEN_PATH_KEYS: &[&str] = &["enabled", "patterns", "exceptions"];
pub const PATH_ALLOWLIST_KEYS: &[&str] = &["enabled", "read", "write", "patch"];
pub const EGRESS_KEYS: &[&str] = &["enabled", "allow", "block", "default"];
pub const SECRET_PATTERNS_KEYS: &[&str] = &["enabled", "patterns", "skip_paths"];
pub const SECRET_PATTERN_KEYS: &[&str] = &["name", "pattern", "severity", "description"];
pub const PATCH_INTEGRITY_KEYS: &[&str] = &[
    "enabled",
    "max_additions",
    "max_deletions",
    "forbidden_patterns",
    "require_balance",
    "max_imbalance_ratio",
];
pub const SHELL_COMMAND_KEYS: &[&str] = &["enabled", "forbidden_patterns"];
pub const TOOL_ACCESS_KEYS: &[&str] = &[
    "enabled",
    "allow",
    "block",
    "require_confirmation",
    "default",
    "max_args_size",
];
pub const COMPUTER_USE_KEYS: &[&str] = &["enabled", "mode", "allowed_actions"];
pub const REMOTE_DESKTOP_KEYS: &[&str] = &[
    "enabled",
    "clipboard",
    "file_transfer",
    "audio",
    "drive_mapping",
];
pub const INPUT_INJECTION_KEYS: &[&str] =
    &["enabled", "allowed_types", "require_postcondition_probe"];
pub const POSTURE_KEYS: &[&str] = &["initial", "states", "transitions"];
pub const POSTURE_STATE_KEYS: &[&str] = &["description", "capabilities", "budgets"];
pub const POSTURE_TRANSITION_KEYS: &[&str] = &["from", "to", "on", "after"];
pub const ORIGINS_KEYS: &[&str] = &["default_behavior", "profiles"];
pub const ORIGIN_PROFILE_KEYS: &[&str] = &[
    "id",
    "match",
    "posture",
    "tool_access",
    "egress",
    "data",
    "budgets",
    "bridge",
    "explanation",
];
pub const ORIGIN_MATCH_KEYS: &[&str] = &[
    "provider",
    "tenant_id",
    "space_id",
    "space_type",
    "visibility",
    "external_participants",
    "tags",
    "sensitivity",
    "actor_role",
];
pub const ORIGIN_DATA_KEYS: &[&str] = &[
    "allow_external_sharing",
    "redact_before_send",
    "block_sensitive_outputs",
];
pub const ORIGIN_BUDGET_KEYS: &[&str] = &["tool_calls", "egress_calls", "shell_commands"];
pub const BRIDGE_POLICY_KEYS: &[&str] =
    &["allow_cross_origin", "allowed_targets", "require_approval"];
pub const BRIDGE_TARGET_KEYS: &[&str] = &["provider", "space_type", "tags", "visibility"];
pub const DETECTION_KEYS: &[&str] = &["prompt_injection", "jailbreak", "threat_intel"];
pub const PROMPT_INJECTION_KEYS: &[&str] = &[
    "enabled",
    "warn_at_or_above",
    "block_at_or_above",
    "max_scan_bytes",
];
pub const JAILBREAK_KEYS: &[&str] = &[
    "enabled",
    "block_threshold",
    "warn_threshold",
    "max_input_bytes",
];
pub const THREAT_INTEL_KEYS: &[&str] = &["enabled", "pattern_db", "similarity_threshold", "top_k"];

pub const MERGE_STRATEGIES: &[&str] = &["replace", "merge", "deep_merge"];
pub const DEFAULT_ACTIONS: &[&str] = &["allow", "block"];
pub const SEVERITIES: &[&str] = &["critical", "error", "warn"];
pub const COMPUTER_USE_MODES: &[&str] = &["observe", "guardrail", "fail_closed"];
pub const TRANSITION_TRIGGERS: &[&str] = &[
    "user_approval",
    "user_denial",
    "critical_violation",
    "any_violation",
    "timeout",
    "budget_exhausted",
    "pattern_match",
];
pub const ORIGIN_DEFAULT_BEHAVIORS: &[&str] = &["deny", "minimal_profile"];
pub const ORIGIN_SPACE_TYPES: &[&str] = &[
    "channel",
    "group",
    "dm",
    "thread",
    "issue",
    "ticket",
    "pull_request",
    "email_thread",
];
pub const ORIGIN_VISIBILITIES: &[&str] = &["private", "internal", "public", "external_shared"];
pub const DETECTION_LEVELS: &[&str] = &["safe", "suspicious", "high", "critical"];
pub const CLASSIFICATIONS: &[&str] = &["public", "internal", "confidential", "restricted"];
pub const LIFECYCLE_STATES: &[&str] = &[
    "draft",
    "review",
    "approved",
    "deployed",
    "deprecated",
    "archived",
];