@dataclouder/ngx-agent-cards 0.1.55 → 0.1.57

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/index.d.ts CHANGED
@@ -1,17 +1,19 @@
1
1
  import { ImgStorageData, BasicStorage, AudioStorage, IAssetable, StorageImageSettings, FileStorageData } from '@dataclouder/ngx-cloud-storage';
2
2
  import * as _dataclouder_ngx_core from '@dataclouder/ngx-core';
3
- import { ChatUserSettings, EModelQuality, IAIModel, IManageable, EntityCommunicationService, FiltersConfig, IFilterQueryResponse, HttpCoreService, EntityBaseFormComponent, EntityBaseListComponent, ICustomFilter, PColumn, OnActionEvent } from '@dataclouder/ngx-core';
3
+ import { ChatUserSettings, EModelQuality, IAuditable, IAIModel, IManageable, EntityCommunicationService, FiltersConfig, IFilterQueryResponse, HttpCoreService, EntityBaseFormComponent, EntityBaseListComponent, ICustomFilter, PColumn, OnActionEvent } from '@dataclouder/ngx-core';
4
4
  import * as _angular_forms from '@angular/forms';
5
5
  import { FormGroup, FormControl, FormArray } from '@angular/forms';
6
6
  import { AudioEffectType, TTSRequest } from '@dataclouder/ngx-vertex';
7
7
  import * as _angular_core from '@angular/core';
8
- import { InjectionToken, Type, Provider, WritableSignal, Injector, Signal, OnInit, OnDestroy, AfterViewInit, ElementRef, TemplateRef, EventEmitter } from '@angular/core';
8
+ import { InjectionToken, Type, Provider, WritableSignal, Injector, Signal, OnDestroy, ElementRef, OnInit, AfterViewInit, TemplateRef, EventEmitter } from '@angular/core';
9
9
  import { UserService } from '@dataclouder/ngx-users';
10
+ import * as rxjs from 'rxjs';
10
11
  import { MicSettings } from '@dataclouder/ngx-mic';
11
12
  import * as _dataclouder_ngx_agent_cards from '@dataclouder/ngx-agent-cards';
12
13
  import * as _dataclouder_ngx_knowledge from '@dataclouder/ngx-knowledge';
13
14
  import { MasterStateService } from '@dataclouder/ngx-knowledge';
14
15
  import { MenuItem } from 'primeng/api';
16
+ import * as _angular_router from '@angular/router';
15
17
 
16
18
  declare const defaultconvUserSettings: ChatUserSettings;
17
19
  declare class VoiceTTSOption {
@@ -167,6 +169,15 @@ type ConversationSettingsFormGroup = FormGroup<{
167
169
  }>;
168
170
  }>;
169
171
 
172
+ interface IConversationRule {
173
+ _id: string;
174
+ id: string;
175
+ name?: string;
176
+ description?: string;
177
+ rule?: string;
178
+ auditable?: IAuditable;
179
+ }
180
+
170
181
  interface Appearance {
171
182
  generalDescription: string;
172
183
  physicalDescription: string;
@@ -247,12 +258,19 @@ interface VoiceTTS {
247
258
  provider?: string;
248
259
  options?: Record<string, any>;
249
260
  }
261
+
262
+ interface IRule {
263
+ name: string;
264
+ description: string;
265
+ }
250
266
  interface IConversationSettings {
251
267
  modelQuality?: EModelQuality;
268
+ rules?: IConversationRule[];
252
269
  textEngine?: TextEngines;
253
270
  conversationType?: ConversationType$1;
254
271
  tts?: ITTS;
255
272
  autoStart?: boolean;
273
+ userMustStart?: boolean;
256
274
  messages?: ChatMessage[];
257
275
  last_prompt?: string;
258
276
  repeatRecording?: boolean;
@@ -435,6 +453,13 @@ declare enum ChatRole {
435
453
  Assistant = "assistant",
436
454
  AssistantHelper = "assistantHelper"
437
455
  }
456
+ declare enum SectionType {
457
+ Intro = "intro",
458
+ Persona = "persona",
459
+ Context = "context",
460
+ Rules = "rules",
461
+ Conversation = "conversation"
462
+ }
438
463
  declare class ChatMessage extends MessageContent {
439
464
  role: ChatRole;
440
465
  translation?: string;
@@ -446,6 +471,7 @@ declare class ChatMessage extends MessageContent {
446
471
  tags?: string[];
447
472
  imgUrl?: string;
448
473
  generatedImg?: string;
474
+ section?: SectionType;
449
475
  }
450
476
  declare class ConversationMessagesDTO {
451
477
  messages?: ChatMessage[];
@@ -690,6 +716,8 @@ declare class ChatMonitorService {
690
716
  logMessageAudioWillPlay(message: MessageContent): void;
691
717
  logCurrentMood(mood: string[]): void;
692
718
  cleanMonitorVars(): void;
719
+ readonly backgroundUrl: _angular_core.WritableSignal<string>;
720
+ setBackground(imageUrl: string | undefined): void;
693
721
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatMonitorService, never>;
694
722
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<ChatMonitorService>;
695
723
  }
@@ -745,6 +773,38 @@ interface IBackgroundService {
745
773
  declare const VIDEO_PLAYER_SERVICE_TOKEN: InjectionToken<IVideoPlayerService>;
746
774
  declare const BACKGROUND_SERVICE_TOKEN: InjectionToken<IBackgroundService>;
747
775
 
776
+ declare class VideoPlayerService implements OnDestroy {
777
+ private player;
778
+ private rewindInterval;
779
+ isRewinding: boolean;
780
+ private videoQueue;
781
+ private defaultVideoUrl;
782
+ private playAndRewindedSubscription;
783
+ private playAndRewindedSource;
784
+ playAndRewinded$: rxjs.Observable<void>;
785
+ constructor();
786
+ initializePlayer(videoPlayer: ElementRef<HTMLVideoElement>): void;
787
+ setVideoSource(videoUrl: string): void;
788
+ startConversation(defaultVideo?: string): void;
789
+ playVideo(): void;
790
+ rewindVideo(): void;
791
+ changeVideoSource(videoUrl: string): void;
792
+ addVideosToQueue(videoUrls: string[]): void;
793
+ destroyPlayer(): void;
794
+ playAndRewind(): void;
795
+ cleanUp(): void;
796
+ ngOnDestroy(): void;
797
+ private playNextInQueue;
798
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<VideoPlayerService, never>;
799
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<VideoPlayerService>;
800
+ }
801
+
802
+ declare class ConversationRuleService extends EntityCommunicationService<IConversationRule> {
803
+ constructor();
804
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConversationRuleService, never>;
805
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ConversationRuleService>;
806
+ }
807
+
748
808
  type EvaluationLevel = 1 | 2 | 3 | 4 | 5;
749
809
  type CommunicationLevel = 'Beginner' | 'Intermediate' | 'Advanced' | 'Native-like';
750
810
  type DominantRegister = 'formal' | 'informal' | 'mixed';
@@ -899,6 +959,7 @@ declare class DCAgentCardFormComponent extends EntityBaseFormComponent<IAgentCar
899
959
  textEngine: _angular_forms.FormControl<TextEngines>;
900
960
  conversationType: _angular_forms.FormControl<ConversationType$1>;
901
961
  autoStart: _angular_forms.FormControl<boolean>;
962
+ userMustStart: _angular_forms.FormControl<boolean>;
902
963
  mainVoice: FormGroup<any>;
903
964
  secondaryVoice: FormGroup<any>;
904
965
  model: FormGroup<{
@@ -907,6 +968,7 @@ declare class DCAgentCardFormComponent extends EntityBaseFormComponent<IAgentCar
907
968
  provider: _angular_forms.FormControl<string>;
908
969
  id: _angular_forms.FormControl<string>;
909
970
  }>;
971
+ rules: FormArray<_angular_forms.FormControl<unknown>>;
910
972
  }>;
911
973
  metaApp: FormGroup<any>;
912
974
  accounts: FormArray<_angular_forms.FormControl<unknown>>;
@@ -979,8 +1041,7 @@ declare class DcAgentCardDetailsComponent implements OnInit, AfterViewInit, OnDe
979
1041
  private toastService;
980
1042
  chatMonitorService: ChatMonitorService;
981
1043
  private userService;
982
- videoPlayerService: _dataclouder_ngx_agent_cards.IVideoPlayerService;
983
- private backgroundService;
1044
+ private videoPlayerService;
984
1045
  agentCardId: string;
985
1046
  readonly onStartConversation: _angular_core.OutputEmitterRef<IAgentCard>;
986
1047
  videoPlayer: ElementRef<HTMLVideoElement> | undefined;
@@ -1103,7 +1164,7 @@ declare class MessageContentDisplayer implements OnDestroy {
1103
1164
  wordsWithMetaState: IWordMetadata[];
1104
1165
  private audioElement;
1105
1166
  private destroyRef;
1106
- iconState: _angular_core.Signal<"paused" | "idle" | "playing" | "loading" | "playable">;
1167
+ iconState: _angular_core.Signal<"paused" | "playing" | "idle" | "loading" | "playable">;
1107
1168
  shouldPlayAudio: _angular_core.Signal<boolean>;
1108
1169
  messageText: _angular_core.Signal<string>;
1109
1170
  classTag: _angular_core.Signal<string>;
@@ -1259,7 +1320,13 @@ declare class ACCDataGenerationComponent {
1259
1320
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ACCDataGenerationComponent, "dc-acc-data-generation", never, { "agentCard": { "alias": "agentCard"; "required": false; }; }, { "cardImprovementsChange": "cardImprovementsChange"; }, never, never, true, never>;
1260
1321
  }
1261
1322
 
1323
+ declare class ConversationRulesComponent {
1324
+ static routes: _angular_router.Routes;
1325
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConversationRulesComponent, never>;
1326
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ConversationRulesComponent, "app-conversationRules", never, {}, {}, never, never, true, never>;
1327
+ }
1328
+
1262
1329
  declare const AGENT_CARDS_STATE_SERVICE: InjectionToken<MasterStateService<IAgentCard>>;
1263
1330
 
1264
- export { ACCDataGenerationComponent, AGENT_CARDS_STATE_SERVICE, AIGenerationService, AgentCardListComponent, AgentCardUI, AgentCardsGenerationService, AudioService, AudioSpeed, BACKGROUND_SERVICE_TOKEN, CONVERSATION_AI_TOKEN, CardsCreatorComponent, ChatEventType, ChatMessage, ChatMessageOrchestratorComponent, ChatMonitorService, ChatRole, ConditionOperator, ConditionType, ContextEngineService, ContextType, ConversationDTO, ConversationEvents, ConversationMessagesDTO, ConversationPromptBuilderService, ConversationType$1 as ConversationType, ConversationTypeOptions, DCAgentCardFormComponent, DCChatComponent, DCConversationUserChatSettingsComponent, DcAgentCardDetailsComponent, DefaultAgentCardsService, DoActionTypeOptions, DynamicFlowService, DynamicFlowTaskTypeOptions, EAccountsPlatform, EAgentType, EDoActionType, EDynamicFlowTaskType, EntityThen, EntityWhatOptions, EntityWhenOptions, EvalResultStringDefinition, GlobalToolsService, MessageContent, MessageContentDisplayer, MessagesStateService, ModelSelectorComponent, PopupService, SystemPromptType, TextEngineOptions, TextEngines, VIDEO_PLAYER_SERVICE_TOKEN, VoiceTTSOption, VoiceTTSOptions, WordTimestamps, buildObjectTTSRequest, characterCardStringDataDefinition, convertToHTML, createAIModelFormGroup, defaultconvUserSettings, extractAudioAndTranscription, extractJsonFromResponse, getMoodStateLabelsAsString, getMoodStatePrompt, markdownToHtml, matchTranscription, provideAgentCardService, removeEmojis, removeEmojisAndSpecialCharacters, removeSpecialCharacters };
1265
- export type { Appearance, AudioGenerated, AudioState, BackgroundTask, CardTranslation, ChangePromptAction, CharacterCardData, ChatEvent, ConversationFlowFormGroup, ConversationSettingsFormGroup, DoAction, DoActionFormGroup, DynamicConditionFormGroup, DynamicCriteriaFormGroup, IAccounts, IAgentAssets, IAgentCard, IAgentCardMeta, IAgentMetadata, IAgentResponseDTO, IBackgroundService, ICharacterCardDC, IConversationFlow, IConversationSettings, IConversationSettingsDTO, IDynamicCondition, IDynamicCriteria, IDynamicFlowTask, IGenerateConversationCardsDto, IMoodState, ISimpleAgent, ITTS, IVideoPlayerService, IWordMetadata, ModelFormGroup, ModelName, MultiLanguage, Persona, SimpleAgentTask, SimpleAgentTaskFormGroup, SimpleEvalResult, TextHTMLTag, TranscriptionsWhisper, TriggerTasksFormGroup, VoiceCloning, VoiceTTS, WordData };
1331
+ export { ACCDataGenerationComponent, AGENT_CARDS_STATE_SERVICE, AIGenerationService, AgentCardListComponent, AgentCardUI, AgentCardsGenerationService, AudioService, AudioSpeed, BACKGROUND_SERVICE_TOKEN, CONVERSATION_AI_TOKEN, CardsCreatorComponent, ChatEventType, ChatMessage, ChatMessageOrchestratorComponent, ChatMonitorService, ChatRole, ConditionOperator, ConditionType, ContextEngineService, ContextType, ConversationDTO, ConversationEvents, ConversationMessagesDTO, ConversationPromptBuilderService, ConversationRuleService, ConversationRulesComponent, ConversationType$1 as ConversationType, ConversationTypeOptions, DCAgentCardFormComponent, DCChatComponent, DCConversationUserChatSettingsComponent, DcAgentCardDetailsComponent, DefaultAgentCardsService, DoActionTypeOptions, DynamicFlowService, DynamicFlowTaskTypeOptions, EAccountsPlatform, EAgentType, EDoActionType, EDynamicFlowTaskType, EntityThen, EntityWhatOptions, EntityWhenOptions, EvalResultStringDefinition, GlobalToolsService, MessageContent, MessageContentDisplayer, MessagesStateService, ModelSelectorComponent, PopupService, SectionType, SystemPromptType, TextEngineOptions, TextEngines, VIDEO_PLAYER_SERVICE_TOKEN, VideoPlayerService, VoiceTTSOption, VoiceTTSOptions, WordTimestamps, buildObjectTTSRequest, characterCardStringDataDefinition, convertToHTML, createAIModelFormGroup, defaultconvUserSettings, extractAudioAndTranscription, extractJsonFromResponse, getMoodStateLabelsAsString, getMoodStatePrompt, markdownToHtml, matchTranscription, provideAgentCardService, removeEmojis, removeEmojisAndSpecialCharacters, removeSpecialCharacters };
1332
+ export type { Appearance, AudioGenerated, AudioState, BackgroundTask, CardTranslation, ChangePromptAction, CharacterCardData, ChatEvent, ConversationFlowFormGroup, ConversationSettingsFormGroup, DoAction, DoActionFormGroup, DynamicConditionFormGroup, DynamicCriteriaFormGroup, IAccounts, IAgentAssets, IAgentCard, IAgentCardMeta, IAgentMetadata, IAgentResponseDTO, IBackgroundService, ICharacterCardDC, IConversationFlow, IConversationSettings, IConversationSettingsDTO, IDynamicCondition, IDynamicCriteria, IDynamicFlowTask, IGenerateConversationCardsDto, IMoodState, IRule, ISimpleAgent, ITTS, IVideoPlayerService, IWordMetadata, ModelFormGroup, ModelName, MultiLanguage, Persona, SimpleAgentTask, SimpleAgentTaskFormGroup, SimpleEvalResult, TextHTMLTag, TranscriptionsWhisper, TriggerTasksFormGroup, VoiceCloning, VoiceTTS, WordData };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataclouder/ngx-agent-cards",
3
- "version": "0.1.55",
3
+ "version": "0.1.57",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=18.0.0",
6
6
  "@angular/core": ">=18.0.0",