@memberjunction/core-entities 5.21.0 → 5.23.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.
@@ -985,6 +985,56 @@ export const MJAIAgentCategorySchema = z.object({
985
985
  * * Display Name: Root Parent
986
986
  * * SQL Data Type: uniqueidentifier`),
987
987
  });
988
+ /**
989
+ * zod schema definition for the entity MJ: AI Agent Client Tools
990
+ */
991
+ export const MJAIAgentClientToolSchema = z.object({
992
+ ID: z.string().describe(`
993
+ * * Field Name: ID
994
+ * * Display Name: ID
995
+ * * SQL Data Type: uniqueidentifier
996
+ * * Default Value: newsequentialid()`),
997
+ AgentID: z.string().describe(`
998
+ * * Field Name: AgentID
999
+ * * Display Name: Agent
1000
+ * * SQL Data Type: uniqueidentifier
1001
+ * * Related Entity/Foreign Key: MJ: AI Agents (vwAIAgents.ID)`),
1002
+ ClientToolDefinitionID: z.string().describe(`
1003
+ * * Field Name: ClientToolDefinitionID
1004
+ * * Display Name: Tool Definition
1005
+ * * SQL Data Type: uniqueidentifier
1006
+ * * Related Entity/Foreign Key: MJ: AI Client Tool Definitions (vwAIClientToolDefinitions.ID)`),
1007
+ IsRequired: z.boolean().describe(`
1008
+ * * Field Name: IsRequired
1009
+ * * Display Name: Is Required
1010
+ * * SQL Data Type: bit
1011
+ * * Default Value: 0
1012
+ * * Description: When true, the agent expects this tool to always be available on the client. If the client has not registered a handler, agent execution may warn or fail depending on configuration.`),
1013
+ Priority: z.number().describe(`
1014
+ * * Field Name: Priority
1015
+ * * Display Name: Priority
1016
+ * * SQL Data Type: int
1017
+ * * Default Value: 0
1018
+ * * Description: Sort order for tool listing in prompts. Lower numbers appear first. Tools with the same priority are listed alphabetically.`),
1019
+ __mj_CreatedAt: z.date().describe(`
1020
+ * * Field Name: __mj_CreatedAt
1021
+ * * Display Name: Created At
1022
+ * * SQL Data Type: datetimeoffset
1023
+ * * Default Value: getutcdate()`),
1024
+ __mj_UpdatedAt: z.date().describe(`
1025
+ * * Field Name: __mj_UpdatedAt
1026
+ * * Display Name: Updated At
1027
+ * * SQL Data Type: datetimeoffset
1028
+ * * Default Value: getutcdate()`),
1029
+ Agent: z.string().nullable().describe(`
1030
+ * * Field Name: Agent
1031
+ * * Display Name: Agent Name
1032
+ * * SQL Data Type: nvarchar(255)`),
1033
+ ClientToolDefinition: z.string().describe(`
1034
+ * * Field Name: ClientToolDefinition
1035
+ * * Display Name: Tool Name
1036
+ * * SQL Data Type: nvarchar(200)`),
1037
+ });
988
1038
  /**
989
1039
  * zod schema definition for the entity MJ: AI Agent Configurations
990
1040
  */
@@ -3228,7 +3278,7 @@ export const MJAIAgentSchema = z.object({
3228
3278
  * * Description: Number of messages that triggers context compression when EnableContextCompression is true.`),
3229
3279
  ContextCompressionPromptID: z.string().nullable().describe(`
3230
3280
  * * Field Name: ContextCompressionPromptID
3231
- * * Display Name: Context Compression Prompt
3281
+ * * Display Name: Compression Prompt
3232
3282
  * * SQL Data Type: uniqueidentifier
3233
3283
  * * Related Entity/Foreign Key: MJ: AI Prompts (vwAIPrompts.ID)`),
3234
3284
  ContextCompressionMessageRetentionCount: z.number().nullable().describe(`
@@ -3397,7 +3447,7 @@ if this limit is exceeded.`),
3397
3447
  * * Description: Default artifact type produced by this agent. This is the primary artifact type; additional artifact types can be linked via AIAgentArtifactType junction table. Can be NULL if agent does not produce artifacts by default.`),
3398
3448
  OwnerUserID: z.string().describe(`
3399
3449
  * * Field Name: OwnerUserID
3400
- * * Display Name: Owner
3450
+ * * Display Name: Owner User
3401
3451
  * * SQL Data Type: uniqueidentifier
3402
3452
  * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
3403
3453
  * * Default Value: ECAFCCEC-6A37-EF11-86D4-000D3A4E707E
@@ -3516,7 +3566,7 @@ if this limit is exceeded.`),
3516
3566
  * * Description: Base path within the storage provider for this agent's attachments. Agent run ID and sequence number are appended to create unique paths. Format: /folder/subfolder`),
3517
3567
  InlineStorageThresholdBytes: z.number().nullable().describe(`
3518
3568
  * * Field Name: InlineStorageThresholdBytes
3519
- * * Display Name: Inline Storage Threshold (Bytes)
3569
+ * * Display Name: Inline Storage Threshold Bytes
3520
3570
  * * SQL Data Type: int
3521
3571
  * * Description: File size threshold for inline storage. Files <= this size are stored as base64 inline, larger files use MJStorage. NULL uses system default (1MB). Set to 0 to always use MJStorage.`),
3522
3572
  AgentTypePromptParams: z.string().nullable().describe(`
@@ -3531,13 +3581,13 @@ if this limit is exceeded.`),
3531
3581
  * * Description: JSON configuration defining scope dimensions for multi-tenant deployments. Example: {"dimensions":[{"name":"OrganizationID","entityId":"...","isPrimary":true,"required":true},{"name":"ContactID","entityId":"...","isPrimary":false,"required":false}],"inheritanceMode":"cascading"}`),
3532
3582
  NoteRetentionDays: z.number().nullable().describe(`
3533
3583
  * * Field Name: NoteRetentionDays
3534
- * * Display Name: Note Retention (Days)
3584
+ * * Display Name: Note Retention Days
3535
3585
  * * SQL Data Type: int
3536
3586
  * * Default Value: 90
3537
3587
  * * Description: Number of days to retain notes before archiving due to inactivity. Default 90. NULL means use system default.`),
3538
3588
  ExampleRetentionDays: z.number().nullable().describe(`
3539
3589
  * * Field Name: ExampleRetentionDays
3540
- * * Display Name: Example Retention (Days)
3590
+ * * Display Name: Example Retention Days
3541
3591
  * * SQL Data Type: int
3542
3592
  * * Default Value: 180
3543
3593
  * * Description: Number of days to retain examples before archiving due to inactivity. Default 180. NULL means use system default.`),
@@ -3558,6 +3608,12 @@ if this limit is exceeded.`),
3558
3608
  * * SQL Data Type: uniqueidentifier
3559
3609
  * * Related Entity/Foreign Key: MJ: AI Agent Categories (vwAIAgentCategories.ID)
3560
3610
  * * Description: Foreign key to AIAgentCategory. Assigns this agent to an organizational category for grouping, filtering, and inherited assignment strategy resolution.`),
3611
+ AllowEphemeralClientTools: z.boolean().describe(`
3612
+ * * Field Name: AllowEphemeralClientTools
3613
+ * * Display Name: Allow Ephemeral Client Tools
3614
+ * * SQL Data Type: bit
3615
+ * * Default Value: 1
3616
+ * * Description: When true (default), this agent accepts runtime-registered ephemeral client tools that are not defined in metadata. Set to false for agents that require strict tool governance.`),
3561
3617
  Parent: z.string().nullable().describe(`
3562
3618
  * * Field Name: Parent
3563
3619
  * * Display Name: Parent Name
@@ -3576,7 +3632,7 @@ if this limit is exceeded.`),
3576
3632
  * * SQL Data Type: nvarchar(100)`),
3577
3633
  OwnerUser: z.string().describe(`
3578
3634
  * * Field Name: OwnerUser
3579
- * * Display Name: Owner Name
3635
+ * * Display Name: Owner User Name
3580
3636
  * * SQL Data Type: nvarchar(100)`),
3581
3637
  AttachmentStorageProvider: z.string().nullable().describe(`
3582
3638
  * * Field Name: AttachmentStorageProvider
@@ -3655,6 +3711,62 @@ export const MJAIArchitectureSchema = z.object({
3655
3711
  * * Display Name: Root Parent Architecture ID
3656
3712
  * * SQL Data Type: uniqueidentifier`),
3657
3713
  });
3714
+ /**
3715
+ * zod schema definition for the entity MJ: AI Client Tool Definitions
3716
+ */
3717
+ export const MJAIClientToolDefinitionSchema = z.object({
3718
+ ID: z.string().describe(`
3719
+ * * Field Name: ID
3720
+ * * Display Name: ID
3721
+ * * SQL Data Type: uniqueidentifier
3722
+ * * Default Value: newsequentialid()`),
3723
+ Name: z.string().describe(`
3724
+ * * Field Name: Name
3725
+ * * Display Name: Tool Name
3726
+ * * SQL Data Type: nvarchar(200)
3727
+ * * Description: Unique identifier for the client tool (e.g., NavigateToApp, NavigateToRecord). Used to match tool invocations from the LLM to registered handlers on the client.`),
3728
+ Description: z.string().describe(`
3729
+ * * Field Name: Description
3730
+ * * Display Name: Description
3731
+ * * SQL Data Type: nvarchar(MAX)
3732
+ * * Description: Human-readable description of what the tool does. This text is injected into the LLM system prompt so it knows when and how to use the tool.`),
3733
+ Category: z.string().nullable().describe(`
3734
+ * * Field Name: Category
3735
+ * * Display Name: Category
3736
+ * * SQL Data Type: nvarchar(50)
3737
+ * * Description: Tool category for grouping and filtering (e.g., navigation, form, display, data).`),
3738
+ InputSchemaJSON: z.string().nullable().describe(`
3739
+ * * Field Name: InputSchemaJSON
3740
+ * * Display Name: Input Schema
3741
+ * * SQL Data Type: nvarchar(MAX)
3742
+ * * Description: JSON Schema defining the input parameters the tool accepts. Included in the LLM prompt so it generates valid parameter objects.`),
3743
+ OutputSchemaJSON: z.string().nullable().describe(`
3744
+ * * Field Name: OutputSchemaJSON
3745
+ * * Display Name: Output Schema
3746
+ * * SQL Data Type: nvarchar(MAX)
3747
+ * * Description: JSON Schema describing the return value from the tool. Optional — used for documentation and LLM context.`),
3748
+ DefaultTimeoutMs: z.number().nullable().describe(`
3749
+ * * Field Name: DefaultTimeoutMs
3750
+ * * Display Name: Default Timeout (ms)
3751
+ * * SQL Data Type: int
3752
+ * * Default Value: 30000
3753
+ * * Description: Default timeout in milliseconds for this tool. Can be overridden per-invocation by the LLM or per-run by execution params. Default is 30000ms (30 seconds).`),
3754
+ RequiresContextType: z.string().nullable().describe(`
3755
+ * * Field Name: RequiresContextType
3756
+ * * Display Name: Required Context Type
3757
+ * * SQL Data Type: nvarchar(100)
3758
+ * * Description: When set, the client only sends this tool to the server when the user is in the specified context (e.g., entity-form, dashboard, search). Null means the tool is always available.`),
3759
+ __mj_CreatedAt: z.date().describe(`
3760
+ * * Field Name: __mj_CreatedAt
3761
+ * * Display Name: Created At
3762
+ * * SQL Data Type: datetimeoffset
3763
+ * * Default Value: getutcdate()`),
3764
+ __mj_UpdatedAt: z.date().describe(`
3765
+ * * Field Name: __mj_UpdatedAt
3766
+ * * Display Name: Updated At
3767
+ * * SQL Data Type: datetimeoffset
3768
+ * * Default Value: getutcdate()`),
3769
+ });
3658
3770
  /**
3659
3771
  * zod schema definition for the entity MJ: AI Configuration Params
3660
3772
  */
@@ -6677,10 +6789,11 @@ export const MJApplicationSchema = z.object({
6677
6789
  * * Display Name: Color
6678
6790
  * * SQL Data Type: nvarchar(20)
6679
6791
  * * Description: Hex color code for visual theming (e.g., #4caf50)`),
6680
- DefaultNavItems: z.string().nullable().describe(`
6792
+ DefaultNavItems: z.any().nullable().describe(`
6681
6793
  * * Field Name: DefaultNavItems
6682
6794
  * * Display Name: Default Nav Items
6683
6795
  * * SQL Data Type: nvarchar(MAX)
6796
+ * * JSON Type: Array<MJApplicationEntity_IDefaultNavItem>
6684
6797
  * * Description: JSON array of default navigation items for this application. Parsed by BaseApplication.GetNavItems()`),
6685
6798
  ClassName: z.string().nullable().describe(`
6686
6799
  * * Field Name: ClassName
@@ -9197,6 +9310,12 @@ export const MJContentItemTagSchema = z.object({
9197
9310
  * * Display Name: Updated At
9198
9311
  * * SQL Data Type: datetimeoffset
9199
9312
  * * Default Value: getutcdate()`),
9313
+ Weight: z.number().describe(`
9314
+ * * Field Name: Weight
9315
+ * * Display Name: Weight
9316
+ * * SQL Data Type: numeric(5, 4)
9317
+ * * Default Value: 1.0
9318
+ * * Description: Relevance weight for this tag (0.0-1.0). 1.0 = highly relevant central topic, 0.5 = moderately relevant, 0.1 = tangentially related. Assigned by the LLM during autotagging.`),
9200
9319
  Item: z.string().nullable().describe(`
9201
9320
  * * Field Name: Item
9202
9321
  * * Display Name: Item
@@ -9454,17 +9573,17 @@ export const MJContentSourceSchema = z.object({
9454
9573
  * * SQL Data Type: nvarchar(255)`),
9455
9574
  ContentTypeID: z.string().describe(`
9456
9575
  * * Field Name: ContentTypeID
9457
- * * Display Name: Content Type ID
9576
+ * * Display Name: Content Type
9458
9577
  * * SQL Data Type: uniqueidentifier
9459
9578
  * * Related Entity/Foreign Key: MJ: Content Types (vwContentTypes.ID)`),
9460
9579
  ContentSourceTypeID: z.string().describe(`
9461
9580
  * * Field Name: ContentSourceTypeID
9462
- * * Display Name: Content Source Type ID
9581
+ * * Display Name: Content Source Type
9463
9582
  * * SQL Data Type: uniqueidentifier
9464
9583
  * * Related Entity/Foreign Key: MJ: Content Source Types (vwContentSourceTypes.ID)`),
9465
9584
  ContentFileTypeID: z.string().describe(`
9466
9585
  * * Field Name: ContentFileTypeID
9467
- * * Display Name: Content File Type ID
9586
+ * * Display Name: Content File Type
9468
9587
  * * SQL Data Type: uniqueidentifier
9469
9588
  * * Related Entity/Foreign Key: MJ: Content File Types (vwContentFileTypes.ID)`),
9470
9589
  URL: z.string().describe(`
@@ -9482,6 +9601,18 @@ export const MJContentSourceSchema = z.object({
9482
9601
  * * Display Name: Updated At
9483
9602
  * * SQL Data Type: datetimeoffset
9484
9603
  * * Default Value: getutcdate()`),
9604
+ EmbeddingModelID: z.string().nullable().describe(`
9605
+ * * Field Name: EmbeddingModelID
9606
+ * * Display Name: Embedding Model
9607
+ * * SQL Data Type: uniqueidentifier
9608
+ * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
9609
+ * * Description: Per-source override for the AI embedding model. When NULL, falls back to the ContentType default.`),
9610
+ VectorIndexID: z.string().nullable().describe(`
9611
+ * * Field Name: VectorIndexID
9612
+ * * Display Name: Vector Index
9613
+ * * SQL Data Type: uniqueidentifier
9614
+ * * Related Entity/Foreign Key: MJ: Vector Indexes (vwVectorIndexes.ID)
9615
+ * * Description: Per-source override for the vector index. When NULL, falls back to the ContentType default.`),
9485
9616
  ContentType: z.string().describe(`
9486
9617
  * * Field Name: ContentType
9487
9618
  * * Display Name: Content Type
@@ -9494,6 +9625,14 @@ export const MJContentSourceSchema = z.object({
9494
9625
  * * Field Name: ContentFileType
9495
9626
  * * Display Name: Content File Type
9496
9627
  * * SQL Data Type: nvarchar(255)`),
9628
+ EmbeddingModel: z.string().nullable().describe(`
9629
+ * * Field Name: EmbeddingModel
9630
+ * * Display Name: Embedding Model
9631
+ * * SQL Data Type: nvarchar(50)`),
9632
+ VectorIndex: z.string().nullable().describe(`
9633
+ * * Field Name: VectorIndex
9634
+ * * Display Name: Vector Index
9635
+ * * SQL Data Type: nvarchar(255)`),
9497
9636
  });
9498
9637
  /**
9499
9638
  * zod schema definition for the entity MJ: Content Type Attributes
@@ -9552,17 +9691,17 @@ export const MJContentTypeSchema = z.object({
9552
9691
  * * SQL Data Type: nvarchar(MAX)`),
9553
9692
  AIModelID: z.string().describe(`
9554
9693
  * * Field Name: AIModelID
9555
- * * Display Name: AIModel ID
9694
+ * * Display Name: AI Model
9556
9695
  * * SQL Data Type: uniqueidentifier
9557
9696
  * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)`),
9558
9697
  MinTags: z.number().describe(`
9559
9698
  * * Field Name: MinTags
9560
- * * Display Name: Min Tags
9699
+ * * Display Name: Minimum Tags
9561
9700
  * * SQL Data Type: int
9562
9701
  * * Description: Minimum number of tags that must be applied to content of this type.`),
9563
9702
  MaxTags: z.number().describe(`
9564
9703
  * * Field Name: MaxTags
9565
- * * Display Name: Max Tags
9704
+ * * Display Name: Maximum Tags
9566
9705
  * * SQL Data Type: int
9567
9706
  * * Description: Maximum number of tags allowed on content of this type.`),
9568
9707
  __mj_CreatedAt: z.date().describe(`
@@ -9575,10 +9714,30 @@ export const MJContentTypeSchema = z.object({
9575
9714
  * * Display Name: Updated At
9576
9715
  * * SQL Data Type: datetimeoffset
9577
9716
  * * Default Value: getutcdate()`),
9717
+ EmbeddingModelID: z.string().nullable().describe(`
9718
+ * * Field Name: EmbeddingModelID
9719
+ * * Display Name: Embedding Model
9720
+ * * SQL Data Type: uniqueidentifier
9721
+ * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
9722
+ * * Description: Default AI embedding model for vectorizing content items of this type. Sources can override per-source. If NULL, uses the first available embedding model.`),
9723
+ VectorIndexID: z.string().nullable().describe(`
9724
+ * * Field Name: VectorIndexID
9725
+ * * Display Name: Vector Index
9726
+ * * SQL Data Type: uniqueidentifier
9727
+ * * Related Entity/Foreign Key: MJ: Vector Indexes (vwVectorIndexes.ID)
9728
+ * * Description: Default vector index for storing embeddings of this content type. Sources can override per-source. If NULL, uses the first available vector index.`),
9578
9729
  AIModel: z.string().describe(`
9579
9730
  * * Field Name: AIModel
9580
- * * Display Name: AIModel
9731
+ * * Display Name: AI Model Name
9732
+ * * SQL Data Type: nvarchar(50)`),
9733
+ EmbeddingModel: z.string().nullable().describe(`
9734
+ * * Field Name: EmbeddingModel
9735
+ * * Display Name: Embedding Model Name
9581
9736
  * * SQL Data Type: nvarchar(50)`),
9737
+ VectorIndex: z.string().nullable().describe(`
9738
+ * * Field Name: VectorIndex
9739
+ * * Display Name: Vector Index Name
9740
+ * * SQL Data Type: nvarchar(255)`),
9582
9741
  });
9583
9742
  /**
9584
9743
  * zod schema definition for the entity MJ: Conversation Artifact Permissions
@@ -11228,7 +11387,7 @@ export const MJDuplicateRunDetailMatchSchema = z.object({
11228
11387
  * * Default Value: newsequentialid()`),
11229
11388
  DuplicateRunDetailID: z.string().describe(`
11230
11389
  * * Field Name: DuplicateRunDetailID
11231
- * * Display Name: Duplicate Run Detail
11390
+ * * Display Name: Duplicate Run Detail ID
11232
11391
  * * SQL Data Type: uniqueidentifier
11233
11392
  * * Related Entity/Foreign Key: MJ: Duplicate Run Details (vwDuplicateRunDetails.ID)`),
11234
11393
  MatchSource: z.union([z.literal('SP'), z.literal('Vector')]).describe(`
@@ -11243,7 +11402,7 @@ export const MJDuplicateRunDetailMatchSchema = z.object({
11243
11402
  * * Description: Either Vector or SP`),
11244
11403
  MatchRecordID: z.string().describe(`
11245
11404
  * * Field Name: MatchRecordID
11246
- * * Display Name: Match Record
11405
+ * * Display Name: Match Record ID
11247
11406
  * * SQL Data Type: nvarchar(500)
11248
11407
  * * Description: The ID of the record identified as a potential duplicate match.`),
11249
11408
  MatchProbability: z.number().describe(`
@@ -11277,7 +11436,7 @@ export const MJDuplicateRunDetailMatchSchema = z.object({
11277
11436
  * * Description: Current approval status of the proposed action (Pending, Approved, Rejected).`),
11278
11437
  RecordMergeLogID: z.string().nullable().describe(`
11279
11438
  * * Field Name: RecordMergeLogID
11280
- * * Display Name: Record Merge Log
11439
+ * * Display Name: Record Merge Log ID
11281
11440
  * * SQL Data Type: uniqueidentifier
11282
11441
  * * Related Entity/Foreign Key: MJ: Record Merge Logs (vwRecordMergeLogs.ID)`),
11283
11442
  MergeStatus: z.union([z.literal('Complete'), z.literal('Error'), z.literal('Pending')]).describe(`
@@ -11307,6 +11466,11 @@ export const MJDuplicateRunDetailMatchSchema = z.object({
11307
11466
  * * Display Name: Updated At
11308
11467
  * * SQL Data Type: datetimeoffset
11309
11468
  * * Default Value: getutcdate()`),
11469
+ RecordMetadata: z.string().nullable().describe(`
11470
+ * * Field Name: RecordMetadata
11471
+ * * Display Name: Record Metadata
11472
+ * * SQL Data Type: nvarchar(MAX)
11473
+ * * Description: JSON metadata snapshot of the matched record from the vector database at detection time. Contains display fields (Name, Description, EntityIcon, etc.) for rich UI rendering without additional lookups.`),
11310
11474
  DuplicateRunDetail: z.string().describe(`
11311
11475
  * * Field Name: DuplicateRunDetail
11312
11476
  * * Display Name: Duplicate Run Detail
@@ -11327,12 +11491,12 @@ export const MJDuplicateRunDetailSchema = z.object({
11327
11491
  * * Default Value: newsequentialid()`),
11328
11492
  DuplicateRunID: z.string().describe(`
11329
11493
  * * Field Name: DuplicateRunID
11330
- * * Display Name: Duplicate Run ID
11494
+ * * Display Name: Duplicate Run
11331
11495
  * * SQL Data Type: uniqueidentifier
11332
11496
  * * Related Entity/Foreign Key: MJ: Duplicate Runs (vwDuplicateRuns.ID)`),
11333
11497
  RecordID: z.string().describe(`
11334
11498
  * * Field Name: RecordID
11335
- * * Display Name: Record ID
11499
+ * * Display Name: Source Record
11336
11500
  * * SQL Data Type: nvarchar(500)
11337
11501
  * * Description: The ID of the record being analyzed for duplicates.`),
11338
11502
  MatchStatus: z.union([z.literal('Complete'), z.literal('Error'), z.literal('Pending'), z.literal('Skipped')]).describe(`
@@ -11384,9 +11548,14 @@ export const MJDuplicateRunDetailSchema = z.object({
11384
11548
  * * Display Name: Updated At
11385
11549
  * * SQL Data Type: datetimeoffset
11386
11550
  * * Default Value: getutcdate()`),
11551
+ RecordMetadata: z.string().nullable().describe(`
11552
+ * * Field Name: RecordMetadata
11553
+ * * Display Name: Record Metadata
11554
+ * * SQL Data Type: nvarchar(MAX)
11555
+ * * Description: JSON metadata snapshot of the source record from the vector database at detection time. Contains display fields (Name, Description, EntityIcon, etc.) for rich UI rendering without additional lookups.`),
11387
11556
  DuplicateRun: z.string().describe(`
11388
11557
  * * Field Name: DuplicateRun
11389
- * * Display Name: Duplicate Run
11558
+ * * Display Name: Run Name
11390
11559
  * * SQL Data Type: nvarchar(255)`),
11391
11560
  });
11392
11561
  /**
@@ -11408,11 +11577,12 @@ export const MJDuplicateRunSchema = z.object({
11408
11577
  * * Display Name: Started By User
11409
11578
  * * SQL Data Type: uniqueidentifier
11410
11579
  * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)`),
11411
- SourceListID: z.string().describe(`
11580
+ SourceListID: z.string().nullable().describe(`
11412
11581
  * * Field Name: SourceListID
11413
11582
  * * Display Name: Source List
11414
11583
  * * SQL Data Type: uniqueidentifier
11415
- * * Related Entity/Foreign Key: MJ: Lists (vwLists.ID)`),
11584
+ * * Related Entity/Foreign Key: MJ: Lists (vwLists.ID)
11585
+ * * Description: Optional List ID to narrow the scope of duplicate detection. When NULL, all records in the entity are scanned. When set, only records in the specified list are checked for duplicates.`),
11416
11586
  StartedAt: z.date().describe(`
11417
11587
  * * Field Name: StartedAt
11418
11588
  * * Display Name: Started At
@@ -11478,7 +11648,7 @@ export const MJDuplicateRunSchema = z.object({
11478
11648
  * * Field Name: StartedByUser
11479
11649
  * * Display Name: Started By User
11480
11650
  * * SQL Data Type: nvarchar(100)`),
11481
- SourceList: z.string().describe(`
11651
+ SourceList: z.string().nullable().describe(`
11482
11652
  * * Field Name: SourceList
11483
11653
  * * Display Name: Source List
11484
11654
  * * SQL Data Type: nvarchar(100)`),
@@ -12854,17 +13024,17 @@ export const MJEntityDocumentSchema = z.object({
12854
13024
  * * SQL Data Type: nvarchar(250)`),
12855
13025
  TypeID: z.string().describe(`
12856
13026
  * * Field Name: TypeID
12857
- * * Display Name: Type ID
13027
+ * * Display Name: Type
12858
13028
  * * SQL Data Type: uniqueidentifier
12859
13029
  * * Related Entity/Foreign Key: MJ: Entity Document Types (vwEntityDocumentTypes.ID)`),
12860
13030
  EntityID: z.string().describe(`
12861
13031
  * * Field Name: EntityID
12862
- * * Display Name: Entity ID
13032
+ * * Display Name: Entity
12863
13033
  * * SQL Data Type: uniqueidentifier
12864
13034
  * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)`),
12865
13035
  VectorDatabaseID: z.string().describe(`
12866
13036
  * * Field Name: VectorDatabaseID
12867
- * * Display Name: Vector Database ID
13037
+ * * Display Name: Vector Database
12868
13038
  * * SQL Data Type: uniqueidentifier
12869
13039
  * * Related Entity/Foreign Key: MJ: Vector Databases (vwVectorDatabases.ID)`),
12870
13040
  Status: z.union([z.literal('Active'), z.literal('Inactive')]).describe(`
@@ -12878,56 +13048,71 @@ export const MJEntityDocumentSchema = z.object({
12878
13048
  * * Inactive`),
12879
13049
  TemplateID: z.string().describe(`
12880
13050
  * * Field Name: TemplateID
12881
- * * Display Name: Template ID
13051
+ * * Display Name: Template
12882
13052
  * * SQL Data Type: uniqueidentifier
12883
13053
  * * Related Entity/Foreign Key: MJ: Templates (vwTemplates.ID)`),
12884
13054
  AIModelID: z.string().describe(`
12885
13055
  * * Field Name: AIModelID
12886
- * * Display Name: AIModel ID
13056
+ * * Display Name: AI Model
12887
13057
  * * SQL Data Type: uniqueidentifier
12888
13058
  * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)`),
12889
13059
  PotentialMatchThreshold: z.number().describe(`
12890
13060
  * * Field Name: PotentialMatchThreshold
12891
13061
  * * Display Name: Potential Match Threshold
12892
13062
  * * SQL Data Type: numeric(12, 11)
12893
- * * Default Value: 1
13063
+ * * Default Value: 0.7
12894
13064
  * * Description: Value between 0 and 1 that determines what is considered a potential matching record. Value must be <= AbsoluteMatchThreshold. This is primarily used for duplicate detection but can be used for other applications as well where matching is relevant.`),
12895
13065
  AbsoluteMatchThreshold: z.number().describe(`
12896
13066
  * * Field Name: AbsoluteMatchThreshold
12897
13067
  * * Display Name: Absolute Match Threshold
12898
13068
  * * SQL Data Type: numeric(12, 11)
12899
- * * Default Value: 1
13069
+ * * Default Value: 0.95
12900
13070
  * * Description: Value between 0 and 1 that determines what is considered an absolute matching record. Value must be >= PotentialMatchThreshold. This is primarily used for duplicate detection but can be used for other applications as well where matching is relevant.`),
12901
13071
  __mj_CreatedAt: z.date().describe(`
12902
13072
  * * Field Name: __mj_CreatedAt
12903
- * * Display Name: __mj _Created At
13073
+ * * Display Name: Created At
12904
13074
  * * SQL Data Type: datetimeoffset
12905
13075
  * * Default Value: getutcdate()`),
12906
13076
  __mj_UpdatedAt: z.date().describe(`
12907
13077
  * * Field Name: __mj_UpdatedAt
12908
- * * Display Name: __mj _Updated At
13078
+ * * Display Name: Updated At
12909
13079
  * * SQL Data Type: datetimeoffset
12910
13080
  * * Default Value: getutcdate()`),
13081
+ VectorIndexID: z.string().nullable().describe(`
13082
+ * * Field Name: VectorIndexID
13083
+ * * Display Name: Vector Index
13084
+ * * SQL Data Type: uniqueidentifier
13085
+ * * Related Entity/Foreign Key: MJ: Vector Indexes (vwVectorIndexes.ID)
13086
+ * * Description: Optional foreign key to the specific Vector Index where this entity document's embeddings should be stored. When specified, the vectorization pipeline will upsert vectors directly to this index rather than auto-creating or looking up an index based on VectorDatabaseID + AIModelID. This enables explicit control over which Pinecone/Weaviate/etc. index is used per entity document, supporting multi-index architectures and shared indexes across entity types.`),
13087
+ Configuration: z.string().nullable().describe(`
13088
+ * * Field Name: Configuration
13089
+ * * Display Name: Configuration
13090
+ * * SQL Data Type: nvarchar(MAX)
13091
+ * * Description: JSON configuration settings for this entity document. Controls vector metadata field inclusion (which fields get stored in the vector index for search result display), large field truncation limits, and future settings like sync scheduling and threshold overrides. NULL means use system defaults.`),
12911
13092
  Type: z.string().describe(`
12912
13093
  * * Field Name: Type
12913
- * * Display Name: Type
13094
+ * * Display Name: Type Name
12914
13095
  * * SQL Data Type: nvarchar(100)`),
12915
13096
  Entity: z.string().describe(`
12916
13097
  * * Field Name: Entity
12917
- * * Display Name: Entity
13098
+ * * Display Name: Entity Name
12918
13099
  * * SQL Data Type: nvarchar(255)`),
12919
13100
  VectorDatabase: z.string().describe(`
12920
13101
  * * Field Name: VectorDatabase
12921
- * * Display Name: Vector Database
13102
+ * * Display Name: Vector Database Name
12922
13103
  * * SQL Data Type: nvarchar(100)`),
12923
13104
  Template: z.string().describe(`
12924
13105
  * * Field Name: Template
12925
- * * Display Name: Template
13106
+ * * Display Name: Template Name
12926
13107
  * * SQL Data Type: nvarchar(255)`),
12927
13108
  AIModel: z.string().describe(`
12928
13109
  * * Field Name: AIModel
12929
- * * Display Name: AIModel
13110
+ * * Display Name: AI Model Name
12930
13111
  * * SQL Data Type: nvarchar(50)`),
13112
+ VectorIndex: z.string().nullable().describe(`
13113
+ * * Field Name: VectorIndex
13114
+ * * Display Name: Vector Index Name
13115
+ * * SQL Data Type: nvarchar(255)`),
12931
13116
  });
12932
13117
  /**
12933
13118
  * zod schema definition for the entity MJ: Entity Field Values
@@ -13344,6 +13529,22 @@ export const MJEntityFieldSchema = z.object({
13344
13529
  * * Display Name: Related Entity Join Fields
13345
13530
  * * SQL Data Type: nvarchar(MAX)
13346
13531
  * * Description: JSON configuration for additional fields to join from the related entity into this entity's base view. Supports modes: extend (add to NameField), override (replace NameField), disable (no joins). Schema: { mode?: string, fields?: [{ field: string, alias?: string }] }`),
13532
+ JSONType: z.string().nullable().describe(`
13533
+ * * Field Name: JSONType
13534
+ * * Display Name: JSON Type
13535
+ * * SQL Data Type: nvarchar(255)
13536
+ * * Description: The name of the TypeScript interface/type for this JSON field. When set, CodeGen emits a strongly-typed Object-suffixed accessor using this type instead of only the default string getter/setter.`),
13537
+ JSONTypeIsArray: z.boolean().describe(`
13538
+ * * Field Name: JSONTypeIsArray
13539
+ * * Display Name: JSON Type Is Array
13540
+ * * SQL Data Type: bit
13541
+ * * Default Value: 0
13542
+ * * Description: If true, the field holds a JSON array of JSONType items. The Object accessor returns Array<JSONType> | null and the setter accepts Array<JSONType> | null.`),
13543
+ JSONTypeDefinition: z.string().nullable().describe(`
13544
+ * * Field Name: JSONTypeDefinition
13545
+ * * Display Name: JSON Type Definition
13546
+ * * SQL Data Type: nvarchar(MAX)
13547
+ * * Description: Raw TypeScript code emitted by CodeGen above the entity class definition. Typically contains the interface/type definition referenced by JSONType. Can include imports, multiple types, or any valid TypeScript.`),
13347
13548
  FieldCodeName: z.string().nullable().describe(`
13348
13549
  * * Field Name: FieldCodeName
13349
13550
  * * Display Name: Field Code Name
@@ -22032,6 +22233,11 @@ export const MJVectorDatabaseSchema = z.object({
22032
22233
  * * Display Name: Updated At
22033
22234
  * * SQL Data Type: datetimeoffset
22034
22235
  * * Default Value: getutcdate()`),
22236
+ Configuration: z.string().nullable().describe(`
22237
+ * * Field Name: Configuration
22238
+ * * Display Name: Configuration
22239
+ * * SQL Data Type: nvarchar(MAX)
22240
+ * * Description: JSON configuration settings for this vector database provider. Stores provider-specific connection settings like custom host URLs, authentication configuration, timeouts, retry policies, and batch size limits. NULL means use defaults from environment variables or provider defaults.`),
22035
22241
  });
22036
22242
  /**
22037
22243
  * zod schema definition for the entity MJ: Vector Indexes
@@ -22052,12 +22258,12 @@ export const MJVectorIndexSchema = z.object({
22052
22258
  * * SQL Data Type: nvarchar(MAX)`),
22053
22259
  VectorDatabaseID: z.string().describe(`
22054
22260
  * * Field Name: VectorDatabaseID
22055
- * * Display Name: Vector Database ID
22261
+ * * Display Name: Vector Database
22056
22262
  * * SQL Data Type: uniqueidentifier
22057
22263
  * * Related Entity/Foreign Key: MJ: Vector Databases (vwVectorDatabases.ID)`),
22058
22264
  EmbeddingModelID: z.string().describe(`
22059
22265
  * * Field Name: EmbeddingModelID
22060
- * * Display Name: Embedding Model ID
22266
+ * * Display Name: Embedding Model
22061
22267
  * * SQL Data Type: uniqueidentifier
22062
22268
  * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)`),
22063
22269
  __mj_CreatedAt: z.date().describe(`
@@ -22070,13 +22276,33 @@ export const MJVectorIndexSchema = z.object({
22070
22276
  * * Display Name: Updated At
22071
22277
  * * SQL Data Type: datetimeoffset
22072
22278
  * * Default Value: getutcdate()`),
22279
+ ExternalID: z.string().nullable().describe(`
22280
+ * * Field Name: ExternalID
22281
+ * * Display Name: External ID
22282
+ * * SQL Data Type: nvarchar(500)
22283
+ * * Description: The provider's native identifier for this index. For Pinecone this is the index name; for other providers it may be a separate UUID or identifier. Used for syncing operations between MJ metadata and the remote vector database.`),
22284
+ Dimensions: z.number().nullable().describe(`
22285
+ * * Field Name: Dimensions
22286
+ * * Display Name: Dimensions
22287
+ * * SQL Data Type: int
22288
+ * * Description: The number of dimensions for vectors stored in this index. Determined by the embedding model (e.g., 1536 for text-embedding-3-small, 768 for all-mpnet-base-v2). Set automatically when the index is created via the vector database provider.`),
22289
+ Metric: z.string().nullable().describe(`
22290
+ * * Field Name: Metric
22291
+ * * Display Name: Distance Metric
22292
+ * * SQL Data Type: nvarchar(50)
22293
+ * * Description: The distance metric used for similarity calculations in this index. Common values: cosine (default, measures angular similarity), euclidean (L2 distance), dotproduct (inner product). Must match what the vector database provider was configured with.`),
22294
+ ProviderConfig: z.string().nullable().describe(`
22295
+ * * Field Name: ProviderConfig
22296
+ * * Display Name: Provider Configuration
22297
+ * * SQL Data Type: nvarchar(MAX)
22298
+ * * Description: JSON object containing provider-specific configuration for this index. For Pinecone serverless: {"cloud":"aws","region":"us-east-1"}. For pod-based: {"environment":"us-east1-gcp","podType":"p1.x1","replicas":1}. Stored as a flexible JSON bag to support any provider without schema changes.`),
22073
22299
  VectorDatabase: z.string().describe(`
22074
22300
  * * Field Name: VectorDatabase
22075
- * * Display Name: Vector Database
22301
+ * * Display Name: Vector Database Name
22076
22302
  * * SQL Data Type: nvarchar(100)`),
22077
22303
  EmbeddingModel: z.string().describe(`
22078
22304
  * * Field Name: EmbeddingModel
22079
- * * Display Name: Embedding Model
22305
+ * * Display Name: Embedding Model Name
22080
22306
  * * SQL Data Type: nvarchar(50)`),
22081
22307
  });
22082
22308
  /**
@@ -25244,6 +25470,134 @@ MJAIAgentCategoryEntity = __decorate([
25244
25470
  RegisterClass(BaseEntity, 'MJ: AI Agent Categories')
25245
25471
  ], MJAIAgentCategoryEntity);
25246
25472
  export { MJAIAgentCategoryEntity };
25473
+ /**
25474
+ * MJ: AI Agent Client Tools - strongly typed entity sub-class
25475
+ * * Schema: __mj
25476
+ * * Base Table: AIAgentClientTool
25477
+ * * Base View: vwAIAgentClientTools
25478
+ * * Primary Key: ID
25479
+ * @extends {BaseEntity}
25480
+ * @class
25481
+ * @public
25482
+ */
25483
+ let MJAIAgentClientToolEntity = class MJAIAgentClientToolEntity extends BaseEntity {
25484
+ /**
25485
+ * Loads the MJ: AI Agent Client Tools record from the database
25486
+ * @param ID: string - primary key value to load the MJ: AI Agent Client Tools record.
25487
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
25488
+ * @returns {Promise<boolean>} - true if successful, false otherwise
25489
+ * @public
25490
+ * @async
25491
+ * @memberof MJAIAgentClientToolEntity
25492
+ * @method
25493
+ * @override
25494
+ */
25495
+ async Load(ID, EntityRelationshipsToLoad) {
25496
+ const compositeKey = new CompositeKey();
25497
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
25498
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
25499
+ }
25500
+ /**
25501
+ * * Field Name: ID
25502
+ * * Display Name: ID
25503
+ * * SQL Data Type: uniqueidentifier
25504
+ * * Default Value: newsequentialid()
25505
+ */
25506
+ get ID() {
25507
+ return this.Get('ID');
25508
+ }
25509
+ set ID(value) {
25510
+ this.Set('ID', value);
25511
+ }
25512
+ /**
25513
+ * * Field Name: AgentID
25514
+ * * Display Name: Agent
25515
+ * * SQL Data Type: uniqueidentifier
25516
+ * * Related Entity/Foreign Key: MJ: AI Agents (vwAIAgents.ID)
25517
+ */
25518
+ get AgentID() {
25519
+ return this.Get('AgentID');
25520
+ }
25521
+ set AgentID(value) {
25522
+ this.Set('AgentID', value);
25523
+ }
25524
+ /**
25525
+ * * Field Name: ClientToolDefinitionID
25526
+ * * Display Name: Tool Definition
25527
+ * * SQL Data Type: uniqueidentifier
25528
+ * * Related Entity/Foreign Key: MJ: AI Client Tool Definitions (vwAIClientToolDefinitions.ID)
25529
+ */
25530
+ get ClientToolDefinitionID() {
25531
+ return this.Get('ClientToolDefinitionID');
25532
+ }
25533
+ set ClientToolDefinitionID(value) {
25534
+ this.Set('ClientToolDefinitionID', value);
25535
+ }
25536
+ /**
25537
+ * * Field Name: IsRequired
25538
+ * * Display Name: Is Required
25539
+ * * SQL Data Type: bit
25540
+ * * Default Value: 0
25541
+ * * Description: When true, the agent expects this tool to always be available on the client. If the client has not registered a handler, agent execution may warn or fail depending on configuration.
25542
+ */
25543
+ get IsRequired() {
25544
+ return this.Get('IsRequired');
25545
+ }
25546
+ set IsRequired(value) {
25547
+ this.Set('IsRequired', value);
25548
+ }
25549
+ /**
25550
+ * * Field Name: Priority
25551
+ * * Display Name: Priority
25552
+ * * SQL Data Type: int
25553
+ * * Default Value: 0
25554
+ * * Description: Sort order for tool listing in prompts. Lower numbers appear first. Tools with the same priority are listed alphabetically.
25555
+ */
25556
+ get Priority() {
25557
+ return this.Get('Priority');
25558
+ }
25559
+ set Priority(value) {
25560
+ this.Set('Priority', value);
25561
+ }
25562
+ /**
25563
+ * * Field Name: __mj_CreatedAt
25564
+ * * Display Name: Created At
25565
+ * * SQL Data Type: datetimeoffset
25566
+ * * Default Value: getutcdate()
25567
+ */
25568
+ get __mj_CreatedAt() {
25569
+ return this.Get('__mj_CreatedAt');
25570
+ }
25571
+ /**
25572
+ * * Field Name: __mj_UpdatedAt
25573
+ * * Display Name: Updated At
25574
+ * * SQL Data Type: datetimeoffset
25575
+ * * Default Value: getutcdate()
25576
+ */
25577
+ get __mj_UpdatedAt() {
25578
+ return this.Get('__mj_UpdatedAt');
25579
+ }
25580
+ /**
25581
+ * * Field Name: Agent
25582
+ * * Display Name: Agent Name
25583
+ * * SQL Data Type: nvarchar(255)
25584
+ */
25585
+ get Agent() {
25586
+ return this.Get('Agent');
25587
+ }
25588
+ /**
25589
+ * * Field Name: ClientToolDefinition
25590
+ * * Display Name: Tool Name
25591
+ * * SQL Data Type: nvarchar(200)
25592
+ */
25593
+ get ClientToolDefinition() {
25594
+ return this.Get('ClientToolDefinition');
25595
+ }
25596
+ };
25597
+ MJAIAgentClientToolEntity = __decorate([
25598
+ RegisterClass(BaseEntity, 'MJ: AI Agent Client Tools')
25599
+ ], MJAIAgentClientToolEntity);
25600
+ export { MJAIAgentClientToolEntity };
25247
25601
  /**
25248
25602
  * MJ: AI Agent Configurations - strongly typed entity sub-class
25249
25603
  * * Schema: __mj
@@ -30987,7 +31341,7 @@ let MJAIAgentEntity = class MJAIAgentEntity extends BaseEntity {
30987
31341
  }
30988
31342
  /**
30989
31343
  * * Field Name: ContextCompressionPromptID
30990
- * * Display Name: Context Compression Prompt
31344
+ * * Display Name: Compression Prompt
30991
31345
  * * SQL Data Type: uniqueidentifier
30992
31346
  * * Related Entity/Foreign Key: MJ: AI Prompts (vwAIPrompts.ID)
30993
31347
  */
@@ -31338,7 +31692,7 @@ if this limit is exceeded.
31338
31692
  }
31339
31693
  /**
31340
31694
  * * Field Name: OwnerUserID
31341
- * * Display Name: Owner
31695
+ * * Display Name: Owner User
31342
31696
  * * SQL Data Type: uniqueidentifier
31343
31697
  * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
31344
31698
  * * Default Value: ECAFCCEC-6A37-EF11-86D4-000D3A4E707E
@@ -31569,7 +31923,7 @@ if this limit is exceeded.
31569
31923
  }
31570
31924
  /**
31571
31925
  * * Field Name: InlineStorageThresholdBytes
31572
- * * Display Name: Inline Storage Threshold (Bytes)
31926
+ * * Display Name: Inline Storage Threshold Bytes
31573
31927
  * * SQL Data Type: int
31574
31928
  * * Description: File size threshold for inline storage. Files <= this size are stored as base64 inline, larger files use MJStorage. NULL uses system default (1MB). Set to 0 to always use MJStorage.
31575
31929
  */
@@ -31605,7 +31959,7 @@ if this limit is exceeded.
31605
31959
  }
31606
31960
  /**
31607
31961
  * * Field Name: NoteRetentionDays
31608
- * * Display Name: Note Retention (Days)
31962
+ * * Display Name: Note Retention Days
31609
31963
  * * SQL Data Type: int
31610
31964
  * * Default Value: 90
31611
31965
  * * Description: Number of days to retain notes before archiving due to inactivity. Default 90. NULL means use system default.
@@ -31618,7 +31972,7 @@ if this limit is exceeded.
31618
31972
  }
31619
31973
  /**
31620
31974
  * * Field Name: ExampleRetentionDays
31621
- * * Display Name: Example Retention (Days)
31975
+ * * Display Name: Example Retention Days
31622
31976
  * * SQL Data Type: int
31623
31977
  * * Default Value: 180
31624
31978
  * * Description: Number of days to retain examples before archiving due to inactivity. Default 180. NULL means use system default.
@@ -31668,6 +32022,19 @@ if this limit is exceeded.
31668
32022
  this.Set('CategoryID', value);
31669
32023
  }
31670
32024
  /**
32025
+ * * Field Name: AllowEphemeralClientTools
32026
+ * * Display Name: Allow Ephemeral Client Tools
32027
+ * * SQL Data Type: bit
32028
+ * * Default Value: 1
32029
+ * * Description: When true (default), this agent accepts runtime-registered ephemeral client tools that are not defined in metadata. Set to false for agents that require strict tool governance.
32030
+ */
32031
+ get AllowEphemeralClientTools() {
32032
+ return this.Get('AllowEphemeralClientTools');
32033
+ }
32034
+ set AllowEphemeralClientTools(value) {
32035
+ this.Set('AllowEphemeralClientTools', value);
32036
+ }
32037
+ /**
31671
32038
  * * Field Name: Parent
31672
32039
  * * Display Name: Parent Name
31673
32040
  * * SQL Data Type: nvarchar(255)
@@ -31701,7 +32068,7 @@ if this limit is exceeded.
31701
32068
  }
31702
32069
  /**
31703
32070
  * * Field Name: OwnerUser
31704
- * * Display Name: Owner Name
32071
+ * * Display Name: Owner User Name
31705
32072
  * * SQL Data Type: nvarchar(100)
31706
32073
  */
31707
32074
  get OwnerUser() {
@@ -31900,6 +32267,153 @@ MJAIArchitectureEntity = __decorate([
31900
32267
  RegisterClass(BaseEntity, 'MJ: AI Architectures')
31901
32268
  ], MJAIArchitectureEntity);
31902
32269
  export { MJAIArchitectureEntity };
32270
+ /**
32271
+ * MJ: AI Client Tool Definitions - strongly typed entity sub-class
32272
+ * * Schema: __mj
32273
+ * * Base Table: AIClientToolDefinition
32274
+ * * Base View: vwAIClientToolDefinitions
32275
+ * * Primary Key: ID
32276
+ * @extends {BaseEntity}
32277
+ * @class
32278
+ * @public
32279
+ */
32280
+ let MJAIClientToolDefinitionEntity = class MJAIClientToolDefinitionEntity extends BaseEntity {
32281
+ /**
32282
+ * Loads the MJ: AI Client Tool Definitions record from the database
32283
+ * @param ID: string - primary key value to load the MJ: AI Client Tool Definitions record.
32284
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
32285
+ * @returns {Promise<boolean>} - true if successful, false otherwise
32286
+ * @public
32287
+ * @async
32288
+ * @memberof MJAIClientToolDefinitionEntity
32289
+ * @method
32290
+ * @override
32291
+ */
32292
+ async Load(ID, EntityRelationshipsToLoad) {
32293
+ const compositeKey = new CompositeKey();
32294
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
32295
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
32296
+ }
32297
+ /**
32298
+ * * Field Name: ID
32299
+ * * Display Name: ID
32300
+ * * SQL Data Type: uniqueidentifier
32301
+ * * Default Value: newsequentialid()
32302
+ */
32303
+ get ID() {
32304
+ return this.Get('ID');
32305
+ }
32306
+ set ID(value) {
32307
+ this.Set('ID', value);
32308
+ }
32309
+ /**
32310
+ * * Field Name: Name
32311
+ * * Display Name: Tool Name
32312
+ * * SQL Data Type: nvarchar(200)
32313
+ * * Description: Unique identifier for the client tool (e.g., NavigateToApp, NavigateToRecord). Used to match tool invocations from the LLM to registered handlers on the client.
32314
+ */
32315
+ get Name() {
32316
+ return this.Get('Name');
32317
+ }
32318
+ set Name(value) {
32319
+ this.Set('Name', value);
32320
+ }
32321
+ /**
32322
+ * * Field Name: Description
32323
+ * * Display Name: Description
32324
+ * * SQL Data Type: nvarchar(MAX)
32325
+ * * Description: Human-readable description of what the tool does. This text is injected into the LLM system prompt so it knows when and how to use the tool.
32326
+ */
32327
+ get Description() {
32328
+ return this.Get('Description');
32329
+ }
32330
+ set Description(value) {
32331
+ this.Set('Description', value);
32332
+ }
32333
+ /**
32334
+ * * Field Name: Category
32335
+ * * Display Name: Category
32336
+ * * SQL Data Type: nvarchar(50)
32337
+ * * Description: Tool category for grouping and filtering (e.g., navigation, form, display, data).
32338
+ */
32339
+ get Category() {
32340
+ return this.Get('Category');
32341
+ }
32342
+ set Category(value) {
32343
+ this.Set('Category', value);
32344
+ }
32345
+ /**
32346
+ * * Field Name: InputSchemaJSON
32347
+ * * Display Name: Input Schema
32348
+ * * SQL Data Type: nvarchar(MAX)
32349
+ * * Description: JSON Schema defining the input parameters the tool accepts. Included in the LLM prompt so it generates valid parameter objects.
32350
+ */
32351
+ get InputSchemaJSON() {
32352
+ return this.Get('InputSchemaJSON');
32353
+ }
32354
+ set InputSchemaJSON(value) {
32355
+ this.Set('InputSchemaJSON', value);
32356
+ }
32357
+ /**
32358
+ * * Field Name: OutputSchemaJSON
32359
+ * * Display Name: Output Schema
32360
+ * * SQL Data Type: nvarchar(MAX)
32361
+ * * Description: JSON Schema describing the return value from the tool. Optional — used for documentation and LLM context.
32362
+ */
32363
+ get OutputSchemaJSON() {
32364
+ return this.Get('OutputSchemaJSON');
32365
+ }
32366
+ set OutputSchemaJSON(value) {
32367
+ this.Set('OutputSchemaJSON', value);
32368
+ }
32369
+ /**
32370
+ * * Field Name: DefaultTimeoutMs
32371
+ * * Display Name: Default Timeout (ms)
32372
+ * * SQL Data Type: int
32373
+ * * Default Value: 30000
32374
+ * * Description: Default timeout in milliseconds for this tool. Can be overridden per-invocation by the LLM or per-run by execution params. Default is 30000ms (30 seconds).
32375
+ */
32376
+ get DefaultTimeoutMs() {
32377
+ return this.Get('DefaultTimeoutMs');
32378
+ }
32379
+ set DefaultTimeoutMs(value) {
32380
+ this.Set('DefaultTimeoutMs', value);
32381
+ }
32382
+ /**
32383
+ * * Field Name: RequiresContextType
32384
+ * * Display Name: Required Context Type
32385
+ * * SQL Data Type: nvarchar(100)
32386
+ * * Description: When set, the client only sends this tool to the server when the user is in the specified context (e.g., entity-form, dashboard, search). Null means the tool is always available.
32387
+ */
32388
+ get RequiresContextType() {
32389
+ return this.Get('RequiresContextType');
32390
+ }
32391
+ set RequiresContextType(value) {
32392
+ this.Set('RequiresContextType', value);
32393
+ }
32394
+ /**
32395
+ * * Field Name: __mj_CreatedAt
32396
+ * * Display Name: Created At
32397
+ * * SQL Data Type: datetimeoffset
32398
+ * * Default Value: getutcdate()
32399
+ */
32400
+ get __mj_CreatedAt() {
32401
+ return this.Get('__mj_CreatedAt');
32402
+ }
32403
+ /**
32404
+ * * Field Name: __mj_UpdatedAt
32405
+ * * Display Name: Updated At
32406
+ * * SQL Data Type: datetimeoffset
32407
+ * * Default Value: getutcdate()
32408
+ */
32409
+ get __mj_UpdatedAt() {
32410
+ return this.Get('__mj_UpdatedAt');
32411
+ }
32412
+ };
32413
+ MJAIClientToolDefinitionEntity = __decorate([
32414
+ RegisterClass(BaseEntity, 'MJ: AI Client Tool Definitions')
32415
+ ], MJAIClientToolDefinitionEntity);
32416
+ export { MJAIClientToolDefinitionEntity };
31903
32417
  /**
31904
32418
  * MJ: AI Configuration Params - strongly typed entity sub-class
31905
32419
  * * Schema: __mj
@@ -39707,6 +40221,11 @@ export { MJApplicationSettingEntity };
39707
40221
  * @public
39708
40222
  */
39709
40223
  let MJApplicationEntity = class MJApplicationEntity extends BaseEntity {
40224
+ constructor() {
40225
+ super(...arguments);
40226
+ this._DefaultNavItemsObject_cached = undefined;
40227
+ this._DefaultNavItemsObject_lastRaw = null;
40228
+ }
39710
40229
  /**
39711
40230
  * Loads the MJ: Applications record from the database
39712
40231
  * @param ID: string - primary key value to load the MJ: Applications record.
@@ -39828,6 +40347,7 @@ let MJApplicationEntity = class MJApplicationEntity extends BaseEntity {
39828
40347
  * * Field Name: DefaultNavItems
39829
40348
  * * Display Name: Default Nav Items
39830
40349
  * * SQL Data Type: nvarchar(MAX)
40350
+ * * JSON Type: Array<MJApplicationEntity_IDefaultNavItem>
39831
40351
  * * Description: JSON array of default navigation items for this application. Parsed by BaseApplication.GetNavItems()
39832
40352
  */
39833
40353
  get DefaultNavItems() {
@@ -39837,6 +40357,24 @@ let MJApplicationEntity = class MJApplicationEntity extends BaseEntity {
39837
40357
  this.Set('DefaultNavItems', value);
39838
40358
  }
39839
40359
  /**
40360
+ * Typed accessor for DefaultNavItems — returns parsed JSON as Array<MJApplicationEntity_IDefaultNavItem>.
40361
+ * Uses lazy parsing with cache invalidation when the underlying raw value changes.
40362
+ */
40363
+ get DefaultNavItemsObject() {
40364
+ const raw = this.Get('DefaultNavItems');
40365
+ if (raw !== this._DefaultNavItemsObject_lastRaw) {
40366
+ this._DefaultNavItemsObject_cached = raw ? JSON.parse(raw) : null;
40367
+ this._DefaultNavItemsObject_lastRaw = raw;
40368
+ }
40369
+ return this._DefaultNavItemsObject_cached;
40370
+ }
40371
+ set DefaultNavItemsObject(value) {
40372
+ const raw = value ? JSON.stringify(value) : null;
40373
+ this.Set('DefaultNavItems', raw);
40374
+ this._DefaultNavItemsObject_cached = value;
40375
+ this._DefaultNavItemsObject_lastRaw = raw;
40376
+ }
40377
+ /**
39840
40378
  * * Field Name: ClassName
39841
40379
  * * Display Name: Class Name
39842
40380
  * * SQL Data Type: nvarchar(255)
@@ -45989,6 +46527,19 @@ let MJContentItemTagEntity = class MJContentItemTagEntity extends BaseEntity {
45989
46527
  return this.Get('__mj_UpdatedAt');
45990
46528
  }
45991
46529
  /**
46530
+ * * Field Name: Weight
46531
+ * * Display Name: Weight
46532
+ * * SQL Data Type: numeric(5, 4)
46533
+ * * Default Value: 1.0
46534
+ * * Description: Relevance weight for this tag (0.0-1.0). 1.0 = highly relevant central topic, 0.5 = moderately relevant, 0.1 = tangentially related. Assigned by the LLM during autotagging.
46535
+ */
46536
+ get Weight() {
46537
+ return this.Get('Weight');
46538
+ }
46539
+ set Weight(value) {
46540
+ this.Set('Weight', value);
46541
+ }
46542
+ /**
45992
46543
  * * Field Name: Item
45993
46544
  * * Display Name: Item
45994
46545
  * * SQL Data Type: nvarchar(250)
@@ -46698,7 +47249,7 @@ let MJContentSourceEntity = class MJContentSourceEntity extends BaseEntity {
46698
47249
  }
46699
47250
  /**
46700
47251
  * * Field Name: ContentTypeID
46701
- * * Display Name: Content Type ID
47252
+ * * Display Name: Content Type
46702
47253
  * * SQL Data Type: uniqueidentifier
46703
47254
  * * Related Entity/Foreign Key: MJ: Content Types (vwContentTypes.ID)
46704
47255
  */
@@ -46710,7 +47261,7 @@ let MJContentSourceEntity = class MJContentSourceEntity extends BaseEntity {
46710
47261
  }
46711
47262
  /**
46712
47263
  * * Field Name: ContentSourceTypeID
46713
- * * Display Name: Content Source Type ID
47264
+ * * Display Name: Content Source Type
46714
47265
  * * SQL Data Type: uniqueidentifier
46715
47266
  * * Related Entity/Foreign Key: MJ: Content Source Types (vwContentSourceTypes.ID)
46716
47267
  */
@@ -46722,7 +47273,7 @@ let MJContentSourceEntity = class MJContentSourceEntity extends BaseEntity {
46722
47273
  }
46723
47274
  /**
46724
47275
  * * Field Name: ContentFileTypeID
46725
- * * Display Name: Content File Type ID
47276
+ * * Display Name: Content File Type
46726
47277
  * * SQL Data Type: uniqueidentifier
46727
47278
  * * Related Entity/Foreign Key: MJ: Content File Types (vwContentFileTypes.ID)
46728
47279
  */
@@ -46763,6 +47314,32 @@ let MJContentSourceEntity = class MJContentSourceEntity extends BaseEntity {
46763
47314
  return this.Get('__mj_UpdatedAt');
46764
47315
  }
46765
47316
  /**
47317
+ * * Field Name: EmbeddingModelID
47318
+ * * Display Name: Embedding Model
47319
+ * * SQL Data Type: uniqueidentifier
47320
+ * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
47321
+ * * Description: Per-source override for the AI embedding model. When NULL, falls back to the ContentType default.
47322
+ */
47323
+ get EmbeddingModelID() {
47324
+ return this.Get('EmbeddingModelID');
47325
+ }
47326
+ set EmbeddingModelID(value) {
47327
+ this.Set('EmbeddingModelID', value);
47328
+ }
47329
+ /**
47330
+ * * Field Name: VectorIndexID
47331
+ * * Display Name: Vector Index
47332
+ * * SQL Data Type: uniqueidentifier
47333
+ * * Related Entity/Foreign Key: MJ: Vector Indexes (vwVectorIndexes.ID)
47334
+ * * Description: Per-source override for the vector index. When NULL, falls back to the ContentType default.
47335
+ */
47336
+ get VectorIndexID() {
47337
+ return this.Get('VectorIndexID');
47338
+ }
47339
+ set VectorIndexID(value) {
47340
+ this.Set('VectorIndexID', value);
47341
+ }
47342
+ /**
46766
47343
  * * Field Name: ContentType
46767
47344
  * * Display Name: Content Type
46768
47345
  * * SQL Data Type: nvarchar(255)
@@ -46786,6 +47363,22 @@ let MJContentSourceEntity = class MJContentSourceEntity extends BaseEntity {
46786
47363
  get ContentFileType() {
46787
47364
  return this.Get('ContentFileType');
46788
47365
  }
47366
+ /**
47367
+ * * Field Name: EmbeddingModel
47368
+ * * Display Name: Embedding Model
47369
+ * * SQL Data Type: nvarchar(50)
47370
+ */
47371
+ get EmbeddingModel() {
47372
+ return this.Get('EmbeddingModel');
47373
+ }
47374
+ /**
47375
+ * * Field Name: VectorIndex
47376
+ * * Display Name: Vector Index
47377
+ * * SQL Data Type: nvarchar(255)
47378
+ */
47379
+ get VectorIndex() {
47380
+ return this.Get('VectorIndex');
47381
+ }
46789
47382
  };
46790
47383
  MJContentSourceEntity = __decorate([
46791
47384
  RegisterClass(BaseEntity, 'MJ: Content Sources')
@@ -46964,7 +47557,7 @@ let MJContentTypeEntity = class MJContentTypeEntity extends BaseEntity {
46964
47557
  }
46965
47558
  /**
46966
47559
  * * Field Name: AIModelID
46967
- * * Display Name: AIModel ID
47560
+ * * Display Name: AI Model
46968
47561
  * * SQL Data Type: uniqueidentifier
46969
47562
  * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
46970
47563
  */
@@ -46976,7 +47569,7 @@ let MJContentTypeEntity = class MJContentTypeEntity extends BaseEntity {
46976
47569
  }
46977
47570
  /**
46978
47571
  * * Field Name: MinTags
46979
- * * Display Name: Min Tags
47572
+ * * Display Name: Minimum Tags
46980
47573
  * * SQL Data Type: int
46981
47574
  * * Description: Minimum number of tags that must be applied to content of this type.
46982
47575
  */
@@ -46988,7 +47581,7 @@ let MJContentTypeEntity = class MJContentTypeEntity extends BaseEntity {
46988
47581
  }
46989
47582
  /**
46990
47583
  * * Field Name: MaxTags
46991
- * * Display Name: Max Tags
47584
+ * * Display Name: Maximum Tags
46992
47585
  * * SQL Data Type: int
46993
47586
  * * Description: Maximum number of tags allowed on content of this type.
46994
47587
  */
@@ -47017,13 +47610,55 @@ let MJContentTypeEntity = class MJContentTypeEntity extends BaseEntity {
47017
47610
  return this.Get('__mj_UpdatedAt');
47018
47611
  }
47019
47612
  /**
47613
+ * * Field Name: EmbeddingModelID
47614
+ * * Display Name: Embedding Model
47615
+ * * SQL Data Type: uniqueidentifier
47616
+ * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
47617
+ * * Description: Default AI embedding model for vectorizing content items of this type. Sources can override per-source. If NULL, uses the first available embedding model.
47618
+ */
47619
+ get EmbeddingModelID() {
47620
+ return this.Get('EmbeddingModelID');
47621
+ }
47622
+ set EmbeddingModelID(value) {
47623
+ this.Set('EmbeddingModelID', value);
47624
+ }
47625
+ /**
47626
+ * * Field Name: VectorIndexID
47627
+ * * Display Name: Vector Index
47628
+ * * SQL Data Type: uniqueidentifier
47629
+ * * Related Entity/Foreign Key: MJ: Vector Indexes (vwVectorIndexes.ID)
47630
+ * * Description: Default vector index for storing embeddings of this content type. Sources can override per-source. If NULL, uses the first available vector index.
47631
+ */
47632
+ get VectorIndexID() {
47633
+ return this.Get('VectorIndexID');
47634
+ }
47635
+ set VectorIndexID(value) {
47636
+ this.Set('VectorIndexID', value);
47637
+ }
47638
+ /**
47020
47639
  * * Field Name: AIModel
47021
- * * Display Name: AIModel
47640
+ * * Display Name: AI Model Name
47022
47641
  * * SQL Data Type: nvarchar(50)
47023
47642
  */
47024
47643
  get AIModel() {
47025
47644
  return this.Get('AIModel');
47026
47645
  }
47646
+ /**
47647
+ * * Field Name: EmbeddingModel
47648
+ * * Display Name: Embedding Model Name
47649
+ * * SQL Data Type: nvarchar(50)
47650
+ */
47651
+ get EmbeddingModel() {
47652
+ return this.Get('EmbeddingModel');
47653
+ }
47654
+ /**
47655
+ * * Field Name: VectorIndex
47656
+ * * Display Name: Vector Index Name
47657
+ * * SQL Data Type: nvarchar(255)
47658
+ */
47659
+ get VectorIndex() {
47660
+ return this.Get('VectorIndex');
47661
+ }
47027
47662
  };
47028
47663
  MJContentTypeEntity = __decorate([
47029
47664
  RegisterClass(BaseEntity, 'MJ: Content Types')
@@ -51375,7 +52010,7 @@ let MJDuplicateRunDetailMatchEntity = class MJDuplicateRunDetailMatchEntity exte
51375
52010
  }
51376
52011
  /**
51377
52012
  * * Field Name: DuplicateRunDetailID
51378
- * * Display Name: Duplicate Run Detail
52013
+ * * Display Name: Duplicate Run Detail ID
51379
52014
  * * SQL Data Type: uniqueidentifier
51380
52015
  * * Related Entity/Foreign Key: MJ: Duplicate Run Details (vwDuplicateRunDetails.ID)
51381
52016
  */
@@ -51404,7 +52039,7 @@ let MJDuplicateRunDetailMatchEntity = class MJDuplicateRunDetailMatchEntity exte
51404
52039
  }
51405
52040
  /**
51406
52041
  * * Field Name: MatchRecordID
51407
- * * Display Name: Match Record
52042
+ * * Display Name: Match Record ID
51408
52043
  * * SQL Data Type: nvarchar(500)
51409
52044
  * * Description: The ID of the record identified as a potential duplicate match.
51410
52045
  */
@@ -51473,7 +52108,7 @@ let MJDuplicateRunDetailMatchEntity = class MJDuplicateRunDetailMatchEntity exte
51473
52108
  }
51474
52109
  /**
51475
52110
  * * Field Name: RecordMergeLogID
51476
- * * Display Name: Record Merge Log
52111
+ * * Display Name: Record Merge Log ID
51477
52112
  * * SQL Data Type: uniqueidentifier
51478
52113
  * * Related Entity/Foreign Key: MJ: Record Merge Logs (vwRecordMergeLogs.ID)
51479
52114
  */
@@ -51533,6 +52168,18 @@ let MJDuplicateRunDetailMatchEntity = class MJDuplicateRunDetailMatchEntity exte
51533
52168
  return this.Get('__mj_UpdatedAt');
51534
52169
  }
51535
52170
  /**
52171
+ * * Field Name: RecordMetadata
52172
+ * * Display Name: Record Metadata
52173
+ * * SQL Data Type: nvarchar(MAX)
52174
+ * * Description: JSON metadata snapshot of the matched record from the vector database at detection time. Contains display fields (Name, Description, EntityIcon, etc.) for rich UI rendering without additional lookups.
52175
+ */
52176
+ get RecordMetadata() {
52177
+ return this.Get('RecordMetadata');
52178
+ }
52179
+ set RecordMetadata(value) {
52180
+ this.Set('RecordMetadata', value);
52181
+ }
52182
+ /**
51536
52183
  * * Field Name: DuplicateRunDetail
51537
52184
  * * Display Name: Duplicate Run Detail
51538
52185
  * * SQL Data Type: nvarchar(500)
@@ -51595,7 +52242,7 @@ let MJDuplicateRunDetailEntity = class MJDuplicateRunDetailEntity extends BaseEn
51595
52242
  }
51596
52243
  /**
51597
52244
  * * Field Name: DuplicateRunID
51598
- * * Display Name: Duplicate Run ID
52245
+ * * Display Name: Duplicate Run
51599
52246
  * * SQL Data Type: uniqueidentifier
51600
52247
  * * Related Entity/Foreign Key: MJ: Duplicate Runs (vwDuplicateRuns.ID)
51601
52248
  */
@@ -51607,7 +52254,7 @@ let MJDuplicateRunDetailEntity = class MJDuplicateRunDetailEntity extends BaseEn
51607
52254
  }
51608
52255
  /**
51609
52256
  * * Field Name: RecordID
51610
- * * Display Name: Record ID
52257
+ * * Display Name: Source Record
51611
52258
  * * SQL Data Type: nvarchar(500)
51612
52259
  * * Description: The ID of the record being analyzed for duplicates.
51613
52260
  */
@@ -51710,8 +52357,20 @@ let MJDuplicateRunDetailEntity = class MJDuplicateRunDetailEntity extends BaseEn
51710
52357
  return this.Get('__mj_UpdatedAt');
51711
52358
  }
51712
52359
  /**
52360
+ * * Field Name: RecordMetadata
52361
+ * * Display Name: Record Metadata
52362
+ * * SQL Data Type: nvarchar(MAX)
52363
+ * * Description: JSON metadata snapshot of the source record from the vector database at detection time. Contains display fields (Name, Description, EntityIcon, etc.) for rich UI rendering without additional lookups.
52364
+ */
52365
+ get RecordMetadata() {
52366
+ return this.Get('RecordMetadata');
52367
+ }
52368
+ set RecordMetadata(value) {
52369
+ this.Set('RecordMetadata', value);
52370
+ }
52371
+ /**
51713
52372
  * * Field Name: DuplicateRun
51714
- * * Display Name: Duplicate Run
52373
+ * * Display Name: Run Name
51715
52374
  * * SQL Data Type: nvarchar(255)
51716
52375
  */
51717
52376
  get DuplicateRun() {
@@ -51791,6 +52450,7 @@ let MJDuplicateRunEntity = class MJDuplicateRunEntity extends BaseEntity {
51791
52450
  * * Display Name: Source List
51792
52451
  * * SQL Data Type: uniqueidentifier
51793
52452
  * * Related Entity/Foreign Key: MJ: Lists (vwLists.ID)
52453
+ * * Description: Optional List ID to narrow the scope of duplicate detection. When NULL, all records in the entity are scanned. When set, only records in the specified list are checked for duplicates.
51794
52454
  */
51795
52455
  get SourceListID() {
51796
52456
  return this.Get('SourceListID');
@@ -55362,7 +56022,7 @@ let MJEntityDocumentEntity = class MJEntityDocumentEntity extends BaseEntity {
55362
56022
  }
55363
56023
  /**
55364
56024
  * * Field Name: TypeID
55365
- * * Display Name: Type ID
56025
+ * * Display Name: Type
55366
56026
  * * SQL Data Type: uniqueidentifier
55367
56027
  * * Related Entity/Foreign Key: MJ: Entity Document Types (vwEntityDocumentTypes.ID)
55368
56028
  */
@@ -55374,7 +56034,7 @@ let MJEntityDocumentEntity = class MJEntityDocumentEntity extends BaseEntity {
55374
56034
  }
55375
56035
  /**
55376
56036
  * * Field Name: EntityID
55377
- * * Display Name: Entity ID
56037
+ * * Display Name: Entity
55378
56038
  * * SQL Data Type: uniqueidentifier
55379
56039
  * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
55380
56040
  */
@@ -55386,7 +56046,7 @@ let MJEntityDocumentEntity = class MJEntityDocumentEntity extends BaseEntity {
55386
56046
  }
55387
56047
  /**
55388
56048
  * * Field Name: VectorDatabaseID
55389
- * * Display Name: Vector Database ID
56049
+ * * Display Name: Vector Database
55390
56050
  * * SQL Data Type: uniqueidentifier
55391
56051
  * * Related Entity/Foreign Key: MJ: Vector Databases (vwVectorDatabases.ID)
55392
56052
  */
@@ -55414,7 +56074,7 @@ let MJEntityDocumentEntity = class MJEntityDocumentEntity extends BaseEntity {
55414
56074
  }
55415
56075
  /**
55416
56076
  * * Field Name: TemplateID
55417
- * * Display Name: Template ID
56077
+ * * Display Name: Template
55418
56078
  * * SQL Data Type: uniqueidentifier
55419
56079
  * * Related Entity/Foreign Key: MJ: Templates (vwTemplates.ID)
55420
56080
  */
@@ -55426,7 +56086,7 @@ let MJEntityDocumentEntity = class MJEntityDocumentEntity extends BaseEntity {
55426
56086
  }
55427
56087
  /**
55428
56088
  * * Field Name: AIModelID
55429
- * * Display Name: AIModel ID
56089
+ * * Display Name: AI Model
55430
56090
  * * SQL Data Type: uniqueidentifier
55431
56091
  * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
55432
56092
  */
@@ -55440,7 +56100,7 @@ let MJEntityDocumentEntity = class MJEntityDocumentEntity extends BaseEntity {
55440
56100
  * * Field Name: PotentialMatchThreshold
55441
56101
  * * Display Name: Potential Match Threshold
55442
56102
  * * SQL Data Type: numeric(12, 11)
55443
- * * Default Value: 1
56103
+ * * Default Value: 0.7
55444
56104
  * * Description: Value between 0 and 1 that determines what is considered a potential matching record. Value must be <= AbsoluteMatchThreshold. This is primarily used for duplicate detection but can be used for other applications as well where matching is relevant.
55445
56105
  */
55446
56106
  get PotentialMatchThreshold() {
@@ -55453,7 +56113,7 @@ let MJEntityDocumentEntity = class MJEntityDocumentEntity extends BaseEntity {
55453
56113
  * * Field Name: AbsoluteMatchThreshold
55454
56114
  * * Display Name: Absolute Match Threshold
55455
56115
  * * SQL Data Type: numeric(12, 11)
55456
- * * Default Value: 1
56116
+ * * Default Value: 0.95
55457
56117
  * * Description: Value between 0 and 1 that determines what is considered an absolute matching record. Value must be >= PotentialMatchThreshold. This is primarily used for duplicate detection but can be used for other applications as well where matching is relevant.
55458
56118
  */
55459
56119
  get AbsoluteMatchThreshold() {
@@ -55464,7 +56124,7 @@ let MJEntityDocumentEntity = class MJEntityDocumentEntity extends BaseEntity {
55464
56124
  }
55465
56125
  /**
55466
56126
  * * Field Name: __mj_CreatedAt
55467
- * * Display Name: __mj _Created At
56127
+ * * Display Name: Created At
55468
56128
  * * SQL Data Type: datetimeoffset
55469
56129
  * * Default Value: getutcdate()
55470
56130
  */
@@ -55473,7 +56133,7 @@ let MJEntityDocumentEntity = class MJEntityDocumentEntity extends BaseEntity {
55473
56133
  }
55474
56134
  /**
55475
56135
  * * Field Name: __mj_UpdatedAt
55476
- * * Display Name: __mj _Updated At
56136
+ * * Display Name: Updated At
55477
56137
  * * SQL Data Type: datetimeoffset
55478
56138
  * * Default Value: getutcdate()
55479
56139
  */
@@ -55481,8 +56141,33 @@ let MJEntityDocumentEntity = class MJEntityDocumentEntity extends BaseEntity {
55481
56141
  return this.Get('__mj_UpdatedAt');
55482
56142
  }
55483
56143
  /**
56144
+ * * Field Name: VectorIndexID
56145
+ * * Display Name: Vector Index
56146
+ * * SQL Data Type: uniqueidentifier
56147
+ * * Related Entity/Foreign Key: MJ: Vector Indexes (vwVectorIndexes.ID)
56148
+ * * Description: Optional foreign key to the specific Vector Index where this entity document's embeddings should be stored. When specified, the vectorization pipeline will upsert vectors directly to this index rather than auto-creating or looking up an index based on VectorDatabaseID + AIModelID. This enables explicit control over which Pinecone/Weaviate/etc. index is used per entity document, supporting multi-index architectures and shared indexes across entity types.
56149
+ */
56150
+ get VectorIndexID() {
56151
+ return this.Get('VectorIndexID');
56152
+ }
56153
+ set VectorIndexID(value) {
56154
+ this.Set('VectorIndexID', value);
56155
+ }
56156
+ /**
56157
+ * * Field Name: Configuration
56158
+ * * Display Name: Configuration
56159
+ * * SQL Data Type: nvarchar(MAX)
56160
+ * * Description: JSON configuration settings for this entity document. Controls vector metadata field inclusion (which fields get stored in the vector index for search result display), large field truncation limits, and future settings like sync scheduling and threshold overrides. NULL means use system defaults.
56161
+ */
56162
+ get Configuration() {
56163
+ return this.Get('Configuration');
56164
+ }
56165
+ set Configuration(value) {
56166
+ this.Set('Configuration', value);
56167
+ }
56168
+ /**
55484
56169
  * * Field Name: Type
55485
- * * Display Name: Type
56170
+ * * Display Name: Type Name
55486
56171
  * * SQL Data Type: nvarchar(100)
55487
56172
  */
55488
56173
  get Type() {
@@ -55490,7 +56175,7 @@ let MJEntityDocumentEntity = class MJEntityDocumentEntity extends BaseEntity {
55490
56175
  }
55491
56176
  /**
55492
56177
  * * Field Name: Entity
55493
- * * Display Name: Entity
56178
+ * * Display Name: Entity Name
55494
56179
  * * SQL Data Type: nvarchar(255)
55495
56180
  */
55496
56181
  get Entity() {
@@ -55498,7 +56183,7 @@ let MJEntityDocumentEntity = class MJEntityDocumentEntity extends BaseEntity {
55498
56183
  }
55499
56184
  /**
55500
56185
  * * Field Name: VectorDatabase
55501
- * * Display Name: Vector Database
56186
+ * * Display Name: Vector Database Name
55502
56187
  * * SQL Data Type: nvarchar(100)
55503
56188
  */
55504
56189
  get VectorDatabase() {
@@ -55506,7 +56191,7 @@ let MJEntityDocumentEntity = class MJEntityDocumentEntity extends BaseEntity {
55506
56191
  }
55507
56192
  /**
55508
56193
  * * Field Name: Template
55509
- * * Display Name: Template
56194
+ * * Display Name: Template Name
55510
56195
  * * SQL Data Type: nvarchar(255)
55511
56196
  */
55512
56197
  get Template() {
@@ -55514,12 +56199,20 @@ let MJEntityDocumentEntity = class MJEntityDocumentEntity extends BaseEntity {
55514
56199
  }
55515
56200
  /**
55516
56201
  * * Field Name: AIModel
55517
- * * Display Name: AIModel
56202
+ * * Display Name: AI Model Name
55518
56203
  * * SQL Data Type: nvarchar(50)
55519
56204
  */
55520
56205
  get AIModel() {
55521
56206
  return this.Get('AIModel');
55522
56207
  }
56208
+ /**
56209
+ * * Field Name: VectorIndex
56210
+ * * Display Name: Vector Index Name
56211
+ * * SQL Data Type: nvarchar(255)
56212
+ */
56213
+ get VectorIndex() {
56214
+ return this.Get('VectorIndex');
56215
+ }
55523
56216
  };
55524
56217
  MJEntityDocumentEntity = __decorate([
55525
56218
  RegisterClass(BaseEntity, 'MJ: Entity Documents')
@@ -56408,6 +57101,43 @@ let MJEntityFieldEntity = class MJEntityFieldEntity extends BaseEntity {
56408
57101
  this.Set('RelatedEntityJoinFields', value);
56409
57102
  }
56410
57103
  /**
57104
+ * * Field Name: JSONType
57105
+ * * Display Name: JSON Type
57106
+ * * SQL Data Type: nvarchar(255)
57107
+ * * Description: The name of the TypeScript interface/type for this JSON field. When set, CodeGen emits a strongly-typed Object-suffixed accessor using this type instead of only the default string getter/setter.
57108
+ */
57109
+ get JSONType() {
57110
+ return this.Get('JSONType');
57111
+ }
57112
+ set JSONType(value) {
57113
+ this.Set('JSONType', value);
57114
+ }
57115
+ /**
57116
+ * * Field Name: JSONTypeIsArray
57117
+ * * Display Name: JSON Type Is Array
57118
+ * * SQL Data Type: bit
57119
+ * * Default Value: 0
57120
+ * * Description: If true, the field holds a JSON array of JSONType items. The Object accessor returns Array<JSONType> | null and the setter accepts Array<JSONType> | null.
57121
+ */
57122
+ get JSONTypeIsArray() {
57123
+ return this.Get('JSONTypeIsArray');
57124
+ }
57125
+ set JSONTypeIsArray(value) {
57126
+ this.Set('JSONTypeIsArray', value);
57127
+ }
57128
+ /**
57129
+ * * Field Name: JSONTypeDefinition
57130
+ * * Display Name: JSON Type Definition
57131
+ * * SQL Data Type: nvarchar(MAX)
57132
+ * * Description: Raw TypeScript code emitted by CodeGen above the entity class definition. Typically contains the interface/type definition referenced by JSONType. Can include imports, multiple types, or any valid TypeScript.
57133
+ */
57134
+ get JSONTypeDefinition() {
57135
+ return this.Get('JSONTypeDefinition');
57136
+ }
57137
+ set JSONTypeDefinition(value) {
57138
+ this.Set('JSONTypeDefinition', value);
57139
+ }
57140
+ /**
56411
57141
  * * Field Name: FieldCodeName
56412
57142
  * * Display Name: Field Code Name
56413
57143
  * * SQL Data Type: nvarchar(MAX)
@@ -78483,6 +79213,18 @@ let MJVectorDatabaseEntity = class MJVectorDatabaseEntity extends BaseEntity {
78483
79213
  get __mj_UpdatedAt() {
78484
79214
  return this.Get('__mj_UpdatedAt');
78485
79215
  }
79216
+ /**
79217
+ * * Field Name: Configuration
79218
+ * * Display Name: Configuration
79219
+ * * SQL Data Type: nvarchar(MAX)
79220
+ * * Description: JSON configuration settings for this vector database provider. Stores provider-specific connection settings like custom host URLs, authentication configuration, timeouts, retry policies, and batch size limits. NULL means use defaults from environment variables or provider defaults.
79221
+ */
79222
+ get Configuration() {
79223
+ return this.Get('Configuration');
79224
+ }
79225
+ set Configuration(value) {
79226
+ this.Set('Configuration', value);
79227
+ }
78486
79228
  };
78487
79229
  MJVectorDatabaseEntity = __decorate([
78488
79230
  RegisterClass(BaseEntity, 'MJ: Vector Databases')
@@ -78552,7 +79294,7 @@ let MJVectorIndexEntity = class MJVectorIndexEntity extends BaseEntity {
78552
79294
  }
78553
79295
  /**
78554
79296
  * * Field Name: VectorDatabaseID
78555
- * * Display Name: Vector Database ID
79297
+ * * Display Name: Vector Database
78556
79298
  * * SQL Data Type: uniqueidentifier
78557
79299
  * * Related Entity/Foreign Key: MJ: Vector Databases (vwVectorDatabases.ID)
78558
79300
  */
@@ -78564,7 +79306,7 @@ let MJVectorIndexEntity = class MJVectorIndexEntity extends BaseEntity {
78564
79306
  }
78565
79307
  /**
78566
79308
  * * Field Name: EmbeddingModelID
78567
- * * Display Name: Embedding Model ID
79309
+ * * Display Name: Embedding Model
78568
79310
  * * SQL Data Type: uniqueidentifier
78569
79311
  * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
78570
79312
  */
@@ -78593,8 +79335,56 @@ let MJVectorIndexEntity = class MJVectorIndexEntity extends BaseEntity {
78593
79335
  return this.Get('__mj_UpdatedAt');
78594
79336
  }
78595
79337
  /**
79338
+ * * Field Name: ExternalID
79339
+ * * Display Name: External ID
79340
+ * * SQL Data Type: nvarchar(500)
79341
+ * * Description: The provider's native identifier for this index. For Pinecone this is the index name; for other providers it may be a separate UUID or identifier. Used for syncing operations between MJ metadata and the remote vector database.
79342
+ */
79343
+ get ExternalID() {
79344
+ return this.Get('ExternalID');
79345
+ }
79346
+ set ExternalID(value) {
79347
+ this.Set('ExternalID', value);
79348
+ }
79349
+ /**
79350
+ * * Field Name: Dimensions
79351
+ * * Display Name: Dimensions
79352
+ * * SQL Data Type: int
79353
+ * * Description: The number of dimensions for vectors stored in this index. Determined by the embedding model (e.g., 1536 for text-embedding-3-small, 768 for all-mpnet-base-v2). Set automatically when the index is created via the vector database provider.
79354
+ */
79355
+ get Dimensions() {
79356
+ return this.Get('Dimensions');
79357
+ }
79358
+ set Dimensions(value) {
79359
+ this.Set('Dimensions', value);
79360
+ }
79361
+ /**
79362
+ * * Field Name: Metric
79363
+ * * Display Name: Distance Metric
79364
+ * * SQL Data Type: nvarchar(50)
79365
+ * * Description: The distance metric used for similarity calculations in this index. Common values: cosine (default, measures angular similarity), euclidean (L2 distance), dotproduct (inner product). Must match what the vector database provider was configured with.
79366
+ */
79367
+ get Metric() {
79368
+ return this.Get('Metric');
79369
+ }
79370
+ set Metric(value) {
79371
+ this.Set('Metric', value);
79372
+ }
79373
+ /**
79374
+ * * Field Name: ProviderConfig
79375
+ * * Display Name: Provider Configuration
79376
+ * * SQL Data Type: nvarchar(MAX)
79377
+ * * Description: JSON object containing provider-specific configuration for this index. For Pinecone serverless: {"cloud":"aws","region":"us-east-1"}. For pod-based: {"environment":"us-east1-gcp","podType":"p1.x1","replicas":1}. Stored as a flexible JSON bag to support any provider without schema changes.
79378
+ */
79379
+ get ProviderConfig() {
79380
+ return this.Get('ProviderConfig');
79381
+ }
79382
+ set ProviderConfig(value) {
79383
+ this.Set('ProviderConfig', value);
79384
+ }
79385
+ /**
78596
79386
  * * Field Name: VectorDatabase
78597
- * * Display Name: Vector Database
79387
+ * * Display Name: Vector Database Name
78598
79388
  * * SQL Data Type: nvarchar(100)
78599
79389
  */
78600
79390
  get VectorDatabase() {
@@ -78602,7 +79392,7 @@ let MJVectorIndexEntity = class MJVectorIndexEntity extends BaseEntity {
78602
79392
  }
78603
79393
  /**
78604
79394
  * * Field Name: EmbeddingModel
78605
- * * Display Name: Embedding Model
79395
+ * * Display Name: Embedding Model Name
78606
79396
  * * SQL Data Type: nvarchar(50)
78607
79397
  */
78608
79398
  get EmbeddingModel() {