@memberjunction/server 2.92.0 → 2.94.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -13,7 +13,7 @@ The `@memberjunction/server` library provides a comprehensive API server for Mem
13
13
  - **Real-time Support**: WebSocket subscriptions for GraphQL
14
14
  - **Compression**: Built-in response compression for better performance
15
15
  - **Extensible Architecture**: Support for custom resolvers and entity subclasses
16
- - **AI Integration**: Built-in support for AI operations and learning cycle scheduling
16
+ - **AI Integration**: Built-in support for AI operations, prompts, agents, and embeddings
17
17
  - **Security Features**: Entity-level and schema-level access control for REST API
18
18
  - **SQL Logging**: Runtime SQL logging configuration and session management for debugging
19
19
 
@@ -336,7 +336,45 @@ scheduler.start(60); // Run every 60 minutes
336
336
 
337
337
  ### AI Resolvers
338
338
 
339
- - `RunAIPromptResolver`: Execute AI prompts
339
+ The server includes comprehensive AI resolvers for various AI operations:
340
+
341
+ #### RunAIPromptResolver
342
+ Handles AI prompt execution with multiple methods:
343
+
344
+ - `RunAIPrompt`: Execute stored AI prompts with full parameter support
345
+ - Supports temperature, topP, topK, and other model parameters
346
+ - Handles conversation messages and system prompt overrides
347
+ - Returns parsed results, token usage, and execution metadata
348
+
349
+ - `ExecuteSimplePrompt`: Execute ad-hoc prompts without stored configuration
350
+ - Direct system prompt and message execution
351
+ - Smart model selection based on preferences or power level
352
+ - Automatic JSON extraction from responses
353
+ - Available for both regular users and system users
354
+
355
+ - `EmbedText`: Generate text embeddings using local models
356
+ - Batch processing support for multiple texts
357
+ - Model size selection (small/medium)
358
+ - Returns vector dimensions and model information
359
+ - Available for both regular users and system users
360
+
361
+ #### RunAIAgentResolver
362
+ - `RunAIAgent`: Execute AI agents for conversational interactions
363
+ - Session management for conversation context
364
+ - Streaming support for real-time responses
365
+ - Progress tracking and partial results
366
+ - Available for both regular users and system users
367
+
368
+ #### System User Variants
369
+ All AI operations have system user variants (queries) that use the `@RequireSystemUser` decorator:
370
+ - `RunAIPromptSystemUser`
371
+ - `ExecuteSimplePromptSystemUser`
372
+ - `EmbedTextSystemUser`
373
+ - `RunAIAgentSystemUser`
374
+
375
+ These allow server-to-server operations with elevated privileges.
376
+
377
+ #### AskSkipResolver
340
378
  - `AskSkipResolver`: Handle Skip AI queries
341
379
 
342
380
  ### SQL Logging Resolver
@@ -428,6 +428,8 @@ export declare class AIAgentRun_ {
428
428
  Data?: string;
429
429
  Verbose?: boolean;
430
430
  EffortLevel?: number;
431
+ RunName?: string;
432
+ Comments?: string;
431
433
  Agent?: string;
432
434
  Conversation?: string;
433
435
  User?: string;
@@ -474,6 +476,8 @@ export declare class CreateAIAgentRunInput {
474
476
  Data: string | null;
475
477
  Verbose?: boolean | null;
476
478
  EffortLevel: number | null;
479
+ RunName: string | null;
480
+ Comments: string | null;
477
481
  }
478
482
  export declare class UpdateAIAgentRunInput {
479
483
  ID: string;
@@ -511,6 +515,8 @@ export declare class UpdateAIAgentRunInput {
511
515
  Data?: string | null;
512
516
  Verbose?: boolean | null;
513
517
  EffortLevel?: number | null;
518
+ RunName?: string | null;
519
+ Comments?: string | null;
514
520
  OldValues___?: KeyValuePairInput[];
515
521
  }
516
522
  export declare class RunAIAgentRunViewResult {
@@ -9658,6 +9664,7 @@ export declare class ComponentLibrary_ {
9658
9664
  _mj__UpdatedAt: Date;
9659
9665
  Status: string;
9660
9666
  LintRules?: string;
9667
+ Dependencies?: string;
9661
9668
  MJ_ComponentLibraryLinks_LibraryIDArray: ComponentLibraryLink_[];
9662
9669
  }
9663
9670
  export declare class CreateComponentLibraryInput {
@@ -9672,6 +9679,7 @@ export declare class CreateComponentLibraryInput {
9672
9679
  Description: string | null;
9673
9680
  Status?: string;
9674
9681
  LintRules: string | null;
9682
+ Dependencies: string | null;
9675
9683
  }
9676
9684
  export declare class UpdateComponentLibraryInput {
9677
9685
  ID: string;
@@ -9685,6 +9693,7 @@ export declare class UpdateComponentLibraryInput {
9685
9693
  Description?: string | null;
9686
9694
  Status?: string;
9687
9695
  LintRules?: string | null;
9696
+ Dependencies?: string | null;
9688
9697
  OldValues___?: KeyValuePairInput[];
9689
9698
  }
9690
9699
  export declare class RunComponentLibraryViewResult {
@@ -10544,6 +10553,8 @@ export declare class AIPromptRun_ {
10544
10553
  CompletionTime?: number;
10545
10554
  ModelSpecificResponseDetails?: string;
10546
10555
  EffortLevel?: number;
10556
+ RunName?: string;
10557
+ Comments?: string;
10547
10558
  Prompt: string;
10548
10559
  Model: string;
10549
10560
  Vendor: string;
@@ -10635,6 +10646,8 @@ export declare class CreateAIPromptRunInput {
10635
10646
  CompletionTime: number | null;
10636
10647
  ModelSpecificResponseDetails: string | null;
10637
10648
  EffortLevel: number | null;
10649
+ RunName: string | null;
10650
+ Comments: string | null;
10638
10651
  }
10639
10652
  export declare class UpdateAIPromptRunInput {
10640
10653
  ID: string;
@@ -10716,6 +10729,8 @@ export declare class UpdateAIPromptRunInput {
10716
10729
  CompletionTime?: number | null;
10717
10730
  ModelSpecificResponseDetails?: string | null;
10718
10731
  EffortLevel?: number | null;
10732
+ RunName?: string | null;
10733
+ Comments?: string | null;
10719
10734
  OldValues___?: KeyValuePairInput[];
10720
10735
  }
10721
10736
  export declare class RunAIPromptRunViewResult {
@@ -10759,6 +10774,9 @@ export declare class AIAgentRunStep_ {
10759
10774
  PayloadAtEnd?: string;
10760
10775
  FinalPayloadValidationResult?: string;
10761
10776
  FinalPayloadValidationMessages?: string;
10777
+ ParentID?: string;
10778
+ Comments?: string;
10779
+ MJ_AIAgentRunSteps_ParentIDArray: AIAgentRunStep_[];
10762
10780
  }
10763
10781
  export declare class CreateAIAgentRunStepInput {
10764
10782
  ID?: string;
@@ -10779,6 +10797,8 @@ export declare class CreateAIAgentRunStepInput {
10779
10797
  PayloadAtEnd: string | null;
10780
10798
  FinalPayloadValidationResult: string | null;
10781
10799
  FinalPayloadValidationMessages: string | null;
10800
+ ParentID: string | null;
10801
+ Comments: string | null;
10782
10802
  }
10783
10803
  export declare class UpdateAIAgentRunStepInput {
10784
10804
  ID: string;
@@ -10799,6 +10819,8 @@ export declare class UpdateAIAgentRunStepInput {
10799
10819
  PayloadAtEnd?: string | null;
10800
10820
  FinalPayloadValidationResult?: string | null;
10801
10821
  FinalPayloadValidationMessages?: string | null;
10822
+ ParentID?: string | null;
10823
+ Comments?: string | null;
10802
10824
  OldValues___?: KeyValuePairInput[];
10803
10825
  }
10804
10826
  export declare class RunAIAgentRunStepViewResult {
@@ -10815,6 +10837,7 @@ export declare class AIAgentRunStepResolver extends ResolverBase {
10815
10837
  RunAIAgentRunStepViewByName(input: RunViewByNameInput, { providers, userPayload }: AppContext, pubSub: PubSubEngine): Promise<import("@memberjunction/core").RunViewResult<any>>;
10816
10838
  RunAIAgentRunStepDynamicView(input: RunDynamicViewInput, { providers, userPayload }: AppContext, pubSub: PubSubEngine): Promise<import("@memberjunction/core").RunViewResult<any>>;
10817
10839
  AIAgentRunStep(ID: string, { dataSources, userPayload, providers }: AppContext, pubSub: PubSubEngine): Promise<AIAgentRunStep_ | null>;
10840
+ MJ_AIAgentRunSteps_ParentIDArray(aiagentrunstep_: AIAgentRunStep_, { dataSources, userPayload, providers }: AppContext, pubSub: PubSubEngine): Promise<any[]>;
10818
10841
  CreateAIAgentRunStep(input: CreateAIAgentRunStepInput, { providers, userPayload }: AppContext, pubSub: PubSubEngine): Promise<any>;
10819
10842
  UpdateAIAgentRunStep(input: UpdateAIAgentRunStepInput, { providers, userPayload }: AppContext, pubSub: PubSubEngine): Promise<any>;
10820
10843
  DeleteAIAgentRunStep(ID: string, options: DeleteOptionsInput, { providers, userPayload }: AppContext, pubSub: PubSubEngine): Promise<any>;