@memberjunction/core-entities 6.1.0-edge.1 → 6.1.0-edge.2

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.
@@ -201,7 +201,6 @@ export declare const MJActionExecutionLogSchema: z.ZodObject<{
201
201
  ResultParams: z.ZodNullable<z.ZodString>;
202
202
  Action: z.ZodString;
203
203
  User: z.ZodString;
204
- EntityAction: z.ZodNullable<z.ZodString>;
205
204
  EntityActionInvocationType: z.ZodNullable<z.ZodString>;
206
205
  TargetEntity: z.ZodNullable<z.ZodString>;
207
206
  }, "strip", z.ZodTypeAny, {
@@ -223,7 +222,6 @@ export declare const MJActionExecutionLogSchema: z.ZodObject<{
223
222
  TargetEntityID?: string;
224
223
  TargetRecordID?: string;
225
224
  ResultParams?: string;
226
- EntityAction?: string;
227
225
  EntityActionInvocationType?: string;
228
226
  TargetEntity?: string;
229
227
  }, {
@@ -245,7 +243,6 @@ export declare const MJActionExecutionLogSchema: z.ZodObject<{
245
243
  TargetEntityID?: string;
246
244
  TargetRecordID?: string;
247
245
  ResultParams?: string;
248
- EntityAction?: string;
249
246
  EntityActionInvocationType?: string;
250
247
  TargetEntity?: string;
251
248
  }>;
@@ -1593,6 +1590,7 @@ export declare const MJAIAgentRequestSchema: z.ZodObject<{
1593
1590
  OriginatingAgentRunStepID: z.ZodNullable<z.ZodString>;
1594
1591
  ResumingAgentRunID: z.ZodNullable<z.ZodString>;
1595
1592
  ResponseSource: z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"API">, z.ZodLiteral<"Conversation">, z.ZodLiteral<"Dashboard">]>>;
1593
+ OriginatingTaskID: z.ZodNullable<z.ZodString>;
1596
1594
  Agent: z.ZodNullable<z.ZodString>;
1597
1595
  RequestForUser: z.ZodNullable<z.ZodString>;
1598
1596
  ResponseByUser: z.ZodNullable<z.ZodString>;
@@ -1600,6 +1598,7 @@ export declare const MJAIAgentRequestSchema: z.ZodObject<{
1600
1598
  OriginatingAgentRun: z.ZodNullable<z.ZodString>;
1601
1599
  OriginatingAgentRunStep: z.ZodNullable<z.ZodString>;
1602
1600
  ResumingAgentRun: z.ZodNullable<z.ZodString>;
1601
+ OriginatingTask: z.ZodNullable<z.ZodString>;
1603
1602
  }, "strip", z.ZodTypeAny, {
1604
1603
  ID?: string;
1605
1604
  ExpiresAt?: Date;
@@ -1623,12 +1622,14 @@ export declare const MJAIAgentRequestSchema: z.ZodObject<{
1623
1622
  OriginatingAgentRunStepID?: string;
1624
1623
  ResumingAgentRunID?: string;
1625
1624
  ResponseSource?: "API" | "Conversation" | "Dashboard";
1625
+ OriginatingTaskID?: string;
1626
1626
  RequestForUser?: string;
1627
1627
  ResponseByUser?: string;
1628
1628
  RequestType?: string;
1629
1629
  OriginatingAgentRun?: string;
1630
1630
  OriginatingAgentRunStep?: string;
1631
1631
  ResumingAgentRun?: string;
1632
+ OriginatingTask?: string;
1632
1633
  }, {
1633
1634
  ID?: string;
1634
1635
  ExpiresAt?: Date;
@@ -1652,12 +1653,14 @@ export declare const MJAIAgentRequestSchema: z.ZodObject<{
1652
1653
  OriginatingAgentRunStepID?: string;
1653
1654
  ResumingAgentRunID?: string;
1654
1655
  ResponseSource?: "API" | "Conversation" | "Dashboard";
1656
+ OriginatingTaskID?: string;
1655
1657
  RequestForUser?: string;
1656
1658
  ResponseByUser?: string;
1657
1659
  RequestType?: string;
1658
1660
  OriginatingAgentRun?: string;
1659
1661
  OriginatingAgentRunStep?: string;
1660
1662
  ResumingAgentRun?: string;
1663
+ OriginatingTask?: string;
1661
1664
  }>;
1662
1665
  export type MJAIAgentRequestEntityType = z.infer<typeof MJAIAgentRequestSchema>;
1663
1666
  /**
@@ -2408,7 +2411,7 @@ export declare const MJAIAgentStepSchema: z.ZodObject<{
2408
2411
  AgentID: z.ZodString;
2409
2412
  Name: z.ZodString;
2410
2413
  Description: z.ZodNullable<z.ZodString>;
2411
- StepType: z.ZodUnion<[z.ZodLiteral<"Action">, z.ZodLiteral<"ForEach">, z.ZodLiteral<"Prompt">, z.ZodLiteral<"Sub-Agent">, z.ZodLiteral<"While">]>;
2414
+ StepType: z.ZodUnion<[z.ZodLiteral<"Action">, z.ZodLiteral<"ForEach">, z.ZodLiteral<"Human">, z.ZodLiteral<"Prompt">, z.ZodLiteral<"Sub-Agent">, z.ZodLiteral<"While">]>;
2412
2415
  StartingStep: z.ZodBoolean;
2413
2416
  TimeoutSeconds: z.ZodNullable<z.ZodNumber>;
2414
2417
  RetryCount: z.ZodNumber;
@@ -2449,7 +2452,7 @@ export declare const MJAIAgentStepSchema: z.ZodObject<{
2449
2452
  SubAgent?: string;
2450
2453
  Width?: number;
2451
2454
  Height?: number;
2452
- StepType?: "Action" | "Prompt" | "ForEach" | "Sub-Agent" | "While";
2455
+ StepType?: "Action" | "Prompt" | "ForEach" | "Sub-Agent" | "While" | "Human";
2453
2456
  StartingStep?: boolean;
2454
2457
  TimeoutSeconds?: number;
2455
2458
  RetryCount?: number;
@@ -2477,7 +2480,7 @@ export declare const MJAIAgentStepSchema: z.ZodObject<{
2477
2480
  SubAgent?: string;
2478
2481
  Width?: number;
2479
2482
  Height?: number;
2480
- StepType?: "Action" | "Prompt" | "ForEach" | "Sub-Agent" | "While";
2483
+ StepType?: "Action" | "Prompt" | "ForEach" | "Sub-Agent" | "While" | "Human";
2481
2484
  StartingStep?: boolean;
2482
2485
  TimeoutSeconds?: number;
2483
2486
  RetryCount?: number;
@@ -3517,6 +3520,7 @@ export declare const MJAIModelTypeSchema: z.ZodObject<{
3517
3520
  DefaultOutputModalityID: z.ZodString;
3518
3521
  SupportsPrefill: z.ZodBoolean;
3519
3522
  PrefillFallbackText: z.ZodNullable<z.ZodString>;
3523
+ ModelConfiguration: z.ZodNullable<z.ZodAny>;
3520
3524
  DefaultInputModality: z.ZodString;
3521
3525
  DefaultOutputModality: z.ZodString;
3522
3526
  }, "strip", z.ZodTypeAny, {
@@ -3529,6 +3533,7 @@ export declare const MJAIModelTypeSchema: z.ZodObject<{
3529
3533
  DefaultOutputModalityID?: string;
3530
3534
  SupportsPrefill?: boolean;
3531
3535
  PrefillFallbackText?: string;
3536
+ ModelConfiguration?: any;
3532
3537
  DefaultInputModality?: string;
3533
3538
  DefaultOutputModality?: string;
3534
3539
  }, {
@@ -3541,6 +3546,7 @@ export declare const MJAIModelTypeSchema: z.ZodObject<{
3541
3546
  DefaultOutputModalityID?: string;
3542
3547
  SupportsPrefill?: boolean;
3543
3548
  PrefillFallbackText?: string;
3549
+ ModelConfiguration?: any;
3544
3550
  DefaultInputModality?: string;
3545
3551
  DefaultOutputModality?: string;
3546
3552
  }>;
@@ -3567,6 +3573,7 @@ export declare const MJAIModelVendorSchema: z.ZodObject<{
3567
3573
  TypeID: z.ZodString;
3568
3574
  SupportsPrefill: z.ZodNullable<z.ZodBoolean>;
3569
3575
  PrefillFallbackText: z.ZodNullable<z.ZodString>;
3576
+ ModelConfiguration: z.ZodNullable<z.ZodAny>;
3570
3577
  Model: z.ZodString;
3571
3578
  Vendor: z.ZodString;
3572
3579
  Type: z.ZodString;
@@ -3585,6 +3592,7 @@ export declare const MJAIModelVendorSchema: z.ZodObject<{
3585
3592
  VendorID?: string;
3586
3593
  SupportsPrefill?: boolean;
3587
3594
  PrefillFallbackText?: string;
3595
+ ModelConfiguration?: any;
3588
3596
  DriverImportPath?: string;
3589
3597
  APIName?: string;
3590
3598
  MaxInputTokens?: number;
@@ -3607,6 +3615,7 @@ export declare const MJAIModelVendorSchema: z.ZodObject<{
3607
3615
  VendorID?: string;
3608
3616
  SupportsPrefill?: boolean;
3609
3617
  PrefillFallbackText?: string;
3618
+ ModelConfiguration?: any;
3610
3619
  DriverImportPath?: string;
3611
3620
  APIName?: string;
3612
3621
  MaxInputTokens?: number;
@@ -3635,6 +3644,7 @@ export declare const MJAIModelSchema: z.ZodObject<{
3635
3644
  PriorVersionID: z.ZodNullable<z.ZodString>;
3636
3645
  SupportsPrefill: z.ZodNullable<z.ZodBoolean>;
3637
3646
  PrefillFallbackText: z.ZodNullable<z.ZodString>;
3647
+ ModelConfiguration: z.ZodNullable<z.ZodAny>;
3638
3648
  AIModelType: z.ZodString;
3639
3649
  Vendor: z.ZodNullable<z.ZodString>;
3640
3650
  DriverClass: z.ZodNullable<z.ZodString>;
@@ -3654,6 +3664,7 @@ export declare const MJAIModelSchema: z.ZodObject<{
3654
3664
  Vendor?: string;
3655
3665
  SupportsPrefill?: boolean;
3656
3666
  PrefillFallbackText?: string;
3667
+ ModelConfiguration?: any;
3657
3668
  DriverImportPath?: string;
3658
3669
  APIName?: string;
3659
3670
  SupportedResponseFormats?: string;
@@ -3678,6 +3689,7 @@ export declare const MJAIModelSchema: z.ZodObject<{
3678
3689
  Vendor?: string;
3679
3690
  SupportsPrefill?: boolean;
3680
3691
  PrefillFallbackText?: string;
3692
+ ModelConfiguration?: any;
3681
3693
  DriverImportPath?: string;
3682
3694
  APIName?: string;
3683
3695
  SupportedResponseFormats?: string;
@@ -9878,7 +9890,6 @@ export declare const MJEntityActionFilterSchema: z.ZodObject<{
9878
9890
  Status: z.ZodUnion<[z.ZodLiteral<"Active">, z.ZodLiteral<"Disabled">, z.ZodLiteral<"Pending">]>;
9879
9891
  __mj_CreatedAt: z.ZodDate;
9880
9892
  __mj_UpdatedAt: z.ZodDate;
9881
- EntityAction: z.ZodString;
9882
9893
  ActionFilter: z.ZodString;
9883
9894
  }, "strip", z.ZodTypeAny, {
9884
9895
  ID?: string;
@@ -9886,7 +9897,6 @@ export declare const MJEntityActionFilterSchema: z.ZodObject<{
9886
9897
  __mj_UpdatedAt?: Date;
9887
9898
  Status?: "Active" | "Disabled" | "Pending";
9888
9899
  EntityActionID?: string;
9889
- EntityAction?: string;
9890
9900
  Sequence?: number;
9891
9901
  ActionFilterID?: string;
9892
9902
  ActionFilter?: string;
@@ -9896,7 +9906,6 @@ export declare const MJEntityActionFilterSchema: z.ZodObject<{
9896
9906
  __mj_UpdatedAt?: Date;
9897
9907
  Status?: "Active" | "Disabled" | "Pending";
9898
9908
  EntityActionID?: string;
9899
- EntityAction?: string;
9900
9909
  Sequence?: number;
9901
9910
  ActionFilterID?: string;
9902
9911
  ActionFilter?: string;
@@ -9939,7 +9948,6 @@ export declare const MJEntityActionInvocationSchema: z.ZodObject<{
9939
9948
  __mj_CreatedAt: z.ZodDate;
9940
9949
  __mj_UpdatedAt: z.ZodDate;
9941
9950
  RuntimeUXDriverClass: z.ZodNullable<z.ZodString>;
9942
- EntityAction: z.ZodString;
9943
9951
  InvocationType: z.ZodString;
9944
9952
  }, "strip", z.ZodTypeAny, {
9945
9953
  ID?: string;
@@ -9947,7 +9955,6 @@ export declare const MJEntityActionInvocationSchema: z.ZodObject<{
9947
9955
  __mj_UpdatedAt?: Date;
9948
9956
  Status?: "Active" | "Disabled" | "Pending";
9949
9957
  EntityActionID?: string;
9950
- EntityAction?: string;
9951
9958
  InvocationTypeID?: string;
9952
9959
  RuntimeUXDriverClass?: string;
9953
9960
  InvocationType?: string;
@@ -9957,7 +9964,6 @@ export declare const MJEntityActionInvocationSchema: z.ZodObject<{
9957
9964
  __mj_UpdatedAt?: Date;
9958
9965
  Status?: "Active" | "Disabled" | "Pending";
9959
9966
  EntityActionID?: string;
9960
- EntityAction?: string;
9961
9967
  InvocationTypeID?: string;
9962
9968
  RuntimeUXDriverClass?: string;
9963
9969
  InvocationType?: string;
@@ -9976,7 +9982,6 @@ export declare const MJEntityActionParamSchema: z.ZodObject<{
9976
9982
  __mj_CreatedAt: z.ZodDate;
9977
9983
  __mj_UpdatedAt: z.ZodDate;
9978
9984
  LogValue: z.ZodNullable<z.ZodBoolean>;
9979
- EntityAction: z.ZodString;
9980
9985
  ActionParam: z.ZodString;
9981
9986
  }, "strip", z.ZodTypeAny, {
9982
9987
  ID?: string;
@@ -9984,7 +9989,6 @@ export declare const MJEntityActionParamSchema: z.ZodObject<{
9984
9989
  __mj_UpdatedAt?: Date;
9985
9990
  Comments?: string;
9986
9991
  EntityActionID?: string;
9987
- EntityAction?: string;
9988
9992
  ValueType?: "Entity Field" | "Entity Object" | "Entity Object Data" | "Script" | "Static";
9989
9993
  LogValue?: boolean;
9990
9994
  Value?: string;
@@ -9996,7 +10000,6 @@ export declare const MJEntityActionParamSchema: z.ZodObject<{
9996
10000
  __mj_UpdatedAt?: Date;
9997
10001
  Comments?: string;
9998
10002
  EntityActionID?: string;
9999
- EntityAction?: string;
10000
10003
  ValueType?: "Entity Field" | "Entity Object" | "Entity Object Data" | "Script" | "Static";
10001
10004
  LogValue?: boolean;
10002
10005
  Value?: string;
@@ -10018,6 +10021,7 @@ export declare const MJEntityActionSchema: z.ZodObject<{
10018
10021
  ScopeEntityID: z.ZodNullable<z.ZodString>;
10019
10022
  ScopeRecordID: z.ZodNullable<z.ZodString>;
10020
10023
  LoggingMode: z.ZodUnion<[z.ZodLiteral<"All">, z.ZodLiteral<"FailuresOnly">, z.ZodLiteral<"None">]>;
10024
+ RunMode: z.ZodUnion<[z.ZodLiteral<"Durable">, z.ZodLiteral<"Inline">]>;
10021
10025
  Entity: z.ZodString;
10022
10026
  Action: z.ZodString;
10023
10027
  ScopeEntity: z.ZodNullable<z.ZodString>;
@@ -10034,6 +10038,7 @@ export declare const MJEntityActionSchema: z.ZodObject<{
10034
10038
  ScopeEntityID?: string;
10035
10039
  ScopeRecordID?: string;
10036
10040
  LoggingMode?: "None" | "All" | "FailuresOnly";
10041
+ RunMode?: "Inline" | "Durable";
10037
10042
  ScopeEntity?: string;
10038
10043
  }, {
10039
10044
  ID?: string;
@@ -10048,6 +10053,7 @@ export declare const MJEntityActionSchema: z.ZodObject<{
10048
10053
  ScopeEntityID?: string;
10049
10054
  ScopeRecordID?: string;
10050
10055
  LoggingMode?: "None" | "All" | "FailuresOnly";
10056
+ RunMode?: "Inline" | "Durable";
10051
10057
  ScopeEntity?: string;
10052
10058
  }>;
10053
10059
  export type MJEntityActionEntityType = z.infer<typeof MJEntityActionSchema>;
@@ -17287,26 +17293,35 @@ export declare const MJTaskDependencySchema: z.ZodObject<{
17287
17293
  __mj_CreatedAt: z.ZodDate;
17288
17294
  __mj_UpdatedAt: z.ZodDate;
17289
17295
  Condition: z.ZodNullable<z.ZodString>;
17296
+ Priority: z.ZodNumber;
17297
+ Sequence: z.ZodNumber;
17298
+ ExclusiveGroup: z.ZodNullable<z.ZodString>;
17290
17299
  Task: z.ZodString;
17291
17300
  DependsOnTask: z.ZodString;
17292
17301
  }, "strip", z.ZodTypeAny, {
17293
17302
  ID?: string;
17294
17303
  __mj_CreatedAt?: Date;
17295
17304
  __mj_UpdatedAt?: Date;
17305
+ Sequence?: number;
17306
+ Priority?: number;
17296
17307
  Condition?: string;
17297
17308
  TaskID?: string;
17298
17309
  DependsOnTaskID?: string;
17299
17310
  DependencyType?: "Corequisite" | "Optional" | "Prerequisite";
17311
+ ExclusiveGroup?: string;
17300
17312
  Task?: string;
17301
17313
  DependsOnTask?: string;
17302
17314
  }, {
17303
17315
  ID?: string;
17304
17316
  __mj_CreatedAt?: Date;
17305
17317
  __mj_UpdatedAt?: Date;
17318
+ Sequence?: number;
17319
+ Priority?: number;
17306
17320
  Condition?: string;
17307
17321
  TaskID?: string;
17308
17322
  DependsOnTaskID?: string;
17309
17323
  DependencyType?: "Corequisite" | "Optional" | "Prerequisite";
17324
+ ExclusiveGroup?: string;
17310
17325
  Task?: string;
17311
17326
  DependsOnTask?: string;
17312
17327
  }>;
@@ -17348,7 +17363,7 @@ export declare const MJTaskSchema: z.ZodObject<{
17348
17363
  ConversationDetailID: z.ZodNullable<z.ZodString>;
17349
17364
  UserID: z.ZodNullable<z.ZodString>;
17350
17365
  AgentID: z.ZodNullable<z.ZodString>;
17351
- Status: z.ZodUnion<[z.ZodLiteral<"Blocked">, z.ZodLiteral<"Cancelled">, z.ZodLiteral<"Complete">, z.ZodLiteral<"Deferred">, z.ZodLiteral<"Failed">, z.ZodLiteral<"In Progress">, z.ZodLiteral<"Pending">]>;
17366
+ Status: z.ZodUnion<[z.ZodLiteral<"Blocked">, z.ZodLiteral<"Cancelled">, z.ZodLiteral<"Complete">, z.ZodLiteral<"Deferred">, z.ZodLiteral<"Failed">, z.ZodLiteral<"In Progress">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Skipped">]>;
17352
17367
  PercentComplete: z.ZodNullable<z.ZodNumber>;
17353
17368
  DueAt: z.ZodNullable<z.ZodDate>;
17354
17369
  StartedAt: z.ZodNullable<z.ZodDate>;
@@ -17361,6 +17376,10 @@ export declare const MJTaskSchema: z.ZodObject<{
17361
17376
  AgentRunID: z.ZodNullable<z.ZodString>;
17362
17377
  ClaimedBy: z.ZodNullable<z.ZodString>;
17363
17378
  ClaimExpiresAt: z.ZodNullable<z.ZodDate>;
17379
+ ActionID: z.ZodNullable<z.ZodString>;
17380
+ StepType: z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"Action">, z.ZodLiteral<"Agent">, z.ZodLiteral<"External">, z.ZodLiteral<"ForEach">, z.ZodLiteral<"Human">, z.ZodLiteral<"Prompt">, z.ZodLiteral<"While">]>>;
17381
+ PromptID: z.ZodNullable<z.ZodString>;
17382
+ Configuration: z.ZodNullable<z.ZodAny>;
17364
17383
  Parent: z.ZodNullable<z.ZodString>;
17365
17384
  Type: z.ZodString;
17366
17385
  Environment: z.ZodString;
@@ -17369,16 +17388,20 @@ export declare const MJTaskSchema: z.ZodObject<{
17369
17388
  User: z.ZodNullable<z.ZodString>;
17370
17389
  Agent: z.ZodNullable<z.ZodString>;
17371
17390
  AgentRun: z.ZodNullable<z.ZodString>;
17391
+ Action: z.ZodNullable<z.ZodString>;
17392
+ Prompt: z.ZodNullable<z.ZodString>;
17372
17393
  RootParentID: z.ZodNullable<z.ZodString>;
17373
17394
  }, "strip", z.ZodTypeAny, {
17374
17395
  ID?: string;
17375
17396
  User?: string;
17376
17397
  __mj_CreatedAt?: Date;
17377
17398
  __mj_UpdatedAt?: Date;
17399
+ ActionID?: string;
17400
+ Action?: string;
17378
17401
  Name?: string;
17379
17402
  Description?: string;
17380
17403
  ParentID?: string;
17381
- Status?: "Pending" | "Complete" | "Failed" | "Cancelled" | "In Progress" | "Blocked" | "Deferred";
17404
+ Status?: "Pending" | "Complete" | "Failed" | "Cancelled" | "Skipped" | "In Progress" | "Blocked" | "Deferred";
17382
17405
  Parent?: string;
17383
17406
  RootParentID?: string;
17384
17407
  StartedAt?: Date;
@@ -17386,8 +17409,12 @@ export declare const MJTaskSchema: z.ZodObject<{
17386
17409
  Type?: string;
17387
17410
  AgentID?: string;
17388
17411
  Agent?: string;
17412
+ Configuration?: any;
17413
+ PromptID?: string;
17414
+ Prompt?: string;
17389
17415
  AgentRunID?: string;
17390
17416
  AgentRun?: string;
17417
+ StepType?: "Action" | "Agent" | "Prompt" | "ForEach" | "While" | "Human" | "External";
17391
17418
  CompletedAt?: Date;
17392
17419
  ErrorMessage?: string;
17393
17420
  ConversationDetailID?: string;
@@ -17408,10 +17435,12 @@ export declare const MJTaskSchema: z.ZodObject<{
17408
17435
  User?: string;
17409
17436
  __mj_CreatedAt?: Date;
17410
17437
  __mj_UpdatedAt?: Date;
17438
+ ActionID?: string;
17439
+ Action?: string;
17411
17440
  Name?: string;
17412
17441
  Description?: string;
17413
17442
  ParentID?: string;
17414
- Status?: "Pending" | "Complete" | "Failed" | "Cancelled" | "In Progress" | "Blocked" | "Deferred";
17443
+ Status?: "Pending" | "Complete" | "Failed" | "Cancelled" | "Skipped" | "In Progress" | "Blocked" | "Deferred";
17415
17444
  Parent?: string;
17416
17445
  RootParentID?: string;
17417
17446
  StartedAt?: Date;
@@ -17419,8 +17448,12 @@ export declare const MJTaskSchema: z.ZodObject<{
17419
17448
  Type?: string;
17420
17449
  AgentID?: string;
17421
17450
  Agent?: string;
17451
+ Configuration?: any;
17452
+ PromptID?: string;
17453
+ Prompt?: string;
17422
17454
  AgentRunID?: string;
17423
17455
  AgentRun?: string;
17456
+ StepType?: "Action" | "Agent" | "Prompt" | "ForEach" | "While" | "Human" | "External";
17424
17457
  CompletedAt?: Date;
17425
17458
  ErrorMessage?: string;
17426
17459
  ConversationDetailID?: string;
@@ -20070,7 +20103,7 @@ export declare class MJActionExecutionLogEntity extends BaseEntity<MJActionExecu
20070
20103
  set EndedAt(value: Date | null);
20071
20104
  /**
20072
20105
  * * Field Name: Params
20073
- * * Display Name: Params
20106
+ * * Display Name: Input Parameters
20074
20107
  * * SQL Data Type: nvarchar(MAX)
20075
20108
  * * Description: JSON-formatted input parameters AS THE ACTION WAS CALLED, captured once when execution starts and never overwritten. Custom and Generated actions mutate their parameter array in place, so this is the only durable record of the values actually passed in; the final state lives in ResultParams. Parameter values may be redacted per ActionParam.LogValue / EntityActionParam.LogValue, and whole-record value types are never written - see the parameter's own documentation.
20076
20109
  */
@@ -20094,7 +20127,7 @@ export declare class MJActionExecutionLogEntity extends BaseEntity<MJActionExecu
20094
20127
  set UserID(value: string);
20095
20128
  /**
20096
20129
  * * Field Name: RetentionPeriod
20097
- * * Display Name: Retention Period
20130
+ * * Display Name: Retention Period (Days)
20098
20131
  * * SQL Data Type: int
20099
20132
  * * Description: Number of days to retain the log; NULL for indefinite retention.
20100
20133
  */
@@ -20133,7 +20166,7 @@ export declare class MJActionExecutionLogEntity extends BaseEntity<MJActionExecu
20133
20166
  set EntityActionID(value: string | null);
20134
20167
  /**
20135
20168
  * * Field Name: EntityActionInvocationTypeID
20136
- * * Display Name: Entity Action Invocation Type ID
20169
+ * * Display Name: Invocation Type ID
20137
20170
  * * SQL Data Type: uniqueidentifier
20138
20171
  * * Related Entity/Foreign Key: MJ: Entity Action Invocation Types (vwEntityActionInvocationTypes.ID)
20139
20172
  * * Description: Optional. Which lifecycle event fired the binding - AfterUpdate, Validate, List and so on. Recorded separately from EntityActionID because one binding may be attached to several invocation types, and telling a Validate refusal apart from an AfterUpdate side effect is the first question anyone asks of this log.
@@ -20159,7 +20192,7 @@ export declare class MJActionExecutionLogEntity extends BaseEntity<MJActionExecu
20159
20192
  set TargetRecordID(value: string | null);
20160
20193
  /**
20161
20194
  * * Field Name: ResultParams
20162
- * * Display Name: Result Params
20195
+ * * Display Name: Result Parameters
20163
20196
  * * SQL Data Type: nvarchar(MAX)
20164
20197
  * * Description: JSON-formatted FINAL parameter set captured when the action finished - the inputs as the action left them, plus any output parameters it produced. Written on FAILURE exactly as on success, under the same redaction rules: a failed run's partially-mutated inputs are usually the most diagnostic thing available, and an audit trail that records only successes is not an audit trail. Distinct from Params, which holds the values the action was called with and is never overwritten. NULL means one thing only - the run never finished (process died, host killed) - so it is a signal rather than an absence, and must not be backfilled.
20165
20198
  */
@@ -20167,25 +20200,19 @@ export declare class MJActionExecutionLogEntity extends BaseEntity<MJActionExecu
20167
20200
  set ResultParams(value: string | null);
20168
20201
  /**
20169
20202
  * * Field Name: Action
20170
- * * Display Name: Action
20203
+ * * Display Name: Action Name
20171
20204
  * * SQL Data Type: nvarchar(425)
20172
20205
  */
20173
20206
  get Action(): string;
20174
20207
  /**
20175
20208
  * * Field Name: User
20176
- * * Display Name: User
20209
+ * * Display Name: User Name
20177
20210
  * * SQL Data Type: nvarchar(100)
20178
20211
  */
20179
20212
  get User(): string;
20180
20213
  /**
20181
- * * Field Name: EntityAction
20182
- * * Display Name: Entity Action
20183
- * * SQL Data Type: nvarchar(425)
20184
- */
20185
- get EntityAction(): string | null;
20186
- /**
20187
20214
  * * Field Name: EntityActionInvocationType
20188
- * * Display Name: Entity Action Invocation Type
20215
+ * * Display Name: Invocation Type
20189
20216
  * * SQL Data Type: nvarchar(255)
20190
20217
  */
20191
20218
  get EntityActionInvocationType(): string | null;
@@ -24578,7 +24605,7 @@ export declare class MJAIAgentRequestEntity extends BaseEntity<MJAIAgentRequestE
24578
24605
  set Status(value: 'Approved' | 'Canceled' | 'Expired' | 'Rejected' | 'Requested' | 'Responded');
24579
24606
  /**
24580
24607
  * * Field Name: Request
24581
- * * Display Name: Request
24608
+ * * Display Name: Request Details
24582
24609
  * * SQL Data Type: nvarchar(MAX)
24583
24610
  * * Description: Details of what the AI Agent is requesting.
24584
24611
  */
@@ -24594,7 +24621,7 @@ export declare class MJAIAgentRequestEntity extends BaseEntity<MJAIAgentRequestE
24594
24621
  set Response(value: string | null);
24595
24622
  /**
24596
24623
  * * Field Name: ResponseByUserID
24597
- * * Display Name: Response By User
24624
+ * * Display Name: Responded By User
24598
24625
  * * SQL Data Type: uniqueidentifier
24599
24626
  * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
24600
24627
  * * Description: Populated when a user responds indicating which user responded to the request.
@@ -24714,6 +24741,15 @@ export declare class MJAIAgentRequestEntity extends BaseEntity<MJAIAgentRequestE
24714
24741
  get ResponseSource(): 'API' | 'Conversation' | 'Dashboard' | null;
24715
24742
  set ResponseSource(value: 'API' | 'Conversation' | 'Dashboard' | null);
24716
24743
  /**
24744
+ * * Field Name: OriginatingTaskID
24745
+ * * Display Name: Originating Task
24746
+ * * SQL Data Type: uniqueidentifier
24747
+ * * Related Entity/Foreign Key: MJ: Tasks (vwTasks.ID)
24748
+ * * Description: The workflow step (MJ: Tasks row) waiting on this request, when it came from a task graph rather than from a running agent. Distinct from OriginatingAgentRunStepID: a task graph outlives the agent run that submitted it, so the task — not the run — is what resumes when a person answers. NULL for requests raised by a run directly.
24749
+ */
24750
+ get OriginatingTaskID(): string | null;
24751
+ set OriginatingTaskID(value: string | null);
24752
+ /**
24717
24753
  * * Field Name: Agent
24718
24754
  * * Display Name: Agent Name
24719
24755
  * * SQL Data Type: nvarchar(255)
@@ -24721,13 +24757,13 @@ export declare class MJAIAgentRequestEntity extends BaseEntity<MJAIAgentRequestE
24721
24757
  get Agent(): string | null;
24722
24758
  /**
24723
24759
  * * Field Name: RequestForUser
24724
- * * Display Name: Request For User Name
24760
+ * * Display Name: Target User
24725
24761
  * * SQL Data Type: nvarchar(100)
24726
24762
  */
24727
24763
  get RequestForUser(): string | null;
24728
24764
  /**
24729
24765
  * * Field Name: ResponseByUser
24730
- * * Display Name: Response By User Name
24766
+ * * Display Name: Responded By
24731
24767
  * * SQL Data Type: nvarchar(100)
24732
24768
  */
24733
24769
  get ResponseByUser(): string | null;
@@ -24755,6 +24791,12 @@ export declare class MJAIAgentRequestEntity extends BaseEntity<MJAIAgentRequestE
24755
24791
  * * SQL Data Type: nvarchar(255)
24756
24792
  */
24757
24793
  get ResumingAgentRun(): string | null;
24794
+ /**
24795
+ * * Field Name: OriginatingTask
24796
+ * * Display Name: Originating Task Name
24797
+ * * SQL Data Type: nvarchar(255)
24798
+ */
24799
+ get OriginatingTask(): string | null;
24758
24800
  }
24759
24801
  /**
24760
24802
  * MJ: AI Agent Run Medias - strongly typed entity sub-class
@@ -27130,13 +27172,14 @@ export declare class MJAIAgentStepEntity extends BaseEntity<MJAIAgentStepEntityT
27130
27172
  * * Possible Values
27131
27173
  * * Action
27132
27174
  * * ForEach
27175
+ * * Human
27133
27176
  * * Prompt
27134
27177
  * * Sub-Agent
27135
27178
  * * While
27136
27179
  * * Description: Type of step: Action (execute an action), Sub-Agent (delegate to another agent), or Prompt (run an AI prompt)
27137
27180
  */
27138
- get StepType(): 'Action' | 'ForEach' | 'Prompt' | 'Sub-Agent' | 'While';
27139
- set StepType(value: 'Action' | 'ForEach' | 'Prompt' | 'Sub-Agent' | 'While');
27181
+ get StepType(): 'Action' | 'ForEach' | 'Human' | 'Prompt' | 'Sub-Agent' | 'While';
27182
+ set StepType(value: 'Action' | 'ForEach' | 'Human' | 'Prompt' | 'Sub-Agent' | 'While');
27140
27183
  /**
27141
27184
  * * Field Name: StartingStep
27142
27185
  * * Display Name: Starting Step
@@ -30553,6 +30596,72 @@ export declare class MJAIModelPriceUnitTypeEntity extends BaseEntity<MJAIModelPr
30553
30596
  */
30554
30597
  get __mj_UpdatedAt(): Date;
30555
30598
  }
30599
+ /**
30600
+ * The per-modality model-configuration bag, stored as JSON in the `ModelConfiguration` column of
30601
+ * THREE catalog entities — the same type at every level, forming an inherit-with-override cascade
30602
+ * resolved base-first (deep-merged per key by `ResolveEffectiveModelConfiguration` in
30603
+ * `@memberjunction/ai`):
30604
+ *
30605
+ * ```
30606
+ * MJ: AI Model Types . ModelConfiguration (type-wide default — e.g. every Realtime model)
30607
+ * < MJ: AI Models . ModelConfiguration (per-model)
30608
+ * < MJ: AI Model Vendors . ModelConfiguration (per model-on-this-provider — the winner)
30609
+ * ```
30610
+ *
30611
+ * CodeGen emits a strongly-typed `ModelConfigurationObject` accessor on all three generated
30612
+ * entities from this definition.
30613
+ *
30614
+ * **Lockstep contract**: this file is the JSONType SOURCE; its package-side mirror is
30615
+ * `AIModelConfiguration` in `@memberjunction/ai` (`packages/AI/Core/src/generic/modelConfiguration.ts`),
30616
+ * which runtime code compiles against. Keep the two in step when adding a section or property —
30617
+ * the same pact `IAgentSettings` follows with `@memberjunction/ai-core-plus`.
30618
+ *
30619
+ * **Boundary rule**: anything the engine filters, sorts, or joins on stays a COLUMN
30620
+ * (`PowerRank`, `IsActive`, `Priority`, `Status` — SQL cannot cheaply predicate into this bag);
30621
+ * anything a driver consumes at session/call time belongs HERE. New capability knobs go in this
30622
+ * bag — do not add a new capability column per knob.
30623
+ */
30624
+ export interface MJAIModelTypeEntity_IAIModelConfiguration {
30625
+ /**
30626
+ * Text-generation knobs. Reserved — no consumers yet. Candidate contents: per-model
30627
+ * effort-level defaults, response-format quirks, tool-calling behavior flags. Existing
30628
+ * capability COLUMNS (`SupportsEffortLevel`, `SupportsStreaming`, …) are NOT migrating here —
30629
+ * new knobs only.
30630
+ */
30631
+ LLM?: Record<string, unknown> | null;
30632
+ /** Realtime (speech-to-speech) knobs — the first live section. */
30633
+ Realtime?: {
30634
+ /**
30635
+ * Catalog-level turn-detection default for this model. Folded into the realtime session
30636
+ * Config bag as the `turnDetection` key BELOW the agent/app config cascade
30637
+ * (`realtime.session.turnDetection`) and the runtime override — the catalog supplies the
30638
+ * default, agents/apps/callers refine it. Provider profiles translate the normalized
30639
+ * vocabulary to their native wire block; an unsupported Mode is diag-logged and falls back
30640
+ * to the profile default (never rejects a session).
30641
+ */
30642
+ TurnDetection?: {
30643
+ /**
30644
+ * - 'default' — let the provider profile decide (today's behavior).
30645
+ * - 'serverVad' — classic silence-based server VAD.
30646
+ * - 'semanticVad' — semantic end-of-utterance detection (OpenAI `semantic_vad`).
30647
+ * - 'native' — this model's smartest documented turn/duplex mode, whatever the profile
30648
+ * maps it to; the forward slot for full-duplex reasoning voice models (e.g. the
30649
+ * Grok Voice Think Fast family).
30650
+ */
30651
+ Mode?: 'default' | 'serverVad' | 'semanticVad' | 'native' | null;
30652
+ /** Semantic-VAD aggressiveness (OpenAI `eagerness`); ignored without a mapping. */
30653
+ Eagerness?: 'low' | 'auto' | 'high' | null;
30654
+ /** Server-VAD activation threshold (0–1); ignored without a mapping. */
30655
+ Threshold?: number | null;
30656
+ /** Server-VAD trailing-silence duration in ms; ignored without a mapping. */
30657
+ SilenceDurationMs?: number | null;
30658
+ } | null;
30659
+ } | null;
30660
+ /** Vision knobs. Reserved. */
30661
+ Vision?: Record<string, unknown> | null;
30662
+ /** Audio (TTS/STT) knobs. Reserved. */
30663
+ Audio?: Record<string, unknown> | null;
30664
+ }
30556
30665
  /**
30557
30666
  * MJ: AI Model Types - strongly typed entity sub-class
30558
30667
  * * Schema: __mj
@@ -30649,6 +30758,23 @@ export declare class MJAIModelTypeEntity extends BaseEntity<MJAIModelTypeEntityT
30649
30758
  get PrefillFallbackText(): string | null;
30650
30759
  set PrefillFallbackText(value: string | null);
30651
30760
  /**
30761
+ * * Field Name: ModelConfiguration
30762
+ * * Display Name: Model Configuration
30763
+ * * SQL Data Type: nvarchar(MAX)
30764
+ * * JSON Type: MJAIModelTypeEntity_IAIModelConfiguration
30765
+ * * Description: Type-wide default of the per-modality model-configuration bag (JSON, IAIModelConfiguration shape: LLM / Realtime / Vision / Audio sections). Base layer of the ModelConfiguration cascade — AIModel and AIModelVendor rows inherit from it per key and may override. NULL = contributes nothing.
30766
+ */
30767
+ get ModelConfiguration(): string | null;
30768
+ set ModelConfiguration(value: string | null);
30769
+ private _ModelConfigurationObject_cached;
30770
+ private _ModelConfigurationObject_lastRaw;
30771
+ /**
30772
+ * Typed accessor for ModelConfiguration — returns parsed JSON as MJAIModelTypeEntity_IAIModelConfiguration.
30773
+ * Uses lazy parsing with cache invalidation when the underlying raw value changes.
30774
+ */
30775
+ get ModelConfigurationObject(): MJAIModelTypeEntity_IAIModelConfiguration | null;
30776
+ set ModelConfigurationObject(value: MJAIModelTypeEntity_IAIModelConfiguration | null);
30777
+ /**
30652
30778
  * * Field Name: DefaultInputModality
30653
30779
  * * Display Name: Default Input Modality Name
30654
30780
  * * SQL Data Type: nvarchar(50)
@@ -30661,6 +30787,72 @@ export declare class MJAIModelTypeEntity extends BaseEntity<MJAIModelTypeEntityT
30661
30787
  */
30662
30788
  get DefaultOutputModality(): string;
30663
30789
  }
30790
+ /**
30791
+ * The per-modality model-configuration bag, stored as JSON in the `ModelConfiguration` column of
30792
+ * THREE catalog entities — the same type at every level, forming an inherit-with-override cascade
30793
+ * resolved base-first (deep-merged per key by `ResolveEffectiveModelConfiguration` in
30794
+ * `@memberjunction/ai`):
30795
+ *
30796
+ * ```
30797
+ * MJ: AI Model Types . ModelConfiguration (type-wide default — e.g. every Realtime model)
30798
+ * < MJ: AI Models . ModelConfiguration (per-model)
30799
+ * < MJ: AI Model Vendors . ModelConfiguration (per model-on-this-provider — the winner)
30800
+ * ```
30801
+ *
30802
+ * CodeGen emits a strongly-typed `ModelConfigurationObject` accessor on all three generated
30803
+ * entities from this definition.
30804
+ *
30805
+ * **Lockstep contract**: this file is the JSONType SOURCE; its package-side mirror is
30806
+ * `AIModelConfiguration` in `@memberjunction/ai` (`packages/AI/Core/src/generic/modelConfiguration.ts`),
30807
+ * which runtime code compiles against. Keep the two in step when adding a section or property —
30808
+ * the same pact `IAgentSettings` follows with `@memberjunction/ai-core-plus`.
30809
+ *
30810
+ * **Boundary rule**: anything the engine filters, sorts, or joins on stays a COLUMN
30811
+ * (`PowerRank`, `IsActive`, `Priority`, `Status` — SQL cannot cheaply predicate into this bag);
30812
+ * anything a driver consumes at session/call time belongs HERE. New capability knobs go in this
30813
+ * bag — do not add a new capability column per knob.
30814
+ */
30815
+ export interface MJAIModelVendorEntity_IAIModelConfiguration {
30816
+ /**
30817
+ * Text-generation knobs. Reserved — no consumers yet. Candidate contents: per-model
30818
+ * effort-level defaults, response-format quirks, tool-calling behavior flags. Existing
30819
+ * capability COLUMNS (`SupportsEffortLevel`, `SupportsStreaming`, …) are NOT migrating here —
30820
+ * new knobs only.
30821
+ */
30822
+ LLM?: Record<string, unknown> | null;
30823
+ /** Realtime (speech-to-speech) knobs — the first live section. */
30824
+ Realtime?: {
30825
+ /**
30826
+ * Catalog-level turn-detection default for this model. Folded into the realtime session
30827
+ * Config bag as the `turnDetection` key BELOW the agent/app config cascade
30828
+ * (`realtime.session.turnDetection`) and the runtime override — the catalog supplies the
30829
+ * default, agents/apps/callers refine it. Provider profiles translate the normalized
30830
+ * vocabulary to their native wire block; an unsupported Mode is diag-logged and falls back
30831
+ * to the profile default (never rejects a session).
30832
+ */
30833
+ TurnDetection?: {
30834
+ /**
30835
+ * - 'default' — let the provider profile decide (today's behavior).
30836
+ * - 'serverVad' — classic silence-based server VAD.
30837
+ * - 'semanticVad' — semantic end-of-utterance detection (OpenAI `semantic_vad`).
30838
+ * - 'native' — this model's smartest documented turn/duplex mode, whatever the profile
30839
+ * maps it to; the forward slot for full-duplex reasoning voice models (e.g. the
30840
+ * Grok Voice Think Fast family).
30841
+ */
30842
+ Mode?: 'default' | 'serverVad' | 'semanticVad' | 'native' | null;
30843
+ /** Semantic-VAD aggressiveness (OpenAI `eagerness`); ignored without a mapping. */
30844
+ Eagerness?: 'low' | 'auto' | 'high' | null;
30845
+ /** Server-VAD activation threshold (0–1); ignored without a mapping. */
30846
+ Threshold?: number | null;
30847
+ /** Server-VAD trailing-silence duration in ms; ignored without a mapping. */
30848
+ SilenceDurationMs?: number | null;
30849
+ } | null;
30850
+ } | null;
30851
+ /** Vision knobs. Reserved. */
30852
+ Vision?: Record<string, unknown> | null;
30853
+ /** Audio (TTS/STT) knobs. Reserved. */
30854
+ Audio?: Record<string, unknown> | null;
30855
+ }
30664
30856
  /**
30665
30857
  * MJ: AI Model Vendors - strongly typed entity sub-class
30666
30858
  * * Schema: __mj
@@ -30847,7 +31039,7 @@ export declare class MJAIModelVendorEntity extends BaseEntity<MJAIModelVendorEnt
30847
31039
  get __mj_UpdatedAt(): Date;
30848
31040
  /**
30849
31041
  * * Field Name: TypeID
30850
- * * Display Name: Type
31042
+ * * Display Name: Vendor Type
30851
31043
  * * SQL Data Type: uniqueidentifier
30852
31044
  * * Related Entity/Foreign Key: MJ: AI Vendor Type Definitions (vwAIVendorTypeDefinitions.ID)
30853
31045
  * * Description: References the type/role of the vendor for this model (e.g., model developer, inference provider)
@@ -30871,6 +31063,23 @@ export declare class MJAIModelVendorEntity extends BaseEntity<MJAIModelVendorEnt
30871
31063
  get PrefillFallbackText(): string | null;
30872
31064
  set PrefillFallbackText(value: string | null);
30873
31065
  /**
31066
+ * * Field Name: ModelConfiguration
31067
+ * * Display Name: Model Configuration
31068
+ * * SQL Data Type: nvarchar(MAX)
31069
+ * * JSON Type: MJAIModelVendorEntity_IAIModelConfiguration
31070
+ * * Description: Most-specific layer of the per-modality model-configuration bag (JSON, IAIModelConfiguration shape) — configuration for THIS model on THIS provider. Deep-merges per key over the model and type layers. NULL = inherit the merged model/type configuration unchanged.
31071
+ */
31072
+ get ModelConfiguration(): string | null;
31073
+ set ModelConfiguration(value: string | null);
31074
+ private _ModelConfigurationObject_cached;
31075
+ private _ModelConfigurationObject_lastRaw;
31076
+ /**
31077
+ * Typed accessor for ModelConfiguration — returns parsed JSON as MJAIModelVendorEntity_IAIModelConfiguration.
31078
+ * Uses lazy parsing with cache invalidation when the underlying raw value changes.
31079
+ */
31080
+ get ModelConfigurationObject(): MJAIModelVendorEntity_IAIModelConfiguration | null;
31081
+ set ModelConfigurationObject(value: MJAIModelVendorEntity_IAIModelConfiguration | null);
31082
+ /**
30874
31083
  * * Field Name: Model
30875
31084
  * * Display Name: Model Name
30876
31085
  * * SQL Data Type: nvarchar(50)
@@ -30884,11 +31093,77 @@ export declare class MJAIModelVendorEntity extends BaseEntity<MJAIModelVendorEnt
30884
31093
  get Vendor(): string;
30885
31094
  /**
30886
31095
  * * Field Name: Type
30887
- * * Display Name: Type Name
31096
+ * * Display Name: Type
30888
31097
  * * SQL Data Type: nvarchar(50)
30889
31098
  */
30890
31099
  get Type(): string;
30891
31100
  }
31101
+ /**
31102
+ * The per-modality model-configuration bag, stored as JSON in the `ModelConfiguration` column of
31103
+ * THREE catalog entities — the same type at every level, forming an inherit-with-override cascade
31104
+ * resolved base-first (deep-merged per key by `ResolveEffectiveModelConfiguration` in
31105
+ * `@memberjunction/ai`):
31106
+ *
31107
+ * ```
31108
+ * MJ: AI Model Types . ModelConfiguration (type-wide default — e.g. every Realtime model)
31109
+ * < MJ: AI Models . ModelConfiguration (per-model)
31110
+ * < MJ: AI Model Vendors . ModelConfiguration (per model-on-this-provider — the winner)
31111
+ * ```
31112
+ *
31113
+ * CodeGen emits a strongly-typed `ModelConfigurationObject` accessor on all three generated
31114
+ * entities from this definition.
31115
+ *
31116
+ * **Lockstep contract**: this file is the JSONType SOURCE; its package-side mirror is
31117
+ * `AIModelConfiguration` in `@memberjunction/ai` (`packages/AI/Core/src/generic/modelConfiguration.ts`),
31118
+ * which runtime code compiles against. Keep the two in step when adding a section or property —
31119
+ * the same pact `IAgentSettings` follows with `@memberjunction/ai-core-plus`.
31120
+ *
31121
+ * **Boundary rule**: anything the engine filters, sorts, or joins on stays a COLUMN
31122
+ * (`PowerRank`, `IsActive`, `Priority`, `Status` — SQL cannot cheaply predicate into this bag);
31123
+ * anything a driver consumes at session/call time belongs HERE. New capability knobs go in this
31124
+ * bag — do not add a new capability column per knob.
31125
+ */
31126
+ export interface MJAIModelEntity_IAIModelConfiguration {
31127
+ /**
31128
+ * Text-generation knobs. Reserved — no consumers yet. Candidate contents: per-model
31129
+ * effort-level defaults, response-format quirks, tool-calling behavior flags. Existing
31130
+ * capability COLUMNS (`SupportsEffortLevel`, `SupportsStreaming`, …) are NOT migrating here —
31131
+ * new knobs only.
31132
+ */
31133
+ LLM?: Record<string, unknown> | null;
31134
+ /** Realtime (speech-to-speech) knobs — the first live section. */
31135
+ Realtime?: {
31136
+ /**
31137
+ * Catalog-level turn-detection default for this model. Folded into the realtime session
31138
+ * Config bag as the `turnDetection` key BELOW the agent/app config cascade
31139
+ * (`realtime.session.turnDetection`) and the runtime override — the catalog supplies the
31140
+ * default, agents/apps/callers refine it. Provider profiles translate the normalized
31141
+ * vocabulary to their native wire block; an unsupported Mode is diag-logged and falls back
31142
+ * to the profile default (never rejects a session).
31143
+ */
31144
+ TurnDetection?: {
31145
+ /**
31146
+ * - 'default' — let the provider profile decide (today's behavior).
31147
+ * - 'serverVad' — classic silence-based server VAD.
31148
+ * - 'semanticVad' — semantic end-of-utterance detection (OpenAI `semantic_vad`).
31149
+ * - 'native' — this model's smartest documented turn/duplex mode, whatever the profile
31150
+ * maps it to; the forward slot for full-duplex reasoning voice models (e.g. the
31151
+ * Grok Voice Think Fast family).
31152
+ */
31153
+ Mode?: 'default' | 'serverVad' | 'semanticVad' | 'native' | null;
31154
+ /** Semantic-VAD aggressiveness (OpenAI `eagerness`); ignored without a mapping. */
31155
+ Eagerness?: 'low' | 'auto' | 'high' | null;
31156
+ /** Server-VAD activation threshold (0–1); ignored without a mapping. */
31157
+ Threshold?: number | null;
31158
+ /** Server-VAD trailing-silence duration in ms; ignored without a mapping. */
31159
+ SilenceDurationMs?: number | null;
31160
+ } | null;
31161
+ } | null;
31162
+ /** Vision knobs. Reserved. */
31163
+ Vision?: Record<string, unknown> | null;
31164
+ /** Audio (TTS/STT) knobs. Reserved. */
31165
+ Audio?: Record<string, unknown> | null;
31166
+ }
30892
31167
  /**
30893
31168
  * MJ: AI Models - strongly typed entity sub-class
30894
31169
  * * Schema: __mj
@@ -30968,7 +31243,7 @@ export declare class MJAIModelEntity extends BaseEntity<MJAIModelEntityType> {
30968
31243
  set Description(value: string | null);
30969
31244
  /**
30970
31245
  * * Field Name: AIModelTypeID
30971
- * * Display Name: AI Model Type
31246
+ * * Display Name: AI Model Type ID
30972
31247
  * * SQL Data Type: uniqueidentifier
30973
31248
  * * Related Entity/Foreign Key: MJ: AI Model Types (vwAIModelTypes.ID)
30974
31249
  */
@@ -30985,7 +31260,7 @@ export declare class MJAIModelEntity extends BaseEntity<MJAIModelEntityType> {
30985
31260
  set PowerRank(value: number | null);
30986
31261
  /**
30987
31262
  * * Field Name: IsActive
30988
- * * Display Name: Active
31263
+ * * Display Name: Is Active
30989
31264
  * * SQL Data Type: bit
30990
31265
  * * Default Value: 1
30991
31266
  * * Description: Controls whether this AI model is available for use in the system.
@@ -31067,8 +31342,25 @@ export declare class MJAIModelEntity extends BaseEntity<MJAIModelEntityType> {
31067
31342
  get PrefillFallbackText(): string | null;
31068
31343
  set PrefillFallbackText(value: string | null);
31069
31344
  /**
31345
+ * * Field Name: ModelConfiguration
31346
+ * * Display Name: Model Configuration
31347
+ * * SQL Data Type: nvarchar(MAX)
31348
+ * * JSON Type: MJAIModelEntity_IAIModelConfiguration
31349
+ * * Description: Per-model layer of the per-modality model-configuration bag (JSON, IAIModelConfiguration shape). Deep-merges per key over the AIModelType default; AIModelVendor rows may override per key on top. NULL = inherit the type default unchanged.
31350
+ */
31351
+ get ModelConfiguration(): string | null;
31352
+ set ModelConfiguration(value: string | null);
31353
+ private _ModelConfigurationObject_cached;
31354
+ private _ModelConfigurationObject_lastRaw;
31355
+ /**
31356
+ * Typed accessor for ModelConfiguration — returns parsed JSON as MJAIModelEntity_IAIModelConfiguration.
31357
+ * Uses lazy parsing with cache invalidation when the underlying raw value changes.
31358
+ */
31359
+ get ModelConfigurationObject(): MJAIModelEntity_IAIModelConfiguration | null;
31360
+ set ModelConfigurationObject(value: MJAIModelEntity_IAIModelConfiguration | null);
31361
+ /**
31070
31362
  * * Field Name: AIModelType
31071
- * * Display Name: Model Type Name
31363
+ * * Display Name: AI Model Type
31072
31364
  * * SQL Data Type: nvarchar(50)
31073
31365
  */
31074
31366
  get AIModelType(): string;
@@ -49502,12 +49794,6 @@ export declare class MJEntityActionFilterEntity extends BaseEntity<MJEntityActio
49502
49794
  */
49503
49795
  get __mj_UpdatedAt(): Date;
49504
49796
  /**
49505
- * * Field Name: EntityAction
49506
- * * Display Name: Entity Action Name
49507
- * * SQL Data Type: nvarchar(425)
49508
- */
49509
- get EntityAction(): string;
49510
- /**
49511
49797
  * * Field Name: ActionFilter
49512
49798
  * * Display Name: Action Filter Name
49513
49799
  * * SQL Data Type: nvarchar(MAX)
@@ -49671,12 +49957,6 @@ export declare class MJEntityActionInvocationEntity extends BaseEntity<MJEntityA
49671
49957
  get RuntimeUXDriverClass(): string | null;
49672
49958
  set RuntimeUXDriverClass(value: string | null);
49673
49959
  /**
49674
- * * Field Name: EntityAction
49675
- * * Display Name: Entity Action Name
49676
- * * SQL Data Type: nvarchar(425)
49677
- */
49678
- get EntityAction(): string;
49679
- /**
49680
49960
  * * Field Name: InvocationType
49681
49961
  * * Display Name: Invocation Type Name
49682
49962
  * * SQL Data Type: nvarchar(255)
@@ -49717,7 +49997,7 @@ export declare class MJEntityActionParamEntity extends BaseEntity<MJEntityAction
49717
49997
  set ID(value: string);
49718
49998
  /**
49719
49999
  * * Field Name: EntityActionID
49720
- * * Display Name: Entity Action ID
50000
+ * * Display Name: Entity Action
49721
50001
  * * SQL Data Type: uniqueidentifier
49722
50002
  * * Related Entity/Foreign Key: MJ: Entity Actions (vwEntityActions.ID)
49723
50003
  */
@@ -49725,7 +50005,7 @@ export declare class MJEntityActionParamEntity extends BaseEntity<MJEntityAction
49725
50005
  set EntityActionID(value: string);
49726
50006
  /**
49727
50007
  * * Field Name: ActionParamID
49728
- * * Display Name: Action Parameter ID
50008
+ * * Display Name: Action Parameter
49729
50009
  * * SQL Data Type: uniqueidentifier
49730
50010
  * * Related Entity/Foreign Key: MJ: Action Params (vwActionParams.ID)
49731
50011
  */
@@ -49785,14 +50065,8 @@ export declare class MJEntityActionParamEntity extends BaseEntity<MJEntityAction
49785
50065
  get LogValue(): boolean | null;
49786
50066
  set LogValue(value: boolean | null);
49787
50067
  /**
49788
- * * Field Name: EntityAction
49789
- * * Display Name: Entity Action
49790
- * * SQL Data Type: nvarchar(425)
49791
- */
49792
- get EntityAction(): string;
49793
- /**
49794
50068
  * * Field Name: ActionParam
49795
- * * Display Name: Action Parameter
50069
+ * * Display Name: Action Parameter Name
49796
50070
  * * SQL Data Type: nvarchar(255)
49797
50071
  */
49798
50072
  get ActionParam(): string;
@@ -49838,7 +50112,7 @@ export declare class MJEntityActionEntity extends BaseEntity<MJEntityActionEntit
49838
50112
  ValidateScopeEntityAndRecordCoexistence(result: ValidationResult): void;
49839
50113
  /**
49840
50114
  * * Field Name: EntityID
49841
- * * Display Name: Entity ID
50115
+ * * Display Name: Entity
49842
50116
  * * SQL Data Type: uniqueidentifier
49843
50117
  * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
49844
50118
  */
@@ -49846,7 +50120,7 @@ export declare class MJEntityActionEntity extends BaseEntity<MJEntityActionEntit
49846
50120
  set EntityID(value: string);
49847
50121
  /**
49848
50122
  * * Field Name: ActionID
49849
- * * Display Name: Action ID
50123
+ * * Display Name: Action
49850
50124
  * * SQL Data Type: uniqueidentifier
49851
50125
  * * Related Entity/Foreign Key: MJ: Actions (vwActions.ID)
49852
50126
  */
@@ -49868,14 +50142,14 @@ export declare class MJEntityActionEntity extends BaseEntity<MJEntityActionEntit
49868
50142
  set Status(value: 'Active' | 'Disabled' | 'Pending');
49869
50143
  /**
49870
50144
  * * Field Name: __mj_CreatedAt
49871
- * * Display Name: __mj _Created At
50145
+ * * Display Name: Created At
49872
50146
  * * SQL Data Type: datetimeoffset
49873
50147
  * * Default Value: getutcdate()
49874
50148
  */
49875
50149
  get __mj_CreatedAt(): Date;
49876
50150
  /**
49877
50151
  * * Field Name: __mj_UpdatedAt
49878
- * * Display Name: __mj _Updated At
50152
+ * * Display Name: Updated At
49879
50153
  * * SQL Data Type: datetimeoffset
49880
50154
  * * Default Value: getutcdate()
49881
50155
  */
@@ -49929,20 +50203,33 @@ export declare class MJEntityActionEntity extends BaseEntity<MJEntityActionEntit
49929
50203
  get LoggingMode(): 'All' | 'FailuresOnly' | 'None';
49930
50204
  set LoggingMode(value: 'All' | 'FailuresOnly' | 'None');
49931
50205
  /**
50206
+ * * Field Name: RunMode
50207
+ * * Display Name: Run Mode
50208
+ * * SQL Data Type: nvarchar(20)
50209
+ * * Default Value: Inline
50210
+ * * Value List Type: List
50211
+ * * Possible Values
50212
+ * * Durable
50213
+ * * Inline
50214
+ * * Description: How an After* dispatch of this binding executes. Inline (the default) runs it fire-and-forget in the saving process, which is fast but lost if that process dies. Durable submits a single-node task graph instead, so the work survives a restart and is reclaimed by the dispatcher — at the cost of a Task row, a dispatcher hop of latency, and the action's parameters being persisted (redacted) at rest. Ignored for Validate and Before* invocations, which run inside the save and cannot be deferred without changing whether the save succeeds.
50215
+ */
50216
+ get RunMode(): 'Durable' | 'Inline';
50217
+ set RunMode(value: 'Durable' | 'Inline');
50218
+ /**
49932
50219
  * * Field Name: Entity
49933
- * * Display Name: Entity
50220
+ * * Display Name: Entity Name
49934
50221
  * * SQL Data Type: nvarchar(255)
49935
50222
  */
49936
50223
  get Entity(): string;
49937
50224
  /**
49938
50225
  * * Field Name: Action
49939
- * * Display Name: Action
50226
+ * * Display Name: Action Name
49940
50227
  * * SQL Data Type: nvarchar(425)
49941
50228
  */
49942
50229
  get Action(): string;
49943
50230
  /**
49944
50231
  * * Field Name: ScopeEntity
49945
- * * Display Name: Scope Entity
50232
+ * * Display Name: Scope Entity Name
49946
50233
  * * SQL Data Type: nvarchar(255)
49947
50234
  */
49948
50235
  get ScopeEntity(): string | null;
@@ -70472,7 +70759,7 @@ export declare class MJTaskDependencyEntity extends BaseEntity<MJTaskDependencyE
70472
70759
  set TaskID(value: string);
70473
70760
  /**
70474
70761
  * * Field Name: DependsOnTaskID
70475
- * * Display Name: Depends On Task
70762
+ * * Display Name: Depends On Task ID
70476
70763
  * * SQL Data Type: uniqueidentifier
70477
70764
  * * Related Entity/Foreign Key: MJ: Tasks (vwTasks.ID)
70478
70765
  */
@@ -70515,6 +70802,32 @@ export declare class MJTaskDependencyEntity extends BaseEntity<MJTaskDependencyE
70515
70802
  get Condition(): string | null;
70516
70803
  set Condition(value: string | null);
70517
70804
  /**
70805
+ * * Field Name: Priority
70806
+ * * Display Name: Priority
70807
+ * * SQL Data Type: int
70808
+ * * Default Value: 0
70809
+ * * Description: Ordering within an exclusive group — higher wins. Mirrors AIAgentStepPath.Priority so a compiled workflow chooses the same branch the flow editor shows. Ignored for edges that are not part of an ExclusiveGroup.
70810
+ */
70811
+ get Priority(): number;
70812
+ set Priority(value: number);
70813
+ /**
70814
+ * * Field Name: Sequence
70815
+ * * Display Name: Sequence
70816
+ * * SQL Data Type: int
70817
+ * * Default Value: 0
70818
+ * * Description: Deterministic tiebreak when two edges in an ExclusiveGroup share a Priority, applied ascending. Load-bearing rather than cosmetic: compiled dependencies get fresh UUIDs and Priority defaults to 0, so without a stored ordinal a tie would resolve by row order and the same workflow could take a different branch on a different machine.
70819
+ */
70820
+ get Sequence(): number;
70821
+ set Sequence(value: number);
70822
+ /**
70823
+ * * Field Name: ExclusiveGroup
70824
+ * * Display Name: Exclusive Group
70825
+ * * SQL Data Type: nvarchar(255)
70826
+ * * Description: XOR group key: sibling edges leaving the same origin that share a non-null ExclusiveGroup are an exclusive fan-out. The highest-Priority satisfied edge wins, ties broken by ascending Sequence; the rest are Skipped. NULL (the default) means an ordinary dependency, so existing graphs are unaffected. An unevaluable condition anywhere in the group holds the whole group rather than firing every branch.
70827
+ */
70828
+ get ExclusiveGroup(): string | null;
70829
+ set ExclusiveGroup(value: string | null);
70830
+ /**
70518
70831
  * * Field Name: Task
70519
70832
  * * Display Name: Task Name
70520
70833
  * * SQL Data Type: nvarchar(255)
@@ -70590,6 +70903,366 @@ export declare class MJTaskTypeEntity extends BaseEntity<MJTaskTypeEntityType> {
70590
70903
  */
70591
70904
  get __mj_UpdatedAt(): Date;
70592
70905
  }
70906
+ /**
70907
+ * Everything a workflow step needs that has no column of its own — stored on Task.Configuration.
70908
+ *
70909
+ * A workflow compiles to a task graph and runs on the dispatcher, so each Task row IS a workflow
70910
+ * step. Three parts of a step have their own columns because SQL needs them: `StepType` (the
70911
+ * discriminator the claiming query routes on) and the `AgentID` / `ActionID` / `PromptID` / `UserID`
70912
+ * foreign keys. Everything else lives here.
70913
+ *
70914
+ * **Why a JSON bag rather than more columns.** None of the fields below is ever a SQL predicate —
70915
+ * the dispatcher loads the row and reads them in TypeScript. Made into columns they would be eight
70916
+ * more migrations' worth of surface for no query benefit, and every new step kind or policy knob
70917
+ * would need another one. As a typed bag, growth is a change to this file plus CodeGen.
70918
+ *
70919
+ * **Which member is populated follows `Task.StepType`.** TypeScript cannot discriminate on a sibling
70920
+ * column, so the kind-specific members are individually optional rather than a discriminated union.
70921
+ * Read them through the `StepType` you already have; do not infer the kind by probing for whichever
70922
+ * member happens to be present, which is the exact mistake that used to turn every unrecognized
70923
+ * step into a person's approval task.
70924
+ */
70925
+ export interface MJTaskEntity_ITaskStepConfiguration {
70926
+ /** Settings for an Agent step. The agent itself is `Task.AgentID`. */
70927
+ agent?: MJTaskEntity_ITaskAgentConfiguration;
70928
+ /** Settings for a Prompt step. The prompt itself is `Task.PromptID`. */
70929
+ prompt?: MJTaskEntity_ITaskPromptConfiguration;
70930
+ /** The loop definition for a ForEach step. Mirrors ForEachOperation in @memberjunction/ai-core-plus. */
70931
+ forEach?: MJTaskEntity_ITaskForEachConfiguration;
70932
+ /** The loop definition for a While step. Mirrors WhileOperation in @memberjunction/ai-core-plus. */
70933
+ while?: MJTaskEntity_ITaskWhileConfiguration;
70934
+ /** Settings for a step a person completes. The assignee is `Task.UserID`. */
70935
+ human?: MJTaskEntity_ITaskHumanConfiguration;
70936
+ /** Settings for a step completed by a system outside MemberJunction. */
70937
+ external?: MJTaskEntity_ITaskExternalConfiguration;
70938
+ /**
70939
+ * How this step's inputs are built from the workflow payload, as a JSON object mapping the
70940
+ * step's parameter names to payload paths.
70941
+ *
70942
+ * Evaluated when the step is dispatched, never when the workflow is submitted: a step's input
70943
+ * routinely depends on what an earlier step produced, which does not exist yet at submission.
70944
+ */
70945
+ inputMapping?: string;
70946
+ /**
70947
+ * How this step's results are written back into the workflow payload, as a JSON object mapping
70948
+ * result field names to payload paths.
70949
+ *
70950
+ * This is the only way a later step — or a branch condition — can see what this step produced.
70951
+ * A workflow that branches on `payload.stockPrice` gets that value because some earlier step
70952
+ * mapped it there.
70953
+ */
70954
+ outputMapping?: string;
70955
+ /** Timeout, retries, and what failure means for the rest of the workflow. */
70956
+ policy?: MJTaskEntity_ITaskExecutionPolicy;
70957
+ /**
70958
+ * Where this step sat on the canvas when a person drew it.
70959
+ *
70960
+ * **Only ever the author's own arrangement — never a computed one.** A graph produced by an
70961
+ * agent or a remote caller has no geometry, and its positions are derived at render time from
70962
+ * the graph's shape. Persisting a derived layout would freeze one rendering of a graph that can
70963
+ * still change, and the stored coordinates would quietly go stale.
70964
+ *
70965
+ * So the rule for anything drawing a run is: use this when it is present, compute a layout when
70966
+ * it is not. That is what makes a workflow someone laid out by hand run — and appear in history —
70967
+ * in the shape they drew, while a machine-authored graph still renders legibly.
70968
+ */
70969
+ layout?: MJTaskEntity_ITaskStepLayout;
70970
+ /**
70971
+ * What actually happened when this step ran — written by the dispatcher, never by an author.
70972
+ *
70973
+ * Everything else in this bag is a step's *definition*; this is its *history*. It lives here
70974
+ * rather than in columns of its own for the same reason as the rest: nothing in it is ever a SQL
70975
+ * predicate, and a column per runtime artefact would be a migration every time a new step kind
70976
+ * produced one.
70977
+ */
70978
+ runtime?: MJTaskEntity_ITaskStepRuntime;
70979
+ /**
70980
+ * Where this step sits in the graph's own order — its rank in a topological sort of the
70981
+ * dependency edges, assigned once at submission.
70982
+ *
70983
+ * **Why a stored rank rather than an ordering rule.** `Task` has no sequence column, and every
70984
+ * consumer that lists a graph's steps was therefore falling back to `__mj_CreatedAt` — which is
70985
+ * the COMPILER's walk order, related to neither the order someone drew the steps in nor the
70986
+ * order they run in. A graph that had not started yet listed its steps essentially at random:
70987
+ * step 2(b), step 3, step 1, step 2(a), with step 3 above the steps it depends on.
70988
+ *
70989
+ * A graph's edges already define a partial order, and that order is knowable before anything
70990
+ * runs — which is exactly when it is needed, since there are no timestamps to sort by yet.
70991
+ * Steps that share a rank are genuinely concurrent, and consumers break that tie with the real
70992
+ * start time, so the rule reads "drawn order, then what actually happened".
70993
+ *
70994
+ * Assigned at submission and never rewritten: it describes the graph's shape, which does not
70995
+ * change once compiled.
70996
+ */
70997
+ sequence?: number;
70998
+ }
70999
+ /**
71000
+ * The runtime artefacts a completed step points at.
71001
+ *
71002
+ * **This exists because cost was unreachable for prompt steps.** A workflow's spend is aggregated by
71003
+ * walking the run tree: an Agent step reaches its cost through `Task.AgentRunID` → the run's own
71004
+ * totals. A Prompt step has no agent run — the dispatcher executes the prompt directly — so its
71005
+ * `AIPromptRun`, and with it every token and dollar it spent, had no path back from the Task at all.
71006
+ * The runner returned the id and the dispatcher dropped it on the floor.
71007
+ */
71008
+ export interface MJTaskEntity_ITaskStepRuntime {
71009
+ /**
71010
+ * The `MJ: AI Prompt Runs` row this step produced, when it was a Prompt step.
71011
+ *
71012
+ * Set on the step's LAST execution. A retried step overwrites it rather than accumulating: the
71013
+ * prompt runs themselves are the durable history, and this is the pointer to the one whose
71014
+ * output the payload actually carries.
71015
+ */
71016
+ promptRunID?: string;
71017
+ /**
71018
+ * The `MJ: Action Execution Logs` row this step produced, when it was an Action step.
71019
+ *
71020
+ * The action equivalent of {@link promptRunID}, and it exists for the same reason: the Task row
71021
+ * records that an action ran, and nothing recorded WHICH execution. So a workflow's action step
71022
+ * had no way to offer "view the execution log" — the one thing a person wants when an action
71023
+ * misbehaves — while an ordinary agent run step has offered exactly that all along through its
71024
+ * `TargetLogID`.
71025
+ *
71026
+ * Set on the step's LAST execution, matching promptRunID: the logs themselves are the durable
71027
+ * history, and this points at the one whose output the payload actually carries.
71028
+ */
71029
+ actionLogID?: string;
71030
+ /**
71031
+ * One entry per pass of a loop step, in iteration order.
71032
+ *
71033
+ * **Without this a loop's work does not exist anywhere the platform can see it.** The run tree
71034
+ * reaches nested work through exactly six links — a run's steps, a task-graph step's graph, a
71035
+ * graph's tasks, a Sub-Agent step's run, and a task's own `AgentRunID` — and a loop iteration is
71036
+ * none of them. `AIAgentRun.ParentRunID` does not help either: it records parentage but is not a
71037
+ * link the tree traverses. So a `While` that spent real money across three passes reported one
71038
+ * childless node with no cost, the settlement rollup under-counted every loop-bearing workflow,
71039
+ * and the timeline offered nothing to expand — the work had happened and was unreachable.
71040
+ *
71041
+ * Recorded by the dispatcher as each pass completes, so a loop that is still running already has
71042
+ * its finished iterations here.
71043
+ */
71044
+ iterations?: MJTaskEntity_ITaskLoopIteration[];
71045
+ /**
71046
+ * The payload as it stood when this step BEGAN — its dependencies' outputs merged with whatever
71047
+ * authored input it carried.
71048
+ *
71049
+ * **Why this is not `Task.InputPayload`.** That column holds the *authored* input from the spec
71050
+ * and round-trips back out through `TaskGraphSpecToAgentSpec`; overwriting it at completion would
71051
+ * make a run's resolved values indistinguishable from what its author declared. So the resolved
71052
+ * value lives here, and the authored one stays where it was written.
71053
+ *
71054
+ * **Why it is stored at all**, when `OutputPayload` already holds the payload as it stood after.
71055
+ * Without a before, the run view has nothing to diff against and reports every step as having
71056
+ * created the entire payload from nothing — a step that added one key showed as `root Added
71057
+ * Object{5 keys}`. It is the same before/after pair an `AIAgentRunStep` has always recorded, for
71058
+ * the same reason. It duplicates the upstream task's output by design: recomputing it would mean
71059
+ * re-implementing the dependency merge in every consumer.
71060
+ */
71061
+ payloadAtStart?: Record<string, unknown>;
71062
+ }
71063
+ /**
71064
+ * What one pass of a loop produced.
71065
+ *
71066
+ * Deliberately just pointers plus outcome: the `AIPromptRun` / `AIAgentRun` rows are the durable
71067
+ * record of what happened, and copying their cost here would create a second number to disagree with
71068
+ * the first — the exact failure this whole area has been fixing.
71069
+ */
71070
+ export interface MJTaskEntity_ITaskLoopIteration {
71071
+ /** Zero-based pass number, so iterations render in the order they ran. */
71072
+ index: number;
71073
+ /** The `MJ: AI Prompt Runs` row this pass produced, when the loop body is a prompt. */
71074
+ promptRunID?: string;
71075
+ /** The `MJ: AI Agent Runs` row this pass started, when the loop body is a sub-agent. */
71076
+ agentRunID?: string;
71077
+ /**
71078
+ * The `MJ: Action Execution Logs` row this pass produced, when the loop body is an ACTION.
71079
+ *
71080
+ * Without it an action-bodied pass recorded no pointer at all, so it had no cost, no timing and
71081
+ * nothing to open — and the tree, having neither a prompt run nor an agent run to go on, fell to
71082
+ * its last branch and labelled the pass a **Sub-Agent**. A loop over a web search then presented
71083
+ * five sub-agent runs that never happened.
71084
+ */
71085
+ actionLogID?: string;
71086
+ /** Whether the pass succeeded. A loop with `continueOnError` can have failed passes and still finish. */
71087
+ success?: boolean;
71088
+ /** Why the pass failed, when it did. */
71089
+ errorMessage?: string;
71090
+ /**
71091
+ * What THIS pass was handed — the body's resolved input, not the loop's running payload.
71092
+ *
71093
+ * A pass is the ONLY unit of work in a graph with no row of its own, so there is nowhere else
71094
+ * for its input and output to live. Without them every pass presented `null` on both sides and
71095
+ * the run view could say nothing about any individual iteration — which for a loop is the only
71096
+ * interesting question, since the step's own payload shows just the final accumulated state.
71097
+ *
71098
+ * **Deliberately the pass's own input rather than "the running payload before this pass".** The
71099
+ * latter is the obvious reading of a before/after pair and is quadratic: every pass would carry a
71100
+ * full copy of everything the earlier passes accumulated. A five-iteration demo produced a 121KB
71101
+ * configuration that way, and the same loop over fifty items would produce megabytes — in a
71102
+ * column that the run tree, the timeline, the canvas and the run list all load.
71103
+ *
71104
+ * May instead hold `{ __omitted, __bytes, __limit }` when a size budget was exceeded. Stated
71105
+ * rather than left empty, because a pass showing nothing is otherwise indistinguishable from a
71106
+ * pass that produced nothing.
71107
+ */
71108
+ payloadAtStart?: Record<string, unknown>;
71109
+ /**
71110
+ * What this pass gave back — the body's own output, on the same basis as {@link payloadAtStart},
71111
+ * and subject to the same budget marker.
71112
+ */
71113
+ payloadAtEnd?: Record<string, unknown>;
71114
+ }
71115
+ /** A step's position and size on the canvas, in canvas units. */
71116
+ export interface MJTaskEntity_ITaskStepLayout {
71117
+ x?: number;
71118
+ y?: number;
71119
+ width?: number;
71120
+ height?: number;
71121
+ }
71122
+ /** Settings for an Agent step, beyond which agent to run. */
71123
+ export interface MJTaskEntity_ITaskAgentConfiguration {
71124
+ /** What to tell the agent. Omitted means the agent works from the payload alone. */
71125
+ message?: string;
71126
+ /** Values bound into the agent's prompt template. */
71127
+ templateParameters?: Record<string, string>;
71128
+ }
71129
+ /** Settings for a Prompt step, beyond which prompt to run. */
71130
+ export interface MJTaskEntity_ITaskPromptConfiguration {
71131
+ /** Values bound into the prompt template. */
71132
+ templateParameters?: Record<string, string>;
71133
+ }
71134
+ /**
71135
+ * A ForEach step: run the body once per item in a collection.
71136
+ *
71137
+ * **This mirrors `ForEachOperation` in @memberjunction/ai-core-plus field for field, on purpose.**
71138
+ * That interface is already the universal loop shape every agent type uses — flow agents convert
71139
+ * their stored step configuration into it, loop agents receive it from the model. Defining a second,
71140
+ * near-identical shape here is how the two would drift: a field added to one and not the other makes
71141
+ * the compile silently lossy, and the loss shows up as a loop that ignores a setting its author set.
71142
+ * Keep them identical; if `ForEachOperation` gains a field, add it here in the same edit.
71143
+ */
71144
+ export interface MJTaskEntity_ITaskForEachConfiguration {
71145
+ /** Path in the payload to the array to iterate over. */
71146
+ collectionPath: string;
71147
+ /** Variable name for the current item (default: "item"). */
71148
+ itemVariable?: string;
71149
+ /** Variable name for the loop index (default: "index"). */
71150
+ indexVariable?: string;
71151
+ /** Maximum iterations (undefined = 1000, 0 = unlimited, >0 = limit). */
71152
+ maxIterations?: number;
71153
+ /** Keep going if an iteration fails (default: false). */
71154
+ continueOnError?: boolean;
71155
+ /** Delay between iterations, in milliseconds (default: 0). */
71156
+ delayBetweenIterationsMs?: number;
71157
+ /** One at a time, or several at once (default: 'sequential'). */
71158
+ executionMode?: 'sequential' | 'parallel';
71159
+ /** Ceiling on concurrent iterations when executionMode is 'parallel' (default: 10). */
71160
+ maxConcurrency?: number;
71161
+ /** Run this action once per iteration. */
71162
+ action?: MJTaskEntity_ITaskLoopActionBody;
71163
+ /** Run this sub-agent once per iteration. */
71164
+ subAgent?: MJTaskEntity_ITaskLoopSubAgentBody;
71165
+ /** A prompt run once per loop iteration. */
71166
+ prompt?: MJTaskEntity_ITaskLoopPromptBody;
71167
+ }
71168
+ /**
71169
+ * A While step: run the body until a condition stops being true.
71170
+ *
71171
+ * Mirrors `WhileOperation` in @memberjunction/ai-core-plus field for field — see the note on
71172
+ * {@link MJTaskEntity_ITaskForEachConfiguration} for why that matters.
71173
+ */
71174
+ export interface MJTaskEntity_ITaskWhileConfiguration {
71175
+ /** Boolean expression evaluated before each iteration. */
71176
+ condition: string;
71177
+ /** Variable name for the attempt context (default: "attempt"). */
71178
+ itemVariable?: string;
71179
+ /** Maximum iterations (undefined = 100, 0 = unlimited, >0 = limit). */
71180
+ maxIterations?: number;
71181
+ /** Keep going if an iteration fails (default: false). */
71182
+ continueOnError?: boolean;
71183
+ /** Delay between iterations, in milliseconds (default: 0). */
71184
+ delayBetweenIterationsMs?: number;
71185
+ /** Run this action once per iteration. */
71186
+ action?: MJTaskEntity_ITaskLoopActionBody;
71187
+ /** Run this sub-agent once per iteration. */
71188
+ subAgent?: MJTaskEntity_ITaskLoopSubAgentBody;
71189
+ /** A prompt run once per loop iteration. */
71190
+ prompt?: MJTaskEntity_ITaskLoopPromptBody;
71191
+ }
71192
+ /**
71193
+ * A prompt run once per loop iteration.
71194
+ *
71195
+ * The cheapest loop body there is — one model call per item, with no agent wrapper, no reasoning
71196
+ * loop and no run record. Right when an iteration is a single transformation (classify this,
71197
+ * describe this column); wrong the moment an iteration has to decide what to do next.
71198
+ */
71199
+ export interface MJTaskEntity_ITaskLoopPromptBody {
71200
+ /** Prompt name. Resolved to `Task.PromptID` at submission, so it is a real foreign key. */
71201
+ name: string;
71202
+ /** Values bound into the template, alongside the loop's own item and index bindings. */
71203
+ templateParameters?: Record<string, string>;
71204
+ /** JSON mapping from the prompt's response into the payload, applied per iteration. */
71205
+ outputMapping?: string;
71206
+ }
71207
+ /** An action run once per loop iteration. */
71208
+ export interface MJTaskEntity_ITaskLoopActionBody {
71209
+ /** Action name. */
71210
+ name: string;
71211
+ /** Parameters passed to the action. */
71212
+ params: Record<string, unknown>;
71213
+ /** JSON mapping from the action's outputs back into the payload. */
71214
+ outputMapping?: string;
71215
+ }
71216
+ /** A sub-agent run once per loop iteration. */
71217
+ export interface MJTaskEntity_ITaskLoopSubAgentBody {
71218
+ /** Sub-agent name. */
71219
+ name: string;
71220
+ /** What to tell the sub-agent. */
71221
+ message: string;
71222
+ /** Values bound into the sub-agent's prompt template. */
71223
+ templateParameters?: Record<string, string>;
71224
+ /** Runtime context propagated to the sub-agent — API keys, environment settings, and the like. */
71225
+ context?: unknown;
71226
+ }
71227
+ /** A step a person completes. */
71228
+ export interface MJTaskEntity_ITaskHumanConfiguration {
71229
+ /** What the person is being asked to do. */
71230
+ instructions?: string;
71231
+ /**
71232
+ * How long the person has to answer before the step gives up, in hours.
71233
+ *
71234
+ * **Without this the deadline machinery is unreachable.** `AIAgentRequest.ExpiresAt` exists, and
71235
+ * the dispatcher already expires overdue requests and fails the step so a give-up edge can route
71236
+ * around it — but nothing ever set the column, so that path had never run outside a test. A
71237
+ * workflow waiting on someone who left the company waited forever.
71238
+ *
71239
+ * Omitted means no deadline, which stays the default: a step that silently expired on a timeout
71240
+ * its author never chose would be worse than one that waits.
71241
+ */
71242
+ expiresInHours?: number;
71243
+ }
71244
+ /** A step completed by a system outside MemberJunction, which reports back when it is done. */
71245
+ export interface MJTaskEntity_ITaskExternalConfiguration {
71246
+ /** Which external system owns this step. */
71247
+ domain: string;
71248
+ /** That system's own identifier for the work, for correlation. */
71249
+ ref?: string;
71250
+ }
71251
+ /** What the dispatcher does about time and failure for a single step. */
71252
+ export interface MJTaskEntity_ITaskExecutionPolicy {
71253
+ /** How long the step may run before the dispatcher abandons it, in seconds. */
71254
+ timeoutSeconds?: number;
71255
+ /** How many times to retry before the failure is final. */
71256
+ retryCount?: number;
71257
+ /**
71258
+ * What a failure means for the rest of the workflow.
71259
+ *
71260
+ * `fail` stops dependents; `continue` records the failure and releases them anyway, which is
71261
+ * what lets a workflow draw a recovery path instead of stopping dead; `retry` re-runs up to
71262
+ * `retryCount` before deciding.
71263
+ */
71264
+ onError?: 'continue' | 'fail' | 'retry';
71265
+ }
70593
71266
  /**
70594
71267
  * MJ: Tasks - strongly typed entity sub-class
70595
71268
  * * Schema: __mj
@@ -70617,7 +71290,7 @@ export declare class MJTaskEntity extends BaseEntity<MJTaskEntityType> {
70617
71290
  /**
70618
71291
  * Validate() method override for MJ: Tasks entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
70619
71292
  * * PercentComplete: This rule ensures that if a percent complete value is provided, it must be between 0 and 100 inclusive.
70620
- * * Table-Level: This rule ensures that for each record, either UserID or AgentID can be set, or both can be left empty, but not both can be filled in at the same time.
71293
+ * * Table-Level: A record can be associated with at most one context: either a User, an Agent, an Action, or a Prompt. Specifying more than one of these references is not allowed.
70621
71294
  * @public
70622
71295
  * @method
70623
71296
  * @override
@@ -70631,12 +71304,12 @@ export declare class MJTaskEntity extends BaseEntity<MJTaskEntityType> {
70631
71304
  */
70632
71305
  ValidatePercentCompleteWithinZeroAndOneHundred(result: ValidationResult): void;
70633
71306
  /**
70634
- * This rule ensures that for each record, either UserID or AgentID can be set, or both can be left empty, but not both can be filled in at the same time.
71307
+ * A record can be associated with at most one context: either a User, an Agent, an Action, or a Prompt. Specifying more than one of these references is not allowed.
70635
71308
  * @param result - the ValidationResult object to add any errors or warnings to
70636
71309
  * @public
70637
71310
  * @method
70638
71311
  */
70639
- ValidateUserIDAndAgentIDMutualExclusivity(result: ValidationResult): void;
71312
+ ValidateAtMostOneContextField(result: ValidationResult): void;
70640
71313
  /**
70641
71314
  * * Field Name: ID
70642
71315
  * * Display Name: ID
@@ -70704,7 +71377,7 @@ export declare class MJTaskEntity extends BaseEntity<MJTaskEntityType> {
70704
71377
  set ConversationDetailID(value: string | null);
70705
71378
  /**
70706
71379
  * * Field Name: UserID
70707
- * * Display Name: User
71380
+ * * Display Name: Assigned User
70708
71381
  * * SQL Data Type: uniqueidentifier
70709
71382
  * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
70710
71383
  */
@@ -70712,7 +71385,7 @@ export declare class MJTaskEntity extends BaseEntity<MJTaskEntityType> {
70712
71385
  set UserID(value: string | null);
70713
71386
  /**
70714
71387
  * * Field Name: AgentID
70715
- * * Display Name: Agent
71388
+ * * Display Name: Assigned Agent
70716
71389
  * * SQL Data Type: uniqueidentifier
70717
71390
  * * Related Entity/Foreign Key: MJ: AI Agents (vwAIAgents.ID)
70718
71391
  */
@@ -70732,10 +71405,11 @@ export declare class MJTaskEntity extends BaseEntity<MJTaskEntityType> {
70732
71405
  * * Failed
70733
71406
  * * In Progress
70734
71407
  * * Pending
70735
- * * Description: Current status of the task (Pending, In Progress, Complete, Cancelled, Failed, Blocked, Deferred)
71408
+ * * Skipped
71409
+ * * Description: Lifecycle state. Pending awaits prerequisites; In Progress is claimed and running; Complete succeeded; Failed did not; Blocked can never run because a prerequisite is unsatisfiable; Cancelled was stopped deliberately; Deferred is waiting on a schedule. Skipped is a branch that was NOT TAKEN at an exclusive fan-out — a normal outcome, not a failure: it satisfies dependents (so a join downstream of a fork still runs) and is invisible to failure precedence when the parent rolls up.
70736
71410
  */
70737
- get Status(): 'Blocked' | 'Cancelled' | 'Complete' | 'Deferred' | 'Failed' | 'In Progress' | 'Pending';
70738
- set Status(value: 'Blocked' | 'Cancelled' | 'Complete' | 'Deferred' | 'Failed' | 'In Progress' | 'Pending');
71411
+ get Status(): 'Blocked' | 'Cancelled' | 'Complete' | 'Deferred' | 'Failed' | 'In Progress' | 'Pending' | 'Skipped';
71412
+ set Status(value: 'Blocked' | 'Cancelled' | 'Complete' | 'Deferred' | 'Failed' | 'In Progress' | 'Pending' | 'Skipped');
70739
71413
  /**
70740
71414
  * * Field Name: PercentComplete
70741
71415
  * * Display Name: Percent Complete
@@ -70833,44 +71507,95 @@ export declare class MJTaskEntity extends BaseEntity<MJTaskEntityType> {
70833
71507
  get ClaimExpiresAt(): Date | null;
70834
71508
  set ClaimExpiresAt(value: Date | null);
70835
71509
  /**
71510
+ * * Field Name: ActionID
71511
+ * * Display Name: Action ID
71512
+ * * SQL Data Type: uniqueidentifier
71513
+ * * Related Entity/Foreign Key: MJ: Actions (vwActions.ID)
71514
+ * * Description: The Action this task executes, when the node is action-assigned rather than agent-assigned or awaiting a person. Mutually exclusive with UserID and AgentID (CK_Task_Assignment). Set by durable entity-action dispatch, where a single-node graph carries one action to run with restart recovery.
71515
+ */
71516
+ get ActionID(): string | null;
71517
+ set ActionID(value: string | null);
71518
+ /**
71519
+ * * Field Name: StepType
71520
+ * * Display Name: Step Type
71521
+ * * SQL Data Type: nvarchar(20)
71522
+ * * Value List Type: List
71523
+ * * Possible Values
71524
+ * * Action
71525
+ * * Agent
71526
+ * * External
71527
+ * * ForEach
71528
+ * * Human
71529
+ * * Prompt
71530
+ * * While
71531
+ * * Description: Which kind of workflow step this task represents. NULL for a task that is not part of a workflow, such as a hand-authored to-do. Determines which of AgentID/ActionID/PromptID/UserID is meaningful and how Configuration is read. This is the executable vocabulary and is deliberately not the same value list as AIAgentStep.StepType, which describes a step at design time.
71532
+ */
71533
+ get StepType(): 'Action' | 'Agent' | 'External' | 'ForEach' | 'Human' | 'Prompt' | 'While' | null;
71534
+ set StepType(value: 'Action' | 'Agent' | 'External' | 'ForEach' | 'Human' | 'Prompt' | 'While' | null);
71535
+ /**
71536
+ * * Field Name: PromptID
71537
+ * * Display Name: Prompt ID
71538
+ * * SQL Data Type: uniqueidentifier
71539
+ * * Related Entity/Foreign Key: MJ: AI Prompts (vwAIPrompts.ID)
71540
+ */
71541
+ get PromptID(): string | null;
71542
+ set PromptID(value: string | null);
71543
+ /**
71544
+ * * Field Name: Configuration
71545
+ * * Display Name: Configuration
71546
+ * * SQL Data Type: nvarchar(MAX)
71547
+ * * JSON Type: MJTaskEntity_ITaskStepConfiguration
71548
+ * * Description: Everything about this step that has no column of its own, as JSON: the loop definition for a ForEach or While step, an agent step's message and template parameters, the mappings that move data between this step and the workflow payload, and the execution policy (timeout, retries, what to do on failure). Typed by ITaskStepConfiguration.
71549
+ */
71550
+ get Configuration(): string | null;
71551
+ set Configuration(value: string | null);
71552
+ private _ConfigurationObject_cached;
71553
+ private _ConfigurationObject_lastRaw;
71554
+ /**
71555
+ * Typed accessor for Configuration — returns parsed JSON as MJTaskEntity_ITaskStepConfiguration.
71556
+ * Uses lazy parsing with cache invalidation when the underlying raw value changes.
71557
+ */
71558
+ get ConfigurationObject(): MJTaskEntity_ITaskStepConfiguration | null;
71559
+ set ConfigurationObject(value: MJTaskEntity_ITaskStepConfiguration | null);
71560
+ /**
70836
71561
  * * Field Name: Parent
70837
- * * Display Name: Parent Name
71562
+ * * Display Name: Parent
70838
71563
  * * SQL Data Type: nvarchar(255)
70839
71564
  */
70840
71565
  get Parent(): string | null;
70841
71566
  /**
70842
71567
  * * Field Name: Type
70843
- * * Display Name: Task Type Name
71568
+ * * Display Name: Type
70844
71569
  * * SQL Data Type: nvarchar(255)
70845
71570
  */
70846
71571
  get Type(): string;
70847
71572
  /**
70848
71573
  * * Field Name: Environment
70849
- * * Display Name: Environment Name
71574
+ * * Display Name: Environment
70850
71575
  * * SQL Data Type: nvarchar(255)
70851
71576
  */
70852
71577
  get Environment(): string;
70853
71578
  /**
70854
71579
  * * Field Name: Project
70855
- * * Display Name: Project Name
71580
+ * * Display Name: Project
70856
71581
  * * SQL Data Type: nvarchar(255)
70857
71582
  */
70858
71583
  get Project(): string | null;
70859
71584
  /**
70860
71585
  * * Field Name: ConversationDetail
70861
- * * Display Name: Conversation
71586
+ * * Display Name: Conversation Detail
70862
71587
  * * SQL Data Type: nvarchar(100)
70863
71588
  */
70864
71589
  get ConversationDetail(): string | null;
70865
71590
  /**
70866
71591
  * * Field Name: User
70867
- * * Display Name: User Name
71592
+ * * Display Name: User
70868
71593
  * * SQL Data Type: nvarchar(100)
70869
71594
  */
70870
71595
  get User(): string | null;
70871
71596
  /**
70872
71597
  * * Field Name: Agent
70873
- * * Display Name: Agent Name
71598
+ * * Display Name: Agent
70874
71599
  * * SQL Data Type: nvarchar(255)
70875
71600
  */
70876
71601
  get Agent(): string | null;
@@ -70881,8 +71606,20 @@ export declare class MJTaskEntity extends BaseEntity<MJTaskEntityType> {
70881
71606
  */
70882
71607
  get AgentRun(): string | null;
70883
71608
  /**
71609
+ * * Field Name: Action
71610
+ * * Display Name: Action
71611
+ * * SQL Data Type: nvarchar(425)
71612
+ */
71613
+ get Action(): string | null;
71614
+ /**
71615
+ * * Field Name: Prompt
71616
+ * * Display Name: Prompt
71617
+ * * SQL Data Type: nvarchar(255)
71618
+ */
71619
+ get Prompt(): string | null;
71620
+ /**
70884
71621
  * * Field Name: RootParentID
70885
- * * Display Name: Root Task
71622
+ * * Display Name: Root Parent ID
70886
71623
  * * SQL Data Type: uniqueidentifier
70887
71624
  */
70888
71625
  get RootParentID(): string | null;