@memberjunction/core-entities 2.68.0 → 2.69.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.
|
@@ -685,6 +685,16 @@ exports.AIAgentActionSchema = zod_1.z.object({
|
|
|
685
685
|
* * Display Name: Updated At
|
|
686
686
|
* * SQL Data Type: datetimeoffset
|
|
687
687
|
* * Default Value: getutcdate()`),
|
|
688
|
+
MinExecutionsPerRun: zod_1.z.number().nullable().describe(`
|
|
689
|
+
* * Field Name: MinExecutionsPerRun
|
|
690
|
+
* * Display Name: Min Executions Per Run
|
|
691
|
+
* * SQL Data Type: int
|
|
692
|
+
* * Description: Minimum number of times this action must be executed per agent run`),
|
|
693
|
+
MaxExecutionsPerRun: zod_1.z.number().nullable().describe(`
|
|
694
|
+
* * Field Name: MaxExecutionsPerRun
|
|
695
|
+
* * Display Name: Max Executions Per Run
|
|
696
|
+
* * SQL Data Type: int
|
|
697
|
+
* * Description: Maximum number of times this action can be executed per agent run`),
|
|
688
698
|
Agent: zod_1.z.string().nullable().describe(`
|
|
689
699
|
* * Field Name: Agent
|
|
690
700
|
* * Display Name: Agent
|
|
@@ -1116,6 +1126,68 @@ flow when the agent executes its own prompt step.`),
|
|
|
1116
1126
|
* * SQL Data Type: nvarchar(MAX)
|
|
1117
1127
|
* * Description: JSON array of paths that specify what parts of the payload the agent's own prompt can write back. Controls upstream
|
|
1118
1128
|
data flow when the agent executes its own prompt step.`),
|
|
1129
|
+
PayloadScope: zod_1.z.string().nullable().describe(`
|
|
1130
|
+
* * Field Name: PayloadScope
|
|
1131
|
+
* * Display Name: Payload Scope
|
|
1132
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
1133
|
+
* * 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)`),
|
|
1134
|
+
FinalPayloadValidation: zod_1.z.string().nullable().describe(`
|
|
1135
|
+
* * Field Name: FinalPayloadValidation
|
|
1136
|
+
* * Display Name: Final Payload Validation
|
|
1137
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
1138
|
+
* * 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.`),
|
|
1139
|
+
FinalPayloadValidationMode: zod_1.z.union([zod_1.z.literal('Retry'), zod_1.z.literal('Fail'), zod_1.z.literal('Warn')]).describe(`
|
|
1140
|
+
* * Field Name: FinalPayloadValidationMode
|
|
1141
|
+
* * Display Name: Final Payload Validation Mode
|
|
1142
|
+
* * SQL Data Type: nvarchar(25)
|
|
1143
|
+
* * Default Value: Retry
|
|
1144
|
+
* * Value List Type: List
|
|
1145
|
+
* * Possible Values
|
|
1146
|
+
* * Retry
|
|
1147
|
+
* * Fail
|
|
1148
|
+
* * Warn
|
|
1149
|
+
* * 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.`),
|
|
1150
|
+
FinalPayloadValidationMaxRetries: zod_1.z.number().describe(`
|
|
1151
|
+
* * Field Name: FinalPayloadValidationMaxRetries
|
|
1152
|
+
* * Display Name: Final Payload Validation Max Retries
|
|
1153
|
+
* * SQL Data Type: int
|
|
1154
|
+
* * Default Value: 3
|
|
1155
|
+
* * Description: Maximum number of retry attempts allowed when FinalPayloadValidation fails with
|
|
1156
|
+
Retry mode. After reaching this limit, the validation will fail permanently.`),
|
|
1157
|
+
MaxCostPerRun: zod_1.z.number().nullable().describe(`
|
|
1158
|
+
* * Field Name: MaxCostPerRun
|
|
1159
|
+
* * Display Name: Max Cost Per Run
|
|
1160
|
+
* * SQL Data Type: decimal(10, 4)
|
|
1161
|
+
* * Description: Maximum cost in dollars allowed for a single agent run. Run will be terminated
|
|
1162
|
+
if this limit is exceeded.`),
|
|
1163
|
+
MaxTokensPerRun: zod_1.z.number().nullable().describe(`
|
|
1164
|
+
* * Field Name: MaxTokensPerRun
|
|
1165
|
+
* * Display Name: Max Tokens Per Run
|
|
1166
|
+
* * SQL Data Type: int
|
|
1167
|
+
* * Description: Maximum total tokens (input + output) allowed for a single agent run. Run will
|
|
1168
|
+
be terminated if this limit is exceeded.`),
|
|
1169
|
+
MaxIterationsPerRun: zod_1.z.number().nullable().describe(`
|
|
1170
|
+
* * Field Name: MaxIterationsPerRun
|
|
1171
|
+
* * Display Name: Max Iterations Per Run
|
|
1172
|
+
* * SQL Data Type: int
|
|
1173
|
+
* * Description: Maximum number of prompt iterations allowed for a single agent run. Run will be
|
|
1174
|
+
terminated if this limit is exceeded.`),
|
|
1175
|
+
MaxTimePerRun: zod_1.z.number().nullable().describe(`
|
|
1176
|
+
* * Field Name: MaxTimePerRun
|
|
1177
|
+
* * Display Name: Max Time Per Run
|
|
1178
|
+
* * SQL Data Type: int
|
|
1179
|
+
* * Description: Maximum time in seconds allowed for a single agent run. Run will be terminated
|
|
1180
|
+
if this limit is exceeded.`),
|
|
1181
|
+
MinExecutionsPerRun: zod_1.z.number().nullable().describe(`
|
|
1182
|
+
* * Field Name: MinExecutionsPerRun
|
|
1183
|
+
* * Display Name: Min Executions Per Run
|
|
1184
|
+
* * SQL Data Type: int
|
|
1185
|
+
* * Description: When acting as a sub-agent, minimum number of times this agent must be executed per parent agent run`),
|
|
1186
|
+
MaxExecutionsPerRun: zod_1.z.number().nullable().describe(`
|
|
1187
|
+
* * Field Name: MaxExecutionsPerRun
|
|
1188
|
+
* * Display Name: Max Executions Per Run
|
|
1189
|
+
* * SQL Data Type: int
|
|
1190
|
+
* * Description: When acting as a sub-agent, maximum number of times this agent can be executed per parent agent run`),
|
|
1119
1191
|
Parent: zod_1.z.string().nullable().describe(`
|
|
1120
1192
|
* * Field Name: Parent
|
|
1121
1193
|
* * Display Name: Parent
|
|
@@ -7084,6 +7156,19 @@ exports.AIAgentRunStepSchema = zod_1.z.object({
|
|
|
7084
7156
|
* * Display Name: Payload At End
|
|
7085
7157
|
* * SQL Data Type: nvarchar(MAX)
|
|
7086
7158
|
* * Description: JSON serialization of the Payload state at the end of this step`),
|
|
7159
|
+
FinalPayloadValidationResult: zod_1.z.string().nullable().describe(`
|
|
7160
|
+
* * Field Name: FinalPayloadValidationResult
|
|
7161
|
+
* * Display Name: Final Payload Validation Result
|
|
7162
|
+
* * SQL Data Type: nvarchar(25)
|
|
7163
|
+
* * Description: Result of the final payload validation for this step. Pass indicates successful
|
|
7164
|
+
validation, Retry means validation failed but will retry, Fail means validation failed
|
|
7165
|
+
permanently, Warn means validation failed but execution continues.`),
|
|
7166
|
+
FinalPayloadValidationMessages: zod_1.z.string().nullable().describe(`
|
|
7167
|
+
* * Field Name: FinalPayloadValidationMessages
|
|
7168
|
+
* * Display Name: Final Payload Validation Messages
|
|
7169
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
7170
|
+
* * Description: Validation error messages or warnings from final payload validation. Contains
|
|
7171
|
+
detailed information about what validation rules failed.`),
|
|
7087
7172
|
});
|
|
7088
7173
|
/**
|
|
7089
7174
|
* zod schema definition for the entity MJ: AI Agent Runs
|
|
@@ -7270,6 +7355,13 @@ exports.AIAgentRunSchema = zod_1.z.object({
|
|
|
7270
7355
|
* * Display Name: Starting Payload
|
|
7271
7356
|
* * SQL Data Type: nvarchar(MAX)
|
|
7272
7357
|
* * Description: The initial payload provided at the start of this run. Can be populated from the FinalPayload of the LastRun.`),
|
|
7358
|
+
TotalPromptIterations: zod_1.z.number().describe(`
|
|
7359
|
+
* * Field Name: TotalPromptIterations
|
|
7360
|
+
* * Display Name: Total Prompt Iterations
|
|
7361
|
+
* * SQL Data Type: int
|
|
7362
|
+
* * Default Value: 0
|
|
7363
|
+
* * Description: Total number of prompt iterations executed during this agent run. Incremented
|
|
7364
|
+
each time the agent processes a prompt step.`),
|
|
7273
7365
|
Agent: zod_1.z.string().nullable().describe(`
|
|
7274
7366
|
* * Field Name: Agent
|
|
7275
7367
|
* * Display Name: Agent
|
|
@@ -13571,6 +13663,57 @@ let AIAgentActionEntity = class AIAgentActionEntity extends core_1.BaseEntity {
|
|
|
13571
13663
|
return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
|
|
13572
13664
|
}
|
|
13573
13665
|
/**
|
|
13666
|
+
* Validate() method override for AI Agent Actions entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
13667
|
+
* * MaxExecutionsPerRun: This rule ensures that if a value for the maximum number of executions per run is provided, it must be greater than zero. If no value is provided, that's acceptable.
|
|
13668
|
+
* * Table-Level: This rule ensures that the minimum number of executions per run cannot be greater than the maximum number of executions per run. If either value is not specified, the rule is considered satisfied.
|
|
13669
|
+
* * MinExecutionsPerRun: This rule ensures that if a value for 'Minimum Executions Per Run' is provided, it must be zero or greater. If the value is not provided (left blank), that's also allowed.
|
|
13670
|
+
* @public
|
|
13671
|
+
* @method
|
|
13672
|
+
* @override
|
|
13673
|
+
*/
|
|
13674
|
+
Validate() {
|
|
13675
|
+
const result = super.Validate();
|
|
13676
|
+
this.ValidateMaxExecutionsPerRunGreaterThanZero(result);
|
|
13677
|
+
this.ValidateMinExecutionsPerRunLessThanOrEqualToMax(result);
|
|
13678
|
+
this.ValidateMinExecutionsPerRunIsNonNegative(result);
|
|
13679
|
+
return result;
|
|
13680
|
+
}
|
|
13681
|
+
/**
|
|
13682
|
+
* This rule ensures that if a value for the maximum number of executions per run is provided, it must be greater than zero. If no value is provided, that's acceptable.
|
|
13683
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
13684
|
+
* @public
|
|
13685
|
+
* @method
|
|
13686
|
+
*/
|
|
13687
|
+
ValidateMaxExecutionsPerRunGreaterThanZero(result) {
|
|
13688
|
+
if (this.MaxExecutionsPerRun !== null && this.MaxExecutionsPerRun <= 0) {
|
|
13689
|
+
result.Errors.push(new core_1.ValidationErrorInfo("MaxExecutionsPerRun", "If a maximum executions per run is specified, it must be greater than zero.", this.MaxExecutionsPerRun, core_1.ValidationErrorType.Failure));
|
|
13690
|
+
}
|
|
13691
|
+
}
|
|
13692
|
+
/**
|
|
13693
|
+
* This rule ensures that the minimum number of executions per run cannot be greater than the maximum number of executions per run. If either value is not specified, the rule is considered satisfied.
|
|
13694
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
13695
|
+
* @public
|
|
13696
|
+
* @method
|
|
13697
|
+
*/
|
|
13698
|
+
ValidateMinExecutionsPerRunLessThanOrEqualToMax(result) {
|
|
13699
|
+
if (this.MinExecutionsPerRun !== null &&
|
|
13700
|
+
this.MaxExecutionsPerRun !== null &&
|
|
13701
|
+
this.MinExecutionsPerRun > this.MaxExecutionsPerRun) {
|
|
13702
|
+
result.Errors.push(new core_1.ValidationErrorInfo("MinExecutionsPerRun", "The minimum executions per run cannot be greater than the maximum executions per run.", this.MinExecutionsPerRun, core_1.ValidationErrorType.Failure));
|
|
13703
|
+
}
|
|
13704
|
+
}
|
|
13705
|
+
/**
|
|
13706
|
+
* This rule ensures that if a value for 'Minimum Executions Per Run' is provided, it must be zero or greater. If the value is not provided (left blank), that's also allowed.
|
|
13707
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
13708
|
+
* @public
|
|
13709
|
+
* @method
|
|
13710
|
+
*/
|
|
13711
|
+
ValidateMinExecutionsPerRunIsNonNegative(result) {
|
|
13712
|
+
if (this.MinExecutionsPerRun !== null && this.MinExecutionsPerRun < 0) {
|
|
13713
|
+
result.Errors.push(new core_1.ValidationErrorInfo("MinExecutionsPerRun", "Minimum executions per run must be zero or greater.", this.MinExecutionsPerRun, core_1.ValidationErrorType.Failure));
|
|
13714
|
+
}
|
|
13715
|
+
}
|
|
13716
|
+
/**
|
|
13574
13717
|
* * Field Name: ID
|
|
13575
13718
|
* * Display Name: ID
|
|
13576
13719
|
* * SQL Data Type: uniqueidentifier
|
|
@@ -13645,6 +13788,30 @@ let AIAgentActionEntity = class AIAgentActionEntity extends core_1.BaseEntity {
|
|
|
13645
13788
|
return this.Get('__mj_UpdatedAt');
|
|
13646
13789
|
}
|
|
13647
13790
|
/**
|
|
13791
|
+
* * Field Name: MinExecutionsPerRun
|
|
13792
|
+
* * Display Name: Min Executions Per Run
|
|
13793
|
+
* * SQL Data Type: int
|
|
13794
|
+
* * Description: Minimum number of times this action must be executed per agent run
|
|
13795
|
+
*/
|
|
13796
|
+
get MinExecutionsPerRun() {
|
|
13797
|
+
return this.Get('MinExecutionsPerRun');
|
|
13798
|
+
}
|
|
13799
|
+
set MinExecutionsPerRun(value) {
|
|
13800
|
+
this.Set('MinExecutionsPerRun', value);
|
|
13801
|
+
}
|
|
13802
|
+
/**
|
|
13803
|
+
* * Field Name: MaxExecutionsPerRun
|
|
13804
|
+
* * Display Name: Max Executions Per Run
|
|
13805
|
+
* * SQL Data Type: int
|
|
13806
|
+
* * Description: Maximum number of times this action can be executed per agent run
|
|
13807
|
+
*/
|
|
13808
|
+
get MaxExecutionsPerRun() {
|
|
13809
|
+
return this.Get('MaxExecutionsPerRun');
|
|
13810
|
+
}
|
|
13811
|
+
set MaxExecutionsPerRun(value) {
|
|
13812
|
+
this.Set('MaxExecutionsPerRun', value);
|
|
13813
|
+
}
|
|
13814
|
+
/**
|
|
13648
13815
|
* * Field Name: Agent
|
|
13649
13816
|
* * Display Name: Agent
|
|
13650
13817
|
* * SQL Data Type: nvarchar(255)
|
|
@@ -14405,6 +14572,9 @@ let AIAgentEntity = class AIAgentEntity extends core_1.BaseEntity {
|
|
|
14405
14572
|
* Validate() method override for AI Agents entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
14406
14573
|
* * Table-Level: This rule makes sure that if the ParentID is set (not empty), then the ExposeAsAction option must be disabled. If ExposeAsAction is enabled, ParentID must be empty.
|
|
14407
14574
|
* * Table-Level: This rule ensures that if context compression is enabled, all related settings (message threshold, prompt ID, and message retention count) must be specified. If context compression is not enabled, these settings may be left unspecified.
|
|
14575
|
+
* * MinExecutionsPerRun: This rule ensures that if the minimum executions per run value is provided, it must be zero or greater.
|
|
14576
|
+
* * Table-Level: This rule ensures that if both 'Minimum Executions Per Run' and 'Maximum Executions Per Run' are specified, the minimum must not be greater than the maximum. If either field is not specified, this rule does not apply.
|
|
14577
|
+
* * MaxExecutionsPerRun: This rule ensures that the maximum number of executions per run can either be left blank (unspecified) or, if provided, it must be a positive number greater than zero.
|
|
14408
14578
|
* @public
|
|
14409
14579
|
* @method
|
|
14410
14580
|
* @override
|
|
@@ -14413,6 +14583,9 @@ let AIAgentEntity = class AIAgentEntity extends core_1.BaseEntity {
|
|
|
14413
14583
|
const result = super.Validate();
|
|
14414
14584
|
this.ValidateParentIDMustBeNullIfExposeAsActionTrue(result);
|
|
14415
14585
|
this.ValidateEnableContextCompressionRequiresContextFields(result);
|
|
14586
|
+
this.ValidateMinExecutionsPerRunIsNonNegative(result);
|
|
14587
|
+
this.ValidateMinExecutionsPerRunLessThanOrEqualToMaxExecutionsPerRun(result);
|
|
14588
|
+
this.ValidateMaxExecutionsPerRunIsNullOrPositive(result);
|
|
14416
14589
|
return result;
|
|
14417
14590
|
}
|
|
14418
14591
|
/**
|
|
@@ -14446,6 +14619,39 @@ let AIAgentEntity = class AIAgentEntity extends core_1.BaseEntity {
|
|
|
14446
14619
|
}
|
|
14447
14620
|
}
|
|
14448
14621
|
/**
|
|
14622
|
+
* This rule ensures that if the minimum executions per run value is provided, it must be zero or greater.
|
|
14623
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
14624
|
+
* @public
|
|
14625
|
+
* @method
|
|
14626
|
+
*/
|
|
14627
|
+
ValidateMinExecutionsPerRunIsNonNegative(result) {
|
|
14628
|
+
if (this.MinExecutionsPerRun !== null && this.MinExecutionsPerRun < 0) {
|
|
14629
|
+
result.Errors.push(new core_1.ValidationErrorInfo("MinExecutionsPerRun", "If specified, the minimum executions per run must be zero or greater.", this.MinExecutionsPerRun, core_1.ValidationErrorType.Failure));
|
|
14630
|
+
}
|
|
14631
|
+
}
|
|
14632
|
+
/**
|
|
14633
|
+
* This rule ensures that if both 'Minimum Executions Per Run' and 'Maximum Executions Per Run' are specified, the minimum must not be greater than the maximum. If either field is not specified, this rule does not apply.
|
|
14634
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
14635
|
+
* @public
|
|
14636
|
+
* @method
|
|
14637
|
+
*/
|
|
14638
|
+
ValidateMinExecutionsPerRunLessThanOrEqualToMaxExecutionsPerRun(result) {
|
|
14639
|
+
if (this.MinExecutionsPerRun !== null && this.MaxExecutionsPerRun !== null && this.MinExecutionsPerRun > this.MaxExecutionsPerRun) {
|
|
14640
|
+
result.Errors.push(new core_1.ValidationErrorInfo("MinExecutionsPerRun", "Minimum executions per run cannot be greater than maximum executions per run.", this.MinExecutionsPerRun, core_1.ValidationErrorType.Failure));
|
|
14641
|
+
}
|
|
14642
|
+
}
|
|
14643
|
+
/**
|
|
14644
|
+
* This rule ensures that the maximum number of executions per run can either be left blank (unspecified) or, if provided, it must be a positive number greater than zero.
|
|
14645
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
14646
|
+
* @public
|
|
14647
|
+
* @method
|
|
14648
|
+
*/
|
|
14649
|
+
ValidateMaxExecutionsPerRunIsNullOrPositive(result) {
|
|
14650
|
+
if (this.MaxExecutionsPerRun !== null && this.MaxExecutionsPerRun <= 0) {
|
|
14651
|
+
result.Errors.push(new core_1.ValidationErrorInfo("MaxExecutionsPerRun", "MaxExecutionsPerRun must be left blank or must be greater than zero.", this.MaxExecutionsPerRun, core_1.ValidationErrorType.Failure));
|
|
14652
|
+
}
|
|
14653
|
+
}
|
|
14654
|
+
/**
|
|
14449
14655
|
* * Field Name: ID
|
|
14450
14656
|
* * Display Name: ID
|
|
14451
14657
|
* * SQL Data Type: uniqueidentifier
|
|
@@ -14736,6 +14942,138 @@ data flow when the agent executes its own prompt step.
|
|
|
14736
14942
|
this.Set('PayloadSelfWritePaths', value);
|
|
14737
14943
|
}
|
|
14738
14944
|
/**
|
|
14945
|
+
* * Field Name: PayloadScope
|
|
14946
|
+
* * Display Name: Payload Scope
|
|
14947
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
14948
|
+
* * 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)
|
|
14949
|
+
*/
|
|
14950
|
+
get PayloadScope() {
|
|
14951
|
+
return this.Get('PayloadScope');
|
|
14952
|
+
}
|
|
14953
|
+
set PayloadScope(value) {
|
|
14954
|
+
this.Set('PayloadScope', value);
|
|
14955
|
+
}
|
|
14956
|
+
/**
|
|
14957
|
+
* * Field Name: FinalPayloadValidation
|
|
14958
|
+
* * Display Name: Final Payload Validation
|
|
14959
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
14960
|
+
* * 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.
|
|
14961
|
+
*/
|
|
14962
|
+
get FinalPayloadValidation() {
|
|
14963
|
+
return this.Get('FinalPayloadValidation');
|
|
14964
|
+
}
|
|
14965
|
+
set FinalPayloadValidation(value) {
|
|
14966
|
+
this.Set('FinalPayloadValidation', value);
|
|
14967
|
+
}
|
|
14968
|
+
/**
|
|
14969
|
+
* * Field Name: FinalPayloadValidationMode
|
|
14970
|
+
* * Display Name: Final Payload Validation Mode
|
|
14971
|
+
* * SQL Data Type: nvarchar(25)
|
|
14972
|
+
* * Default Value: Retry
|
|
14973
|
+
* * Value List Type: List
|
|
14974
|
+
* * Possible Values
|
|
14975
|
+
* * Retry
|
|
14976
|
+
* * Fail
|
|
14977
|
+
* * Warn
|
|
14978
|
+
* * 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.
|
|
14979
|
+
*/
|
|
14980
|
+
get FinalPayloadValidationMode() {
|
|
14981
|
+
return this.Get('FinalPayloadValidationMode');
|
|
14982
|
+
}
|
|
14983
|
+
set FinalPayloadValidationMode(value) {
|
|
14984
|
+
this.Set('FinalPayloadValidationMode', value);
|
|
14985
|
+
}
|
|
14986
|
+
/**
|
|
14987
|
+
* * Field Name: FinalPayloadValidationMaxRetries
|
|
14988
|
+
* * Display Name: Final Payload Validation Max Retries
|
|
14989
|
+
* * SQL Data Type: int
|
|
14990
|
+
* * Default Value: 3
|
|
14991
|
+
* * Description: Maximum number of retry attempts allowed when FinalPayloadValidation fails with
|
|
14992
|
+
Retry mode. After reaching this limit, the validation will fail permanently.
|
|
14993
|
+
*/
|
|
14994
|
+
get FinalPayloadValidationMaxRetries() {
|
|
14995
|
+
return this.Get('FinalPayloadValidationMaxRetries');
|
|
14996
|
+
}
|
|
14997
|
+
set FinalPayloadValidationMaxRetries(value) {
|
|
14998
|
+
this.Set('FinalPayloadValidationMaxRetries', value);
|
|
14999
|
+
}
|
|
15000
|
+
/**
|
|
15001
|
+
* * Field Name: MaxCostPerRun
|
|
15002
|
+
* * Display Name: Max Cost Per Run
|
|
15003
|
+
* * SQL Data Type: decimal(10, 4)
|
|
15004
|
+
* * Description: Maximum cost in dollars allowed for a single agent run. Run will be terminated
|
|
15005
|
+
if this limit is exceeded.
|
|
15006
|
+
*/
|
|
15007
|
+
get MaxCostPerRun() {
|
|
15008
|
+
return this.Get('MaxCostPerRun');
|
|
15009
|
+
}
|
|
15010
|
+
set MaxCostPerRun(value) {
|
|
15011
|
+
this.Set('MaxCostPerRun', value);
|
|
15012
|
+
}
|
|
15013
|
+
/**
|
|
15014
|
+
* * Field Name: MaxTokensPerRun
|
|
15015
|
+
* * Display Name: Max Tokens Per Run
|
|
15016
|
+
* * SQL Data Type: int
|
|
15017
|
+
* * Description: Maximum total tokens (input + output) allowed for a single agent run. Run will
|
|
15018
|
+
be terminated if this limit is exceeded.
|
|
15019
|
+
*/
|
|
15020
|
+
get MaxTokensPerRun() {
|
|
15021
|
+
return this.Get('MaxTokensPerRun');
|
|
15022
|
+
}
|
|
15023
|
+
set MaxTokensPerRun(value) {
|
|
15024
|
+
this.Set('MaxTokensPerRun', value);
|
|
15025
|
+
}
|
|
15026
|
+
/**
|
|
15027
|
+
* * Field Name: MaxIterationsPerRun
|
|
15028
|
+
* * Display Name: Max Iterations Per Run
|
|
15029
|
+
* * SQL Data Type: int
|
|
15030
|
+
* * Description: Maximum number of prompt iterations allowed for a single agent run. Run will be
|
|
15031
|
+
terminated if this limit is exceeded.
|
|
15032
|
+
*/
|
|
15033
|
+
get MaxIterationsPerRun() {
|
|
15034
|
+
return this.Get('MaxIterationsPerRun');
|
|
15035
|
+
}
|
|
15036
|
+
set MaxIterationsPerRun(value) {
|
|
15037
|
+
this.Set('MaxIterationsPerRun', value);
|
|
15038
|
+
}
|
|
15039
|
+
/**
|
|
15040
|
+
* * Field Name: MaxTimePerRun
|
|
15041
|
+
* * Display Name: Max Time Per Run
|
|
15042
|
+
* * SQL Data Type: int
|
|
15043
|
+
* * Description: Maximum time in seconds allowed for a single agent run. Run will be terminated
|
|
15044
|
+
if this limit is exceeded.
|
|
15045
|
+
*/
|
|
15046
|
+
get MaxTimePerRun() {
|
|
15047
|
+
return this.Get('MaxTimePerRun');
|
|
15048
|
+
}
|
|
15049
|
+
set MaxTimePerRun(value) {
|
|
15050
|
+
this.Set('MaxTimePerRun', value);
|
|
15051
|
+
}
|
|
15052
|
+
/**
|
|
15053
|
+
* * Field Name: MinExecutionsPerRun
|
|
15054
|
+
* * Display Name: Min Executions Per Run
|
|
15055
|
+
* * SQL Data Type: int
|
|
15056
|
+
* * Description: When acting as a sub-agent, minimum number of times this agent must be executed per parent agent run
|
|
15057
|
+
*/
|
|
15058
|
+
get MinExecutionsPerRun() {
|
|
15059
|
+
return this.Get('MinExecutionsPerRun');
|
|
15060
|
+
}
|
|
15061
|
+
set MinExecutionsPerRun(value) {
|
|
15062
|
+
this.Set('MinExecutionsPerRun', value);
|
|
15063
|
+
}
|
|
15064
|
+
/**
|
|
15065
|
+
* * Field Name: MaxExecutionsPerRun
|
|
15066
|
+
* * Display Name: Max Executions Per Run
|
|
15067
|
+
* * SQL Data Type: int
|
|
15068
|
+
* * Description: When acting as a sub-agent, maximum number of times this agent can be executed per parent agent run
|
|
15069
|
+
*/
|
|
15070
|
+
get MaxExecutionsPerRun() {
|
|
15071
|
+
return this.Get('MaxExecutionsPerRun');
|
|
15072
|
+
}
|
|
15073
|
+
set MaxExecutionsPerRun(value) {
|
|
15074
|
+
this.Set('MaxExecutionsPerRun', value);
|
|
15075
|
+
}
|
|
15076
|
+
/**
|
|
14739
15077
|
* * Field Name: Parent
|
|
14740
15078
|
* * Display Name: Parent
|
|
14741
15079
|
* * SQL Data Type: nvarchar(255)
|
|
@@ -29782,6 +30120,7 @@ let AIAgentRunStepEntity = class AIAgentRunStepEntity extends core_1.BaseEntity
|
|
|
29782
30120
|
/**
|
|
29783
30121
|
* 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:
|
|
29784
30122
|
* * StepNumber: This rule ensures that the step number must always be greater than zero.
|
|
30123
|
+
* * FinalPayloadValidationResult: This rule ensures that the FinalPayloadValidationResult field is either left blank or is set to one of the following values: 'Warn', 'Fail', 'Retry', or 'Pass'. No other values are allowed.
|
|
29785
30124
|
* @public
|
|
29786
30125
|
* @method
|
|
29787
30126
|
* @override
|
|
@@ -29789,6 +30128,7 @@ let AIAgentRunStepEntity = class AIAgentRunStepEntity extends core_1.BaseEntity
|
|
|
29789
30128
|
Validate() {
|
|
29790
30129
|
const result = super.Validate();
|
|
29791
30130
|
this.ValidateStepNumberGreaterThanZero(result);
|
|
30131
|
+
this.ValidateFinalPayloadValidationResultAllowedValues(result);
|
|
29792
30132
|
return result;
|
|
29793
30133
|
}
|
|
29794
30134
|
/**
|
|
@@ -29803,6 +30143,18 @@ let AIAgentRunStepEntity = class AIAgentRunStepEntity extends core_1.BaseEntity
|
|
|
29803
30143
|
}
|
|
29804
30144
|
}
|
|
29805
30145
|
/**
|
|
30146
|
+
* This rule ensures that the FinalPayloadValidationResult field is either left blank or is set to one of the following values: 'Warn', 'Fail', 'Retry', or 'Pass'. No other values are allowed.
|
|
30147
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
30148
|
+
* @public
|
|
30149
|
+
* @method
|
|
30150
|
+
*/
|
|
30151
|
+
ValidateFinalPayloadValidationResultAllowedValues(result) {
|
|
30152
|
+
const allowedValues = ["Warn", "Fail", "Retry", "Pass"];
|
|
30153
|
+
if (this.FinalPayloadValidationResult !== null && !allowedValues.includes(this.FinalPayloadValidationResult)) {
|
|
30154
|
+
result.Errors.push(new core_1.ValidationErrorInfo("FinalPayloadValidationResult", "If a final payload validation result is specified, it must be either 'Warn', 'Fail', 'Retry', or 'Pass'.", this.FinalPayloadValidationResult, core_1.ValidationErrorType.Failure));
|
|
30155
|
+
}
|
|
30156
|
+
}
|
|
30157
|
+
/**
|
|
29806
30158
|
* * Field Name: ID
|
|
29807
30159
|
* * Display Name: ID
|
|
29808
30160
|
* * SQL Data Type: uniqueidentifier
|
|
@@ -30031,6 +30383,33 @@ let AIAgentRunStepEntity = class AIAgentRunStepEntity extends core_1.BaseEntity
|
|
|
30031
30383
|
set PayloadAtEnd(value) {
|
|
30032
30384
|
this.Set('PayloadAtEnd', value);
|
|
30033
30385
|
}
|
|
30386
|
+
/**
|
|
30387
|
+
* * Field Name: FinalPayloadValidationResult
|
|
30388
|
+
* * Display Name: Final Payload Validation Result
|
|
30389
|
+
* * SQL Data Type: nvarchar(25)
|
|
30390
|
+
* * Description: Result of the final payload validation for this step. Pass indicates successful
|
|
30391
|
+
validation, Retry means validation failed but will retry, Fail means validation failed
|
|
30392
|
+
permanently, Warn means validation failed but execution continues.
|
|
30393
|
+
*/
|
|
30394
|
+
get FinalPayloadValidationResult() {
|
|
30395
|
+
return this.Get('FinalPayloadValidationResult');
|
|
30396
|
+
}
|
|
30397
|
+
set FinalPayloadValidationResult(value) {
|
|
30398
|
+
this.Set('FinalPayloadValidationResult', value);
|
|
30399
|
+
}
|
|
30400
|
+
/**
|
|
30401
|
+
* * Field Name: FinalPayloadValidationMessages
|
|
30402
|
+
* * Display Name: Final Payload Validation Messages
|
|
30403
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
30404
|
+
* * Description: Validation error messages or warnings from final payload validation. Contains
|
|
30405
|
+
detailed information about what validation rules failed.
|
|
30406
|
+
*/
|
|
30407
|
+
get FinalPayloadValidationMessages() {
|
|
30408
|
+
return this.Get('FinalPayloadValidationMessages');
|
|
30409
|
+
}
|
|
30410
|
+
set FinalPayloadValidationMessages(value) {
|
|
30411
|
+
this.Set('FinalPayloadValidationMessages', value);
|
|
30412
|
+
}
|
|
30034
30413
|
};
|
|
30035
30414
|
exports.AIAgentRunStepEntity = AIAgentRunStepEntity;
|
|
30036
30415
|
exports.AIAgentRunStepEntity = AIAgentRunStepEntity = __decorate([
|
|
@@ -30451,6 +30830,20 @@ let AIAgentRunEntity = class AIAgentRunEntity extends core_1.BaseEntity {
|
|
|
30451
30830
|
this.Set('StartingPayload', value);
|
|
30452
30831
|
}
|
|
30453
30832
|
/**
|
|
30833
|
+
* * Field Name: TotalPromptIterations
|
|
30834
|
+
* * Display Name: Total Prompt Iterations
|
|
30835
|
+
* * SQL Data Type: int
|
|
30836
|
+
* * Default Value: 0
|
|
30837
|
+
* * Description: Total number of prompt iterations executed during this agent run. Incremented
|
|
30838
|
+
each time the agent processes a prompt step.
|
|
30839
|
+
*/
|
|
30840
|
+
get TotalPromptIterations() {
|
|
30841
|
+
return this.Get('TotalPromptIterations');
|
|
30842
|
+
}
|
|
30843
|
+
set TotalPromptIterations(value) {
|
|
30844
|
+
this.Set('TotalPromptIterations', value);
|
|
30845
|
+
}
|
|
30846
|
+
/**
|
|
30454
30847
|
* * Field Name: Agent
|
|
30455
30848
|
* * Display Name: Agent
|
|
30456
30849
|
* * SQL Data Type: nvarchar(255)
|