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

"""Entity metadata for Overwatch 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]


# Overwatch entity metadata for UI components.
OVERWATCH_ENTITIES: ServiceEntityMetadata = {
    "principals": ["Agent", "User"],
    "resources": ["FilePath", "LlmPrompt", "Server", "Tool"],
    "actions": ["call_tool", "connect_server", "process_prompt", "read_file", "write_file"],
}

# Per-action entity mapping for Overwatch.
OVERWATCH_ACTION_ENTITIES: dict[str, ActionEntityMetadata] = {
    "call_tool": {
        "principals": ["User", "Agent"],
        "resources": ["Tool", "FilePath"],
    },
    "connect_server": {
        "principals": ["User", "Agent"],
        "resources": ["Server"],
    },
    "process_prompt": {
        "principals": ["User", "Agent"],
        "resources": ["LlmPrompt"],
    },
    "read_file": {
        "principals": ["User", "Agent"],
        "resources": ["FilePath"],
    },
    "write_file": {
        "principals": ["User", "Agent"],
        "resources": ["FilePath"],
    },
}
