@memberjunction/server 2.110.0 → 2.111.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.
@@ -1967,6 +1967,8 @@ let MJAIAgentNoteType_ = class MJAIAgentNoteType_ {
1967
1967
  Description;
1968
1968
  _mj__CreatedAt;
1969
1969
  _mj__UpdatedAt;
1970
+ Priority;
1971
+ Status;
1970
1972
  AIAgentNotes_AgentNoteTypeIDArray;
1971
1973
  };
1972
1974
  __decorate([
@@ -1993,6 +1995,15 @@ __decorate([
1993
1995
  MaxLength(10),
1994
1996
  __metadata("design:type", Date)
1995
1997
  ], MJAIAgentNoteType_.prototype, "_mj__UpdatedAt", void 0);
1998
+ __decorate([
1999
+ Field(() => Int, { description: `Priority for injection ordering. Lower numbers are injected first (0 is highest priority).` }),
2000
+ __metadata("design:type", Number)
2001
+ ], MJAIAgentNoteType_.prototype, "Priority", void 0);
2002
+ __decorate([
2003
+ Field({ description: `Status of the note type: Pending (awaiting approval), Active (available for use), or Revoked (deprecated).` }),
2004
+ MaxLength(40),
2005
+ __metadata("design:type", String)
2006
+ ], MJAIAgentNoteType_.prototype, "Status", void 0);
1996
2007
  __decorate([
1997
2008
  Field(() => [MJAIAgentNote_]),
1998
2009
  __metadata("design:type", Array)
@@ -2005,6 +2016,8 @@ let CreateMJAIAgentNoteTypeInput = class CreateMJAIAgentNoteTypeInput {
2005
2016
  ID;
2006
2017
  Name;
2007
2018
  Description;
2019
+ Priority;
2020
+ Status;
2008
2021
  };
2009
2022
  __decorate([
2010
2023
  Field({ nullable: true }),
@@ -2018,6 +2031,14 @@ __decorate([
2018
2031
  Field({ nullable: true }),
2019
2032
  __metadata("design:type", String)
2020
2033
  ], CreateMJAIAgentNoteTypeInput.prototype, "Description", void 0);
2034
+ __decorate([
2035
+ Field(() => Int, { nullable: true }),
2036
+ __metadata("design:type", Number)
2037
+ ], CreateMJAIAgentNoteTypeInput.prototype, "Priority", void 0);
2038
+ __decorate([
2039
+ Field({ nullable: true }),
2040
+ __metadata("design:type", String)
2041
+ ], CreateMJAIAgentNoteTypeInput.prototype, "Status", void 0);
2021
2042
  CreateMJAIAgentNoteTypeInput = __decorate([
2022
2043
  InputType()
2023
2044
  ], CreateMJAIAgentNoteTypeInput);
@@ -2026,6 +2047,8 @@ let UpdateMJAIAgentNoteTypeInput = class UpdateMJAIAgentNoteTypeInput {
2026
2047
  ID;
2027
2048
  Name;
2028
2049
  Description;
2050
+ Priority;
2051
+ Status;
2029
2052
  OldValues___;
2030
2053
  };
2031
2054
  __decorate([
@@ -2040,6 +2063,14 @@ __decorate([
2040
2063
  Field({ nullable: true }),
2041
2064
  __metadata("design:type", String)
2042
2065
  ], UpdateMJAIAgentNoteTypeInput.prototype, "Description", void 0);
2066
+ __decorate([
2067
+ Field(() => Int, { nullable: true }),
2068
+ __metadata("design:type", Number)
2069
+ ], UpdateMJAIAgentNoteTypeInput.prototype, "Priority", void 0);
2070
+ __decorate([
2071
+ Field({ nullable: true }),
2072
+ __metadata("design:type", String)
2073
+ ], UpdateMJAIAgentNoteTypeInput.prototype, "Status", void 0);
2043
2074
  __decorate([
2044
2075
  Field(() => [KeyValuePairInput], { nullable: true }),
2045
2076
  __metadata("design:type", Array)
@@ -2502,8 +2533,10 @@ let MJAIAgentRun_ = class MJAIAgentRun_ {
2502
2533
  OverrideVendor;
2503
2534
  RootParentRunID;
2504
2535
  RootLastRunID;
2505
- MJ_AIAgentRuns_ParentRunIDArray;
2506
2536
  MJ_AIAgentRunSteps_AgentRunIDArray;
2537
+ MJ_AIAgentRuns_ParentRunIDArray;
2538
+ AIAgentNotes_SourceAIAgentRunIDArray;
2539
+ MJ_AIAgentExamples_SourceAIAgentRunIDArray;
2507
2540
  MJ_AIPromptRuns_AgentRunIDArray;
2508
2541
  };
2509
2542
  __decorate([
@@ -2726,14 +2759,22 @@ __decorate([
2726
2759
  MaxLength(16),
2727
2760
  __metadata("design:type", String)
2728
2761
  ], MJAIAgentRun_.prototype, "RootLastRunID", void 0);
2762
+ __decorate([
2763
+ Field(() => [MJAIAgentRunStep_]),
2764
+ __metadata("design:type", Array)
2765
+ ], MJAIAgentRun_.prototype, "MJ_AIAgentRunSteps_AgentRunIDArray", void 0);
2729
2766
  __decorate([
2730
2767
  Field(() => [MJAIAgentRun_]),
2731
2768
  __metadata("design:type", Array)
2732
2769
  ], MJAIAgentRun_.prototype, "MJ_AIAgentRuns_ParentRunIDArray", void 0);
2733
2770
  __decorate([
2734
- Field(() => [MJAIAgentRunStep_]),
2771
+ Field(() => [MJAIAgentNote_]),
2735
2772
  __metadata("design:type", Array)
2736
- ], MJAIAgentRun_.prototype, "MJ_AIAgentRunSteps_AgentRunIDArray", void 0);
2773
+ ], MJAIAgentRun_.prototype, "AIAgentNotes_SourceAIAgentRunIDArray", void 0);
2774
+ __decorate([
2775
+ Field(() => [MJAIAgentExample_]),
2776
+ __metadata("design:type", Array)
2777
+ ], MJAIAgentRun_.prototype, "MJ_AIAgentExamples_SourceAIAgentRunIDArray", void 0);
2737
2778
  __decorate([
2738
2779
  Field(() => [MJAIPromptRun_]),
2739
2780
  __metadata("design:type", Array)
@@ -3203,6 +3244,15 @@ let MJAIAgentRunResolver = class MJAIAgentRunResolver extends ResolverBase {
3203
3244
  const result = this.MapFieldNamesToCodeNames('MJ: AI Agent Runs', rows && rows.length > 0 ? rows[0] : {});
3204
3245
  return result;
3205
3246
  }
3247
+ async MJ_AIAgentRunSteps_AgentRunIDArray(mjaiagentrun_, { dataSources, userPayload, providers }, pubSub) {
3248
+ this.CheckUserReadPermissions('MJ: AI Agent Run Steps', userPayload);
3249
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
3250
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
3251
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRunSteps] WHERE [AgentRunID]='${mjaiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Run Steps', userPayload, EntityPermissionType.Read, 'AND');
3252
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
3253
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Run Steps', rows);
3254
+ return result;
3255
+ }
3206
3256
  async MJ_AIAgentRuns_ParentRunIDArray(mjaiagentrun_, { dataSources, userPayload, providers }, pubSub) {
3207
3257
  this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
3208
3258
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -3212,13 +3262,22 @@ let MJAIAgentRunResolver = class MJAIAgentRunResolver extends ResolverBase {
3212
3262
  const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Runs', rows);
3213
3263
  return result;
3214
3264
  }
3215
- async MJ_AIAgentRunSteps_AgentRunIDArray(mjaiagentrun_, { dataSources, userPayload, providers }, pubSub) {
3216
- this.CheckUserReadPermissions('MJ: AI Agent Run Steps', userPayload);
3265
+ async AIAgentNotes_SourceAIAgentRunIDArray(mjaiagentrun_, { dataSources, userPayload, providers }, pubSub) {
3266
+ this.CheckUserReadPermissions('AI Agent Notes', userPayload);
3217
3267
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
3218
3268
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
3219
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRunSteps] WHERE [AgentRunID]='${mjaiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Run Steps', userPayload, EntityPermissionType.Read, 'AND');
3269
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNotes] WHERE [SourceAIAgentRunID]='${mjaiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Notes', userPayload, EntityPermissionType.Read, 'AND');
3220
3270
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
3221
- const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Run Steps', rows);
3271
+ const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Notes', rows);
3272
+ return result;
3273
+ }
3274
+ async MJ_AIAgentExamples_SourceAIAgentRunIDArray(mjaiagentrun_, { dataSources, userPayload, providers }, pubSub) {
3275
+ this.CheckUserReadPermissions('MJ: AI Agent Examples', userPayload);
3276
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
3277
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
3278
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentExamples] WHERE [SourceAIAgentRunID]='${mjaiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Examples', userPayload, EntityPermissionType.Read, 'AND');
3279
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
3280
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Examples', rows);
3222
3281
  return result;
3223
3282
  }
3224
3283
  async MJ_AIPromptRuns_AgentRunIDArray(mjaiagentrun_, { dataSources, userPayload, providers }, pubSub) {
@@ -3280,6 +3339,15 @@ __decorate([
3280
3339
  __metadata("design:paramtypes", [String, Object, PubSubEngine]),
3281
3340
  __metadata("design:returntype", Promise)
3282
3341
  ], MJAIAgentRunResolver.prototype, "MJAIAgentRun", null);
3342
+ __decorate([
3343
+ FieldResolver(() => [MJAIAgentRunStep_]),
3344
+ __param(0, Root()),
3345
+ __param(1, Ctx()),
3346
+ __param(2, PubSub()),
3347
+ __metadata("design:type", Function),
3348
+ __metadata("design:paramtypes", [MJAIAgentRun_, Object, PubSubEngine]),
3349
+ __metadata("design:returntype", Promise)
3350
+ ], MJAIAgentRunResolver.prototype, "MJ_AIAgentRunSteps_AgentRunIDArray", null);
3283
3351
  __decorate([
3284
3352
  FieldResolver(() => [MJAIAgentRun_]),
3285
3353
  __param(0, Root()),
@@ -3290,14 +3358,23 @@ __decorate([
3290
3358
  __metadata("design:returntype", Promise)
3291
3359
  ], MJAIAgentRunResolver.prototype, "MJ_AIAgentRuns_ParentRunIDArray", null);
3292
3360
  __decorate([
3293
- FieldResolver(() => [MJAIAgentRunStep_]),
3361
+ FieldResolver(() => [MJAIAgentNote_]),
3294
3362
  __param(0, Root()),
3295
3363
  __param(1, Ctx()),
3296
3364
  __param(2, PubSub()),
3297
3365
  __metadata("design:type", Function),
3298
3366
  __metadata("design:paramtypes", [MJAIAgentRun_, Object, PubSubEngine]),
3299
3367
  __metadata("design:returntype", Promise)
3300
- ], MJAIAgentRunResolver.prototype, "MJ_AIAgentRunSteps_AgentRunIDArray", null);
3368
+ ], MJAIAgentRunResolver.prototype, "AIAgentNotes_SourceAIAgentRunIDArray", null);
3369
+ __decorate([
3370
+ FieldResolver(() => [MJAIAgentExample_]),
3371
+ __param(0, Root()),
3372
+ __param(1, Ctx()),
3373
+ __param(2, PubSub()),
3374
+ __metadata("design:type", Function),
3375
+ __metadata("design:paramtypes", [MJAIAgentRun_, Object, PubSubEngine]),
3376
+ __metadata("design:returntype", Promise)
3377
+ ], MJAIAgentRunResolver.prototype, "MJ_AIAgentExamples_SourceAIAgentRunIDArray", null);
3301
3378
  __decorate([
3302
3379
  FieldResolver(() => [MJAIPromptRun_]),
3303
3380
  __param(0, Root()),
@@ -4464,6 +4541,12 @@ let MJAIAgent_ = class MJAIAgent_ {
4464
4541
  ArtifactCreationMode;
4465
4542
  FunctionalRequirements;
4466
4543
  TechnicalDesign;
4544
+ InjectNotes;
4545
+ MaxNotesToInject;
4546
+ NoteInjectionStrategy;
4547
+ InjectExamples;
4548
+ MaxExamplesToInject;
4549
+ ExampleInjectionStrategy;
4467
4550
  Parent;
4468
4551
  ContextCompressionPrompt;
4469
4552
  Type;
@@ -4485,6 +4568,7 @@ let MJAIAgent_ = class MJAIAgent_ {
4485
4568
  MJ_AIAgentSteps_SubAgentIDArray;
4486
4569
  MJ_AIAgentRelationships_SubAgentIDArray;
4487
4570
  MJ_Tasks_AgentIDArray;
4571
+ MJ_AIAgentExamples_AgentIDArray;
4488
4572
  AIResultCache_AgentIDArray;
4489
4573
  MJ_AIPromptRuns_AgentIDArray;
4490
4574
  ConversationDetails_AgentIDArray;
@@ -4689,6 +4773,32 @@ __decorate([
4689
4773
  Field({ nullable: true, description: `Detailed markdown that explains the structure of the agent including agent architecture, actions, sub-agents, prompts, and payload structure.` }),
4690
4774
  __metadata("design:type", String)
4691
4775
  ], MJAIAgent_.prototype, "TechnicalDesign", void 0);
4776
+ __decorate([
4777
+ Field(() => Boolean, { description: `When enabled, agent notes will be automatically injected into the agent context based on scoping rules.` }),
4778
+ __metadata("design:type", Boolean)
4779
+ ], MJAIAgent_.prototype, "InjectNotes", void 0);
4780
+ __decorate([
4781
+ Field(() => Int, { description: `Maximum number of notes to inject into agent context per request.` }),
4782
+ __metadata("design:type", Number)
4783
+ ], MJAIAgent_.prototype, "MaxNotesToInject", void 0);
4784
+ __decorate([
4785
+ Field({ description: `Strategy for selecting which notes to inject: Relevant (semantic search), Recent (most recent first), or All (up to max limit).` }),
4786
+ MaxLength(40),
4787
+ __metadata("design:type", String)
4788
+ ], MJAIAgent_.prototype, "NoteInjectionStrategy", void 0);
4789
+ __decorate([
4790
+ Field(() => Boolean, { description: `When enabled, agent examples will be automatically injected into the agent context based on scoping rules.` }),
4791
+ __metadata("design:type", Boolean)
4792
+ ], MJAIAgent_.prototype, "InjectExamples", void 0);
4793
+ __decorate([
4794
+ Field(() => Int, { description: `Maximum number of examples to inject into agent context per request.` }),
4795
+ __metadata("design:type", Number)
4796
+ ], MJAIAgent_.prototype, "MaxExamplesToInject", void 0);
4797
+ __decorate([
4798
+ Field({ description: `Strategy for selecting which examples to inject: Semantic (vector similarity), Recent (most recent first), or Rated (highest success score first).` }),
4799
+ MaxLength(40),
4800
+ __metadata("design:type", String)
4801
+ ], MJAIAgent_.prototype, "ExampleInjectionStrategy", void 0);
4692
4802
  __decorate([
4693
4803
  Field({ nullable: true }),
4694
4804
  MaxLength(510),
@@ -4779,6 +4889,10 @@ __decorate([
4779
4889
  Field(() => [MJTask_]),
4780
4890
  __metadata("design:type", Array)
4781
4891
  ], MJAIAgent_.prototype, "MJ_Tasks_AgentIDArray", void 0);
4892
+ __decorate([
4893
+ Field(() => [MJAIAgentExample_]),
4894
+ __metadata("design:type", Array)
4895
+ ], MJAIAgent_.prototype, "MJ_AIAgentExamples_AgentIDArray", void 0);
4782
4896
  __decorate([
4783
4897
  Field(() => [MJAIResultCache_]),
4784
4898
  __metadata("design:type", Array)
@@ -4841,6 +4955,12 @@ let CreateMJAIAgentInput = class CreateMJAIAgentInput {
4841
4955
  ArtifactCreationMode;
4842
4956
  FunctionalRequirements;
4843
4957
  TechnicalDesign;
4958
+ InjectNotes;
4959
+ MaxNotesToInject;
4960
+ NoteInjectionStrategy;
4961
+ InjectExamples;
4962
+ MaxExamplesToInject;
4963
+ ExampleInjectionStrategy;
4844
4964
  };
4845
4965
  __decorate([
4846
4966
  Field({ nullable: true }),
@@ -5006,6 +5126,30 @@ __decorate([
5006
5126
  Field({ nullable: true }),
5007
5127
  __metadata("design:type", String)
5008
5128
  ], CreateMJAIAgentInput.prototype, "TechnicalDesign", void 0);
5129
+ __decorate([
5130
+ Field(() => Boolean, { nullable: true }),
5131
+ __metadata("design:type", Boolean)
5132
+ ], CreateMJAIAgentInput.prototype, "InjectNotes", void 0);
5133
+ __decorate([
5134
+ Field(() => Int, { nullable: true }),
5135
+ __metadata("design:type", Number)
5136
+ ], CreateMJAIAgentInput.prototype, "MaxNotesToInject", void 0);
5137
+ __decorate([
5138
+ Field({ nullable: true }),
5139
+ __metadata("design:type", String)
5140
+ ], CreateMJAIAgentInput.prototype, "NoteInjectionStrategy", void 0);
5141
+ __decorate([
5142
+ Field(() => Boolean, { nullable: true }),
5143
+ __metadata("design:type", Boolean)
5144
+ ], CreateMJAIAgentInput.prototype, "InjectExamples", void 0);
5145
+ __decorate([
5146
+ Field(() => Int, { nullable: true }),
5147
+ __metadata("design:type", Number)
5148
+ ], CreateMJAIAgentInput.prototype, "MaxExamplesToInject", void 0);
5149
+ __decorate([
5150
+ Field({ nullable: true }),
5151
+ __metadata("design:type", String)
5152
+ ], CreateMJAIAgentInput.prototype, "ExampleInjectionStrategy", void 0);
5009
5153
  CreateMJAIAgentInput = __decorate([
5010
5154
  InputType()
5011
5155
  ], CreateMJAIAgentInput);
@@ -5052,6 +5196,12 @@ let UpdateMJAIAgentInput = class UpdateMJAIAgentInput {
5052
5196
  ArtifactCreationMode;
5053
5197
  FunctionalRequirements;
5054
5198
  TechnicalDesign;
5199
+ InjectNotes;
5200
+ MaxNotesToInject;
5201
+ NoteInjectionStrategy;
5202
+ InjectExamples;
5203
+ MaxExamplesToInject;
5204
+ ExampleInjectionStrategy;
5055
5205
  OldValues___;
5056
5206
  };
5057
5207
  __decorate([
@@ -5218,6 +5368,30 @@ __decorate([
5218
5368
  Field({ nullable: true }),
5219
5369
  __metadata("design:type", String)
5220
5370
  ], UpdateMJAIAgentInput.prototype, "TechnicalDesign", void 0);
5371
+ __decorate([
5372
+ Field(() => Boolean, { nullable: true }),
5373
+ __metadata("design:type", Boolean)
5374
+ ], UpdateMJAIAgentInput.prototype, "InjectNotes", void 0);
5375
+ __decorate([
5376
+ Field(() => Int, { nullable: true }),
5377
+ __metadata("design:type", Number)
5378
+ ], UpdateMJAIAgentInput.prototype, "MaxNotesToInject", void 0);
5379
+ __decorate([
5380
+ Field({ nullable: true }),
5381
+ __metadata("design:type", String)
5382
+ ], UpdateMJAIAgentInput.prototype, "NoteInjectionStrategy", void 0);
5383
+ __decorate([
5384
+ Field(() => Boolean, { nullable: true }),
5385
+ __metadata("design:type", Boolean)
5386
+ ], UpdateMJAIAgentInput.prototype, "InjectExamples", void 0);
5387
+ __decorate([
5388
+ Field(() => Int, { nullable: true }),
5389
+ __metadata("design:type", Number)
5390
+ ], UpdateMJAIAgentInput.prototype, "MaxExamplesToInject", void 0);
5391
+ __decorate([
5392
+ Field({ nullable: true }),
5393
+ __metadata("design:type", String)
5394
+ ], UpdateMJAIAgentInput.prototype, "ExampleInjectionStrategy", void 0);
5221
5395
  __decorate([
5222
5396
  Field(() => [KeyValuePairInput], { nullable: true }),
5223
5397
  __metadata("design:type", Array)
@@ -5425,6 +5599,15 @@ let MJAIAgentResolver = class MJAIAgentResolver extends ResolverBase {
5425
5599
  const result = this.ArrayMapFieldNamesToCodeNames('MJ: Tasks', rows);
5426
5600
  return result;
5427
5601
  }
5602
+ async MJ_AIAgentExamples_AgentIDArray(mjaiagent_, { dataSources, userPayload, providers }, pubSub) {
5603
+ this.CheckUserReadPermissions('MJ: AI Agent Examples', userPayload);
5604
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
5605
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
5606
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentExamples] WHERE [AgentID]='${mjaiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Examples', userPayload, EntityPermissionType.Read, 'AND');
5607
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
5608
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Examples', rows);
5609
+ return result;
5610
+ }
5428
5611
  async AIResultCache_AgentIDArray(mjaiagent_, { dataSources, userPayload, providers }, pubSub) {
5429
5612
  this.CheckUserReadPermissions('AI Result Cache', userPayload);
5430
5613
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -5646,6 +5829,15 @@ __decorate([
5646
5829
  __metadata("design:paramtypes", [MJAIAgent_, Object, PubSubEngine]),
5647
5830
  __metadata("design:returntype", Promise)
5648
5831
  ], MJAIAgentResolver.prototype, "MJ_Tasks_AgentIDArray", null);
5832
+ __decorate([
5833
+ FieldResolver(() => [MJAIAgentExample_]),
5834
+ __param(0, Root()),
5835
+ __param(1, Ctx()),
5836
+ __param(2, PubSub()),
5837
+ __metadata("design:type", Function),
5838
+ __metadata("design:paramtypes", [MJAIAgent_, Object, PubSubEngine]),
5839
+ __metadata("design:returntype", Promise)
5840
+ ], MJAIAgentResolver.prototype, "MJ_AIAgentExamples_AgentIDArray", null);
5649
5841
  __decorate([
5650
5842
  FieldResolver(() => [MJAIResultCache_]),
5651
5843
  __param(0, Root()),
@@ -5736,6 +5928,8 @@ let MJAIAgentStep_ = class MJAIAgentStep_ {
5736
5928
  _mj__UpdatedAt;
5737
5929
  Status;
5738
5930
  ActionInputMapping;
5931
+ LoopBodyType;
5932
+ Configuration;
5739
5933
  Agent;
5740
5934
  Action;
5741
5935
  SubAgent;
@@ -5838,6 +6032,15 @@ __decorate([
5838
6032
  Field({ nullable: true, description: `JSON configuration for mapping static values or payload paths to action input parameters. Example: {"param1": "staticValue", "param2": "payload.dynamicValue"}` }),
5839
6033
  __metadata("design:type", String)
5840
6034
  ], MJAIAgentStep_.prototype, "ActionInputMapping", void 0);
6035
+ __decorate([
6036
+ Field({ nullable: true, description: `Specifies what type of operation executes in the loop body. Values: Action, Sub-Agent, Prompt. Only used when StepType is ForEach or While.` }),
6037
+ MaxLength(100),
6038
+ __metadata("design:type", String)
6039
+ ], MJAIAgentStep_.prototype, "LoopBodyType", void 0);
6040
+ __decorate([
6041
+ Field({ nullable: true, description: `JSON configuration object for step-specific settings. For loop steps: { type: "ForEach"|"While", collectionPath?, itemVariable?, indexVariable?, maxIterations?, continueOnError?, condition? }. For other step types: reserved for future use.` }),
6042
+ __metadata("design:type", String)
6043
+ ], MJAIAgentStep_.prototype, "Configuration", void 0);
5841
6044
  __decorate([
5842
6045
  Field({ nullable: true }),
5843
6046
  MaxLength(510),
@@ -5890,6 +6093,8 @@ let CreateMJAIAgentStepInput = class CreateMJAIAgentStepInput {
5890
6093
  Height;
5891
6094
  Status;
5892
6095
  ActionInputMapping;
6096
+ LoopBodyType;
6097
+ Configuration;
5893
6098
  };
5894
6099
  __decorate([
5895
6100
  Field({ nullable: true }),
@@ -5967,6 +6172,14 @@ __decorate([
5967
6172
  Field({ nullable: true }),
5968
6173
  __metadata("design:type", String)
5969
6174
  ], CreateMJAIAgentStepInput.prototype, "ActionInputMapping", void 0);
6175
+ __decorate([
6176
+ Field({ nullable: true }),
6177
+ __metadata("design:type", String)
6178
+ ], CreateMJAIAgentStepInput.prototype, "LoopBodyType", void 0);
6179
+ __decorate([
6180
+ Field({ nullable: true }),
6181
+ __metadata("design:type", String)
6182
+ ], CreateMJAIAgentStepInput.prototype, "Configuration", void 0);
5970
6183
  CreateMJAIAgentStepInput = __decorate([
5971
6184
  InputType()
5972
6185
  ], CreateMJAIAgentStepInput);
@@ -5991,6 +6204,8 @@ let UpdateMJAIAgentStepInput = class UpdateMJAIAgentStepInput {
5991
6204
  Height;
5992
6205
  Status;
5993
6206
  ActionInputMapping;
6207
+ LoopBodyType;
6208
+ Configuration;
5994
6209
  OldValues___;
5995
6210
  };
5996
6211
  __decorate([
@@ -6069,6 +6284,14 @@ __decorate([
6069
6284
  Field({ nullable: true }),
6070
6285
  __metadata("design:type", String)
6071
6286
  ], UpdateMJAIAgentStepInput.prototype, "ActionInputMapping", void 0);
6287
+ __decorate([
6288
+ Field({ nullable: true }),
6289
+ __metadata("design:type", String)
6290
+ ], UpdateMJAIAgentStepInput.prototype, "LoopBodyType", void 0);
6291
+ __decorate([
6292
+ Field({ nullable: true }),
6293
+ __metadata("design:type", String)
6294
+ ], UpdateMJAIAgentStepInput.prototype, "Configuration", void 0);
6072
6295
  __decorate([
6073
6296
  Field(() => [KeyValuePairInput], { nullable: true }),
6074
6297
  __metadata("design:type", Array)
@@ -7436,11 +7659,20 @@ let MJAIAgentNote_ = class MJAIAgentNote_ {
7436
7659
  Note;
7437
7660
  _mj__CreatedAt;
7438
7661
  _mj__UpdatedAt;
7439
- Type;
7440
7662
  UserID;
7663
+ Type;
7664
+ IsAutoGenerated;
7665
+ Comments;
7666
+ Status;
7667
+ SourceConversationID;
7668
+ SourceConversationDetailID;
7669
+ SourceAIAgentRunID;
7670
+ CompanyID;
7441
7671
  Agent;
7442
7672
  AgentNoteType;
7443
7673
  User;
7674
+ SourceConversation;
7675
+ Company;
7444
7676
  };
7445
7677
  __decorate([
7446
7678
  Field(),
@@ -7472,15 +7704,48 @@ __decorate([
7472
7704
  __metadata("design:type", Date)
7473
7705
  ], MJAIAgentNote_.prototype, "_mj__UpdatedAt", void 0);
7474
7706
  __decorate([
7475
- Field({ description: `Indicates the type of note, either User-specific or Global.` }),
7707
+ Field({ nullable: true, description: `Foreign key referencing the ID column in the User table, indicating the user associated with the note. Used when Type=User` }),
7708
+ MaxLength(16),
7709
+ __metadata("design:type", String)
7710
+ ], MJAIAgentNote_.prototype, "UserID", void 0);
7711
+ __decorate([
7712
+ Field({ description: `Quick categorization of the note content: Preference (user preferences), Constraint (hard rules/requirements), Context (background information), Example (sample interactions), or Issue (known problems/limitations). Complements the more detailed AIAgentNoteType categorization.` }),
7476
7713
  MaxLength(40),
7477
7714
  __metadata("design:type", String)
7478
7715
  ], MJAIAgentNote_.prototype, "Type", void 0);
7479
7716
  __decorate([
7480
- Field({ nullable: true, description: `Foreign key referencing the ID column in the User table, indicating the user associated with the note. Used when Type=User` }),
7717
+ Field(() => Boolean, { description: `Indicates whether this note was automatically generated by an AI agent (1) or manually created (0).` }),
7718
+ __metadata("design:type", Boolean)
7719
+ ], MJAIAgentNote_.prototype, "IsAutoGenerated", void 0);
7720
+ __decorate([
7721
+ Field({ nullable: true, description: `Internal comments about this note, not included in agent context injection.` }),
7722
+ __metadata("design:type", String)
7723
+ ], MJAIAgentNote_.prototype, "Comments", void 0);
7724
+ __decorate([
7725
+ Field({ description: `Status of the note: Pending (awaiting review), Active (in use), or Revoked (disabled).` }),
7726
+ MaxLength(40),
7727
+ __metadata("design:type", String)
7728
+ ], MJAIAgentNote_.prototype, "Status", void 0);
7729
+ __decorate([
7730
+ Field({ nullable: true, description: `Optional reference to the conversation that inspired or generated this note.` }),
7481
7731
  MaxLength(16),
7482
7732
  __metadata("design:type", String)
7483
- ], MJAIAgentNote_.prototype, "UserID", void 0);
7733
+ ], MJAIAgentNote_.prototype, "SourceConversationID", void 0);
7734
+ __decorate([
7735
+ Field({ nullable: true, description: `Optional reference to the specific conversation message that inspired this note.` }),
7736
+ MaxLength(16),
7737
+ __metadata("design:type", String)
7738
+ ], MJAIAgentNote_.prototype, "SourceConversationDetailID", void 0);
7739
+ __decorate([
7740
+ Field({ nullable: true, description: `Optional reference to the AI agent run that generated this note.` }),
7741
+ MaxLength(16),
7742
+ __metadata("design:type", String)
7743
+ ], MJAIAgentNote_.prototype, "SourceAIAgentRunID", void 0);
7744
+ __decorate([
7745
+ Field({ nullable: true, description: `Optional company scope for this note. When populated with UserID, creates org+user specific notes.` }),
7746
+ MaxLength(16),
7747
+ __metadata("design:type", String)
7748
+ ], MJAIAgentNote_.prototype, "CompanyID", void 0);
7484
7749
  __decorate([
7485
7750
  Field({ nullable: true }),
7486
7751
  MaxLength(510),
@@ -7496,8 +7761,18 @@ __decorate([
7496
7761
  MaxLength(200),
7497
7762
  __metadata("design:type", String)
7498
7763
  ], MJAIAgentNote_.prototype, "User", void 0);
7764
+ __decorate([
7765
+ Field({ nullable: true }),
7766
+ MaxLength(510),
7767
+ __metadata("design:type", String)
7768
+ ], MJAIAgentNote_.prototype, "SourceConversation", void 0);
7769
+ __decorate([
7770
+ Field({ nullable: true }),
7771
+ MaxLength(100),
7772
+ __metadata("design:type", String)
7773
+ ], MJAIAgentNote_.prototype, "Company", void 0);
7499
7774
  MJAIAgentNote_ = __decorate([
7500
- ObjectType({ description: `Stores notes, observations, and learnings generated by AI agents during their operations, linked to specific agent runs and categorized by note type. Can be user-specific or general.` })
7775
+ ObjectType({ description: `Stores notes, observations, and learnings for AI agents with multi-dimensional scoping (Agent, User, company). Scoping is determined by which FK fields are populated: all NULL = global, AgentID only = agent-specific, UserID only = user-specific across all agents, etc.` })
7501
7776
  ], MJAIAgentNote_);
7502
7777
  export { MJAIAgentNote_ };
7503
7778
  let CreateMJAIAgentNoteInput = class CreateMJAIAgentNoteInput {
@@ -7505,8 +7780,15 @@ let CreateMJAIAgentNoteInput = class CreateMJAIAgentNoteInput {
7505
7780
  AgentID;
7506
7781
  AgentNoteTypeID;
7507
7782
  Note;
7508
- Type;
7509
7783
  UserID;
7784
+ Type;
7785
+ IsAutoGenerated;
7786
+ Comments;
7787
+ Status;
7788
+ SourceConversationID;
7789
+ SourceConversationDetailID;
7790
+ SourceAIAgentRunID;
7791
+ CompanyID;
7510
7792
  };
7511
7793
  __decorate([
7512
7794
  Field({ nullable: true }),
@@ -7524,14 +7806,42 @@ __decorate([
7524
7806
  Field({ nullable: true }),
7525
7807
  __metadata("design:type", String)
7526
7808
  ], CreateMJAIAgentNoteInput.prototype, "Note", void 0);
7809
+ __decorate([
7810
+ Field({ nullable: true }),
7811
+ __metadata("design:type", String)
7812
+ ], CreateMJAIAgentNoteInput.prototype, "UserID", void 0);
7527
7813
  __decorate([
7528
7814
  Field({ nullable: true }),
7529
7815
  __metadata("design:type", String)
7530
7816
  ], CreateMJAIAgentNoteInput.prototype, "Type", void 0);
7817
+ __decorate([
7818
+ Field(() => Boolean, { nullable: true }),
7819
+ __metadata("design:type", Boolean)
7820
+ ], CreateMJAIAgentNoteInput.prototype, "IsAutoGenerated", void 0);
7531
7821
  __decorate([
7532
7822
  Field({ nullable: true }),
7533
7823
  __metadata("design:type", String)
7534
- ], CreateMJAIAgentNoteInput.prototype, "UserID", void 0);
7824
+ ], CreateMJAIAgentNoteInput.prototype, "Comments", void 0);
7825
+ __decorate([
7826
+ Field({ nullable: true }),
7827
+ __metadata("design:type", String)
7828
+ ], CreateMJAIAgentNoteInput.prototype, "Status", void 0);
7829
+ __decorate([
7830
+ Field({ nullable: true }),
7831
+ __metadata("design:type", String)
7832
+ ], CreateMJAIAgentNoteInput.prototype, "SourceConversationID", void 0);
7833
+ __decorate([
7834
+ Field({ nullable: true }),
7835
+ __metadata("design:type", String)
7836
+ ], CreateMJAIAgentNoteInput.prototype, "SourceConversationDetailID", void 0);
7837
+ __decorate([
7838
+ Field({ nullable: true }),
7839
+ __metadata("design:type", String)
7840
+ ], CreateMJAIAgentNoteInput.prototype, "SourceAIAgentRunID", void 0);
7841
+ __decorate([
7842
+ Field({ nullable: true }),
7843
+ __metadata("design:type", String)
7844
+ ], CreateMJAIAgentNoteInput.prototype, "CompanyID", void 0);
7535
7845
  CreateMJAIAgentNoteInput = __decorate([
7536
7846
  InputType()
7537
7847
  ], CreateMJAIAgentNoteInput);
@@ -7541,8 +7851,15 @@ let UpdateMJAIAgentNoteInput = class UpdateMJAIAgentNoteInput {
7541
7851
  AgentID;
7542
7852
  AgentNoteTypeID;
7543
7853
  Note;
7544
- Type;
7545
7854
  UserID;
7855
+ Type;
7856
+ IsAutoGenerated;
7857
+ Comments;
7858
+ Status;
7859
+ SourceConversationID;
7860
+ SourceConversationDetailID;
7861
+ SourceAIAgentRunID;
7862
+ CompanyID;
7546
7863
  OldValues___;
7547
7864
  };
7548
7865
  __decorate([
@@ -7561,14 +7878,42 @@ __decorate([
7561
7878
  Field({ nullable: true }),
7562
7879
  __metadata("design:type", String)
7563
7880
  ], UpdateMJAIAgentNoteInput.prototype, "Note", void 0);
7881
+ __decorate([
7882
+ Field({ nullable: true }),
7883
+ __metadata("design:type", String)
7884
+ ], UpdateMJAIAgentNoteInput.prototype, "UserID", void 0);
7564
7885
  __decorate([
7565
7886
  Field({ nullable: true }),
7566
7887
  __metadata("design:type", String)
7567
7888
  ], UpdateMJAIAgentNoteInput.prototype, "Type", void 0);
7889
+ __decorate([
7890
+ Field(() => Boolean, { nullable: true }),
7891
+ __metadata("design:type", Boolean)
7892
+ ], UpdateMJAIAgentNoteInput.prototype, "IsAutoGenerated", void 0);
7568
7893
  __decorate([
7569
7894
  Field({ nullable: true }),
7570
7895
  __metadata("design:type", String)
7571
- ], UpdateMJAIAgentNoteInput.prototype, "UserID", void 0);
7896
+ ], UpdateMJAIAgentNoteInput.prototype, "Comments", void 0);
7897
+ __decorate([
7898
+ Field({ nullable: true }),
7899
+ __metadata("design:type", String)
7900
+ ], UpdateMJAIAgentNoteInput.prototype, "Status", void 0);
7901
+ __decorate([
7902
+ Field({ nullable: true }),
7903
+ __metadata("design:type", String)
7904
+ ], UpdateMJAIAgentNoteInput.prototype, "SourceConversationID", void 0);
7905
+ __decorate([
7906
+ Field({ nullable: true }),
7907
+ __metadata("design:type", String)
7908
+ ], UpdateMJAIAgentNoteInput.prototype, "SourceConversationDetailID", void 0);
7909
+ __decorate([
7910
+ Field({ nullable: true }),
7911
+ __metadata("design:type", String)
7912
+ ], UpdateMJAIAgentNoteInput.prototype, "SourceAIAgentRunID", void 0);
7913
+ __decorate([
7914
+ Field({ nullable: true }),
7915
+ __metadata("design:type", String)
7916
+ ], UpdateMJAIAgentNoteInput.prototype, "CompanyID", void 0);
7572
7917
  __decorate([
7573
7918
  Field(() => [KeyValuePairInput], { nullable: true }),
7574
7919
  __metadata("design:type", Array)
@@ -10399,8 +10744,8 @@ let MJAIPrompt_ = class MJAIPrompt_ {
10399
10744
  AIAgentActions_CompactPromptIDArray;
10400
10745
  MJ_AIConfigurations_DefaultPromptForContextSummarizationIDArray;
10401
10746
  AIPrompts_ResultSelectorPromptIDArray;
10402
- MJ_AIAgentPrompts_PromptIDArray;
10403
10747
  MJ_AIPromptModels_PromptIDArray;
10748
+ MJ_AIAgentPrompts_PromptIDArray;
10404
10749
  MJ_AIAgentSteps_PromptIDArray;
10405
10750
  MJ_AIPromptRuns_PromptIDArray;
10406
10751
  AIAgents_ContextCompressionPromptIDArray;
@@ -10689,14 +11034,14 @@ __decorate([
10689
11034
  Field(() => [MJAIPrompt_]),
10690
11035
  __metadata("design:type", Array)
10691
11036
  ], MJAIPrompt_.prototype, "AIPrompts_ResultSelectorPromptIDArray", void 0);
10692
- __decorate([
10693
- Field(() => [MJAIAgentPrompt_]),
10694
- __metadata("design:type", Array)
10695
- ], MJAIPrompt_.prototype, "MJ_AIAgentPrompts_PromptIDArray", void 0);
10696
11037
  __decorate([
10697
11038
  Field(() => [MJAIPromptModel_]),
10698
11039
  __metadata("design:type", Array)
10699
11040
  ], MJAIPrompt_.prototype, "MJ_AIPromptModels_PromptIDArray", void 0);
11041
+ __decorate([
11042
+ Field(() => [MJAIAgentPrompt_]),
11043
+ __metadata("design:type", Array)
11044
+ ], MJAIPrompt_.prototype, "MJ_AIAgentPrompts_PromptIDArray", void 0);
10700
11045
  __decorate([
10701
11046
  Field(() => [MJAIAgentStep_]),
10702
11047
  __metadata("design:type", Array)
@@ -11342,22 +11687,22 @@ let MJAIPromptResolver = class MJAIPromptResolver extends ResolverBase {
11342
11687
  const result = this.ArrayMapFieldNamesToCodeNames('AI Prompts', rows);
11343
11688
  return result;
11344
11689
  }
11345
- async MJ_AIAgentPrompts_PromptIDArray(mjaiprompt_, { dataSources, userPayload, providers }, pubSub) {
11346
- this.CheckUserReadPermissions('MJ: AI Agent Prompts', userPayload);
11690
+ async MJ_AIPromptModels_PromptIDArray(mjaiprompt_, { dataSources, userPayload, providers }, pubSub) {
11691
+ this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
11347
11692
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
11348
11693
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
11349
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentPrompts] WHERE [PromptID]='${mjaiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Prompts', userPayload, EntityPermissionType.Read, 'AND');
11694
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptModels] WHERE [PromptID]='${mjaiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Models', userPayload, EntityPermissionType.Read, 'AND');
11350
11695
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
11351
- const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Prompts', rows);
11696
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Models', rows);
11352
11697
  return result;
11353
11698
  }
11354
- async MJ_AIPromptModels_PromptIDArray(mjaiprompt_, { dataSources, userPayload, providers }, pubSub) {
11355
- this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
11699
+ async MJ_AIAgentPrompts_PromptIDArray(mjaiprompt_, { dataSources, userPayload, providers }, pubSub) {
11700
+ this.CheckUserReadPermissions('MJ: AI Agent Prompts', userPayload);
11356
11701
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
11357
11702
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
11358
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptModels] WHERE [PromptID]='${mjaiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Models', userPayload, EntityPermissionType.Read, 'AND');
11703
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentPrompts] WHERE [PromptID]='${mjaiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Prompts', userPayload, EntityPermissionType.Read, 'AND');
11359
11704
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
11360
- const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Models', rows);
11705
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Prompts', rows);
11361
11706
  return result;
11362
11707
  }
11363
11708
  async MJ_AIAgentSteps_PromptIDArray(mjaiprompt_, { dataSources, userPayload, providers }, pubSub) {
@@ -11501,23 +11846,23 @@ __decorate([
11501
11846
  __metadata("design:returntype", Promise)
11502
11847
  ], MJAIPromptResolver.prototype, "AIPrompts_ResultSelectorPromptIDArray", null);
11503
11848
  __decorate([
11504
- FieldResolver(() => [MJAIAgentPrompt_]),
11849
+ FieldResolver(() => [MJAIPromptModel_]),
11505
11850
  __param(0, Root()),
11506
11851
  __param(1, Ctx()),
11507
11852
  __param(2, PubSub()),
11508
11853
  __metadata("design:type", Function),
11509
11854
  __metadata("design:paramtypes", [MJAIPrompt_, Object, PubSubEngine]),
11510
11855
  __metadata("design:returntype", Promise)
11511
- ], MJAIPromptResolver.prototype, "MJ_AIAgentPrompts_PromptIDArray", null);
11856
+ ], MJAIPromptResolver.prototype, "MJ_AIPromptModels_PromptIDArray", null);
11512
11857
  __decorate([
11513
- FieldResolver(() => [MJAIPromptModel_]),
11858
+ FieldResolver(() => [MJAIAgentPrompt_]),
11514
11859
  __param(0, Root()),
11515
11860
  __param(1, Ctx()),
11516
11861
  __param(2, PubSub()),
11517
11862
  __metadata("design:type", Function),
11518
11863
  __metadata("design:paramtypes", [MJAIPrompt_, Object, PubSubEngine]),
11519
11864
  __metadata("design:returntype", Promise)
11520
- ], MJAIPromptResolver.prototype, "MJ_AIPromptModels_PromptIDArray", null);
11865
+ ], MJAIPromptResolver.prototype, "MJ_AIAgentPrompts_PromptIDArray", null);
11521
11866
  __decorate([
11522
11867
  FieldResolver(() => [MJAIAgentStep_]),
11523
11868
  __param(0, Root()),
@@ -12567,6 +12912,8 @@ let MJCompany_ = class MJCompany_ {
12567
12912
  Employees_CompanyIDArray;
12568
12913
  CompanyIntegrations_CompanyNameArray;
12569
12914
  Workflows_CompanyNameArray;
12915
+ AIAgentNotes_CompanyIDArray;
12916
+ MJ_AIAgentExamples_CompanyIDArray;
12570
12917
  };
12571
12918
  __decorate([
12572
12919
  Field(),
@@ -12620,6 +12967,14 @@ __decorate([
12620
12967
  Field(() => [MJWorkflow_]),
12621
12968
  __metadata("design:type", Array)
12622
12969
  ], MJCompany_.prototype, "Workflows_CompanyNameArray", void 0);
12970
+ __decorate([
12971
+ Field(() => [MJAIAgentNote_]),
12972
+ __metadata("design:type", Array)
12973
+ ], MJCompany_.prototype, "AIAgentNotes_CompanyIDArray", void 0);
12974
+ __decorate([
12975
+ Field(() => [MJAIAgentExample_]),
12976
+ __metadata("design:type", Array)
12977
+ ], MJCompany_.prototype, "MJ_AIAgentExamples_CompanyIDArray", void 0);
12623
12978
  MJCompany_ = __decorate([
12624
12979
  ObjectType({ description: `A list of organizational units within your business. These can be subsidiaries or divisions or other units. Companies are used to organizae employee records and also for separating integrations if you have multiple integrations of the same type of system.` })
12625
12980
  ], MJCompany_);
@@ -12801,6 +13156,24 @@ let MJCompanyResolver = class MJCompanyResolver extends ResolverBase {
12801
13156
  const result = this.ArrayMapFieldNamesToCodeNames('Workflows', rows);
12802
13157
  return result;
12803
13158
  }
13159
+ async AIAgentNotes_CompanyIDArray(mjcompany_, { dataSources, userPayload, providers }, pubSub) {
13160
+ this.CheckUserReadPermissions('AI Agent Notes', userPayload);
13161
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
13162
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
13163
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNotes] WHERE [CompanyID]='${mjcompany_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Notes', userPayload, EntityPermissionType.Read, 'AND');
13164
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
13165
+ const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Notes', rows);
13166
+ return result;
13167
+ }
13168
+ async MJ_AIAgentExamples_CompanyIDArray(mjcompany_, { dataSources, userPayload, providers }, pubSub) {
13169
+ this.CheckUserReadPermissions('MJ: AI Agent Examples', userPayload);
13170
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
13171
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
13172
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentExamples] WHERE [CompanyID]='${mjcompany_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Examples', userPayload, EntityPermissionType.Read, 'AND');
13173
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
13174
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Examples', rows);
13175
+ return result;
13176
+ }
12804
13177
  async CreateMJCompany(input, { providers, userPayload }, pubSub) {
12805
13178
  const provider = GetReadWriteProvider(providers);
12806
13179
  return this.CreateRecord('Companies', input, provider, userPayload, pubSub);
@@ -12886,6 +13259,24 @@ __decorate([
12886
13259
  __metadata("design:paramtypes", [MJCompany_, Object, PubSubEngine]),
12887
13260
  __metadata("design:returntype", Promise)
12888
13261
  ], MJCompanyResolver.prototype, "Workflows_CompanyNameArray", null);
13262
+ __decorate([
13263
+ FieldResolver(() => [MJAIAgentNote_]),
13264
+ __param(0, Root()),
13265
+ __param(1, Ctx()),
13266
+ __param(2, PubSub()),
13267
+ __metadata("design:type", Function),
13268
+ __metadata("design:paramtypes", [MJCompany_, Object, PubSubEngine]),
13269
+ __metadata("design:returntype", Promise)
13270
+ ], MJCompanyResolver.prototype, "AIAgentNotes_CompanyIDArray", null);
13271
+ __decorate([
13272
+ FieldResolver(() => [MJAIAgentExample_]),
13273
+ __param(0, Root()),
13274
+ __param(1, Ctx()),
13275
+ __param(2, PubSub()),
13276
+ __metadata("design:type", Function),
13277
+ __metadata("design:paramtypes", [MJCompany_, Object, PubSubEngine]),
13278
+ __metadata("design:returntype", Promise)
13279
+ ], MJCompanyResolver.prototype, "MJ_AIAgentExamples_CompanyIDArray", null);
12889
13280
  __decorate([
12890
13281
  Mutation(() => MJCompany_),
12891
13282
  __param(0, Arg('input', () => CreateMJCompanyInput)),
@@ -14431,7 +14822,7 @@ __decorate([
14431
14822
  __metadata("design:type", String)
14432
14823
  ], MJRole_.prototype, "ID", void 0);
14433
14824
  __decorate([
14434
- Field(),
14825
+ Field({ description: `Role with full permissions to manage AI agents and all related entities. This role is required for AgentSpecSync operations to function correctly, allowing create, read, update, and delete operations on agents, prompts, actions, relationships, steps, and paths.` }),
14435
14826
  MaxLength(100),
14436
14827
  __metadata("design:type", String)
14437
14828
  ], MJRole_.prototype, "Name", void 0);
@@ -19251,12 +19642,12 @@ let MJUser_ = class MJUser_ {
19251
19642
  AIAgentRequests_ResponseByUserIDArray;
19252
19643
  AIAgentNotes_UserIDArray;
19253
19644
  MJ_ReportUserStates_UserIDArray;
19254
- MJ_DashboardUserStates_UserIDArray;
19255
19645
  MJ_DashboardUserPreferences_UserIDArray;
19646
+ MJ_DashboardUserStates_UserIDArray;
19256
19647
  MJ_ArtifactVersions_UserIDArray;
19257
19648
  MJ_PublicLinks_UserIDArray;
19258
- MJ_ScheduledJobs_NotifyUserIDArray;
19259
19649
  MJ_ScheduledJobRuns_ExecutedByUserIDArray;
19650
+ MJ_ScheduledJobs_NotifyUserIDArray;
19260
19651
  MJ_ArtifactPermissions_UserIDArray;
19261
19652
  ResourcePermissions_UserIDArray;
19262
19653
  AIAgentRequests_RequestForUserIDArray;
@@ -19271,6 +19662,7 @@ let MJUser_ = class MJUser_ {
19271
19662
  MJ_Collections_OwnerIDArray;
19272
19663
  MJ_CollectionPermissions_UserIDArray;
19273
19664
  MJ_Tasks_UserIDArray;
19665
+ MJ_AIAgentExamples_UserIDArray;
19274
19666
  AIAgents_OwnerUserIDArray;
19275
19667
  };
19276
19668
  __decorate([
@@ -19525,14 +19917,14 @@ __decorate([
19525
19917
  Field(() => [MJReportUserState_]),
19526
19918
  __metadata("design:type", Array)
19527
19919
  ], MJUser_.prototype, "MJ_ReportUserStates_UserIDArray", void 0);
19528
- __decorate([
19529
- Field(() => [MJDashboardUserState_]),
19530
- __metadata("design:type", Array)
19531
- ], MJUser_.prototype, "MJ_DashboardUserStates_UserIDArray", void 0);
19532
19920
  __decorate([
19533
19921
  Field(() => [MJDashboardUserPreference_]),
19534
19922
  __metadata("design:type", Array)
19535
19923
  ], MJUser_.prototype, "MJ_DashboardUserPreferences_UserIDArray", void 0);
19924
+ __decorate([
19925
+ Field(() => [MJDashboardUserState_]),
19926
+ __metadata("design:type", Array)
19927
+ ], MJUser_.prototype, "MJ_DashboardUserStates_UserIDArray", void 0);
19536
19928
  __decorate([
19537
19929
  Field(() => [MJArtifactVersion_]),
19538
19930
  __metadata("design:type", Array)
@@ -19541,14 +19933,14 @@ __decorate([
19541
19933
  Field(() => [MJPublicLink_]),
19542
19934
  __metadata("design:type", Array)
19543
19935
  ], MJUser_.prototype, "MJ_PublicLinks_UserIDArray", void 0);
19544
- __decorate([
19545
- Field(() => [MJScheduledJob_]),
19546
- __metadata("design:type", Array)
19547
- ], MJUser_.prototype, "MJ_ScheduledJobs_NotifyUserIDArray", void 0);
19548
19936
  __decorate([
19549
19937
  Field(() => [MJScheduledJobRun_]),
19550
19938
  __metadata("design:type", Array)
19551
19939
  ], MJUser_.prototype, "MJ_ScheduledJobRuns_ExecutedByUserIDArray", void 0);
19940
+ __decorate([
19941
+ Field(() => [MJScheduledJob_]),
19942
+ __metadata("design:type", Array)
19943
+ ], MJUser_.prototype, "MJ_ScheduledJobs_NotifyUserIDArray", void 0);
19552
19944
  __decorate([
19553
19945
  Field(() => [MJArtifactPermission_]),
19554
19946
  __metadata("design:type", Array)
@@ -19605,6 +19997,10 @@ __decorate([
19605
19997
  Field(() => [MJTask_]),
19606
19998
  __metadata("design:type", Array)
19607
19999
  ], MJUser_.prototype, "MJ_Tasks_UserIDArray", void 0);
20000
+ __decorate([
20001
+ Field(() => [MJAIAgentExample_]),
20002
+ __metadata("design:type", Array)
20003
+ ], MJUser_.prototype, "MJ_AIAgentExamples_UserIDArray", void 0);
19608
20004
  __decorate([
19609
20005
  Field(() => [MJAIAgent_]),
19610
20006
  __metadata("design:type", Array)
@@ -20167,22 +20563,22 @@ let MJUserResolverBase = class MJUserResolverBase extends ResolverBase {
20167
20563
  const result = this.ArrayMapFieldNamesToCodeNames('MJ: Report User States', rows);
20168
20564
  return result;
20169
20565
  }
20170
- async MJ_DashboardUserStates_UserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
20171
- this.CheckUserReadPermissions('MJ: Dashboard User States', userPayload);
20566
+ async MJ_DashboardUserPreferences_UserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
20567
+ this.CheckUserReadPermissions('MJ: Dashboard User Preferences', userPayload);
20172
20568
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
20173
20569
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
20174
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardUserStates] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard User States', userPayload, EntityPermissionType.Read, 'AND');
20570
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardUserPreferences] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard User Preferences', userPayload, EntityPermissionType.Read, 'AND');
20175
20571
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
20176
- const result = this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard User States', rows);
20572
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard User Preferences', rows);
20177
20573
  return result;
20178
20574
  }
20179
- async MJ_DashboardUserPreferences_UserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
20180
- this.CheckUserReadPermissions('MJ: Dashboard User Preferences', userPayload);
20575
+ async MJ_DashboardUserStates_UserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
20576
+ this.CheckUserReadPermissions('MJ: Dashboard User States', userPayload);
20181
20577
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
20182
20578
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
20183
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardUserPreferences] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard User Preferences', userPayload, EntityPermissionType.Read, 'AND');
20579
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardUserStates] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard User States', userPayload, EntityPermissionType.Read, 'AND');
20184
20580
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
20185
- const result = this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard User Preferences', rows);
20581
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard User States', rows);
20186
20582
  return result;
20187
20583
  }
20188
20584
  async MJ_ArtifactVersions_UserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
@@ -20203,22 +20599,22 @@ let MJUserResolverBase = class MJUserResolverBase extends ResolverBase {
20203
20599
  const result = this.ArrayMapFieldNamesToCodeNames('MJ: Public Links', rows);
20204
20600
  return result;
20205
20601
  }
20206
- async MJ_ScheduledJobs_NotifyUserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
20207
- this.CheckUserReadPermissions('MJ: Scheduled Jobs', userPayload);
20602
+ async MJ_ScheduledJobRuns_ExecutedByUserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
20603
+ this.CheckUserReadPermissions('MJ: Scheduled Job Runs', userPayload);
20208
20604
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
20209
20605
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
20210
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwScheduledJobs] WHERE [NotifyUserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scheduled Jobs', userPayload, EntityPermissionType.Read, 'AND');
20606
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwScheduledJobRuns] WHERE [ExecutedByUserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scheduled Job Runs', userPayload, EntityPermissionType.Read, 'AND');
20211
20607
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
20212
- const result = this.ArrayMapFieldNamesToCodeNames('MJ: Scheduled Jobs', rows);
20608
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: Scheduled Job Runs', rows);
20213
20609
  return result;
20214
20610
  }
20215
- async MJ_ScheduledJobRuns_ExecutedByUserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
20216
- this.CheckUserReadPermissions('MJ: Scheduled Job Runs', userPayload);
20611
+ async MJ_ScheduledJobs_NotifyUserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
20612
+ this.CheckUserReadPermissions('MJ: Scheduled Jobs', userPayload);
20217
20613
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
20218
20614
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
20219
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwScheduledJobRuns] WHERE [ExecutedByUserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scheduled Job Runs', userPayload, EntityPermissionType.Read, 'AND');
20615
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwScheduledJobs] WHERE [NotifyUserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scheduled Jobs', userPayload, EntityPermissionType.Read, 'AND');
20220
20616
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
20221
- const result = this.ArrayMapFieldNamesToCodeNames('MJ: Scheduled Job Runs', rows);
20617
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: Scheduled Jobs', rows);
20222
20618
  return result;
20223
20619
  }
20224
20620
  async MJ_ArtifactPermissions_UserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
@@ -20347,6 +20743,15 @@ let MJUserResolverBase = class MJUserResolverBase extends ResolverBase {
20347
20743
  const result = this.ArrayMapFieldNamesToCodeNames('MJ: Tasks', rows);
20348
20744
  return result;
20349
20745
  }
20746
+ async MJ_AIAgentExamples_UserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
20747
+ this.CheckUserReadPermissions('MJ: AI Agent Examples', userPayload);
20748
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
20749
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
20750
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentExamples] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Examples', userPayload, EntityPermissionType.Read, 'AND');
20751
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
20752
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Examples', rows);
20753
+ return result;
20754
+ }
20350
20755
  async AIAgents_OwnerUserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
20351
20756
  this.CheckUserReadPermissions('AI Agents', userPayload);
20352
20757
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -20739,23 +21144,23 @@ __decorate([
20739
21144
  __metadata("design:returntype", Promise)
20740
21145
  ], MJUserResolverBase.prototype, "MJ_ReportUserStates_UserIDArray", null);
20741
21146
  __decorate([
20742
- FieldResolver(() => [MJDashboardUserState_]),
21147
+ FieldResolver(() => [MJDashboardUserPreference_]),
20743
21148
  __param(0, Root()),
20744
21149
  __param(1, Ctx()),
20745
21150
  __param(2, PubSub()),
20746
21151
  __metadata("design:type", Function),
20747
21152
  __metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
20748
21153
  __metadata("design:returntype", Promise)
20749
- ], MJUserResolverBase.prototype, "MJ_DashboardUserStates_UserIDArray", null);
21154
+ ], MJUserResolverBase.prototype, "MJ_DashboardUserPreferences_UserIDArray", null);
20750
21155
  __decorate([
20751
- FieldResolver(() => [MJDashboardUserPreference_]),
21156
+ FieldResolver(() => [MJDashboardUserState_]),
20752
21157
  __param(0, Root()),
20753
21158
  __param(1, Ctx()),
20754
21159
  __param(2, PubSub()),
20755
21160
  __metadata("design:type", Function),
20756
21161
  __metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
20757
21162
  __metadata("design:returntype", Promise)
20758
- ], MJUserResolverBase.prototype, "MJ_DashboardUserPreferences_UserIDArray", null);
21163
+ ], MJUserResolverBase.prototype, "MJ_DashboardUserStates_UserIDArray", null);
20759
21164
  __decorate([
20760
21165
  FieldResolver(() => [MJArtifactVersion_]),
20761
21166
  __param(0, Root()),
@@ -20775,23 +21180,23 @@ __decorate([
20775
21180
  __metadata("design:returntype", Promise)
20776
21181
  ], MJUserResolverBase.prototype, "MJ_PublicLinks_UserIDArray", null);
20777
21182
  __decorate([
20778
- FieldResolver(() => [MJScheduledJob_]),
21183
+ FieldResolver(() => [MJScheduledJobRun_]),
20779
21184
  __param(0, Root()),
20780
21185
  __param(1, Ctx()),
20781
21186
  __param(2, PubSub()),
20782
21187
  __metadata("design:type", Function),
20783
21188
  __metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
20784
21189
  __metadata("design:returntype", Promise)
20785
- ], MJUserResolverBase.prototype, "MJ_ScheduledJobs_NotifyUserIDArray", null);
21190
+ ], MJUserResolverBase.prototype, "MJ_ScheduledJobRuns_ExecutedByUserIDArray", null);
20786
21191
  __decorate([
20787
- FieldResolver(() => [MJScheduledJobRun_]),
21192
+ FieldResolver(() => [MJScheduledJob_]),
20788
21193
  __param(0, Root()),
20789
21194
  __param(1, Ctx()),
20790
21195
  __param(2, PubSub()),
20791
21196
  __metadata("design:type", Function),
20792
21197
  __metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
20793
21198
  __metadata("design:returntype", Promise)
20794
- ], MJUserResolverBase.prototype, "MJ_ScheduledJobRuns_ExecutedByUserIDArray", null);
21199
+ ], MJUserResolverBase.prototype, "MJ_ScheduledJobs_NotifyUserIDArray", null);
20795
21200
  __decorate([
20796
21201
  FieldResolver(() => [MJArtifactPermission_]),
20797
21202
  __param(0, Root()),
@@ -20918,6 +21323,15 @@ __decorate([
20918
21323
  __metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
20919
21324
  __metadata("design:returntype", Promise)
20920
21325
  ], MJUserResolverBase.prototype, "MJ_Tasks_UserIDArray", null);
21326
+ __decorate([
21327
+ FieldResolver(() => [MJAIAgentExample_]),
21328
+ __param(0, Root()),
21329
+ __param(1, Ctx()),
21330
+ __param(2, PubSub()),
21331
+ __metadata("design:type", Function),
21332
+ __metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
21333
+ __metadata("design:returntype", Promise)
21334
+ ], MJUserResolverBase.prototype, "MJ_AIAgentExamples_UserIDArray", null);
20921
21335
  __decorate([
20922
21336
  FieldResolver(() => [MJAIAgent_]),
20923
21337
  __param(0, Root()),
@@ -37720,9 +38134,11 @@ let MJConversationDetail_ = class MJConversationDetail_ {
37720
38134
  RootParentID;
37721
38135
  Reports_ConversationDetailIDArray;
37722
38136
  MJ_ConversationDetailArtifacts_ConversationDetailIDArray;
38137
+ AIAgentNotes_SourceConversationDetailIDArray;
37723
38138
  MJ_AIAgentRuns_ConversationDetailIDArray;
37724
38139
  ConversationDetails_ParentIDArray;
37725
38140
  MJ_Tasks_ConversationDetailIDArray;
38141
+ MJ_AIAgentExamples_SourceConversationDetailIDArray;
37726
38142
  };
37727
38143
  __decorate([
37728
38144
  Field(),
@@ -37857,6 +38273,10 @@ __decorate([
37857
38273
  Field(() => [MJConversationDetailArtifact_]),
37858
38274
  __metadata("design:type", Array)
37859
38275
  ], MJConversationDetail_.prototype, "MJ_ConversationDetailArtifacts_ConversationDetailIDArray", void 0);
38276
+ __decorate([
38277
+ Field(() => [MJAIAgentNote_]),
38278
+ __metadata("design:type", Array)
38279
+ ], MJConversationDetail_.prototype, "AIAgentNotes_SourceConversationDetailIDArray", void 0);
37860
38280
  __decorate([
37861
38281
  Field(() => [MJAIAgentRun_]),
37862
38282
  __metadata("design:type", Array)
@@ -37869,6 +38289,10 @@ __decorate([
37869
38289
  Field(() => [MJTask_]),
37870
38290
  __metadata("design:type", Array)
37871
38291
  ], MJConversationDetail_.prototype, "MJ_Tasks_ConversationDetailIDArray", void 0);
38292
+ __decorate([
38293
+ Field(() => [MJAIAgentExample_]),
38294
+ __metadata("design:type", Array)
38295
+ ], MJConversationDetail_.prototype, "MJ_AIAgentExamples_SourceConversationDetailIDArray", void 0);
37872
38296
  MJConversationDetail_ = __decorate([
37873
38297
  ObjectType({ description: `Stores individual messages, responses, and interactions within a conversation, maintaining the complete dialogue history with timestamps.` })
37874
38298
  ], MJConversationDetail_);
@@ -38172,6 +38596,15 @@ let MJConversationDetailResolver = class MJConversationDetailResolver extends Re
38172
38596
  const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Detail Artifacts', rows);
38173
38597
  return result;
38174
38598
  }
38599
+ async AIAgentNotes_SourceConversationDetailIDArray(mjconversationdetail_, { dataSources, userPayload, providers }, pubSub) {
38600
+ this.CheckUserReadPermissions('AI Agent Notes', userPayload);
38601
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
38602
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
38603
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNotes] WHERE [SourceConversationDetailID]='${mjconversationdetail_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Notes', userPayload, EntityPermissionType.Read, 'AND');
38604
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
38605
+ const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Notes', rows);
38606
+ return result;
38607
+ }
38175
38608
  async MJ_AIAgentRuns_ConversationDetailIDArray(mjconversationdetail_, { dataSources, userPayload, providers }, pubSub) {
38176
38609
  this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
38177
38610
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -38199,6 +38632,15 @@ let MJConversationDetailResolver = class MJConversationDetailResolver extends Re
38199
38632
  const result = this.ArrayMapFieldNamesToCodeNames('MJ: Tasks', rows);
38200
38633
  return result;
38201
38634
  }
38635
+ async MJ_AIAgentExamples_SourceConversationDetailIDArray(mjconversationdetail_, { dataSources, userPayload, providers }, pubSub) {
38636
+ this.CheckUserReadPermissions('MJ: AI Agent Examples', userPayload);
38637
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
38638
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
38639
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentExamples] WHERE [SourceConversationDetailID]='${mjconversationdetail_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Examples', userPayload, EntityPermissionType.Read, 'AND');
38640
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
38641
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Examples', rows);
38642
+ return result;
38643
+ }
38202
38644
  async CreateMJConversationDetail(input, { providers, userPayload }, pubSub) {
38203
38645
  const provider = GetReadWriteProvider(providers);
38204
38646
  return this.CreateRecord('Conversation Details', input, provider, userPayload, pubSub);
@@ -38267,6 +38709,15 @@ __decorate([
38267
38709
  __metadata("design:paramtypes", [MJConversationDetail_, Object, PubSubEngine]),
38268
38710
  __metadata("design:returntype", Promise)
38269
38711
  ], MJConversationDetailResolver.prototype, "MJ_ConversationDetailArtifacts_ConversationDetailIDArray", null);
38712
+ __decorate([
38713
+ FieldResolver(() => [MJAIAgentNote_]),
38714
+ __param(0, Root()),
38715
+ __param(1, Ctx()),
38716
+ __param(2, PubSub()),
38717
+ __metadata("design:type", Function),
38718
+ __metadata("design:paramtypes", [MJConversationDetail_, Object, PubSubEngine]),
38719
+ __metadata("design:returntype", Promise)
38720
+ ], MJConversationDetailResolver.prototype, "AIAgentNotes_SourceConversationDetailIDArray", null);
38270
38721
  __decorate([
38271
38722
  FieldResolver(() => [MJAIAgentRun_]),
38272
38723
  __param(0, Root()),
@@ -38294,6 +38745,15 @@ __decorate([
38294
38745
  __metadata("design:paramtypes", [MJConversationDetail_, Object, PubSubEngine]),
38295
38746
  __metadata("design:returntype", Promise)
38296
38747
  ], MJConversationDetailResolver.prototype, "MJ_Tasks_ConversationDetailIDArray", null);
38748
+ __decorate([
38749
+ FieldResolver(() => [MJAIAgentExample_]),
38750
+ __param(0, Root()),
38751
+ __param(1, Ctx()),
38752
+ __param(2, PubSub()),
38753
+ __metadata("design:type", Function),
38754
+ __metadata("design:paramtypes", [MJConversationDetail_, Object, PubSubEngine]),
38755
+ __metadata("design:returntype", Promise)
38756
+ ], MJConversationDetailResolver.prototype, "MJ_AIAgentExamples_SourceConversationDetailIDArray", null);
38297
38757
  __decorate([
38298
38758
  Mutation(() => MJConversationDetail_),
38299
38759
  __param(0, Arg('input', () => CreateMJConversationDetailInput)),
@@ -38352,6 +38812,8 @@ let MJConversation_ = class MJConversation_ {
38352
38812
  Reports_ConversationIDArray;
38353
38813
  MJ_ConversationArtifacts_ConversationIDArray;
38354
38814
  MJ_AIAgentRuns_ConversationIDArray;
38815
+ AIAgentNotes_SourceConversationIDArray;
38816
+ MJ_AIAgentExamples_SourceConversationIDArray;
38355
38817
  };
38356
38818
  __decorate([
38357
38819
  Field(),
@@ -38471,6 +38933,14 @@ __decorate([
38471
38933
  Field(() => [MJAIAgentRun_]),
38472
38934
  __metadata("design:type", Array)
38473
38935
  ], MJConversation_.prototype, "MJ_AIAgentRuns_ConversationIDArray", void 0);
38936
+ __decorate([
38937
+ Field(() => [MJAIAgentNote_]),
38938
+ __metadata("design:type", Array)
38939
+ ], MJConversation_.prototype, "AIAgentNotes_SourceConversationIDArray", void 0);
38940
+ __decorate([
38941
+ Field(() => [MJAIAgentExample_]),
38942
+ __metadata("design:type", Array)
38943
+ ], MJConversation_.prototype, "MJ_AIAgentExamples_SourceConversationIDArray", void 0);
38474
38944
  MJConversation_ = __decorate([
38475
38945
  ObjectType({ description: `Tracks conversation sessions between users and AI agents or between users, including context, participants, and metadata.` })
38476
38946
  ], MJConversation_);
@@ -38732,6 +39202,24 @@ let MJConversationResolver = class MJConversationResolver extends ResolverBase {
38732
39202
  const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Runs', rows);
38733
39203
  return result;
38734
39204
  }
39205
+ async AIAgentNotes_SourceConversationIDArray(mjconversation_, { dataSources, userPayload, providers }, pubSub) {
39206
+ this.CheckUserReadPermissions('AI Agent Notes', userPayload);
39207
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
39208
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
39209
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNotes] WHERE [SourceConversationID]='${mjconversation_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Notes', userPayload, EntityPermissionType.Read, 'AND');
39210
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
39211
+ const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Notes', rows);
39212
+ return result;
39213
+ }
39214
+ async MJ_AIAgentExamples_SourceConversationIDArray(mjconversation_, { dataSources, userPayload, providers }, pubSub) {
39215
+ this.CheckUserReadPermissions('MJ: AI Agent Examples', userPayload);
39216
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
39217
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
39218
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentExamples] WHERE [SourceConversationID]='${mjconversation_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Examples', userPayload, EntityPermissionType.Read, 'AND');
39219
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
39220
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Examples', rows);
39221
+ return result;
39222
+ }
38735
39223
  async CreateMJConversation(input, { providers, userPayload }, pubSub) {
38736
39224
  const provider = GetReadWriteProvider(providers);
38737
39225
  return this.CreateRecord('Conversations', input, provider, userPayload, pubSub);
@@ -38818,6 +39306,24 @@ __decorate([
38818
39306
  __metadata("design:paramtypes", [MJConversation_, Object, PubSubEngine]),
38819
39307
  __metadata("design:returntype", Promise)
38820
39308
  ], MJConversationResolver.prototype, "MJ_AIAgentRuns_ConversationIDArray", null);
39309
+ __decorate([
39310
+ FieldResolver(() => [MJAIAgentNote_]),
39311
+ __param(0, Root()),
39312
+ __param(1, Ctx()),
39313
+ __param(2, PubSub()),
39314
+ __metadata("design:type", Function),
39315
+ __metadata("design:paramtypes", [MJConversation_, Object, PubSubEngine]),
39316
+ __metadata("design:returntype", Promise)
39317
+ ], MJConversationResolver.prototype, "AIAgentNotes_SourceConversationIDArray", null);
39318
+ __decorate([
39319
+ FieldResolver(() => [MJAIAgentExample_]),
39320
+ __param(0, Root()),
39321
+ __param(1, Ctx()),
39322
+ __param(2, PubSub()),
39323
+ __metadata("design:type", Function),
39324
+ __metadata("design:paramtypes", [MJConversation_, Object, PubSubEngine]),
39325
+ __metadata("design:returntype", Promise)
39326
+ ], MJConversationResolver.prototype, "MJ_AIAgentExamples_SourceConversationIDArray", null);
38821
39327
  __decorate([
38822
39328
  Mutation(() => MJConversation_),
38823
39329
  __param(0, Arg('input', () => CreateMJConversationInput)),
@@ -45674,6 +46180,7 @@ let MJFileStorageProvider_ = class MJFileStorageProvider_ {
45674
46180
  IsActive;
45675
46181
  _mj__CreatedAt;
45676
46182
  _mj__UpdatedAt;
46183
+ SupportsSearch;
45677
46184
  Files_ProviderIDArray;
45678
46185
  };
45679
46186
  __decorate([
@@ -45718,6 +46225,10 @@ __decorate([
45718
46225
  MaxLength(10),
45719
46226
  __metadata("design:type", Date)
45720
46227
  ], MJFileStorageProvider_.prototype, "_mj__UpdatedAt", void 0);
46228
+ __decorate([
46229
+ Field(() => Boolean, { description: `Indicates whether this storage provider supports native full-text search across file names and content. Providers with native search APIs (Google Drive, SharePoint, Dropbox, Box) have this set to true.` }),
46230
+ __metadata("design:type", Boolean)
46231
+ ], MJFileStorageProvider_.prototype, "SupportsSearch", void 0);
45721
46232
  __decorate([
45722
46233
  Field(() => [MJFile_]),
45723
46234
  __metadata("design:type", Array)
@@ -45734,6 +46245,7 @@ let CreateMJFileStorageProviderInput = class CreateMJFileStorageProviderInput {
45734
46245
  ClientDriverKey;
45735
46246
  Priority;
45736
46247
  IsActive;
46248
+ SupportsSearch;
45737
46249
  };
45738
46250
  __decorate([
45739
46251
  Field({ nullable: true }),
@@ -45763,6 +46275,10 @@ __decorate([
45763
46275
  Field(() => Boolean, { nullable: true }),
45764
46276
  __metadata("design:type", Boolean)
45765
46277
  ], CreateMJFileStorageProviderInput.prototype, "IsActive", void 0);
46278
+ __decorate([
46279
+ Field(() => Boolean, { nullable: true }),
46280
+ __metadata("design:type", Boolean)
46281
+ ], CreateMJFileStorageProviderInput.prototype, "SupportsSearch", void 0);
45766
46282
  CreateMJFileStorageProviderInput = __decorate([
45767
46283
  InputType()
45768
46284
  ], CreateMJFileStorageProviderInput);
@@ -45775,6 +46291,7 @@ let UpdateMJFileStorageProviderInput = class UpdateMJFileStorageProviderInput {
45775
46291
  ClientDriverKey;
45776
46292
  Priority;
45777
46293
  IsActive;
46294
+ SupportsSearch;
45778
46295
  OldValues___;
45779
46296
  };
45780
46297
  __decorate([
@@ -45805,6 +46322,10 @@ __decorate([
45805
46322
  Field(() => Boolean, { nullable: true }),
45806
46323
  __metadata("design:type", Boolean)
45807
46324
  ], UpdateMJFileStorageProviderInput.prototype, "IsActive", void 0);
46325
+ __decorate([
46326
+ Field(() => Boolean, { nullable: true }),
46327
+ __metadata("design:type", Boolean)
46328
+ ], UpdateMJFileStorageProviderInput.prototype, "SupportsSearch", void 0);
45808
46329
  __decorate([
45809
46330
  Field(() => [KeyValuePairInput], { nullable: true }),
45810
46331
  __metadata("design:type", Array)
@@ -66254,6 +66775,430 @@ MJArtifactResolver = __decorate([
66254
66775
  Resolver(MJArtifact_)
66255
66776
  ], MJArtifactResolver);
66256
66777
  export { MJArtifactResolver };
66778
+ let MJAIAgentExample_ = class MJAIAgentExample_ {
66779
+ ID;
66780
+ AgentID;
66781
+ UserID;
66782
+ CompanyID;
66783
+ Type;
66784
+ ExampleInput;
66785
+ ExampleOutput;
66786
+ IsAutoGenerated;
66787
+ SourceConversationID;
66788
+ SourceConversationDetailID;
66789
+ SourceAIAgentRunID;
66790
+ SuccessScore;
66791
+ Comments;
66792
+ Status;
66793
+ _mj__CreatedAt;
66794
+ _mj__UpdatedAt;
66795
+ Agent;
66796
+ User;
66797
+ Company;
66798
+ SourceConversation;
66799
+ };
66800
+ __decorate([
66801
+ Field(),
66802
+ MaxLength(16),
66803
+ __metadata("design:type", String)
66804
+ ], MJAIAgentExample_.prototype, "ID", void 0);
66805
+ __decorate([
66806
+ Field({ description: `The AI agent this example is associated with. Examples are always agent-specific.` }),
66807
+ MaxLength(16),
66808
+ __metadata("design:type", String)
66809
+ ], MJAIAgentExample_.prototype, "AgentID", void 0);
66810
+ __decorate([
66811
+ Field({ nullable: true, description: `Optional user scope. When populated, this example is specific to this user.` }),
66812
+ MaxLength(16),
66813
+ __metadata("design:type", String)
66814
+ ], MJAIAgentExample_.prototype, "UserID", void 0);
66815
+ __decorate([
66816
+ Field({ nullable: true, description: `Optional company scope. When populated, this example is specific to this company.` }),
66817
+ MaxLength(16),
66818
+ __metadata("design:type", String)
66819
+ ], MJAIAgentExample_.prototype, "CompanyID", void 0);
66820
+ __decorate([
66821
+ Field({ description: `Quick categorization of the example: Preference (demonstrates user preference), Constraint (shows constraint compliance), Context (provides contextual example), Example (typical successful interaction - most common), or Issue (demonstrates handling of known issue).` }),
66822
+ MaxLength(40),
66823
+ __metadata("design:type", String)
66824
+ ], MJAIAgentExample_.prototype, "Type", void 0);
66825
+ __decorate([
66826
+ Field({ description: `The input text or prompt that was provided in this example interaction.` }),
66827
+ __metadata("design:type", String)
66828
+ ], MJAIAgentExample_.prototype, "ExampleInput", void 0);
66829
+ __decorate([
66830
+ Field({ description: `The successful output or response that the agent provided for this example.` }),
66831
+ __metadata("design:type", String)
66832
+ ], MJAIAgentExample_.prototype, "ExampleOutput", void 0);
66833
+ __decorate([
66834
+ Field(() => Boolean, { description: `Indicates whether this example was automatically captured (1) or manually created (0).` }),
66835
+ __metadata("design:type", Boolean)
66836
+ ], MJAIAgentExample_.prototype, "IsAutoGenerated", void 0);
66837
+ __decorate([
66838
+ Field({ nullable: true, description: `Optional reference to the conversation where this example originated.` }),
66839
+ MaxLength(16),
66840
+ __metadata("design:type", String)
66841
+ ], MJAIAgentExample_.prototype, "SourceConversationID", void 0);
66842
+ __decorate([
66843
+ Field({ nullable: true, description: `Optional reference to the specific conversation message that represents this example.` }),
66844
+ MaxLength(16),
66845
+ __metadata("design:type", String)
66846
+ ], MJAIAgentExample_.prototype, "SourceConversationDetailID", void 0);
66847
+ __decorate([
66848
+ Field({ nullable: true, description: `Optional reference to the AI agent run that generated this example.` }),
66849
+ MaxLength(16),
66850
+ __metadata("design:type", String)
66851
+ ], MJAIAgentExample_.prototype, "SourceAIAgentRunID", void 0);
66852
+ __decorate([
66853
+ Field(() => Float, { nullable: true, description: `Optional success score (0-100) indicating the quality or effectiveness of this example based on user feedback or metrics.` }),
66854
+ __metadata("design:type", Number)
66855
+ ], MJAIAgentExample_.prototype, "SuccessScore", void 0);
66856
+ __decorate([
66857
+ Field({ nullable: true, description: `Internal comments about this example, not included in agent context injection.` }),
66858
+ __metadata("design:type", String)
66859
+ ], MJAIAgentExample_.prototype, "Comments", void 0);
66860
+ __decorate([
66861
+ Field({ description: `Status of the example: Pending (awaiting review), Active (in use), or Revoked (disabled).` }),
66862
+ MaxLength(40),
66863
+ __metadata("design:type", String)
66864
+ ], MJAIAgentExample_.prototype, "Status", void 0);
66865
+ __decorate([
66866
+ Field(),
66867
+ MaxLength(10),
66868
+ __metadata("design:type", Date)
66869
+ ], MJAIAgentExample_.prototype, "_mj__CreatedAt", void 0);
66870
+ __decorate([
66871
+ Field(),
66872
+ MaxLength(10),
66873
+ __metadata("design:type", Date)
66874
+ ], MJAIAgentExample_.prototype, "_mj__UpdatedAt", void 0);
66875
+ __decorate([
66876
+ Field({ nullable: true }),
66877
+ MaxLength(510),
66878
+ __metadata("design:type", String)
66879
+ ], MJAIAgentExample_.prototype, "Agent", void 0);
66880
+ __decorate([
66881
+ Field({ nullable: true }),
66882
+ MaxLength(200),
66883
+ __metadata("design:type", String)
66884
+ ], MJAIAgentExample_.prototype, "User", void 0);
66885
+ __decorate([
66886
+ Field({ nullable: true }),
66887
+ MaxLength(100),
66888
+ __metadata("design:type", String)
66889
+ ], MJAIAgentExample_.prototype, "Company", void 0);
66890
+ __decorate([
66891
+ Field({ nullable: true }),
66892
+ MaxLength(510),
66893
+ __metadata("design:type", String)
66894
+ ], MJAIAgentExample_.prototype, "SourceConversation", void 0);
66895
+ MJAIAgentExample_ = __decorate([
66896
+ ObjectType({ description: `Stores example input/output pairs for AI agents to learn from successful interactions. Examples are always agent-specific and support optional user/company scoping for personalized examples.` })
66897
+ ], MJAIAgentExample_);
66898
+ export { MJAIAgentExample_ };
66899
+ let CreateMJAIAgentExampleInput = class CreateMJAIAgentExampleInput {
66900
+ ID;
66901
+ AgentID;
66902
+ UserID;
66903
+ CompanyID;
66904
+ Type;
66905
+ ExampleInput;
66906
+ ExampleOutput;
66907
+ IsAutoGenerated;
66908
+ SourceConversationID;
66909
+ SourceConversationDetailID;
66910
+ SourceAIAgentRunID;
66911
+ SuccessScore;
66912
+ Comments;
66913
+ Status;
66914
+ };
66915
+ __decorate([
66916
+ Field({ nullable: true }),
66917
+ __metadata("design:type", String)
66918
+ ], CreateMJAIAgentExampleInput.prototype, "ID", void 0);
66919
+ __decorate([
66920
+ Field({ nullable: true }),
66921
+ __metadata("design:type", String)
66922
+ ], CreateMJAIAgentExampleInput.prototype, "AgentID", void 0);
66923
+ __decorate([
66924
+ Field({ nullable: true }),
66925
+ __metadata("design:type", String)
66926
+ ], CreateMJAIAgentExampleInput.prototype, "UserID", void 0);
66927
+ __decorate([
66928
+ Field({ nullable: true }),
66929
+ __metadata("design:type", String)
66930
+ ], CreateMJAIAgentExampleInput.prototype, "CompanyID", void 0);
66931
+ __decorate([
66932
+ Field({ nullable: true }),
66933
+ __metadata("design:type", String)
66934
+ ], CreateMJAIAgentExampleInput.prototype, "Type", void 0);
66935
+ __decorate([
66936
+ Field({ nullable: true }),
66937
+ __metadata("design:type", String)
66938
+ ], CreateMJAIAgentExampleInput.prototype, "ExampleInput", void 0);
66939
+ __decorate([
66940
+ Field({ nullable: true }),
66941
+ __metadata("design:type", String)
66942
+ ], CreateMJAIAgentExampleInput.prototype, "ExampleOutput", void 0);
66943
+ __decorate([
66944
+ Field(() => Boolean, { nullable: true }),
66945
+ __metadata("design:type", Boolean)
66946
+ ], CreateMJAIAgentExampleInput.prototype, "IsAutoGenerated", void 0);
66947
+ __decorate([
66948
+ Field({ nullable: true }),
66949
+ __metadata("design:type", String)
66950
+ ], CreateMJAIAgentExampleInput.prototype, "SourceConversationID", void 0);
66951
+ __decorate([
66952
+ Field({ nullable: true }),
66953
+ __metadata("design:type", String)
66954
+ ], CreateMJAIAgentExampleInput.prototype, "SourceConversationDetailID", void 0);
66955
+ __decorate([
66956
+ Field({ nullable: true }),
66957
+ __metadata("design:type", String)
66958
+ ], CreateMJAIAgentExampleInput.prototype, "SourceAIAgentRunID", void 0);
66959
+ __decorate([
66960
+ Field(() => Float, { nullable: true }),
66961
+ __metadata("design:type", Number)
66962
+ ], CreateMJAIAgentExampleInput.prototype, "SuccessScore", void 0);
66963
+ __decorate([
66964
+ Field({ nullable: true }),
66965
+ __metadata("design:type", String)
66966
+ ], CreateMJAIAgentExampleInput.prototype, "Comments", void 0);
66967
+ __decorate([
66968
+ Field({ nullable: true }),
66969
+ __metadata("design:type", String)
66970
+ ], CreateMJAIAgentExampleInput.prototype, "Status", void 0);
66971
+ CreateMJAIAgentExampleInput = __decorate([
66972
+ InputType()
66973
+ ], CreateMJAIAgentExampleInput);
66974
+ export { CreateMJAIAgentExampleInput };
66975
+ let UpdateMJAIAgentExampleInput = class UpdateMJAIAgentExampleInput {
66976
+ ID;
66977
+ AgentID;
66978
+ UserID;
66979
+ CompanyID;
66980
+ Type;
66981
+ ExampleInput;
66982
+ ExampleOutput;
66983
+ IsAutoGenerated;
66984
+ SourceConversationID;
66985
+ SourceConversationDetailID;
66986
+ SourceAIAgentRunID;
66987
+ SuccessScore;
66988
+ Comments;
66989
+ Status;
66990
+ OldValues___;
66991
+ };
66992
+ __decorate([
66993
+ Field(),
66994
+ __metadata("design:type", String)
66995
+ ], UpdateMJAIAgentExampleInput.prototype, "ID", void 0);
66996
+ __decorate([
66997
+ Field({ nullable: true }),
66998
+ __metadata("design:type", String)
66999
+ ], UpdateMJAIAgentExampleInput.prototype, "AgentID", void 0);
67000
+ __decorate([
67001
+ Field({ nullable: true }),
67002
+ __metadata("design:type", String)
67003
+ ], UpdateMJAIAgentExampleInput.prototype, "UserID", void 0);
67004
+ __decorate([
67005
+ Field({ nullable: true }),
67006
+ __metadata("design:type", String)
67007
+ ], UpdateMJAIAgentExampleInput.prototype, "CompanyID", void 0);
67008
+ __decorate([
67009
+ Field({ nullable: true }),
67010
+ __metadata("design:type", String)
67011
+ ], UpdateMJAIAgentExampleInput.prototype, "Type", void 0);
67012
+ __decorate([
67013
+ Field({ nullable: true }),
67014
+ __metadata("design:type", String)
67015
+ ], UpdateMJAIAgentExampleInput.prototype, "ExampleInput", void 0);
67016
+ __decorate([
67017
+ Field({ nullable: true }),
67018
+ __metadata("design:type", String)
67019
+ ], UpdateMJAIAgentExampleInput.prototype, "ExampleOutput", void 0);
67020
+ __decorate([
67021
+ Field(() => Boolean, { nullable: true }),
67022
+ __metadata("design:type", Boolean)
67023
+ ], UpdateMJAIAgentExampleInput.prototype, "IsAutoGenerated", void 0);
67024
+ __decorate([
67025
+ Field({ nullable: true }),
67026
+ __metadata("design:type", String)
67027
+ ], UpdateMJAIAgentExampleInput.prototype, "SourceConversationID", void 0);
67028
+ __decorate([
67029
+ Field({ nullable: true }),
67030
+ __metadata("design:type", String)
67031
+ ], UpdateMJAIAgentExampleInput.prototype, "SourceConversationDetailID", void 0);
67032
+ __decorate([
67033
+ Field({ nullable: true }),
67034
+ __metadata("design:type", String)
67035
+ ], UpdateMJAIAgentExampleInput.prototype, "SourceAIAgentRunID", void 0);
67036
+ __decorate([
67037
+ Field(() => Float, { nullable: true }),
67038
+ __metadata("design:type", Number)
67039
+ ], UpdateMJAIAgentExampleInput.prototype, "SuccessScore", void 0);
67040
+ __decorate([
67041
+ Field({ nullable: true }),
67042
+ __metadata("design:type", String)
67043
+ ], UpdateMJAIAgentExampleInput.prototype, "Comments", void 0);
67044
+ __decorate([
67045
+ Field({ nullable: true }),
67046
+ __metadata("design:type", String)
67047
+ ], UpdateMJAIAgentExampleInput.prototype, "Status", void 0);
67048
+ __decorate([
67049
+ Field(() => [KeyValuePairInput], { nullable: true }),
67050
+ __metadata("design:type", Array)
67051
+ ], UpdateMJAIAgentExampleInput.prototype, "OldValues___", void 0);
67052
+ UpdateMJAIAgentExampleInput = __decorate([
67053
+ InputType()
67054
+ ], UpdateMJAIAgentExampleInput);
67055
+ export { UpdateMJAIAgentExampleInput };
67056
+ let RunMJAIAgentExampleViewResult = class RunMJAIAgentExampleViewResult {
67057
+ Results;
67058
+ UserViewRunID;
67059
+ RowCount;
67060
+ TotalRowCount;
67061
+ ExecutionTime;
67062
+ ErrorMessage;
67063
+ Success;
67064
+ };
67065
+ __decorate([
67066
+ Field(() => [MJAIAgentExample_]),
67067
+ __metadata("design:type", Array)
67068
+ ], RunMJAIAgentExampleViewResult.prototype, "Results", void 0);
67069
+ __decorate([
67070
+ Field(() => String, { nullable: true }),
67071
+ __metadata("design:type", String)
67072
+ ], RunMJAIAgentExampleViewResult.prototype, "UserViewRunID", void 0);
67073
+ __decorate([
67074
+ Field(() => Int, { nullable: true }),
67075
+ __metadata("design:type", Number)
67076
+ ], RunMJAIAgentExampleViewResult.prototype, "RowCount", void 0);
67077
+ __decorate([
67078
+ Field(() => Int, { nullable: true }),
67079
+ __metadata("design:type", Number)
67080
+ ], RunMJAIAgentExampleViewResult.prototype, "TotalRowCount", void 0);
67081
+ __decorate([
67082
+ Field(() => Int, { nullable: true }),
67083
+ __metadata("design:type", Number)
67084
+ ], RunMJAIAgentExampleViewResult.prototype, "ExecutionTime", void 0);
67085
+ __decorate([
67086
+ Field({ nullable: true }),
67087
+ __metadata("design:type", String)
67088
+ ], RunMJAIAgentExampleViewResult.prototype, "ErrorMessage", void 0);
67089
+ __decorate([
67090
+ Field(() => Boolean, { nullable: false }),
67091
+ __metadata("design:type", Boolean)
67092
+ ], RunMJAIAgentExampleViewResult.prototype, "Success", void 0);
67093
+ RunMJAIAgentExampleViewResult = __decorate([
67094
+ ObjectType()
67095
+ ], RunMJAIAgentExampleViewResult);
67096
+ export { RunMJAIAgentExampleViewResult };
67097
+ let MJAIAgentExampleResolver = class MJAIAgentExampleResolver extends ResolverBase {
67098
+ async RunMJAIAgentExampleViewByID(input, { providers, userPayload }, pubSub) {
67099
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
67100
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
67101
+ }
67102
+ async RunMJAIAgentExampleViewByName(input, { providers, userPayload }, pubSub) {
67103
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
67104
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
67105
+ }
67106
+ async RunMJAIAgentExampleDynamicView(input, { providers, userPayload }, pubSub) {
67107
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
67108
+ input.EntityName = 'MJ: AI Agent Examples';
67109
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
67110
+ }
67111
+ async MJAIAgentExample(ID, { dataSources, userPayload, providers }, pubSub) {
67112
+ this.CheckUserReadPermissions('MJ: AI Agent Examples', userPayload);
67113
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
67114
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
67115
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentExamples] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Examples', userPayload, EntityPermissionType.Read, 'AND');
67116
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
67117
+ const result = this.MapFieldNamesToCodeNames('MJ: AI Agent Examples', rows && rows.length > 0 ? rows[0] : {});
67118
+ return result;
67119
+ }
67120
+ async CreateMJAIAgentExample(input, { providers, userPayload }, pubSub) {
67121
+ const provider = GetReadWriteProvider(providers);
67122
+ return this.CreateRecord('MJ: AI Agent Examples', input, provider, userPayload, pubSub);
67123
+ }
67124
+ async UpdateMJAIAgentExample(input, { providers, userPayload }, pubSub) {
67125
+ const provider = GetReadWriteProvider(providers);
67126
+ return this.UpdateRecord('MJ: AI Agent Examples', input, provider, userPayload, pubSub);
67127
+ }
67128
+ async DeleteMJAIAgentExample(ID, options, { providers, userPayload }, pubSub) {
67129
+ const provider = GetReadWriteProvider(providers);
67130
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
67131
+ return this.DeleteRecord('MJ: AI Agent Examples', key, options, provider, userPayload, pubSub);
67132
+ }
67133
+ };
67134
+ __decorate([
67135
+ Query(() => RunMJAIAgentExampleViewResult),
67136
+ __param(0, Arg('input', () => RunViewByIDInput)),
67137
+ __param(1, Ctx()),
67138
+ __param(2, PubSub()),
67139
+ __metadata("design:type", Function),
67140
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
67141
+ __metadata("design:returntype", Promise)
67142
+ ], MJAIAgentExampleResolver.prototype, "RunMJAIAgentExampleViewByID", null);
67143
+ __decorate([
67144
+ Query(() => RunMJAIAgentExampleViewResult),
67145
+ __param(0, Arg('input', () => RunViewByNameInput)),
67146
+ __param(1, Ctx()),
67147
+ __param(2, PubSub()),
67148
+ __metadata("design:type", Function),
67149
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
67150
+ __metadata("design:returntype", Promise)
67151
+ ], MJAIAgentExampleResolver.prototype, "RunMJAIAgentExampleViewByName", null);
67152
+ __decorate([
67153
+ Query(() => RunMJAIAgentExampleViewResult),
67154
+ __param(0, Arg('input', () => RunDynamicViewInput)),
67155
+ __param(1, Ctx()),
67156
+ __param(2, PubSub()),
67157
+ __metadata("design:type", Function),
67158
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
67159
+ __metadata("design:returntype", Promise)
67160
+ ], MJAIAgentExampleResolver.prototype, "RunMJAIAgentExampleDynamicView", null);
67161
+ __decorate([
67162
+ Query(() => MJAIAgentExample_, { nullable: true }),
67163
+ __param(0, Arg('ID', () => String)),
67164
+ __param(1, Ctx()),
67165
+ __param(2, PubSub()),
67166
+ __metadata("design:type", Function),
67167
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
67168
+ __metadata("design:returntype", Promise)
67169
+ ], MJAIAgentExampleResolver.prototype, "MJAIAgentExample", null);
67170
+ __decorate([
67171
+ Mutation(() => MJAIAgentExample_),
67172
+ __param(0, Arg('input', () => CreateMJAIAgentExampleInput)),
67173
+ __param(1, Ctx()),
67174
+ __param(2, PubSub()),
67175
+ __metadata("design:type", Function),
67176
+ __metadata("design:paramtypes", [CreateMJAIAgentExampleInput, Object, PubSubEngine]),
67177
+ __metadata("design:returntype", Promise)
67178
+ ], MJAIAgentExampleResolver.prototype, "CreateMJAIAgentExample", null);
67179
+ __decorate([
67180
+ Mutation(() => MJAIAgentExample_),
67181
+ __param(0, Arg('input', () => UpdateMJAIAgentExampleInput)),
67182
+ __param(1, Ctx()),
67183
+ __param(2, PubSub()),
67184
+ __metadata("design:type", Function),
67185
+ __metadata("design:paramtypes", [UpdateMJAIAgentExampleInput, Object, PubSubEngine]),
67186
+ __metadata("design:returntype", Promise)
67187
+ ], MJAIAgentExampleResolver.prototype, "UpdateMJAIAgentExample", null);
67188
+ __decorate([
67189
+ Mutation(() => MJAIAgentExample_),
67190
+ __param(0, Arg('ID', () => String)),
67191
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
67192
+ __param(2, Ctx()),
67193
+ __param(3, PubSub()),
67194
+ __metadata("design:type", Function),
67195
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
67196
+ __metadata("design:returntype", Promise)
67197
+ ], MJAIAgentExampleResolver.prototype, "DeleteMJAIAgentExample", null);
67198
+ MJAIAgentExampleResolver = __decorate([
67199
+ Resolver(MJAIAgentExample_)
67200
+ ], MJAIAgentExampleResolver);
67201
+ export { MJAIAgentExampleResolver };
66257
67202
  let MJConversationArtifact_ = class MJConversationArtifact_ {
66258
67203
  ID;
66259
67204
  Name;