# Code generated by highflame-policy-codegen. DO NOT EDIT.
# Source: schemas/palisade/schema.cedarschema

"""Entity metadata for Palisade policy editor."""

from typing import TypedDict

class ServiceEntityMetadata(TypedDict):
    """Entity metadata for a service, extracted from Cedar schema appliesTo blocks."""

    principals: list[str]
    resources: list[str]
    actions: list[str]


class ActionEntityMetadata(TypedDict):
    """Entity metadata for a specific action."""

    principals: list[str]
    resources: list[str]


# Palisade entity metadata for UI components.
PALISADE_ENTITIES: ServiceEntityMetadata = {
    "principals": ["Scanner"],
    "resources": ["Artifact", "Package"],
    "actions": ["deploy_model", "load_model", "quarantine_artifact", "scan_artifact", "scan_package", "validate_integrity", "validate_provenance"],
}

# Per-action entity mapping for Palisade.
PALISADE_ACTION_ENTITIES: dict[str, ActionEntityMetadata] = {
    "deploy_model": {
        "principals": ["Scanner"],
        "resources": ["Artifact"],
    },
    "load_model": {
        "principals": ["Scanner"],
        "resources": ["Artifact"],
    },
    "quarantine_artifact": {
        "principals": ["Scanner"],
        "resources": ["Artifact"],
    },
    "scan_artifact": {
        "principals": ["Scanner"],
        "resources": ["Artifact"],
    },
    "scan_package": {
        "principals": ["Scanner"],
        "resources": ["Package"],
    },
    "validate_integrity": {
        "principals": ["Scanner"],
        "resources": ["Artifact"],
    },
    "validate_provenance": {
        "principals": ["Scanner"],
        "resources": ["Artifact"],
    },
}
