@memberjunction/core-entities 5.38.0 → 5.39.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.
@@ -2658,7 +2658,7 @@ detailed information about what validation rules failed.`),
2658
2658
  export const MJAIAgentRunSchema = z.object({
2659
2659
  ID: z.string().describe(`
2660
2660
  * * Field Name: ID
2661
- * * Display Name: ID
2661
+ * * Display Name: Run ID
2662
2662
  * * SQL Data Type: uniqueidentifier
2663
2663
  * * Default Value: newsequentialid()
2664
2664
  * * Description: Unique identifier for this agent run`),
@@ -2733,7 +2733,7 @@ export const MJAIAgentRunSchema = z.object({
2733
2733
  * * Description: JSON serialization of the complete agent state, including conversation context, variables, and execution state. Enables pause/resume functionality.`),
2734
2734
  TotalTokensUsed: z.number().nullable().describe(`
2735
2735
  * * Field Name: TotalTokensUsed
2736
- * * Display Name: Total Tokens Used
2736
+ * * Display Name: Total Tokens
2737
2737
  * * SQL Data Type: int
2738
2738
  * * Default Value: 0
2739
2739
  * * Description: Total number of tokens consumed by all LLM calls during this agent run`),
@@ -2755,27 +2755,27 @@ export const MJAIAgentRunSchema = z.object({
2755
2755
  * * Default Value: getutcdate()`),
2756
2756
  TotalPromptTokensUsed: z.number().nullable().describe(`
2757
2757
  * * Field Name: TotalPromptTokensUsed
2758
- * * Display Name: Total Prompt Tokens Used
2758
+ * * Display Name: Prompt Tokens
2759
2759
  * * SQL Data Type: int
2760
2760
  * * Description: Total number of prompt/input tokens used across all AIPromptRun executions during this agent run. This provides a breakdown of the TotalTokensUsed field to help analyze the ratio of input vs output tokens consumed by the agent.`),
2761
2761
  TotalCompletionTokensUsed: z.number().nullable().describe(`
2762
2762
  * * Field Name: TotalCompletionTokensUsed
2763
- * * Display Name: Total Completion Tokens Used
2763
+ * * Display Name: Completion Tokens
2764
2764
  * * SQL Data Type: int
2765
2765
  * * Description: Total number of completion/output tokens generated across all AIPromptRun executions during this agent run. This provides a breakdown of the TotalTokensUsed field to help analyze the ratio of input vs output tokens consumed by the agent.`),
2766
2766
  TotalTokensUsedRollup: z.number().nullable().describe(`
2767
2767
  * * Field Name: TotalTokensUsedRollup
2768
- * * Display Name: Total Tokens Used (Rollup)
2768
+ * * Display Name: Total Tokens (Rollup)
2769
2769
  * * SQL Data Type: int
2770
2770
  * * Description: Total tokens used including this agent run and all sub-agent runs. For leaf agents (no sub-agents), this equals TotalTokensUsed. For parent agents, this includes the sum of all descendant agent tokens. Calculated as TotalPromptTokensUsedRollup + TotalCompletionTokensUsedRollup.`),
2771
2771
  TotalPromptTokensUsedRollup: z.number().nullable().describe(`
2772
2772
  * * Field Name: TotalPromptTokensUsedRollup
2773
- * * Display Name: Total Prompt Tokens Used (Rollup)
2773
+ * * Display Name: Prompt Tokens (Rollup)
2774
2774
  * * SQL Data Type: int
2775
2775
  * * Description: Total prompt/input tokens including this agent run and all sub-agent runs. For leaf agents (no sub-agents), this equals TotalPromptTokensUsed. For parent agents, this includes the sum of all descendant agent prompt tokens.`),
2776
2776
  TotalCompletionTokensUsedRollup: z.number().nullable().describe(`
2777
2777
  * * Field Name: TotalCompletionTokensUsedRollup
2778
- * * Display Name: Total Completion Tokens Used (Rollup)
2778
+ * * Display Name: Completion Tokens (Rollup)
2779
2779
  * * SQL Data Type: int
2780
2780
  * * Description: Total completion/output tokens including this agent run and all sub-agent runs. For leaf agents (no sub-agents), this equals TotalCompletionTokensUsed. For parent agents, this includes the sum of all descendant agent completion tokens.`),
2781
2781
  TotalCostRollup: z.number().nullable().describe(`
@@ -2791,7 +2791,7 @@ export const MJAIAgentRunSchema = z.object({
2791
2791
  * * Description: Optional tracking of a specific conversation detail (e.g. a specific message) that spawned this agent run`),
2792
2792
  ConversationDetailSequence: z.number().nullable().describe(`
2793
2793
  * * Field Name: ConversationDetailSequence
2794
- * * Display Name: Conversation Detail Sequence
2794
+ * * Display Name: Sequence
2795
2795
  * * SQL Data Type: int
2796
2796
  * * Description: If a conversation detail spawned multiple agent runs, tracks the order of their spawn/execution`),
2797
2797
  CancellationReason: z.union([z.literal('System'), z.literal('Timeout'), z.literal('User Request')]).nullable().describe(`
@@ -2826,7 +2826,7 @@ export const MJAIAgentRunSchema = z.object({
2826
2826
  * * Description: JSON serialization of the final Payload state at the end of the agent run`),
2827
2827
  Message: z.string().nullable().describe(`
2828
2828
  * * Field Name: Message
2829
- * * Display Name: Message
2829
+ * * Display Name: Final Message
2830
2830
  * * SQL Data Type: nvarchar(MAX)
2831
2831
  * * Description: Final message from the agent to the end user at the end of a run`),
2832
2832
  LastRunID: z.string().nullable().describe(`
@@ -2867,7 +2867,7 @@ each time the agent processes a prompt step.`),
2867
2867
  * * Description: Runtime vendor override that was used for this execution. When set along with OverrideModelID, this vendor was used to provide the model.`),
2868
2868
  Data: z.string().nullable().describe(`
2869
2869
  * * Field Name: Data
2870
- * * Display Name: Data
2870
+ * * Display Name: Execution Data
2871
2871
  * * SQL Data Type: nvarchar(MAX)
2872
2872
  * * Description: JSON serialized data that was passed for template rendering and prompt execution. This data was passed to the agent's prompt as well as all sub-agents.`),
2873
2873
  Verbose: z.boolean().nullable().describe(`
@@ -2921,61 +2921,71 @@ each time the agent processes a prompt step.`),
2921
2921
  * * Description: JSON object containing additional scope dimensions beyond the primary scope. Example: {"ContactID":"abc-123","TeamID":"team-456"}`),
2922
2922
  ExternalReferenceID: z.string().nullable().describe(`
2923
2923
  * * Field Name: ExternalReferenceID
2924
- * * Display Name: External Reference ID
2924
+ * * Display Name: External Reference
2925
2925
  * * SQL Data Type: nvarchar(200)
2926
2926
  * * Description: Optional reference ID from an external system that initiated this agent run. Enables correlation between the caller's agent run and this execution. For example, when Skip SaaS is called via SkipProxyAgent, this stores the MJ-side Agent Run ID.`),
2927
2927
  CompanyID: z.string().nullable().describe(`
2928
2928
  * * Field Name: CompanyID
2929
- * * Display Name: Company ID
2929
+ * * Display Name: Company
2930
2930
  * * SQL Data Type: uniqueidentifier
2931
2931
  * * Description: Optional company scope for multi-tenant memory. When populated, Memory Manager uses this to scope extracted notes to the company. Flows from ExecuteAgentParams.companyId at agent invocation time.`),
2932
+ TotalCacheReadTokensUsed: z.number().nullable().describe(`
2933
+ * * Field Name: TotalCacheReadTokensUsed
2934
+ * * Display Name: Cache Read Tokens
2935
+ * * SQL Data Type: int
2936
+ * * Description: Total input tokens served from the AI provider's prompt cache (cache reads / hits) across this agent run, summed from child prompt runs' TokensCacheReadRollup and sub-agent runs' TotalCacheReadTokensUsed. Counts only; the cost impact (cache reads are billed at a steep discount) is reflected in TotalCost. The cache counterpart of TotalPromptTokensUsed.`),
2937
+ TotalCacheWriteTokensUsed: z.number().nullable().describe(`
2938
+ * * Field Name: TotalCacheWriteTokensUsed
2939
+ * * Display Name: Cache Write Tokens
2940
+ * * SQL Data Type: int
2941
+ * * Description: Total input tokens written to the AI provider's prompt cache (cache writes / creation) across this agent run, summed from child prompt runs' TokensCacheWriteRollup and sub-agent runs' TotalCacheWriteTokensUsed. Populated for providers that bill cache creation (e.g. Anthropic); 0 or NULL otherwise. The cache counterpart of TotalCompletionTokensUsed.`),
2932
2942
  Agent: z.string().nullable().describe(`
2933
2943
  * * Field Name: Agent
2934
- * * Display Name: Agent Name
2944
+ * * Display Name: Agent Details
2935
2945
  * * SQL Data Type: nvarchar(255)`),
2936
2946
  ParentRun: z.string().nullable().describe(`
2937
2947
  * * Field Name: ParentRun
2938
- * * Display Name: Parent Run Name
2948
+ * * Display Name: Parent Run Details
2939
2949
  * * SQL Data Type: nvarchar(255)`),
2940
2950
  Conversation: z.string().nullable().describe(`
2941
2951
  * * Field Name: Conversation
2942
- * * Display Name: Conversation Name
2952
+ * * Display Name: Conversation Details
2943
2953
  * * SQL Data Type: nvarchar(255)`),
2944
2954
  User: z.string().nullable().describe(`
2945
2955
  * * Field Name: User
2946
- * * Display Name: User Name
2956
+ * * Display Name: User Details
2947
2957
  * * SQL Data Type: nvarchar(100)`),
2948
2958
  ConversationDetail: z.string().nullable().describe(`
2949
2959
  * * Field Name: ConversationDetail
2950
- * * Display Name: Conversation Detail Name
2960
+ * * Display Name: Conversation Detail Details
2951
2961
  * * SQL Data Type: nvarchar(MAX)`),
2952
2962
  LastRun: z.string().nullable().describe(`
2953
2963
  * * Field Name: LastRun
2954
- * * Display Name: Last Run Name
2964
+ * * Display Name: Last Run Details
2955
2965
  * * SQL Data Type: nvarchar(255)`),
2956
2966
  Configuration: z.string().nullable().describe(`
2957
2967
  * * Field Name: Configuration
2958
- * * Display Name: Configuration Name
2968
+ * * Display Name: Configuration Details
2959
2969
  * * SQL Data Type: nvarchar(100)`),
2960
2970
  OverrideModel: z.string().nullable().describe(`
2961
2971
  * * Field Name: OverrideModel
2962
- * * Display Name: Override Model Name
2972
+ * * Display Name: Override Model Details
2963
2973
  * * SQL Data Type: nvarchar(50)`),
2964
2974
  OverrideVendor: z.string().nullable().describe(`
2965
2975
  * * Field Name: OverrideVendor
2966
- * * Display Name: Override Vendor Name
2976
+ * * Display Name: Override Vendor Details
2967
2977
  * * SQL Data Type: nvarchar(50)`),
2968
2978
  ScheduledJobRun: z.string().nullable().describe(`
2969
2979
  * * Field Name: ScheduledJobRun
2970
- * * Display Name: Scheduled Job Run Name
2980
+ * * Display Name: Scheduled Job Details
2971
2981
  * * SQL Data Type: nvarchar(200)`),
2972
2982
  TestRun: z.string().nullable().describe(`
2973
2983
  * * Field Name: TestRun
2974
- * * Display Name: Test Run Name
2984
+ * * Display Name: Test Run Details
2975
2985
  * * SQL Data Type: nvarchar(255)`),
2976
2986
  PrimaryScopeEntity: z.string().nullable().describe(`
2977
2987
  * * Field Name: PrimaryScopeEntity
2978
- * * Display Name: Primary Scope Entity Name
2988
+ * * Display Name: Primary Scope Entity Details
2979
2989
  * * SQL Data Type: nvarchar(255)`),
2980
2990
  RootParentRunID: z.string().nullable().describe(`
2981
2991
  * * Field Name: RootParentRunID
@@ -4411,12 +4421,12 @@ export const MJAIModelCostSchema = z.object({
4411
4421
  * * Default Value: newsequentialid()`),
4412
4422
  ModelID: z.string().describe(`
4413
4423
  * * Field Name: ModelID
4414
- * * Display Name: Model ID
4424
+ * * Display Name: Model
4415
4425
  * * SQL Data Type: uniqueidentifier
4416
4426
  * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)`),
4417
4427
  VendorID: z.string().describe(`
4418
4428
  * * Field Name: VendorID
4419
- * * Display Name: Vendor ID
4429
+ * * Display Name: Vendor
4420
4430
  * * SQL Data Type: uniqueidentifier
4421
4431
  * * Related Entity/Foreign Key: MJ: AI Vendors (vwAIVendors.ID)`),
4422
4432
  StartedAt: z.date().nullable().describe(`
@@ -4448,7 +4458,7 @@ export const MJAIModelCostSchema = z.object({
4448
4458
  * * Description: ISO 4217 three-letter currency code (e.g., USD, EUR, GBP) in uppercase`),
4449
4459
  PriceTypeID: z.string().describe(`
4450
4460
  * * Field Name: PriceTypeID
4451
- * * Display Name: Price Type ID
4461
+ * * Display Name: Price Type
4452
4462
  * * SQL Data Type: uniqueidentifier
4453
4463
  * * Related Entity/Foreign Key: MJ: AI Model Price Types (vwAIModelPriceTypes.ID)`),
4454
4464
  InputPricePerUnit: z.number().describe(`
@@ -4463,7 +4473,7 @@ export const MJAIModelCostSchema = z.object({
4463
4473
  * * Description: Price per unit for output tokens/responses. Must be non-negative. Often higher than input pricing`),
4464
4474
  UnitTypeID: z.string().describe(`
4465
4475
  * * Field Name: UnitTypeID
4466
- * * Display Name: Unit Type ID
4476
+ * * Display Name: Unit Type
4467
4477
  * * SQL Data Type: uniqueidentifier
4468
4478
  * * Related Entity/Foreign Key: MJ: AI Model Price Unit Types (vwAIModelPriceUnitTypes.ID)`),
4469
4479
  ProcessingType: z.union([z.literal('Batch'), z.literal('Realtime')]).describe(`
@@ -4490,21 +4500,31 @@ export const MJAIModelCostSchema = z.object({
4490
4500
  * * Display Name: Updated At
4491
4501
  * * SQL Data Type: datetimeoffset
4492
4502
  * * Default Value: getutcdate()`),
4503
+ CacheReadPricePerUnit: z.number().nullable().describe(`
4504
+ * * Field Name: CacheReadPricePerUnit
4505
+ * * Display Name: Cache Read Price Per Unit
4506
+ * * SQL Data Type: decimal(18, 8)
4507
+ * * Description: Optional price per unit for input tokens served from the AI provider's prompt cache (cache reads / hits), expressed in the same currency and UnitType (e.g. per 1M tokens) as InputPricePerUnit. When NULL, cache-read tokens are priced at InputPricePerUnit. Cache reads are usually far cheaper than uncached input (e.g. ~0.1x for Anthropic/Gemini, ~0.5x for OpenAI).`),
4508
+ CacheWritePricePerUnit: z.number().nullable().describe(`
4509
+ * * Field Name: CacheWritePricePerUnit
4510
+ * * Display Name: Cache Write Price Per Unit
4511
+ * * SQL Data Type: decimal(18, 8)
4512
+ * * Description: Optional price per unit for input tokens written to the AI provider's prompt cache (cache writes / creation), expressed in the same currency and UnitType as InputPricePerUnit. When NULL, cache-write tokens are priced at InputPricePerUnit. Populated for providers that bill cache creation separately (e.g. Anthropic, ~1.25x input); leave NULL for providers that do not (OpenAI, Gemini), which also report 0 cache-write tokens.`),
4493
4513
  Model: z.string().describe(`
4494
4514
  * * Field Name: Model
4495
- * * Display Name: Model
4515
+ * * Display Name: Model Name
4496
4516
  * * SQL Data Type: nvarchar(50)`),
4497
4517
  Vendor: z.string().describe(`
4498
4518
  * * Field Name: Vendor
4499
- * * Display Name: Vendor
4519
+ * * Display Name: Vendor Name
4500
4520
  * * SQL Data Type: nvarchar(50)`),
4501
4521
  PriceType: z.string().describe(`
4502
4522
  * * Field Name: PriceType
4503
- * * Display Name: Price Type
4523
+ * * Display Name: Price Type Name
4504
4524
  * * SQL Data Type: nvarchar(100)`),
4505
4525
  UnitType: z.string().describe(`
4506
4526
  * * Field Name: UnitType
4507
- * * Display Name: Unit Type
4527
+ * * Display Name: Unit Type Name
4508
4528
  * * SQL Data Type: nvarchar(100)`),
4509
4529
  });
4510
4530
  /**
@@ -5242,7 +5262,7 @@ export const MJAIPromptRunSchema = z.object({
5242
5262
  * * Description: Optional configuration used for this execution.`),
5243
5263
  RunAt: z.date().describe(`
5244
5264
  * * Field Name: RunAt
5245
- * * Display Name: Run At
5265
+ * * Display Name: Started At
5246
5266
  * * SQL Data Type: datetimeoffset
5247
5267
  * * Default Value: sysdatetimeoffset()
5248
5268
  * * Description: When the prompt run started, with timezone offset information.`),
@@ -5268,7 +5288,7 @@ export const MJAIPromptRunSchema = z.object({
5268
5288
  * * Description: The output result from the model.`),
5269
5289
  TokensUsed: z.number().nullable().describe(`
5270
5290
  * * Field Name: TokensUsed
5271
- * * Display Name: Total Tokens Used
5291
+ * * Display Name: Tokens Used
5272
5292
  * * SQL Data Type: int
5273
5293
  * * Description: Total number of tokens used (prompt + completion).`),
5274
5294
  TokensPrompt: z.number().nullable().describe(`
@@ -5343,12 +5363,12 @@ export const MJAIPromptRunSchema = z.object({
5343
5363
  * * Description: The cost of this specific prompt execution as reported by the AI provider. This does not include costs from child executions. The currency is specified in CostCurrency field.`),
5344
5364
  CostCurrency: z.string().nullable().describe(`
5345
5365
  * * Field Name: CostCurrency
5346
- * * Display Name: Cost Currency
5366
+ * * Display Name: Currency
5347
5367
  * * SQL Data Type: nvarchar(10)
5348
5368
  * * Description: ISO 4217 currency code for the Cost field (e.g., USD, EUR, GBP). Different AI providers may use different currencies.`),
5349
5369
  TokensUsedRollup: z.number().nullable().describe(`
5350
5370
  * * Field Name: TokensUsedRollup
5351
- * * Display Name: Total Tokens (Rollup)
5371
+ * * Display Name: Tokens Used (Rollup)
5352
5372
  * * SQL Data Type: int
5353
5373
  * * Description: Total tokens used including this execution and all child/grandchild executions. This provides a complete view of token usage for hierarchical prompt trees. Calculated as TokensPromptRollup + TokensCompletionRollup.`),
5354
5374
  TokensPromptRollup: z.number().nullable().describe(`
@@ -5408,12 +5428,12 @@ export const MJAIPromptRunSchema = z.object({
5408
5428
  * * Description: The response format requested for this run (e.g., 'JSON', 'Text', 'Markdown')`),
5409
5429
  LogProbs: z.boolean().nullable().describe(`
5410
5430
  * * Field Name: LogProbs
5411
- * * Display Name: Log Probabilities
5431
+ * * Display Name: Log Probs
5412
5432
  * * SQL Data Type: bit
5413
5433
  * * Description: Whether log probabilities were requested for this run`),
5414
5434
  TopLogProbs: z.number().nullable().describe(`
5415
5435
  * * Field Name: TopLogProbs
5416
- * * Display Name: Top Log Probabilities
5436
+ * * Display Name: Top Log Probs
5417
5437
  * * SQL Data Type: int
5418
5438
  * * Description: Number of top log probabilities requested per token (if LogProbs is true)`),
5419
5439
  DescendantCost: z.number().nullable().describe(`
@@ -5423,17 +5443,17 @@ export const MJAIPromptRunSchema = z.object({
5423
5443
  * * Description: The total cost of all descendant (child and grandchild) prompt runs, excluding this run's own cost. For leaf nodes (no children), this is 0. Updated when child costs change.`),
5424
5444
  ValidationAttemptCount: z.number().nullable().describe(`
5425
5445
  * * Field Name: ValidationAttemptCount
5426
- * * Display Name: Validation Attempt Count
5446
+ * * Display Name: Validation Attempts
5427
5447
  * * SQL Data Type: int
5428
5448
  * * Description: Total number of validation attempts made (including the initial attempt)`),
5429
5449
  SuccessfulValidationCount: z.number().nullable().describe(`
5430
5450
  * * Field Name: SuccessfulValidationCount
5431
- * * Display Name: Successful Validation Count
5451
+ * * Display Name: Successful Validations
5432
5452
  * * SQL Data Type: int
5433
5453
  * * Description: Number of validation attempts that passed validation`),
5434
5454
  FinalValidationPassed: z.boolean().nullable().describe(`
5435
5455
  * * Field Name: FinalValidationPassed
5436
- * * Display Name: Final Validation Passed
5456
+ * * Display Name: Validation Passed
5437
5457
  * * SQL Data Type: bit
5438
5458
  * * Description: Whether validation ultimately passed (1) or failed (0)`),
5439
5459
  ValidationBehavior: z.string().nullable().describe(`
@@ -5448,7 +5468,7 @@ export const MJAIPromptRunSchema = z.object({
5448
5468
  * * Description: Retry strategy used: Fixed, Linear, or Exponential`),
5449
5469
  MaxRetriesConfigured: z.number().nullable().describe(`
5450
5470
  * * Field Name: MaxRetriesConfigured
5451
- * * Display Name: Max Retries Configured
5471
+ * * Display Name: Max Retries
5452
5472
  * * SQL Data Type: int
5453
5473
  * * Description: Maximum number of retries configured on the prompt`),
5454
5474
  FinalValidationError: z.string().nullable().describe(`
@@ -5483,7 +5503,7 @@ export const MJAIPromptRunSchema = z.object({
5483
5503
  * * Description: Total time spent on retries in milliseconds (excluding first attempt)`),
5484
5504
  ValidationAttempts: z.string().nullable().describe(`
5485
5505
  * * Field Name: ValidationAttempts
5486
- * * Display Name: Validation Attempts
5506
+ * * Display Name: Validation Attempt Logs
5487
5507
  * * SQL Data Type: nvarchar(MAX)
5488
5508
  * * Description: JSON array containing detailed information about each validation attempt`),
5489
5509
  ValidationSummary: z.string().nullable().describe(`
@@ -5509,13 +5529,13 @@ export const MJAIPromptRunSchema = z.object({
5509
5529
  * * Description: JSON array of duration in milliseconds for each failover attempt`),
5510
5530
  OriginalModelID: z.string().nullable().describe(`
5511
5531
  * * Field Name: OriginalModelID
5512
- * * Display Name: Original Model
5532
+ * * Display Name: Original Model ID
5513
5533
  * * SQL Data Type: uniqueidentifier
5514
5534
  * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
5515
5535
  * * Description: The AI Model ID that was originally attempted before any failovers`),
5516
5536
  OriginalRequestStartTime: z.date().nullable().describe(`
5517
5537
  * * Field Name: OriginalRequestStartTime
5518
- * * Display Name: Original Request Start Time
5538
+ * * Display Name: Original Request Start
5519
5539
  * * SQL Data Type: datetimeoffset
5520
5540
  * * Description: Timestamp when the original request started, before any failovers`),
5521
5541
  TotalFailoverDuration: z.number().nullable().describe(`
@@ -5531,7 +5551,7 @@ export const MJAIPromptRunSchema = z.object({
5531
5551
  * * Description: If this run was initiated as a re-run of another prompt run, this field links back to the original run ID`),
5532
5552
  ModelSelection: z.string().nullable().describe(`
5533
5553
  * * Field Name: ModelSelection
5534
- * * Display Name: Model Selection
5554
+ * * Display Name: Model Selection Details
5535
5555
  * * SQL Data Type: nvarchar(MAX)
5536
5556
  * * Description: JSON object containing detailed model selection information including all models considered, their scores, and the selection rationale`),
5537
5557
  Status: z.union([z.literal('Cancelled'), z.literal('Completed'), z.literal('Failed'), z.literal('Pending'), z.literal('Running')]).describe(`
@@ -5586,7 +5606,7 @@ export const MJAIPromptRunSchema = z.object({
5586
5606
  * * Description: Unique key used for caching this prompt result, typically a hash of the prompt and parameters`),
5587
5607
  JudgeID: z.string().nullable().describe(`
5588
5608
  * * Field Name: JudgeID
5589
- * * Display Name: Judge
5609
+ * * Display Name: Judge Prompt
5590
5610
  * * SQL Data Type: uniqueidentifier
5591
5611
  * * Related Entity/Foreign Key: MJ: AI Prompts (vwAIPrompts.ID)
5592
5612
  * * Description: ID of the AIPrompt used as a judge to evaluate and rank multiple parallel execution results`),
@@ -5640,7 +5660,7 @@ export const MJAIPromptRunSchema = z.object({
5640
5660
  * * Description: Time in milliseconds for the model to generate the completion/response tokens. Provider-specific timing metric.`),
5641
5661
  ModelSpecificResponseDetails: z.string().nullable().describe(`
5642
5662
  * * Field Name: ModelSpecificResponseDetails
5643
- * * Display Name: Model Specific Response Details
5663
+ * * Display Name: Provider Response Details
5644
5664
  * * SQL Data Type: nvarchar(MAX)
5645
5665
  * * Description: JSON field containing provider-specific response metadata and details not captured in standard fields. Structure varies by AI provider.`),
5646
5666
  EffortLevel: z.number().nullable().describe(`
@@ -5669,6 +5689,26 @@ export const MJAIPromptRunSchema = z.object({
5669
5689
  * * Display Name: Assistant Prefill
5670
5690
  * * SQL Data Type: nvarchar(MAX)
5671
5691
  * * Description: The assistant prefill text that was used during this prompt execution. Records whether native prefill or fallback was applied. NULL means no prefill was used.`),
5692
+ TokensCacheRead: z.number().nullable().describe(`
5693
+ * * Field Name: TokensCacheRead
5694
+ * * Display Name: Tokens Cache Read
5695
+ * * SQL Data Type: int
5696
+ * * Description: Number of input tokens served from the AI provider's prompt cache (a cache READ / hit) for this run, as reported by the provider. Counts only; no cost is derived here. NULL if the provider did not report cache reads or caching did not engage. Distinct from CacheHit/CacheKey, which track MemberJunction's own result cache.`),
5697
+ TokensCacheWrite: z.number().nullable().describe(`
5698
+ * * Field Name: TokensCacheWrite
5699
+ * * Display Name: Tokens Cache Write
5700
+ * * SQL Data Type: int
5701
+ * * Description: Number of input tokens written to the AI provider's prompt cache (a cache WRITE / creation) for this run, as reported by the provider. Populated for providers that report cache writes (e.g. Anthropic cache_creation_input_tokens); NULL or 0 for providers that do not bill/report writes (OpenAI, Gemini, Groq, Cerebras). Counts only; no cost is derived here.`),
5702
+ TokensCacheReadRollup: z.number().nullable().describe(`
5703
+ * * Field Name: TokensCacheReadRollup
5704
+ * * Display Name: Tokens Cache Read (Rollup)
5705
+ * * SQL Data Type: int
5706
+ * * Description: Rollup of TokensCacheRead across this prompt run and all of its descendant prompt runs (e.g. the individual attempts behind a parallel / multi-attempt / failover consolidation). For a leaf run this equals TokensCacheRead. Use this (not TokensCacheRead) when aggregating cache reads up a prompt-run or agent-run hierarchy so fan-out provider calls are not under-counted.`),
5707
+ TokensCacheWriteRollup: z.number().nullable().describe(`
5708
+ * * Field Name: TokensCacheWriteRollup
5709
+ * * Display Name: Tokens Cache Write (Rollup)
5710
+ * * SQL Data Type: int
5711
+ * * Description: Rollup of TokensCacheWrite across this prompt run and all of its descendant prompt runs. For a leaf run this equals TokensCacheWrite. Mirrors TokensUsedRollup/TokensPromptRollup; populated for providers that report cache writes (e.g. Anthropic), otherwise 0 or NULL.`),
5672
5712
  Prompt: z.string().describe(`
5673
5713
  * * Field Name: Prompt
5674
5714
  * * Display Name: Prompt
@@ -5703,7 +5743,7 @@ export const MJAIPromptRunSchema = z.object({
5703
5743
  * * SQL Data Type: nvarchar(50)`),
5704
5744
  RerunFromPromptRun: z.string().nullable().describe(`
5705
5745
  * * Field Name: RerunFromPromptRun
5706
- * * Display Name: Rerun From
5746
+ * * Display Name: Rerun From Run
5707
5747
  * * SQL Data Type: nvarchar(255)`),
5708
5748
  Judge: z.string().nullable().describe(`
5709
5749
  * * Field Name: Judge
@@ -5723,7 +5763,7 @@ export const MJAIPromptRunSchema = z.object({
5723
5763
  * * SQL Data Type: uniqueidentifier`),
5724
5764
  RootRerunFromPromptRunID: z.string().nullable().describe(`
5725
5765
  * * Field Name: RootRerunFromPromptRunID
5726
- * * Display Name: Root Rerun From
5766
+ * * Display Name: Root Rerun Source
5727
5767
  * * SQL Data Type: uniqueidentifier`),
5728
5768
  });
5729
5769
  /**
@@ -14633,7 +14673,7 @@ export const MJEntityFieldSchema = z.object({
14633
14673
  * * ListOrUserEntry
14634
14674
  * * None
14635
14675
  * * Description: Possible Values of None, List, ListOrUserEntry - the last option meaning that the list of possible values are options, but a user can enter anything else desired too.`),
14636
- ExtendedType: z.union([z.literal('Code'), z.literal('Email'), z.literal('FaceTime'), z.literal('Geo'), z.literal('GeoAddress'), z.literal('GeoCity'), z.literal('GeoCountry'), z.literal('GeoLatitude'), z.literal('GeoLongitude'), z.literal('GeoPostalCode'), z.literal('GeoStateProvince'), z.literal('MSTeams'), z.literal('Other'), z.literal('SIP'), z.literal('SMS'), z.literal('Skype'), z.literal('Tel'), z.literal('URL'), z.literal('WhatsApp'), z.literal('ZoomMtg')]).nullable().describe(`
14676
+ ExtendedType: z.union([z.literal('Code'), z.literal('Email'), z.literal('FaceTime'), z.literal('Geo'), z.literal('GeoAddress'), z.literal('GeoCity'), z.literal('GeoCountry'), z.literal('GeoLatitude'), z.literal('GeoLongitude'), z.literal('GeoPostalCode'), z.literal('GeoStateProvince'), z.literal('HTML'), z.literal('Icon'), z.literal('MSTeams'), z.literal('Markdown'), z.literal('Other'), z.literal('SIP'), z.literal('SMS'), z.literal('Skype'), z.literal('Tel'), z.literal('URL'), z.literal('WhatsApp'), z.literal('ZoomMtg')]).nullable().describe(`
14637
14677
  * * Field Name: ExtendedType
14638
14678
  * * Display Name: Extended Type
14639
14679
  * * SQL Data Type: nvarchar(50)
@@ -14650,7 +14690,10 @@ export const MJEntityFieldSchema = z.object({
14650
14690
  * * GeoLongitude
14651
14691
  * * GeoPostalCode
14652
14692
  * * GeoStateProvince
14693
+ * * HTML
14694
+ * * Icon
14653
14695
  * * MSTeams
14696
+ * * Markdown
14654
14697
  * * Other
14655
14698
  * * SIP
14656
14699
  * * SMS
@@ -14659,7 +14702,7 @@ export const MJEntityFieldSchema = z.object({
14659
14702
  * * URL
14660
14703
  * * WhatsApp
14661
14704
  * * ZoomMtg
14662
- * * Description: Defines extended behaviors for a field such as for Email, Web URLs, Code, etc.`),
14705
+ * * Description: Defines extended behaviors for a field such as Email, Web URLs, Code, Markdown, HTML, and Icon. When set to 'Icon', the field's values are treated as icon CSS classes (e.g. Font Awesome) for per-row display in the UI.`),
14663
14706
  CodeType: z.union([z.literal('CSS'), z.literal('HTML'), z.literal('JavaScript'), z.literal('Other'), z.literal('SQL'), z.literal('TypeScript')]).nullable().describe(`
14664
14707
  * * Field Name: CodeType
14665
14708
  * * Display Name: Code Type
@@ -16475,7 +16518,7 @@ export const MJIntegrationObjectFieldSchema = z.object({
16475
16518
  * * Description: Primary key`),
16476
16519
  IntegrationObjectID: z.string().describe(`
16477
16520
  * * Field Name: IntegrationObjectID
16478
- * * Display Name: Integration Object
16521
+ * * Display Name: Integration Object ID
16479
16522
  * * SQL Data Type: uniqueidentifier
16480
16523
  * * Related Entity/Foreign Key: MJ: Integration Objects (vwIntegrationObjects.ID)
16481
16524
  * * Description: Foreign key to the IntegrationObject this field belongs to`),
@@ -16538,7 +16581,7 @@ export const MJIntegrationObjectFieldSchema = z.object({
16538
16581
  * * Description: Whether this field is part of the object primary key`),
16539
16582
  IsUniqueKey: z.boolean().describe(`
16540
16583
  * * Field Name: IsUniqueKey
16541
- * * Display Name: Is Unique Key
16584
+ * * Display Name: Is Unique
16542
16585
  * * SQL Data Type: bit
16543
16586
  * * Default Value: 0
16544
16587
  * * Description: Whether values must be unique across all records`),
@@ -16603,13 +16646,24 @@ export const MJIntegrationObjectFieldSchema = z.object({
16603
16646
  * * SQL Data Type: bit
16604
16647
  * * Default Value: 0
16605
16648
  * * Description: When true, this field was dynamically discovered by IntrospectSchema and is not defined in static connector metadata.`),
16649
+ MetadataSource: z.union([z.literal('Custom'), z.literal('Declared'), z.literal('Discovered')]).describe(`
16650
+ * * Field Name: MetadataSource
16651
+ * * Display Name: Metadata Source
16652
+ * * SQL Data Type: nvarchar(20)
16653
+ * * Default Value: Declared
16654
+ * * Value List Type: List
16655
+ * * Possible Values
16656
+ * * Custom
16657
+ * * Declared
16658
+ * * Discovered
16659
+ * * Description: Provenance of this IntegrationObjectField row: Declared (from static research/docs), Discovered (from runtime API introspection), Custom (customer-defined custom field, e.g., HubSpot custom property on standard object). Drives merge precedence — discovered/runtime wins for type/constraints; declared wins for description/label/sequence/category.`),
16606
16660
  IntegrationObject: z.string().describe(`
16607
16661
  * * Field Name: IntegrationObject
16608
- * * Display Name: Integration Object Name
16662
+ * * Display Name: Integration Object
16609
16663
  * * SQL Data Type: nvarchar(255)`),
16610
16664
  RelatedIntegrationObject: z.string().nullable().describe(`
16611
16665
  * * Field Name: RelatedIntegrationObject
16612
- * * Display Name: Related Object Name
16666
+ * * Display Name: Related Integration Object Name
16613
16667
  * * SQL Data Type: nvarchar(255)`),
16614
16668
  });
16615
16669
  /**
@@ -16624,7 +16678,7 @@ export const MJIntegrationObjectSchema = z.object({
16624
16678
  * * Description: Primary key`),
16625
16679
  IntegrationID: z.string().describe(`
16626
16680
  * * Field Name: IntegrationID
16627
- * * Display Name: Integration ID
16681
+ * * Display Name: Integration
16628
16682
  * * SQL Data Type: uniqueidentifier
16629
16683
  * * Related Entity/Foreign Key: MJ: Integrations (vwIntegrations.ID)
16630
16684
  * * Description: Foreign key to the Integration that owns this object`),
@@ -16754,9 +16808,113 @@ export const MJIntegrationObjectSchema = z.object({
16754
16808
  * * SQL Data Type: bit
16755
16809
  * * Default Value: 0
16756
16810
  * * Description: When true, this object was dynamically discovered by IntrospectSchema and is not defined in static connector metadata.`),
16811
+ CreateAPIPath: z.string().nullable().describe(`
16812
+ * * Field Name: CreateAPIPath
16813
+ * * Display Name: Create API Path
16814
+ * * SQL Data Type: nvarchar(MAX)
16815
+ * * Description: HTTP path template for create operations. Generic CRUD in BaseRESTIntegrationConnector substitutes parent IDs into {var} placeholders. NULL means create not supported via metadata-driven path.`),
16816
+ CreateMethod: z.string().nullable().describe(`
16817
+ * * Field Name: CreateMethod
16818
+ * * Display Name: Create Method
16819
+ * * SQL Data Type: nvarchar(20)
16820
+ * * Description: HTTP method for create (typically POST). NULL means create not supported via metadata-driven path.`),
16821
+ CreateBodyShape: z.union([z.literal('flat'), z.literal('literal'), z.literal('wrapped')]).nullable().describe(`
16822
+ * * Field Name: CreateBodyShape
16823
+ * * Display Name: Create Body Shape
16824
+ * * SQL Data Type: nvarchar(50)
16825
+ * * Value List Type: List
16826
+ * * Possible Values
16827
+ * * flat
16828
+ * * literal
16829
+ * * wrapped
16830
+ * * Description: Request body shape for create: flat (top-level fields), wrapped (under CreateBodyKey), or literal (connector overrides CreateRecord and supplies own body).`),
16831
+ CreateBodyKey: z.string().nullable().describe(`
16832
+ * * Field Name: CreateBodyKey
16833
+ * * Display Name: Create Body Key
16834
+ * * SQL Data Type: nvarchar(100)
16835
+ * * Description: Wrapper key for create body when CreateBodyShape=wrapped. Example: 'member' for YourMembership which wraps body as {member:{...}}.`),
16836
+ CreateIDLocation: z.union([z.literal('body'), z.literal('header'), z.literal('n/a'), z.literal('path')]).nullable().describe(`
16837
+ * * Field Name: CreateIDLocation
16838
+ * * Display Name: Create ID Location
16839
+ * * SQL Data Type: nvarchar(20)
16840
+ * * Value List Type: List
16841
+ * * Possible Values
16842
+ * * body
16843
+ * * header
16844
+ * * n/a
16845
+ * * path
16846
+ * * Description: Where the created record ID is found in the create response: path (URL of returned Location header), body (parsed from JSON response), header (specific named header).`),
16847
+ UpdateAPIPath: z.string().nullable().describe(`
16848
+ * * Field Name: UpdateAPIPath
16849
+ * * Display Name: Update API Path
16850
+ * * SQL Data Type: nvarchar(MAX)
16851
+ * * Description: HTTP path template for update operations. Typically contains {ID} placeholder substituted with the record ExternalID at runtime.`),
16852
+ UpdateMethod: z.string().nullable().describe(`
16853
+ * * Field Name: UpdateMethod
16854
+ * * Display Name: Update Method
16855
+ * * SQL Data Type: nvarchar(20)
16856
+ * * Description: HTTP method for update (typically PATCH or PUT).`),
16857
+ UpdateBodyShape: z.union([z.literal('flat'), z.literal('literal'), z.literal('wrapped')]).nullable().describe(`
16858
+ * * Field Name: UpdateBodyShape
16859
+ * * Display Name: Update Body Shape
16860
+ * * SQL Data Type: nvarchar(50)
16861
+ * * Value List Type: List
16862
+ * * Possible Values
16863
+ * * flat
16864
+ * * literal
16865
+ * * wrapped
16866
+ * * Description: Request body shape for update: flat | wrapped | literal. See CreateBodyShape.`),
16867
+ UpdateBodyKey: z.string().nullable().describe(`
16868
+ * * Field Name: UpdateBodyKey
16869
+ * * Display Name: Update Body Key
16870
+ * * SQL Data Type: nvarchar(100)
16871
+ * * Description: Wrapper key for update body when UpdateBodyShape=wrapped.`),
16872
+ UpdateIDLocation: z.union([z.literal('body'), z.literal('header'), z.literal('n/a'), z.literal('path')]).nullable().describe(`
16873
+ * * Field Name: UpdateIDLocation
16874
+ * * Display Name: Update ID Location
16875
+ * * SQL Data Type: nvarchar(20)
16876
+ * * Value List Type: List
16877
+ * * Possible Values
16878
+ * * body
16879
+ * * header
16880
+ * * n/a
16881
+ * * path
16882
+ * * Description: For update: where the target record ID is located in the request — typically 'path' (substituted into UpdateAPIPath URL template).`),
16883
+ DeleteAPIPath: z.string().nullable().describe(`
16884
+ * * Field Name: DeleteAPIPath
16885
+ * * Display Name: Delete API Path
16886
+ * * SQL Data Type: nvarchar(MAX)
16887
+ * * Description: HTTP path template for delete operations. Typically contains {ID} placeholder. NULL means delete not supported via metadata-driven path. (Existing DeleteMethod column carries the verb.)`),
16888
+ DeleteIDLocation: z.union([z.literal('body'), z.literal('header'), z.literal('n/a'), z.literal('path')]).nullable().describe(`
16889
+ * * Field Name: DeleteIDLocation
16890
+ * * Display Name: Delete ID Location
16891
+ * * SQL Data Type: nvarchar(20)
16892
+ * * Value List Type: List
16893
+ * * Possible Values
16894
+ * * body
16895
+ * * header
16896
+ * * n/a
16897
+ * * path
16898
+ * * Description: For delete: where the target record ID is located — typically 'path'.`),
16899
+ IncrementalWatermarkField: z.string().nullable().describe(`
16900
+ * * Field Name: IncrementalWatermarkField
16901
+ * * Display Name: Incremental Watermark Field
16902
+ * * SQL Data Type: nvarchar(255)
16903
+ * * Description: Vendor field name marking "last changed" — drives incremental sync filter when SupportsIncrementalSync=1. The exact filter syntax (e.g., $filter=Modified gt {value} or modified_since={value}) lives in Configuration.incrementalFilterFormat. Provable-only: leave NULL if docs do not name a watermark field.`),
16904
+ MetadataSource: z.union([z.literal('Custom'), z.literal('Declared'), z.literal('Discovered')]).describe(`
16905
+ * * Field Name: MetadataSource
16906
+ * * Display Name: Metadata Source
16907
+ * * SQL Data Type: nvarchar(20)
16908
+ * * Default Value: Declared
16909
+ * * Value List Type: List
16910
+ * * Possible Values
16911
+ * * Custom
16912
+ * * Declared
16913
+ * * Discovered
16914
+ * * Description: Provenance of this IntegrationObject row: Declared (from static research/docs), Discovered (from runtime API introspection like Salesforce /describe), Custom (genuinely customer-created, e.g., HubSpot custom objects). Drives merge precedence in IntegrationSchemaSync.`),
16757
16915
  Integration: z.string().describe(`
16758
16916
  * * Field Name: Integration
16759
- * * Display Name: Integration
16917
+ * * Display Name: Integration Name
16760
16918
  * * SQL Data Type: nvarchar(100)`),
16761
16919
  });
16762
16920
  /**
@@ -21589,7 +21747,7 @@ export const MJScheduledJobSchema = z.object({
21589
21747
  * * Description: Whether to send email notifications. Requires NotifyOnSuccess or NotifyOnFailure to also be enabled.`),
21590
21748
  NotifyViaInApp: z.boolean().describe(`
21591
21749
  * * Field Name: NotifyViaInApp
21592
- * * Display Name: Notify Via In App
21750
+ * * Display Name: Notify Via In-App
21593
21751
  * * SQL Data Type: bit
21594
21752
  * * Default Value: 1
21595
21753
  * * Description: Whether to send in-app notifications. Requires NotifyOnSuccess or NotifyOnFailure to also be enabled. Defaults to true.`),
@@ -21634,6 +21792,12 @@ export const MJScheduledJobSchema = z.object({
21634
21792
  * * Display Name: Updated At
21635
21793
  * * SQL Data Type: datetimeoffset
21636
21794
  * * Default Value: getutcdate()`),
21795
+ RunImmediatelyIfNeverRun: z.boolean().describe(`
21796
+ * * Field Name: RunImmediatelyIfNeverRun
21797
+ * * Display Name: Run Immediately If Never Run
21798
+ * * SQL Data Type: bit
21799
+ * * Default Value: 0
21800
+ * * Description: When true AND LastRunAt IS NULL, the scheduler sets NextRunAt to now() instead of the next cron tick on initialization, so the job runs on the next polling cycle. Useful for newly-seeded jobs that should not wait up to a full cron interval before their first execution.`),
21637
21801
  JobType: z.string().describe(`
21638
21802
  * * Field Name: JobType
21639
21803
  * * Display Name: Job Type
@@ -22811,6 +22975,17 @@ export const MJTagSynonymSchema = z.object({
22811
22975
  * * Display Name: Updated At
22812
22976
  * * SQL Data Type: datetimeoffset
22813
22977
  * * Default Value: getutcdate()`),
22978
+ Status: z.union([z.literal('Active'), z.literal('Pending'), z.literal('Rejected')]).describe(`
22979
+ * * Field Name: Status
22980
+ * * Display Name: Status
22981
+ * * SQL Data Type: nvarchar(20)
22982
+ * * Default Value: Active
22983
+ * * Value List Type: List
22984
+ * * Possible Values
22985
+ * * Active
22986
+ * * Pending
22987
+ * * Rejected
22988
+ * * Description: Approval state of the synonym. Active = resolves to its tag during classification. Pending = proposed (e.g. by the LLM or a bulk import) and awaiting human review; does not resolve until approved. Rejected = reviewed and declined; retained for audit and to suppress re-proposal.`),
22814
22989
  Tag: z.string().describe(`
22815
22990
  * * Field Name: Tag
22816
22991
  * * Display Name: Tag Name
@@ -32869,7 +33044,7 @@ let MJAIAgentRunEntity = class MJAIAgentRunEntity extends BaseEntity {
32869
33044
  }
32870
33045
  /**
32871
33046
  * * Field Name: ID
32872
- * * Display Name: ID
33047
+ * * Display Name: Run ID
32873
33048
  * * SQL Data Type: uniqueidentifier
32874
33049
  * * Default Value: newsequentialid()
32875
33050
  * * Description: Unique identifier for this agent run
@@ -33029,7 +33204,7 @@ let MJAIAgentRunEntity = class MJAIAgentRunEntity extends BaseEntity {
33029
33204
  }
33030
33205
  /**
33031
33206
  * * Field Name: TotalTokensUsed
33032
- * * Display Name: Total Tokens Used
33207
+ * * Display Name: Total Tokens
33033
33208
  * * SQL Data Type: int
33034
33209
  * * Default Value: 0
33035
33210
  * * Description: Total number of tokens consumed by all LLM calls during this agent run
@@ -33073,7 +33248,7 @@ let MJAIAgentRunEntity = class MJAIAgentRunEntity extends BaseEntity {
33073
33248
  }
33074
33249
  /**
33075
33250
  * * Field Name: TotalPromptTokensUsed
33076
- * * Display Name: Total Prompt Tokens Used
33251
+ * * Display Name: Prompt Tokens
33077
33252
  * * SQL Data Type: int
33078
33253
  * * Description: Total number of prompt/input tokens used across all AIPromptRun executions during this agent run. This provides a breakdown of the TotalTokensUsed field to help analyze the ratio of input vs output tokens consumed by the agent.
33079
33254
  */
@@ -33085,7 +33260,7 @@ let MJAIAgentRunEntity = class MJAIAgentRunEntity extends BaseEntity {
33085
33260
  }
33086
33261
  /**
33087
33262
  * * Field Name: TotalCompletionTokensUsed
33088
- * * Display Name: Total Completion Tokens Used
33263
+ * * Display Name: Completion Tokens
33089
33264
  * * SQL Data Type: int
33090
33265
  * * Description: Total number of completion/output tokens generated across all AIPromptRun executions during this agent run. This provides a breakdown of the TotalTokensUsed field to help analyze the ratio of input vs output tokens consumed by the agent.
33091
33266
  */
@@ -33097,7 +33272,7 @@ let MJAIAgentRunEntity = class MJAIAgentRunEntity extends BaseEntity {
33097
33272
  }
33098
33273
  /**
33099
33274
  * * Field Name: TotalTokensUsedRollup
33100
- * * Display Name: Total Tokens Used (Rollup)
33275
+ * * Display Name: Total Tokens (Rollup)
33101
33276
  * * SQL Data Type: int
33102
33277
  * * Description: Total tokens used including this agent run and all sub-agent runs. For leaf agents (no sub-agents), this equals TotalTokensUsed. For parent agents, this includes the sum of all descendant agent tokens. Calculated as TotalPromptTokensUsedRollup + TotalCompletionTokensUsedRollup.
33103
33278
  */
@@ -33109,7 +33284,7 @@ let MJAIAgentRunEntity = class MJAIAgentRunEntity extends BaseEntity {
33109
33284
  }
33110
33285
  /**
33111
33286
  * * Field Name: TotalPromptTokensUsedRollup
33112
- * * Display Name: Total Prompt Tokens Used (Rollup)
33287
+ * * Display Name: Prompt Tokens (Rollup)
33113
33288
  * * SQL Data Type: int
33114
33289
  * * Description: Total prompt/input tokens including this agent run and all sub-agent runs. For leaf agents (no sub-agents), this equals TotalPromptTokensUsed. For parent agents, this includes the sum of all descendant agent prompt tokens.
33115
33290
  */
@@ -33121,7 +33296,7 @@ let MJAIAgentRunEntity = class MJAIAgentRunEntity extends BaseEntity {
33121
33296
  }
33122
33297
  /**
33123
33298
  * * Field Name: TotalCompletionTokensUsedRollup
33124
- * * Display Name: Total Completion Tokens Used (Rollup)
33299
+ * * Display Name: Completion Tokens (Rollup)
33125
33300
  * * SQL Data Type: int
33126
33301
  * * Description: Total completion/output tokens including this agent run and all sub-agent runs. For leaf agents (no sub-agents), this equals TotalCompletionTokensUsed. For parent agents, this includes the sum of all descendant agent completion tokens.
33127
33302
  */
@@ -33158,7 +33333,7 @@ let MJAIAgentRunEntity = class MJAIAgentRunEntity extends BaseEntity {
33158
33333
  }
33159
33334
  /**
33160
33335
  * * Field Name: ConversationDetailSequence
33161
- * * Display Name: Conversation Detail Sequence
33336
+ * * Display Name: Sequence
33162
33337
  * * SQL Data Type: int
33163
33338
  * * Description: If a conversation detail spawned multiple agent runs, tracks the order of their spawn/execution
33164
33339
  */
@@ -33221,7 +33396,7 @@ let MJAIAgentRunEntity = class MJAIAgentRunEntity extends BaseEntity {
33221
33396
  }
33222
33397
  /**
33223
33398
  * * Field Name: Message
33224
- * * Display Name: Message
33399
+ * * Display Name: Final Message
33225
33400
  * * SQL Data Type: nvarchar(MAX)
33226
33401
  * * Description: Final message from the agent to the end user at the end of a run
33227
33402
  */
@@ -33311,7 +33486,7 @@ each time the agent processes a prompt step.
33311
33486
  }
33312
33487
  /**
33313
33488
  * * Field Name: Data
33314
- * * Display Name: Data
33489
+ * * Display Name: Execution Data
33315
33490
  * * SQL Data Type: nvarchar(MAX)
33316
33491
  * * Description: JSON serialized data that was passed for template rendering and prompt execution. This data was passed to the agent's prompt as well as all sub-agents.
33317
33492
  */
@@ -33435,7 +33610,7 @@ each time the agent processes a prompt step.
33435
33610
  }
33436
33611
  /**
33437
33612
  * * Field Name: ExternalReferenceID
33438
- * * Display Name: External Reference ID
33613
+ * * Display Name: External Reference
33439
33614
  * * SQL Data Type: nvarchar(200)
33440
33615
  * * Description: Optional reference ID from an external system that initiated this agent run. Enables correlation between the caller's agent run and this execution. For example, when Skip SaaS is called via SkipProxyAgent, this stores the MJ-side Agent Run ID.
33441
33616
  */
@@ -33447,7 +33622,7 @@ each time the agent processes a prompt step.
33447
33622
  }
33448
33623
  /**
33449
33624
  * * Field Name: CompanyID
33450
- * * Display Name: Company ID
33625
+ * * Display Name: Company
33451
33626
  * * SQL Data Type: uniqueidentifier
33452
33627
  * * Description: Optional company scope for multi-tenant memory. When populated, Memory Manager uses this to scope extracted notes to the company. Flows from ExecuteAgentParams.companyId at agent invocation time.
33453
33628
  */
@@ -33458,8 +33633,32 @@ each time the agent processes a prompt step.
33458
33633
  this.Set('CompanyID', value);
33459
33634
  }
33460
33635
  /**
33636
+ * * Field Name: TotalCacheReadTokensUsed
33637
+ * * Display Name: Cache Read Tokens
33638
+ * * SQL Data Type: int
33639
+ * * Description: Total input tokens served from the AI provider's prompt cache (cache reads / hits) across this agent run, summed from child prompt runs' TokensCacheReadRollup and sub-agent runs' TotalCacheReadTokensUsed. Counts only; the cost impact (cache reads are billed at a steep discount) is reflected in TotalCost. The cache counterpart of TotalPromptTokensUsed.
33640
+ */
33641
+ get TotalCacheReadTokensUsed() {
33642
+ return this.Get('TotalCacheReadTokensUsed');
33643
+ }
33644
+ set TotalCacheReadTokensUsed(value) {
33645
+ this.Set('TotalCacheReadTokensUsed', value);
33646
+ }
33647
+ /**
33648
+ * * Field Name: TotalCacheWriteTokensUsed
33649
+ * * Display Name: Cache Write Tokens
33650
+ * * SQL Data Type: int
33651
+ * * Description: Total input tokens written to the AI provider's prompt cache (cache writes / creation) across this agent run, summed from child prompt runs' TokensCacheWriteRollup and sub-agent runs' TotalCacheWriteTokensUsed. Populated for providers that bill cache creation (e.g. Anthropic); 0 or NULL otherwise. The cache counterpart of TotalCompletionTokensUsed.
33652
+ */
33653
+ get TotalCacheWriteTokensUsed() {
33654
+ return this.Get('TotalCacheWriteTokensUsed');
33655
+ }
33656
+ set TotalCacheWriteTokensUsed(value) {
33657
+ this.Set('TotalCacheWriteTokensUsed', value);
33658
+ }
33659
+ /**
33461
33660
  * * Field Name: Agent
33462
- * * Display Name: Agent Name
33661
+ * * Display Name: Agent Details
33463
33662
  * * SQL Data Type: nvarchar(255)
33464
33663
  */
33465
33664
  get Agent() {
@@ -33467,7 +33666,7 @@ each time the agent processes a prompt step.
33467
33666
  }
33468
33667
  /**
33469
33668
  * * Field Name: ParentRun
33470
- * * Display Name: Parent Run Name
33669
+ * * Display Name: Parent Run Details
33471
33670
  * * SQL Data Type: nvarchar(255)
33472
33671
  */
33473
33672
  get ParentRun() {
@@ -33475,7 +33674,7 @@ each time the agent processes a prompt step.
33475
33674
  }
33476
33675
  /**
33477
33676
  * * Field Name: Conversation
33478
- * * Display Name: Conversation Name
33677
+ * * Display Name: Conversation Details
33479
33678
  * * SQL Data Type: nvarchar(255)
33480
33679
  */
33481
33680
  get Conversation() {
@@ -33483,7 +33682,7 @@ each time the agent processes a prompt step.
33483
33682
  }
33484
33683
  /**
33485
33684
  * * Field Name: User
33486
- * * Display Name: User Name
33685
+ * * Display Name: User Details
33487
33686
  * * SQL Data Type: nvarchar(100)
33488
33687
  */
33489
33688
  get User() {
@@ -33491,7 +33690,7 @@ each time the agent processes a prompt step.
33491
33690
  }
33492
33691
  /**
33493
33692
  * * Field Name: ConversationDetail
33494
- * * Display Name: Conversation Detail Name
33693
+ * * Display Name: Conversation Detail Details
33495
33694
  * * SQL Data Type: nvarchar(MAX)
33496
33695
  */
33497
33696
  get ConversationDetail() {
@@ -33499,7 +33698,7 @@ each time the agent processes a prompt step.
33499
33698
  }
33500
33699
  /**
33501
33700
  * * Field Name: LastRun
33502
- * * Display Name: Last Run Name
33701
+ * * Display Name: Last Run Details
33503
33702
  * * SQL Data Type: nvarchar(255)
33504
33703
  */
33505
33704
  get LastRun() {
@@ -33507,7 +33706,7 @@ each time the agent processes a prompt step.
33507
33706
  }
33508
33707
  /**
33509
33708
  * * Field Name: Configuration
33510
- * * Display Name: Configuration Name
33709
+ * * Display Name: Configuration Details
33511
33710
  * * SQL Data Type: nvarchar(100)
33512
33711
  */
33513
33712
  get Configuration() {
@@ -33515,7 +33714,7 @@ each time the agent processes a prompt step.
33515
33714
  }
33516
33715
  /**
33517
33716
  * * Field Name: OverrideModel
33518
- * * Display Name: Override Model Name
33717
+ * * Display Name: Override Model Details
33519
33718
  * * SQL Data Type: nvarchar(50)
33520
33719
  */
33521
33720
  get OverrideModel() {
@@ -33523,7 +33722,7 @@ each time the agent processes a prompt step.
33523
33722
  }
33524
33723
  /**
33525
33724
  * * Field Name: OverrideVendor
33526
- * * Display Name: Override Vendor Name
33725
+ * * Display Name: Override Vendor Details
33527
33726
  * * SQL Data Type: nvarchar(50)
33528
33727
  */
33529
33728
  get OverrideVendor() {
@@ -33531,7 +33730,7 @@ each time the agent processes a prompt step.
33531
33730
  }
33532
33731
  /**
33533
33732
  * * Field Name: ScheduledJobRun
33534
- * * Display Name: Scheduled Job Run Name
33733
+ * * Display Name: Scheduled Job Details
33535
33734
  * * SQL Data Type: nvarchar(200)
33536
33735
  */
33537
33736
  get ScheduledJobRun() {
@@ -33539,7 +33738,7 @@ each time the agent processes a prompt step.
33539
33738
  }
33540
33739
  /**
33541
33740
  * * Field Name: TestRun
33542
- * * Display Name: Test Run Name
33741
+ * * Display Name: Test Run Details
33543
33742
  * * SQL Data Type: nvarchar(255)
33544
33743
  */
33545
33744
  get TestRun() {
@@ -33547,7 +33746,7 @@ each time the agent processes a prompt step.
33547
33746
  }
33548
33747
  /**
33549
33748
  * * Field Name: PrimaryScopeEntity
33550
- * * Display Name: Primary Scope Entity Name
33749
+ * * Display Name: Primary Scope Entity Details
33551
33750
  * * SQL Data Type: nvarchar(255)
33552
33751
  */
33553
33752
  get PrimaryScopeEntity() {
@@ -37328,7 +37527,7 @@ let MJAIModelCostEntity = class MJAIModelCostEntity extends BaseEntity {
37328
37527
  }
37329
37528
  /**
37330
37529
  * * Field Name: ModelID
37331
- * * Display Name: Model ID
37530
+ * * Display Name: Model
37332
37531
  * * SQL Data Type: uniqueidentifier
37333
37532
  * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
37334
37533
  */
@@ -37340,7 +37539,7 @@ let MJAIModelCostEntity = class MJAIModelCostEntity extends BaseEntity {
37340
37539
  }
37341
37540
  /**
37342
37541
  * * Field Name: VendorID
37343
- * * Display Name: Vendor ID
37542
+ * * Display Name: Vendor
37344
37543
  * * SQL Data Type: uniqueidentifier
37345
37544
  * * Related Entity/Foreign Key: MJ: AI Vendors (vwAIVendors.ID)
37346
37545
  */
@@ -37407,7 +37606,7 @@ let MJAIModelCostEntity = class MJAIModelCostEntity extends BaseEntity {
37407
37606
  }
37408
37607
  /**
37409
37608
  * * Field Name: PriceTypeID
37410
- * * Display Name: Price Type ID
37609
+ * * Display Name: Price Type
37411
37610
  * * SQL Data Type: uniqueidentifier
37412
37611
  * * Related Entity/Foreign Key: MJ: AI Model Price Types (vwAIModelPriceTypes.ID)
37413
37612
  */
@@ -37443,7 +37642,7 @@ let MJAIModelCostEntity = class MJAIModelCostEntity extends BaseEntity {
37443
37642
  }
37444
37643
  /**
37445
37644
  * * Field Name: UnitTypeID
37446
- * * Display Name: Unit Type ID
37645
+ * * Display Name: Unit Type
37447
37646
  * * SQL Data Type: uniqueidentifier
37448
37647
  * * Related Entity/Foreign Key: MJ: AI Model Price Unit Types (vwAIModelPriceUnitTypes.ID)
37449
37648
  */
@@ -37500,8 +37699,32 @@ let MJAIModelCostEntity = class MJAIModelCostEntity extends BaseEntity {
37500
37699
  return this.Get('__mj_UpdatedAt');
37501
37700
  }
37502
37701
  /**
37702
+ * * Field Name: CacheReadPricePerUnit
37703
+ * * Display Name: Cache Read Price Per Unit
37704
+ * * SQL Data Type: decimal(18, 8)
37705
+ * * Description: Optional price per unit for input tokens served from the AI provider's prompt cache (cache reads / hits), expressed in the same currency and UnitType (e.g. per 1M tokens) as InputPricePerUnit. When NULL, cache-read tokens are priced at InputPricePerUnit. Cache reads are usually far cheaper than uncached input (e.g. ~0.1x for Anthropic/Gemini, ~0.5x for OpenAI).
37706
+ */
37707
+ get CacheReadPricePerUnit() {
37708
+ return this.Get('CacheReadPricePerUnit');
37709
+ }
37710
+ set CacheReadPricePerUnit(value) {
37711
+ this.Set('CacheReadPricePerUnit', value);
37712
+ }
37713
+ /**
37714
+ * * Field Name: CacheWritePricePerUnit
37715
+ * * Display Name: Cache Write Price Per Unit
37716
+ * * SQL Data Type: decimal(18, 8)
37717
+ * * Description: Optional price per unit for input tokens written to the AI provider's prompt cache (cache writes / creation), expressed in the same currency and UnitType as InputPricePerUnit. When NULL, cache-write tokens are priced at InputPricePerUnit. Populated for providers that bill cache creation separately (e.g. Anthropic, ~1.25x input); leave NULL for providers that do not (OpenAI, Gemini), which also report 0 cache-write tokens.
37718
+ */
37719
+ get CacheWritePricePerUnit() {
37720
+ return this.Get('CacheWritePricePerUnit');
37721
+ }
37722
+ set CacheWritePricePerUnit(value) {
37723
+ this.Set('CacheWritePricePerUnit', value);
37724
+ }
37725
+ /**
37503
37726
  * * Field Name: Model
37504
- * * Display Name: Model
37727
+ * * Display Name: Model Name
37505
37728
  * * SQL Data Type: nvarchar(50)
37506
37729
  */
37507
37730
  get Model() {
@@ -37509,7 +37732,7 @@ let MJAIModelCostEntity = class MJAIModelCostEntity extends BaseEntity {
37509
37732
  }
37510
37733
  /**
37511
37734
  * * Field Name: Vendor
37512
- * * Display Name: Vendor
37735
+ * * Display Name: Vendor Name
37513
37736
  * * SQL Data Type: nvarchar(50)
37514
37737
  */
37515
37738
  get Vendor() {
@@ -37517,7 +37740,7 @@ let MJAIModelCostEntity = class MJAIModelCostEntity extends BaseEntity {
37517
37740
  }
37518
37741
  /**
37519
37742
  * * Field Name: PriceType
37520
- * * Display Name: Price Type
37743
+ * * Display Name: Price Type Name
37521
37744
  * * SQL Data Type: nvarchar(100)
37522
37745
  */
37523
37746
  get PriceType() {
@@ -37525,7 +37748,7 @@ let MJAIModelCostEntity = class MJAIModelCostEntity extends BaseEntity {
37525
37748
  }
37526
37749
  /**
37527
37750
  * * Field Name: UnitType
37528
- * * Display Name: Unit Type
37751
+ * * Display Name: Unit Type Name
37529
37752
  * * SQL Data Type: nvarchar(100)
37530
37753
  */
37531
37754
  get UnitType() {
@@ -39713,7 +39936,7 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
39713
39936
  }
39714
39937
  /**
39715
39938
  * * Field Name: RunAt
39716
- * * Display Name: Run At
39939
+ * * Display Name: Started At
39717
39940
  * * SQL Data Type: datetimeoffset
39718
39941
  * * Default Value: sysdatetimeoffset()
39719
39942
  * * Description: When the prompt run started, with timezone offset information.
@@ -39774,7 +39997,7 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
39774
39997
  }
39775
39998
  /**
39776
39999
  * * Field Name: TokensUsed
39777
- * * Display Name: Total Tokens Used
40000
+ * * Display Name: Tokens Used
39778
40001
  * * SQL Data Type: int
39779
40002
  * * Description: Total number of tokens used (prompt + completion).
39780
40003
  */
@@ -39934,7 +40157,7 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
39934
40157
  }
39935
40158
  /**
39936
40159
  * * Field Name: CostCurrency
39937
- * * Display Name: Cost Currency
40160
+ * * Display Name: Currency
39938
40161
  * * SQL Data Type: nvarchar(10)
39939
40162
  * * Description: ISO 4217 currency code for the Cost field (e.g., USD, EUR, GBP). Different AI providers may use different currencies.
39940
40163
  */
@@ -39946,7 +40169,7 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
39946
40169
  }
39947
40170
  /**
39948
40171
  * * Field Name: TokensUsedRollup
39949
- * * Display Name: Total Tokens (Rollup)
40172
+ * * Display Name: Tokens Used (Rollup)
39950
40173
  * * SQL Data Type: int
39951
40174
  * * Description: Total tokens used including this execution and all child/grandchild executions. This provides a complete view of token usage for hierarchical prompt trees. Calculated as TokensPromptRollup + TokensCompletionRollup.
39952
40175
  */
@@ -40090,7 +40313,7 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
40090
40313
  }
40091
40314
  /**
40092
40315
  * * Field Name: LogProbs
40093
- * * Display Name: Log Probabilities
40316
+ * * Display Name: Log Probs
40094
40317
  * * SQL Data Type: bit
40095
40318
  * * Description: Whether log probabilities were requested for this run
40096
40319
  */
@@ -40102,7 +40325,7 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
40102
40325
  }
40103
40326
  /**
40104
40327
  * * Field Name: TopLogProbs
40105
- * * Display Name: Top Log Probabilities
40328
+ * * Display Name: Top Log Probs
40106
40329
  * * SQL Data Type: int
40107
40330
  * * Description: Number of top log probabilities requested per token (if LogProbs is true)
40108
40331
  */
@@ -40126,7 +40349,7 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
40126
40349
  }
40127
40350
  /**
40128
40351
  * * Field Name: ValidationAttemptCount
40129
- * * Display Name: Validation Attempt Count
40352
+ * * Display Name: Validation Attempts
40130
40353
  * * SQL Data Type: int
40131
40354
  * * Description: Total number of validation attempts made (including the initial attempt)
40132
40355
  */
@@ -40138,7 +40361,7 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
40138
40361
  }
40139
40362
  /**
40140
40363
  * * Field Name: SuccessfulValidationCount
40141
- * * Display Name: Successful Validation Count
40364
+ * * Display Name: Successful Validations
40142
40365
  * * SQL Data Type: int
40143
40366
  * * Description: Number of validation attempts that passed validation
40144
40367
  */
@@ -40150,7 +40373,7 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
40150
40373
  }
40151
40374
  /**
40152
40375
  * * Field Name: FinalValidationPassed
40153
- * * Display Name: Final Validation Passed
40376
+ * * Display Name: Validation Passed
40154
40377
  * * SQL Data Type: bit
40155
40378
  * * Description: Whether validation ultimately passed (1) or failed (0)
40156
40379
  */
@@ -40186,7 +40409,7 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
40186
40409
  }
40187
40410
  /**
40188
40411
  * * Field Name: MaxRetriesConfigured
40189
- * * Display Name: Max Retries Configured
40412
+ * * Display Name: Max Retries
40190
40413
  * * SQL Data Type: int
40191
40414
  * * Description: Maximum number of retries configured on the prompt
40192
40415
  */
@@ -40270,7 +40493,7 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
40270
40493
  }
40271
40494
  /**
40272
40495
  * * Field Name: ValidationAttempts
40273
- * * Display Name: Validation Attempts
40496
+ * * Display Name: Validation Attempt Logs
40274
40497
  * * SQL Data Type: nvarchar(MAX)
40275
40498
  * * Description: JSON array containing detailed information about each validation attempt
40276
40499
  */
@@ -40331,7 +40554,7 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
40331
40554
  }
40332
40555
  /**
40333
40556
  * * Field Name: OriginalModelID
40334
- * * Display Name: Original Model
40557
+ * * Display Name: Original Model ID
40335
40558
  * * SQL Data Type: uniqueidentifier
40336
40559
  * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
40337
40560
  * * Description: The AI Model ID that was originally attempted before any failovers
@@ -40344,7 +40567,7 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
40344
40567
  }
40345
40568
  /**
40346
40569
  * * Field Name: OriginalRequestStartTime
40347
- * * Display Name: Original Request Start Time
40570
+ * * Display Name: Original Request Start
40348
40571
  * * SQL Data Type: datetimeoffset
40349
40572
  * * Description: Timestamp when the original request started, before any failovers
40350
40573
  */
@@ -40381,7 +40604,7 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
40381
40604
  }
40382
40605
  /**
40383
40606
  * * Field Name: ModelSelection
40384
- * * Display Name: Model Selection
40607
+ * * Display Name: Model Selection Details
40385
40608
  * * SQL Data Type: nvarchar(MAX)
40386
40609
  * * Description: JSON object containing detailed model selection information including all models considered, their scores, and the selection rationale
40387
40610
  */
@@ -40492,7 +40715,7 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
40492
40715
  }
40493
40716
  /**
40494
40717
  * * Field Name: JudgeID
40495
- * * Display Name: Judge
40718
+ * * Display Name: Judge Prompt
40496
40719
  * * SQL Data Type: uniqueidentifier
40497
40720
  * * Related Entity/Foreign Key: MJ: AI Prompts (vwAIPrompts.ID)
40498
40721
  * * Description: ID of the AIPrompt used as a judge to evaluate and rank multiple parallel execution results
@@ -40616,7 +40839,7 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
40616
40839
  }
40617
40840
  /**
40618
40841
  * * Field Name: ModelSpecificResponseDetails
40619
- * * Display Name: Model Specific Response Details
40842
+ * * Display Name: Provider Response Details
40620
40843
  * * SQL Data Type: nvarchar(MAX)
40621
40844
  * * Description: JSON field containing provider-specific response metadata and details not captured in standard fields. Structure varies by AI provider.
40622
40845
  */
@@ -40688,6 +40911,54 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
40688
40911
  this.Set('AssistantPrefill', value);
40689
40912
  }
40690
40913
  /**
40914
+ * * Field Name: TokensCacheRead
40915
+ * * Display Name: Tokens Cache Read
40916
+ * * SQL Data Type: int
40917
+ * * Description: Number of input tokens served from the AI provider's prompt cache (a cache READ / hit) for this run, as reported by the provider. Counts only; no cost is derived here. NULL if the provider did not report cache reads or caching did not engage. Distinct from CacheHit/CacheKey, which track MemberJunction's own result cache.
40918
+ */
40919
+ get TokensCacheRead() {
40920
+ return this.Get('TokensCacheRead');
40921
+ }
40922
+ set TokensCacheRead(value) {
40923
+ this.Set('TokensCacheRead', value);
40924
+ }
40925
+ /**
40926
+ * * Field Name: TokensCacheWrite
40927
+ * * Display Name: Tokens Cache Write
40928
+ * * SQL Data Type: int
40929
+ * * Description: Number of input tokens written to the AI provider's prompt cache (a cache WRITE / creation) for this run, as reported by the provider. Populated for providers that report cache writes (e.g. Anthropic cache_creation_input_tokens); NULL or 0 for providers that do not bill/report writes (OpenAI, Gemini, Groq, Cerebras). Counts only; no cost is derived here.
40930
+ */
40931
+ get TokensCacheWrite() {
40932
+ return this.Get('TokensCacheWrite');
40933
+ }
40934
+ set TokensCacheWrite(value) {
40935
+ this.Set('TokensCacheWrite', value);
40936
+ }
40937
+ /**
40938
+ * * Field Name: TokensCacheReadRollup
40939
+ * * Display Name: Tokens Cache Read (Rollup)
40940
+ * * SQL Data Type: int
40941
+ * * Description: Rollup of TokensCacheRead across this prompt run and all of its descendant prompt runs (e.g. the individual attempts behind a parallel / multi-attempt / failover consolidation). For a leaf run this equals TokensCacheRead. Use this (not TokensCacheRead) when aggregating cache reads up a prompt-run or agent-run hierarchy so fan-out provider calls are not under-counted.
40942
+ */
40943
+ get TokensCacheReadRollup() {
40944
+ return this.Get('TokensCacheReadRollup');
40945
+ }
40946
+ set TokensCacheReadRollup(value) {
40947
+ this.Set('TokensCacheReadRollup', value);
40948
+ }
40949
+ /**
40950
+ * * Field Name: TokensCacheWriteRollup
40951
+ * * Display Name: Tokens Cache Write (Rollup)
40952
+ * * SQL Data Type: int
40953
+ * * Description: Rollup of TokensCacheWrite across this prompt run and all of its descendant prompt runs. For a leaf run this equals TokensCacheWrite. Mirrors TokensUsedRollup/TokensPromptRollup; populated for providers that report cache writes (e.g. Anthropic), otherwise 0 or NULL.
40954
+ */
40955
+ get TokensCacheWriteRollup() {
40956
+ return this.Get('TokensCacheWriteRollup');
40957
+ }
40958
+ set TokensCacheWriteRollup(value) {
40959
+ this.Set('TokensCacheWriteRollup', value);
40960
+ }
40961
+ /**
40691
40962
  * * Field Name: Prompt
40692
40963
  * * Display Name: Prompt
40693
40964
  * * SQL Data Type: nvarchar(255)
@@ -40753,7 +41024,7 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
40753
41024
  }
40754
41025
  /**
40755
41026
  * * Field Name: RerunFromPromptRun
40756
- * * Display Name: Rerun From
41027
+ * * Display Name: Rerun From Run
40757
41028
  * * SQL Data Type: nvarchar(255)
40758
41029
  */
40759
41030
  get RerunFromPromptRun() {
@@ -40793,7 +41064,7 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
40793
41064
  }
40794
41065
  /**
40795
41066
  * * Field Name: RootRerunFromPromptRunID
40796
- * * Display Name: Root Rerun From
41067
+ * * Display Name: Root Rerun Source
40797
41068
  * * SQL Data Type: uniqueidentifier
40798
41069
  */
40799
41070
  get RootRerunFromPromptRunID() {
@@ -44060,6 +44331,41 @@ let MJApplicationEntity = class MJApplicationEntity extends BaseEntity {
44060
44331
  return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
44061
44332
  }
44062
44333
  /**
44334
+ * MJ: Applications - Delete method override to wrap in transaction since CascadeDeletes is true.
44335
+ * Wrapping in a transaction ensures that all cascade delete operations are handled atomically.
44336
+ * @public
44337
+ * @method
44338
+ * @override
44339
+ * @memberof MJApplicationEntity
44340
+ * @returns {Promise<boolean>} - true if successful, false otherwise
44341
+ */
44342
+ async Delete(options) {
44343
+ if (Metadata.Provider.ProviderType === ProviderType.Database) { // global-provider-ok: codegen runs offline against a single provider
44344
+ // For database providers, use the transaction methods directly
44345
+ const provider = Metadata.Provider; // global-provider-ok: codegen runs offline against a single provider
44346
+ try {
44347
+ await provider.BeginTransaction();
44348
+ const result = await super.Delete(options);
44349
+ if (result) {
44350
+ await provider.CommitTransaction();
44351
+ return true;
44352
+ }
44353
+ else {
44354
+ await provider.RollbackTransaction();
44355
+ return false;
44356
+ }
44357
+ }
44358
+ catch (error) {
44359
+ await provider.RollbackTransaction();
44360
+ throw error;
44361
+ }
44362
+ }
44363
+ else {
44364
+ // For network providers, cascading deletes are handled server-side
44365
+ return super.Delete(options);
44366
+ }
44367
+ }
44368
+ /**
44063
44369
  * * Field Name: ID
44064
44370
  * * Display Name: ID
44065
44371
  * * SQL Data Type: uniqueidentifier
@@ -63033,7 +63339,10 @@ let MJEntityFieldEntity = class MJEntityFieldEntity extends BaseEntity {
63033
63339
  * * GeoLongitude
63034
63340
  * * GeoPostalCode
63035
63341
  * * GeoStateProvince
63342
+ * * HTML
63343
+ * * Icon
63036
63344
  * * MSTeams
63345
+ * * Markdown
63037
63346
  * * Other
63038
63347
  * * SIP
63039
63348
  * * SMS
@@ -63042,7 +63351,7 @@ let MJEntityFieldEntity = class MJEntityFieldEntity extends BaseEntity {
63042
63351
  * * URL
63043
63352
  * * WhatsApp
63044
63353
  * * ZoomMtg
63045
- * * Description: Defines extended behaviors for a field such as for Email, Web URLs, Code, etc.
63354
+ * * Description: Defines extended behaviors for a field such as Email, Web URLs, Code, Markdown, HTML, and Icon. When set to 'Icon', the field's values are treated as icon CSS classes (e.g. Font Awesome) for per-row display in the UI.
63046
63355
  */
63047
63356
  get ExtendedType() {
63048
63357
  return this.Get('ExtendedType');
@@ -67499,7 +67808,7 @@ let MJIntegrationObjectFieldEntity = class MJIntegrationObjectFieldEntity extend
67499
67808
  }
67500
67809
  /**
67501
67810
  * * Field Name: IntegrationObjectID
67502
- * * Display Name: Integration Object
67811
+ * * Display Name: Integration Object ID
67503
67812
  * * SQL Data Type: uniqueidentifier
67504
67813
  * * Related Entity/Foreign Key: MJ: Integration Objects (vwIntegrationObjects.ID)
67505
67814
  * * Description: Foreign key to the IntegrationObject this field belongs to
@@ -67646,7 +67955,7 @@ let MJIntegrationObjectFieldEntity = class MJIntegrationObjectFieldEntity extend
67646
67955
  }
67647
67956
  /**
67648
67957
  * * Field Name: IsUniqueKey
67649
- * * Display Name: Is Unique Key
67958
+ * * Display Name: Is Unique
67650
67959
  * * SQL Data Type: bit
67651
67960
  * * Default Value: 0
67652
67961
  * * Description: Whether values must be unique across all records
@@ -67783,8 +68092,26 @@ let MJIntegrationObjectFieldEntity = class MJIntegrationObjectFieldEntity extend
67783
68092
  this.Set('IsCustom', value);
67784
68093
  }
67785
68094
  /**
68095
+ * * Field Name: MetadataSource
68096
+ * * Display Name: Metadata Source
68097
+ * * SQL Data Type: nvarchar(20)
68098
+ * * Default Value: Declared
68099
+ * * Value List Type: List
68100
+ * * Possible Values
68101
+ * * Custom
68102
+ * * Declared
68103
+ * * Discovered
68104
+ * * Description: Provenance of this IntegrationObjectField row: Declared (from static research/docs), Discovered (from runtime API introspection), Custom (customer-defined custom field, e.g., HubSpot custom property on standard object). Drives merge precedence — discovered/runtime wins for type/constraints; declared wins for description/label/sequence/category.
68105
+ */
68106
+ get MetadataSource() {
68107
+ return this.Get('MetadataSource');
68108
+ }
68109
+ set MetadataSource(value) {
68110
+ this.Set('MetadataSource', value);
68111
+ }
68112
+ /**
67786
68113
  * * Field Name: IntegrationObject
67787
- * * Display Name: Integration Object Name
68114
+ * * Display Name: Integration Object
67788
68115
  * * SQL Data Type: nvarchar(255)
67789
68116
  */
67790
68117
  get IntegrationObject() {
@@ -67792,7 +68119,7 @@ let MJIntegrationObjectFieldEntity = class MJIntegrationObjectFieldEntity extend
67792
68119
  }
67793
68120
  /**
67794
68121
  * * Field Name: RelatedIntegrationObject
67795
- * * Display Name: Related Object Name
68122
+ * * Display Name: Related Integration Object Name
67796
68123
  * * SQL Data Type: nvarchar(255)
67797
68124
  */
67798
68125
  get RelatedIntegrationObject() {
@@ -67846,7 +68173,7 @@ let MJIntegrationObjectEntity = class MJIntegrationObjectEntity extends BaseEnti
67846
68173
  }
67847
68174
  /**
67848
68175
  * * Field Name: IntegrationID
67849
- * * Display Name: Integration ID
68176
+ * * Display Name: Integration
67850
68177
  * * SQL Data Type: uniqueidentifier
67851
68178
  * * Related Entity/Foreign Key: MJ: Integrations (vwIntegrations.ID)
67852
68179
  * * Description: Foreign key to the Integration that owns this object
@@ -68125,8 +68452,210 @@ let MJIntegrationObjectEntity = class MJIntegrationObjectEntity extends BaseEnti
68125
68452
  this.Set('IsCustom', value);
68126
68453
  }
68127
68454
  /**
68455
+ * * Field Name: CreateAPIPath
68456
+ * * Display Name: Create API Path
68457
+ * * SQL Data Type: nvarchar(MAX)
68458
+ * * Description: HTTP path template for create operations. Generic CRUD in BaseRESTIntegrationConnector substitutes parent IDs into {var} placeholders. NULL means create not supported via metadata-driven path.
68459
+ */
68460
+ get CreateAPIPath() {
68461
+ return this.Get('CreateAPIPath');
68462
+ }
68463
+ set CreateAPIPath(value) {
68464
+ this.Set('CreateAPIPath', value);
68465
+ }
68466
+ /**
68467
+ * * Field Name: CreateMethod
68468
+ * * Display Name: Create Method
68469
+ * * SQL Data Type: nvarchar(20)
68470
+ * * Description: HTTP method for create (typically POST). NULL means create not supported via metadata-driven path.
68471
+ */
68472
+ get CreateMethod() {
68473
+ return this.Get('CreateMethod');
68474
+ }
68475
+ set CreateMethod(value) {
68476
+ this.Set('CreateMethod', value);
68477
+ }
68478
+ /**
68479
+ * * Field Name: CreateBodyShape
68480
+ * * Display Name: Create Body Shape
68481
+ * * SQL Data Type: nvarchar(50)
68482
+ * * Value List Type: List
68483
+ * * Possible Values
68484
+ * * flat
68485
+ * * literal
68486
+ * * wrapped
68487
+ * * Description: Request body shape for create: flat (top-level fields), wrapped (under CreateBodyKey), or literal (connector overrides CreateRecord and supplies own body).
68488
+ */
68489
+ get CreateBodyShape() {
68490
+ return this.Get('CreateBodyShape');
68491
+ }
68492
+ set CreateBodyShape(value) {
68493
+ this.Set('CreateBodyShape', value);
68494
+ }
68495
+ /**
68496
+ * * Field Name: CreateBodyKey
68497
+ * * Display Name: Create Body Key
68498
+ * * SQL Data Type: nvarchar(100)
68499
+ * * Description: Wrapper key for create body when CreateBodyShape=wrapped. Example: 'member' for YourMembership which wraps body as {member:{...}}.
68500
+ */
68501
+ get CreateBodyKey() {
68502
+ return this.Get('CreateBodyKey');
68503
+ }
68504
+ set CreateBodyKey(value) {
68505
+ this.Set('CreateBodyKey', value);
68506
+ }
68507
+ /**
68508
+ * * Field Name: CreateIDLocation
68509
+ * * Display Name: Create ID Location
68510
+ * * SQL Data Type: nvarchar(20)
68511
+ * * Value List Type: List
68512
+ * * Possible Values
68513
+ * * body
68514
+ * * header
68515
+ * * n/a
68516
+ * * path
68517
+ * * Description: Where the created record ID is found in the create response: path (URL of returned Location header), body (parsed from JSON response), header (specific named header).
68518
+ */
68519
+ get CreateIDLocation() {
68520
+ return this.Get('CreateIDLocation');
68521
+ }
68522
+ set CreateIDLocation(value) {
68523
+ this.Set('CreateIDLocation', value);
68524
+ }
68525
+ /**
68526
+ * * Field Name: UpdateAPIPath
68527
+ * * Display Name: Update API Path
68528
+ * * SQL Data Type: nvarchar(MAX)
68529
+ * * Description: HTTP path template for update operations. Typically contains {ID} placeholder substituted with the record ExternalID at runtime.
68530
+ */
68531
+ get UpdateAPIPath() {
68532
+ return this.Get('UpdateAPIPath');
68533
+ }
68534
+ set UpdateAPIPath(value) {
68535
+ this.Set('UpdateAPIPath', value);
68536
+ }
68537
+ /**
68538
+ * * Field Name: UpdateMethod
68539
+ * * Display Name: Update Method
68540
+ * * SQL Data Type: nvarchar(20)
68541
+ * * Description: HTTP method for update (typically PATCH or PUT).
68542
+ */
68543
+ get UpdateMethod() {
68544
+ return this.Get('UpdateMethod');
68545
+ }
68546
+ set UpdateMethod(value) {
68547
+ this.Set('UpdateMethod', value);
68548
+ }
68549
+ /**
68550
+ * * Field Name: UpdateBodyShape
68551
+ * * Display Name: Update Body Shape
68552
+ * * SQL Data Type: nvarchar(50)
68553
+ * * Value List Type: List
68554
+ * * Possible Values
68555
+ * * flat
68556
+ * * literal
68557
+ * * wrapped
68558
+ * * Description: Request body shape for update: flat | wrapped | literal. See CreateBodyShape.
68559
+ */
68560
+ get UpdateBodyShape() {
68561
+ return this.Get('UpdateBodyShape');
68562
+ }
68563
+ set UpdateBodyShape(value) {
68564
+ this.Set('UpdateBodyShape', value);
68565
+ }
68566
+ /**
68567
+ * * Field Name: UpdateBodyKey
68568
+ * * Display Name: Update Body Key
68569
+ * * SQL Data Type: nvarchar(100)
68570
+ * * Description: Wrapper key for update body when UpdateBodyShape=wrapped.
68571
+ */
68572
+ get UpdateBodyKey() {
68573
+ return this.Get('UpdateBodyKey');
68574
+ }
68575
+ set UpdateBodyKey(value) {
68576
+ this.Set('UpdateBodyKey', value);
68577
+ }
68578
+ /**
68579
+ * * Field Name: UpdateIDLocation
68580
+ * * Display Name: Update ID Location
68581
+ * * SQL Data Type: nvarchar(20)
68582
+ * * Value List Type: List
68583
+ * * Possible Values
68584
+ * * body
68585
+ * * header
68586
+ * * n/a
68587
+ * * path
68588
+ * * Description: For update: where the target record ID is located in the request — typically 'path' (substituted into UpdateAPIPath URL template).
68589
+ */
68590
+ get UpdateIDLocation() {
68591
+ return this.Get('UpdateIDLocation');
68592
+ }
68593
+ set UpdateIDLocation(value) {
68594
+ this.Set('UpdateIDLocation', value);
68595
+ }
68596
+ /**
68597
+ * * Field Name: DeleteAPIPath
68598
+ * * Display Name: Delete API Path
68599
+ * * SQL Data Type: nvarchar(MAX)
68600
+ * * Description: HTTP path template for delete operations. Typically contains {ID} placeholder. NULL means delete not supported via metadata-driven path. (Existing DeleteMethod column carries the verb.)
68601
+ */
68602
+ get DeleteAPIPath() {
68603
+ return this.Get('DeleteAPIPath');
68604
+ }
68605
+ set DeleteAPIPath(value) {
68606
+ this.Set('DeleteAPIPath', value);
68607
+ }
68608
+ /**
68609
+ * * Field Name: DeleteIDLocation
68610
+ * * Display Name: Delete ID Location
68611
+ * * SQL Data Type: nvarchar(20)
68612
+ * * Value List Type: List
68613
+ * * Possible Values
68614
+ * * body
68615
+ * * header
68616
+ * * n/a
68617
+ * * path
68618
+ * * Description: For delete: where the target record ID is located — typically 'path'.
68619
+ */
68620
+ get DeleteIDLocation() {
68621
+ return this.Get('DeleteIDLocation');
68622
+ }
68623
+ set DeleteIDLocation(value) {
68624
+ this.Set('DeleteIDLocation', value);
68625
+ }
68626
+ /**
68627
+ * * Field Name: IncrementalWatermarkField
68628
+ * * Display Name: Incremental Watermark Field
68629
+ * * SQL Data Type: nvarchar(255)
68630
+ * * Description: Vendor field name marking "last changed" — drives incremental sync filter when SupportsIncrementalSync=1. The exact filter syntax (e.g., $filter=Modified gt {value} or modified_since={value}) lives in Configuration.incrementalFilterFormat. Provable-only: leave NULL if docs do not name a watermark field.
68631
+ */
68632
+ get IncrementalWatermarkField() {
68633
+ return this.Get('IncrementalWatermarkField');
68634
+ }
68635
+ set IncrementalWatermarkField(value) {
68636
+ this.Set('IncrementalWatermarkField', value);
68637
+ }
68638
+ /**
68639
+ * * Field Name: MetadataSource
68640
+ * * Display Name: Metadata Source
68641
+ * * SQL Data Type: nvarchar(20)
68642
+ * * Default Value: Declared
68643
+ * * Value List Type: List
68644
+ * * Possible Values
68645
+ * * Custom
68646
+ * * Declared
68647
+ * * Discovered
68648
+ * * Description: Provenance of this IntegrationObject row: Declared (from static research/docs), Discovered (from runtime API introspection like Salesforce /describe), Custom (genuinely customer-created, e.g., HubSpot custom objects). Drives merge precedence in IntegrationSchemaSync.
68649
+ */
68650
+ get MetadataSource() {
68651
+ return this.Get('MetadataSource');
68652
+ }
68653
+ set MetadataSource(value) {
68654
+ this.Set('MetadataSource', value);
68655
+ }
68656
+ /**
68128
68657
  * * Field Name: Integration
68129
- * * Display Name: Integration
68658
+ * * Display Name: Integration Name
68130
68659
  * * SQL Data Type: nvarchar(100)
68131
68660
  */
68132
68661
  get Integration() {
@@ -80404,7 +80933,7 @@ let MJScheduledJobEntity = class MJScheduledJobEntity extends BaseEntity {
80404
80933
  }
80405
80934
  /**
80406
80935
  * * Field Name: NotifyViaInApp
80407
- * * Display Name: Notify Via In App
80936
+ * * Display Name: Notify Via In-App
80408
80937
  * * SQL Data Type: bit
80409
80938
  * * Default Value: 1
80410
80939
  * * Description: Whether to send in-app notifications. Requires NotifyOnSuccess or NotifyOnFailure to also be enabled. Defaults to true.
@@ -80500,6 +81029,19 @@ let MJScheduledJobEntity = class MJScheduledJobEntity extends BaseEntity {
80500
81029
  return this.Get('__mj_UpdatedAt');
80501
81030
  }
80502
81031
  /**
81032
+ * * Field Name: RunImmediatelyIfNeverRun
81033
+ * * Display Name: Run Immediately If Never Run
81034
+ * * SQL Data Type: bit
81035
+ * * Default Value: 0
81036
+ * * Description: When true AND LastRunAt IS NULL, the scheduler sets NextRunAt to now() instead of the next cron tick on initialization, so the job runs on the next polling cycle. Useful for newly-seeded jobs that should not wait up to a full cron interval before their first execution.
81037
+ */
81038
+ get RunImmediatelyIfNeverRun() {
81039
+ return this.Get('RunImmediatelyIfNeverRun');
81040
+ }
81041
+ set RunImmediatelyIfNeverRun(value) {
81042
+ this.Set('RunImmediatelyIfNeverRun', value);
81043
+ }
81044
+ /**
80503
81045
  * * Field Name: JobType
80504
81046
  * * Display Name: Job Type
80505
81047
  * * SQL Data Type: nvarchar(100)
@@ -83538,6 +84080,24 @@ let MJTagSynonymEntity = class MJTagSynonymEntity extends BaseEntity {
83538
84080
  return this.Get('__mj_UpdatedAt');
83539
84081
  }
83540
84082
  /**
84083
+ * * Field Name: Status
84084
+ * * Display Name: Status
84085
+ * * SQL Data Type: nvarchar(20)
84086
+ * * Default Value: Active
84087
+ * * Value List Type: List
84088
+ * * Possible Values
84089
+ * * Active
84090
+ * * Pending
84091
+ * * Rejected
84092
+ * * Description: Approval state of the synonym. Active = resolves to its tag during classification. Pending = proposed (e.g. by the LLM or a bulk import) and awaiting human review; does not resolve until approved. Rejected = reviewed and declined; retained for audit and to suppress re-proposal.
84093
+ */
84094
+ get Status() {
84095
+ return this.Get('Status');
84096
+ }
84097
+ set Status(value) {
84098
+ this.Set('Status', value);
84099
+ }
84100
+ /**
83541
84101
  * * Field Name: Tag
83542
84102
  * * Display Name: Tag Name
83543
84103
  * * SQL Data Type: nvarchar(255)
@@ -87777,6 +88337,41 @@ let MJUserApplicationEntity = class MJUserApplicationEntity extends BaseEntity {
87777
88337
  return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
87778
88338
  }
87779
88339
  /**
88340
+ * MJ: User Applications - Delete method override to wrap in transaction since CascadeDeletes is true.
88341
+ * Wrapping in a transaction ensures that all cascade delete operations are handled atomically.
88342
+ * @public
88343
+ * @method
88344
+ * @override
88345
+ * @memberof MJUserApplicationEntity
88346
+ * @returns {Promise<boolean>} - true if successful, false otherwise
88347
+ */
88348
+ async Delete(options) {
88349
+ if (Metadata.Provider.ProviderType === ProviderType.Database) { // global-provider-ok: codegen runs offline against a single provider
88350
+ // For database providers, use the transaction methods directly
88351
+ const provider = Metadata.Provider; // global-provider-ok: codegen runs offline against a single provider
88352
+ try {
88353
+ await provider.BeginTransaction();
88354
+ const result = await super.Delete(options);
88355
+ if (result) {
88356
+ await provider.CommitTransaction();
88357
+ return true;
88358
+ }
88359
+ else {
88360
+ await provider.RollbackTransaction();
88361
+ return false;
88362
+ }
88363
+ }
88364
+ catch (error) {
88365
+ await provider.RollbackTransaction();
88366
+ throw error;
88367
+ }
88368
+ }
88369
+ else {
88370
+ // For network providers, cascading deletes are handled server-side
88371
+ return super.Delete(options);
88372
+ }
88373
+ }
88374
+ /**
87780
88375
  * * Field Name: ID
87781
88376
  * * SQL Data Type: uniqueidentifier
87782
88377
  * * Default Value: newsequentialid()