AccessMode
Type: CodeEffects.Rule.Common.Models.ActionPermissionMode
Gets or sets how ActionList is read: ViewOnly allows nothing, AllowAllExcept allows everything but the listed permissions, and AllowOnly allows only the listed ones. Set it on every request, from the role of the signed-in user. The Configuration class uses ViewOnly when you do not set it.
ActionList
Type: System.Collections.Generic.ISet<CodeEffects.Rule.Common.Models.ActionPermissionType>
Gets or sets the permissions that are withheld under AllowAllExcept, or granted under AllowOnly. It is ignored under ViewOnly. The list is flat. How the permissions depend on each other is the repository's own map, and Context.ValidatePermissions(..) reports a set that breaks it.
Agents
Type: CodeEffects.Rule.Repository.AgentSettings
Gets or sets what AI agents may do beyond their permissions: limits on their test runs, whether those runs are recorded in the user activity, and whether and which data source items they may read. The limits apply to agents that reach the repository through the Code Effects MCP server and to the AI Assistant alike. Optional. null means AgentSettings.Default.
Assistant
Type: CodeEffects.Rule.Repository.AssistantSettings
Gets or sets the AI Assistant and the AI Rule Editor: the models that your application registers, and how the two features behave. Optional. When it is null, or has no models, neither feature exists for the request.
CurrentAgentId
Type: System.String
Gets or sets the ID of the AI agent that makes the request on behalf of a person. Leave it null when the person uses the repository directly, and whenever CurrentUserType is not UserType.User: an agent or a service that acts on its own is the current user itself. At most 256 characters, and never the same as CurrentUserId.
The agent is a user of its own, of type UserType.Agent, stored on first use like any other. The person stays CurrentUserId and is credited with the work, and every activity that the request records also names the agent, so the audit trail says who acted for them. The same agent may act on its own on another request.
Set it from your own authentication of the caller, for example the client that an access token was issued to, and never from anything that the caller says about itself. An agent can call itself whatever it likes.
CurrentAgentName
Type: System.String
Gets or sets the display name of the agent named by CurrentAgentId. Optional, and valid only together with that ID. The repository stores and refreshes it as it does CurrentUserName. A name longer than 256 characters is truncated.
CurrentUserId
Type: System.String
Gets or sets the ID of the user who makes the request. Required on every request. It is whatever your application calls its users: a login, an email address, a directory key. At most 256 characters. The repository stores it against everything the user creates or changes, and shows the display name of the user back to the people who work with the repository.
Your application is responsible for this value being right. The repository has no user directory to check it against, so an ID it has not seen is simply a user it has not seen yet. It is stored on first use and appears from then on in every "Created By" list. A mistyped ID therefore creates a user and does not raise an error.
CurrentUserName
Type: System.String
Gets or sets the display name of the user who makes the request. Optional. When you supply it, the repository stores it the first time it sees that user and refreshes it whenever it changes, so a name that changes in your application follows into the repository on the next request. When you leave it out, whatever is already stored is kept, so forgetting it on one request never erases a name. A user who has never been given a name is shown as having none. The ID is never shown in its place.
CurrentUserType
Type: CodeEffects.Rule.Repository.Common.UserType
Gets or sets what CurrentUserId is: a person (UserType.User, the default), an AI agent that acts on its own (UserType.Agent), or a service with no person behind it (UserType.Service).
To the repository everything that acts is a user. The type is stored with the user and shown beside the name. Whoever it is, it is credited with the work. Only a person makes a version live, takes one offline, requests or declines approval, or deletes. The saves of an agent or a service always request approval. Set it from your own authentication of the caller, never from anything that the caller says about itself. For example, a token from a client-credentials grant belongs to an agent or a service. The IDs of people, agents and services must be unique across all three types.
Limits
Type: CodeEffects.Rule.Repository.RequestLimits
Gets or sets the limits that every request is held to: the size of a request and of a stored payload, the number of filters, the number of options of a lookup, and the number of test runs at once. Optional. null means the defaults of RequestLimits.
Notify
Type: CodeEffects.Rule.Repository.NotificationDelegate
Gets or sets the method that the repository calls when something happens that people may need to hear about: approval requested for a rule version, a request declined, a version made live or taken offline. Optional. When it is null, nothing is raised.
The repository keeps no list of who should be told. You know your users, their permissions and how to reach them, so you decide who hears about each NotificationAction and how. The repository calls the method after the change is committed, on the thread of the request. A slow method slows the request, so queue the work if it takes time. An exception that the method throws is caught and ignored, because the change it reports has already happened and the user is not told that it failed.
TypeResolver
Type: CodeEffects.Rule.Common.Models.GetTypeDelegate
Gets or sets the method that finds a type by name when the runtime cannot. Leave it null unless the repository reports that a type could not be loaded.
A stored source definition names the types it was built from, assembly included, and the rule editor loads them again when it builds itself. A data source provider or an external method class is an example. Normally those names resolve on their own, because they name assemblies that your application already has. They do not resolve when a type has moved: renamed, versioned, or lifted into another assembly since the definition was stored. The repository asks this method for those names. Returning null for one leaves the answer of the runtime standing. It is the same method, for the same reason, as SourceSettings.TypeResolver, which the repository uses when it reads the definitions you pass to Context.SyncSources(..). An application that needs one usually needs both, and can pass the same method to each.
UiXml
Type: System.Xml.XmlDocument
Gets or sets the user interface XML document. Set it to run the repository in a language other than English, or to reword the default English. Your document replaces the default one entirely, so it must declare every node that the default declares. Translate the document that Context.GetDefaultUiXml() returns, without changing its layout or structure, and it will. A document that lacks a node, or declares one the repository does not read, fails the request with a MalformedXmlException that names what is wrong. It is ignored when it is null or has no root element, and it takes precedence over UiXmlFile.
UiXmlFile
Type: System.String
Gets or sets the full physical path to the file that holds the user interface XML document. It is not a virtual path. It is ignored when it is empty or when UiXml is set. A file that cannot be read fails the request with a MalformedXmlException.
EditorHelpXml
Type: System.Xml.XmlDocument
Gets or sets the Help XML of every rule editor the repository builds: the menus, operators, clauses, flow words and Help String messages, to show the editors in another language. Translate the document that Context.GetDefaultEditorHelpXml() returns. It is ignored when it is null or has no root element, and it takes precedence over EditorHelpXmlFile. See Help XML and Multilingual Support.
EditorHelpXmlFile
Type: System.String
Gets or sets the full physical path to the file that holds the rule editors' Help XML. It is not a virtual path. It is ignored when it is empty or when EditorHelpXml is set. A file that cannot be read fails the request with CE10262.
SourceLabelsXml
Type: System.Xml.XmlDocument
Gets or sets the source labels document: the display names and descriptions of the source objects' members in another language. Each label names its member by identity (a field by its property path, a method or action by its name and parameters, an enumeration value by its type and number), never by its display name, so one document serves every source version. The repository lays the labels over a source version wherever people read it: the rule editors' menus and rule text, the Help String, and the Source Fields tree. Stored source versions, Rule XML and the code panes keep the source's own names, and AI agents work with the source's own names, the labels given beside them. Make the document to translate with Xml.GetSourceLabelsDocument(..). It is ignored when it is null or has no root element, and it takes precedence over SourceLabelsXmlFile.
SourceLabelsXmlFile
Type: System.String
Gets or sets the full physical path to the file that holds the source labels. It is not a virtual path. It is ignored when it is empty or when SourceLabelsXml is set. A file that cannot be read fails the request with CE10263.