@dataclouder/ngx-agent-cards 0.2.15 → 0.2.16

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.15",
3
+ "version": "0.2.16",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=18.0.0",
6
6
  "@angular/core": ">=18.0.0",
@@ -1,14 +1,14 @@
1
- import { ImgStorageData, BasicStorage, AudioStorage, IAssetable, FileStorageData } from '@dataclouder/ngx-cloud-storage';
1
+ import { AudioStorage, ImgStorageData, BasicStorage, IAssetable, FileStorageData } from '@dataclouder/ngx-cloud-storage';
2
2
  import { AudioEffectType, TTSRequest } from '@dataclouder/ngx-ai-services';
3
3
  import * as _dataclouder_ngx_core from '@dataclouder/ngx-core';
4
4
  import { ChatUserSettings, EModelQuality, IAuditable, IAIModel, IManageable, ILearnable, EntityCommunicationService, FiltersConfig, IFilterQueryResponse, HttpCoreService, EntityBaseFormComponent, EntityBaseListV2Component, ICustomFilter, PColumn, OnActionEvent, EntityBaseDetailComponent, formatCamelCaseString } from '@dataclouder/ngx-core';
5
+ import { MicSettings } from '@dataclouder/ngx-mic';
5
6
  import * as _angular_forms from '@angular/forms';
6
7
  import { FormGroup, FormControl, FormArray } from '@angular/forms';
7
8
  import * as _angular_core from '@angular/core';
8
9
  import { InjectionToken, Type, Provider, WritableSignal, Injector, Signal, OnDestroy, ElementRef, OnInit, AfterViewInit, TemplateRef, EventEmitter } from '@angular/core';
9
10
  import { UserService } from '@dataclouder/ngx-users';
10
11
  import * as rxjs from 'rxjs';
11
- import { MicSettings } from '@dataclouder/ngx-mic';
12
12
  import * as _dataclouder_ngx_agent_cards from '@dataclouder/ngx-agent-cards';
13
13
  import { SafeHtml } from '@angular/platform-browser';
14
14
  import * as dist_dataclouder_ngx_knowledge_types_dataclouder_ngx_knowledge from 'dist/dataclouder/ngx-knowledge/types/dataclouder-ngx-knowledge';
@@ -17,6 +17,16 @@ import * as dist_dataclouder_ngx_core_types_dataclouder_ngx_core from 'dist/data
17
17
  import * as _angular_router from '@angular/router';
18
18
  import { MasterStateService } from '@dataclouder/ngx-knowledge';
19
19
 
20
+ /**
21
+ * Traduce la preferencia de alto nivel `micMode` (de ChatUserSettings) a la
22
+ * configuración técnica de `MicSettings` que consume el componente de micrófono.
23
+ *
24
+ * - 'hands-free' → grabación por detección de silencio, infinita (envía y sigue escuchando).
25
+ * - 'push-to-talk' → grabación por detección de silencio, finita (envía y se detiene).
26
+ * - 'manual' → grabación continua: el silencio NO envía; el usuario presiona para enviar
27
+ * (máx. `maxRecordingTime`, con contador y barra). Para usuarios que pausan mucho.
28
+ */
29
+ declare function buildMicSettings(micMode: ChatUserSettings['micMode'] | undefined, lang: string): MicSettings;
20
30
  declare const defaultconvUserSettings: ChatUserSettings;
21
31
  declare class VoiceTTSOption {
22
32
  provider: string;
@@ -167,12 +177,13 @@ type ConversationSettingsFormGroup = FormGroup<{
167
177
  textEngine: FormControl<TextEngines>;
168
178
  conversationType: FormControl<ConversationType$1>;
169
179
  autoStart: FormControl<boolean>;
170
- tts: FormGroup<{
171
- voice: FormControl<string>;
172
- secondaryVoice: FormControl<string>;
173
- speed: FormControl<string>;
174
- speedRate: FormControl<number>;
175
- }>;
180
+ userMustStart: FormControl<boolean>;
181
+ streamResponses: FormControl<boolean>;
182
+ displayMode: FormControl<string>;
183
+ model: ModelFormGroup;
184
+ rules: FormArray<any>;
185
+ chatMode: FormControl<string>;
186
+ avatarDisplayMode: FormControl<string>;
176
187
  }>;
177
188
 
178
189
  interface IConversationRule {
@@ -185,13 +196,6 @@ interface IConversationRule {
185
196
  auditable?: IAuditable;
186
197
  }
187
198
 
188
- interface Appearance {
189
- generalDescription: string;
190
- physicalDescription: string;
191
- outfit: string;
192
- objects: string;
193
- quirks: string;
194
- }
195
199
  interface CardTranslation {
196
200
  greetings: string[];
197
201
  instructions: string;
@@ -241,12 +245,6 @@ interface ICharacterCardDC {
241
245
  spec_version?: '2_v_dc';
242
246
  data: CharacterCardData;
243
247
  }
244
- interface ITTS {
245
- voice: string;
246
- secondaryVoice?: string;
247
- speed?: AudioSpeed;
248
- speedRate?: number;
249
- }
250
248
  interface IAgentMetadata {
251
249
  isPublished: boolean;
252
250
  isPublic: any;
@@ -267,10 +265,6 @@ interface VoiceTTS {
267
265
  options?: Record<string, any>;
268
266
  }
269
267
 
270
- interface IRule {
271
- name: string;
272
- description: string;
273
- }
274
268
  interface IConversationSettings {
275
269
  modelQuality?: EModelQuality;
276
270
  model?: IAIModel;
@@ -288,11 +282,9 @@ interface IConversationSettings {
288
282
  user?: string;
289
283
  assistant?: string;
290
284
  };
291
- tts?: ITTS;
292
- mainVoice?: VoiceTTS;
293
- secondaryVoice?: VoiceTTS;
294
285
  chatMode?: 'regular' | 'immersive';
295
286
  avatarDisplayMode?: 'card' | 'transparent' | 'fullscreen';
287
+ voice?: IAgentVoiceSettings;
296
288
  }
297
289
  type IConversationSettingsDTO = Partial<IConversationSettings> & {
298
290
  returnJson?: boolean;
@@ -428,11 +420,6 @@ declare enum EAgentType {
428
420
  Social = "social",
429
421
  Character = "character"
430
422
  }
431
- interface VoiceCloning {
432
- sample: AudioStorage;
433
- transcription: string;
434
- main: VoiceTTS;
435
- }
436
423
  interface IAgentVoiceSettings {
437
424
  main?: VoiceTTS;
438
425
  secondary?: VoiceTTS;
@@ -478,7 +465,6 @@ interface IAgentCard {
478
465
  manageable?: IManageable;
479
466
  learnable?: ILearnable;
480
467
  auditable?: IAuditable;
481
- voiceCloning?: VoiceCloning;
482
468
  voice?: IAgentVoiceSettings;
483
469
  agenticConfig?: IAgenticConfig;
484
470
  metaApp?: IAgentMetadata;
@@ -488,15 +474,6 @@ interface IAgentCard {
488
474
  interface IAgentCardMeta extends IAgentCard {
489
475
  taken: any;
490
476
  }
491
- declare const EvalResultStringDefinition = "\ninterface SimpleEvalResult {\n score: number; // Score of the user's response 0 to 3\n feedback: string; // Feedback of the user's understanding of the conversation\n}";
492
- interface SimpleEvalResult {
493
- score: number;
494
- feedback: string;
495
- }
496
- interface ISimpleAgent {
497
- systemPrompt: string;
498
- model: IAIModel;
499
- }
500
477
  interface SimpleAgentTask {
501
478
  task: string;
502
479
  modelQuality?: EModelQuality;
@@ -547,6 +524,7 @@ declare class MessageContent {
547
524
  text?: string;
548
525
  content?: string;
549
526
  voice?: string;
527
+ provider?: string;
550
528
  messageId?: string;
551
529
  tag?: string;
552
530
  ssml?: string;
@@ -1289,6 +1267,7 @@ declare class DCChatComponent implements OnInit, OnDestroy {
1289
1267
  conversationSettings: IConversationSettings;
1290
1268
  conversationFlow: IConversationFlow | null;
1291
1269
  agentCard: IAgentCard;
1270
+ micSettings?: MicSettings;
1292
1271
  observerConfig?: IObserverConfig;
1293
1272
  readonly parseDict: _angular_core.InputSignal<{
1294
1273
  [key: string]: string;
@@ -1298,7 +1277,6 @@ declare class DCChatComponent implements OnInit, OnDestroy {
1298
1277
  /** @deprecated Use ChatMonitorService instead — el canal oficial es el servicio compartido. */
1299
1278
  readonly goalCompleted: _angular_core.OutputEmitterRef<void>;
1300
1279
  viewMode: _angular_core.WritableSignal<"chat" | "immersive">;
1301
- micSettings: MicSettings;
1302
1280
  isAdmin: boolean;
1303
1281
  constructor();
1304
1282
  ngOnInit(): Promise<void>;
@@ -1318,7 +1296,7 @@ declare class DCChatComponent implements OnInit, OnDestroy {
1318
1296
  restartConversation(conversation?: IAgentCard | null): Promise<void>;
1319
1297
  complete(): void;
1320
1298
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DCChatComponent, never>;
1321
- 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; }; "observerConfig": { "alias": "observerConfig"; "required": false; }; "parseDict": { "alias": "parseDict"; "required": false; "isSignal": true; }; }, { "chatEvent": "chatEvent"; "goalCompleted": "goalCompleted"; }, never, never, true, never>;
1299
+ 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; }; "micSettings": { "alias": "micSettings"; "required": false; }; "observerConfig": { "alias": "observerConfig"; "required": false; }; "parseDict": { "alias": "parseDict"; "required": false; "isSignal": true; }; }, { "chatEvent": "chatEvent"; "goalCompleted": "goalCompleted"; }, never, never, true, never>;
1322
1300
  }
1323
1301
 
1324
1302
  declare class PolitoNotificationComponent implements OnInit, OnDestroy {
@@ -1532,7 +1510,7 @@ interface ModelParts {
1532
1510
  parentIndices: number[];
1533
1511
  }
1534
1512
 
1535
- declare class Live2dModelComponent implements AfterViewInit {
1513
+ declare class Live2dModelComponent implements AfterViewInit, OnDestroy {
1536
1514
  canvasRef: ElementRef<HTMLCanvasElement>;
1537
1515
  modelPath: _angular_core.InputSignal<string>;
1538
1516
  scale: _angular_core.InputSignal<number>;
@@ -1552,6 +1530,7 @@ declare class Live2dModelComponent implements AfterViewInit {
1552
1530
  }>;
1553
1531
  app: any;
1554
1532
  model: any;
1533
+ private resizeObserver?;
1555
1534
  private live2dConfig;
1556
1535
  private modelParameters;
1557
1536
  private modelParts;
@@ -1564,6 +1543,7 @@ declare class Live2dModelComponent implements AfterViewInit {
1564
1543
  private dragStartModel;
1565
1544
  constructor();
1566
1545
  ngAfterViewInit(): Promise<void>;
1546
+ ngOnDestroy(): void;
1567
1547
  initializeCanvas(): Promise<void>;
1568
1548
  loadModel(modelPath: string): Promise<void>;
1569
1549
  private updateModelTransform;
@@ -1872,6 +1852,7 @@ declare class DCConversationUserChatSettingsComponent implements OnInit {
1872
1852
  assistantMessageTask: _angular_forms.FormControl<boolean>;
1873
1853
  saveConversations: _angular_forms.FormControl<boolean>;
1874
1854
  multilingualHearing: _angular_forms.FormControl<boolean>;
1855
+ micMode: _angular_forms.FormControl<string>;
1875
1856
  voice: _angular_forms.FormControl<string>;
1876
1857
  model: _angular_forms.FormGroup<{
1877
1858
  quality: _angular_forms.FormControl<dist_dataclouder_ngx_core_types_dataclouder_ngx_core.EModelQuality>;
@@ -1998,5 +1979,5 @@ declare class ChatEngineTestComponent {
1998
1979
 
1999
1980
  declare const AGENT_CARDS_STATE_SERVICE: InjectionToken<MasterStateService<IAgentCard>>;
2000
1981
 
2001
- export { ACCDataGenerationComponent, AGENT_CARDS_STATE_SERVICE, AIGenerationService, AgentCardListComponent, AgentCardUI, AgentCardsGenerationService, AgenticEngine, AgenticPattern, AudioService, AudioSpeed, BACKGROUND_SERVICE_TOKEN, CHAT_OBSERVER_CONFIG, 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, DcAgentCardAvatarComponent, DcAgentCardDetailComponent, DcObserverInterventionComponent, DefaultAgentCardsService, DoActionTypeOptions, DynamicFlowService, DynamicFlowTaskTypeOptions, EAccountsPlatform, EAgentType, EDoActionType, EDynamicFlowTaskType, EntityThen, EntityWhatOptions, EntityWhenOptions, EvalResultStringDefinition, GlobalToolsService, LIVE2D_CONFIG, Live2dModelComponent, 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, provideLive2D, removeEmojis, removeEmojisAndSpecialCharacters, removeSpecialCharacters };
2002
- export type { Appearance, AudioGenerated, AudioStatus, AudioStatusUpdate, BackgroundTask, CardTranslation, ChangePromptAction, CharacterCardData, ChatEvent, ConversationFlowFormGroup, ConversationSettingsFormGroup, DCAgentFormSettings, DoAction, DoActionFormGroup, DynamicConditionFormGroup, DynamicCriteriaFormGroup, IAccounts, IAgentAssets, IAgentCard, IAgentCardMeta, IAgentMetadata, IAgentResponseDTO, IAgentVoiceSettings, IAgenticConfig, IBackgroundService, ICardRoute, ICardRouteStep, IChallengeState, ICharacterCardDC, IConversationFlow, IConversationFlowState, IConversationSession, IConversationSettings, IConversationSettingsDTO, IDynamicCondition, IDynamicCriteria, IDynamicFlowTask, IGenerateConversationCardsDto, IGoalState, IInterventionState, IMoodState, IMoodStateRuntime, IObserverConfig, IRule, ISimpleAgent, ITTS, IVideoPlayerService, IWordMetadata, Live2DConfig, ModelFormGroup, ModelName, ModelParameters, ModelParts, MultiLanguage, Persona, SimpleAgentTask, SimpleAgentTaskFormGroup, SimpleEvalResult, TextHTMLTag, TranscriptionsWhisper, TriggerTasksFormGroup, VoiceCloning, VoiceTTS, WordData };
1982
+ export { ACCDataGenerationComponent, AGENT_CARDS_STATE_SERVICE, AIGenerationService, AgentCardListComponent, AgentCardUI, AgentCardsGenerationService, AgenticEngine, AgenticPattern, AudioService, AudioSpeed, BACKGROUND_SERVICE_TOKEN, CHAT_OBSERVER_CONFIG, 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, DcAgentCardAvatarComponent, DcAgentCardDetailComponent, DcObserverInterventionComponent, DefaultAgentCardsService, DoActionTypeOptions, DynamicFlowService, DynamicFlowTaskTypeOptions, EAccountsPlatform, EAgentType, EDoActionType, EDynamicFlowTaskType, EntityThen, EntityWhatOptions, EntityWhenOptions, GlobalToolsService, LIVE2D_CONFIG, Live2dModelComponent, MessageContent, MessageContentDisplayer, MessagesStateService, ModelSelectorComponent, PolitoNotificationComponent, PopupService, PromptPreviewComponent, SectionType, SystemPromptType, TextEngineOptions, TextEngines, VIDEO_PLAYER_SERVICE_TOKEN, VideoPlayerNativeService, VideoPlayerService, VoiceTTSOption, VoiceTTSOptions, WordTimestamps, XKillsAgentCardsService, buildMicSettings, buildObjectTTSRequest, characterCardStringDataDefinition, convertToHTML, createAIModelFormGroup, defaultconvUserSettings, extractAudioAndTranscription, extractJsonFromResponse, getMoodStateLabelsAsString, getMoodStatePrompt, markdownToHtml, matchTranscription, provideAgentCardService, provideLive2D, removeEmojis, removeEmojisAndSpecialCharacters, removeSpecialCharacters };
1983
+ export type { AudioGenerated, AudioStatus, AudioStatusUpdate, BackgroundTask, CardTranslation, ChangePromptAction, CharacterCardData, ChatEvent, ConversationFlowFormGroup, ConversationSettingsFormGroup, DCAgentFormSettings, DoAction, DoActionFormGroup, DynamicConditionFormGroup, DynamicCriteriaFormGroup, IAccounts, IAgentAssets, IAgentCard, IAgentCardMeta, IAgentMetadata, IAgentResponseDTO, IAgentVoiceSettings, IAgenticConfig, IBackgroundService, ICardRoute, ICardRouteStep, IChallengeState, ICharacterCardDC, IConversationFlow, IConversationFlowState, IConversationSession, IConversationSettings, IConversationSettingsDTO, IDynamicCondition, IDynamicCriteria, IDynamicFlowTask, IGenerateConversationCardsDto, IGoalState, IInterventionState, IMoodState, IMoodStateRuntime, IObserverConfig, IVideoPlayerService, IWordMetadata, Live2DConfig, ModelFormGroup, ModelName, ModelParameters, ModelParts, MultiLanguage, Persona, SimpleAgentTask, SimpleAgentTaskFormGroup, TextHTMLTag, TranscriptionsWhisper, TriggerTasksFormGroup, VoiceTTS, WordData };