@memberjunction/server 2.68.0 → 2.69.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.
@@ -1912,6 +1912,7 @@ let AIAgentRun_ = class AIAgentRun_ {
1912
1912
  Message;
1913
1913
  LastRunID;
1914
1914
  StartingPayload;
1915
+ TotalPromptIterations;
1915
1916
  Agent;
1916
1917
  Conversation;
1917
1918
  User;
@@ -2053,6 +2054,11 @@ __decorate([
2053
2054
  Field({ nullable: true, description: `The initial payload provided at the start of this run. Can be populated from the FinalPayload of the LastRun.` }),
2054
2055
  __metadata("design:type", String)
2055
2056
  ], AIAgentRun_.prototype, "StartingPayload", void 0);
2057
+ __decorate([
2058
+ Field(() => Int, { description: `Total number of prompt iterations executed during this agent run. Incremented
2059
+ each time the agent processes a prompt step.` }),
2060
+ __metadata("design:type", Number)
2061
+ ], AIAgentRun_.prototype, "TotalPromptIterations", void 0);
2056
2062
  __decorate([
2057
2063
  Field({ nullable: true }),
2058
2064
  MaxLength(510),
@@ -2113,6 +2119,7 @@ let CreateAIAgentRunInput = class CreateAIAgentRunInput {
2113
2119
  Message;
2114
2120
  LastRunID;
2115
2121
  StartingPayload;
2122
+ TotalPromptIterations;
2116
2123
  };
2117
2124
  __decorate([
2118
2125
  Field({ nullable: true }),
@@ -2226,6 +2233,10 @@ __decorate([
2226
2233
  Field({ nullable: true }),
2227
2234
  __metadata("design:type", String)
2228
2235
  ], CreateAIAgentRunInput.prototype, "StartingPayload", void 0);
2236
+ __decorate([
2237
+ Field(() => Int, { nullable: true }),
2238
+ __metadata("design:type", Number)
2239
+ ], CreateAIAgentRunInput.prototype, "TotalPromptIterations", void 0);
2229
2240
  CreateAIAgentRunInput = __decorate([
2230
2241
  InputType()
2231
2242
  ], CreateAIAgentRunInput);
@@ -2259,6 +2270,7 @@ let UpdateAIAgentRunInput = class UpdateAIAgentRunInput {
2259
2270
  Message;
2260
2271
  LastRunID;
2261
2272
  StartingPayload;
2273
+ TotalPromptIterations;
2262
2274
  OldValues___;
2263
2275
  };
2264
2276
  __decorate([
@@ -2373,6 +2385,10 @@ __decorate([
2373
2385
  Field({ nullable: true }),
2374
2386
  __metadata("design:type", String)
2375
2387
  ], UpdateAIAgentRunInput.prototype, "StartingPayload", void 0);
2388
+ __decorate([
2389
+ Field(() => Int, { nullable: true }),
2390
+ __metadata("design:type", Number)
2391
+ ], UpdateAIAgentRunInput.prototype, "TotalPromptIterations", void 0);
2376
2392
  __decorate([
2377
2393
  Field(() => [KeyValuePairInput], { nullable: true }),
2378
2394
  __metadata("design:type", Array)
@@ -3372,6 +3388,16 @@ let AIAgent_ = class AIAgent_ {
3372
3388
  PayloadUpstreamPaths;
3373
3389
  PayloadSelfReadPaths;
3374
3390
  PayloadSelfWritePaths;
3391
+ PayloadScope;
3392
+ FinalPayloadValidation;
3393
+ FinalPayloadValidationMode;
3394
+ FinalPayloadValidationMaxRetries;
3395
+ MaxCostPerRun;
3396
+ MaxTokensPerRun;
3397
+ MaxIterationsPerRun;
3398
+ MaxTimePerRun;
3399
+ MinExecutionsPerRun;
3400
+ MaxExecutionsPerRun;
3375
3401
  Parent;
3376
3402
  ContextCompressionPrompt;
3377
3403
  Type;
@@ -3493,6 +3519,52 @@ __decorate([
3493
3519
  data flow when the agent executes its own prompt step.` }),
3494
3520
  __metadata("design:type", String)
3495
3521
  ], AIAgent_.prototype, "PayloadSelfWritePaths", void 0);
3522
+ __decorate([
3523
+ Field({ nullable: true, description: `Defines the scope/path within the parent payload that this sub-agent operates on. When set, the sub-agent receives only this portion of the payload and all change requests are relative to this scope. Format: /path/to/scope (e.g. /PropA/SubProp1)` }),
3524
+ __metadata("design:type", String)
3525
+ ], AIAgent_.prototype, "PayloadScope", void 0);
3526
+ __decorate([
3527
+ Field({ nullable: true, description: `Optional JSON schema or requirements that define the expected structure and content of the agent's final payload. Used to validate the output when the agent declares success. Similar to OutputExample in AI Prompts.` }),
3528
+ __metadata("design:type", String)
3529
+ ], AIAgent_.prototype, "FinalPayloadValidation", void 0);
3530
+ __decorate([
3531
+ Field({ description: `Determines how to handle validation failures when FinalPayloadValidation is specified. Options: Retry (default) - retry the agent with validation feedback, Fail - fail the agent run immediately, Warn - log a warning but allow success.` }),
3532
+ MaxLength(50),
3533
+ __metadata("design:type", String)
3534
+ ], AIAgent_.prototype, "FinalPayloadValidationMode", void 0);
3535
+ __decorate([
3536
+ Field(() => Int, { description: `Maximum number of retry attempts allowed when FinalPayloadValidation fails with
3537
+ Retry mode. After reaching this limit, the validation will fail permanently.` }),
3538
+ __metadata("design:type", Number)
3539
+ ], AIAgent_.prototype, "FinalPayloadValidationMaxRetries", void 0);
3540
+ __decorate([
3541
+ Field(() => Float, { nullable: true, description: `Maximum cost in dollars allowed for a single agent run. Run will be terminated
3542
+ if this limit is exceeded.` }),
3543
+ __metadata("design:type", Number)
3544
+ ], AIAgent_.prototype, "MaxCostPerRun", void 0);
3545
+ __decorate([
3546
+ Field(() => Int, { nullable: true, description: `Maximum total tokens (input + output) allowed for a single agent run. Run will
3547
+ be terminated if this limit is exceeded.` }),
3548
+ __metadata("design:type", Number)
3549
+ ], AIAgent_.prototype, "MaxTokensPerRun", void 0);
3550
+ __decorate([
3551
+ Field(() => Int, { nullable: true, description: `Maximum number of prompt iterations allowed for a single agent run. Run will be
3552
+ terminated if this limit is exceeded.` }),
3553
+ __metadata("design:type", Number)
3554
+ ], AIAgent_.prototype, "MaxIterationsPerRun", void 0);
3555
+ __decorate([
3556
+ Field(() => Int, { nullable: true, description: `Maximum time in seconds allowed for a single agent run. Run will be terminated
3557
+ if this limit is exceeded.` }),
3558
+ __metadata("design:type", Number)
3559
+ ], AIAgent_.prototype, "MaxTimePerRun", void 0);
3560
+ __decorate([
3561
+ Field(() => Int, { nullable: true, description: `When acting as a sub-agent, minimum number of times this agent must be executed per parent agent run` }),
3562
+ __metadata("design:type", Number)
3563
+ ], AIAgent_.prototype, "MinExecutionsPerRun", void 0);
3564
+ __decorate([
3565
+ Field(() => Int, { nullable: true, description: `When acting as a sub-agent, maximum number of times this agent can be executed per parent agent run` }),
3566
+ __metadata("design:type", Number)
3567
+ ], AIAgent_.prototype, "MaxExecutionsPerRun", void 0);
3496
3568
  __decorate([
3497
3569
  Field({ nullable: true }),
3498
3570
  MaxLength(510),
@@ -3574,6 +3646,16 @@ let CreateAIAgentInput = class CreateAIAgentInput {
3574
3646
  PayloadUpstreamPaths;
3575
3647
  PayloadSelfReadPaths;
3576
3648
  PayloadSelfWritePaths;
3649
+ PayloadScope;
3650
+ FinalPayloadValidation;
3651
+ FinalPayloadValidationMode;
3652
+ FinalPayloadValidationMaxRetries;
3653
+ MaxCostPerRun;
3654
+ MaxTokensPerRun;
3655
+ MaxIterationsPerRun;
3656
+ MaxTimePerRun;
3657
+ MinExecutionsPerRun;
3658
+ MaxExecutionsPerRun;
3577
3659
  };
3578
3660
  __decorate([
3579
3661
  Field({ nullable: true }),
@@ -3659,6 +3741,46 @@ __decorate([
3659
3741
  Field({ nullable: true }),
3660
3742
  __metadata("design:type", String)
3661
3743
  ], CreateAIAgentInput.prototype, "PayloadSelfWritePaths", void 0);
3744
+ __decorate([
3745
+ Field({ nullable: true }),
3746
+ __metadata("design:type", String)
3747
+ ], CreateAIAgentInput.prototype, "PayloadScope", void 0);
3748
+ __decorate([
3749
+ Field({ nullable: true }),
3750
+ __metadata("design:type", String)
3751
+ ], CreateAIAgentInput.prototype, "FinalPayloadValidation", void 0);
3752
+ __decorate([
3753
+ Field({ nullable: true }),
3754
+ __metadata("design:type", String)
3755
+ ], CreateAIAgentInput.prototype, "FinalPayloadValidationMode", void 0);
3756
+ __decorate([
3757
+ Field(() => Int, { nullable: true }),
3758
+ __metadata("design:type", Number)
3759
+ ], CreateAIAgentInput.prototype, "FinalPayloadValidationMaxRetries", void 0);
3760
+ __decorate([
3761
+ Field(() => Float, { nullable: true }),
3762
+ __metadata("design:type", Number)
3763
+ ], CreateAIAgentInput.prototype, "MaxCostPerRun", void 0);
3764
+ __decorate([
3765
+ Field(() => Int, { nullable: true }),
3766
+ __metadata("design:type", Number)
3767
+ ], CreateAIAgentInput.prototype, "MaxTokensPerRun", void 0);
3768
+ __decorate([
3769
+ Field(() => Int, { nullable: true }),
3770
+ __metadata("design:type", Number)
3771
+ ], CreateAIAgentInput.prototype, "MaxIterationsPerRun", void 0);
3772
+ __decorate([
3773
+ Field(() => Int, { nullable: true }),
3774
+ __metadata("design:type", Number)
3775
+ ], CreateAIAgentInput.prototype, "MaxTimePerRun", void 0);
3776
+ __decorate([
3777
+ Field(() => Int, { nullable: true }),
3778
+ __metadata("design:type", Number)
3779
+ ], CreateAIAgentInput.prototype, "MinExecutionsPerRun", void 0);
3780
+ __decorate([
3781
+ Field(() => Int, { nullable: true }),
3782
+ __metadata("design:type", Number)
3783
+ ], CreateAIAgentInput.prototype, "MaxExecutionsPerRun", void 0);
3662
3784
  CreateAIAgentInput = __decorate([
3663
3785
  InputType()
3664
3786
  ], CreateAIAgentInput);
@@ -3685,6 +3807,16 @@ let UpdateAIAgentInput = class UpdateAIAgentInput {
3685
3807
  PayloadUpstreamPaths;
3686
3808
  PayloadSelfReadPaths;
3687
3809
  PayloadSelfWritePaths;
3810
+ PayloadScope;
3811
+ FinalPayloadValidation;
3812
+ FinalPayloadValidationMode;
3813
+ FinalPayloadValidationMaxRetries;
3814
+ MaxCostPerRun;
3815
+ MaxTokensPerRun;
3816
+ MaxIterationsPerRun;
3817
+ MaxTimePerRun;
3818
+ MinExecutionsPerRun;
3819
+ MaxExecutionsPerRun;
3688
3820
  OldValues___;
3689
3821
  };
3690
3822
  __decorate([
@@ -3771,6 +3903,46 @@ __decorate([
3771
3903
  Field({ nullable: true }),
3772
3904
  __metadata("design:type", String)
3773
3905
  ], UpdateAIAgentInput.prototype, "PayloadSelfWritePaths", void 0);
3906
+ __decorate([
3907
+ Field({ nullable: true }),
3908
+ __metadata("design:type", String)
3909
+ ], UpdateAIAgentInput.prototype, "PayloadScope", void 0);
3910
+ __decorate([
3911
+ Field({ nullable: true }),
3912
+ __metadata("design:type", String)
3913
+ ], UpdateAIAgentInput.prototype, "FinalPayloadValidation", void 0);
3914
+ __decorate([
3915
+ Field({ nullable: true }),
3916
+ __metadata("design:type", String)
3917
+ ], UpdateAIAgentInput.prototype, "FinalPayloadValidationMode", void 0);
3918
+ __decorate([
3919
+ Field(() => Int, { nullable: true }),
3920
+ __metadata("design:type", Number)
3921
+ ], UpdateAIAgentInput.prototype, "FinalPayloadValidationMaxRetries", void 0);
3922
+ __decorate([
3923
+ Field(() => Float, { nullable: true }),
3924
+ __metadata("design:type", Number)
3925
+ ], UpdateAIAgentInput.prototype, "MaxCostPerRun", void 0);
3926
+ __decorate([
3927
+ Field(() => Int, { nullable: true }),
3928
+ __metadata("design:type", Number)
3929
+ ], UpdateAIAgentInput.prototype, "MaxTokensPerRun", void 0);
3930
+ __decorate([
3931
+ Field(() => Int, { nullable: true }),
3932
+ __metadata("design:type", Number)
3933
+ ], UpdateAIAgentInput.prototype, "MaxIterationsPerRun", void 0);
3934
+ __decorate([
3935
+ Field(() => Int, { nullable: true }),
3936
+ __metadata("design:type", Number)
3937
+ ], UpdateAIAgentInput.prototype, "MaxTimePerRun", void 0);
3938
+ __decorate([
3939
+ Field(() => Int, { nullable: true }),
3940
+ __metadata("design:type", Number)
3941
+ ], UpdateAIAgentInput.prototype, "MinExecutionsPerRun", void 0);
3942
+ __decorate([
3943
+ Field(() => Int, { nullable: true }),
3944
+ __metadata("design:type", Number)
3945
+ ], UpdateAIAgentInput.prototype, "MaxExecutionsPerRun", void 0);
3774
3946
  __decorate([
3775
3947
  Field(() => [KeyValuePairInput], { nullable: true }),
3776
3948
  __metadata("design:type", Array)
@@ -5513,6 +5685,8 @@ let AIAgentAction_ = class AIAgentAction_ {
5513
5685
  Status;
5514
5686
  _mj__CreatedAt;
5515
5687
  _mj__UpdatedAt;
5688
+ MinExecutionsPerRun;
5689
+ MaxExecutionsPerRun;
5516
5690
  Agent;
5517
5691
  Action;
5518
5692
  };
@@ -5546,6 +5720,14 @@ __decorate([
5546
5720
  MaxLength(10),
5547
5721
  __metadata("design:type", Date)
5548
5722
  ], AIAgentAction_.prototype, "_mj__UpdatedAt", void 0);
5723
+ __decorate([
5724
+ Field(() => Int, { nullable: true, description: `Minimum number of times this action must be executed per agent run` }),
5725
+ __metadata("design:type", Number)
5726
+ ], AIAgentAction_.prototype, "MinExecutionsPerRun", void 0);
5727
+ __decorate([
5728
+ Field(() => Int, { nullable: true, description: `Maximum number of times this action can be executed per agent run` }),
5729
+ __metadata("design:type", Number)
5730
+ ], AIAgentAction_.prototype, "MaxExecutionsPerRun", void 0);
5549
5731
  __decorate([
5550
5732
  Field({ nullable: true }),
5551
5733
  MaxLength(510),
@@ -5565,6 +5747,8 @@ let CreateAIAgentActionInput = class CreateAIAgentActionInput {
5565
5747
  AgentID;
5566
5748
  ActionID;
5567
5749
  Status;
5750
+ MinExecutionsPerRun;
5751
+ MaxExecutionsPerRun;
5568
5752
  };
5569
5753
  __decorate([
5570
5754
  Field({ nullable: true }),
@@ -5582,6 +5766,14 @@ __decorate([
5582
5766
  Field({ nullable: true }),
5583
5767
  __metadata("design:type", String)
5584
5768
  ], CreateAIAgentActionInput.prototype, "Status", void 0);
5769
+ __decorate([
5770
+ Field(() => Int, { nullable: true }),
5771
+ __metadata("design:type", Number)
5772
+ ], CreateAIAgentActionInput.prototype, "MinExecutionsPerRun", void 0);
5773
+ __decorate([
5774
+ Field(() => Int, { nullable: true }),
5775
+ __metadata("design:type", Number)
5776
+ ], CreateAIAgentActionInput.prototype, "MaxExecutionsPerRun", void 0);
5585
5777
  CreateAIAgentActionInput = __decorate([
5586
5778
  InputType()
5587
5779
  ], CreateAIAgentActionInput);
@@ -5591,6 +5783,8 @@ let UpdateAIAgentActionInput = class UpdateAIAgentActionInput {
5591
5783
  AgentID;
5592
5784
  ActionID;
5593
5785
  Status;
5786
+ MinExecutionsPerRun;
5787
+ MaxExecutionsPerRun;
5594
5788
  OldValues___;
5595
5789
  };
5596
5790
  __decorate([
@@ -5609,6 +5803,14 @@ __decorate([
5609
5803
  Field({ nullable: true }),
5610
5804
  __metadata("design:type", String)
5611
5805
  ], UpdateAIAgentActionInput.prototype, "Status", void 0);
5806
+ __decorate([
5807
+ Field(() => Int, { nullable: true }),
5808
+ __metadata("design:type", Number)
5809
+ ], UpdateAIAgentActionInput.prototype, "MinExecutionsPerRun", void 0);
5810
+ __decorate([
5811
+ Field(() => Int, { nullable: true }),
5812
+ __metadata("design:type", Number)
5813
+ ], UpdateAIAgentActionInput.prototype, "MaxExecutionsPerRun", void 0);
5612
5814
  __decorate([
5613
5815
  Field(() => [KeyValuePairInput], { nullable: true }),
5614
5816
  __metadata("design:type", Array)
@@ -63378,6 +63580,8 @@ let AIAgentRunStep_ = class AIAgentRunStep_ {
63378
63580
  TargetLogID;
63379
63581
  PayloadAtStart;
63380
63582
  PayloadAtEnd;
63583
+ FinalPayloadValidationResult;
63584
+ FinalPayloadValidationMessages;
63381
63585
  };
63382
63586
  __decorate([
63383
63587
  Field({ description: `Unique identifier for this execution step` }),
@@ -63462,6 +63666,18 @@ __decorate([
63462
63666
  Field({ nullable: true, description: `JSON serialization of the Payload state at the end of this step` }),
63463
63667
  __metadata("design:type", String)
63464
63668
  ], AIAgentRunStep_.prototype, "PayloadAtEnd", void 0);
63669
+ __decorate([
63670
+ Field({ nullable: true, description: `Result of the final payload validation for this step. Pass indicates successful
63671
+ validation, Retry means validation failed but will retry, Fail means validation failed
63672
+ permanently, Warn means validation failed but execution continues.` }),
63673
+ MaxLength(50),
63674
+ __metadata("design:type", String)
63675
+ ], AIAgentRunStep_.prototype, "FinalPayloadValidationResult", void 0);
63676
+ __decorate([
63677
+ Field({ nullable: true, description: `Validation error messages or warnings from final payload validation. Contains
63678
+ detailed information about what validation rules failed.` }),
63679
+ __metadata("design:type", String)
63680
+ ], AIAgentRunStep_.prototype, "FinalPayloadValidationMessages", void 0);
63465
63681
  AIAgentRunStep_ = __decorate([
63466
63682
  ObjectType({ description: `Provides basic, step-by-step tracking of agent execution. Each step represents a discrete action within an agent run, such as prompt execution, tool usage, decision making, or sub-agent coordination.` })
63467
63683
  ], AIAgentRunStep_);
@@ -63483,6 +63699,8 @@ let CreateAIAgentRunStepInput = class CreateAIAgentRunStepInput {
63483
63699
  TargetLogID;
63484
63700
  PayloadAtStart;
63485
63701
  PayloadAtEnd;
63702
+ FinalPayloadValidationResult;
63703
+ FinalPayloadValidationMessages;
63486
63704
  };
63487
63705
  __decorate([
63488
63706
  Field({ nullable: true }),
@@ -63548,6 +63766,14 @@ __decorate([
63548
63766
  Field({ nullable: true }),
63549
63767
  __metadata("design:type", String)
63550
63768
  ], CreateAIAgentRunStepInput.prototype, "PayloadAtEnd", void 0);
63769
+ __decorate([
63770
+ Field({ nullable: true }),
63771
+ __metadata("design:type", String)
63772
+ ], CreateAIAgentRunStepInput.prototype, "FinalPayloadValidationResult", void 0);
63773
+ __decorate([
63774
+ Field({ nullable: true }),
63775
+ __metadata("design:type", String)
63776
+ ], CreateAIAgentRunStepInput.prototype, "FinalPayloadValidationMessages", void 0);
63551
63777
  CreateAIAgentRunStepInput = __decorate([
63552
63778
  InputType()
63553
63779
  ], CreateAIAgentRunStepInput);
@@ -63569,6 +63795,8 @@ let UpdateAIAgentRunStepInput = class UpdateAIAgentRunStepInput {
63569
63795
  TargetLogID;
63570
63796
  PayloadAtStart;
63571
63797
  PayloadAtEnd;
63798
+ FinalPayloadValidationResult;
63799
+ FinalPayloadValidationMessages;
63572
63800
  OldValues___;
63573
63801
  };
63574
63802
  __decorate([
@@ -63635,6 +63863,14 @@ __decorate([
63635
63863
  Field({ nullable: true }),
63636
63864
  __metadata("design:type", String)
63637
63865
  ], UpdateAIAgentRunStepInput.prototype, "PayloadAtEnd", void 0);
63866
+ __decorate([
63867
+ Field({ nullable: true }),
63868
+ __metadata("design:type", String)
63869
+ ], UpdateAIAgentRunStepInput.prototype, "FinalPayloadValidationResult", void 0);
63870
+ __decorate([
63871
+ Field({ nullable: true }),
63872
+ __metadata("design:type", String)
63873
+ ], UpdateAIAgentRunStepInput.prototype, "FinalPayloadValidationMessages", void 0);
63638
63874
  __decorate([
63639
63875
  Field(() => [KeyValuePairInput], { nullable: true }),
63640
63876
  __metadata("design:type", Array)