@dataclouder/ngx-agent-cards 0.2.3 → 0.2.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataclouder/ngx-agent-cards",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=18.0.0",
6
6
  "@angular/core": ">=18.0.0",
@@ -218,7 +218,6 @@ interface CharacterCardData {
218
218
  name: string;
219
219
  description: string;
220
220
  scenario?: string;
221
- first_mes?: string;
222
221
  creator_notes?: string;
223
222
  mes_example?: string;
224
223
  appearance?: string;
@@ -279,6 +278,7 @@ interface IConversationSettings {
279
278
  conversationType?: ConversationType$1;
280
279
  autoStart?: boolean;
281
280
  userMustStart?: boolean;
281
+ streamResponses?: boolean;
282
282
  messages?: ChatMessage[];
283
283
  last_prompt?: string;
284
284
  repeatRecording?: boolean;
@@ -413,6 +413,27 @@ interface VoiceCloning {
413
413
  transcription: string;
414
414
  main: VoiceTTS;
415
415
  }
416
+ declare enum AgenticEngine {
417
+ SERVER_SDK = "server_sdk",// Loop ReAct local del backend (Vercel AI SDK)
418
+ OS_HERMES = "os_hermes"
419
+ }
420
+ declare enum AgenticPattern {
421
+ DIRECT = "direct",// Roleplay clásico sin bucles
422
+ REACT = "react",// Pensamiento -> Acción (Tools) -> Observación
423
+ REFLECTION = "reflection",// Borrador -> Crítica interna -> Refinación
424
+ PLAN_AND_EXECUTE = "plan_execute"
425
+ }
426
+ interface IAgenticConfig {
427
+ enabled: boolean;
428
+ engine: AgenticEngine;
429
+ pattern: AgenticPattern;
430
+ maxIterations: number;
431
+ allowedTools: string[];
432
+ reflectionPrompt?: string;
433
+ connectionUrl?: string;
434
+ reasoningModel?: IAIModel;
435
+ executionModel?: IAIModel;
436
+ }
416
437
  interface IAgentCard {
417
438
  version?: string;
418
439
  _id?: string;
@@ -430,6 +451,7 @@ interface IAgentCard {
430
451
  learnable?: ILearnable;
431
452
  auditable?: IAuditable;
432
453
  voiceCloning?: VoiceCloning;
454
+ agenticConfig?: IAgenticConfig;
433
455
  metaApp?: IAgentMetadata;
434
456
  }
435
457
  interface IAgentCardMeta extends IAgentCard {
@@ -481,7 +503,7 @@ declare class WordTimestamps {
481
503
  end: number;
482
504
  highlighted?: boolean;
483
505
  }
484
- type AudioStatus = 'pending' | 'playing' | 'stopped' | 'finished' | 'skip';
506
+ type AudioStatus = 'pending' | 'playing' | 'stopped' | 'finished' | 'skip' | 'buffering';
485
507
  declare class MessageContent {
486
508
  audioUrl?: string;
487
509
  audioPromise?: any;
@@ -636,12 +658,14 @@ declare class DefaultAgentCardsService extends EntityCommunicationService<IAgent
636
658
  protected toastService: _dataclouder_ngx_core.ToastAlertsAbstractService;
637
659
  protected appConfig: _dataclouder_ngx_core.IAppConfig;
638
660
  private whisperService;
661
+ private fbAuthService;
639
662
  constructor();
640
663
  partialUpdateAgentCard(agentCard: IAgentCard): Promise<IAgentCard>;
641
664
  generateMainImage(idCard: string): Promise<any>;
642
665
  completeAgentCard(idCard: string): Promise<any>;
643
666
  getFixedQuery(): Record<string, any>;
644
667
  callChatCompletion(conversation: IConversationSettingsDTO, tag?: string): Promise<IAgentResponseDTO>;
668
+ callChatCompletionStream(conversation: IConversationSettingsDTO): AsyncGenerator<string>;
645
669
  filterConversationCards(filters: FiltersConfig): Promise<IFilterQueryResponse<IAgentCard>>;
646
670
  getAllConversationCards(): Promise<IAgentCard[]>;
647
671
  findFilteredAgentCards(paginator: FiltersConfig): Promise<IFilterQueryResponse<IAgentCard>>;
@@ -798,6 +822,7 @@ declare class DynamicFlowService {
798
822
  private messagesStateService;
799
823
  private conversationFlowStateService;
800
824
  private agentCardStateService;
825
+ private userService;
801
826
  /** Derived from AgentCardStateService — single source of truth for the conversation flow config. */
802
827
  conversationFlowConfig: _angular_core.Signal<IConversationFlow>;
803
828
  /**
@@ -829,6 +854,7 @@ declare class DynamicFlowService {
829
854
  * @param aiResponse A partial `IConversationFlowState` object from the AI.
830
855
  */
831
856
  updateStateFromAI(aiResponse: Partial<IConversationFlowState>): void;
857
+ private attachFlowEvaluationToLastUserMessage;
832
858
  syncMoodToLatestMessage(messageId?: string): void;
833
859
  private getMoodEmoji;
834
860
  /**
@@ -1030,6 +1056,11 @@ declare class ConversationFlowStateService {
1030
1056
  currentMood: _angular_core.Signal<any>;
1031
1057
  private moodUpdated;
1032
1058
  moodUpdated$: rxjs.Observable<string>;
1059
+ private goalEvaluationUpdated;
1060
+ goalEvaluationUpdated$: rxjs.Observable<{
1061
+ deltaPoints: number;
1062
+ feedback?: string;
1063
+ }>;
1033
1064
  constructor();
1034
1065
  /**
1035
1066
  * @description
@@ -1210,6 +1241,27 @@ declare class DCChatComponent implements OnInit, OnDestroy {
1210
1241
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<DCChatComponent, "dc-chat", never, { "chatUserSettings": { "alias": "chatUserSettings"; "required": false; }; "conversationSettings": { "alias": "conversationSettings"; "required": false; }; "conversationFlow": { "alias": "conversationFlow"; "required": false; }; "agentCard": { "alias": "agentCard"; "required": false; }; "parseDict": { "alias": "parseDict"; "required": false; "isSignal": true; }; }, { "chatEvent": "chatEvent"; "goalCompleted": "goalCompleted"; }, never, never, true, never>;
1211
1242
  }
1212
1243
 
1244
+ declare class PolitoNotificationComponent implements OnInit, OnDestroy {
1245
+ private flowStateService;
1246
+ private agentCardStateService;
1247
+ notification: _angular_core.WritableSignal<{
1248
+ points: number;
1249
+ feedback: string;
1250
+ }>;
1251
+ isHiding: _angular_core.WritableSignal<boolean>;
1252
+ private subscription;
1253
+ private hideTimeout;
1254
+ private animTimeout;
1255
+ ngOnInit(): void;
1256
+ ngOnDestroy(): void;
1257
+ private showNotification;
1258
+ private clearTimeouts;
1259
+ getPointsText(points: number): string;
1260
+ getFeatherPointsText(points: number): string;
1261
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PolitoNotificationComponent, never>;
1262
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PolitoNotificationComponent, "dc-polito-notification", never, {}, {}, never, never, true, never>;
1263
+ }
1264
+
1213
1265
  declare class DCAgentCardFormComponent extends EntityBaseFormComponent<IAgentCard> {
1214
1266
  private fb;
1215
1267
  protected entityCommunicationService: _dataclouder_ngx_agent_cards.DefaultAgentCardsService;
@@ -1230,7 +1282,15 @@ declare class DCAgentCardFormComponent extends EntityBaseFormComponent<IAgentCar
1230
1282
  label: string;
1231
1283
  }[];
1232
1284
  agentTypeOptions: (string | EAgentType.None)[];
1285
+ agenticEngineOptions: AgenticEngine[];
1286
+ agenticPatternOptions: AgenticPattern[];
1287
+ allowedToolsOptions: {
1288
+ label: string;
1289
+ value: string;
1290
+ }[];
1233
1291
  readonly onSave: _angular_core.OutputEmitterRef<any>;
1292
+ isToolAllowed(toolValue: string): boolean;
1293
+ toggleTool(toolValue: string, checked: boolean): void;
1234
1294
  form: _angular_forms.FormGroup<{
1235
1295
  version: _angular_forms.FormControl<string>;
1236
1296
  id: _angular_forms.FormControl<string>;
@@ -1244,6 +1304,7 @@ declare class DCAgentCardFormComponent extends EntityBaseFormComponent<IAgentCar
1244
1304
  conversationType: _angular_forms.FormControl<ConversationType$1>;
1245
1305
  autoStart: _angular_forms.FormControl<boolean>;
1246
1306
  userMustStart: _angular_forms.FormControl<boolean>;
1307
+ streamResponses: _angular_forms.FormControl<boolean>;
1247
1308
  displayMode: _angular_forms.FormControl<string>;
1248
1309
  mainVoice: _angular_forms.FormGroup<any>;
1249
1310
  secondaryVoice: _angular_forms.FormGroup<any>;
@@ -1278,6 +1339,27 @@ declare class DCAgentCardFormComponent extends EntityBaseFormComponent<IAgentCar
1278
1339
  tags: FormArray<_angular_forms.FormControl<string | null>>;
1279
1340
  }>;
1280
1341
  voiceCloning: _angular_forms.FormGroup<any>;
1342
+ agenticConfig: _angular_forms.FormGroup<{
1343
+ enabled: _angular_forms.FormControl<boolean>;
1344
+ engine: _angular_forms.FormControl<AgenticEngine>;
1345
+ pattern: _angular_forms.FormControl<AgenticPattern>;
1346
+ maxIterations: _angular_forms.FormControl<number>;
1347
+ allowedTools: FormArray<_angular_forms.FormControl<unknown>>;
1348
+ reflectionPrompt: _angular_forms.FormControl<string>;
1349
+ connectionUrl: _angular_forms.FormControl<string>;
1350
+ reasoningModel: _angular_forms.FormGroup<{
1351
+ quality: _angular_forms.FormControl<_dataclouder_ngx_core.EModelQuality>;
1352
+ modelName: _angular_forms.FormControl<string>;
1353
+ provider: _angular_forms.FormControl<string>;
1354
+ id: _angular_forms.FormControl<string>;
1355
+ }>;
1356
+ executionModel: _angular_forms.FormGroup<{
1357
+ quality: _angular_forms.FormControl<_dataclouder_ngx_core.EModelQuality>;
1358
+ modelName: _angular_forms.FormControl<string>;
1359
+ provider: _angular_forms.FormControl<string>;
1360
+ id: _angular_forms.FormControl<string>;
1361
+ }>;
1362
+ }>;
1281
1363
  }>;
1282
1364
  protected patchForm(agentCard: IAgentCard): void;
1283
1365
  save(): Promise<IAgentCard | undefined>;
@@ -1733,5 +1815,5 @@ declare class ChatEngineTestComponent {
1733
1815
 
1734
1816
  declare const AGENT_CARDS_STATE_SERVICE: InjectionToken<MasterStateService<IAgentCard>>;
1735
1817
 
1736
- export { ACCDataGenerationComponent, AGENT_CARDS_STATE_SERVICE, AIGenerationService, AgentCardListComponent, AgentCardUI, AgentCardsGenerationService, AudioService, AudioSpeed, BACKGROUND_SERVICE_TOKEN, CONVERSATION_AI_TOKEN, CardRouteService, CardRoutesComponent, CardsCreatorComponent, ChatEngineTestComponent, ChatEventType, ChatMessage, ChatMessageOrchestratorComponent, ChatMonitorService, ChatRole, ConditionOperator, ConditionType, ContextEngineService, ContextType, ConversationDTO, ConversationEvents, ConversationFlowStateService, ConversationMessagesDTO, ConversationPromptBuilderService, ConversationRuleService, ConversationRulesComponent, ConversationStatus, ConversationType$1 as ConversationType, ConversationTypeOptions, DCAgentCardFormComponent, DCChatComponent, DCConversationUserChatSettingsComponent, DcAgentCardConverseComponent, DcAgentCardDetailComponent, 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, VideoPlayerNativeService, VideoPlayerService, VoiceTTSOption, VoiceTTSOptions, WordTimestamps, XKillsAgentCardsService, buildObjectTTSRequest, characterCardStringDataDefinition, convertToHTML, createAIModelFormGroup, defaultconvUserSettings, extractAudioAndTranscription, extractJsonFromResponse, getMoodStateLabelsAsString, getMoodStatePrompt, markdownToHtml, matchTranscription, provideAgentCardService, removeEmojis, removeEmojisAndSpecialCharacters, removeSpecialCharacters };
1737
- export type { Appearance, AudioGenerated, AudioStatus, BackgroundTask, CardTranslation, ChangePromptAction, CharacterCardData, ChatEvent, ConversationFlowFormGroup, ConversationSettingsFormGroup, DoAction, DoActionFormGroup, DynamicConditionFormGroup, DynamicCriteriaFormGroup, IAccounts, IAgentAssets, IAgentCard, IAgentCardMeta, IAgentMetadata, IAgentResponseDTO, IBackgroundService, ICardRoute, ICardRouteStep, IChallengeState, ICharacterCardDC, IConversationFlow, IConversationFlowState, IConversationSession, 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 };
1818
+ export { ACCDataGenerationComponent, AGENT_CARDS_STATE_SERVICE, AIGenerationService, AgentCardListComponent, AgentCardUI, AgentCardsGenerationService, AgenticEngine, AgenticPattern, AudioService, AudioSpeed, BACKGROUND_SERVICE_TOKEN, CONVERSATION_AI_TOKEN, CardRouteService, CardRoutesComponent, CardsCreatorComponent, ChatEngineTestComponent, ChatEventType, ChatMessage, ChatMessageOrchestratorComponent, ChatMonitorService, ChatRole, ConditionOperator, ConditionType, ContextEngineService, ContextType, ConversationDTO, ConversationEvents, ConversationFlowStateService, ConversationMessagesDTO, ConversationPromptBuilderService, ConversationRuleService, ConversationRulesComponent, ConversationStatus, ConversationType$1 as ConversationType, ConversationTypeOptions, DCAgentCardFormComponent, DCChatComponent, DCConversationUserChatSettingsComponent, DcAgentCardConverseComponent, DcAgentCardDetailComponent, DefaultAgentCardsService, DoActionTypeOptions, DynamicFlowService, DynamicFlowTaskTypeOptions, EAccountsPlatform, EAgentType, EDoActionType, EDynamicFlowTaskType, EntityThen, EntityWhatOptions, EntityWhenOptions, EvalResultStringDefinition, GlobalToolsService, MessageContent, MessageContentDisplayer, MessagesStateService, ModelSelectorComponent, PolitoNotificationComponent, PopupService, PromptPreviewComponent, SectionType, SystemPromptType, TextEngineOptions, TextEngines, VIDEO_PLAYER_SERVICE_TOKEN, VideoPlayerNativeService, VideoPlayerService, VoiceTTSOption, VoiceTTSOptions, WordTimestamps, XKillsAgentCardsService, buildObjectTTSRequest, characterCardStringDataDefinition, convertToHTML, createAIModelFormGroup, defaultconvUserSettings, extractAudioAndTranscription, extractJsonFromResponse, getMoodStateLabelsAsString, getMoodStatePrompt, markdownToHtml, matchTranscription, provideAgentCardService, removeEmojis, removeEmojisAndSpecialCharacters, removeSpecialCharacters };
1819
+ export type { Appearance, AudioGenerated, AudioStatus, BackgroundTask, CardTranslation, ChangePromptAction, CharacterCardData, ChatEvent, ConversationFlowFormGroup, ConversationSettingsFormGroup, DoAction, DoActionFormGroup, DynamicConditionFormGroup, DynamicCriteriaFormGroup, IAccounts, IAgentAssets, IAgentCard, IAgentCardMeta, IAgentMetadata, IAgentResponseDTO, IAgenticConfig, IBackgroundService, ICardRoute, ICardRouteStep, IChallengeState, ICharacterCardDC, IConversationFlow, IConversationFlowState, IConversationSession, 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 };