Documentation
    Preparing search index...

    Interface RoleDefinition

    Role definition encapsulating route rules, entity field security, inheritance and M2M tarpitting.

    interface RoleDefinition {
        description?: string;
        entities?: Record<string, EntityFieldRules>;
        id: string;
        inherits?: string[];
        name: string;
        routes?: RouteRule[];
        subjectTypes?: SubjectType[];
        tarpit?: TarpitRuleConfig;
    }
    Index

    Properties

    description?: string

    Role description and scope

    entities?: Record<string, EntityFieldRules>

    Entity field-level security rules

    id: string

    Unique role identifier (e.g. "reader", "curator", "admin", "ai-agent")

    inherits?: string[]

    Inherited role IDs whose permissions are automatically merged

    name: string

    Human-readable role name

    routes?: RouteRule[]

    Route-level access rules with semantic actions

    subjectTypes?: SubjectType[]

    Allowed subject types for this role (e.g. ['agent', 'service'] or ['human'])

    Role-specific rate limiting and tarpitting policy