@dataclouder/ngx-agent-cards 0.1.78 → 0.1.81
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
|
@@ -872,15 +872,19 @@ declare const VIDEO_PLAYER_SERVICE_TOKEN: InjectionToken<IVideoPlayerService>;
|
|
|
872
872
|
declare const BACKGROUND_SERVICE_TOKEN: InjectionToken<IBackgroundService>;
|
|
873
873
|
|
|
874
874
|
declare class VideoPlayerService implements OnDestroy {
|
|
875
|
+
private conversationFlowStateService;
|
|
875
876
|
private player;
|
|
876
877
|
private rewindInterval;
|
|
877
878
|
isRewinding: boolean;
|
|
878
879
|
private videoQueue;
|
|
879
880
|
private defaultVideoUrl;
|
|
880
881
|
private playAndRewindedSubscription;
|
|
882
|
+
private moodSubscription;
|
|
881
883
|
private playAndRewindedSource;
|
|
882
884
|
playAndRewinded$: rxjs.Observable<void>;
|
|
885
|
+
agentCard: _angular_core.WritableSignal<IAgentCard>;
|
|
883
886
|
constructor();
|
|
887
|
+
setAgentCard(card: IAgentCard): void;
|
|
884
888
|
initializePlayer(videoPlayer: ElementRef<HTMLVideoElement>): void;
|
|
885
889
|
setVideoSource(videoUrl: string): void;
|
|
886
890
|
startConversation(defaultVideo?: string): void;
|
|
@@ -897,6 +901,75 @@ declare class VideoPlayerService implements OnDestroy {
|
|
|
897
901
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<VideoPlayerService>;
|
|
898
902
|
}
|
|
899
903
|
|
|
904
|
+
/**
|
|
905
|
+
* @description
|
|
906
|
+
* Service responsible for managing the real-time, dynamic state of a conversation flow.
|
|
907
|
+
*
|
|
908
|
+
* This service acts as a single source of truth for the evolving aspects of a conversation,
|
|
909
|
+
* such as the user's progress toward a goal, completed challenges, and the agent's current mood.
|
|
910
|
+
* It uses Angular Signals to provide a reactive state that can be observed by UI components
|
|
911
|
+
* and other services.
|
|
912
|
+
*
|
|
913
|
+
* The state managed here is the **runtime state**, which is distinct from the static
|
|
914
|
+
* `IConversationFlow` configuration that defines the rules of the flow.
|
|
915
|
+
*/
|
|
916
|
+
declare class ConversationFlowStateService {
|
|
917
|
+
private readonly initialState;
|
|
918
|
+
/**
|
|
919
|
+
* @description
|
|
920
|
+
* A reactive signal holding the current conversation flow state.
|
|
921
|
+
* Components and services can subscribe to this signal to get real-time updates.
|
|
922
|
+
*/
|
|
923
|
+
flowState: _angular_core.WritableSignal<IConversationFlowState>;
|
|
924
|
+
currentMood: _angular_core.Signal<any>;
|
|
925
|
+
private moodUpdated;
|
|
926
|
+
moodUpdated$: rxjs.Observable<string>;
|
|
927
|
+
constructor();
|
|
928
|
+
/**
|
|
929
|
+
* @description
|
|
930
|
+
* Resets the conversation flow state to its initial default values.
|
|
931
|
+
* This is typically called at the beginning of a new conversation session.
|
|
932
|
+
*/
|
|
933
|
+
resetState(): void;
|
|
934
|
+
/**
|
|
935
|
+
* @description
|
|
936
|
+
* Updates the entire flow state with a new state object.
|
|
937
|
+
* @param newState A partial `IConversationFlowState` object containing the new values.
|
|
938
|
+
*/
|
|
939
|
+
updateState(newState: Partial<IConversationFlowState>): void;
|
|
940
|
+
/**
|
|
941
|
+
* @description
|
|
942
|
+
* Updates the goal state, typically to reflect progress.
|
|
943
|
+
* The value should represent the goal's progress (e.g., a percentage).
|
|
944
|
+
* @param goalState A partial `{ name: string; value: any }` object for the goal.
|
|
945
|
+
*/
|
|
946
|
+
updateGoalState(goalState: Partial<{
|
|
947
|
+
name: string;
|
|
948
|
+
value: any;
|
|
949
|
+
}>): void;
|
|
950
|
+
/**
|
|
951
|
+
* @description
|
|
952
|
+
* Updates an existing challenge or adds a new one.
|
|
953
|
+
* The value for a challenge should typically be a boolean indicating completion.
|
|
954
|
+
* @param challenge A `{ name: string; value: any }` object representing the challenge state.
|
|
955
|
+
*/
|
|
956
|
+
updateChallengeState(challenge: {
|
|
957
|
+
name: string;
|
|
958
|
+
value: any;
|
|
959
|
+
}): void;
|
|
960
|
+
/**
|
|
961
|
+
* @description
|
|
962
|
+
* Updates the agent's current mood state.
|
|
963
|
+
* @param moodState A partial `{ name: string; value: any }` object for the mood.
|
|
964
|
+
*/
|
|
965
|
+
updateMoodState(moodState: Partial<{
|
|
966
|
+
name: string;
|
|
967
|
+
value: any;
|
|
968
|
+
}>): void;
|
|
969
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConversationFlowStateService, never>;
|
|
970
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ConversationFlowStateService>;
|
|
971
|
+
}
|
|
972
|
+
|
|
900
973
|
declare class ConversationRuleService extends EntityCommunicationService<IConversationRule> {
|
|
901
974
|
constructor();
|
|
902
975
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConversationRuleService, never>;
|
|
@@ -1150,7 +1223,6 @@ declare class DcAgentCardDetailsComponent implements OnInit, AfterViewInit, OnDe
|
|
|
1150
1223
|
videoPlayer: ElementRef<HTMLVideoElement> | undefined;
|
|
1151
1224
|
agentCard: _angular_core.WritableSignal<IAgentCard>;
|
|
1152
1225
|
showInfoLayer: _angular_core.WritableSignal<boolean>;
|
|
1153
|
-
private moodSubscription;
|
|
1154
1226
|
constructor();
|
|
1155
1227
|
ngOnDestroy(): void;
|
|
1156
1228
|
ngAfterViewInit(): void;
|
|
@@ -1495,5 +1567,5 @@ declare class ChatEngineTestComponent {
|
|
|
1495
1567
|
|
|
1496
1568
|
declare const AGENT_CARDS_STATE_SERVICE: InjectionToken<MasterStateService<IAgentCard>>;
|
|
1497
1569
|
|
|
1498
|
-
export { ACCDataGenerationComponent, AGENT_CARDS_STATE_SERVICE, AIGenerationService, AgentCardListComponent, AgentCardUI, AgentCardsGenerationService, AudioService, AudioSpeed, BACKGROUND_SERVICE_TOKEN, CONVERSATION_AI_TOKEN, CardsCreatorComponent, ChatEngineTestComponent, 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, PromptPreviewComponent, 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 };
|
|
1570
|
+
export { ACCDataGenerationComponent, AGENT_CARDS_STATE_SERVICE, AIGenerationService, AgentCardListComponent, AgentCardUI, AgentCardsGenerationService, AudioService, AudioSpeed, BACKGROUND_SERVICE_TOKEN, CONVERSATION_AI_TOKEN, CardsCreatorComponent, ChatEngineTestComponent, ChatEventType, ChatMessage, ChatMessageOrchestratorComponent, ChatMonitorService, ChatRole, ConditionOperator, ConditionType, ContextEngineService, ContextType, ConversationDTO, ConversationEvents, ConversationFlowStateService, 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, PromptPreviewComponent, 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 };
|
|
1499
1571
|
export type { Appearance, AudioGenerated, AudioState, BackgroundTask, CardTranslation, ChangePromptAction, CharacterCardData, ChatEvent, ConversationFlowFormGroup, ConversationSettingsFormGroup, DoAction, DoActionFormGroup, DynamicConditionFormGroup, DynamicCriteriaFormGroup, IAccounts, IAgentAssets, IAgentCard, IAgentCardMeta, IAgentMetadata, IAgentResponseDTO, IBackgroundService, IChallengeState, ICharacterCardDC, IConversationFlow, IConversationFlowState, IConversationSettings, IConversationSettingsDTO, IDynamicCondition, IDynamicCriteria, IDynamicFlowTask, IGenerateConversationCardsDto, IGoalState, IMoodState, IMoodStateRuntime, IRule, ISimpleAgent, ITTS, IVideoPlayerService, IWordMetadata, ModelFormGroup, ModelName, MultiLanguage, Persona, SimpleAgentTask, SimpleAgentTaskFormGroup, SimpleEvalResult, TextHTMLTag, TranscriptionsWhisper, TriggerTasksFormGroup, VoiceCloning, VoiceTTS, WordData };
|