@memberjunction/core-entities 2.81.0 → 2.83.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.
|
@@ -1220,6 +1220,11 @@ if this limit is exceeded.`),
|
|
|
1220
1220
|
* * Fail
|
|
1221
1221
|
* * Warn
|
|
1222
1222
|
* * Description: Determines how to handle StartingPayloadValidation failures. Fail = reject invalid input, Warn = log warning but proceed.`),
|
|
1223
|
+
DefaultPromptEffortLevel: zod_1.z.number().nullable().describe(`
|
|
1224
|
+
* * Field Name: DefaultPromptEffortLevel
|
|
1225
|
+
* * Display Name: Default Prompt Effort Level
|
|
1226
|
+
* * SQL Data Type: int
|
|
1227
|
+
* * 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.`),
|
|
1223
1228
|
Parent: zod_1.z.string().nullable().describe(`
|
|
1224
1229
|
* * Field Name: Parent
|
|
1225
1230
|
* * Display Name: Parent
|
|
@@ -1805,6 +1810,11 @@ exports.AIPromptSchema = zod_1.z.object({
|
|
|
1805
1810
|
* * SQL Data Type: nvarchar(50)
|
|
1806
1811
|
* * Default Value: All
|
|
1807
1812
|
* * Description: Types of errors that should trigger failover. Options: All, NetworkOnly, RateLimitOnly, ServiceErrorOnly`),
|
|
1813
|
+
EffortLevel: zod_1.z.number().nullable().describe(`
|
|
1814
|
+
* * Field Name: EffortLevel
|
|
1815
|
+
* * Display Name: Effort Level
|
|
1816
|
+
* * SQL Data Type: int
|
|
1817
|
+
* * Description: Effort level for this specific prompt (1-100, where 1=minimal effort, 100=maximum effort). Higher values request more thorough reasoning and analysis. Can be overridden by agent DefaultPromptEffortLevel or runtime parameters.`),
|
|
1808
1818
|
Template: zod_1.z.string().describe(`
|
|
1809
1819
|
* * Field Name: Template
|
|
1810
1820
|
* * Display Name: Template
|
|
@@ -7593,6 +7603,11 @@ each time the agent processes a prompt step.`),
|
|
|
7593
7603
|
* * SQL Data Type: bit
|
|
7594
7604
|
* * Default Value: 0
|
|
7595
7605
|
* * Description: Indicates whether verbose logging was enabled during this agent execution. When true, detailed decision-making and execution flow was logged.`),
|
|
7606
|
+
EffortLevel: zod_1.z.number().nullable().describe(`
|
|
7607
|
+
* * Field Name: EffortLevel
|
|
7608
|
+
* * Display Name: Effort Level
|
|
7609
|
+
* * SQL Data Type: int
|
|
7610
|
+
* * Description: Effort level that was actually used during this agent run execution (1-100, where 1=minimal effort, 100=maximum effort). This is the resolved effort level after applying the precedence hierarchy: runtime override > agent default > prompt defaults.`),
|
|
7596
7611
|
Agent: zod_1.z.string().nullable().describe(`
|
|
7597
7612
|
* * Field Name: Agent
|
|
7598
7613
|
* * Display Name: Agent
|
|
@@ -8848,6 +8863,11 @@ exports.AIPromptRunSchema = zod_1.z.object({
|
|
|
8848
8863
|
* * Display Name: Model Specific Response Details
|
|
8849
8864
|
* * SQL Data Type: nvarchar(MAX)
|
|
8850
8865
|
* * Description: JSON field containing provider-specific response metadata and details not captured in standard fields. Structure varies by AI provider.`),
|
|
8866
|
+
EffortLevel: zod_1.z.number().nullable().describe(`
|
|
8867
|
+
* * Field Name: EffortLevel
|
|
8868
|
+
* * Display Name: Effort Level
|
|
8869
|
+
* * SQL Data Type: int
|
|
8870
|
+
* * Description: Effort level that was actually used during this prompt run execution (1-100, where 1=minimal effort, 100=maximum effort). This is the resolved effort level after applying the precedence hierarchy: runtime override > agent default > prompt default > provider default.`),
|
|
8851
8871
|
Prompt: zod_1.z.string().describe(`
|
|
8852
8872
|
* * Field Name: Prompt
|
|
8853
8873
|
* * Display Name: Prompt
|
|
@@ -15451,6 +15471,7 @@ let AIAgentEntity = class AIAgentEntity extends core_1.BaseEntity {
|
|
|
15451
15471
|
}
|
|
15452
15472
|
/**
|
|
15453
15473
|
* 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:
|
|
15474
|
+
* * DefaultPromptEffortLevel: This rule ensures that the DefaultPromptEffortLevel must always be a value between 1 and 100, inclusive.
|
|
15454
15475
|
* * 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.
|
|
15455
15476
|
* * MinExecutionsPerRun: This rule ensures that if the minimum executions per run value is provided, it must be zero or greater.
|
|
15456
15477
|
* * 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.
|
|
@@ -15462,6 +15483,7 @@ let AIAgentEntity = class AIAgentEntity extends core_1.BaseEntity {
|
|
|
15462
15483
|
*/
|
|
15463
15484
|
Validate() {
|
|
15464
15485
|
const result = super.Validate();
|
|
15486
|
+
this.ValidateDefaultPromptEffortLevelWithinRange(result);
|
|
15465
15487
|
this.ValidateMaxExecutionsPerRunIsNullOrPositive(result);
|
|
15466
15488
|
this.ValidateMinExecutionsPerRunIsNonNegative(result);
|
|
15467
15489
|
this.ValidateEnableContextCompressionRequiresContextFields(result);
|
|
@@ -15470,6 +15492,17 @@ let AIAgentEntity = class AIAgentEntity extends core_1.BaseEntity {
|
|
|
15470
15492
|
return result;
|
|
15471
15493
|
}
|
|
15472
15494
|
/**
|
|
15495
|
+
* This rule ensures that the DefaultPromptEffortLevel must always be a value between 1 and 100, inclusive.
|
|
15496
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
15497
|
+
* @public
|
|
15498
|
+
* @method
|
|
15499
|
+
*/
|
|
15500
|
+
ValidateDefaultPromptEffortLevelWithinRange(result) {
|
|
15501
|
+
if (this.DefaultPromptEffortLevel < 1 || this.DefaultPromptEffortLevel > 100) {
|
|
15502
|
+
result.Errors.push(new core_1.ValidationErrorInfo("DefaultPromptEffortLevel", "DefaultPromptEffortLevel must be between 1 and 100.", this.DefaultPromptEffortLevel, core_1.ValidationErrorType.Failure));
|
|
15503
|
+
}
|
|
15504
|
+
}
|
|
15505
|
+
/**
|
|
15473
15506
|
* 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.
|
|
15474
15507
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
15475
15508
|
* @public
|
|
@@ -15984,6 +16017,18 @@ if this limit is exceeded.
|
|
|
15984
16017
|
this.Set('StartingPayloadValidationMode', value);
|
|
15985
16018
|
}
|
|
15986
16019
|
/**
|
|
16020
|
+
* * Field Name: DefaultPromptEffortLevel
|
|
16021
|
+
* * Display Name: Default Prompt Effort Level
|
|
16022
|
+
* * SQL Data Type: int
|
|
16023
|
+
* * 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.
|
|
16024
|
+
*/
|
|
16025
|
+
get DefaultPromptEffortLevel() {
|
|
16026
|
+
return this.Get('DefaultPromptEffortLevel');
|
|
16027
|
+
}
|
|
16028
|
+
set DefaultPromptEffortLevel(value) {
|
|
16029
|
+
this.Set('DefaultPromptEffortLevel', value);
|
|
16030
|
+
}
|
|
16031
|
+
/**
|
|
15987
16032
|
* * Field Name: Parent
|
|
15988
16033
|
* * Display Name: Parent
|
|
15989
16034
|
* * SQL Data Type: nvarchar(255)
|
|
@@ -16711,6 +16756,7 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
|
|
|
16711
16756
|
* Validate() method override for AI Prompts entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
16712
16757
|
* * CacheSimilarityThreshold: This rule ensures that if a cache similarity threshold is provided, it must be a value between 0 and 1, inclusive. If no value is provided, that's also allowed.
|
|
16713
16758
|
* * CacheTTLSeconds: This rule ensures that if the cache expiration time in seconds is provided, it must be greater than zero.
|
|
16759
|
+
* * EffortLevel: This rule ensures that the EffortLevel must be a value between 1 and 100, inclusive.
|
|
16714
16760
|
* * FailoverErrorScope: This rule ensures that the FailoverErrorScope field can only be set to 'ServiceErrorOnly', 'RateLimitOnly', 'NetworkOnly', 'All', or left empty.
|
|
16715
16761
|
* * FailoverModelStrategy: This rule ensures that the value for FailoverModelStrategy is either 'RequireSameModel', 'PreferDifferentModel', 'PreferSameModel', or left blank (not set). Any other value is not allowed.
|
|
16716
16762
|
* * FailoverStrategy: This rule ensures that the FailoverStrategy field, if specified, must be either 'None', 'PowerRank', 'NextBestModel', 'SameModelDifferentVendor', or left blank (unset).
|
|
@@ -16727,6 +16773,7 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
|
|
|
16727
16773
|
const result = super.Validate();
|
|
16728
16774
|
this.ValidateCacheSimilarityThresholdIsBetweenZeroAndOne(result);
|
|
16729
16775
|
this.ValidateCacheTTLSecondsGreaterThanZero(result);
|
|
16776
|
+
this.ValidateEffortLevelIsWithinRange(result);
|
|
16730
16777
|
this.ValidateFailoverErrorScopeAgainstAllowedValues(result);
|
|
16731
16778
|
this.ValidateFailoverModelStrategyAgainstAllowedValues(result);
|
|
16732
16779
|
this.ValidateFailoverStrategyAllowedValues(result);
|
|
@@ -16760,6 +16807,17 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
|
|
|
16760
16807
|
}
|
|
16761
16808
|
}
|
|
16762
16809
|
/**
|
|
16810
|
+
* This rule ensures that the EffortLevel must be a value between 1 and 100, inclusive.
|
|
16811
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
16812
|
+
* @public
|
|
16813
|
+
* @method
|
|
16814
|
+
*/
|
|
16815
|
+
ValidateEffortLevelIsWithinRange(result) {
|
|
16816
|
+
if (this.EffortLevel < 1 || this.EffortLevel > 100) {
|
|
16817
|
+
result.Errors.push(new core_1.ValidationErrorInfo("EffortLevel", "EffortLevel must be between 1 and 100.", this.EffortLevel, core_1.ValidationErrorType.Failure));
|
|
16818
|
+
}
|
|
16819
|
+
}
|
|
16820
|
+
/**
|
|
16763
16821
|
* This rule ensures that the FailoverErrorScope field can only be set to 'ServiceErrorOnly', 'RateLimitOnly', 'NetworkOnly', 'All', or left empty.
|
|
16764
16822
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
16765
16823
|
* @public
|
|
@@ -17539,6 +17597,18 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
|
|
|
17539
17597
|
this.Set('FailoverErrorScope', value);
|
|
17540
17598
|
}
|
|
17541
17599
|
/**
|
|
17600
|
+
* * Field Name: EffortLevel
|
|
17601
|
+
* * Display Name: Effort Level
|
|
17602
|
+
* * SQL Data Type: int
|
|
17603
|
+
* * Description: Effort level for this specific prompt (1-100, where 1=minimal effort, 100=maximum effort). Higher values request more thorough reasoning and analysis. Can be overridden by agent DefaultPromptEffortLevel or runtime parameters.
|
|
17604
|
+
*/
|
|
17605
|
+
get EffortLevel() {
|
|
17606
|
+
return this.Get('EffortLevel');
|
|
17607
|
+
}
|
|
17608
|
+
set EffortLevel(value) {
|
|
17609
|
+
this.Set('EffortLevel', value);
|
|
17610
|
+
}
|
|
17611
|
+
/**
|
|
17542
17612
|
* * Field Name: Template
|
|
17543
17613
|
* * Display Name: Template
|
|
17544
17614
|
* * SQL Data Type: nvarchar(255)
|
|
@@ -31643,6 +31713,29 @@ let AIAgentRunEntity = class AIAgentRunEntity extends core_1.BaseEntity {
|
|
|
31643
31713
|
return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
|
|
31644
31714
|
}
|
|
31645
31715
|
/**
|
|
31716
|
+
* Validate() method override for MJ: AI Agent Runs entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
31717
|
+
* * EffortLevel: This rule ensures that the EffortLevel must be a value between 1 and 100, inclusive.
|
|
31718
|
+
* @public
|
|
31719
|
+
* @method
|
|
31720
|
+
* @override
|
|
31721
|
+
*/
|
|
31722
|
+
Validate() {
|
|
31723
|
+
const result = super.Validate();
|
|
31724
|
+
this.ValidateEffortLevelWithinAllowedRange(result);
|
|
31725
|
+
return result;
|
|
31726
|
+
}
|
|
31727
|
+
/**
|
|
31728
|
+
* This rule ensures that the EffortLevel must be a value between 1 and 100, inclusive.
|
|
31729
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
31730
|
+
* @public
|
|
31731
|
+
* @method
|
|
31732
|
+
*/
|
|
31733
|
+
ValidateEffortLevelWithinAllowedRange(result) {
|
|
31734
|
+
if (this.EffortLevel < 1 || this.EffortLevel > 100) {
|
|
31735
|
+
result.Errors.push(new core_1.ValidationErrorInfo("EffortLevel", "EffortLevel must be between 1 and 100.", this.EffortLevel, core_1.ValidationErrorType.Failure));
|
|
31736
|
+
}
|
|
31737
|
+
}
|
|
31738
|
+
/**
|
|
31646
31739
|
* * Field Name: ID
|
|
31647
31740
|
* * Display Name: ID
|
|
31648
31741
|
* * SQL Data Type: uniqueidentifier
|
|
@@ -32107,6 +32200,18 @@ each time the agent processes a prompt step.
|
|
|
32107
32200
|
this.Set('Verbose', value);
|
|
32108
32201
|
}
|
|
32109
32202
|
/**
|
|
32203
|
+
* * Field Name: EffortLevel
|
|
32204
|
+
* * Display Name: Effort Level
|
|
32205
|
+
* * SQL Data Type: int
|
|
32206
|
+
* * Description: Effort level that was actually used during this agent run execution (1-100, where 1=minimal effort, 100=maximum effort). This is the resolved effort level after applying the precedence hierarchy: runtime override > agent default > prompt defaults.
|
|
32207
|
+
*/
|
|
32208
|
+
get EffortLevel() {
|
|
32209
|
+
return this.Get('EffortLevel');
|
|
32210
|
+
}
|
|
32211
|
+
set EffortLevel(value) {
|
|
32212
|
+
this.Set('EffortLevel', value);
|
|
32213
|
+
}
|
|
32214
|
+
/**
|
|
32110
32215
|
* * Field Name: Agent
|
|
32111
32216
|
* * Display Name: Agent
|
|
32112
32217
|
* * SQL Data Type: nvarchar(255)
|
|
@@ -34384,6 +34489,7 @@ let AIPromptRunEntity = class AIPromptRunEntity extends core_1.BaseEntity {
|
|
|
34384
34489
|
}
|
|
34385
34490
|
/**
|
|
34386
34491
|
* Validate() method override for MJ: AI Prompt Runs entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
|
|
34492
|
+
* * EffortLevel: This rule ensures that the effort level must be a number between 1 and 100, inclusive.
|
|
34387
34493
|
* * Table-Level: This rule ensures that if the 'CompletedAt' field has a value, it must be on or after the 'RunAt' field. Otherwise, if 'CompletedAt' is empty, there is no restriction.
|
|
34388
34494
|
* * Table-Level: This rule ensures that either both TokensPrompt and TokensCompletion are missing, or TokensUsed is missing, or, if all values are present, the value of TokensUsed equals the sum of TokensPrompt and TokensCompletion.
|
|
34389
34495
|
* @public
|
|
@@ -34392,11 +34498,23 @@ let AIPromptRunEntity = class AIPromptRunEntity extends core_1.BaseEntity {
|
|
|
34392
34498
|
*/
|
|
34393
34499
|
Validate() {
|
|
34394
34500
|
const result = super.Validate();
|
|
34501
|
+
this.ValidateEffortLevelWithinRange(result);
|
|
34395
34502
|
this.ValidateCompletedAtIsNullOrAfterRunAt(result);
|
|
34396
34503
|
this.ValidateTokensUsedSumMatchesPromptAndCompletion(result);
|
|
34397
34504
|
return result;
|
|
34398
34505
|
}
|
|
34399
34506
|
/**
|
|
34507
|
+
* This rule ensures that the effort level must be a number between 1 and 100, inclusive.
|
|
34508
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
34509
|
+
* @public
|
|
34510
|
+
* @method
|
|
34511
|
+
*/
|
|
34512
|
+
ValidateEffortLevelWithinRange(result) {
|
|
34513
|
+
if (this.EffortLevel < 1 || this.EffortLevel > 100) {
|
|
34514
|
+
result.Errors.push(new core_1.ValidationErrorInfo("EffortLevel", "EffortLevel must be between 1 and 100.", this.EffortLevel, core_1.ValidationErrorType.Failure));
|
|
34515
|
+
}
|
|
34516
|
+
}
|
|
34517
|
+
/**
|
|
34400
34518
|
* This rule ensures that if the 'CompletedAt' field has a value, it must be on or after the 'RunAt' field. Otherwise, if 'CompletedAt' is empty, there is no restriction.
|
|
34401
34519
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
34402
34520
|
* @public
|
|
@@ -35413,6 +35531,18 @@ let AIPromptRunEntity = class AIPromptRunEntity extends core_1.BaseEntity {
|
|
|
35413
35531
|
this.Set('ModelSpecificResponseDetails', value);
|
|
35414
35532
|
}
|
|
35415
35533
|
/**
|
|
35534
|
+
* * Field Name: EffortLevel
|
|
35535
|
+
* * Display Name: Effort Level
|
|
35536
|
+
* * SQL Data Type: int
|
|
35537
|
+
* * Description: Effort level that was actually used during this prompt run execution (1-100, where 1=minimal effort, 100=maximum effort). This is the resolved effort level after applying the precedence hierarchy: runtime override > agent default > prompt default > provider default.
|
|
35538
|
+
*/
|
|
35539
|
+
get EffortLevel() {
|
|
35540
|
+
return this.Get('EffortLevel');
|
|
35541
|
+
}
|
|
35542
|
+
set EffortLevel(value) {
|
|
35543
|
+
this.Set('EffortLevel', value);
|
|
35544
|
+
}
|
|
35545
|
+
/**
|
|
35416
35546
|
* * Field Name: Prompt
|
|
35417
35547
|
* * Display Name: Prompt
|
|
35418
35548
|
* * SQL Data Type: nvarchar(255)
|