Maximum CRUD mode allowed on matching entities. Intersected with contextUser's
actual EntityPermission — never grants access the user does not already hold.
Exact MJ Entity Name or wildcard pattern (e.g. "*", "MJ_BizApps_Accounting:*",
"MJ_BizApps_Sales: Deals").
OptionalflsOptional Field-Level Security (FLS) narrowing — merged with the user's role FLS.
Each array supports exact field names or * wildcard patterns (e.g. ["Salary", "*SSN*"]).
OptionaldeniedFields?: string[]Fields stripped from read projections and blocked from write mutations.
OptionalreadOnlyFields?: string[]Fields readable by the agent, but blocked from modification on Create/Update.
OptionalrequireApprovalFields?: string[]Modifying any matching field escalates the save to a user approval request (AIAgentRequest).
OptionalrlsOptional Row-Level Security (RLS) narrowing — AND-combined with the user's role RLS.
OptionalrecordConditionExpression?: stringSafe AST-validated boolean expression evaluated via SafeExpressionEvaluator
against { record, user, now } before returning or saving a BaseEntity.
OptionalrowLevelSecurityFilterId?: stringOptional ID of a reusable MJ: Row Level Security Filters record.
OptionalwhereClause?: stringInline SQL filter validated via SQLExpressionValidator (context: 'where_clause').
Supports user tokens such as {{UserID}} and {{UserEmail}}.
OptionaltimeOptional time-of-day / day-of-week windows restricting when access (especially writes) is permitted on matching entities.
OptionaldaysOfWeek?: ("Sun" | "Mon" | "Tue" | "Wed" | "Thu" | "Fri" | "Sat")[]Allowed days of week (e.g. ['Mon', 'Tue', 'Wed', 'Thu', 'Fri']).
OptionalendTime?: string24-hour end time in HH:mm format (e.g. "18:00").
OptionaloutsideWindowBehavior?: "ReadOnly" | "Deny" | "RequireApproval" | "DeferUntilNextWindow"Behavior when an operation is attempted outside the allowed window:
'Deny': Reject immediately'ReadOnly': Allow reads, block writes'RequireApproval': Create an AIAgentRequest for user approval'DeferUntilNextWindow': Return nextWindowStartISO so the agent can self-schedule an AgentWakeOptionalstartTime?: string24-hour start time in HH:mm format (e.g. "08:00").
Optionaltimezone?: stringIANA timezone (e.g. "America/Chicago"); defaults to UTC when omitted.
OptionalvalidFromISO?: stringOptional ISO-8601 start timestamp for temporary grants.
OptionalvalidUntilISO?: stringOptional ISO-8601 end timestamp for temporary grants.
Per-entity or wildcard entity access rule stored in the
EntityAccessRulesJSON array onMJ: AI Agent User Policies(AIAgentUserPolicy.EntityAccessRules).The owning user's MJ permissions (
contextUser: Entity CRUD permissions, role-based Row-Level Security filters, and role-based Field-Level Security permissions) are the non-negotiable ceiling. Rules in this array strictly narrow access below that ceiling:Deny,ReadOnly,ReadWrite,RequireApprovalOnWrite)RowLevelSecurityFilterID, SQLwhereClausevalidated viaSQLExpressionValidator, or in-memoryrecordConditionExpressionevaluated viaSafeExpressionEvaluator)deniedFields,readOnlyFields,requireApprovalFields)timeWindows)