Member Junction
    Preparing search index...

    Server-side AI Agent entity that validates TypeConfiguration on save:

    1. When non-empty, TypeConfiguration must parse as a JSON OBJECT (it is the per-agent layer of the effective-configuration merge — arrays/scalars are never valid layers).
    2. When the agent's TYPE publishes a ConfigSchema (JSON Schema subset), the parsed configuration must conform to it — checked with the dependency-free ValidateJsonAgainstSchemaLite validator (type / required / properties / enum / items / additionalProperties). A type WITHOUT a published schema leaves the configuration freeform (rule 1 still applies).

    A malformed/unparseable ConfigSchema is a METADATA bug on the type row, not the agent being saved — it surfaces as a WARNING (the save proceeds) rather than blocking every agent of that type. Extends MJAIAgentEntityExtended so all client-side extended behavior is preserved; registered last, so the ClassFactory prefers it server-side.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Accessors

    __mj_CreatedAt __mj_UpdatedAt AcceptsSkills AcceptUnregisteredFiles Actions ActiveUser AgentTypePromptParams AllowEphemeralClientTools AllowMemoryWrite ArtifactCreationMode AttachmentRootPath AttachmentStorageProvider AttachmentStorageProviderID AutoArchiveEnabled Category CategoryID ChatHandlingOption CompactionTargetPercent CompactionTriggerPercent ContextCompressionMessageRetentionCount ContextCompressionMessageThreshold ContextCompressionPrompt ContextCompressionPromptID ContextCurrentUser ContextWindowMaxTokens ConversationSummaryPrompt ConversationSummaryPromptID DefaultArtifactType DefaultArtifactTypeID DefaultCoAgent DefaultCoAgentID DefaultMediaCollection DefaultMediaCollectionID DefaultPromptEffortLevel DefaultSkipAsyncValidation DefaultStorageAccount DefaultStorageAccountID Description Dirty DriverClass EnableContextCompression EntityInfo ExampleInjectionStrategy ExampleRetentionDays ExecutionMode ExecutionOrder ExposeAsAction Fields FinalPayloadValidation FinalPayloadValidationMaxRetries FinalPayloadValidationMode FirstPrimaryKey FunctionalRequirements IconClass ID InjectExamples InjectNotes InlineStorageThresholdBytes InvocationMode ISAChild ISAChildren ISAParent ISAParentEntity IsBusy IsDeleting IsLoading IsRestricted IsSaved IsSaving LatestResult LeafEntity LogoURL MaxCostPerRun MaxExamplesToInject MaxExecutionsPerRun MaxIterationsPerRun MaxMessages MaxNotesToInject MaxTimePerRun MaxTokensPerRun MessageMode MinExecutionsPerRun Models ModelSelectionMode Name NoteInjectionStrategy NoteRetentionDays Notes OwnerUser OwnerUserID Parent ParentID PayloadDownstreamPaths PayloadScope PayloadSelfReadPaths PayloadSelfWritePaths PayloadUpstreamPaths PrimaryKey PrimaryKeys ProviderToUse ProviderTransaction RecordChanges RecordingDefault RecordingStorageProvider RecordingStorageProviderID RecordLoaded RequirePlanMode RerankerConfiguration RestoreContext ResultHistory RootDefaultCoAgentID RootEntity RootParentID RunQueryProviderToUse RunReportProviderToUse RunViewProviderToUse ScopeConfig SearchScopeAccess SkillActivationMode SkipEmbeddings StartingPayloadValidation StartingPayloadValidationMode Status SupportsPlanMode TechnicalDesign TransactionGroup Type TypeConfiguration TypeID Vectors BaseEventCode Provider

    Methods

    Constructors

    Properties

    MAX_RESULT_HISTORY: 50

    Maximum number of BaseEntityResult entries retained in _resultHistory per entity instance. Set to 50 — enough for diagnostic context while bounding worst-case memory for entities that survive thousands of Save/Delete cycles.

    Accessors

    • get __mj_CreatedAt(): Date
      • Field Name: __mj_CreatedAt
      • Display Name: Created At
      • SQL Data Type: datetimeoffset
      • Default Value: getutcdate()

      Returns Date

    • get __mj_UpdatedAt(): Date
      • Field Name: __mj_UpdatedAt
      • Display Name: Updated At
      • SQL Data Type: datetimeoffset
      • Default Value: getutcdate()

      Returns Date

    • get AcceptsSkills(): "None" | "All" | "Limited"
      • Field Name: AcceptsSkills
      • Display Name: Accepts Skills
      • SQL Data Type: nvarchar(20)
      • Default Value: None
      • Value List Type: List
      • Possible Values
        • All
        • Limited
        • None
      • Description: Whether this agent accepts skills: None (no skills — default), All (any Active skill), or Limited (only skills assigned via AIAgentSkill). This is the per-agent gate; AISkill.Status and AIAgentSkill.Status provide catalog- and assignment-level gating on top.

      Returns "None" | "All" | "Limited"

    • set AcceptsSkills(value: "None" | "All" | "Limited"): void

      Parameters

      • value: "None" | "All" | "Limited"

      Returns void

    • get AcceptUnregisteredFiles(): boolean
      • Field Name: AcceptUnregisteredFiles
      • Display Name: Accept Unregistered Files
      • SQL Data Type: bit
      • Default Value: 0
      • Description: Per-agent opt-in to a Generic Binary fallback for file uploads whose MIME type does not match any registered Artifact Type. When false (default), unrecognized uploads are rejected at upload time with an actionable error. When true, unrecognized uploads resolve to the Generic Binary artifact type, exposing only get_full and get_metadata tools. Scoped per agent — there is no system-wide global flag.

      Returns boolean

    • set AcceptUnregisteredFiles(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get ActiveUser(): UserInfo

      Internal helper method for the class and sub-classes - used to easily get the Active User which is either the ContextCurrentUser, if defined, or the Metadata.Provider.CurrentUser if not.

      Returns UserInfo

    • get AgentTypePromptParams(): string
      • Field Name: AgentTypePromptParams
      • Display Name: Agent Type Prompt Params
      • SQL Data Type: nvarchar(MAX)
      • Description: JSON object containing parameter values that customize how this agent's type-level system prompt is rendered. The schema is defined by the agent type's PromptParamsSchema field. Allows per-agent control over which prompt sections are included, enabling token savings by excluding unused documentation.

      Returns string

    • set AgentTypePromptParams(value: string): void

      Parameters

      • value: string

      Returns void

    • get AllowEphemeralClientTools(): boolean
      • Field Name: AllowEphemeralClientTools
      • Display Name: Allow Ephemeral Client Tools
      • SQL Data Type: bit
      • Default Value: 1
      • Description: When true (default), this agent accepts runtime-registered ephemeral client tools that are not defined in metadata. Set to false for agents that require strict tool governance.

      Returns boolean

    • set AllowEphemeralClientTools(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get AllowMemoryWrite(): boolean
      • Field Name: AllowMemoryWrite
      • Display Name: Allow Memory Write
      • SQL Data Type: bit
      • Default Value: 1
      • Description: When enabled, the agent may commit durable memories mid-run via the memoryWrites loop-response field. Writes are framework-guarded (type restriction, scope clamp, near-duplicate check, per-run cap) and land as Provisional notes pending Memory Manager hardening. On by default; disable for restricted or experimental agents.

      Returns boolean

    • set AllowMemoryWrite(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get ArtifactCreationMode(): "Always" | "System Only" | "Never"
      • Field Name: ArtifactCreationMode
      • Display Name: Artifact Creation Mode
      • SQL Data Type: nvarchar(20)
      • Default Value: Always
      • Value List Type: List
      • Possible Values
        • Always
        • Never
        • System Only
      • Description: Controls how artifacts are created from this agent's payloads. "Always" creates visible artifacts, "Never" skips artifact creation, "System Only" creates hidden system artifacts.

      Returns "Always" | "System Only" | "Never"

    • set ArtifactCreationMode(value: "Always" | "System Only" | "Never"): void

      Parameters

      • value: "Always" | "System Only" | "Never"

      Returns void

    • get AttachmentRootPath(): string
      • Field Name: AttachmentRootPath
      • Display Name: Attachment Root Path
      • SQL Data Type: nvarchar(500)
      • Description: Base path within the storage provider for this agent's attachments. Agent run ID and sequence number are appended to create unique paths. Format: /folder/subfolder

      Returns string

    • set AttachmentRootPath(value: string): void

      Parameters

      • value: string

      Returns void

    • get AttachmentStorageProvider(): string
      • Field Name: AttachmentStorageProvider
      • Display Name: Attachment Storage Provider Name
      • SQL Data Type: nvarchar(50)

      Returns string

    • get AttachmentStorageProviderID(): string
      • Field Name: AttachmentStorageProviderID
      • Display Name: Attachment Storage Provider
      • SQL Data Type: uniqueidentifier
      • Related Entity/Foreign Key: MJ: File Storage Providers (vwFileStorageProviders.ID)
      • Description: File storage provider for large attachments. Overrides the default from AIConfiguration. NULL uses system default.

      Returns string

    • set AttachmentStorageProviderID(value: string): void

      Parameters

      • value: string

      Returns void

    • get AutoArchiveEnabled(): boolean
      • Field Name: AutoArchiveEnabled
      • Display Name: Auto Archive Enabled
      • SQL Data Type: bit
      • Default Value: 1
      • Description: Whether automatic archival of stale notes/examples is enabled for this agent. Default true.

      Returns boolean

    • set AutoArchiveEnabled(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get Category(): string
      • Field Name: Category
      • Display Name: Category
      • SQL Data Type: nvarchar(200)

      Returns string

    • get CategoryID(): string
      • Field Name: CategoryID
      • Display Name: Category
      • SQL Data Type: uniqueidentifier
      • Related Entity/Foreign Key: MJ: AI Agent Categories (vwAIAgentCategories.ID)
      • Description: Foreign key to AIAgentCategory. Assigns this agent to an organizational category for grouping, filtering, and inherited assignment strategy resolution.

      Returns string

    • set CategoryID(value: string): void

      Parameters

      • value: string

      Returns void

    • get ChatHandlingOption(): "Failed" | "Success" | "Retry"
      • Field Name: ChatHandlingOption
      • Display Name: Chat Handling Option
      • SQL Data Type: nvarchar(30)
      • Value List Type: List
      • Possible Values
        • Failed
        • Retry
        • Success
      • Description: Controls how Chat next steps are handled. When null (default), Chat propagates to caller. When set to Success, Failed, or Retry, Chat steps are remapped to that value and re-validated.

      Returns "Failed" | "Success" | "Retry"

    • set ChatHandlingOption(value: "Failed" | "Success" | "Retry"): void

      Parameters

      • value: "Failed" | "Success" | "Retry"

      Returns void

    • get CompactionTargetPercent(): number
      • Field Name: CompactionTargetPercent
      • Display Name: Compaction Target Percent
      • SQL Data Type: int
      • Description: Per-agent override for the cross-turn compaction target percentage. Null inherits the agent type's value.

      Returns number

    • set CompactionTargetPercent(value: number): void

      Parameters

      • value: number

      Returns void

    • get CompactionTriggerPercent(): number
      • Field Name: CompactionTriggerPercent
      • Display Name: Compaction Trigger Percent
      • SQL Data Type: int
      • Description: Per-agent override for the cross-turn compaction trigger percentage. Null inherits the agent type's value.

      Returns number

    • set CompactionTriggerPercent(value: number): void

      Parameters

      • value: number

      Returns void

    • get ContextCompressionMessageRetentionCount(): number
      • Field Name: ContextCompressionMessageRetentionCount
      • Display Name: Context Compression Message Retention Count
      • SQL Data Type: int
      • Description: Number of recent messages to keep uncompressed when context compression is applied.

      Returns number

    • set ContextCompressionMessageRetentionCount(value: number): void

      Parameters

      • value: number

      Returns void

    • get ContextCompressionMessageThreshold(): number
      • Field Name: ContextCompressionMessageThreshold
      • Display Name: Context Compression Message Threshold
      • SQL Data Type: int
      • Description: Number of messages that triggers context compression when EnableContextCompression is true.

      Returns number

    • set ContextCompressionMessageThreshold(value: number): void

      Parameters

      • value: number

      Returns void

    • get ContextCompressionPrompt(): string
      • Field Name: ContextCompressionPrompt
      • Display Name: Context Compression Prompt
      • SQL Data Type: nvarchar(255)

      Returns string

    • get ContextCompressionPromptID(): string
      • Field Name: ContextCompressionPromptID
      • Display Name: Context Compression Prompt ID
      • SQL Data Type: uniqueidentifier
      • Related Entity/Foreign Key: MJ: AI Prompts (vwAIPrompts.ID)

      Returns string

    • set ContextCompressionPromptID(value: string): void

      Parameters

      • value: string

      Returns void

    • get ContextCurrentUser(): UserInfo

      Returns UserInfo

    • set ContextCurrentUser(user: UserInfo): void

      The ContextCurrentUser is a property used to manually set the "current" user for scenarios, primarily on the server side, where the user changes per request. For situations where there is no global CurrentUser in the Metadata.Provider, you MUST set this property to the user you want to use for the current operation. If you used Metadata.GetEntityObject() to get the entity object, this property will be set automatically for you as that method has a parameter that can be provided for the ContextCurrentUser.

      Parameters

      Returns void

    • get ContextWindowMaxTokens(): number
      • Field Name: ContextWindowMaxTokens
      • Display Name: Context Window Max Tokens
      • SQL Data Type: int
      • Description: Per-agent override for the effective working-context budget, in tokens. Null inherits the agent type's value (which, if also null, falls back to the selected model's MaxInputTokens). The resolved value is clamped to the model's limit at runtime.

      Returns number

    • set ContextWindowMaxTokens(value: number): void

      Parameters

      • value: number

      Returns void

    • get ConversationSummaryPrompt(): string
      • Field Name: ConversationSummaryPrompt
      • Display Name: Conversation Summary Prompt
      • SQL Data Type: nvarchar(255)

      Returns string

    • get ConversationSummaryPromptID(): string
      • Field Name: ConversationSummaryPromptID
      • Display Name: Conversation Summary Prompt ID
      • SQL Data Type: uniqueidentifier
      • Related Entity/Foreign Key: MJ: AI Prompts (vwAIPrompts.ID)
      • Description: Per-agent override for the cross-turn conversation compaction prompt. Null inherits the agent type's value.

      Returns string

    • set ConversationSummaryPromptID(value: string): void

      Parameters

      • value: string

      Returns void

    • get DefaultArtifactType(): string
      • Field Name: DefaultArtifactType
      • Display Name: Default Artifact Type
      • SQL Data Type: nvarchar(100)

      Returns string

    • get DefaultArtifactTypeID(): string
      • Field Name: DefaultArtifactTypeID
      • Display Name: Default Artifact Type
      • SQL Data Type: uniqueidentifier
      • Related Entity/Foreign Key: MJ: Artifact Types (vwArtifactTypes.ID)
      • Description: Default artifact type produced by this agent. This is the primary artifact type; additional artifact types can be linked via AIAgentArtifactType junction table. Can be NULL if agent does not produce artifacts by default.

      Returns string

    • set DefaultArtifactTypeID(value: string): void

      Parameters

      • value: string

      Returns void

    • get DefaultCoAgent(): string
      • Field Name: DefaultCoAgent
      • Display Name: Default Co-Agent Name
      • SQL Data Type: nvarchar(255)

      Returns string

    • get DefaultCoAgentID(): string
      • Field Name: DefaultCoAgentID
      • Display Name: Default Co-Agent
      • SQL Data Type: uniqueidentifier
      • Related Entity/Foreign Key: MJ: AI Agents (vwAIAgents.ID)
      • Description: Default co-agent (a Realtime-type AI Agent) that voices THIS agent in real-time sessions — a per-agent persona. Overridden by the runtime coAgentId parameter; NULL falls through to a type-level AIAgentCoAgent default row, then the global default co-agent.

      Returns string

    • set DefaultCoAgentID(value: string): void

      Parameters

      • value: string

      Returns void

    • get DefaultMediaCollection(): string
      • Field Name: DefaultMediaCollection
      • Display Name: Default Media Collection Name
      • SQL Data Type: nvarchar(255)

      Returns string

    • get DefaultMediaCollectionID(): string
      • Field Name: DefaultMediaCollectionID
      • Display Name: Default Media Collection
      • SQL Data Type: uniqueidentifier
      • Related Entity/Foreign Key: MJ: Collections (vwCollections.ID)
      • Description: OPTIONAL default media kit for this agent: a Collection of Artifacts the agent may show on the realtime Media channel during a conversation. Resolved per session as runtime-override > this agent default > none. When set, the agent is given a manifest (each item's display name, media type, when-to-show ContextDescription and Preload flag) so it can surface items via the Media_ShowMedia tool. When NULL the agent has no curated kit (ad-hoc Media_ShowMedia still works).

      Returns string

    • set DefaultMediaCollectionID(value: string): void

      Parameters

      • value: string

      Returns void

    • get DefaultPromptEffortLevel(): number
      • Field Name: DefaultPromptEffortLevel
      • Display Name: Default Effort Level
      • SQL Data Type: int
      • Description: Default effort level for all prompts executed by this agent (1-100, where 1=minimal effort, 100=maximum effort). Takes precedence over individual prompt EffortLevel settings but can be overridden by runtime parameters. Inherited by sub-agents unless explicitly overridden.

      Returns number

    • set DefaultPromptEffortLevel(value: number): void

      Parameters

      • value: number

      Returns void

    • get DefaultStorageAccount(): string
      • Field Name: DefaultStorageAccount
      • Display Name: Default Storage Account Name
      • SQL Data Type: nvarchar(200)

      Returns string

    • get DefaultStorageAccountID(): string
      • Field Name: DefaultStorageAccountID
      • Display Name: Default Storage Account
      • SQL Data Type: uniqueidentifier
      • Related Entity/Foreign Key: MJ: File Storage Accounts (vwFileStorageAccounts.ID)
      • Description: Default file storage account for this specific agent. Overrides both Type-level and Category-level defaults. Can be further overridden at runtime via ExecuteAgentParams.override.storageAccountId. FK to FileStorageAccount.

      Returns string

    • set DefaultStorageAccountID(value: string): void

      Parameters

      • value: string

      Returns void

    • get Description(): string
      • Field Name: Description
      • Display Name: Description
      • SQL Data Type: nvarchar(MAX)
      • Description: A detailed description of the AI agent.

      Returns string

    • set Description(value: string): void

      Parameters

      • value: string

      Returns void

    • get Dirty(): boolean

      Returns true if the object is Dirty, meaning something has changed since it was last saved to the database, and false otherwise. For new records, this will always return true.

      Returns boolean

    • get DriverClass(): string
      • Field Name: DriverClass
      • Display Name: Driver Class
      • SQL Data Type: nvarchar(255)
      • Description: Optional override for the class name used by the MemberJunction class factory to instantiate this specific agent. If specified, this overrides the agent type's DriverClass. Useful for specialized agent implementations.

      Returns string

    • set DriverClass(value: string): void

      Parameters

      • value: string

      Returns void

    • get EnableContextCompression(): boolean
      • Field Name: EnableContextCompression
      • Display Name: Enable Context Compression
      • SQL Data Type: bit
      • Default Value: 0
      • Description: When true, enables automatic compression of conversation context when the message threshold is reached.

      Returns boolean

    • set EnableContextCompression(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get EntityInfo(): EntityInfo

      Access to the underlying metadata for the entity object.

      Returns EntityInfo

    • get ExampleInjectionStrategy(): "Recent" | "Rated" | "Semantic"
      • Field Name: ExampleInjectionStrategy
      • Display Name: Example Injection Strategy
      • SQL Data Type: nvarchar(20)
      • Default Value: Semantic
      • Value List Type: List
      • Possible Values
        • Rated
        • Recent
        • Semantic
      • Description: Strategy for selecting which examples to inject: Semantic (vector similarity), Recent (most recent first), or Rated (highest success score first).

      Returns "Recent" | "Rated" | "Semantic"

    • set ExampleInjectionStrategy(value: "Recent" | "Rated" | "Semantic"): void

      Parameters

      • value: "Recent" | "Rated" | "Semantic"

      Returns void

    • get ExampleRetentionDays(): number
      • Field Name: ExampleRetentionDays
      • Display Name: Example Retention Days
      • SQL Data Type: int
      • Default Value: 180
      • Description: Number of days to retain examples before archiving due to inactivity. Default 180. NULL means use system default.

      Returns number

    • set ExampleRetentionDays(value: number): void

      Parameters

      • value: number

      Returns void

    • get ExecutionMode(): "Parallel" | "Sequential"
      • Field Name: ExecutionMode
      • Display Name: Execution Mode
      • SQL Data Type: nvarchar(20)
      • Default Value: Sequential
      • Value List Type: List
      • Possible Values
        • Parallel
        • Sequential
      • Description: Controls how this agent's child agents are executed. Sequential runs children in order, Parallel runs them simultaneously.

      Returns "Parallel" | "Sequential"

    • set ExecutionMode(value: "Parallel" | "Sequential"): void

      Parameters

      • value: "Parallel" | "Sequential"

      Returns void

    • get ExecutionOrder(): number
      • Field Name: ExecutionOrder
      • Display Name: Execution Order
      • SQL Data Type: int
      • Default Value: 0
      • Description: The order in which this agent should be executed among its siblings under the same parent.

      Returns number

    • set ExecutionOrder(value: number): void

      Parameters

      • value: number

      Returns void

    • get ExposeAsAction(): boolean
      • Field Name: ExposeAsAction
      • Display Name: Expose As Action
      • SQL Data Type: bit
      • Default Value: 0
      • Description: When true, this agent can be exposed as an action for use by other agents. Only valid for root agents.

      Returns boolean

    • set ExposeAsAction(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get Fields(): EntityField[]

      Returns EntityField[]

    • get FinalPayloadValidation(): string
      • Field Name: FinalPayloadValidation
      • Display Name: Final Payload Validation
      • SQL Data Type: nvarchar(MAX)
      • Description: Optional JSON schema or requirements that define the expected structure and content of the agent's final payload. Used to validate the output when the agent declares success. Similar to OutputExample in AI Prompts.

      Returns string

    • set FinalPayloadValidation(value: string): void

      Parameters

      • value: string

      Returns void

    • get FinalPayloadValidationMaxRetries(): number
      • Field Name: FinalPayloadValidationMaxRetries
      • Display Name: Final Payload Validation Max Retries
      • SQL Data Type: int
      • Default Value: 3
      • Description: Maximum number of retry attempts allowed when FinalPayloadValidation fails with Retry mode. After reaching this limit, the validation will fail permanently.

      Returns number

    • set FinalPayloadValidationMaxRetries(value: number): void

      Parameters

      • value: number

      Returns void

    • get FinalPayloadValidationMode(): "Warn" | "Fail" | "Retry"
      • Field Name: FinalPayloadValidationMode
      • Display Name: Final Payload Validation Mode
      • SQL Data Type: nvarchar(25)
      • Default Value: Retry
      • Value List Type: List
      • Possible Values
        • Fail
        • Retry
        • Warn
      • Description: Determines how to handle validation failures when FinalPayloadValidation is specified. Options: Retry (default) - retry the agent with validation feedback, Fail - fail the agent run immediately, Warn - log a warning but allow success.

      Returns "Warn" | "Fail" | "Retry"

    • set FinalPayloadValidationMode(value: "Warn" | "Fail" | "Retry"): void

      Parameters

      • value: "Warn" | "Fail" | "Retry"

      Returns void

    • get FirstPrimaryKey(): EntityField

      Helper method to return just the first Primary Key

      Returns EntityField

    • get FunctionalRequirements(): string
      • Field Name: FunctionalRequirements
      • Display Name: Functional Requirements
      • SQL Data Type: nvarchar(MAX)
      • Description: Detailed markdown formatted requirements that explain the business goals of the agent without specific technical implementation details.

      Returns string

    • set FunctionalRequirements(value: string): void

      Parameters

      • value: string

      Returns void

    • get IconClass(): string
      • Field Name: IconClass
      • Display Name: Icon Class
      • SQL Data Type: nvarchar(100)
      • Description: Font Awesome icon class (e.g., fa-robot, fa-brain) for the agent. Used as fallback when LogoURL is not set or fails to load.

      Returns string

    • set IconClass(value: string): void

      Parameters

      • value: string

      Returns void

    • get ID(): string
      • Field Name: ID
      • Display Name: ID
      • SQL Data Type: uniqueidentifier
      • Default Value: newsequentialid()
      • Description: The unique identifier for each AI agent. Serves as the primary key.

      Returns string

    • set ID(value: string): void

      Parameters

      • value: string

      Returns void

    • get InjectExamples(): boolean
      • Field Name: InjectExamples
      • Display Name: Inject Examples
      • SQL Data Type: bit
      • Default Value: 0
      • Description: When enabled, agent examples will be automatically injected into the agent context based on scoping rules.

      Returns boolean

    • set InjectExamples(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get InjectNotes(): boolean
      • Field Name: InjectNotes
      • Display Name: Inject Notes
      • SQL Data Type: bit
      • Default Value: 1
      • Description: When enabled, agent notes will be automatically injected into the agent context based on scoping rules.

      Returns boolean

    • set InjectNotes(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get InlineStorageThresholdBytes(): number
      • Field Name: InlineStorageThresholdBytes
      • Display Name: Inline Storage Threshold (Bytes)
      • SQL Data Type: int
      • Description: File size threshold for inline storage. Files <= this size are stored as base64 inline, larger files use MJStorage. NULL uses system default (1MB). Set to 0 to always use MJStorage.

      Returns number

    • set InlineStorageThresholdBytes(value: number): void

      Parameters

      • value: number

      Returns void

    • get InvocationMode(): "Any" | "Sub-Agent" | "Top-Level"
      • Field Name: InvocationMode
      • Display Name: Invocation Mode
      • SQL Data Type: nvarchar(20)
      • Default Value: Any
      • Value List Type: List
      • Possible Values
        • Any
        • Sub-Agent
        • Top-Level
      • Description: Controls how the agent can be invoked: Any (default - can be top-level or sub-agent), Top-Level (only callable as primary agent), Sub-Agent (only callable as sub-agent). Used to filter available agents in tools like Sage.

      Returns "Any" | "Sub-Agent" | "Top-Level"

    • set InvocationMode(value: "Any" | "Sub-Agent" | "Top-Level"): void

      Parameters

      • value: "Any" | "Sub-Agent" | "Top-Level"

      Returns void

    • get ISAChild(): BaseEntity<unknown>

      Returns the child entity in the IS-A composition chain, or null if this entity has no child record, hasn't been loaded yet, or is an overlapping subtype parent (use ISAChildren instead for overlapping parents).

      Example: For a MeetingEntity where a Webinar record exists with the same PK, ISAChild returns the WebinarEntity instance.

      Returns BaseEntity<unknown>

    • get ISAChildren(): { entityName: string }[]

      For overlapping subtype parents (AllowMultipleSubtypes = true), returns the list of child entity type names that have records for this PK. For disjoint parents or non-parent entities, returns null (use ISAChild instead).

      Example: For a PersonEntity with AllowMultipleSubtypes=true, might return [{entityName: 'Members'}, {entityName: 'Volunteers'}, {entityName: 'Speakers'}].

      Returns { entityName: string }[]

    • get ISAParent(): BaseEntity<unknown>

      Returns the parent entity in the IS-A composition chain, or null if this entity is not an IS-A child type.

      Example: For a MeetingEntity that IS-A ProductEntity, ISAParent returns the ProductEntity instance.

      Named with ISA prefix to avoid collision with generated entity properties (many entities have a Parent string column in the database).

      Returns BaseEntity<unknown>

    • get ISAParentEntity(): BaseEntity<unknown>

      Returns BaseEntity<unknown>

      Use ISAParent instead. Kept for backward compatibility.

    • get IsBusy(): boolean

      Returns true if any operation (Save, Delete, or Load) is currently in progress. This is a convenience property that combines IsSaving, IsDeleting, and IsLoading. Useful for disabling UI elements when any database operation is happening.

      Returns boolean

    • get IsDeleting(): boolean

      Returns true if a Delete operation is currently in progress. This is useful for UI components to show loading indicators or disable buttons while deleting.

      Returns boolean

    • get IsLoading(): boolean

      Returns true if a Load operation is currently in progress. This is useful for UI components to show loading indicators while data is being fetched.

      Returns boolean

    • get IsRestricted(): boolean
      • Field Name: IsRestricted
      • Display Name: Is Restricted
      • SQL Data Type: bit
      • Default Value: 0
      • Description: When true, agent is restricted to system/scheduled use only and hidden from user selection, Agent Manager, and MCP/A2A discovery.

      Returns boolean

    • set IsRestricted(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get IsSaved(): boolean

      Returns true if the record has been saved to the database, false otherwise. This is a useful property to check to determine if the record is a "New Record" or an existing one.

      Returns boolean

    • get IsSaving(): boolean

      Returns true if a Save operation is currently in progress. This is useful for UI components to show loading indicators or disable buttons while saving.

      Returns boolean

    • get LatestResult(): BaseEntityResult

      Returns the most recent result from the result history. If there are no results in the history, this method will return null.

      Returns BaseEntityResult

    • get LeafEntity(): BaseEntity

      Returns the leaf (most-derived) entity in the IS-A chain, walking downward through child references. Returns this if no child exists.

      For overlapping subtype parents (AllowMultipleSubtypes = true), returns this because there is no single child chain to follow — the parent is the leaf from its own perspective.

      Returns BaseEntity

    • get LogoURL(): string
      • Field Name: LogoURL
      • Display Name: Logo URL
      • SQL Data Type: nvarchar(255)
      • Description: URL to an image file or base64 data URI (e.g., data:image/png;base64,...) for the agent logo. Takes precedence over IconClass in UI display.

      Returns string

    • set LogoURL(value: string): void

      Parameters

      • value: string

      Returns void

    • get MaxCostPerRun(): number
      • Field Name: MaxCostPerRun
      • Display Name: Max Cost Per Run
      • SQL Data Type: decimal(10, 4)
      • Description: Maximum cost in dollars allowed for a single agent run. Run will be terminated if this limit is exceeded.

      Returns number

    • set MaxCostPerRun(value: number): void

      Parameters

      • value: number

      Returns void

    • get MaxExamplesToInject(): number
      • Field Name: MaxExamplesToInject
      • Display Name: Max Examples To Inject
      • SQL Data Type: int
      • Default Value: 3
      • Description: Maximum number of examples to inject into agent context per request.

      Returns number

    • set MaxExamplesToInject(value: number): void

      Parameters

      • value: number

      Returns void

    • get MaxExecutionsPerRun(): number
      • Field Name: MaxExecutionsPerRun
      • Display Name: Max Executions Per Run
      • SQL Data Type: int
      • Description: When acting as a sub-agent, maximum number of times this agent can be executed per parent agent run

      Returns number

    • set MaxExecutionsPerRun(value: number): void

      Parameters

      • value: number

      Returns void

    • get MaxIterationsPerRun(): number
      • Field Name: MaxIterationsPerRun
      • Display Name: Max Iterations Per Run
      • SQL Data Type: int
      • Description: Maximum number of prompt iterations allowed for a single agent run. Run will be terminated if this limit is exceeded.

      Returns number

    • set MaxIterationsPerRun(value: number): void

      Parameters

      • value: number

      Returns void

    • get MaxMessages(): number
      • Field Name: MaxMessages
      • Display Name: Max Messages
      • SQL Data Type: int
      • Description: Maximum number of conversation messages to include when MessageMode is 'Latest' or 'Bookend'. NULL means no limit (ignored for 'None' and 'All' modes). Must be greater than 0 if specified. For 'Latest': keeps most recent N messages. For 'Bookend': keeps first 2 + most recent (N-2) messages.

      Returns number

    • set MaxMessages(value: number): void

      Parameters

      • value: number

      Returns void

    • get MaxNotesToInject(): number
      • Field Name: MaxNotesToInject
      • Display Name: Max Notes To Inject
      • SQL Data Type: int
      • Default Value: 5
      • Description: Maximum number of notes to inject into agent context per request.

      Returns number

    • set MaxNotesToInject(value: number): void

      Parameters

      • value: number

      Returns void

    • get MaxTimePerRun(): number
      • Field Name: MaxTimePerRun
      • Display Name: Max Time Per Run
      • SQL Data Type: int
      • Description: Maximum time in seconds allowed for a single agent run. Run will be terminated if this limit is exceeded.

      Returns number

    • set MaxTimePerRun(value: number): void

      Parameters

      • value: number

      Returns void

    • get MaxTokensPerRun(): number
      • Field Name: MaxTokensPerRun
      • Display Name: Max Tokens Per Run
      • SQL Data Type: int
      • Description: Maximum total tokens (input + output) allowed for a single agent run. Run will be terminated if this limit is exceeded.

      Returns number

    • set MaxTokensPerRun(value: number): void

      Parameters

      • value: number

      Returns void

    • get MessageMode(): "None" | "All" | "Bookend" | "Latest"
      • Field Name: MessageMode
      • Display Name: Message Mode
      • SQL Data Type: nvarchar(50)
      • Default Value: None
      • Value List Type: List
      • Possible Values
        • All
        • Bookend
        • Latest
        • None
      • Description: Specifies how conversation messages are passed from parent agent to this child sub-agent (when this agent is a child via ParentID). Valid values: 'None' (fresh start - only context and task message, default), 'All' (all parent conversation history), 'Latest' (most recent MaxMessages messages), 'Bookend' (first 2 messages + most recent MaxMessages-2 messages with indicator between). Stored on child agent because each child has only one parent relationship.

      Returns "None" | "All" | "Bookend" | "Latest"

    • set MessageMode(value: "None" | "All" | "Bookend" | "Latest"): void

      Parameters

      • value: "None" | "All" | "Bookend" | "Latest"

      Returns void

    • get MinExecutionsPerRun(): number
      • Field Name: MinExecutionsPerRun
      • Display Name: Min Executions Per Run
      • SQL Data Type: int
      • Description: When acting as a sub-agent, minimum number of times this agent must be executed per parent agent run

      Returns number

    • set MinExecutionsPerRun(value: number): void

      Parameters

      • value: number

      Returns void

    • get Models(): MJAIAgentModelEntity[]

      Returns MJAIAgentModelEntity[]

      • models are associated with prompts now
    • get ModelSelectionMode(): "Agent" | "Agent Type"
      • Field Name: ModelSelectionMode
      • Display Name: Model Selection Mode
      • SQL Data Type: nvarchar(50)
      • Default Value: Agent Type
      • Value List Type: List
      • Possible Values
        • Agent
        • Agent Type
      • Description: Controls whether model selection is driven by the Agent Type's system prompt or the Agent's specific prompt. Default is Agent Type for backward compatibility.

      Returns "Agent" | "Agent Type"

    • set ModelSelectionMode(value: "Agent" | "Agent Type"): void

      Parameters

      • value: "Agent" | "Agent Type"

      Returns void

    • get Name(): string
      • Field Name: Name
      • Display Name: Name
      • SQL Data Type: nvarchar(255)
      • Description: The name of the AI agent.

      Returns string

    • set Name(value: string): void

      Parameters

      • value: string

      Returns void

    • get NoteInjectionStrategy(): "All" | "Recent" | "Relevant"
      • Field Name: NoteInjectionStrategy
      • Display Name: Note Injection Strategy
      • SQL Data Type: nvarchar(20)
      • Default Value: Relevant
      • Value List Type: List
      • Possible Values
        • All
        • Recent
        • Relevant
      • Description: Strategy for selecting which notes to inject: Relevant (semantic search), Recent (most recent first), or All (up to max limit).

      Returns "All" | "Recent" | "Relevant"

    • set NoteInjectionStrategy(value: "All" | "Recent" | "Relevant"): void

      Parameters

      • value: "All" | "Recent" | "Relevant"

      Returns void

    • get NoteRetentionDays(): number
      • Field Name: NoteRetentionDays
      • Display Name: Note Retention Days
      • SQL Data Type: int
      • Default Value: 90
      • Description: Number of days to retain notes before archiving due to inactivity. Default 90. NULL means use system default.

      Returns number

    • set NoteRetentionDays(value: number): void

      Parameters

      • value: number

      Returns void

    • get OwnerUser(): string
      • Field Name: OwnerUser
      • Display Name: Owner User
      • SQL Data Type: nvarchar(100)

      Returns string

    • get OwnerUserID(): string
      • Field Name: OwnerUserID
      • Display Name: Owner User
      • SQL Data Type: uniqueidentifier
      • Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
      • Default Value: ECAFCCEC-6A37-EF11-86D4-000D3A4E707E
      • Description: The user who owns and created this AI agent. Automatically set to the current user if not specified. Owner has full permissions (view, run, edit, delete) regardless of ACL entries.

      Returns string

    • set OwnerUserID(value: string): void

      Parameters

      • value: string

      Returns void

    • get Parent(): string
      • Field Name: Parent
      • Display Name: Parent
      • SQL Data Type: nvarchar(255)

      Returns string

    • get ParentID(): string
      • Field Name: ParentID
      • Display Name: Parent
      • SQL Data Type: uniqueidentifier
      • Related Entity/Foreign Key: MJ: AI Agents (vwAIAgents.ID)
      • Description: References the parent agent in the hierarchical structure. If NULL, this is a root (top-level) agent.

      Returns string

    • set ParentID(value: string): void

      Parameters

      • value: string

      Returns void

    • get PayloadDownstreamPaths(): string
      • Field Name: PayloadDownstreamPaths
      • Display Name: Payload Downstream Paths
      • SQL Data Type: nvarchar(MAX)
      • Default Value: ["*"]
      • Description: JSON array of paths that define which parts of the payload should be sent downstream to sub-agents. Use [""] to send entire payload, or specify paths like ["customer.id", "campaign.", "analysis.sentiment"]

      Returns string

    • set PayloadDownstreamPaths(value: string): void

      Parameters

      • value: string

      Returns void

    • get PayloadScope(): string
      • Field Name: PayloadScope
      • Display Name: Payload Scope
      • SQL Data Type: nvarchar(MAX)
      • Description: Defines the scope/path within the parent payload that this sub-agent operates on. When set, the sub-agent receives only this portion of the payload and all change requests are relative to this scope. Format: /path/to/scope (e.g. /PropA/SubProp1)

      Returns string

    • set PayloadScope(value: string): void

      Parameters

      • value: string

      Returns void

    • get PayloadSelfReadPaths(): string
      • Field Name: PayloadSelfReadPaths
      • Display Name: Payload Self Read Paths
      • SQL Data Type: nvarchar(MAX)
      • Description: JSON array of paths that specify what parts of the payload the agent's own prompt can read. Controls downstream data flow when the agent executes its own prompt step.

      Returns string

    • set PayloadSelfReadPaths(value: string): void

      Parameters

      • value: string

      Returns void

    • get PayloadSelfWritePaths(): string
      • Field Name: PayloadSelfWritePaths
      • Display Name: Payload Self Write Paths
      • SQL Data Type: nvarchar(MAX)
      • Description: JSON array of paths that specify what parts of the payload the agent's own prompt can write back. Controls upstream data flow when the agent executes its own prompt step.

      Returns string

    • set PayloadSelfWritePaths(value: string): void

      Parameters

      • value: string

      Returns void

    • get PayloadUpstreamPaths(): string
      • Field Name: PayloadUpstreamPaths
      • Display Name: Payload Upstream Paths
      • SQL Data Type: nvarchar(MAX)
      • Default Value: ["*"]
      • Description: JSON array of paths that define which parts of the payload sub-agents are allowed to write back upstream. Use [""] to allow all writes, or specify paths like ["analysis.results", "recommendations."]

      Returns string

    • set PayloadUpstreamPaths(value: string): void

      Parameters

      • value: string

      Returns void

    • get PrimaryKey(): CompositeKey

      Returns the primary key for the record. The CompositeKey class is a multi-valued key that can have any number of key/value pairs within it. Always traverse the full set of key/value pairs to get the full primary key for the record.

      Returns CompositeKey

    • get PrimaryKeys(): EntityField[]

      Returns an array of all primary key fields for the entity. If the entity has a composite primary key, this method will return an array of all primary key fields. If the entity has a single primary key, this method will return an array with a single field in it.

      Returns EntityField[]

    • get ProviderToUse(): IEntityDataProvider

      Returns this provider to be used for a given instance of a BaseEntity derived subclass. If the provider is not set, the BaseEntity.Provider is returned.

      Returns IEntityDataProvider

    • get ProviderTransaction(): unknown

      Gets the provider transaction handle for IS-A chain orchestration.

      Returns unknown

    • set ProviderTransaction(value: unknown): void

      Sets the provider transaction handle. Used during IS-A save/delete to share a single database transaction across the entire parent chain.

      Parameters

      • value: unknown

      Returns void

    • get RecordChanges(): Promise<RecordChange[]>

      Returns a list of changes made to this record, over time. Only works if TrackRecordChanges bit set to 1 on the entity you're working with.

      Returns Promise<RecordChange[]>

    • get RecordingDefault(): "None" | "Audio" | "AudioVideo"
      • Field Name: RecordingDefault
      • Display Name: Recording Default
      • SQL Data Type: nvarchar(20)
      • Value List Type: List
      • Possible Values
        • Audio
        • AudioVideo
        • None
      • Description: Agent-level default recording media for realtime sessions: None, Audio, or AudioVideo. Overridden per session by a runtime parameter; if unset, recording is OFF. Capture only runs when a storage provider is resolvable (RecordingStorageProviderID, else the agent's AttachmentStorageProviderID) AND consent is satisfied.

      Returns "None" | "Audio" | "AudioVideo"

    • set RecordingDefault(value: "None" | "Audio" | "AudioVideo"): void

      Parameters

      • value: "None" | "Audio" | "AudioVideo"

      Returns void

    • get RecordingStorageProvider(): string
      • Field Name: RecordingStorageProvider
      • Display Name: Recording Storage Provider Name
      • SQL Data Type: nvarchar(50)

      Returns string

    • get RecordingStorageProviderID(): string
      • Field Name: RecordingStorageProviderID
      • Display Name: Recording Storage Provider
      • SQL Data Type: uniqueidentifier
      • Related Entity/Foreign Key: MJ: File Storage Providers (vwFileStorageProviders.ID)
      • Description: OPTIONAL override for where session recordings are stored. When NULL, recordings fall back to the agent's AttachmentStorageProviderID. Set this only when recordings must live in a different storage account than attachments.

      Returns string

    • set RecordingStorageProviderID(value: string): void

      Parameters

      • value: string

      Returns void

    • get RecordLoaded(): boolean

      Returns true if the record has been loaded from the database, false otherwise. This is useful to check to see if the record is in a "New Record" state or not.

      Returns boolean

    • get RequirePlanMode(): boolean
      • Field Name: RequirePlanMode
      • Display Name: Require Plan Mode
      • SQL Data Type: bit
      • Default Value: 0
      • Description: When 1, every root-level run of this agent executes in plan mode regardless of the per-request planMode flag — the agent must present a plan and receive human approval before any Actions or Sub-Agent steps execute. SupportsPlanMode is irrelevant when this is set. Use for high-consequence agents (e.g. ones with outbound-communication capabilities) where human-in-the-loop review is mandatory.

      Returns boolean

    • set RequirePlanMode(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get RerankerConfiguration(): string
      • Field Name: RerankerConfiguration
      • Display Name: Reranker Configuration
      • SQL Data Type: nvarchar(MAX)
      • Description: JSON configuration for optional reranking of retrieved memory items. Schema: { enabled: boolean, rerankerModelId: string, retrievalMultiplier: number (default 3), minRelevanceThreshold: number (default 0.5), rerankPromptId?: string, contextFields?: string[], fallbackOnError: boolean (default true) }. When null or disabled, vector search results are used directly without reranking.

      Returns string

    • set RerankerConfiguration(value: string): void

      Parameters

      • value: string

      Returns void

    • get RestoreContext(): RestoreContext

      Returns the active restore context for the next save, if any.

      Read by the data provider when generating the RecordChange SQL: when non-null, the resulting RecordChange row is written with Source='Restore', RestoredFromID = SourceChangeID, and RestoreReason = Reason. Returns null for ordinary saves.

      Returns RestoreContext

    • get ResultHistory(): BaseEntityResult[]

      The result history shows the history of the attempted transactions (Save and Delete) for this particular entity object. This is useful for tracking the results of operations on the entity object.

      Returns BaseEntityResult[]

    • get RootDefaultCoAgentID(): string
      • Field Name: RootDefaultCoAgentID
      • Display Name: Root Default Co-Agent ID
      • SQL Data Type: uniqueidentifier

      Returns string

    • get RootEntity(): BaseEntity

      Returns the root (least-derived) entity in the IS-A chain, walking upward through parent references. Returns this if no parent exists.

      Returns BaseEntity

    • get RootParentID(): string
      • Field Name: RootParentID
      • Display Name: Root Parent ID
      • SQL Data Type: uniqueidentifier

      Returns string

    • get RunQueryProviderToUse(): IRunQueryProvider

      Returns the RunQueryProvider to be used for a given instance of a BaseEntity derived subclass.

      Returns IRunQueryProvider

    • get RunReportProviderToUse(): IRunReportProvider

      Returns the RunReportProvider to be used for a given instance of a BaseEntity derived subclass.

      Returns IRunReportProvider

    • get RunViewProviderToUse(): IRunViewProvider

      Returns the RunViewProvider to be used for a given instance of a BaseEntity derived subclass.

      Returns IRunViewProvider

    • get ScopeConfig(): string
      • Field Name: ScopeConfig
      • Display Name: Scope Configuration
      • SQL Data Type: nvarchar(MAX)
      • Description: JSON configuration defining scope dimensions for multi-tenant deployments. Example: {"dimensions":[{"name":"OrganizationID","entityId":"...","isPrimary":true,"required":true},{"name":"ContactID","entityId":"...","isPrimary":false,"required":false}],"inheritanceMode":"cascading"}

      Returns string

    • set ScopeConfig(value: string): void

      Parameters

      • value: string

      Returns void

    • get SearchScopeAccess(): "None" | "All" | "Assigned"
      • Field Name: SearchScopeAccess
      • Display Name: Search Scope Access
      • SQL Data Type: nvarchar(20)
      • Default Value: None
      • Value List Type: List
      • Possible Values
        • All
        • Assigned
        • None
      • Description: Controls the agent's search capability. All = may use any scope including Global; search action does not restrict. Assigned = may use ONLY scopes explicitly linked via AIAgentSearchScope; scoped search action enforces this. None = agent has no search capability; the scoped search action rejects all requests.

      Returns "None" | "All" | "Assigned"

    • set SearchScopeAccess(value: "None" | "All" | "Assigned"): void

      Parameters

      • value: "None" | "All" | "Assigned"

      Returns void

    • get SkillActivationMode(): "Auto" | "RequestedOnly"
      • Field Name: SkillActivationMode
      • Display Name: Skill Activation Mode
      • SQL Data Type: nvarchar(20)
      • Default Value: RequestedOnly
      • Value List Type: List
      • Possible Values
        • Auto
        • RequestedOnly
      • Description: Controls whether this agent may ever self-activate skills from its prompt catalog. Auto: the agent sees its allowed skills whose own ActivationMode is Auto (double gate) and may activate them mid-run on its own judgment. RequestedOnly (default): the agent's prompt catalog is empty and skills only enter a run via an explicit user request (/skill mention). Orthogonal to AcceptsSkills, which governs which skills are available at all; this governs who may pull the activation trigger.

      Returns "Auto" | "RequestedOnly"

    • set SkillActivationMode(value: "Auto" | "RequestedOnly"): void

      Parameters

      • value: "Auto" | "RequestedOnly"

      Returns void

    • get SkipEmbeddings(): boolean

      Returns boolean

    • set SkipEmbeddings(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get StartingPayloadValidation(): string
      • Field Name: StartingPayloadValidation
      • Display Name: Starting Payload Validation
      • SQL Data Type: nvarchar(MAX)
      • Description: Optional JSON schema validation to apply to the input payload before agent execution begins. Uses the same JSONValidator format as FinalPayloadValidation.

      Returns string

    • set StartingPayloadValidation(value: string): void

      Parameters

      • value: string

      Returns void

    • get StartingPayloadValidationMode(): "Warn" | "Fail"
      • Field Name: StartingPayloadValidationMode
      • Display Name: Starting Payload Validation Mode
      • SQL Data Type: nvarchar(25)
      • Default Value: Fail
      • Value List Type: List
      • Possible Values
        • Fail
        • Warn
      • Description: Determines how to handle StartingPayloadValidation failures. Fail = reject invalid input, Warn = log warning but proceed.

      Returns "Warn" | "Fail"

    • set StartingPayloadValidationMode(value: "Warn" | "Fail"): void

      Parameters

      • value: "Warn" | "Fail"

      Returns void

    • get Status(): "Pending" | "Active" | "Disabled"
      • Field Name: Status
      • Display Name: Status
      • SQL Data Type: nvarchar(20)
      • Default Value: Pending
      • Value List Type: List
      • Possible Values
        • Active
        • Disabled
        • Pending
      • Description: Current status of the AI agent. Active agents can be executed, Disabled agents are inactive, and Pending agents are awaiting configuration or approval. Allowed values: Active, Disabled, Pending.

      Returns "Pending" | "Active" | "Disabled"

    • set Status(value: "Pending" | "Active" | "Disabled"): void

      Parameters

      • value: "Pending" | "Active" | "Disabled"

      Returns void

    • get SupportsPlanMode(): boolean
      • Field Name: SupportsPlanMode
      • Display Name: Supports Plan Mode
      • SQL Data Type: bit
      • Default Value: 1
      • Description: Whether this agent supports Plan Mode. Defaults ON (opt-out). Plan-mode instructions are only injected when this is on AND plan mode is enabled per-request, so default runtime behavior is unchanged. Realtime agents are seeded to 0 (they skip plan mode structurally); Remote Proxy agents will be seeded when that type ships.

      Returns boolean

    • set SupportsPlanMode(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get TechnicalDesign(): string
      • Field Name: TechnicalDesign
      • Display Name: Technical Design
      • SQL Data Type: nvarchar(MAX)
      • Description: Detailed markdown that explains the structure of the agent including agent architecture, actions, sub-agents, prompts, and payload structure.

      Returns string

    • set TechnicalDesign(value: string): void

      Parameters

      • value: string

      Returns void

    • get TransactionGroup(): TransactionGroupBase

      Transaction Groups are used to group multiple transactions into a single ATOMic transaction in a database. They are also useful even in situations with ATOMicity is less important but you want to submit a group of changes to the API server in a single network call.

      Returns TransactionGroupBase

    • set TransactionGroup(group: TransactionGroupBase): void

      Parameters

      Returns void

    • get Type(): string
      • Field Name: Type
      • Display Name: Type
      • SQL Data Type: nvarchar(100)

      Returns string

    • get TypeConfiguration(): string
      • Field Name: TypeConfiguration
      • Display Name: Type Configuration
      • SQL Data Type: nvarchar(MAX)
      • Description: Agent-type-specific configuration JSON, validated against the agent type's ConfigSchema (when one is published) in the server-side entity subclass. For Realtime-type co-agents this holds the realtime profile: preferred model, per-provider voice settings, tone/speaking style (folded into the session system prompt at mint), user-override policy, and narration pacing. Null = type defaults apply.

      Returns string

    • set TypeConfiguration(value: string): void

      Parameters

      • value: string

      Returns void

    • get TypeID(): string
      • Field Name: TypeID
      • Display Name: Type
      • SQL Data Type: uniqueidentifier
      • Related Entity/Foreign Key: MJ: AI Agent Types (vwAIAgentTypes.ID)
      • Description: Reference to the AIAgentType that defines the category and system-level behavior for this agent. Cannot be null.

      Returns string

    • set TypeID(value: string): void

      Parameters

      • value: string

      Returns void

    • get Vectors(): Map<string, number[]>

      Utility storage for vector embeddings that represent the active record. Each string in the Map can be any unique key relative to the object so you can use this to track vectors associated with

      Returns Map<string, number[]>

    • get BaseEventCode(): string

      When a BaseEntity class raises an event with MJGlobal, the eventCode property is set to this value. This is used to identify events that are raised by BaseEntity objects. Any MJGlobal event that is raised by a BaseEntity class will use a BaseEntityEvent type as the args parameter

      Returns string

    • get Provider(): IEntityDataProvider

      Static property to get/set the IEntityDataProvider that is used by all BaseEntity objects. This is a global setting that is used by all BaseEntity objects. It can be overriden for a given BaseEntity object instance by passing in a provider to the constructor of the BaseEntity object. Typically, a provider will pass itself into BaseEntity objects it creates to create a tight coupling between the provider and the BaseEntity objects it creates. This allows multiple concurrent connections to exist in the same process space without interfering with each other.

      Returns IEntityDataProvider

    • set Provider(value: IEntityDataProvider): void

      Parameters

      Returns void

    Methods

    • Cascade-deletes an IS-A child record when the parent entity has CascadeDeletes enabled. Loads the child entity, then deletes it through the normal IS-A chain. The child's delete will cascade further down if it also has children and CascadeDeletes.

      Parameters

      • childCheck: { ChildEntityName: string; HasChildren: boolean }
      • parentOptions: EntityDeleteOptions

      Returns Promise<boolean>

    • Checks if this entity has any child records in IS-A child entity tables. Used for parent delete protection — a parent record cannot be deleted while child type records referencing it still exist.

      Returns Promise<{ ChildEntityName: string; HasChildren: boolean }>

      Object with HasChildren flag and the name of the child entity found

    • Clears any pending restore context. Safe to call when no context is set. Recommended after Save() returns so a subsequent ordinary save isn't accidentally tagged as a restore.

      Returns void

    • This method MUST be called right after the class is instantiated to provide an async/await pair for any asynchronous operations a given entity needs to do when it is first created/configured. When you call Metadata/Provider GetEntityObject() this is done automatically for you. In nearly all cases you should go through GetEntityObject() anyway and not ever directly instantiate a BaseEntity derived class.

      Parameters

      Returns Promise<void>

    • This method will copy the values from the other entity object into the current one. This is useful for things like cloning a record. This method will ONLY copy values for fields that exist in the current entity object. If the other object has fields that don't exist in the current object, they will be ignored.

      Parameters

      • other: BaseEntity

        the other entity object to copy values from

      • OptionalincludePrimaryKeys: boolean

        if true, the primary keys will be copied as well, if false, they will be ignored, defaults to false and generally you want to leave it that way

      • OptionalreplaceOldValues: boolean

        if true, the old values of the fields will be reset to the values provided in the other parameter, if false, they will be left alone, defaults to false and generally you want to leave it that way

      Returns boolean

    • MJ: AI Agents - Delete method override to wrap in transaction since CascadeDeletes is true. Wrapping in a transaction ensures that all cascade delete operations are handled atomically.

      Parameters

      Returns Promise<boolean>

      • true if successful, false otherwise

      MJAIAgentEntity

    • In the BaseEntity class this method is not implemented. This method shoudl be implemented only in server-side sub-classes only by calling AIEngine or other methods to generate embeddings for a given piece of text provided. Subclasses that override this method to implement embedding support should also override

      Parameters

      • textToEmbed: string

      Returns Promise<SimpleEmbeddingResult>

      SupportsEmbedTextLocal and return true

    • Enforces disjoint subtype constraint during IS-A child entity creation. A parent record can only be ONE child type at a time. Checks all sibling child types (excluding self) for records with the same PK value. Throws if a sibling child record is found.

      Only called when the parent entity has AllowMultipleSubtypes = false (default). When AllowMultipleSubtypes = true, this check is skipped entirely, allowing overlapping subtypes (e.g., a Person can be both a Member and a Volunteer).

      Only runs on Database providers — client-side (Network/GraphQL) skips this because the server-side save will perform the check authoritatively.

      Returns Promise<void>

    • Returns a promise that resolves when the current Delete operation completes. If no Delete operation is in progress, resolves immediately.

      This is useful when you need to ensure a record is deleted before performing cleanup operations or navigating away from a view.

      Returns Promise<void>

      // Ensure any in-progress delete is complete before proceeding
      await entity.EnsureDeleteComplete();
      // Now safe to navigate away or perform cleanup
      navigateToList();
    • Returns a promise that resolves when the current Load operation completes. If no Load operation is in progress, resolves immediately.

      This is useful when you need to ensure data is loaded before accessing entity properties or performing operations that depend on loaded data.

      Returns Promise<void>

      // Ensure any in-progress load is complete before proceeding
      await entity.EnsureLoadComplete();
      // Now safe to access entity data
      console.log(entity.Name);
    • Returns a promise that resolves when the current Save operation completes. If no Save operation is in progress, resolves immediately.

      This is useful when you need to ensure data is persisted before performing a dependent operation, or when coordinating between multiple components that might trigger saves.

      Returns Promise<void>

      // Ensure any in-progress save is complete before proceeding
      await entity.EnsureSaveComplete();
      // Now safe to perform operations that depend on the saved state
      await someOperationThatNeedsSavedData(entity);
    • Strongly-typed wrapper for the SetMany method.

      Type Parameters

      • K extends AnyZodObject

      Parameters

      • data: unknown
      • Optionalschema: TypeOf<K>

        the zod schema to validate the data against

      Returns boolean

      data - the data to set on the entity object

    • Generates a vector embedding for a single text field using AI engine. Only generates embeddings for new records or when the source field has changed. Stores both the vector embedding and the model ID used to generate it.

      Parameters

      • field: EntityField

        The EntityField containing the text to embed

      • vectorField: EntityField

        The EntityField to store the generated vector embedding (as JSON string)

      • modelField: EntityField

        The EntityField to store the ID of the AI model used

      Returns Promise<boolean>

      Promise that resolves to true if embedding was generated successfully, false otherwise

    • Generates a vector embedding for a single text field identified by field name. Retrieves the field objects and delegates to GenerateEmbedding method.

      Parameters

      • fieldName: string

        Name of the text field to generate embedding from

      • vectorFieldName: string

        Name of the field to store the vector embedding

      • modelFieldName: string

        Name of the field to store the model ID used for embedding

      Returns Promise<boolean>

      Promise that resolves to true if embedding was generated successfully, false otherwise

    • Generates vector embeddings for multiple text fields using EntityField objects. Processes fields in parallel for better performance.

      Parameters

      • fields: { field: EntityField; modelField: EntityField; vectorField: EntityField }[]

        Array of field configurations with EntityField objects for source, vector, and model fields

      Returns Promise<boolean>

      Promise that resolves to true if all embeddings were generated successfully, false if any failed

    • Generates vector embeddings for multiple text fields by their field names. Processes fields in parallel for better performance.

      Parameters

      • fields: { fieldName: string; modelFieldName: string; vectorFieldName: string }[]

        Array of field configurations specifying source text field, target vector field, and model ID field names

      Returns Promise<boolean>

      Promise that resolves to true if all embeddings were generated successfully, false if any failed

    • Returns the value of the field with the given name. If the field is a date, and the value is a string, it will be converted to a date object.

      For IS-A child entities, parent fields return the authoritative value from _parentEntity.Get() (recursive for N-level chains), NOT the mirrored value on the child's own Fields array.

      Parameters

      • FieldName: string

      Returns any

    • NOTE: Do not call this method directly. Use the To method instead

      Utility method to create an object and return it with properties in the newly created and returned object for each field in the entity object. This is useful for scenarios where you need to be able to persist the data in a format to send to a network call, save to a file or database, etc. This method will return an object with properties that match the field names of the entity object.

      Parameters

      • OptionaloldValues: boolean

        When set to true, the old values of the fields will be returned instead of the current values.

      • OptionalonlyDirtyFields: boolean

        When set to true, only the fields that are dirty will be returned.

      Returns any

    • Returns a partial object that contains only the fields that have changed since the last time the record was saved. This is useful for scenarios where you want to send only the changes to the server or to a client. It is also helpful for quickly finding the fields that are "dirty".

      Returns Partial<T>

    • This utility method generates a completely new object that has properties that map to the fields and values in the entity at the time it is called. It is a copy, NOT a link, so any changes made to the object after calling this method will NOT be reflected in the object that is returned. This is useful for things like sending data to a client, or for use in a view model.

      Parameters

      Returns Promise<any>

    • This utility method calls GetDataObject() internally and formats the result as a JSON string. If you want to get the data as an object instead of a string, call GetDataObject() directly.

      Parameters

      Returns Promise<string>

    • Convenience method to access a field by code name. This method is case-insensitive and will return null if the field is not found.

      Parameters

      • codeName: string

      Returns EntityField

    • Convenience method to access a field by name. This method is case-insensitive and will return null if the field is not found. You can do the same thing with more fine tune controlled by accessing the Fields property directly.

      Parameters

      • fieldName: string

      Returns EntityField

    • Utility method to return the Name of the record (the value of the column that comes back from EntityInfo.NameField) from the current object. This avoids needing a network round trip to get the record name whenever we have the object already loaded in memory.

      Returns any

    • Resets this entity to a pristine state and populates it from the provided data object.

      Unlike SetMany, which incrementally updates existing field values, Hydrate() first resets ALL internal state — fields, composite key cache, loaded/saved flags — then populates from the provided data as if loading a fresh record from the database.

      This is critical for IS-A (table-per-type) inheritance: when a child entity loads its record, parent entities in the chain must be fully reset and re-populated from the child's view data, including the shared primary key. After init(), each EntityField's _NeverSet flag is true, allowing even ReadOnly PK fields to be set exactly once via SetMany.

      After population, entities are automatically marked as saved/loaded when all PK values are present (via UpdateSavedStateFromPrimaryKeys).

      The parent chain is handled recursively: if this entity has an IS-A parent, the parent is hydrated first (deepest ancestor first) via SetMany's built-in routing.

      Parameters

      • data: Record<string, unknown>

        A plain object whose properties map to field names on this entity (and potentially parent entities in the IS-A chain).

      Returns void

    • Discovers and initializes the IS-A child entity for a loaded record.

      After a record is loaded, this method checks whether a more-derived child entity record exists with the same primary key. If found, it creates the child entity instance, shares the current instance chain (so child._parentEntity === this), and recursively discovers further children down the hierarchy.

      This ensures that Save/Delete operations always delegate to the leaf entity, running the full validation and event chain at every level.

      Must be called AFTER a record is loaded (PK must be available). Skipped for entities that are not parent types or have already been discovered.

      Returns Promise<void>

    • Initializes the IS-A parent entity composition chain. For child type entities, this creates the parent entity instance (and recursively its parent, etc.) and caches the parent field name set for routing.

      Must be called AFTER EntityInfo is available but BEFORE any Load/NewRecord/Set/Get. This is called by Metadata.GetEntityObject() after constructing the entity.

      Returns Promise<void>

      • This method loads a single record from the database. Make sure you first get the correct BaseEntity sub-class for your entity by calling Metadata.GetEntityObject() first. From there, you can call this method to load your records.
      • NOTE: You should not be calling this method directly from outside of a sub-class in most cases. You will use the auto-generated sub-classes that have overriden versions of this method that blow out the primary keys into individual parameters. This is much easier to program against.

      Parameters

      • CompositeKey: CompositeKey

        Wrapper that holds an array of objects that contain the field name and value for the primary key of the record you want to load. For example, if you have a table called "Customers" with a primary key of "ID", you would pass in an array with a single object like this: {FieldName: "ID", Value: 1234}. *If you had a composite primary key, you would pass in an array with multiple objects, one for each field in the primary key. You may ONLY pass in the primary key fields, no other fields are allowed.

      • OptionalEntityRelationshipsToLoad: string[]

        Optional, you can specify the names of the relationships to load up. This is an expensive operation as it loads up an array of the related entity objects for the main record, so use it sparingly.

      Returns Promise<boolean>

      true if success, false otherwise

    • Loads the MJ: AI Agents record from the database

      Parameters

      • ID: string
      • OptionalEntityRelationshipsToLoad: string[]

        (optional) the relationships to load

      Returns Promise<boolean>

      • true if successful, false otherwise

      MJAIAgentEntity

    • Loads entity data from a plain object, typically from database query results.

      This method is meant to be used only in situations where you are sure that the data you are loading is current in the database. MAKE SURE YOU ARE PASSING IN ALL FIELDS. The Dirty flags and other internal state will assume what is loading from the data parameter you pass in is equivalent to what is in the database.

      Parameters

      • data: any

        A simple object that has properties that match the field names of the entity object

      • Optional_replaceOldValues: boolean

      Returns Promise<boolean>

      Promise - Returns true if the load was successful

      Generally speaking, you should use Load() instead of this method. The main use cases where this makes sense are:

      1. On the server if you are pulling data you know is fresh from the result of another DB operation
      2. If on any tier you run a fresh RunView result that gives you data from the database
      3. When the RunView Object RunView() method is called with ResultType='entity_object'

      Important for Subclasses: As of v2.53.0, this method is now async to support subclasses that need to perform additional asynchronous loading operations (e.g., loading related data, fetching additional metadata).

      Subclasses that need to perform additional loading should override BOTH this method AND Load() to ensure consistent behavior regardless of how the entity is populated. This is because these two methods have different execution paths:

      • Load() fetches data from the network/database and then calls provider-specific loading
      • LoadFromData() is called when data is already available (e.g., from RunView results)
      // Subclass implementation
      public override async LoadFromData(data: any, replaceOldValues: boolean = false): Promise<boolean> {
      const result = await super.LoadFromData(data, replaceOldValues);
      if (result) {
      // Perform additional async loading here
      await this.LoadRelatedData();
      await this.LoadMetadata();
      }
      return result;
      }

      // Don't forget to also override Load() for consistency, unless you INTEND to have different behavior
      // for Load() vs LoadFromData()
      public override async Load(ID: string, EntityRelationshipsToLoad: string[] = null): Promise<boolean> {
      const result = await super.Load(ID, EntityRelationshipsToLoad);
      if (result) {
      // Same additional loading as in LoadFromData
      await this.LoadRelatedData();
      await this.LoadMetadata();
      }
      return result;
      }
    • This method will create a new state for the object that is equivalent to a new record including default values.

      Parameters

      • OptionalnewValues: FieldValueCollection

        optional parameter to set the values of the fields to something other than the default values. The expected parameter is an object that has properties that map to field names in this entity. This is the same as creating a NewRecord and then using SetMany(), but it is a convenience/helper approach.

      Returns boolean

    • Propagates the ProviderTransaction handle down the IS-A parent chain so all entities in the chain execute on the same database transaction.

      Returns void

    • Used for raising events within the BaseEntity and can be used by sub-classes to raise events that are specific to the entity.

      Parameters

      • type:
            | "new_record"
            | "save"
            | "delete"
            | "load_complete"
            | "transaction_ready"
            | "save_started"
            | "delete_started"
            | "load_started"
            | "remote-invalidate"
            | "other"
      • payload: any
      • OptionalsaveSubType: "create" | "update"

      Returns void

    • Raises the transaction_ready event. This is used to indicate that the entity object is ready to be submitted for transaction processing. This is used by the TransactionGroup class to know when all async preprocessing is done and it can submit the transaction. This is an internal method and shouldn't be used by sub-classes or external callers in most cases. It is primarily used by Provider classes who are handling the tier-specific processing for the entity object.

      Returns void

    • Re-fetches the current record from the database using its existing primary key, replacing all in-memory field values with the latest data from the database. This is useful when you know (or suspect) the record has been modified externally (e.g., by a trigger, another user, or a background process) and you want to bring the entity object up to date.

      Returns Promise<boolean>

      true if the record was successfully reloaded, false if the provider returned no data.

      • The entity must have been previously loaded or saved (i.e., it must have a valid PrimaryKey). Calling Refresh() on a new, unsaved entity will throw because the primary key is not yet valid.
      • After a successful refresh, all field dirty flags are reset — the entity will report Dirty === false.
      • This is equivalent to calling InnerLoad(this.PrimaryKey).
      • If you only need to discard unsaved in-memory changes (without a database round-trip), use Revert instead.

      If the entity has no provider set, the primary key is invalid, or the user lacks Read permission.

    • This method can be used to register a callback for events that will be raised by the instance of the BaseEntity object. The callback will be called with a BaseEntityEvent object that contains the type of event and any payload that is associated with the event. Subclasses of the BaseEntity can define their own event types and payloads as needed.

      Parameters

      Returns Subscription

    • Append a result to _resultHistory, trimming the oldest entries when over MAX_RESULT_HISTORY. All Save/Delete code paths route through this — both inside BaseEntity and in callers like databaseProviderBase and entity subclasses that record their own results.

      Parameters

      Returns void

    • If the entity object has a TransactionGroup associated with it, the TransactionGroup will be notified that we are doing some transaction pre-processing so that the TransactionGroup can properly wait for those pre-processing steps to complete before submitting the transaction. This method should generally NOT be called by anyone other than a provider that is handling the tier-specific processing for the entity object.

      Returns void

    • Resets the vector embeddings for this entity to an empty state.

      Returns void

    • This method will revert the internal state of the object back to what it was when it was last saved, or if never saved, from when it was intially loaded from the database. This is useful if you want to offer a user an "undo" type of feature in a UI.

      Returns boolean

    • Saves the current state of the object to the database. Uses the active provider to handle the actual saving of the record. If the record is new, it will be created, if it already exists, it will be updated.

      Debounces multiple calls so that if Save() is called again while a save is in progress, the second call will simply receive the same result as the first.

      Parameters

      Returns Promise<boolean>

      Promise

    • Sets the value of a given field. If the field doesn't exist, nothing happens. The field's type is used to convert the value to the appropriate type.

      For IS-A child entities, parent fields are routed to _parentEntity.Set() (recursive for N-level chains). The value is also mirrored on the child's own virtual EntityField so that code iterating entity.Fields still sees it. The authoritative state for parent fields lives on _parentEntity.

      Parameters

      • FieldName: string
      • Value: any

      Returns void

    • NOTE: Do not call this method directly. Use the From method instead

      Sets any number of values on the entity object from the object passed in. The properties of the object being passed in must either match the field name (in most cases) or the CodeName (which is only different from field name if field name has spaces in it)

      For IS-A child entities, all fields are first set on self (including parent fields as mirrors), then parent fields are extracted and forwarded to _parentEntity.SetMany() for authoritative state, including proper OldValue tracking via the replaceOldValues parameter.

      Parameters

      • object: any
      • OptionalignoreNonExistentFields: boolean

        if set to true, fields that don't exist on the entity object will be ignored, if false, an error will be thrown if a field doesn't exist

      • OptionalreplaceOldValues: boolean

        if set to true, the old values of the fields will be reset to the values provided in the object parameter, if false, they will be left alone

      • OptionalignoreActiveStatusAssertions: boolean

        if set to true, the active status assertions for the fields will be ignored, if false, an error will be thrown if a field is not active. Defaults to false.

      Returns void

    • Marks the next Save() as a restore from a historical RecordChange row.

      The provider will write a new RecordChange entry with Source='Restore', RestoredFromID pointing at sourceChangeId, and RestoreReason set to reason (or NULL). This produces an auditable lineage chain that the timeline UI can render via the RestoredFromID foreign key.

      The context is consumed exactly once per Save() and persists on the entity until either (a) overwritten by a subsequent SetRestoreContext() call or (b) explicitly cleared via ClearRestoreContext(). It is NOT auto-cleared inside Save() because TransactionGroup execution is deferred — see the comment on _restoreContext for details.

      Parameters

      • sourceChangeId: string

        The ID of the historical RecordChange row whose state is being restored. Required; throws if empty.

      • Optionalreason: string

        Optional user-entered explanation captured at restore time. Persisted to RecordChange.RestoreReason for audit purposes.

      Returns void

      record.SetRestoreContext(versionId, 'Reverting incorrect Q2 entries');
      const ok = await record.Save();
      record.ClearRestoreContext();
    • Specifies if the current object supports the

      Returns boolean

      EmbedTextLocal method or not - useful to know before calling it for conditional code that has fallbacks as needed. BaseEntity does not implement this method but server-side sub-classes often do, but it is not mandatory for any sub-class.

    • Strongly-typed wrapper for the GetAll method

      Type Parameters

      • K extends AnyZodObject

      Parameters

      • Optionalschema: K

        the zod schema to validate the data against

      Returns TypeOf<K>

    • Validate() method override for MJ: AI Agents entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:

      • DefaultPromptEffortLevel: This rule ensures that if a default prompt effort level is specified, it must be a number between 1 and 100, inclusive.
      • MaxExecutionsPerRun: This rule ensures that if 'MaxExecutionsPerRun' is provided, it must be a value greater than zero. If it is left blank, that's acceptable.
      • MaxMessages: This rule ensures that the maximum number of messages, if specified, must be greater than zero.
      • MinExecutionsPerRun: This rule ensures that if a minimum executions per run value is specified, it cannot be negative. If the field is not specified, there is no restriction.
      • Table-Level: This rule ensures that if context compression is enabled, then the message threshold, prompt ID, and message retention count must all be provided. If context compression is not enabled, then these fields can be left empty.
      • Table-Level: This rule ensures that if both the minimum and maximum number of executions per run are provided, the minimum cannot be greater than the maximum. If either value is not provided, no check is performed.
      • Table-Level: This rule ensures that if a ParentID is specified, then ExposeAsAction must be set to false. If ParentID is not specified, ExposeAsAction can be either true or false.

      Returns ValidationResult

    • This rule ensures that if context compression is enabled, then the message threshold, prompt ID, and message retention count must all be provided. If context compression is not enabled, then these fields can be left empty.

      Parameters

      • result: ValidationResult

        the ValidationResult object to add any errors or warnings to

      Returns void

    • This rule ensures that if both the minimum and maximum number of executions per run are provided, the minimum cannot be greater than the maximum. If either value is not provided, no check is performed.

      Parameters

      • result: ValidationResult

        the ValidationResult object to add any errors or warnings to

      Returns void

    • This rule ensures that if a minimum executions per run value is specified, it cannot be negative. If the field is not specified, there is no restriction.

      Parameters

      • result: ValidationResult

        the ValidationResult object to add any errors or warnings to

      Returns void

    • This rule ensures that if a ParentID is specified, then ExposeAsAction must be set to false. If ParentID is not specified, ExposeAsAction can be either true or false.

      Parameters

      • result: ValidationResult

        the ValidationResult object to add any errors or warnings to

      Returns void

    • Resolves the leaf (most-derived) entity type for a given parent entity record. Walks down the IS-A child hierarchy to find which child type a record belongs to. Returns the child entity name, or the parent's own name if no children exist. Useful for polymorphic operations where you have a parent record and need to know its actual leaf type.

      Parameters

      • entityName: string

        The parent entity name

      • primaryKey: CompositeKey

        The primary key to look up

      • OptionalcontextUser: UserInfo

        Optional context user for server-side operations

      • Optionalprovider: IMetadataProvider

      Returns Promise<{ IsLeaf: boolean; LeafEntityName: string }>

      The leaf entity name and whether it was resolved to a child type