@memberjunction/server 2.92.0 → 2.93.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -2
- package/dist/generated/generated.d.ts +26 -6
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +170 -54
- package/dist/generated/generated.js.map +1 -1
- package/dist/resolvers/ReportResolver.d.ts.map +1 -1
- package/dist/resolvers/ReportResolver.js +4 -5
- package/dist/resolvers/ReportResolver.js.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.d.ts +5 -1
- package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.js +26 -2
- package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
- package/dist/resolvers/RunAIPromptResolver.d.ts +34 -0
- package/dist/resolvers/RunAIPromptResolver.d.ts.map +1 -1
- package/dist/resolvers/RunAIPromptResolver.js +386 -2
- package/dist/resolvers/RunAIPromptResolver.js.map +1 -1
- package/package.json +39 -39
- package/src/generated/generated.ts +111 -40
- package/src/resolvers/ReportResolver.ts +5 -6
- package/src/resolvers/RunAIAgentResolver.ts +80 -13
- package/src/resolvers/RunAIPromptResolver.ts +568 -26
|
@@ -2485,14 +2485,16 @@ let AIAgentRun_ = class AIAgentRun_ {
|
|
|
2485
2485
|
Data;
|
|
2486
2486
|
Verbose;
|
|
2487
2487
|
EffortLevel;
|
|
2488
|
+
RunName;
|
|
2489
|
+
Comments;
|
|
2488
2490
|
Agent;
|
|
2489
2491
|
Conversation;
|
|
2490
2492
|
User;
|
|
2491
2493
|
Configuration;
|
|
2492
2494
|
OverrideModel;
|
|
2493
2495
|
OverrideVendor;
|
|
2494
|
-
MJ_AIAgentRunSteps_AgentRunIDArray;
|
|
2495
2496
|
MJ_AIAgentRuns_ParentRunIDArray;
|
|
2497
|
+
MJ_AIAgentRunSteps_AgentRunIDArray;
|
|
2496
2498
|
MJ_AIPromptRuns_AgentRunIDArray;
|
|
2497
2499
|
};
|
|
2498
2500
|
__decorate([
|
|
@@ -2661,6 +2663,15 @@ __decorate([
|
|
|
2661
2663
|
Field(() => Int, { nullable: true, description: `Effort level that was actually used during this agent run execution (1-100, where 1=minimal effort, 100=maximum effort). This is the resolved effort level after applying the precedence hierarchy: runtime override > agent default > prompt defaults.` }),
|
|
2662
2664
|
__metadata("design:type", Number)
|
|
2663
2665
|
], AIAgentRun_.prototype, "EffortLevel", void 0);
|
|
2666
|
+
__decorate([
|
|
2667
|
+
Field({ nullable: true, description: `Optional name for the agent run to help identify and tag runs for easier reference` }),
|
|
2668
|
+
MaxLength(510),
|
|
2669
|
+
__metadata("design:type", String)
|
|
2670
|
+
], AIAgentRun_.prototype, "RunName", void 0);
|
|
2671
|
+
__decorate([
|
|
2672
|
+
Field({ nullable: true, description: `Human-readable notes and comments about this agent run` }),
|
|
2673
|
+
__metadata("design:type", String)
|
|
2674
|
+
], AIAgentRun_.prototype, "Comments", void 0);
|
|
2664
2675
|
__decorate([
|
|
2665
2676
|
Field({ nullable: true }),
|
|
2666
2677
|
MaxLength(510),
|
|
@@ -2691,14 +2702,14 @@ __decorate([
|
|
|
2691
2702
|
MaxLength(100),
|
|
2692
2703
|
__metadata("design:type", String)
|
|
2693
2704
|
], AIAgentRun_.prototype, "OverrideVendor", void 0);
|
|
2694
|
-
__decorate([
|
|
2695
|
-
Field(() => [AIAgentRunStep_]),
|
|
2696
|
-
__metadata("design:type", Array)
|
|
2697
|
-
], AIAgentRun_.prototype, "MJ_AIAgentRunSteps_AgentRunIDArray", void 0);
|
|
2698
2705
|
__decorate([
|
|
2699
2706
|
Field(() => [AIAgentRun_]),
|
|
2700
2707
|
__metadata("design:type", Array)
|
|
2701
2708
|
], AIAgentRun_.prototype, "MJ_AIAgentRuns_ParentRunIDArray", void 0);
|
|
2709
|
+
__decorate([
|
|
2710
|
+
Field(() => [AIAgentRunStep_]),
|
|
2711
|
+
__metadata("design:type", Array)
|
|
2712
|
+
], AIAgentRun_.prototype, "MJ_AIAgentRunSteps_AgentRunIDArray", void 0);
|
|
2702
2713
|
__decorate([
|
|
2703
2714
|
Field(() => [AIPromptRun_]),
|
|
2704
2715
|
__metadata("design:type", Array)
|
|
@@ -2743,6 +2754,8 @@ let CreateAIAgentRunInput = class CreateAIAgentRunInput {
|
|
|
2743
2754
|
Data;
|
|
2744
2755
|
Verbose;
|
|
2745
2756
|
EffortLevel;
|
|
2757
|
+
RunName;
|
|
2758
|
+
Comments;
|
|
2746
2759
|
};
|
|
2747
2760
|
__decorate([
|
|
2748
2761
|
Field({ nullable: true }),
|
|
@@ -2884,6 +2897,14 @@ __decorate([
|
|
|
2884
2897
|
Field(() => Int, { nullable: true }),
|
|
2885
2898
|
__metadata("design:type", Number)
|
|
2886
2899
|
], CreateAIAgentRunInput.prototype, "EffortLevel", void 0);
|
|
2900
|
+
__decorate([
|
|
2901
|
+
Field({ nullable: true }),
|
|
2902
|
+
__metadata("design:type", String)
|
|
2903
|
+
], CreateAIAgentRunInput.prototype, "RunName", void 0);
|
|
2904
|
+
__decorate([
|
|
2905
|
+
Field({ nullable: true }),
|
|
2906
|
+
__metadata("design:type", String)
|
|
2907
|
+
], CreateAIAgentRunInput.prototype, "Comments", void 0);
|
|
2887
2908
|
CreateAIAgentRunInput = __decorate([
|
|
2888
2909
|
InputType()
|
|
2889
2910
|
], CreateAIAgentRunInput);
|
|
@@ -2924,6 +2945,8 @@ let UpdateAIAgentRunInput = class UpdateAIAgentRunInput {
|
|
|
2924
2945
|
Data;
|
|
2925
2946
|
Verbose;
|
|
2926
2947
|
EffortLevel;
|
|
2948
|
+
RunName;
|
|
2949
|
+
Comments;
|
|
2927
2950
|
OldValues___;
|
|
2928
2951
|
};
|
|
2929
2952
|
__decorate([
|
|
@@ -3066,6 +3089,14 @@ __decorate([
|
|
|
3066
3089
|
Field(() => Int, { nullable: true }),
|
|
3067
3090
|
__metadata("design:type", Number)
|
|
3068
3091
|
], UpdateAIAgentRunInput.prototype, "EffortLevel", void 0);
|
|
3092
|
+
__decorate([
|
|
3093
|
+
Field({ nullable: true }),
|
|
3094
|
+
__metadata("design:type", String)
|
|
3095
|
+
], UpdateAIAgentRunInput.prototype, "RunName", void 0);
|
|
3096
|
+
__decorate([
|
|
3097
|
+
Field({ nullable: true }),
|
|
3098
|
+
__metadata("design:type", String)
|
|
3099
|
+
], UpdateAIAgentRunInput.prototype, "Comments", void 0);
|
|
3069
3100
|
__decorate([
|
|
3070
3101
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
3071
3102
|
__metadata("design:type", Array)
|
|
@@ -3138,22 +3169,22 @@ let AIAgentRunResolver = class AIAgentRunResolver extends ResolverBase {
|
|
|
3138
3169
|
const result = this.MapFieldNamesToCodeNames('MJ: AI Agent Runs', rows && rows.length > 0 ? rows[0] : {});
|
|
3139
3170
|
return result;
|
|
3140
3171
|
}
|
|
3141
|
-
async
|
|
3142
|
-
this.CheckUserReadPermissions('MJ: AI Agent
|
|
3172
|
+
async MJ_AIAgentRuns_ParentRunIDArray(aiagentrun_, { dataSources, userPayload, providers }, pubSub) {
|
|
3173
|
+
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
3143
3174
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
3144
3175
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
3145
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
3176
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRuns] WHERE [ParentRunID]='${aiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
3146
3177
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
3147
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent
|
|
3178
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Runs', rows);
|
|
3148
3179
|
return result;
|
|
3149
3180
|
}
|
|
3150
|
-
async
|
|
3151
|
-
this.CheckUserReadPermissions('MJ: AI Agent
|
|
3181
|
+
async MJ_AIAgentRunSteps_AgentRunIDArray(aiagentrun_, { dataSources, userPayload, providers }, pubSub) {
|
|
3182
|
+
this.CheckUserReadPermissions('MJ: AI Agent Run Steps', userPayload);
|
|
3152
3183
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
3153
3184
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
3154
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
3185
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRunSteps] WHERE [AgentRunID]='${aiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Run Steps', userPayload, EntityPermissionType.Read, 'AND');
|
|
3155
3186
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
3156
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent
|
|
3187
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Run Steps', rows);
|
|
3157
3188
|
return result;
|
|
3158
3189
|
}
|
|
3159
3190
|
async MJ_AIPromptRuns_AgentRunIDArray(aiagentrun_, { dataSources, userPayload, providers }, pubSub) {
|
|
@@ -3216,23 +3247,23 @@ __decorate([
|
|
|
3216
3247
|
__metadata("design:returntype", Promise)
|
|
3217
3248
|
], AIAgentRunResolver.prototype, "AIAgentRun", null);
|
|
3218
3249
|
__decorate([
|
|
3219
|
-
FieldResolver(() => [
|
|
3250
|
+
FieldResolver(() => [AIAgentRun_]),
|
|
3220
3251
|
__param(0, Root()),
|
|
3221
3252
|
__param(1, Ctx()),
|
|
3222
3253
|
__param(2, PubSub()),
|
|
3223
3254
|
__metadata("design:type", Function),
|
|
3224
3255
|
__metadata("design:paramtypes", [AIAgentRun_, Object, PubSubEngine]),
|
|
3225
3256
|
__metadata("design:returntype", Promise)
|
|
3226
|
-
], AIAgentRunResolver.prototype, "
|
|
3257
|
+
], AIAgentRunResolver.prototype, "MJ_AIAgentRuns_ParentRunIDArray", null);
|
|
3227
3258
|
__decorate([
|
|
3228
|
-
FieldResolver(() => [
|
|
3259
|
+
FieldResolver(() => [AIAgentRunStep_]),
|
|
3229
3260
|
__param(0, Root()),
|
|
3230
3261
|
__param(1, Ctx()),
|
|
3231
3262
|
__param(2, PubSub()),
|
|
3232
3263
|
__metadata("design:type", Function),
|
|
3233
3264
|
__metadata("design:paramtypes", [AIAgentRun_, Object, PubSubEngine]),
|
|
3234
3265
|
__metadata("design:returntype", Promise)
|
|
3235
|
-
], AIAgentRunResolver.prototype, "
|
|
3266
|
+
], AIAgentRunResolver.prototype, "MJ_AIAgentRunSteps_AgentRunIDArray", null);
|
|
3236
3267
|
__decorate([
|
|
3237
3268
|
FieldResolver(() => [AIPromptRun_]),
|
|
3238
3269
|
__param(0, Root()),
|
|
@@ -3677,9 +3708,9 @@ let AIConfiguration_ = class AIConfiguration_ {
|
|
|
3677
3708
|
DefaultPromptForContextSummarization;
|
|
3678
3709
|
MJ_AIConfigurationParams_ConfigurationIDArray;
|
|
3679
3710
|
MJ_AIAgentPrompts_ConfigurationIDArray;
|
|
3711
|
+
MJ_AIPromptRuns_ConfigurationIDArray;
|
|
3680
3712
|
MJ_AIPromptModels_ConfigurationIDArray;
|
|
3681
3713
|
AIResultCache_ConfigurationIDArray;
|
|
3682
|
-
MJ_AIPromptRuns_ConfigurationIDArray;
|
|
3683
3714
|
MJ_AIAgentRuns_ConfigurationIDArray;
|
|
3684
3715
|
};
|
|
3685
3716
|
__decorate([
|
|
@@ -3743,6 +3774,10 @@ __decorate([
|
|
|
3743
3774
|
Field(() => [AIAgentPrompt_]),
|
|
3744
3775
|
__metadata("design:type", Array)
|
|
3745
3776
|
], AIConfiguration_.prototype, "MJ_AIAgentPrompts_ConfigurationIDArray", void 0);
|
|
3777
|
+
__decorate([
|
|
3778
|
+
Field(() => [AIPromptRun_]),
|
|
3779
|
+
__metadata("design:type", Array)
|
|
3780
|
+
], AIConfiguration_.prototype, "MJ_AIPromptRuns_ConfigurationIDArray", void 0);
|
|
3746
3781
|
__decorate([
|
|
3747
3782
|
Field(() => [AIPromptModel_]),
|
|
3748
3783
|
__metadata("design:type", Array)
|
|
@@ -3751,10 +3786,6 @@ __decorate([
|
|
|
3751
3786
|
Field(() => [AIResultCache_]),
|
|
3752
3787
|
__metadata("design:type", Array)
|
|
3753
3788
|
], AIConfiguration_.prototype, "AIResultCache_ConfigurationIDArray", void 0);
|
|
3754
|
-
__decorate([
|
|
3755
|
-
Field(() => [AIPromptRun_]),
|
|
3756
|
-
__metadata("design:type", Array)
|
|
3757
|
-
], AIConfiguration_.prototype, "MJ_AIPromptRuns_ConfigurationIDArray", void 0);
|
|
3758
3789
|
__decorate([
|
|
3759
3790
|
Field(() => [AIAgentRun_]),
|
|
3760
3791
|
__metadata("design:type", Array)
|
|
@@ -3932,6 +3963,15 @@ let AIConfigurationResolver = class AIConfigurationResolver extends ResolverBase
|
|
|
3932
3963
|
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Prompts', rows);
|
|
3933
3964
|
return result;
|
|
3934
3965
|
}
|
|
3966
|
+
async MJ_AIPromptRuns_ConfigurationIDArray(aiconfiguration_, { dataSources, userPayload, providers }, pubSub) {
|
|
3967
|
+
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
3968
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
3969
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
3970
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptRuns] WHERE [ConfigurationID]='${aiconfiguration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
3971
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
3972
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows);
|
|
3973
|
+
return result;
|
|
3974
|
+
}
|
|
3935
3975
|
async MJ_AIPromptModels_ConfigurationIDArray(aiconfiguration_, { dataSources, userPayload, providers }, pubSub) {
|
|
3936
3976
|
this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
|
|
3937
3977
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -3950,15 +3990,6 @@ let AIConfigurationResolver = class AIConfigurationResolver extends ResolverBase
|
|
|
3950
3990
|
const result = this.ArrayMapFieldNamesToCodeNames('AI Result Cache', rows);
|
|
3951
3991
|
return result;
|
|
3952
3992
|
}
|
|
3953
|
-
async MJ_AIPromptRuns_ConfigurationIDArray(aiconfiguration_, { dataSources, userPayload, providers }, pubSub) {
|
|
3954
|
-
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
3955
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
3956
|
-
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
3957
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptRuns] WHERE [ConfigurationID]='${aiconfiguration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
3958
|
-
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
3959
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows);
|
|
3960
|
-
return result;
|
|
3961
|
-
}
|
|
3962
3993
|
async MJ_AIAgentRuns_ConfigurationIDArray(aiconfiguration_, { dataSources, userPayload, providers }, pubSub) {
|
|
3963
3994
|
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
3964
3995
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -4037,32 +4068,32 @@ __decorate([
|
|
|
4037
4068
|
__metadata("design:returntype", Promise)
|
|
4038
4069
|
], AIConfigurationResolver.prototype, "MJ_AIAgentPrompts_ConfigurationIDArray", null);
|
|
4039
4070
|
__decorate([
|
|
4040
|
-
FieldResolver(() => [
|
|
4071
|
+
FieldResolver(() => [AIPromptRun_]),
|
|
4041
4072
|
__param(0, Root()),
|
|
4042
4073
|
__param(1, Ctx()),
|
|
4043
4074
|
__param(2, PubSub()),
|
|
4044
4075
|
__metadata("design:type", Function),
|
|
4045
4076
|
__metadata("design:paramtypes", [AIConfiguration_, Object, PubSubEngine]),
|
|
4046
4077
|
__metadata("design:returntype", Promise)
|
|
4047
|
-
], AIConfigurationResolver.prototype, "
|
|
4078
|
+
], AIConfigurationResolver.prototype, "MJ_AIPromptRuns_ConfigurationIDArray", null);
|
|
4048
4079
|
__decorate([
|
|
4049
|
-
FieldResolver(() => [
|
|
4080
|
+
FieldResolver(() => [AIPromptModel_]),
|
|
4050
4081
|
__param(0, Root()),
|
|
4051
4082
|
__param(1, Ctx()),
|
|
4052
4083
|
__param(2, PubSub()),
|
|
4053
4084
|
__metadata("design:type", Function),
|
|
4054
4085
|
__metadata("design:paramtypes", [AIConfiguration_, Object, PubSubEngine]),
|
|
4055
4086
|
__metadata("design:returntype", Promise)
|
|
4056
|
-
], AIConfigurationResolver.prototype, "
|
|
4087
|
+
], AIConfigurationResolver.prototype, "MJ_AIPromptModels_ConfigurationIDArray", null);
|
|
4057
4088
|
__decorate([
|
|
4058
|
-
FieldResolver(() => [
|
|
4089
|
+
FieldResolver(() => [AIResultCache_]),
|
|
4059
4090
|
__param(0, Root()),
|
|
4060
4091
|
__param(1, Ctx()),
|
|
4061
4092
|
__param(2, PubSub()),
|
|
4062
4093
|
__metadata("design:type", Function),
|
|
4063
4094
|
__metadata("design:paramtypes", [AIConfiguration_, Object, PubSubEngine]),
|
|
4064
4095
|
__metadata("design:returntype", Promise)
|
|
4065
|
-
], AIConfigurationResolver.prototype, "
|
|
4096
|
+
], AIConfigurationResolver.prototype, "AIResultCache_ConfigurationIDArray", null);
|
|
4066
4097
|
__decorate([
|
|
4067
4098
|
FieldResolver(() => [AIAgentRun_]),
|
|
4068
4099
|
__param(0, Root()),
|
|
@@ -7764,8 +7795,8 @@ let AIPrompt_ = class AIPrompt_ {
|
|
|
7764
7795
|
MJ_AIAgentTypes_SystemPromptIDArray;
|
|
7765
7796
|
MJ_AIConfigurations_DefaultPromptForContextSummarizationIDArray;
|
|
7766
7797
|
AIPrompts_ResultSelectorPromptIDArray;
|
|
7767
|
-
MJ_AIPromptModels_PromptIDArray;
|
|
7768
7798
|
MJ_AIAgentPrompts_PromptIDArray;
|
|
7799
|
+
MJ_AIPromptModels_PromptIDArray;
|
|
7769
7800
|
MJ_AIAgentSteps_PromptIDArray;
|
|
7770
7801
|
MJ_AIPromptRuns_PromptIDArray;
|
|
7771
7802
|
AIAgents_ContextCompressionPromptIDArray;
|
|
@@ -8044,14 +8075,14 @@ __decorate([
|
|
|
8044
8075
|
Field(() => [AIPrompt_]),
|
|
8045
8076
|
__metadata("design:type", Array)
|
|
8046
8077
|
], AIPrompt_.prototype, "AIPrompts_ResultSelectorPromptIDArray", void 0);
|
|
8047
|
-
__decorate([
|
|
8048
|
-
Field(() => [AIPromptModel_]),
|
|
8049
|
-
__metadata("design:type", Array)
|
|
8050
|
-
], AIPrompt_.prototype, "MJ_AIPromptModels_PromptIDArray", void 0);
|
|
8051
8078
|
__decorate([
|
|
8052
8079
|
Field(() => [AIAgentPrompt_]),
|
|
8053
8080
|
__metadata("design:type", Array)
|
|
8054
8081
|
], AIPrompt_.prototype, "MJ_AIAgentPrompts_PromptIDArray", void 0);
|
|
8082
|
+
__decorate([
|
|
8083
|
+
Field(() => [AIPromptModel_]),
|
|
8084
|
+
__metadata("design:type", Array)
|
|
8085
|
+
], AIPrompt_.prototype, "MJ_AIPromptModels_PromptIDArray", void 0);
|
|
8055
8086
|
__decorate([
|
|
8056
8087
|
Field(() => [AIAgentStep_]),
|
|
8057
8088
|
__metadata("design:type", Array)
|
|
@@ -8684,22 +8715,22 @@ let AIPromptResolver = class AIPromptResolver extends ResolverBase {
|
|
|
8684
8715
|
const result = this.ArrayMapFieldNamesToCodeNames('AI Prompts', rows);
|
|
8685
8716
|
return result;
|
|
8686
8717
|
}
|
|
8687
|
-
async
|
|
8688
|
-
this.CheckUserReadPermissions('MJ: AI
|
|
8718
|
+
async MJ_AIAgentPrompts_PromptIDArray(aiprompt_, { dataSources, userPayload, providers }, pubSub) {
|
|
8719
|
+
this.CheckUserReadPermissions('MJ: AI Agent Prompts', userPayload);
|
|
8689
8720
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
8690
8721
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
8691
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
8722
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentPrompts] WHERE [PromptID]='${aiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Prompts', userPayload, EntityPermissionType.Read, 'AND');
|
|
8692
8723
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
8693
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI
|
|
8724
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Prompts', rows);
|
|
8694
8725
|
return result;
|
|
8695
8726
|
}
|
|
8696
|
-
async
|
|
8697
|
-
this.CheckUserReadPermissions('MJ: AI
|
|
8727
|
+
async MJ_AIPromptModels_PromptIDArray(aiprompt_, { dataSources, userPayload, providers }, pubSub) {
|
|
8728
|
+
this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
|
|
8698
8729
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
8699
8730
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
8700
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
8731
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptModels] WHERE [PromptID]='${aiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Models', userPayload, EntityPermissionType.Read, 'AND');
|
|
8701
8732
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
8702
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI
|
|
8733
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Models', rows);
|
|
8703
8734
|
return result;
|
|
8704
8735
|
}
|
|
8705
8736
|
async MJ_AIAgentSteps_PromptIDArray(aiprompt_, { dataSources, userPayload, providers }, pubSub) {
|
|
@@ -8825,23 +8856,23 @@ __decorate([
|
|
|
8825
8856
|
__metadata("design:returntype", Promise)
|
|
8826
8857
|
], AIPromptResolver.prototype, "AIPrompts_ResultSelectorPromptIDArray", null);
|
|
8827
8858
|
__decorate([
|
|
8828
|
-
FieldResolver(() => [
|
|
8859
|
+
FieldResolver(() => [AIAgentPrompt_]),
|
|
8829
8860
|
__param(0, Root()),
|
|
8830
8861
|
__param(1, Ctx()),
|
|
8831
8862
|
__param(2, PubSub()),
|
|
8832
8863
|
__metadata("design:type", Function),
|
|
8833
8864
|
__metadata("design:paramtypes", [AIPrompt_, Object, PubSubEngine]),
|
|
8834
8865
|
__metadata("design:returntype", Promise)
|
|
8835
|
-
], AIPromptResolver.prototype, "
|
|
8866
|
+
], AIPromptResolver.prototype, "MJ_AIAgentPrompts_PromptIDArray", null);
|
|
8836
8867
|
__decorate([
|
|
8837
|
-
FieldResolver(() => [
|
|
8868
|
+
FieldResolver(() => [AIPromptModel_]),
|
|
8838
8869
|
__param(0, Root()),
|
|
8839
8870
|
__param(1, Ctx()),
|
|
8840
8871
|
__param(2, PubSub()),
|
|
8841
8872
|
__metadata("design:type", Function),
|
|
8842
8873
|
__metadata("design:paramtypes", [AIPrompt_, Object, PubSubEngine]),
|
|
8843
8874
|
__metadata("design:returntype", Promise)
|
|
8844
|
-
], AIPromptResolver.prototype, "
|
|
8875
|
+
], AIPromptResolver.prototype, "MJ_AIPromptModels_PromptIDArray", null);
|
|
8845
8876
|
__decorate([
|
|
8846
8877
|
FieldResolver(() => [AIAgentStep_]),
|
|
8847
8878
|
__param(0, Root()),
|
|
@@ -66743,6 +66774,8 @@ let AIPromptRun_ = class AIPromptRun_ {
|
|
|
66743
66774
|
CompletionTime;
|
|
66744
66775
|
ModelSpecificResponseDetails;
|
|
66745
66776
|
EffortLevel;
|
|
66777
|
+
RunName;
|
|
66778
|
+
Comments;
|
|
66746
66779
|
Prompt;
|
|
66747
66780
|
Model;
|
|
66748
66781
|
Vendor;
|
|
@@ -67107,6 +67140,15 @@ __decorate([
|
|
|
67107
67140
|
Field(() => Int, { nullable: true, description: `Effort level that was actually used during this prompt run execution (1-100, where 1=minimal effort, 100=maximum effort). This is the resolved effort level after applying the precedence hierarchy: runtime override > agent default > prompt default > provider default.` }),
|
|
67108
67141
|
__metadata("design:type", Number)
|
|
67109
67142
|
], AIPromptRun_.prototype, "EffortLevel", void 0);
|
|
67143
|
+
__decorate([
|
|
67144
|
+
Field({ nullable: true, description: `Optional name for the prompt run to help identify and tag runs for easier reference` }),
|
|
67145
|
+
MaxLength(510),
|
|
67146
|
+
__metadata("design:type", String)
|
|
67147
|
+
], AIPromptRun_.prototype, "RunName", void 0);
|
|
67148
|
+
__decorate([
|
|
67149
|
+
Field({ nullable: true, description: `Human-readable notes and comments about this prompt run` }),
|
|
67150
|
+
__metadata("design:type", String)
|
|
67151
|
+
], AIPromptRun_.prototype, "Comments", void 0);
|
|
67110
67152
|
__decorate([
|
|
67111
67153
|
Field(),
|
|
67112
67154
|
MaxLength(510),
|
|
@@ -67239,6 +67281,8 @@ let CreateAIPromptRunInput = class CreateAIPromptRunInput {
|
|
|
67239
67281
|
CompletionTime;
|
|
67240
67282
|
ModelSpecificResponseDetails;
|
|
67241
67283
|
EffortLevel;
|
|
67284
|
+
RunName;
|
|
67285
|
+
Comments;
|
|
67242
67286
|
};
|
|
67243
67287
|
__decorate([
|
|
67244
67288
|
Field({ nullable: true }),
|
|
@@ -67556,6 +67600,14 @@ __decorate([
|
|
|
67556
67600
|
Field(() => Int, { nullable: true }),
|
|
67557
67601
|
__metadata("design:type", Number)
|
|
67558
67602
|
], CreateAIPromptRunInput.prototype, "EffortLevel", void 0);
|
|
67603
|
+
__decorate([
|
|
67604
|
+
Field({ nullable: true }),
|
|
67605
|
+
__metadata("design:type", String)
|
|
67606
|
+
], CreateAIPromptRunInput.prototype, "RunName", void 0);
|
|
67607
|
+
__decorate([
|
|
67608
|
+
Field({ nullable: true }),
|
|
67609
|
+
__metadata("design:type", String)
|
|
67610
|
+
], CreateAIPromptRunInput.prototype, "Comments", void 0);
|
|
67559
67611
|
CreateAIPromptRunInput = __decorate([
|
|
67560
67612
|
InputType()
|
|
67561
67613
|
], CreateAIPromptRunInput);
|
|
@@ -67640,6 +67692,8 @@ let UpdateAIPromptRunInput = class UpdateAIPromptRunInput {
|
|
|
67640
67692
|
CompletionTime;
|
|
67641
67693
|
ModelSpecificResponseDetails;
|
|
67642
67694
|
EffortLevel;
|
|
67695
|
+
RunName;
|
|
67696
|
+
Comments;
|
|
67643
67697
|
OldValues___;
|
|
67644
67698
|
};
|
|
67645
67699
|
__decorate([
|
|
@@ -67958,6 +68012,14 @@ __decorate([
|
|
|
67958
68012
|
Field(() => Int, { nullable: true }),
|
|
67959
68013
|
__metadata("design:type", Number)
|
|
67960
68014
|
], UpdateAIPromptRunInput.prototype, "EffortLevel", void 0);
|
|
68015
|
+
__decorate([
|
|
68016
|
+
Field({ nullable: true }),
|
|
68017
|
+
__metadata("design:type", String)
|
|
68018
|
+
], UpdateAIPromptRunInput.prototype, "RunName", void 0);
|
|
68019
|
+
__decorate([
|
|
68020
|
+
Field({ nullable: true }),
|
|
68021
|
+
__metadata("design:type", String)
|
|
68022
|
+
], UpdateAIPromptRunInput.prototype, "Comments", void 0);
|
|
67961
68023
|
__decorate([
|
|
67962
68024
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
67963
68025
|
__metadata("design:type", Array)
|
|
@@ -68169,6 +68231,9 @@ let AIAgentRunStep_ = class AIAgentRunStep_ {
|
|
|
68169
68231
|
PayloadAtEnd;
|
|
68170
68232
|
FinalPayloadValidationResult;
|
|
68171
68233
|
FinalPayloadValidationMessages;
|
|
68234
|
+
ParentID;
|
|
68235
|
+
Comments;
|
|
68236
|
+
MJ_AIAgentRunSteps_ParentIDArray;
|
|
68172
68237
|
};
|
|
68173
68238
|
__decorate([
|
|
68174
68239
|
Field({ description: `Unique identifier for this execution step` }),
|
|
@@ -68265,6 +68330,19 @@ __decorate([
|
|
|
68265
68330
|
detailed information about what validation rules failed.` }),
|
|
68266
68331
|
__metadata("design:type", String)
|
|
68267
68332
|
], AIAgentRunStep_.prototype, "FinalPayloadValidationMessages", void 0);
|
|
68333
|
+
__decorate([
|
|
68334
|
+
Field({ nullable: true, description: `Optional reference to parent step for tracking hierarchical relationships like code->test->fix->code cycles` }),
|
|
68335
|
+
MaxLength(16),
|
|
68336
|
+
__metadata("design:type", String)
|
|
68337
|
+
], AIAgentRunStep_.prototype, "ParentID", void 0);
|
|
68338
|
+
__decorate([
|
|
68339
|
+
Field({ nullable: true, description: `Human-readable notes and comments about this agent run step` }),
|
|
68340
|
+
__metadata("design:type", String)
|
|
68341
|
+
], AIAgentRunStep_.prototype, "Comments", void 0);
|
|
68342
|
+
__decorate([
|
|
68343
|
+
Field(() => [AIAgentRunStep_]),
|
|
68344
|
+
__metadata("design:type", Array)
|
|
68345
|
+
], AIAgentRunStep_.prototype, "MJ_AIAgentRunSteps_ParentIDArray", void 0);
|
|
68268
68346
|
AIAgentRunStep_ = __decorate([
|
|
68269
68347
|
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.` })
|
|
68270
68348
|
], AIAgentRunStep_);
|
|
@@ -68288,6 +68366,8 @@ let CreateAIAgentRunStepInput = class CreateAIAgentRunStepInput {
|
|
|
68288
68366
|
PayloadAtEnd;
|
|
68289
68367
|
FinalPayloadValidationResult;
|
|
68290
68368
|
FinalPayloadValidationMessages;
|
|
68369
|
+
ParentID;
|
|
68370
|
+
Comments;
|
|
68291
68371
|
};
|
|
68292
68372
|
__decorate([
|
|
68293
68373
|
Field({ nullable: true }),
|
|
@@ -68361,6 +68441,14 @@ __decorate([
|
|
|
68361
68441
|
Field({ nullable: true }),
|
|
68362
68442
|
__metadata("design:type", String)
|
|
68363
68443
|
], CreateAIAgentRunStepInput.prototype, "FinalPayloadValidationMessages", void 0);
|
|
68444
|
+
__decorate([
|
|
68445
|
+
Field({ nullable: true }),
|
|
68446
|
+
__metadata("design:type", String)
|
|
68447
|
+
], CreateAIAgentRunStepInput.prototype, "ParentID", void 0);
|
|
68448
|
+
__decorate([
|
|
68449
|
+
Field({ nullable: true }),
|
|
68450
|
+
__metadata("design:type", String)
|
|
68451
|
+
], CreateAIAgentRunStepInput.prototype, "Comments", void 0);
|
|
68364
68452
|
CreateAIAgentRunStepInput = __decorate([
|
|
68365
68453
|
InputType()
|
|
68366
68454
|
], CreateAIAgentRunStepInput);
|
|
@@ -68384,6 +68472,8 @@ let UpdateAIAgentRunStepInput = class UpdateAIAgentRunStepInput {
|
|
|
68384
68472
|
PayloadAtEnd;
|
|
68385
68473
|
FinalPayloadValidationResult;
|
|
68386
68474
|
FinalPayloadValidationMessages;
|
|
68475
|
+
ParentID;
|
|
68476
|
+
Comments;
|
|
68387
68477
|
OldValues___;
|
|
68388
68478
|
};
|
|
68389
68479
|
__decorate([
|
|
@@ -68458,6 +68548,14 @@ __decorate([
|
|
|
68458
68548
|
Field({ nullable: true }),
|
|
68459
68549
|
__metadata("design:type", String)
|
|
68460
68550
|
], UpdateAIAgentRunStepInput.prototype, "FinalPayloadValidationMessages", void 0);
|
|
68551
|
+
__decorate([
|
|
68552
|
+
Field({ nullable: true }),
|
|
68553
|
+
__metadata("design:type", String)
|
|
68554
|
+
], UpdateAIAgentRunStepInput.prototype, "ParentID", void 0);
|
|
68555
|
+
__decorate([
|
|
68556
|
+
Field({ nullable: true }),
|
|
68557
|
+
__metadata("design:type", String)
|
|
68558
|
+
], UpdateAIAgentRunStepInput.prototype, "Comments", void 0);
|
|
68461
68559
|
__decorate([
|
|
68462
68560
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
68463
68561
|
__metadata("design:type", Array)
|
|
@@ -68530,6 +68628,15 @@ let AIAgentRunStepResolver = class AIAgentRunStepResolver extends ResolverBase {
|
|
|
68530
68628
|
const result = this.MapFieldNamesToCodeNames('MJ: AI Agent Run Steps', rows && rows.length > 0 ? rows[0] : {});
|
|
68531
68629
|
return result;
|
|
68532
68630
|
}
|
|
68631
|
+
async MJ_AIAgentRunSteps_ParentIDArray(aiagentrunstep_, { dataSources, userPayload, providers }, pubSub) {
|
|
68632
|
+
this.CheckUserReadPermissions('MJ: AI Agent Run Steps', userPayload);
|
|
68633
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68634
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
68635
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRunSteps] WHERE [ParentID]='${aiagentrunstep_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Run Steps', userPayload, EntityPermissionType.Read, 'AND');
|
|
68636
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
68637
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Run Steps', rows);
|
|
68638
|
+
return result;
|
|
68639
|
+
}
|
|
68533
68640
|
async CreateAIAgentRunStep(input, { providers, userPayload }, pubSub) {
|
|
68534
68641
|
const provider = GetReadWriteProvider(providers);
|
|
68535
68642
|
return this.CreateRecord('MJ: AI Agent Run Steps', input, provider, userPayload, pubSub);
|
|
@@ -68580,6 +68687,15 @@ __decorate([
|
|
|
68580
68687
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
68581
68688
|
__metadata("design:returntype", Promise)
|
|
68582
68689
|
], AIAgentRunStepResolver.prototype, "AIAgentRunStep", null);
|
|
68690
|
+
__decorate([
|
|
68691
|
+
FieldResolver(() => [AIAgentRunStep_]),
|
|
68692
|
+
__param(0, Root()),
|
|
68693
|
+
__param(1, Ctx()),
|
|
68694
|
+
__param(2, PubSub()),
|
|
68695
|
+
__metadata("design:type", Function),
|
|
68696
|
+
__metadata("design:paramtypes", [AIAgentRunStep_, Object, PubSubEngine]),
|
|
68697
|
+
__metadata("design:returntype", Promise)
|
|
68698
|
+
], AIAgentRunStepResolver.prototype, "MJ_AIAgentRunSteps_ParentIDArray", null);
|
|
68583
68699
|
__decorate([
|
|
68584
68700
|
Mutation(() => AIAgentRunStep_),
|
|
68585
68701
|
__param(0, Arg('input', () => CreateAIAgentRunStepInput)),
|