@dataclouder/ngx-agent-cards 0.1.78 → 0.1.79

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
@@ -897,6 +897,75 @@ declare class VideoPlayerService implements OnDestroy {
897
897
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<VideoPlayerService>;
898
898
  }
899
899
 
900
+ /**
901
+ * @description
902
+ * Service responsible for managing the real-time, dynamic state of a conversation flow.
903
+ *
904
+ * This service acts as a single source of truth for the evolving aspects of a conversation,
905
+ * such as the user's progress toward a goal, completed challenges, and the agent's current mood.
906
+ * It uses Angular Signals to provide a reactive state that can be observed by UI components
907
+ * and other services.
908
+ *
909
+ * The state managed here is the **runtime state**, which is distinct from the static
910
+ * `IConversationFlow` configuration that defines the rules of the flow.
911
+ */
912
+ declare class ConversationFlowStateService {
913
+ private readonly initialState;
914
+ /**
915
+ * @description
916
+ * A reactive signal holding the current conversation flow state.
917
+ * Components and services can subscribe to this signal to get real-time updates.
918
+ */
919
+ flowState: _angular_core.WritableSignal<IConversationFlowState>;
920
+ currentMood: _angular_core.Signal<any>;
921
+ private moodUpdated;
922
+ moodUpdated$: rxjs.Observable<string>;
923
+ constructor();
924
+ /**
925
+ * @description
926
+ * Resets the conversation flow state to its initial default values.
927
+ * This is typically called at the beginning of a new conversation session.
928
+ */
929
+ resetState(): void;
930
+ /**
931
+ * @description
932
+ * Updates the entire flow state with a new state object.
933
+ * @param newState A partial `IConversationFlowState` object containing the new values.
934
+ */
935
+ updateState(newState: Partial<IConversationFlowState>): void;
936
+ /**
937
+ * @description
938
+ * Updates the goal state, typically to reflect progress.
939
+ * The value should represent the goal's progress (e.g., a percentage).
940
+ * @param goalState A partial `{ name: string; value: any }` object for the goal.
941
+ */
942
+ updateGoalState(goalState: Partial<{
943
+ name: string;
944
+ value: any;
945
+ }>): void;
946
+ /**
947
+ * @description
948
+ * Updates an existing challenge or adds a new one.
949
+ * The value for a challenge should typically be a boolean indicating completion.
950
+ * @param challenge A `{ name: string; value: any }` object representing the challenge state.
951
+ */
952
+ updateChallengeState(challenge: {
953
+ name: string;
954
+ value: any;
955
+ }): void;
956
+ /**
957
+ * @description
958
+ * Updates the agent's current mood state.
959
+ * @param moodState A partial `{ name: string; value: any }` object for the mood.
960
+ */
961
+ updateMoodState(moodState: Partial<{
962
+ name: string;
963
+ value: any;
964
+ }>): void;
965
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConversationFlowStateService, never>;
966
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ConversationFlowStateService>;
967
+ }
968
+
900
969
  declare class ConversationRuleService extends EntityCommunicationService<IConversationRule> {
901
970
  constructor();
902
971
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConversationRuleService, never>;
@@ -1495,5 +1564,5 @@ declare class ChatEngineTestComponent {
1495
1564
 
1496
1565
  declare const AGENT_CARDS_STATE_SERVICE: InjectionToken<MasterStateService<IAgentCard>>;
1497
1566
 
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 };
1567
+ 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
1568
  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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataclouder/ngx-agent-cards",
3
- "version": "0.1.78",
3
+ "version": "0.1.79",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=18.0.0",
6
6
  "@angular/core": ">=18.0.0",