@memberjunction/core-entities 5.9.0 → 5.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2347,7 +2347,7 @@ export const MJAIAgentRunSchema = z.object({
2347
2347
  * * Description: Reference to the AIAgent that is being executed in this run`),
2348
2348
  ParentRunID: z.string().nullable().describe(`
2349
2349
  * * Field Name: ParentRunID
2350
- * * Display Name: Parent Run ID
2350
+ * * Display Name: Parent Run
2351
2351
  * * SQL Data Type: uniqueidentifier
2352
2352
  * * Related Entity/Foreign Key: MJ: AI Agent Runs (vwAIAgentRuns.ID)
2353
2353
  * * Description: Reference to the parent agent run if this is a sub-agent execution. NULL for root-level agent runs. Enables hierarchical execution tracking.`),
@@ -2441,27 +2441,27 @@ export const MJAIAgentRunSchema = z.object({
2441
2441
  * * Description: Total number of completion/output tokens generated across all AIPromptRun executions during this agent run. This provides a breakdown of the TotalTokensUsed field to help analyze the ratio of input vs output tokens consumed by the agent.`),
2442
2442
  TotalTokensUsedRollup: z.number().nullable().describe(`
2443
2443
  * * Field Name: TotalTokensUsedRollup
2444
- * * Display Name: Total Tokens Used Rollup
2444
+ * * Display Name: Total Tokens Used (Rollup)
2445
2445
  * * SQL Data Type: int
2446
2446
  * * Description: Total tokens used including this agent run and all sub-agent runs. For leaf agents (no sub-agents), this equals TotalTokensUsed. For parent agents, this includes the sum of all descendant agent tokens. Calculated as TotalPromptTokensUsedRollup + TotalCompletionTokensUsedRollup.`),
2447
2447
  TotalPromptTokensUsedRollup: z.number().nullable().describe(`
2448
2448
  * * Field Name: TotalPromptTokensUsedRollup
2449
- * * Display Name: Total Prompt Tokens Used Rollup
2449
+ * * Display Name: Total Prompt Tokens Used (Rollup)
2450
2450
  * * SQL Data Type: int
2451
2451
  * * Description: Total prompt/input tokens including this agent run and all sub-agent runs. For leaf agents (no sub-agents), this equals TotalPromptTokensUsed. For parent agents, this includes the sum of all descendant agent prompt tokens.`),
2452
2452
  TotalCompletionTokensUsedRollup: z.number().nullable().describe(`
2453
2453
  * * Field Name: TotalCompletionTokensUsedRollup
2454
- * * Display Name: Total Completion Tokens Used Rollup
2454
+ * * Display Name: Total Completion Tokens Used (Rollup)
2455
2455
  * * SQL Data Type: int
2456
2456
  * * Description: Total completion/output tokens including this agent run and all sub-agent runs. For leaf agents (no sub-agents), this equals TotalCompletionTokensUsed. For parent agents, this includes the sum of all descendant agent completion tokens.`),
2457
2457
  TotalCostRollup: z.number().nullable().describe(`
2458
2458
  * * Field Name: TotalCostRollup
2459
- * * Display Name: Total Cost Rollup
2459
+ * * Display Name: Total Cost (Rollup)
2460
2460
  * * SQL Data Type: decimal(19, 8)
2461
2461
  * * Description: Total cost including this agent run and all sub-agent runs. For leaf agents (no sub-agents), this equals TotalCost. For parent agents, this includes the sum of all descendant agent costs. Note: This assumes all costs are in the same currency for accurate rollup.`),
2462
2462
  ConversationDetailID: z.string().nullable().describe(`
2463
2463
  * * Field Name: ConversationDetailID
2464
- * * Display Name: Conversation Detail ID
2464
+ * * Display Name: Conversation Detail
2465
2465
  * * SQL Data Type: uniqueidentifier
2466
2466
  * * Related Entity/Foreign Key: MJ: Conversation Details (vwConversationDetails.ID)
2467
2467
  * * Description: Optional tracking of a specific conversation detail (e.g. a specific message) that spawned this agent run`),
@@ -2507,7 +2507,7 @@ export const MJAIAgentRunSchema = z.object({
2507
2507
  * * Description: Final message from the agent to the end user at the end of a run`),
2508
2508
  LastRunID: z.string().nullable().describe(`
2509
2509
  * * Field Name: LastRunID
2510
- * * Display Name: Last Run ID
2510
+ * * Display Name: Last Run
2511
2511
  * * SQL Data Type: uniqueidentifier
2512
2512
  * * Related Entity/Foreign Key: MJ: AI Agent Runs (vwAIAgentRuns.ID)
2513
2513
  * * Description: Links to the previous run in a chain. Different from ParentRunID which is for sub-agent hierarchy.`),
@@ -2525,19 +2525,19 @@ export const MJAIAgentRunSchema = z.object({
2525
2525
  each time the agent processes a prompt step.`),
2526
2526
  ConfigurationID: z.string().nullable().describe(`
2527
2527
  * * Field Name: ConfigurationID
2528
- * * Display Name: Configuration ID
2528
+ * * Display Name: Configuration
2529
2529
  * * SQL Data Type: uniqueidentifier
2530
2530
  * * Related Entity/Foreign Key: MJ: AI Configurations (vwAIConfigurations.ID)
2531
2531
  * * Description: The AI Configuration used for this agent execution. When set, this configuration was used for all prompts executed by this agent and its sub-agents.`),
2532
2532
  OverrideModelID: z.string().nullable().describe(`
2533
2533
  * * Field Name: OverrideModelID
2534
- * * Display Name: Override Model ID
2534
+ * * Display Name: Override Model
2535
2535
  * * SQL Data Type: uniqueidentifier
2536
2536
  * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
2537
2537
  * * Description: Runtime model override that was used for this execution. When set, this model took precedence over all other model selection methods.`),
2538
2538
  OverrideVendorID: z.string().nullable().describe(`
2539
2539
  * * Field Name: OverrideVendorID
2540
- * * Display Name: Override Vendor ID
2540
+ * * Display Name: Override Vendor
2541
2541
  * * SQL Data Type: uniqueidentifier
2542
2542
  * * Related Entity/Foreign Key: MJ: AI Vendors (vwAIVendors.ID)
2543
2543
  * * Description: Runtime vendor override that was used for this execution. When set along with OverrideModelID, this vendor was used to provide the model.`),
@@ -2548,7 +2548,7 @@ each time the agent processes a prompt step.`),
2548
2548
  * * Description: JSON serialized data that was passed for template rendering and prompt execution. This data was passed to the agent's prompt as well as all sub-agents.`),
2549
2549
  Verbose: z.boolean().nullable().describe(`
2550
2550
  * * Field Name: Verbose
2551
- * * Display Name: Verbose
2551
+ * * Display Name: Verbose Logging
2552
2552
  * * SQL Data Type: bit
2553
2553
  * * Default Value: 0
2554
2554
  * * Description: Indicates whether verbose logging was enabled during this agent execution. When true, detailed decision-making and execution flow was logged.`),
@@ -2569,25 +2569,25 @@ each time the agent processes a prompt step.`),
2569
2569
  * * Description: Human-readable notes and comments about this agent run`),
2570
2570
  ScheduledJobRunID: z.string().nullable().describe(`
2571
2571
  * * Field Name: ScheduledJobRunID
2572
- * * Display Name: Scheduled Job Run ID
2572
+ * * Display Name: Scheduled Job Run
2573
2573
  * * SQL Data Type: uniqueidentifier
2574
2574
  * * Related Entity/Foreign Key: MJ: Scheduled Job Runs (vwScheduledJobRuns.ID)
2575
2575
  * * Description: Links to the scheduled job run that triggered this agent execution. NULL for manually-triggered agent runs. Enables tracking which scheduled jobs spawned which agent executions.`),
2576
2576
  TestRunID: z.string().nullable().describe(`
2577
2577
  * * Field Name: TestRunID
2578
- * * Display Name: Test Run ID
2578
+ * * Display Name: Test Run
2579
2579
  * * SQL Data Type: uniqueidentifier
2580
2580
  * * Related Entity/Foreign Key: MJ: Test Runs (vwTestRuns.ID)
2581
2581
  * * Description: Optional Foreign Key - Links this agent run to a test run if this execution was part of a test. Allows navigation from agent execution to test context.`),
2582
2582
  PrimaryScopeEntityID: z.string().nullable().describe(`
2583
2583
  * * Field Name: PrimaryScopeEntityID
2584
- * * Display Name: Primary Scope Entity ID
2584
+ * * Display Name: Primary Scope Entity
2585
2585
  * * SQL Data Type: uniqueidentifier
2586
2586
  * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
2587
2587
  * * Description: Foreign key to Entity table identifying which entity type is used for primary scoping (e.g., Organizations, Tenants)`),
2588
2588
  PrimaryScopeRecordID: z.string().nullable().describe(`
2589
2589
  * * Field Name: PrimaryScopeRecordID
2590
- * * Display Name: Primary Scope Record ID
2590
+ * * Display Name: Primary Scope Record
2591
2591
  * * SQL Data Type: nvarchar(100)
2592
2592
  * * Description: The record ID within the primary scope entity (e.g., the specific OrganizationID). Indexed for fast multi-tenant filtering.`),
2593
2593
  SecondaryScopes: z.string().nullable().describe(`
@@ -2595,61 +2595,66 @@ each time the agent processes a prompt step.`),
2595
2595
  * * Display Name: Secondary Scopes
2596
2596
  * * SQL Data Type: nvarchar(MAX)
2597
2597
  * * Description: JSON object containing additional scope dimensions beyond the primary scope. Example: {"ContactID":"abc-123","TeamID":"team-456"}`),
2598
+ ExternalReferenceID: z.string().nullable().describe(`
2599
+ * * Field Name: ExternalReferenceID
2600
+ * * Display Name: External Reference ID
2601
+ * * SQL Data Type: nvarchar(200)
2602
+ * * Description: Optional reference ID from an external system that initiated this agent run. Enables correlation between the caller's agent run and this execution. For example, when Skip SaaS is called via SkipProxyAgent, this stores the MJ-side Agent Run ID.`),
2598
2603
  Agent: z.string().nullable().describe(`
2599
2604
  * * Field Name: Agent
2600
- * * Display Name: Agent
2605
+ * * Display Name: Agent Name
2601
2606
  * * SQL Data Type: nvarchar(255)`),
2602
2607
  ParentRun: z.string().nullable().describe(`
2603
2608
  * * Field Name: ParentRun
2604
- * * Display Name: Parent Run
2609
+ * * Display Name: Parent Run Name
2605
2610
  * * SQL Data Type: nvarchar(255)`),
2606
2611
  Conversation: z.string().nullable().describe(`
2607
2612
  * * Field Name: Conversation
2608
- * * Display Name: Conversation
2613
+ * * Display Name: Conversation Name
2609
2614
  * * SQL Data Type: nvarchar(255)`),
2610
2615
  User: z.string().nullable().describe(`
2611
2616
  * * Field Name: User
2612
- * * Display Name: User
2617
+ * * Display Name: User Name
2613
2618
  * * SQL Data Type: nvarchar(100)`),
2614
2619
  ConversationDetail: z.string().nullable().describe(`
2615
2620
  * * Field Name: ConversationDetail
2616
- * * Display Name: Conversation Detail
2621
+ * * Display Name: Conversation Detail Name
2617
2622
  * * SQL Data Type: nvarchar(MAX)`),
2618
2623
  LastRun: z.string().nullable().describe(`
2619
2624
  * * Field Name: LastRun
2620
- * * Display Name: Last Run
2625
+ * * Display Name: Last Run Name
2621
2626
  * * SQL Data Type: nvarchar(255)`),
2622
2627
  Configuration: z.string().nullable().describe(`
2623
2628
  * * Field Name: Configuration
2624
- * * Display Name: Configuration
2629
+ * * Display Name: Configuration Name
2625
2630
  * * SQL Data Type: nvarchar(100)`),
2626
2631
  OverrideModel: z.string().nullable().describe(`
2627
2632
  * * Field Name: OverrideModel
2628
- * * Display Name: Override Model
2633
+ * * Display Name: Override Model Name
2629
2634
  * * SQL Data Type: nvarchar(50)`),
2630
2635
  OverrideVendor: z.string().nullable().describe(`
2631
2636
  * * Field Name: OverrideVendor
2632
- * * Display Name: Override Vendor
2637
+ * * Display Name: Override Vendor Name
2633
2638
  * * SQL Data Type: nvarchar(50)`),
2634
2639
  ScheduledJobRun: z.string().nullable().describe(`
2635
2640
  * * Field Name: ScheduledJobRun
2636
- * * Display Name: Scheduled Job Run
2641
+ * * Display Name: Scheduled Job Run Name
2637
2642
  * * SQL Data Type: nvarchar(200)`),
2638
2643
  TestRun: z.string().nullable().describe(`
2639
2644
  * * Field Name: TestRun
2640
- * * Display Name: Test Run
2645
+ * * Display Name: Test Run Name
2641
2646
  * * SQL Data Type: nvarchar(255)`),
2642
2647
  PrimaryScopeEntity: z.string().nullable().describe(`
2643
2648
  * * Field Name: PrimaryScopeEntity
2644
- * * Display Name: Primary Scope Entity
2649
+ * * Display Name: Primary Scope Entity Name
2645
2650
  * * SQL Data Type: nvarchar(255)`),
2646
2651
  RootParentRunID: z.string().nullable().describe(`
2647
2652
  * * Field Name: RootParentRunID
2648
- * * Display Name: Root Parent Run ID
2653
+ * * Display Name: Root Parent Run
2649
2654
  * * SQL Data Type: uniqueidentifier`),
2650
2655
  RootLastRunID: z.string().nullable().describe(`
2651
2656
  * * Field Name: RootLastRunID
2652
- * * Display Name: Root Last Run ID
2657
+ * * Display Name: Root Last Run
2653
2658
  * * SQL Data Type: uniqueidentifier`),
2654
2659
  });
2655
2660
  /**
@@ -27649,7 +27654,7 @@ let MJAIAgentRunStepEntity = class MJAIAgentRunStepEntity extends BaseEntity {
27649
27654
  }
27650
27655
  /**
27651
27656
  * Validate() method override for MJ: AI Agent Run Steps entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
27652
- * * FinalPayloadValidationResult: The FinalPayloadValidationResult field can be empty, but if a value is set it must be one of the allowed outcomes: Warn, Fail, Retry, or Pass. This ensures that only valid validation results are stored.
27657
+ * * FinalPayloadValidationResult: The final payload validation result must be one of the approved statuses: Warn, Fail, Retry, or Pass, to ensure consistent reporting of validation outcomes.
27653
27658
  * * StepNumber: This rule ensures that the step number must be greater than zero.
27654
27659
  * @public
27655
27660
  * @method
@@ -27657,25 +27662,23 @@ let MJAIAgentRunStepEntity = class MJAIAgentRunStepEntity extends BaseEntity {
27657
27662
  */
27658
27663
  Validate() {
27659
27664
  const result = super.Validate();
27660
- this.ValidateFinalPayloadValidationResultAllowedValues(result);
27665
+ this.ValidateFinalPayloadValidationResultStatus(result);
27661
27666
  this.ValidateStepNumberGreaterThanZero(result);
27662
27667
  result.Success = result.Success && (result.Errors.length === 0);
27663
27668
  return result;
27664
27669
  }
27665
27670
  /**
27666
- * The FinalPayloadValidationResult field can be empty, but if a value is set it must be one of the allowed outcomes: Warn, Fail, Retry, or Pass. This ensures that only valid validation results are stored.
27671
+ * The final payload validation result must be one of the approved statuses: Warn, Fail, Retry, or Pass, to ensure consistent reporting of validation outcomes.
27667
27672
  * @param result - the ValidationResult object to add any errors or warnings to
27668
27673
  * @public
27669
27674
  * @method
27670
27675
  */
27671
- ValidateFinalPayloadValidationResultAllowedValues(result) {
27672
- // Ensure the value is either null or one of the permitted statuses
27673
- if (this.FinalPayloadValidationResult != null &&
27674
- !(this.FinalPayloadValidationResult === 'Warn' ||
27675
- this.FinalPayloadValidationResult === 'Fail' ||
27676
- this.FinalPayloadValidationResult === 'Retry' ||
27677
- this.FinalPayloadValidationResult === 'Pass')) {
27678
- result.Errors.push(new ValidationErrorInfo("FinalPayloadValidationResult", "FinalPayloadValidationResult must be one of: Warn, Fail, Retry, Pass, or left empty.", this.FinalPayloadValidationResult, ValidationErrorType.Failure));
27676
+ ValidateFinalPayloadValidationResultStatus(result) {
27677
+ if (this.FinalPayloadValidationResult != null) {
27678
+ const allowedValues = ["Warn", "Fail", "Retry", "Pass"];
27679
+ if (allowedValues.indexOf(this.FinalPayloadValidationResult) === -1) {
27680
+ result.Errors.push(new ValidationErrorInfo("FinalPayloadValidationResult", "The validation result must be one of the following values: " + allowedValues.join(", ") + ".", this.FinalPayloadValidationResult, ValidationErrorType.Failure));
27681
+ }
27679
27682
  }
27680
27683
  }
27681
27684
  /**
@@ -28144,7 +28147,7 @@ let MJAIAgentRunEntity = class MJAIAgentRunEntity extends BaseEntity {
28144
28147
  }
28145
28148
  /**
28146
28149
  * * Field Name: ParentRunID
28147
- * * Display Name: Parent Run ID
28150
+ * * Display Name: Parent Run
28148
28151
  * * SQL Data Type: uniqueidentifier
28149
28152
  * * Related Entity/Foreign Key: MJ: AI Agent Runs (vwAIAgentRuns.ID)
28150
28153
  * * Description: Reference to the parent agent run if this is a sub-agent execution. NULL for root-level agent runs. Enables hierarchical execution tracking.
@@ -28345,7 +28348,7 @@ let MJAIAgentRunEntity = class MJAIAgentRunEntity extends BaseEntity {
28345
28348
  }
28346
28349
  /**
28347
28350
  * * Field Name: TotalTokensUsedRollup
28348
- * * Display Name: Total Tokens Used Rollup
28351
+ * * Display Name: Total Tokens Used (Rollup)
28349
28352
  * * SQL Data Type: int
28350
28353
  * * Description: Total tokens used including this agent run and all sub-agent runs. For leaf agents (no sub-agents), this equals TotalTokensUsed. For parent agents, this includes the sum of all descendant agent tokens. Calculated as TotalPromptTokensUsedRollup + TotalCompletionTokensUsedRollup.
28351
28354
  */
@@ -28357,7 +28360,7 @@ let MJAIAgentRunEntity = class MJAIAgentRunEntity extends BaseEntity {
28357
28360
  }
28358
28361
  /**
28359
28362
  * * Field Name: TotalPromptTokensUsedRollup
28360
- * * Display Name: Total Prompt Tokens Used Rollup
28363
+ * * Display Name: Total Prompt Tokens Used (Rollup)
28361
28364
  * * SQL Data Type: int
28362
28365
  * * Description: Total prompt/input tokens including this agent run and all sub-agent runs. For leaf agents (no sub-agents), this equals TotalPromptTokensUsed. For parent agents, this includes the sum of all descendant agent prompt tokens.
28363
28366
  */
@@ -28369,7 +28372,7 @@ let MJAIAgentRunEntity = class MJAIAgentRunEntity extends BaseEntity {
28369
28372
  }
28370
28373
  /**
28371
28374
  * * Field Name: TotalCompletionTokensUsedRollup
28372
- * * Display Name: Total Completion Tokens Used Rollup
28375
+ * * Display Name: Total Completion Tokens Used (Rollup)
28373
28376
  * * SQL Data Type: int
28374
28377
  * * Description: Total completion/output tokens including this agent run and all sub-agent runs. For leaf agents (no sub-agents), this equals TotalCompletionTokensUsed. For parent agents, this includes the sum of all descendant agent completion tokens.
28375
28378
  */
@@ -28381,7 +28384,7 @@ let MJAIAgentRunEntity = class MJAIAgentRunEntity extends BaseEntity {
28381
28384
  }
28382
28385
  /**
28383
28386
  * * Field Name: TotalCostRollup
28384
- * * Display Name: Total Cost Rollup
28387
+ * * Display Name: Total Cost (Rollup)
28385
28388
  * * SQL Data Type: decimal(19, 8)
28386
28389
  * * Description: Total cost including this agent run and all sub-agent runs. For leaf agents (no sub-agents), this equals TotalCost. For parent agents, this includes the sum of all descendant agent costs. Note: This assumes all costs are in the same currency for accurate rollup.
28387
28390
  */
@@ -28393,7 +28396,7 @@ let MJAIAgentRunEntity = class MJAIAgentRunEntity extends BaseEntity {
28393
28396
  }
28394
28397
  /**
28395
28398
  * * Field Name: ConversationDetailID
28396
- * * Display Name: Conversation Detail ID
28399
+ * * Display Name: Conversation Detail
28397
28400
  * * SQL Data Type: uniqueidentifier
28398
28401
  * * Related Entity/Foreign Key: MJ: Conversation Details (vwConversationDetails.ID)
28399
28402
  * * Description: Optional tracking of a specific conversation detail (e.g. a specific message) that spawned this agent run
@@ -28481,7 +28484,7 @@ let MJAIAgentRunEntity = class MJAIAgentRunEntity extends BaseEntity {
28481
28484
  }
28482
28485
  /**
28483
28486
  * * Field Name: LastRunID
28484
- * * Display Name: Last Run ID
28487
+ * * Display Name: Last Run
28485
28488
  * * SQL Data Type: uniqueidentifier
28486
28489
  * * Related Entity/Foreign Key: MJ: AI Agent Runs (vwAIAgentRuns.ID)
28487
28490
  * * Description: Links to the previous run in a chain. Different from ParentRunID which is for sub-agent hierarchy.
@@ -28520,7 +28523,7 @@ each time the agent processes a prompt step.
28520
28523
  }
28521
28524
  /**
28522
28525
  * * Field Name: ConfigurationID
28523
- * * Display Name: Configuration ID
28526
+ * * Display Name: Configuration
28524
28527
  * * SQL Data Type: uniqueidentifier
28525
28528
  * * Related Entity/Foreign Key: MJ: AI Configurations (vwAIConfigurations.ID)
28526
28529
  * * Description: The AI Configuration used for this agent execution. When set, this configuration was used for all prompts executed by this agent and its sub-agents.
@@ -28533,7 +28536,7 @@ each time the agent processes a prompt step.
28533
28536
  }
28534
28537
  /**
28535
28538
  * * Field Name: OverrideModelID
28536
- * * Display Name: Override Model ID
28539
+ * * Display Name: Override Model
28537
28540
  * * SQL Data Type: uniqueidentifier
28538
28541
  * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
28539
28542
  * * Description: Runtime model override that was used for this execution. When set, this model took precedence over all other model selection methods.
@@ -28546,7 +28549,7 @@ each time the agent processes a prompt step.
28546
28549
  }
28547
28550
  /**
28548
28551
  * * Field Name: OverrideVendorID
28549
- * * Display Name: Override Vendor ID
28552
+ * * Display Name: Override Vendor
28550
28553
  * * SQL Data Type: uniqueidentifier
28551
28554
  * * Related Entity/Foreign Key: MJ: AI Vendors (vwAIVendors.ID)
28552
28555
  * * Description: Runtime vendor override that was used for this execution. When set along with OverrideModelID, this vendor was used to provide the model.
@@ -28571,7 +28574,7 @@ each time the agent processes a prompt step.
28571
28574
  }
28572
28575
  /**
28573
28576
  * * Field Name: Verbose
28574
- * * Display Name: Verbose
28577
+ * * Display Name: Verbose Logging
28575
28578
  * * SQL Data Type: bit
28576
28579
  * * Default Value: 0
28577
28580
  * * Description: Indicates whether verbose logging was enabled during this agent execution. When true, detailed decision-making and execution flow was logged.
@@ -28620,7 +28623,7 @@ each time the agent processes a prompt step.
28620
28623
  }
28621
28624
  /**
28622
28625
  * * Field Name: ScheduledJobRunID
28623
- * * Display Name: Scheduled Job Run ID
28626
+ * * Display Name: Scheduled Job Run
28624
28627
  * * SQL Data Type: uniqueidentifier
28625
28628
  * * Related Entity/Foreign Key: MJ: Scheduled Job Runs (vwScheduledJobRuns.ID)
28626
28629
  * * Description: Links to the scheduled job run that triggered this agent execution. NULL for manually-triggered agent runs. Enables tracking which scheduled jobs spawned which agent executions.
@@ -28633,7 +28636,7 @@ each time the agent processes a prompt step.
28633
28636
  }
28634
28637
  /**
28635
28638
  * * Field Name: TestRunID
28636
- * * Display Name: Test Run ID
28639
+ * * Display Name: Test Run
28637
28640
  * * SQL Data Type: uniqueidentifier
28638
28641
  * * Related Entity/Foreign Key: MJ: Test Runs (vwTestRuns.ID)
28639
28642
  * * Description: Optional Foreign Key - Links this agent run to a test run if this execution was part of a test. Allows navigation from agent execution to test context.
@@ -28646,7 +28649,7 @@ each time the agent processes a prompt step.
28646
28649
  }
28647
28650
  /**
28648
28651
  * * Field Name: PrimaryScopeEntityID
28649
- * * Display Name: Primary Scope Entity ID
28652
+ * * Display Name: Primary Scope Entity
28650
28653
  * * SQL Data Type: uniqueidentifier
28651
28654
  * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
28652
28655
  * * Description: Foreign key to Entity table identifying which entity type is used for primary scoping (e.g., Organizations, Tenants)
@@ -28659,7 +28662,7 @@ each time the agent processes a prompt step.
28659
28662
  }
28660
28663
  /**
28661
28664
  * * Field Name: PrimaryScopeRecordID
28662
- * * Display Name: Primary Scope Record ID
28665
+ * * Display Name: Primary Scope Record
28663
28666
  * * SQL Data Type: nvarchar(100)
28664
28667
  * * Description: The record ID within the primary scope entity (e.g., the specific OrganizationID). Indexed for fast multi-tenant filtering.
28665
28668
  */
@@ -28682,8 +28685,20 @@ each time the agent processes a prompt step.
28682
28685
  this.Set('SecondaryScopes', value);
28683
28686
  }
28684
28687
  /**
28688
+ * * Field Name: ExternalReferenceID
28689
+ * * Display Name: External Reference ID
28690
+ * * SQL Data Type: nvarchar(200)
28691
+ * * Description: Optional reference ID from an external system that initiated this agent run. Enables correlation between the caller's agent run and this execution. For example, when Skip SaaS is called via SkipProxyAgent, this stores the MJ-side Agent Run ID.
28692
+ */
28693
+ get ExternalReferenceID() {
28694
+ return this.Get('ExternalReferenceID');
28695
+ }
28696
+ set ExternalReferenceID(value) {
28697
+ this.Set('ExternalReferenceID', value);
28698
+ }
28699
+ /**
28685
28700
  * * Field Name: Agent
28686
- * * Display Name: Agent
28701
+ * * Display Name: Agent Name
28687
28702
  * * SQL Data Type: nvarchar(255)
28688
28703
  */
28689
28704
  get Agent() {
@@ -28691,7 +28706,7 @@ each time the agent processes a prompt step.
28691
28706
  }
28692
28707
  /**
28693
28708
  * * Field Name: ParentRun
28694
- * * Display Name: Parent Run
28709
+ * * Display Name: Parent Run Name
28695
28710
  * * SQL Data Type: nvarchar(255)
28696
28711
  */
28697
28712
  get ParentRun() {
@@ -28699,7 +28714,7 @@ each time the agent processes a prompt step.
28699
28714
  }
28700
28715
  /**
28701
28716
  * * Field Name: Conversation
28702
- * * Display Name: Conversation
28717
+ * * Display Name: Conversation Name
28703
28718
  * * SQL Data Type: nvarchar(255)
28704
28719
  */
28705
28720
  get Conversation() {
@@ -28707,7 +28722,7 @@ each time the agent processes a prompt step.
28707
28722
  }
28708
28723
  /**
28709
28724
  * * Field Name: User
28710
- * * Display Name: User
28725
+ * * Display Name: User Name
28711
28726
  * * SQL Data Type: nvarchar(100)
28712
28727
  */
28713
28728
  get User() {
@@ -28715,7 +28730,7 @@ each time the agent processes a prompt step.
28715
28730
  }
28716
28731
  /**
28717
28732
  * * Field Name: ConversationDetail
28718
- * * Display Name: Conversation Detail
28733
+ * * Display Name: Conversation Detail Name
28719
28734
  * * SQL Data Type: nvarchar(MAX)
28720
28735
  */
28721
28736
  get ConversationDetail() {
@@ -28723,7 +28738,7 @@ each time the agent processes a prompt step.
28723
28738
  }
28724
28739
  /**
28725
28740
  * * Field Name: LastRun
28726
- * * Display Name: Last Run
28741
+ * * Display Name: Last Run Name
28727
28742
  * * SQL Data Type: nvarchar(255)
28728
28743
  */
28729
28744
  get LastRun() {
@@ -28731,7 +28746,7 @@ each time the agent processes a prompt step.
28731
28746
  }
28732
28747
  /**
28733
28748
  * * Field Name: Configuration
28734
- * * Display Name: Configuration
28749
+ * * Display Name: Configuration Name
28735
28750
  * * SQL Data Type: nvarchar(100)
28736
28751
  */
28737
28752
  get Configuration() {
@@ -28739,7 +28754,7 @@ each time the agent processes a prompt step.
28739
28754
  }
28740
28755
  /**
28741
28756
  * * Field Name: OverrideModel
28742
- * * Display Name: Override Model
28757
+ * * Display Name: Override Model Name
28743
28758
  * * SQL Data Type: nvarchar(50)
28744
28759
  */
28745
28760
  get OverrideModel() {
@@ -28747,7 +28762,7 @@ each time the agent processes a prompt step.
28747
28762
  }
28748
28763
  /**
28749
28764
  * * Field Name: OverrideVendor
28750
- * * Display Name: Override Vendor
28765
+ * * Display Name: Override Vendor Name
28751
28766
  * * SQL Data Type: nvarchar(50)
28752
28767
  */
28753
28768
  get OverrideVendor() {
@@ -28755,7 +28770,7 @@ each time the agent processes a prompt step.
28755
28770
  }
28756
28771
  /**
28757
28772
  * * Field Name: ScheduledJobRun
28758
- * * Display Name: Scheduled Job Run
28773
+ * * Display Name: Scheduled Job Run Name
28759
28774
  * * SQL Data Type: nvarchar(200)
28760
28775
  */
28761
28776
  get ScheduledJobRun() {
@@ -28763,7 +28778,7 @@ each time the agent processes a prompt step.
28763
28778
  }
28764
28779
  /**
28765
28780
  * * Field Name: TestRun
28766
- * * Display Name: Test Run
28781
+ * * Display Name: Test Run Name
28767
28782
  * * SQL Data Type: nvarchar(255)
28768
28783
  */
28769
28784
  get TestRun() {
@@ -28771,7 +28786,7 @@ each time the agent processes a prompt step.
28771
28786
  }
28772
28787
  /**
28773
28788
  * * Field Name: PrimaryScopeEntity
28774
- * * Display Name: Primary Scope Entity
28789
+ * * Display Name: Primary Scope Entity Name
28775
28790
  * * SQL Data Type: nvarchar(255)
28776
28791
  */
28777
28792
  get PrimaryScopeEntity() {
@@ -28779,7 +28794,7 @@ each time the agent processes a prompt step.
28779
28794
  }
28780
28795
  /**
28781
28796
  * * Field Name: RootParentRunID
28782
- * * Display Name: Root Parent Run ID
28797
+ * * Display Name: Root Parent Run
28783
28798
  * * SQL Data Type: uniqueidentifier
28784
28799
  */
28785
28800
  get RootParentRunID() {
@@ -28787,7 +28802,7 @@ each time the agent processes a prompt step.
28787
28802
  }
28788
28803
  /**
28789
28804
  * * Field Name: RootLastRunID
28790
- * * Display Name: Root Last Run ID
28805
+ * * Display Name: Root Last Run
28791
28806
  * * SQL Data Type: uniqueidentifier
28792
28807
  */
28793
28808
  get RootLastRunID() {