@memberjunction/core-entities 2.43.0 → 2.45.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.
- package/dist/custom/AIAgentExtended.d.ts +13 -0
- package/dist/custom/AIAgentExtended.d.ts.map +1 -0
- package/dist/custom/AIAgentExtended.js +37 -0
- package/dist/custom/AIAgentExtended.js.map +1 -0
- package/dist/custom/AIPromptCategoryExtended.d.ts +6 -0
- package/dist/custom/AIPromptCategoryExtended.d.ts.map +1 -0
- package/dist/custom/AIPromptCategoryExtended.js +26 -0
- package/dist/custom/AIPromptCategoryExtended.js.map +1 -0
- package/dist/custom/AIPromptExtended.d.ts +12 -0
- package/dist/custom/AIPromptExtended.d.ts.map +1 -0
- package/dist/custom/AIPromptExtended.js +30 -0
- package/dist/custom/AIPromptExtended.js.map +1 -0
- package/dist/generated/entity_subclasses.d.ts +767 -85
- package/dist/generated/entity_subclasses.d.ts.map +1 -1
- package/dist/generated/entity_subclasses.js +1065 -39
- package/dist/generated/entity_subclasses.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/readme.md +268 -1
|
@@ -8,12 +8,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.ContentSourceParamSchema = exports.ContentProcessRunSchema = exports.ContentItemSchema = exports.ContentItemTagSchema = exports.ContentItemAttributeSchema = exports.ContentFileTypeSchema = exports.CompanyIntegrationSchema = exports.CompanyIntegrationRunSchema = exports.CompanyIntegrationRunDetailSchema = exports.CompanyIntegrationRunAPILogSchema = exports.CompanyIntegrationRecordMapSchema = exports.CompanySchema = exports.CommunicationRunSchema = exports.CommunicationProviderSchema = exports.CommunicationProviderMessageTypeSchema = exports.CommunicationLogSchema = exports.CommunicationBaseMessageTypeSchema = exports.AuthorizationSchema = exports.AuthorizationRoleSchema = exports.AuditLogSchema = exports.AuditLogTypeSchema = exports.ApplicationSchema = exports.ApplicationSettingSchema = exports.ApplicationEntitySchema = exports.AIResultCacheSchema = exports.AIPromptSchema = exports.AIPromptTypeSchema = exports.AIPromptCategorySchema = exports.AIModelSchema = exports.AIModelTypeSchema = exports.AIModelActionSchema = exports.AIAgentSchema = exports.AIAgentRequestSchema = exports.AIAgentNoteSchema = exports.AIAgentNoteTypeSchema = exports.AIAgentModelSchema = exports.AIAgentLearningCycleSchema = exports.AIAgentActionSchema = exports.AIActionSchema = exports.ActionSchema = exports.ActionResultCodeSchema = exports.ActionParamSchema = exports.ActionLibrarySchema = exports.ActionFilterSchema = exports.ActionExecutionLogSchema = exports.ActionContextSchema = exports.ActionContextTypeSchema = exports.ActionCategorySchema = exports.ActionAuthorizationSchema = exports.loadModule = void 0;
|
|
10
10
|
exports.IntegrationSchema = exports.IntegrationURLFormatSchema = exports.GeneratedCodeSchema = exports.GeneratedCodeCategorySchema = exports.FileSchema = exports.FileStorageProviderSchema = exports.FileEntityRecordLinkSchema = exports.FileCategorySchema = exports.ExplorerNavigationItemSchema = exports.ErrorLogSchema = exports.EntitySettingSchema = exports.EntityRelationshipSchema = exports.EntityRelationshipDisplayComponentSchema = exports.EntityRecordDocumentSchema = exports.EntityPermissionSchema = exports.EntityFieldSchema = exports.EntityFieldValueSchema = exports.EntityDocumentSchema = exports.EntityDocumentTypeSchema = exports.EntityDocumentSettingSchema = exports.EntityDocumentRunSchema = exports.EntityCommunicationMessageTypeSchema = exports.EntityCommunicationFieldSchema = exports.EntityAIActionSchema = exports.EntityActionSchema = exports.EntityActionParamSchema = exports.EntityActionInvocationSchema = exports.EntityActionInvocationTypeSchema = exports.EntityActionFilterSchema = exports.EntitySchema = exports.EmployeeSchema = exports.EmployeeSkillSchema = exports.EmployeeRoleSchema = exports.EmployeeCompanyIntegrationSchema = exports.DuplicateRunSchema = exports.DuplicateRunDetailSchema = exports.DuplicateRunDetailMatchSchema = exports.DatasetSchema = exports.DatasetItemSchema = exports.DataContextSchema = exports.DataContextItemSchema = exports.DashboardSchema = exports.DashboardCategorySchema = exports.ConversationSchema = exports.ConversationDetailSchema = exports.ContentTypeSchema = exports.ContentTypeAttributeSchema = exports.ContentSourceSchema = exports.ContentSourceTypeSchema = exports.ContentSourceTypeParamSchema = void 0;
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
16
|
-
exports.WorkspaceEntity = exports.WorkspaceItemEntity = exports.WorkflowEntity = exports.WorkflowRunEntity = exports.WorkflowEngineEntity = exports.VersionInstallationEntity = exports.VectorIndexEntity = void 0;
|
|
11
|
+
exports.ResourceTypeSchema = exports.ResourcePermissionSchema = exports.ResourceLinkSchema = exports.ReportSchema = exports.ReportSnapshotSchema = exports.ReportCategorySchema = exports.RecordMergeLogSchema = exports.RecordMergeDeletionLogSchema = exports.RecordChangeSchema = exports.RecordChangeReplayRunSchema = exports.RecommendationSchema = exports.RecommendationRunSchema = exports.RecommendationProviderSchema = exports.RecommendationItemSchema = exports.QueueSchema = exports.QueueTypeSchema = exports.QueueTaskSchema = exports.QueryPermissionSchema = exports.QueryFieldSchema = exports.QueryEntitySchema = exports.QueryCategorySchema = exports.QuerySchema = exports.OutputTriggerTypeSchema = exports.OutputFormatTypeSchema = exports.OutputDeliveryTypeSchema = exports.ReportVersionSchema = exports.ReportUserStateSchema = exports.DashboardUserStateSchema = exports.DashboardUserPreferenceSchema = exports.ConversationArtifactSchema = exports.ConversationArtifactVersionSchema = exports.ConversationArtifactPermissionSchema = exports.ArtifactTypeSchema = exports.AIVendorSchema = exports.AIVendorTypeSchema = exports.AIVendorTypeDefinitionSchema = exports.AIPromptRunSchema = exports.AIPromptModelSchema = exports.AIModelVendorSchema = exports.AIConfigurationSchema = exports.AIConfigurationParamSchema = exports.AIAgentTypeSchema = exports.AIAgentRunSchema = exports.AIAgentRunStepSchema = exports.AIAgentPromptSchema = exports.ListSchema = exports.ListDetailSchema = exports.ListCategorySchema = exports.LibraryItemSchema = exports.LibrarySchema = void 0;
|
|
12
|
+
exports.AIAgentEntity = exports.AIAgentRequestEntity = exports.AIAgentNoteEntity = exports.AIAgentNoteTypeEntity = exports.AIAgentModelEntity = exports.AIAgentLearningCycleEntity = exports.AIAgentActionEntity = exports.AIActionEntity = exports.ActionEntity = exports.ActionResultCodeEntity = exports.ActionParamEntity = exports.ActionLibraryEntity = exports.ActionFilterEntity = exports.ActionExecutionLogEntity = exports.ActionContextEntity = exports.ActionContextTypeEntity = exports.ActionCategoryEntity = exports.ActionAuthorizationEntity = exports.WorkspaceSchema = exports.WorkspaceItemSchema = exports.WorkflowSchema = exports.WorkflowRunSchema = exports.WorkflowEngineSchema = exports.VersionInstallationSchema = exports.VectorIndexSchema = exports.VectorDatabaseSchema = exports.UserSchema = exports.UserViewSchema = exports.UserViewRunSchema = exports.UserViewRunDetailSchema = exports.UserViewCategorySchema = exports.UserRoleSchema = exports.UserRecordLogSchema = exports.UserNotificationSchema = exports.UserFavoriteSchema = exports.UserApplicationSchema = exports.UserApplicationEntitySchema = exports.TemplateSchema = exports.TemplateParamSchema = exports.TemplateContentSchema = exports.TemplateContentTypeSchema = exports.TemplateCategorySchema = exports.TagSchema = exports.TaggedItemSchema = exports.SkillSchema = exports.SchemaInfoSchema = exports.ScheduledActionSchema = exports.ScheduledActionParamSchema = exports.RowLevelSecurityFilterSchema = exports.RoleSchema = void 0;
|
|
13
|
+
exports.EmployeeSkillEntity = exports.EmployeeRoleEntity = exports.EmployeeCompanyIntegrationEntity = exports.DuplicateRunEntity = exports.DuplicateRunDetailEntity = exports.DuplicateRunDetailMatchEntity = exports.DatasetEntity = exports.DatasetItemEntity = exports.DataContextEntity = exports.DataContextItemEntity = exports.DashboardEntity = exports.DashboardCategoryEntity = exports.ConversationEntity = exports.ConversationDetailEntity = exports.ContentTypeEntity = exports.ContentTypeAttributeEntity = exports.ContentSourceEntity = exports.ContentSourceTypeEntity = exports.ContentSourceTypeParamEntity = exports.ContentSourceParamEntity = exports.ContentProcessRunEntity = exports.ContentItemEntity = exports.ContentItemTagEntity = exports.ContentItemAttributeEntity = exports.ContentFileTypeEntity = exports.CompanyIntegrationEntity = exports.CompanyIntegrationRunEntity = exports.CompanyIntegrationRunDetailEntity = exports.CompanyIntegrationRunAPILogEntity = exports.CompanyIntegrationRecordMapEntity = exports.CompanyEntity = exports.CommunicationRunEntity = exports.CommunicationProviderEntity = exports.CommunicationProviderMessageTypeEntity = exports.CommunicationLogEntity = exports.CommunicationBaseMessageTypeEntity = exports.AuthorizationEntity = exports.AuthorizationRoleEntity = exports.AuditLogEntity = exports.AuditLogTypeEntity = exports.ApplicationEntity = exports.ApplicationSettingEntity = exports.ApplicationEntityEntity = exports.AIResultCacheEntity = exports.AIPromptEntity = exports.AIPromptTypeEntity = exports.AIPromptCategoryEntity = exports.AIModelEntity = exports.AIModelTypeEntity = exports.AIModelActionEntity = void 0;
|
|
14
|
+
exports.ConversationArtifactPermissionEntity = exports.ArtifactTypeEntity = exports.AIVendorEntity = exports.AIVendorTypeEntity = exports.AIVendorTypeDefinitionEntity = exports.AIPromptRunEntity = exports.AIPromptModelEntity = exports.AIModelVendorEntity = exports.AIConfigurationEntity = exports.AIConfigurationParamEntity = exports.AIAgentTypeEntity = exports.AIAgentRunEntity = exports.AIAgentRunStepEntity = exports.AIAgentPromptEntity = exports.ListEntity = exports.ListDetailEntity = exports.ListCategoryEntity = exports.LibraryItemEntity = exports.LibraryEntity = exports.IntegrationEntity = exports.IntegrationURLFormatEntity = exports.GeneratedCodeEntity = exports.GeneratedCodeCategoryEntity = exports.FileEntity = exports.FileStorageProviderEntity = exports.FileEntityRecordLinkEntity = exports.FileCategoryEntity = exports.ExplorerNavigationItemEntity = exports.ErrorLogEntity = exports.EntitySettingEntity = exports.EntityRelationshipEntity = exports.EntityRelationshipDisplayComponentEntity = exports.EntityRecordDocumentEntity = exports.EntityPermissionEntity = exports.EntityFieldEntity = exports.EntityFieldValueEntity = exports.EntityDocumentEntity = exports.EntityDocumentTypeEntity = exports.EntityDocumentSettingEntity = exports.EntityDocumentRunEntity = exports.EntityCommunicationMessageTypeEntity = exports.EntityCommunicationFieldEntity = exports.EntityAIActionEntity = exports.EntityActionEntity = exports.EntityActionParamEntity = exports.EntityActionInvocationEntity = exports.EntityActionInvocationTypeEntity = exports.EntityActionFilterEntity = exports.EntityEntity = exports.EmployeeEntity = void 0;
|
|
15
|
+
exports.UserRoleEntity = exports.UserRecordLogEntity = exports.UserNotificationEntity = exports.UserFavoriteEntity = exports.UserApplicationEntity = exports.UserApplicationEntityEntity = exports.TemplateEntity = exports.TemplateParamEntity = exports.TemplateContentEntity = exports.TemplateContentTypeEntity = exports.TemplateCategoryEntity = exports.TagEntity = exports.TaggedItemEntity = exports.SkillEntity = exports.SchemaInfoEntity = exports.ScheduledActionEntity = exports.ScheduledActionParamEntity = exports.RowLevelSecurityFilterEntity = exports.RoleEntity = exports.ResourceTypeEntity = exports.ResourcePermissionEntity = exports.ResourceLinkEntity = exports.ReportEntity = exports.ReportSnapshotEntity = exports.ReportCategoryEntity = exports.RecordMergeLogEntity = exports.RecordMergeDeletionLogEntity = exports.RecordChangeEntity = exports.RecordChangeReplayRunEntity = exports.RecommendationEntity = exports.RecommendationRunEntity = exports.RecommendationProviderEntity = exports.RecommendationItemEntity = exports.QueueEntity = exports.QueueTypeEntity = exports.QueueTaskEntity = exports.QueryPermissionEntity = exports.QueryFieldEntity = exports.QueryEntityEntity = exports.QueryCategoryEntity = exports.QueryEntity = exports.OutputTriggerTypeEntity = exports.OutputFormatTypeEntity = exports.OutputDeliveryTypeEntity = exports.ReportVersionEntity = exports.ReportUserStateEntity = exports.DashboardUserStateEntity = exports.DashboardUserPreferenceEntity = exports.ConversationArtifactEntity = exports.ConversationArtifactVersionEntity = void 0;
|
|
16
|
+
exports.WorkspaceEntity = exports.WorkspaceItemEntity = exports.WorkflowEntity = exports.WorkflowRunEntity = exports.WorkflowEngineEntity = exports.VersionInstallationEntity = exports.VectorIndexEntity = exports.VectorDatabaseEntity = exports.UserEntity = exports.UserViewEntity = exports.UserViewRunEntity = exports.UserViewRunDetailEntity = exports.UserViewCategoryEntity = void 0;
|
|
17
17
|
const core_1 = require("@memberjunction/core");
|
|
18
18
|
const global_1 = require("@memberjunction/global");
|
|
19
19
|
const zod_1 = require("zod");
|
|
@@ -1034,6 +1034,13 @@ exports.AIAgentSchema = zod_1.z.object({
|
|
|
1034
1034
|
* * Display Name: Context Compression Message Retention Count
|
|
1035
1035
|
* * SQL Data Type: int
|
|
1036
1036
|
* * Description: Number of recent messages to keep uncompressed when context compression is applied.`),
|
|
1037
|
+
TypeID: zod_1.z.string().describe(`
|
|
1038
|
+
* * Field Name: TypeID
|
|
1039
|
+
* * Display Name: Type ID
|
|
1040
|
+
* * SQL Data Type: uniqueidentifier
|
|
1041
|
+
* * Related Entity/Foreign Key: MJ: AI Agent Types (vwAIAgentTypes.ID)
|
|
1042
|
+
* * Default Value: A7B8C9D0-E1F2-3456-7890-123456789ABC
|
|
1043
|
+
* * Description: Reference to the AIAgentType that defines the category and system-level behavior for this agent. Cannot be null.`),
|
|
1037
1044
|
Parent: zod_1.z.string().nullable().describe(`
|
|
1038
1045
|
* * Field Name: Parent
|
|
1039
1046
|
* * Display Name: Parent
|
|
@@ -1327,7 +1334,7 @@ exports.AIPromptSchema = zod_1.z.object({
|
|
|
1327
1334
|
* * Display Name: Updated At
|
|
1328
1335
|
* * SQL Data Type: datetimeoffset
|
|
1329
1336
|
* * Default Value: getutcdate()`),
|
|
1330
|
-
ResponseFormat: zod_1.z.union([zod_1.z.literal('Any'), zod_1.z.literal('Text'), zod_1.z.literal('Markdown'), zod_1.z.literal('ModelSpecific'), zod_1.z.literal('JSON')]).describe(`
|
|
1337
|
+
ResponseFormat: zod_1.z.union([zod_1.z.literal('Any'), zod_1.z.literal('Text'), zod_1.z.literal('Markdown'), zod_1.z.literal('JSON'), zod_1.z.literal('ModelSpecific'), zod_1.z.literal('JSON')]).describe(`
|
|
1331
1338
|
* * Field Name: ResponseFormat
|
|
1332
1339
|
* * Display Name: Response Format
|
|
1333
1340
|
* * SQL Data Type: nvarchar(20)
|
|
@@ -1337,6 +1344,7 @@ exports.AIPromptSchema = zod_1.z.object({
|
|
|
1337
1344
|
* * Any
|
|
1338
1345
|
* * Text
|
|
1339
1346
|
* * Markdown
|
|
1347
|
+
* * JSON
|
|
1340
1348
|
* * ModelSpecific
|
|
1341
1349
|
* * JSON
|
|
1342
1350
|
* * Description: Specifies the expected response format for the AI model. Options include Any, Text, Markdown, JSON, and ModelSpecific. Defaults to Any if not specified.`),
|
|
@@ -1509,6 +1517,28 @@ exports.AIPromptSchema = zod_1.z.object({
|
|
|
1509
1517
|
* * SQL Data Type: bit
|
|
1510
1518
|
* * Default Value: 0
|
|
1511
1519
|
* * Description: When true, the configuration must match for a cache hit. When false, results from any configuration can be used.`),
|
|
1520
|
+
PromptRole: zod_1.z.union([zod_1.z.literal('System'), zod_1.z.literal('User'), zod_1.z.literal('Assistant'), zod_1.z.literal('SystemOrUser')]).describe(`
|
|
1521
|
+
* * Field Name: PromptRole
|
|
1522
|
+
* * Display Name: Prompt Role
|
|
1523
|
+
* * SQL Data Type: nvarchar(20)
|
|
1524
|
+
* * Default Value: System
|
|
1525
|
+
* * Value List Type: List
|
|
1526
|
+
* * Possible Values
|
|
1527
|
+
* * System
|
|
1528
|
+
* * User
|
|
1529
|
+
* * Assistant
|
|
1530
|
+
* * SystemOrUser
|
|
1531
|
+
* * Description: Determines how the prompt is used in conversation: System (always first message), User (positioned by PromptPosition), Assistant (positioned by PromptPosition), or SystemOrUser (try system first, fallback to user last if system slot taken)`),
|
|
1532
|
+
PromptPosition: zod_1.z.union([zod_1.z.literal('First'), zod_1.z.literal('Last')]).describe(`
|
|
1533
|
+
* * Field Name: PromptPosition
|
|
1534
|
+
* * Display Name: Prompt Position
|
|
1535
|
+
* * SQL Data Type: nvarchar(20)
|
|
1536
|
+
* * Default Value: First
|
|
1537
|
+
* * Value List Type: List
|
|
1538
|
+
* * Possible Values
|
|
1539
|
+
* * First
|
|
1540
|
+
* * Last
|
|
1541
|
+
* * Description: Controls message placement for User and Assistant role prompts: First (beginning of conversation) or Last (end of conversation). Not used for System role prompts which are always first`),
|
|
1512
1542
|
Template: zod_1.z.string().describe(`
|
|
1513
1543
|
* * Field Name: Template
|
|
1514
1544
|
* * Display Name: Template
|
|
@@ -3446,16 +3476,16 @@ exports.DashboardSchema = zod_1.z.object({
|
|
|
3446
3476
|
* * SQL Data Type: uniqueidentifier
|
|
3447
3477
|
* * Related Entity/Foreign Key: Applications (vwApplications.ID)
|
|
3448
3478
|
* * Description: Associated Application ID if Scope is App, otherwise NULL`),
|
|
3449
|
-
Code: zod_1.z.string().nullable().describe(`
|
|
3450
|
-
* * Field Name: Code
|
|
3451
|
-
* * Display Name: Code
|
|
3452
|
-
* * SQL Data Type: nvarchar(255)
|
|
3453
|
-
* * Description: Used to identify the dashboard for code-base dashboards. Allows reuse of the same DriverClass for multiple dashboards that can be rendered differently.`),
|
|
3454
3479
|
DriverClass: zod_1.z.string().nullable().describe(`
|
|
3455
3480
|
* * Field Name: DriverClass
|
|
3456
3481
|
* * Display Name: Driver Class
|
|
3457
3482
|
* * SQL Data Type: nvarchar(255)
|
|
3458
3483
|
* * Description: Specifies the runtime class that will be used for the Dashboard when Type is set to 'Code'. This class contains the custom logic and implementation for code-based dashboards.`),
|
|
3484
|
+
Code: zod_1.z.string().nullable().describe(`
|
|
3485
|
+
* * Field Name: Code
|
|
3486
|
+
* * Display Name: Code
|
|
3487
|
+
* * SQL Data Type: nvarchar(255)
|
|
3488
|
+
* * Description: Used to identify the dashboard for code-base dashboards. Allows reuse of the same DriverClass for multiple dashboards that can be rendered differently.`),
|
|
3459
3489
|
User: zod_1.z.string().describe(`
|
|
3460
3490
|
* * Field Name: User
|
|
3461
3491
|
* * Display Name: User
|
|
@@ -3544,6 +3574,11 @@ exports.DataContextItemSchema = zod_1.z.object({
|
|
|
3544
3574
|
* * Field Name: Description
|
|
3545
3575
|
* * Display Name: Description
|
|
3546
3576
|
* * SQL Data Type: nvarchar(MAX)`),
|
|
3577
|
+
CodeName: zod_1.z.string().nullable().describe(`
|
|
3578
|
+
* * Field Name: CodeName
|
|
3579
|
+
* * Display Name: Code Name
|
|
3580
|
+
* * SQL Data Type: nvarchar(255)
|
|
3581
|
+
* * Description: Optional programmatic identifier for this data context item. Must be unique within the DataContext and follow JavaScript naming conventions (letters, numbers, underscore, starting with letter or underscore). Used for improved code generation and programmatic access to data context items.`),
|
|
3547
3582
|
DataContext: zod_1.z.string().describe(`
|
|
3548
3583
|
* * Field Name: DataContext
|
|
3549
3584
|
* * Display Name: Data Context
|
|
@@ -6758,6 +6793,240 @@ exports.AIAgentPromptSchema = zod_1.z.object({
|
|
|
6758
6793
|
* * Display Name: Configuration
|
|
6759
6794
|
* * SQL Data Type: nvarchar(100)`),
|
|
6760
6795
|
});
|
|
6796
|
+
/**
|
|
6797
|
+
* zod schema definition for the entity MJ: AI Agent Run Steps
|
|
6798
|
+
*/
|
|
6799
|
+
exports.AIAgentRunStepSchema = zod_1.z.object({
|
|
6800
|
+
ID: zod_1.z.string().describe(`
|
|
6801
|
+
* * Field Name: ID
|
|
6802
|
+
* * Display Name: ID
|
|
6803
|
+
* * SQL Data Type: uniqueidentifier
|
|
6804
|
+
* * Default Value: newsequentialid()
|
|
6805
|
+
* * Description: Unique identifier for this execution step`),
|
|
6806
|
+
AgentRunID: zod_1.z.string().describe(`
|
|
6807
|
+
* * Field Name: AgentRunID
|
|
6808
|
+
* * Display Name: Agent Run ID
|
|
6809
|
+
* * SQL Data Type: uniqueidentifier
|
|
6810
|
+
* * Related Entity/Foreign Key: MJ: AI Agent Runs (vwAIAgentRuns.ID)
|
|
6811
|
+
* * Description: Reference to the parent AIAgentRun that contains this step`),
|
|
6812
|
+
StepNumber: zod_1.z.number().describe(`
|
|
6813
|
+
* * Field Name: StepNumber
|
|
6814
|
+
* * Display Name: Step Number
|
|
6815
|
+
* * SQL Data Type: int
|
|
6816
|
+
* * Description: Sequential number of this step within the agent run, starting from 1`),
|
|
6817
|
+
StepType: zod_1.z.string().describe(`
|
|
6818
|
+
* * Field Name: StepType
|
|
6819
|
+
* * Display Name: Step Type
|
|
6820
|
+
* * SQL Data Type: nvarchar(50)
|
|
6821
|
+
* * Description: Type of execution step: prompt, tool, subagent, decision`),
|
|
6822
|
+
StepName: zod_1.z.string().describe(`
|
|
6823
|
+
* * Field Name: StepName
|
|
6824
|
+
* * Display Name: Step Name
|
|
6825
|
+
* * SQL Data Type: nvarchar(255)
|
|
6826
|
+
* * Description: Human-readable name of what this step accomplishes`),
|
|
6827
|
+
TargetID: zod_1.z.string().nullable().describe(`
|
|
6828
|
+
* * Field Name: TargetID
|
|
6829
|
+
* * Display Name: Target ID
|
|
6830
|
+
* * SQL Data Type: uniqueidentifier
|
|
6831
|
+
* * Description: ID of the specific target being executed (AIPrompt.ID, AIAction.ID, AIAgent.ID, etc.). NULL for steps that don't target a specific entity.`),
|
|
6832
|
+
Status: zod_1.z.union([zod_1.z.literal('Running'), zod_1.z.literal('Completed'), zod_1.z.literal('Failed'), zod_1.z.literal('Cancelled')]).describe(`
|
|
6833
|
+
* * Field Name: Status
|
|
6834
|
+
* * Display Name: Status
|
|
6835
|
+
* * SQL Data Type: nvarchar(50)
|
|
6836
|
+
* * Default Value: Running
|
|
6837
|
+
* * Value List Type: List
|
|
6838
|
+
* * Possible Values
|
|
6839
|
+
* * Running
|
|
6840
|
+
* * Completed
|
|
6841
|
+
* * Failed
|
|
6842
|
+
* * Cancelled
|
|
6843
|
+
* * Description: Current execution status of this step: Running, Completed, Failed, Cancelled`),
|
|
6844
|
+
StartedAt: zod_1.z.date().describe(`
|
|
6845
|
+
* * Field Name: StartedAt
|
|
6846
|
+
* * Display Name: Started At
|
|
6847
|
+
* * SQL Data Type: datetimeoffset
|
|
6848
|
+
* * Default Value: sysdatetimeoffset()
|
|
6849
|
+
* * Description: Timestamp when this step began execution`),
|
|
6850
|
+
CompletedAt: zod_1.z.date().nullable().describe(`
|
|
6851
|
+
* * Field Name: CompletedAt
|
|
6852
|
+
* * Display Name: Completed At
|
|
6853
|
+
* * SQL Data Type: datetimeoffset
|
|
6854
|
+
* * Description: Timestamp when this step completed. NULL while still running.`),
|
|
6855
|
+
Success: zod_1.z.boolean().nullable().describe(`
|
|
6856
|
+
* * Field Name: Success
|
|
6857
|
+
* * Display Name: Success
|
|
6858
|
+
* * SQL Data Type: bit
|
|
6859
|
+
* * Description: Whether this step completed successfully. NULL while running, TRUE/FALSE when completed.`),
|
|
6860
|
+
ErrorMessage: zod_1.z.string().nullable().describe(`
|
|
6861
|
+
* * Field Name: ErrorMessage
|
|
6862
|
+
* * Display Name: Error Message
|
|
6863
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
6864
|
+
* * Description: Error message if this step failed. NULL for successful steps.`),
|
|
6865
|
+
InputData: zod_1.z.string().nullable().describe(`
|
|
6866
|
+
* * Field Name: InputData
|
|
6867
|
+
* * Display Name: Input Data
|
|
6868
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
6869
|
+
* * Description: JSON serialization of input data passed to this step for execution`),
|
|
6870
|
+
OutputData: zod_1.z.string().nullable().describe(`
|
|
6871
|
+
* * Field Name: OutputData
|
|
6872
|
+
* * Display Name: Output Data
|
|
6873
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
6874
|
+
* * Description: JSON serialization of the output data produced by this step`),
|
|
6875
|
+
__mj_CreatedAt: zod_1.z.date().describe(`
|
|
6876
|
+
* * Field Name: __mj_CreatedAt
|
|
6877
|
+
* * Display Name: Created At
|
|
6878
|
+
* * SQL Data Type: datetimeoffset
|
|
6879
|
+
* * Default Value: getutcdate()`),
|
|
6880
|
+
__mj_UpdatedAt: zod_1.z.date().describe(`
|
|
6881
|
+
* * Field Name: __mj_UpdatedAt
|
|
6882
|
+
* * Display Name: Updated At
|
|
6883
|
+
* * SQL Data Type: datetimeoffset
|
|
6884
|
+
* * Default Value: getutcdate()`),
|
|
6885
|
+
});
|
|
6886
|
+
/**
|
|
6887
|
+
* zod schema definition for the entity MJ: AI Agent Runs
|
|
6888
|
+
*/
|
|
6889
|
+
exports.AIAgentRunSchema = zod_1.z.object({
|
|
6890
|
+
ID: zod_1.z.string().describe(`
|
|
6891
|
+
* * Field Name: ID
|
|
6892
|
+
* * Display Name: ID
|
|
6893
|
+
* * SQL Data Type: uniqueidentifier
|
|
6894
|
+
* * Default Value: newsequentialid()
|
|
6895
|
+
* * Description: Unique identifier for this agent run`),
|
|
6896
|
+
AgentID: zod_1.z.string().describe(`
|
|
6897
|
+
* * Field Name: AgentID
|
|
6898
|
+
* * Display Name: Agent ID
|
|
6899
|
+
* * SQL Data Type: uniqueidentifier
|
|
6900
|
+
* * Related Entity/Foreign Key: AI Agents (vwAIAgents.ID)
|
|
6901
|
+
* * Description: Reference to the AIAgent that is being executed in this run`),
|
|
6902
|
+
ParentRunID: zod_1.z.string().nullable().describe(`
|
|
6903
|
+
* * Field Name: ParentRunID
|
|
6904
|
+
* * Display Name: Parent Run ID
|
|
6905
|
+
* * SQL Data Type: uniqueidentifier
|
|
6906
|
+
* * Related Entity/Foreign Key: MJ: AI Agent Runs (vwAIAgentRuns.ID)
|
|
6907
|
+
* * Description: Reference to the parent agent run if this is a sub-agent execution. NULL for root-level agent runs. Enables hierarchical execution tracking.`),
|
|
6908
|
+
Status: zod_1.z.union([zod_1.z.literal('Running'), zod_1.z.literal('Completed'), zod_1.z.literal('Paused'), zod_1.z.literal('Failed'), zod_1.z.literal('Cancelled')]).describe(`
|
|
6909
|
+
* * Field Name: Status
|
|
6910
|
+
* * Display Name: Status
|
|
6911
|
+
* * SQL Data Type: nvarchar(50)
|
|
6912
|
+
* * Default Value: Running
|
|
6913
|
+
* * Value List Type: List
|
|
6914
|
+
* * Possible Values
|
|
6915
|
+
* * Running
|
|
6916
|
+
* * Completed
|
|
6917
|
+
* * Paused
|
|
6918
|
+
* * Failed
|
|
6919
|
+
* * Cancelled
|
|
6920
|
+
* * Description: Current status of the agent run. Running -> Completed/Failed/Cancelled`),
|
|
6921
|
+
StartedAt: zod_1.z.date().describe(`
|
|
6922
|
+
* * Field Name: StartedAt
|
|
6923
|
+
* * Display Name: Started At
|
|
6924
|
+
* * SQL Data Type: datetimeoffset
|
|
6925
|
+
* * Default Value: sysdatetimeoffset()
|
|
6926
|
+
* * Description: Timestamp when the agent run began execution`),
|
|
6927
|
+
CompletedAt: zod_1.z.date().nullable().describe(`
|
|
6928
|
+
* * Field Name: CompletedAt
|
|
6929
|
+
* * Display Name: Completed At
|
|
6930
|
+
* * SQL Data Type: datetimeoffset
|
|
6931
|
+
* * Description: Timestamp when the agent run completed (successfully or with failure). NULL while running.`),
|
|
6932
|
+
Success: zod_1.z.boolean().nullable().describe(`
|
|
6933
|
+
* * Field Name: Success
|
|
6934
|
+
* * Display Name: Success
|
|
6935
|
+
* * SQL Data Type: bit
|
|
6936
|
+
* * Description: Indicates whether the agent run completed successfully. NULL while running, TRUE/FALSE when completed.`),
|
|
6937
|
+
ErrorMessage: zod_1.z.string().nullable().describe(`
|
|
6938
|
+
* * Field Name: ErrorMessage
|
|
6939
|
+
* * Display Name: Error Message
|
|
6940
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
6941
|
+
* * Description: Error message if the agent run failed. NULL for successful runs.`),
|
|
6942
|
+
ConversationID: zod_1.z.string().nullable().describe(`
|
|
6943
|
+
* * Field Name: ConversationID
|
|
6944
|
+
* * Display Name: Conversation ID
|
|
6945
|
+
* * SQL Data Type: uniqueidentifier
|
|
6946
|
+
* * Related Entity/Foreign Key: Conversations (vwConversations.ID)
|
|
6947
|
+
* * Description: Identifier linking multiple agent runs that are part of the same conversation or user session`),
|
|
6948
|
+
UserID: zod_1.z.string().nullable().describe(`
|
|
6949
|
+
* * Field Name: UserID
|
|
6950
|
+
* * Display Name: User ID
|
|
6951
|
+
* * SQL Data Type: uniqueidentifier
|
|
6952
|
+
* * Related Entity/Foreign Key: Users (vwUsers.ID)
|
|
6953
|
+
* * Description: User context identifier for authentication and permissions during the agent run`),
|
|
6954
|
+
Result: zod_1.z.string().nullable().describe(`
|
|
6955
|
+
* * Field Name: Result
|
|
6956
|
+
* * Display Name: Result
|
|
6957
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
6958
|
+
* * Description: Final result or output from the agent execution, stored as JSON or text`),
|
|
6959
|
+
AgentState: zod_1.z.string().nullable().describe(`
|
|
6960
|
+
* * Field Name: AgentState
|
|
6961
|
+
* * Display Name: Agent State
|
|
6962
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
6963
|
+
* * Description: JSON serialization of the complete agent state, including conversation context, variables, and execution state. Enables pause/resume functionality.`),
|
|
6964
|
+
TotalTokensUsed: zod_1.z.number().nullable().describe(`
|
|
6965
|
+
* * Field Name: TotalTokensUsed
|
|
6966
|
+
* * Display Name: Total Tokens Used
|
|
6967
|
+
* * SQL Data Type: int
|
|
6968
|
+
* * Default Value: 0
|
|
6969
|
+
* * Description: Total number of tokens consumed by all LLM calls during this agent run`),
|
|
6970
|
+
TotalCost: zod_1.z.number().nullable().describe(`
|
|
6971
|
+
* * Field Name: TotalCost
|
|
6972
|
+
* * Display Name: Total Cost
|
|
6973
|
+
* * SQL Data Type: decimal(18, 6)
|
|
6974
|
+
* * Default Value: 0.000000
|
|
6975
|
+
* * Description: Total estimated cost for all AI model usage during this agent run`),
|
|
6976
|
+
__mj_CreatedAt: zod_1.z.date().describe(`
|
|
6977
|
+
* * Field Name: __mj_CreatedAt
|
|
6978
|
+
* * Display Name: Created At
|
|
6979
|
+
* * SQL Data Type: datetimeoffset
|
|
6980
|
+
* * Default Value: getutcdate()`),
|
|
6981
|
+
__mj_UpdatedAt: zod_1.z.date().describe(`
|
|
6982
|
+
* * Field Name: __mj_UpdatedAt
|
|
6983
|
+
* * Display Name: Updated At
|
|
6984
|
+
* * SQL Data Type: datetimeoffset
|
|
6985
|
+
* * Default Value: getutcdate()`),
|
|
6986
|
+
});
|
|
6987
|
+
/**
|
|
6988
|
+
* zod schema definition for the entity MJ: AI Agent Types
|
|
6989
|
+
*/
|
|
6990
|
+
exports.AIAgentTypeSchema = zod_1.z.object({
|
|
6991
|
+
ID: zod_1.z.string().describe(`
|
|
6992
|
+
* * Field Name: ID
|
|
6993
|
+
* * Display Name: ID
|
|
6994
|
+
* * SQL Data Type: uniqueidentifier
|
|
6995
|
+
* * Default Value: newsequentialid()
|
|
6996
|
+
* * Description: Unique identifier for the agent type`),
|
|
6997
|
+
Name: zod_1.z.string().describe(`
|
|
6998
|
+
* * Field Name: Name
|
|
6999
|
+
* * Display Name: Name
|
|
7000
|
+
* * SQL Data Type: nvarchar(100)
|
|
7001
|
+
* * Description: Unique name of the agent type (e.g., "Base", "CustomerSupport", "DataAnalysis"). Used for programmatic identification and factory instantiation.`),
|
|
7002
|
+
Description: zod_1.z.string().nullable().describe(`
|
|
7003
|
+
* * Field Name: Description
|
|
7004
|
+
* * Display Name: Description
|
|
7005
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
7006
|
+
* * Description: Detailed description of the agent type, its purpose, and typical use cases`),
|
|
7007
|
+
SystemPromptID: zod_1.z.string().nullable().describe(`
|
|
7008
|
+
* * Field Name: SystemPromptID
|
|
7009
|
+
* * Display Name: System Prompt ID
|
|
7010
|
+
* * SQL Data Type: uniqueidentifier
|
|
7011
|
+
* * Related Entity/Foreign Key: AI Prompts (vwAIPrompts.ID)
|
|
7012
|
+
* * Description: Reference to the AI Prompt that contains the system-level instructions for all agents of this type. This prompt will be blended with individual agent prompts.`),
|
|
7013
|
+
IsActive: zod_1.z.boolean().describe(`
|
|
7014
|
+
* * Field Name: IsActive
|
|
7015
|
+
* * Display Name: Is Active
|
|
7016
|
+
* * SQL Data Type: bit
|
|
7017
|
+
* * Default Value: 1
|
|
7018
|
+
* * Description: Indicates whether this agent type is available for use. Inactive types cannot be assigned to new agents.`),
|
|
7019
|
+
__mj_CreatedAt: zod_1.z.date().describe(`
|
|
7020
|
+
* * Field Name: __mj_CreatedAt
|
|
7021
|
+
* * Display Name: Created At
|
|
7022
|
+
* * SQL Data Type: datetimeoffset
|
|
7023
|
+
* * Default Value: getutcdate()`),
|
|
7024
|
+
__mj_UpdatedAt: zod_1.z.date().describe(`
|
|
7025
|
+
* * Field Name: __mj_UpdatedAt
|
|
7026
|
+
* * Display Name: Updated At
|
|
7027
|
+
* * SQL Data Type: datetimeoffset
|
|
7028
|
+
* * Default Value: getutcdate()`),
|
|
7029
|
+
});
|
|
6761
7030
|
/**
|
|
6762
7031
|
* zod schema definition for the entity MJ: AI Configuration Params
|
|
6763
7032
|
*/
|
|
@@ -6973,6 +7242,12 @@ exports.AIModelVendorSchema = zod_1.z.object({
|
|
|
6973
7242
|
* * Display Name: Updated At
|
|
6974
7243
|
* * SQL Data Type: datetimeoffset
|
|
6975
7244
|
* * Default Value: getutcdate()`),
|
|
7245
|
+
TypeID: zod_1.z.string().nullable().describe(`
|
|
7246
|
+
* * Field Name: TypeID
|
|
7247
|
+
* * Display Name: Type ID
|
|
7248
|
+
* * SQL Data Type: uniqueidentifier
|
|
7249
|
+
* * Related Entity/Foreign Key: MJ: AI Vendor Type Definitions (vwAIVendorTypeDefinitions.ID)
|
|
7250
|
+
* * Description: References the type/role of the vendor for this model (e.g., model developer, inference provider)`),
|
|
6976
7251
|
Model: zod_1.z.string().describe(`
|
|
6977
7252
|
* * Field Name: Model
|
|
6978
7253
|
* * Display Name: Model
|
|
@@ -6981,6 +7256,10 @@ exports.AIModelVendorSchema = zod_1.z.object({
|
|
|
6981
7256
|
* * Field Name: Vendor
|
|
6982
7257
|
* * Display Name: Vendor
|
|
6983
7258
|
* * SQL Data Type: nvarchar(50)`),
|
|
7259
|
+
Type: zod_1.z.string().nullable().describe(`
|
|
7260
|
+
* * Field Name: Type
|
|
7261
|
+
* * Display Name: Type
|
|
7262
|
+
* * SQL Data Type: nvarchar(50)`),
|
|
6984
7263
|
});
|
|
6985
7264
|
/**
|
|
6986
7265
|
* zod schema definition for the entity MJ: AI Prompt Models
|
|
@@ -7199,6 +7478,35 @@ exports.AIPromptRunSchema = zod_1.z.object({
|
|
|
7199
7478
|
* * Display Name: Updated At
|
|
7200
7479
|
* * SQL Data Type: datetimeoffset
|
|
7201
7480
|
* * Default Value: getutcdate()`),
|
|
7481
|
+
ParentID: zod_1.z.string().nullable().describe(`
|
|
7482
|
+
* * Field Name: ParentID
|
|
7483
|
+
* * Display Name: Parent ID
|
|
7484
|
+
* * SQL Data Type: uniqueidentifier
|
|
7485
|
+
* * Related Entity/Foreign Key: MJ: AI Prompt Runs (vwAIPromptRuns.ID)
|
|
7486
|
+
* * Description: References the parent AIPromptRun.ID for hierarchical execution tracking. NULL for top-level runs, populated for parallel children and result selector runs.`),
|
|
7487
|
+
RunType: zod_1.z.union([zod_1.z.literal('Single'), zod_1.z.literal('ParallelParent'), zod_1.z.literal('ParallelChild'), zod_1.z.literal('ResultSelector')]).describe(`
|
|
7488
|
+
* * Field Name: RunType
|
|
7489
|
+
* * Display Name: Run Type
|
|
7490
|
+
* * SQL Data Type: nvarchar(20)
|
|
7491
|
+
* * Default Value: Single
|
|
7492
|
+
* * Value List Type: List
|
|
7493
|
+
* * Possible Values
|
|
7494
|
+
* * Single
|
|
7495
|
+
* * ParallelParent
|
|
7496
|
+
* * ParallelChild
|
|
7497
|
+
* * ResultSelector
|
|
7498
|
+
* * Description: Type of prompt run execution: Single (standard single prompt), ParallelParent (coordinator for parallel execution), ParallelChild (individual parallel execution), ResultSelector (result selection prompt that chooses best result)`),
|
|
7499
|
+
ExecutionOrder: zod_1.z.number().nullable().describe(`
|
|
7500
|
+
* * Field Name: ExecutionOrder
|
|
7501
|
+
* * Display Name: Execution Order
|
|
7502
|
+
* * SQL Data Type: int
|
|
7503
|
+
* * Description: Execution order for parallel child runs and result selector runs. Used to track the sequence of execution within a parallel run group. NULL for single runs and parallel parent runs.`),
|
|
7504
|
+
AgentRunID: zod_1.z.string().nullable().describe(`
|
|
7505
|
+
* * Field Name: AgentRunID
|
|
7506
|
+
* * Display Name: Agent Run ID
|
|
7507
|
+
* * SQL Data Type: uniqueidentifier
|
|
7508
|
+
* * Related Entity/Foreign Key: MJ: AI Agent Runs (vwAIAgentRuns.ID)
|
|
7509
|
+
* * Description: Optional reference to the AIAgentRun that initiated this prompt execution. Links prompt runs to their parent agent runs for comprehensive execution tracking.`),
|
|
7202
7510
|
Prompt: zod_1.z.string().describe(`
|
|
7203
7511
|
* * Field Name: Prompt
|
|
7204
7512
|
* * Display Name: Prompt
|
|
@@ -13513,6 +13821,20 @@ let AIAgentEntity = class AIAgentEntity extends core_1.BaseEntity {
|
|
|
13513
13821
|
this.Set('ContextCompressionMessageRetentionCount', value);
|
|
13514
13822
|
}
|
|
13515
13823
|
/**
|
|
13824
|
+
* * Field Name: TypeID
|
|
13825
|
+
* * Display Name: Type ID
|
|
13826
|
+
* * SQL Data Type: uniqueidentifier
|
|
13827
|
+
* * Related Entity/Foreign Key: MJ: AI Agent Types (vwAIAgentTypes.ID)
|
|
13828
|
+
* * Default Value: A7B8C9D0-E1F2-3456-7890-123456789ABC
|
|
13829
|
+
* * Description: Reference to the AIAgentType that defines the category and system-level behavior for this agent. Cannot be null.
|
|
13830
|
+
*/
|
|
13831
|
+
get TypeID() {
|
|
13832
|
+
return this.Get('TypeID');
|
|
13833
|
+
}
|
|
13834
|
+
set TypeID(value) {
|
|
13835
|
+
this.Set('TypeID', value);
|
|
13836
|
+
}
|
|
13837
|
+
/**
|
|
13516
13838
|
* * Field Name: Parent
|
|
13517
13839
|
* * Display Name: Parent
|
|
13518
13840
|
* * SQL Data Type: nvarchar(255)
|
|
@@ -14215,11 +14537,11 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
|
|
|
14215
14537
|
* 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:
|
|
14216
14538
|
* * 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.
|
|
14217
14539
|
* * CacheTTLSeconds: This rule ensures that if the cache expiration time in seconds is provided, it must be greater than zero.
|
|
14218
|
-
* * Table-Level: This rule ensures that the ResultSelectorPromptID field must be different from the ID field. In other words, a result selector prompt cannot reference itself.
|
|
14219
14540
|
* * Table-Level: This rule ensures that if the cache match type is set to 'Vector', the cache similarity threshold must be specified. If the match type is anything other than 'Vector', the similarity threshold can be left empty.
|
|
14220
14541
|
* * Table-Level: This rule ensures that if the parallelization mode is set to 'StaticCount', then the number of parallel tasks (ParallelCount) must be provided.
|
|
14221
14542
|
* * Table-Level: This rule ensures that if the Parallelization Mode is set to 'ConfigParam', then the Parallel Config Param field must be filled in. For any other mode, the Parallel Config Param can be left empty.
|
|
14222
14543
|
* * Table-Level: This rule ensures that if the OutputType is set to 'object', an OutputExample must be provided. If the OutputType is anything other than 'object', providing an OutputExample is not required.
|
|
14544
|
+
* * Table-Level: This rule ensures that the ResultSelectorPromptID field must be different from the ID field. In other words, a result selector prompt cannot reference itself.
|
|
14223
14545
|
* @public
|
|
14224
14546
|
* @method
|
|
14225
14547
|
* @override
|
|
@@ -14228,11 +14550,11 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
|
|
|
14228
14550
|
const result = super.Validate();
|
|
14229
14551
|
this.ValidateCacheSimilarityThresholdIsBetweenZeroAndOne(result);
|
|
14230
14552
|
this.ValidateCacheTTLSecondsGreaterThanZero(result);
|
|
14231
|
-
this.ValidateResultSelectorPromptIDNotEqualID(result);
|
|
14232
14553
|
this.ValidateCacheSimilarityThresholdRequiredForVectorCache(result);
|
|
14233
14554
|
this.ValidateParallelCountWhenParallelizationModeIsStaticCount(result);
|
|
14234
14555
|
this.ValidateParallelConfigParamRequiredForConfigParamMode(result);
|
|
14235
14556
|
this.ValidateOutputExampleWhenOutputTypeObject(result);
|
|
14557
|
+
this.ValidateResultSelectorPromptIDNotEqualID(result);
|
|
14236
14558
|
return result;
|
|
14237
14559
|
}
|
|
14238
14560
|
/**
|
|
@@ -14258,17 +14580,6 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
|
|
|
14258
14580
|
}
|
|
14259
14581
|
}
|
|
14260
14582
|
/**
|
|
14261
|
-
* This rule ensures that the ResultSelectorPromptID field must be different from the ID field. In other words, a result selector prompt cannot reference itself.
|
|
14262
|
-
* @param result - the ValidationResult object to add any errors or warnings to
|
|
14263
|
-
* @public
|
|
14264
|
-
* @method
|
|
14265
|
-
*/
|
|
14266
|
-
ValidateResultSelectorPromptIDNotEqualID(result) {
|
|
14267
|
-
if (this.ResultSelectorPromptID === this.ID) {
|
|
14268
|
-
result.Errors.push(new core_1.ValidationErrorInfo("ResultSelectorPromptID", "The ResultSelectorPromptID cannot be the same as the ID. A result selector prompt cannot reference itself.", this.ResultSelectorPromptID, core_1.ValidationErrorType.Failure));
|
|
14269
|
-
}
|
|
14270
|
-
}
|
|
14271
|
-
/**
|
|
14272
14583
|
* This rule ensures that if the cache match type is set to 'Vector', the cache similarity threshold must be specified. If the match type is anything other than 'Vector', the similarity threshold can be left empty.
|
|
14273
14584
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
14274
14585
|
* @public
|
|
@@ -14313,6 +14624,17 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
|
|
|
14313
14624
|
}
|
|
14314
14625
|
}
|
|
14315
14626
|
/**
|
|
14627
|
+
* This rule ensures that the ResultSelectorPromptID field must be different from the ID field. In other words, a result selector prompt cannot reference itself.
|
|
14628
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
14629
|
+
* @public
|
|
14630
|
+
* @method
|
|
14631
|
+
*/
|
|
14632
|
+
ValidateResultSelectorPromptIDNotEqualID(result) {
|
|
14633
|
+
if (this.ResultSelectorPromptID === this.ID) {
|
|
14634
|
+
result.Errors.push(new core_1.ValidationErrorInfo("ResultSelectorPromptID", "The ResultSelectorPromptID cannot be the same as the ID. A result selector prompt cannot reference itself.", this.ResultSelectorPromptID, core_1.ValidationErrorType.Failure));
|
|
14635
|
+
}
|
|
14636
|
+
}
|
|
14637
|
+
/**
|
|
14316
14638
|
* * Field Name: ID
|
|
14317
14639
|
* * Display Name: ID
|
|
14318
14640
|
* * SQL Data Type: uniqueidentifier
|
|
@@ -14426,6 +14748,7 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
|
|
|
14426
14748
|
* * Any
|
|
14427
14749
|
* * Text
|
|
14428
14750
|
* * Markdown
|
|
14751
|
+
* * JSON
|
|
14429
14752
|
* * ModelSpecific
|
|
14430
14753
|
* * JSON
|
|
14431
14754
|
* * Description: Specifies the expected response format for the AI model. Options include Any, Text, Markdown, JSON, and ModelSpecific. Defaults to Any if not specified.
|
|
@@ -14767,6 +15090,42 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
|
|
|
14767
15090
|
this.Set('CacheMustMatchConfig', value);
|
|
14768
15091
|
}
|
|
14769
15092
|
/**
|
|
15093
|
+
* * Field Name: PromptRole
|
|
15094
|
+
* * Display Name: Prompt Role
|
|
15095
|
+
* * SQL Data Type: nvarchar(20)
|
|
15096
|
+
* * Default Value: System
|
|
15097
|
+
* * Value List Type: List
|
|
15098
|
+
* * Possible Values
|
|
15099
|
+
* * System
|
|
15100
|
+
* * User
|
|
15101
|
+
* * Assistant
|
|
15102
|
+
* * SystemOrUser
|
|
15103
|
+
* * Description: Determines how the prompt is used in conversation: System (always first message), User (positioned by PromptPosition), Assistant (positioned by PromptPosition), or SystemOrUser (try system first, fallback to user last if system slot taken)
|
|
15104
|
+
*/
|
|
15105
|
+
get PromptRole() {
|
|
15106
|
+
return this.Get('PromptRole');
|
|
15107
|
+
}
|
|
15108
|
+
set PromptRole(value) {
|
|
15109
|
+
this.Set('PromptRole', value);
|
|
15110
|
+
}
|
|
15111
|
+
/**
|
|
15112
|
+
* * Field Name: PromptPosition
|
|
15113
|
+
* * Display Name: Prompt Position
|
|
15114
|
+
* * SQL Data Type: nvarchar(20)
|
|
15115
|
+
* * Default Value: First
|
|
15116
|
+
* * Value List Type: List
|
|
15117
|
+
* * Possible Values
|
|
15118
|
+
* * First
|
|
15119
|
+
* * Last
|
|
15120
|
+
* * Description: Controls message placement for User and Assistant role prompts: First (beginning of conversation) or Last (end of conversation). Not used for System role prompts which are always first
|
|
15121
|
+
*/
|
|
15122
|
+
get PromptPosition() {
|
|
15123
|
+
return this.Get('PromptPosition');
|
|
15124
|
+
}
|
|
15125
|
+
set PromptPosition(value) {
|
|
15126
|
+
this.Set('PromptPosition', value);
|
|
15127
|
+
}
|
|
15128
|
+
/**
|
|
14770
15129
|
* * Field Name: Template
|
|
14771
15130
|
* * Display Name: Template
|
|
14772
15131
|
* * SQL Data Type: nvarchar(255)
|
|
@@ -19904,28 +20263,28 @@ let DashboardEntity = class DashboardEntity extends core_1.BaseEntity {
|
|
|
19904
20263
|
this.Set('ApplicationID', value);
|
|
19905
20264
|
}
|
|
19906
20265
|
/**
|
|
19907
|
-
* * Field Name:
|
|
19908
|
-
* * Display Name:
|
|
20266
|
+
* * Field Name: DriverClass
|
|
20267
|
+
* * Display Name: Driver Class
|
|
19909
20268
|
* * SQL Data Type: nvarchar(255)
|
|
19910
|
-
* * Description:
|
|
20269
|
+
* * Description: Specifies the runtime class that will be used for the Dashboard when Type is set to 'Code'. This class contains the custom logic and implementation for code-based dashboards.
|
|
19911
20270
|
*/
|
|
19912
|
-
get
|
|
19913
|
-
return this.Get('
|
|
20271
|
+
get DriverClass() {
|
|
20272
|
+
return this.Get('DriverClass');
|
|
19914
20273
|
}
|
|
19915
|
-
set
|
|
19916
|
-
this.Set('
|
|
20274
|
+
set DriverClass(value) {
|
|
20275
|
+
this.Set('DriverClass', value);
|
|
19917
20276
|
}
|
|
19918
20277
|
/**
|
|
19919
|
-
* * Field Name:
|
|
19920
|
-
* * Display Name:
|
|
20278
|
+
* * Field Name: Code
|
|
20279
|
+
* * Display Name: Code
|
|
19921
20280
|
* * SQL Data Type: nvarchar(255)
|
|
19922
|
-
* * Description:
|
|
20281
|
+
* * Description: Used to identify the dashboard for code-base dashboards. Allows reuse of the same DriverClass for multiple dashboards that can be rendered differently.
|
|
19923
20282
|
*/
|
|
19924
|
-
get
|
|
19925
|
-
return this.Get('
|
|
20283
|
+
get Code() {
|
|
20284
|
+
return this.Get('Code');
|
|
19926
20285
|
}
|
|
19927
|
-
set
|
|
19928
|
-
this.Set('
|
|
20286
|
+
set Code(value) {
|
|
20287
|
+
this.Set('Code', value);
|
|
19929
20288
|
}
|
|
19930
20289
|
/**
|
|
19931
20290
|
* * Field Name: User
|
|
@@ -20138,6 +20497,18 @@ let DataContextItemEntity = class DataContextItemEntity extends core_1.BaseEntit
|
|
|
20138
20497
|
this.Set('Description', value);
|
|
20139
20498
|
}
|
|
20140
20499
|
/**
|
|
20500
|
+
* * Field Name: CodeName
|
|
20501
|
+
* * Display Name: Code Name
|
|
20502
|
+
* * SQL Data Type: nvarchar(255)
|
|
20503
|
+
* * Description: Optional programmatic identifier for this data context item. Must be unique within the DataContext and follow JavaScript naming conventions (letters, numbers, underscore, starting with letter or underscore). Used for improved code generation and programmatic access to data context items.
|
|
20504
|
+
*/
|
|
20505
|
+
get CodeName() {
|
|
20506
|
+
return this.Get('CodeName');
|
|
20507
|
+
}
|
|
20508
|
+
set CodeName(value) {
|
|
20509
|
+
this.Set('CodeName', value);
|
|
20510
|
+
}
|
|
20511
|
+
/**
|
|
20141
20512
|
* * Field Name: DataContext
|
|
20142
20513
|
* * Display Name: Data Context
|
|
20143
20514
|
* * SQL Data Type: nvarchar(255)
|
|
@@ -28209,6 +28580,583 @@ exports.AIAgentPromptEntity = AIAgentPromptEntity;
|
|
|
28209
28580
|
exports.AIAgentPromptEntity = AIAgentPromptEntity = __decorate([
|
|
28210
28581
|
(0, global_1.RegisterClass)(core_1.BaseEntity, 'MJ: AI Agent Prompts')
|
|
28211
28582
|
], AIAgentPromptEntity);
|
|
28583
|
+
/**
|
|
28584
|
+
* MJ: AI Agent Run Steps - strongly typed entity sub-class
|
|
28585
|
+
* * Schema: __mj
|
|
28586
|
+
* * Base Table: AIAgentRunStep
|
|
28587
|
+
* * Base View: vwAIAgentRunSteps
|
|
28588
|
+
* * Primary Key: ID
|
|
28589
|
+
* @extends {BaseEntity}
|
|
28590
|
+
* @class
|
|
28591
|
+
* @public
|
|
28592
|
+
*/
|
|
28593
|
+
let AIAgentRunStepEntity = class AIAgentRunStepEntity extends core_1.BaseEntity {
|
|
28594
|
+
/**
|
|
28595
|
+
* Loads the MJ: AI Agent Run Steps record from the database
|
|
28596
|
+
* @param ID: string - primary key value to load the MJ: AI Agent Run Steps record.
|
|
28597
|
+
* @param EntityRelationshipsToLoad - (optional) the relationships to load
|
|
28598
|
+
* @returns {Promise<boolean>} - true if successful, false otherwise
|
|
28599
|
+
* @public
|
|
28600
|
+
* @async
|
|
28601
|
+
* @memberof AIAgentRunStepEntity
|
|
28602
|
+
* @method
|
|
28603
|
+
* @override
|
|
28604
|
+
*/
|
|
28605
|
+
async Load(ID, EntityRelationshipsToLoad) {
|
|
28606
|
+
const compositeKey = new core_1.CompositeKey();
|
|
28607
|
+
compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
|
|
28608
|
+
return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
|
|
28609
|
+
}
|
|
28610
|
+
/**
|
|
28611
|
+
* 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:
|
|
28612
|
+
* * StepNumber: This rule ensures that the step number must always be greater than zero.
|
|
28613
|
+
* @public
|
|
28614
|
+
* @method
|
|
28615
|
+
* @override
|
|
28616
|
+
*/
|
|
28617
|
+
Validate() {
|
|
28618
|
+
const result = super.Validate();
|
|
28619
|
+
this.ValidateStepNumberGreaterThanZero(result);
|
|
28620
|
+
return result;
|
|
28621
|
+
}
|
|
28622
|
+
/**
|
|
28623
|
+
* This rule ensures that the step number must always be greater than zero.
|
|
28624
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
28625
|
+
* @public
|
|
28626
|
+
* @method
|
|
28627
|
+
*/
|
|
28628
|
+
ValidateStepNumberGreaterThanZero(result) {
|
|
28629
|
+
if (this.StepNumber <= 0) {
|
|
28630
|
+
result.Errors.push(new core_1.ValidationErrorInfo("StepNumber", "Step number must be greater than zero.", this.StepNumber, core_1.ValidationErrorType.Failure));
|
|
28631
|
+
}
|
|
28632
|
+
}
|
|
28633
|
+
/**
|
|
28634
|
+
* * Field Name: ID
|
|
28635
|
+
* * Display Name: ID
|
|
28636
|
+
* * SQL Data Type: uniqueidentifier
|
|
28637
|
+
* * Default Value: newsequentialid()
|
|
28638
|
+
* * Description: Unique identifier for this execution step
|
|
28639
|
+
*/
|
|
28640
|
+
get ID() {
|
|
28641
|
+
return this.Get('ID');
|
|
28642
|
+
}
|
|
28643
|
+
/**
|
|
28644
|
+
* * Field Name: AgentRunID
|
|
28645
|
+
* * Display Name: Agent Run ID
|
|
28646
|
+
* * SQL Data Type: uniqueidentifier
|
|
28647
|
+
* * Related Entity/Foreign Key: MJ: AI Agent Runs (vwAIAgentRuns.ID)
|
|
28648
|
+
* * Description: Reference to the parent AIAgentRun that contains this step
|
|
28649
|
+
*/
|
|
28650
|
+
get AgentRunID() {
|
|
28651
|
+
return this.Get('AgentRunID');
|
|
28652
|
+
}
|
|
28653
|
+
set AgentRunID(value) {
|
|
28654
|
+
this.Set('AgentRunID', value);
|
|
28655
|
+
}
|
|
28656
|
+
/**
|
|
28657
|
+
* * Field Name: StepNumber
|
|
28658
|
+
* * Display Name: Step Number
|
|
28659
|
+
* * SQL Data Type: int
|
|
28660
|
+
* * Description: Sequential number of this step within the agent run, starting from 1
|
|
28661
|
+
*/
|
|
28662
|
+
get StepNumber() {
|
|
28663
|
+
return this.Get('StepNumber');
|
|
28664
|
+
}
|
|
28665
|
+
set StepNumber(value) {
|
|
28666
|
+
this.Set('StepNumber', value);
|
|
28667
|
+
}
|
|
28668
|
+
/**
|
|
28669
|
+
* * Field Name: StepType
|
|
28670
|
+
* * Display Name: Step Type
|
|
28671
|
+
* * SQL Data Type: nvarchar(50)
|
|
28672
|
+
* * Description: Type of execution step: prompt, tool, subagent, decision
|
|
28673
|
+
*/
|
|
28674
|
+
get StepType() {
|
|
28675
|
+
return this.Get('StepType');
|
|
28676
|
+
}
|
|
28677
|
+
set StepType(value) {
|
|
28678
|
+
this.Set('StepType', value);
|
|
28679
|
+
}
|
|
28680
|
+
/**
|
|
28681
|
+
* * Field Name: StepName
|
|
28682
|
+
* * Display Name: Step Name
|
|
28683
|
+
* * SQL Data Type: nvarchar(255)
|
|
28684
|
+
* * Description: Human-readable name of what this step accomplishes
|
|
28685
|
+
*/
|
|
28686
|
+
get StepName() {
|
|
28687
|
+
return this.Get('StepName');
|
|
28688
|
+
}
|
|
28689
|
+
set StepName(value) {
|
|
28690
|
+
this.Set('StepName', value);
|
|
28691
|
+
}
|
|
28692
|
+
/**
|
|
28693
|
+
* * Field Name: TargetID
|
|
28694
|
+
* * Display Name: Target ID
|
|
28695
|
+
* * SQL Data Type: uniqueidentifier
|
|
28696
|
+
* * Description: ID of the specific target being executed (AIPrompt.ID, AIAction.ID, AIAgent.ID, etc.). NULL for steps that don't target a specific entity.
|
|
28697
|
+
*/
|
|
28698
|
+
get TargetID() {
|
|
28699
|
+
return this.Get('TargetID');
|
|
28700
|
+
}
|
|
28701
|
+
set TargetID(value) {
|
|
28702
|
+
this.Set('TargetID', value);
|
|
28703
|
+
}
|
|
28704
|
+
/**
|
|
28705
|
+
* * Field Name: Status
|
|
28706
|
+
* * Display Name: Status
|
|
28707
|
+
* * SQL Data Type: nvarchar(50)
|
|
28708
|
+
* * Default Value: Running
|
|
28709
|
+
* * Value List Type: List
|
|
28710
|
+
* * Possible Values
|
|
28711
|
+
* * Running
|
|
28712
|
+
* * Completed
|
|
28713
|
+
* * Failed
|
|
28714
|
+
* * Cancelled
|
|
28715
|
+
* * Description: Current execution status of this step: Running, Completed, Failed, Cancelled
|
|
28716
|
+
*/
|
|
28717
|
+
get Status() {
|
|
28718
|
+
return this.Get('Status');
|
|
28719
|
+
}
|
|
28720
|
+
set Status(value) {
|
|
28721
|
+
this.Set('Status', value);
|
|
28722
|
+
}
|
|
28723
|
+
/**
|
|
28724
|
+
* * Field Name: StartedAt
|
|
28725
|
+
* * Display Name: Started At
|
|
28726
|
+
* * SQL Data Type: datetimeoffset
|
|
28727
|
+
* * Default Value: sysdatetimeoffset()
|
|
28728
|
+
* * Description: Timestamp when this step began execution
|
|
28729
|
+
*/
|
|
28730
|
+
get StartedAt() {
|
|
28731
|
+
return this.Get('StartedAt');
|
|
28732
|
+
}
|
|
28733
|
+
set StartedAt(value) {
|
|
28734
|
+
this.Set('StartedAt', value);
|
|
28735
|
+
}
|
|
28736
|
+
/**
|
|
28737
|
+
* * Field Name: CompletedAt
|
|
28738
|
+
* * Display Name: Completed At
|
|
28739
|
+
* * SQL Data Type: datetimeoffset
|
|
28740
|
+
* * Description: Timestamp when this step completed. NULL while still running.
|
|
28741
|
+
*/
|
|
28742
|
+
get CompletedAt() {
|
|
28743
|
+
return this.Get('CompletedAt');
|
|
28744
|
+
}
|
|
28745
|
+
set CompletedAt(value) {
|
|
28746
|
+
this.Set('CompletedAt', value);
|
|
28747
|
+
}
|
|
28748
|
+
/**
|
|
28749
|
+
* * Field Name: Success
|
|
28750
|
+
* * Display Name: Success
|
|
28751
|
+
* * SQL Data Type: bit
|
|
28752
|
+
* * Description: Whether this step completed successfully. NULL while running, TRUE/FALSE when completed.
|
|
28753
|
+
*/
|
|
28754
|
+
get Success() {
|
|
28755
|
+
return this.Get('Success');
|
|
28756
|
+
}
|
|
28757
|
+
set Success(value) {
|
|
28758
|
+
this.Set('Success', value);
|
|
28759
|
+
}
|
|
28760
|
+
/**
|
|
28761
|
+
* * Field Name: ErrorMessage
|
|
28762
|
+
* * Display Name: Error Message
|
|
28763
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
28764
|
+
* * Description: Error message if this step failed. NULL for successful steps.
|
|
28765
|
+
*/
|
|
28766
|
+
get ErrorMessage() {
|
|
28767
|
+
return this.Get('ErrorMessage');
|
|
28768
|
+
}
|
|
28769
|
+
set ErrorMessage(value) {
|
|
28770
|
+
this.Set('ErrorMessage', value);
|
|
28771
|
+
}
|
|
28772
|
+
/**
|
|
28773
|
+
* * Field Name: InputData
|
|
28774
|
+
* * Display Name: Input Data
|
|
28775
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
28776
|
+
* * Description: JSON serialization of input data passed to this step for execution
|
|
28777
|
+
*/
|
|
28778
|
+
get InputData() {
|
|
28779
|
+
return this.Get('InputData');
|
|
28780
|
+
}
|
|
28781
|
+
set InputData(value) {
|
|
28782
|
+
this.Set('InputData', value);
|
|
28783
|
+
}
|
|
28784
|
+
/**
|
|
28785
|
+
* * Field Name: OutputData
|
|
28786
|
+
* * Display Name: Output Data
|
|
28787
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
28788
|
+
* * Description: JSON serialization of the output data produced by this step
|
|
28789
|
+
*/
|
|
28790
|
+
get OutputData() {
|
|
28791
|
+
return this.Get('OutputData');
|
|
28792
|
+
}
|
|
28793
|
+
set OutputData(value) {
|
|
28794
|
+
this.Set('OutputData', value);
|
|
28795
|
+
}
|
|
28796
|
+
/**
|
|
28797
|
+
* * Field Name: __mj_CreatedAt
|
|
28798
|
+
* * Display Name: Created At
|
|
28799
|
+
* * SQL Data Type: datetimeoffset
|
|
28800
|
+
* * Default Value: getutcdate()
|
|
28801
|
+
*/
|
|
28802
|
+
get __mj_CreatedAt() {
|
|
28803
|
+
return this.Get('__mj_CreatedAt');
|
|
28804
|
+
}
|
|
28805
|
+
/**
|
|
28806
|
+
* * Field Name: __mj_UpdatedAt
|
|
28807
|
+
* * Display Name: Updated At
|
|
28808
|
+
* * SQL Data Type: datetimeoffset
|
|
28809
|
+
* * Default Value: getutcdate()
|
|
28810
|
+
*/
|
|
28811
|
+
get __mj_UpdatedAt() {
|
|
28812
|
+
return this.Get('__mj_UpdatedAt');
|
|
28813
|
+
}
|
|
28814
|
+
};
|
|
28815
|
+
exports.AIAgentRunStepEntity = AIAgentRunStepEntity;
|
|
28816
|
+
exports.AIAgentRunStepEntity = AIAgentRunStepEntity = __decorate([
|
|
28817
|
+
(0, global_1.RegisterClass)(core_1.BaseEntity, 'MJ: AI Agent Run Steps')
|
|
28818
|
+
], AIAgentRunStepEntity);
|
|
28819
|
+
/**
|
|
28820
|
+
* MJ: AI Agent Runs - strongly typed entity sub-class
|
|
28821
|
+
* * Schema: __mj
|
|
28822
|
+
* * Base Table: AIAgentRun
|
|
28823
|
+
* * Base View: vwAIAgentRuns
|
|
28824
|
+
* * Primary Key: ID
|
|
28825
|
+
* @extends {BaseEntity}
|
|
28826
|
+
* @class
|
|
28827
|
+
* @public
|
|
28828
|
+
*/
|
|
28829
|
+
let AIAgentRunEntity = class AIAgentRunEntity extends core_1.BaseEntity {
|
|
28830
|
+
/**
|
|
28831
|
+
* Loads the MJ: AI Agent Runs record from the database
|
|
28832
|
+
* @param ID: string - primary key value to load the MJ: AI Agent Runs record.
|
|
28833
|
+
* @param EntityRelationshipsToLoad - (optional) the relationships to load
|
|
28834
|
+
* @returns {Promise<boolean>} - true if successful, false otherwise
|
|
28835
|
+
* @public
|
|
28836
|
+
* @async
|
|
28837
|
+
* @memberof AIAgentRunEntity
|
|
28838
|
+
* @method
|
|
28839
|
+
* @override
|
|
28840
|
+
*/
|
|
28841
|
+
async Load(ID, EntityRelationshipsToLoad) {
|
|
28842
|
+
const compositeKey = new core_1.CompositeKey();
|
|
28843
|
+
compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
|
|
28844
|
+
return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
|
|
28845
|
+
}
|
|
28846
|
+
/**
|
|
28847
|
+
* * Field Name: ID
|
|
28848
|
+
* * Display Name: ID
|
|
28849
|
+
* * SQL Data Type: uniqueidentifier
|
|
28850
|
+
* * Default Value: newsequentialid()
|
|
28851
|
+
* * Description: Unique identifier for this agent run
|
|
28852
|
+
*/
|
|
28853
|
+
get ID() {
|
|
28854
|
+
return this.Get('ID');
|
|
28855
|
+
}
|
|
28856
|
+
/**
|
|
28857
|
+
* * Field Name: AgentID
|
|
28858
|
+
* * Display Name: Agent ID
|
|
28859
|
+
* * SQL Data Type: uniqueidentifier
|
|
28860
|
+
* * Related Entity/Foreign Key: AI Agents (vwAIAgents.ID)
|
|
28861
|
+
* * Description: Reference to the AIAgent that is being executed in this run
|
|
28862
|
+
*/
|
|
28863
|
+
get AgentID() {
|
|
28864
|
+
return this.Get('AgentID');
|
|
28865
|
+
}
|
|
28866
|
+
set AgentID(value) {
|
|
28867
|
+
this.Set('AgentID', value);
|
|
28868
|
+
}
|
|
28869
|
+
/**
|
|
28870
|
+
* * Field Name: ParentRunID
|
|
28871
|
+
* * Display Name: Parent Run ID
|
|
28872
|
+
* * SQL Data Type: uniqueidentifier
|
|
28873
|
+
* * Related Entity/Foreign Key: MJ: AI Agent Runs (vwAIAgentRuns.ID)
|
|
28874
|
+
* * Description: Reference to the parent agent run if this is a sub-agent execution. NULL for root-level agent runs. Enables hierarchical execution tracking.
|
|
28875
|
+
*/
|
|
28876
|
+
get ParentRunID() {
|
|
28877
|
+
return this.Get('ParentRunID');
|
|
28878
|
+
}
|
|
28879
|
+
set ParentRunID(value) {
|
|
28880
|
+
this.Set('ParentRunID', value);
|
|
28881
|
+
}
|
|
28882
|
+
/**
|
|
28883
|
+
* * Field Name: Status
|
|
28884
|
+
* * Display Name: Status
|
|
28885
|
+
* * SQL Data Type: nvarchar(50)
|
|
28886
|
+
* * Default Value: Running
|
|
28887
|
+
* * Value List Type: List
|
|
28888
|
+
* * Possible Values
|
|
28889
|
+
* * Running
|
|
28890
|
+
* * Completed
|
|
28891
|
+
* * Paused
|
|
28892
|
+
* * Failed
|
|
28893
|
+
* * Cancelled
|
|
28894
|
+
* * Description: Current status of the agent run. Running -> Completed/Failed/Cancelled
|
|
28895
|
+
*/
|
|
28896
|
+
get Status() {
|
|
28897
|
+
return this.Get('Status');
|
|
28898
|
+
}
|
|
28899
|
+
set Status(value) {
|
|
28900
|
+
this.Set('Status', value);
|
|
28901
|
+
}
|
|
28902
|
+
/**
|
|
28903
|
+
* * Field Name: StartedAt
|
|
28904
|
+
* * Display Name: Started At
|
|
28905
|
+
* * SQL Data Type: datetimeoffset
|
|
28906
|
+
* * Default Value: sysdatetimeoffset()
|
|
28907
|
+
* * Description: Timestamp when the agent run began execution
|
|
28908
|
+
*/
|
|
28909
|
+
get StartedAt() {
|
|
28910
|
+
return this.Get('StartedAt');
|
|
28911
|
+
}
|
|
28912
|
+
set StartedAt(value) {
|
|
28913
|
+
this.Set('StartedAt', value);
|
|
28914
|
+
}
|
|
28915
|
+
/**
|
|
28916
|
+
* * Field Name: CompletedAt
|
|
28917
|
+
* * Display Name: Completed At
|
|
28918
|
+
* * SQL Data Type: datetimeoffset
|
|
28919
|
+
* * Description: Timestamp when the agent run completed (successfully or with failure). NULL while running.
|
|
28920
|
+
*/
|
|
28921
|
+
get CompletedAt() {
|
|
28922
|
+
return this.Get('CompletedAt');
|
|
28923
|
+
}
|
|
28924
|
+
set CompletedAt(value) {
|
|
28925
|
+
this.Set('CompletedAt', value);
|
|
28926
|
+
}
|
|
28927
|
+
/**
|
|
28928
|
+
* * Field Name: Success
|
|
28929
|
+
* * Display Name: Success
|
|
28930
|
+
* * SQL Data Type: bit
|
|
28931
|
+
* * Description: Indicates whether the agent run completed successfully. NULL while running, TRUE/FALSE when completed.
|
|
28932
|
+
*/
|
|
28933
|
+
get Success() {
|
|
28934
|
+
return this.Get('Success');
|
|
28935
|
+
}
|
|
28936
|
+
set Success(value) {
|
|
28937
|
+
this.Set('Success', value);
|
|
28938
|
+
}
|
|
28939
|
+
/**
|
|
28940
|
+
* * Field Name: ErrorMessage
|
|
28941
|
+
* * Display Name: Error Message
|
|
28942
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
28943
|
+
* * Description: Error message if the agent run failed. NULL for successful runs.
|
|
28944
|
+
*/
|
|
28945
|
+
get ErrorMessage() {
|
|
28946
|
+
return this.Get('ErrorMessage');
|
|
28947
|
+
}
|
|
28948
|
+
set ErrorMessage(value) {
|
|
28949
|
+
this.Set('ErrorMessage', value);
|
|
28950
|
+
}
|
|
28951
|
+
/**
|
|
28952
|
+
* * Field Name: ConversationID
|
|
28953
|
+
* * Display Name: Conversation ID
|
|
28954
|
+
* * SQL Data Type: uniqueidentifier
|
|
28955
|
+
* * Related Entity/Foreign Key: Conversations (vwConversations.ID)
|
|
28956
|
+
* * Description: Identifier linking multiple agent runs that are part of the same conversation or user session
|
|
28957
|
+
*/
|
|
28958
|
+
get ConversationID() {
|
|
28959
|
+
return this.Get('ConversationID');
|
|
28960
|
+
}
|
|
28961
|
+
set ConversationID(value) {
|
|
28962
|
+
this.Set('ConversationID', value);
|
|
28963
|
+
}
|
|
28964
|
+
/**
|
|
28965
|
+
* * Field Name: UserID
|
|
28966
|
+
* * Display Name: User ID
|
|
28967
|
+
* * SQL Data Type: uniqueidentifier
|
|
28968
|
+
* * Related Entity/Foreign Key: Users (vwUsers.ID)
|
|
28969
|
+
* * Description: User context identifier for authentication and permissions during the agent run
|
|
28970
|
+
*/
|
|
28971
|
+
get UserID() {
|
|
28972
|
+
return this.Get('UserID');
|
|
28973
|
+
}
|
|
28974
|
+
set UserID(value) {
|
|
28975
|
+
this.Set('UserID', value);
|
|
28976
|
+
}
|
|
28977
|
+
/**
|
|
28978
|
+
* * Field Name: Result
|
|
28979
|
+
* * Display Name: Result
|
|
28980
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
28981
|
+
* * Description: Final result or output from the agent execution, stored as JSON or text
|
|
28982
|
+
*/
|
|
28983
|
+
get Result() {
|
|
28984
|
+
return this.Get('Result');
|
|
28985
|
+
}
|
|
28986
|
+
set Result(value) {
|
|
28987
|
+
this.Set('Result', value);
|
|
28988
|
+
}
|
|
28989
|
+
/**
|
|
28990
|
+
* * Field Name: AgentState
|
|
28991
|
+
* * Display Name: Agent State
|
|
28992
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
28993
|
+
* * Description: JSON serialization of the complete agent state, including conversation context, variables, and execution state. Enables pause/resume functionality.
|
|
28994
|
+
*/
|
|
28995
|
+
get AgentState() {
|
|
28996
|
+
return this.Get('AgentState');
|
|
28997
|
+
}
|
|
28998
|
+
set AgentState(value) {
|
|
28999
|
+
this.Set('AgentState', value);
|
|
29000
|
+
}
|
|
29001
|
+
/**
|
|
29002
|
+
* * Field Name: TotalTokensUsed
|
|
29003
|
+
* * Display Name: Total Tokens Used
|
|
29004
|
+
* * SQL Data Type: int
|
|
29005
|
+
* * Default Value: 0
|
|
29006
|
+
* * Description: Total number of tokens consumed by all LLM calls during this agent run
|
|
29007
|
+
*/
|
|
29008
|
+
get TotalTokensUsed() {
|
|
29009
|
+
return this.Get('TotalTokensUsed');
|
|
29010
|
+
}
|
|
29011
|
+
set TotalTokensUsed(value) {
|
|
29012
|
+
this.Set('TotalTokensUsed', value);
|
|
29013
|
+
}
|
|
29014
|
+
/**
|
|
29015
|
+
* * Field Name: TotalCost
|
|
29016
|
+
* * Display Name: Total Cost
|
|
29017
|
+
* * SQL Data Type: decimal(18, 6)
|
|
29018
|
+
* * Default Value: 0.000000
|
|
29019
|
+
* * Description: Total estimated cost for all AI model usage during this agent run
|
|
29020
|
+
*/
|
|
29021
|
+
get TotalCost() {
|
|
29022
|
+
return this.Get('TotalCost');
|
|
29023
|
+
}
|
|
29024
|
+
set TotalCost(value) {
|
|
29025
|
+
this.Set('TotalCost', value);
|
|
29026
|
+
}
|
|
29027
|
+
/**
|
|
29028
|
+
* * Field Name: __mj_CreatedAt
|
|
29029
|
+
* * Display Name: Created At
|
|
29030
|
+
* * SQL Data Type: datetimeoffset
|
|
29031
|
+
* * Default Value: getutcdate()
|
|
29032
|
+
*/
|
|
29033
|
+
get __mj_CreatedAt() {
|
|
29034
|
+
return this.Get('__mj_CreatedAt');
|
|
29035
|
+
}
|
|
29036
|
+
/**
|
|
29037
|
+
* * Field Name: __mj_UpdatedAt
|
|
29038
|
+
* * Display Name: Updated At
|
|
29039
|
+
* * SQL Data Type: datetimeoffset
|
|
29040
|
+
* * Default Value: getutcdate()
|
|
29041
|
+
*/
|
|
29042
|
+
get __mj_UpdatedAt() {
|
|
29043
|
+
return this.Get('__mj_UpdatedAt');
|
|
29044
|
+
}
|
|
29045
|
+
};
|
|
29046
|
+
exports.AIAgentRunEntity = AIAgentRunEntity;
|
|
29047
|
+
exports.AIAgentRunEntity = AIAgentRunEntity = __decorate([
|
|
29048
|
+
(0, global_1.RegisterClass)(core_1.BaseEntity, 'MJ: AI Agent Runs')
|
|
29049
|
+
], AIAgentRunEntity);
|
|
29050
|
+
/**
|
|
29051
|
+
* MJ: AI Agent Types - strongly typed entity sub-class
|
|
29052
|
+
* * Schema: __mj
|
|
29053
|
+
* * Base Table: AIAgentType
|
|
29054
|
+
* * Base View: vwAIAgentTypes
|
|
29055
|
+
* * Primary Key: ID
|
|
29056
|
+
* @extends {BaseEntity}
|
|
29057
|
+
* @class
|
|
29058
|
+
* @public
|
|
29059
|
+
*/
|
|
29060
|
+
let AIAgentTypeEntity = class AIAgentTypeEntity extends core_1.BaseEntity {
|
|
29061
|
+
/**
|
|
29062
|
+
* Loads the MJ: AI Agent Types record from the database
|
|
29063
|
+
* @param ID: string - primary key value to load the MJ: AI Agent Types record.
|
|
29064
|
+
* @param EntityRelationshipsToLoad - (optional) the relationships to load
|
|
29065
|
+
* @returns {Promise<boolean>} - true if successful, false otherwise
|
|
29066
|
+
* @public
|
|
29067
|
+
* @async
|
|
29068
|
+
* @memberof AIAgentTypeEntity
|
|
29069
|
+
* @method
|
|
29070
|
+
* @override
|
|
29071
|
+
*/
|
|
29072
|
+
async Load(ID, EntityRelationshipsToLoad) {
|
|
29073
|
+
const compositeKey = new core_1.CompositeKey();
|
|
29074
|
+
compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
|
|
29075
|
+
return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
|
|
29076
|
+
}
|
|
29077
|
+
/**
|
|
29078
|
+
* * Field Name: ID
|
|
29079
|
+
* * Display Name: ID
|
|
29080
|
+
* * SQL Data Type: uniqueidentifier
|
|
29081
|
+
* * Default Value: newsequentialid()
|
|
29082
|
+
* * Description: Unique identifier for the agent type
|
|
29083
|
+
*/
|
|
29084
|
+
get ID() {
|
|
29085
|
+
return this.Get('ID');
|
|
29086
|
+
}
|
|
29087
|
+
/**
|
|
29088
|
+
* * Field Name: Name
|
|
29089
|
+
* * Display Name: Name
|
|
29090
|
+
* * SQL Data Type: nvarchar(100)
|
|
29091
|
+
* * Description: Unique name of the agent type (e.g., "Base", "CustomerSupport", "DataAnalysis"). Used for programmatic identification and factory instantiation.
|
|
29092
|
+
*/
|
|
29093
|
+
get Name() {
|
|
29094
|
+
return this.Get('Name');
|
|
29095
|
+
}
|
|
29096
|
+
set Name(value) {
|
|
29097
|
+
this.Set('Name', value);
|
|
29098
|
+
}
|
|
29099
|
+
/**
|
|
29100
|
+
* * Field Name: Description
|
|
29101
|
+
* * Display Name: Description
|
|
29102
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
29103
|
+
* * Description: Detailed description of the agent type, its purpose, and typical use cases
|
|
29104
|
+
*/
|
|
29105
|
+
get Description() {
|
|
29106
|
+
return this.Get('Description');
|
|
29107
|
+
}
|
|
29108
|
+
set Description(value) {
|
|
29109
|
+
this.Set('Description', value);
|
|
29110
|
+
}
|
|
29111
|
+
/**
|
|
29112
|
+
* * Field Name: SystemPromptID
|
|
29113
|
+
* * Display Name: System Prompt ID
|
|
29114
|
+
* * SQL Data Type: uniqueidentifier
|
|
29115
|
+
* * Related Entity/Foreign Key: AI Prompts (vwAIPrompts.ID)
|
|
29116
|
+
* * Description: Reference to the AI Prompt that contains the system-level instructions for all agents of this type. This prompt will be blended with individual agent prompts.
|
|
29117
|
+
*/
|
|
29118
|
+
get SystemPromptID() {
|
|
29119
|
+
return this.Get('SystemPromptID');
|
|
29120
|
+
}
|
|
29121
|
+
set SystemPromptID(value) {
|
|
29122
|
+
this.Set('SystemPromptID', value);
|
|
29123
|
+
}
|
|
29124
|
+
/**
|
|
29125
|
+
* * Field Name: IsActive
|
|
29126
|
+
* * Display Name: Is Active
|
|
29127
|
+
* * SQL Data Type: bit
|
|
29128
|
+
* * Default Value: 1
|
|
29129
|
+
* * Description: Indicates whether this agent type is available for use. Inactive types cannot be assigned to new agents.
|
|
29130
|
+
*/
|
|
29131
|
+
get IsActive() {
|
|
29132
|
+
return this.Get('IsActive');
|
|
29133
|
+
}
|
|
29134
|
+
set IsActive(value) {
|
|
29135
|
+
this.Set('IsActive', value);
|
|
29136
|
+
}
|
|
29137
|
+
/**
|
|
29138
|
+
* * Field Name: __mj_CreatedAt
|
|
29139
|
+
* * Display Name: Created At
|
|
29140
|
+
* * SQL Data Type: datetimeoffset
|
|
29141
|
+
* * Default Value: getutcdate()
|
|
29142
|
+
*/
|
|
29143
|
+
get __mj_CreatedAt() {
|
|
29144
|
+
return this.Get('__mj_CreatedAt');
|
|
29145
|
+
}
|
|
29146
|
+
/**
|
|
29147
|
+
* * Field Name: __mj_UpdatedAt
|
|
29148
|
+
* * Display Name: Updated At
|
|
29149
|
+
* * SQL Data Type: datetimeoffset
|
|
29150
|
+
* * Default Value: getutcdate()
|
|
29151
|
+
*/
|
|
29152
|
+
get __mj_UpdatedAt() {
|
|
29153
|
+
return this.Get('__mj_UpdatedAt');
|
|
29154
|
+
}
|
|
29155
|
+
};
|
|
29156
|
+
exports.AIAgentTypeEntity = AIAgentTypeEntity;
|
|
29157
|
+
exports.AIAgentTypeEntity = AIAgentTypeEntity = __decorate([
|
|
29158
|
+
(0, global_1.RegisterClass)(core_1.BaseEntity, 'MJ: AI Agent Types')
|
|
29159
|
+
], AIAgentTypeEntity);
|
|
28212
29160
|
/**
|
|
28213
29161
|
* MJ: AI Configuration Params - strongly typed entity sub-class
|
|
28214
29162
|
* * Schema: __mj
|
|
@@ -28760,6 +29708,19 @@ let AIModelVendorEntity = class AIModelVendorEntity extends core_1.BaseEntity {
|
|
|
28760
29708
|
return this.Get('__mj_UpdatedAt');
|
|
28761
29709
|
}
|
|
28762
29710
|
/**
|
|
29711
|
+
* * Field Name: TypeID
|
|
29712
|
+
* * Display Name: Type ID
|
|
29713
|
+
* * SQL Data Type: uniqueidentifier
|
|
29714
|
+
* * Related Entity/Foreign Key: MJ: AI Vendor Type Definitions (vwAIVendorTypeDefinitions.ID)
|
|
29715
|
+
* * Description: References the type/role of the vendor for this model (e.g., model developer, inference provider)
|
|
29716
|
+
*/
|
|
29717
|
+
get TypeID() {
|
|
29718
|
+
return this.Get('TypeID');
|
|
29719
|
+
}
|
|
29720
|
+
set TypeID(value) {
|
|
29721
|
+
this.Set('TypeID', value);
|
|
29722
|
+
}
|
|
29723
|
+
/**
|
|
28763
29724
|
* * Field Name: Model
|
|
28764
29725
|
* * Display Name: Model
|
|
28765
29726
|
* * SQL Data Type: nvarchar(50)
|
|
@@ -28775,6 +29736,14 @@ let AIModelVendorEntity = class AIModelVendorEntity extends core_1.BaseEntity {
|
|
|
28775
29736
|
get Vendor() {
|
|
28776
29737
|
return this.Get('Vendor');
|
|
28777
29738
|
}
|
|
29739
|
+
/**
|
|
29740
|
+
* * Field Name: Type
|
|
29741
|
+
* * Display Name: Type
|
|
29742
|
+
* * SQL Data Type: nvarchar(50)
|
|
29743
|
+
*/
|
|
29744
|
+
get Type() {
|
|
29745
|
+
return this.Get('Type');
|
|
29746
|
+
}
|
|
28778
29747
|
};
|
|
28779
29748
|
exports.AIModelVendorEntity = AIModelVendorEntity;
|
|
28780
29749
|
exports.AIModelVendorEntity = AIModelVendorEntity = __decorate([
|
|
@@ -29382,6 +30351,63 @@ let AIPromptRunEntity = class AIPromptRunEntity extends core_1.BaseEntity {
|
|
|
29382
30351
|
return this.Get('__mj_UpdatedAt');
|
|
29383
30352
|
}
|
|
29384
30353
|
/**
|
|
30354
|
+
* * Field Name: ParentID
|
|
30355
|
+
* * Display Name: Parent ID
|
|
30356
|
+
* * SQL Data Type: uniqueidentifier
|
|
30357
|
+
* * Related Entity/Foreign Key: MJ: AI Prompt Runs (vwAIPromptRuns.ID)
|
|
30358
|
+
* * Description: References the parent AIPromptRun.ID for hierarchical execution tracking. NULL for top-level runs, populated for parallel children and result selector runs.
|
|
30359
|
+
*/
|
|
30360
|
+
get ParentID() {
|
|
30361
|
+
return this.Get('ParentID');
|
|
30362
|
+
}
|
|
30363
|
+
set ParentID(value) {
|
|
30364
|
+
this.Set('ParentID', value);
|
|
30365
|
+
}
|
|
30366
|
+
/**
|
|
30367
|
+
* * Field Name: RunType
|
|
30368
|
+
* * Display Name: Run Type
|
|
30369
|
+
* * SQL Data Type: nvarchar(20)
|
|
30370
|
+
* * Default Value: Single
|
|
30371
|
+
* * Value List Type: List
|
|
30372
|
+
* * Possible Values
|
|
30373
|
+
* * Single
|
|
30374
|
+
* * ParallelParent
|
|
30375
|
+
* * ParallelChild
|
|
30376
|
+
* * ResultSelector
|
|
30377
|
+
* * Description: Type of prompt run execution: Single (standard single prompt), ParallelParent (coordinator for parallel execution), ParallelChild (individual parallel execution), ResultSelector (result selection prompt that chooses best result)
|
|
30378
|
+
*/
|
|
30379
|
+
get RunType() {
|
|
30380
|
+
return this.Get('RunType');
|
|
30381
|
+
}
|
|
30382
|
+
set RunType(value) {
|
|
30383
|
+
this.Set('RunType', value);
|
|
30384
|
+
}
|
|
30385
|
+
/**
|
|
30386
|
+
* * Field Name: ExecutionOrder
|
|
30387
|
+
* * Display Name: Execution Order
|
|
30388
|
+
* * SQL Data Type: int
|
|
30389
|
+
* * Description: Execution order for parallel child runs and result selector runs. Used to track the sequence of execution within a parallel run group. NULL for single runs and parallel parent runs.
|
|
30390
|
+
*/
|
|
30391
|
+
get ExecutionOrder() {
|
|
30392
|
+
return this.Get('ExecutionOrder');
|
|
30393
|
+
}
|
|
30394
|
+
set ExecutionOrder(value) {
|
|
30395
|
+
this.Set('ExecutionOrder', value);
|
|
30396
|
+
}
|
|
30397
|
+
/**
|
|
30398
|
+
* * Field Name: AgentRunID
|
|
30399
|
+
* * Display Name: Agent Run ID
|
|
30400
|
+
* * SQL Data Type: uniqueidentifier
|
|
30401
|
+
* * Related Entity/Foreign Key: MJ: AI Agent Runs (vwAIAgentRuns.ID)
|
|
30402
|
+
* * Description: Optional reference to the AIAgentRun that initiated this prompt execution. Links prompt runs to their parent agent runs for comprehensive execution tracking.
|
|
30403
|
+
*/
|
|
30404
|
+
get AgentRunID() {
|
|
30405
|
+
return this.Get('AgentRunID');
|
|
30406
|
+
}
|
|
30407
|
+
set AgentRunID(value) {
|
|
30408
|
+
this.Set('AgentRunID', value);
|
|
30409
|
+
}
|
|
30410
|
+
/**
|
|
29385
30411
|
* * Field Name: Prompt
|
|
29386
30412
|
* * Display Name: Prompt
|
|
29387
30413
|
* * SQL Data Type: nvarchar(255)
|