@dataclouder/ngx-agent-cards 0.2.8 → 0.2.9
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
|
@@ -10,6 +10,7 @@ import { UserService } from '@dataclouder/ngx-users';
|
|
|
10
10
|
import * as rxjs from 'rxjs';
|
|
11
11
|
import { MicSettings } from '@dataclouder/ngx-mic';
|
|
12
12
|
import * as _dataclouder_ngx_agent_cards from '@dataclouder/ngx-agent-cards';
|
|
13
|
+
import { SafeHtml } from '@angular/platform-browser';
|
|
13
14
|
import * as dist_dataclouder_ngx_knowledge_types_dataclouder_ngx_knowledge from 'dist/dataclouder/ngx-knowledge/types/dataclouder-ngx-knowledge';
|
|
14
15
|
import { MenuItem } from 'primeng/api';
|
|
15
16
|
import * as dist_dataclouder_ngx_core_types_dataclouder_ngx_core from 'dist/dataclouder/ngx-core/types/dataclouder-ngx-core';
|
|
@@ -390,11 +391,25 @@ interface IMoodStateRuntime {
|
|
|
390
391
|
intensity: number;
|
|
391
392
|
observation?: string;
|
|
392
393
|
}
|
|
394
|
+
interface IObserverConfig {
|
|
395
|
+
name: string;
|
|
396
|
+
mascotId: string;
|
|
397
|
+
avatarSvgRaw?: string;
|
|
398
|
+
avatarUrl?: string;
|
|
399
|
+
themeColorClass?: string;
|
|
400
|
+
sounds?: {
|
|
401
|
+
intervention?: string;
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
interface IInterventionState {
|
|
405
|
+
severity: 'grave' | 'warning' | 'info' | 'none';
|
|
406
|
+
message?: string;
|
|
407
|
+
suggestedCorrection?: string;
|
|
408
|
+
}
|
|
393
409
|
interface IConversationFlowState {
|
|
394
410
|
goal: {
|
|
395
411
|
value: any;
|
|
396
412
|
deltaPoints?: number;
|
|
397
|
-
feedback?: string;
|
|
398
413
|
};
|
|
399
414
|
challenges: {
|
|
400
415
|
name: string;
|
|
@@ -403,6 +418,7 @@ interface IConversationFlowState {
|
|
|
403
418
|
moodState: {
|
|
404
419
|
value: any;
|
|
405
420
|
};
|
|
421
|
+
intervention?: IInterventionState;
|
|
406
422
|
}
|
|
407
423
|
declare enum EAgentType {
|
|
408
424
|
None,
|
|
@@ -967,6 +983,7 @@ interface IBackgroundService {
|
|
|
967
983
|
}
|
|
968
984
|
declare const VIDEO_PLAYER_SERVICE_TOKEN: InjectionToken<IVideoPlayerService>;
|
|
969
985
|
declare const BACKGROUND_SERVICE_TOKEN: InjectionToken<IBackgroundService>;
|
|
986
|
+
declare const CHAT_OBSERVER_CONFIG: InjectionToken<IObserverConfig>;
|
|
970
987
|
|
|
971
988
|
declare class VideoPlayerService implements OnDestroy {
|
|
972
989
|
private conversationFlowStateService;
|
|
@@ -1055,12 +1072,31 @@ declare class ConversationFlowStateService {
|
|
|
1055
1072
|
*/
|
|
1056
1073
|
flowState: _angular_core.WritableSignal<IConversationFlowState>;
|
|
1057
1074
|
currentMood: _angular_core.Signal<any>;
|
|
1075
|
+
/**
|
|
1076
|
+
* @description
|
|
1077
|
+
* UI-only flag (no viene del LLM): el usuario abrió manualmente la intervención
|
|
1078
|
+
* pasiva (no-grave) haciendo click en la pluma. Se resetea en cada turno.
|
|
1079
|
+
*/
|
|
1080
|
+
private passiveOpened;
|
|
1081
|
+
/**
|
|
1082
|
+
* @description
|
|
1083
|
+
* Modo de presentación de la intervención del turno actual:
|
|
1084
|
+
* - 'grave' => overlay automático y bloqueante
|
|
1085
|
+
* - 'passive' => hay corrección suave; la pluma es clickeable, el usuario decide
|
|
1086
|
+
* - 'none' => nada que mostrar
|
|
1087
|
+
*/
|
|
1088
|
+
interventionMode: _angular_core.Signal<"grave" | "none" | "passive">;
|
|
1089
|
+
/** El overlay (mismo para grave y pasivo) se ve si es grave o si el usuario lo abrió. */
|
|
1090
|
+
showIntervention: _angular_core.Signal<boolean>;
|
|
1091
|
+
/** Pausa los controles solo mientras el overlay está visible. */
|
|
1092
|
+
isPaused: _angular_core.Signal<boolean>;
|
|
1093
|
+
/** True cuando hay una corrección pasiva disponible: hace la pluma clickeable. */
|
|
1094
|
+
hasPassiveHint: _angular_core.Signal<boolean>;
|
|
1058
1095
|
private moodUpdated;
|
|
1059
1096
|
moodUpdated$: rxjs.Observable<string>;
|
|
1060
1097
|
private goalEvaluationUpdated;
|
|
1061
1098
|
goalEvaluationUpdated$: rxjs.Observable<{
|
|
1062
1099
|
deltaPoints: number;
|
|
1063
|
-
feedback?: string;
|
|
1064
1100
|
}>;
|
|
1065
1101
|
constructor();
|
|
1066
1102
|
/**
|
|
@@ -1075,6 +1111,12 @@ declare class ConversationFlowStateService {
|
|
|
1075
1111
|
* @param newState A partial `IConversationFlowState` object containing the new values.
|
|
1076
1112
|
*/
|
|
1077
1113
|
updateState(newState: Partial<IConversationFlowState>): void;
|
|
1114
|
+
/**
|
|
1115
|
+
* @description
|
|
1116
|
+
* El usuario decide abrir la intervención pasiva (no-grave) — típicamente al hacer
|
|
1117
|
+
* click en la pluma mientras cae/flota. Muestra el mismo overlay que el grave.
|
|
1118
|
+
*/
|
|
1119
|
+
openPassiveIntervention(): void;
|
|
1078
1120
|
/**
|
|
1079
1121
|
* @description
|
|
1080
1122
|
* Updates the goal state, typically to reflect progress.
|
|
@@ -1104,6 +1146,12 @@ declare class ConversationFlowStateService {
|
|
|
1104
1146
|
name: string;
|
|
1105
1147
|
value: any;
|
|
1106
1148
|
}>): void;
|
|
1149
|
+
/**
|
|
1150
|
+
* @description
|
|
1151
|
+
* Resets the active intervention state back to inactive.
|
|
1152
|
+
* This is called by the UI when the user acknowledges the intervention.
|
|
1153
|
+
*/
|
|
1154
|
+
clearIntervention(): void;
|
|
1107
1155
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConversationFlowStateService, never>;
|
|
1108
1156
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ConversationFlowStateService>;
|
|
1109
1157
|
}
|
|
@@ -1213,6 +1261,7 @@ declare class DCChatComponent implements OnInit, OnDestroy {
|
|
|
1213
1261
|
conversationSettings: IConversationSettings;
|
|
1214
1262
|
conversationFlow: IConversationFlow | null;
|
|
1215
1263
|
agentCard: IAgentCard;
|
|
1264
|
+
observerConfig?: IObserverConfig;
|
|
1216
1265
|
readonly parseDict: _angular_core.InputSignal<{
|
|
1217
1266
|
[key: string]: string;
|
|
1218
1267
|
}>;
|
|
@@ -1239,7 +1288,7 @@ declare class DCChatComponent implements OnInit, OnDestroy {
|
|
|
1239
1288
|
restartConversation(conversation?: IAgentCard | null): Promise<void>;
|
|
1240
1289
|
complete(): void;
|
|
1241
1290
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DCChatComponent, never>;
|
|
1242
|
-
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>;
|
|
1291
|
+
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>;
|
|
1243
1292
|
}
|
|
1244
1293
|
|
|
1245
1294
|
declare class PolitoNotificationComponent implements OnInit, OnDestroy {
|
|
@@ -1247,14 +1296,19 @@ declare class PolitoNotificationComponent implements OnInit, OnDestroy {
|
|
|
1247
1296
|
private agentCardStateService;
|
|
1248
1297
|
notification: _angular_core.WritableSignal<{
|
|
1249
1298
|
points: number;
|
|
1250
|
-
feedback: string;
|
|
1251
1299
|
}>;
|
|
1252
1300
|
isHiding: _angular_core.WritableSignal<boolean>;
|
|
1301
|
+
isClickable: _angular_core.Signal<boolean>;
|
|
1253
1302
|
private subscription;
|
|
1254
1303
|
private hideTimeout;
|
|
1255
1304
|
private animTimeout;
|
|
1256
1305
|
ngOnInit(): void;
|
|
1257
1306
|
ngOnDestroy(): void;
|
|
1307
|
+
/**
|
|
1308
|
+
* El usuario hace click en la pluma (cayendo o flotando) para abrir la intervención
|
|
1309
|
+
* pasiva. Solo tiene efecto si hay una corrección suave disponible este turno.
|
|
1310
|
+
*/
|
|
1311
|
+
onPlumaClick(): void;
|
|
1258
1312
|
private showNotification;
|
|
1259
1313
|
private clearTimeouts;
|
|
1260
1314
|
getPointsText(points: number): string;
|
|
@@ -1263,6 +1317,20 @@ declare class PolitoNotificationComponent implements OnInit, OnDestroy {
|
|
|
1263
1317
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PolitoNotificationComponent, "dc-polito-notification", never, {}, {}, never, never, true, never>;
|
|
1264
1318
|
}
|
|
1265
1319
|
|
|
1320
|
+
declare class DcObserverInterventionComponent {
|
|
1321
|
+
private flowStateService;
|
|
1322
|
+
private sanitizer;
|
|
1323
|
+
customConfig?: IObserverConfig;
|
|
1324
|
+
private diConfig;
|
|
1325
|
+
intervention: _angular_core.Signal<_dataclouder_ngx_agent_cards.IInterventionState>;
|
|
1326
|
+
isActive: _angular_core.Signal<boolean>;
|
|
1327
|
+
config: _angular_core.Signal<IObserverConfig>;
|
|
1328
|
+
safeSvg: _angular_core.Signal<SafeHtml>;
|
|
1329
|
+
handleAcknowledge(): void;
|
|
1330
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DcObserverInterventionComponent, never>;
|
|
1331
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DcObserverInterventionComponent, "dc-observer-intervention", never, { "customConfig": { "alias": "customConfig"; "required": false; }; }, {}, never, never, true, never>;
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1266
1334
|
interface DCAgentFormSettings {
|
|
1267
1335
|
converseRoute?: any[] | ((entityId: string) => any[]);
|
|
1268
1336
|
}
|
|
@@ -1422,12 +1490,16 @@ declare class DcAgentCardConverseComponent implements OnInit, OnDestroy {
|
|
|
1422
1490
|
videoPlayerService: VideoPlayerNativeService;
|
|
1423
1491
|
agentCardId: string;
|
|
1424
1492
|
useNativePlayer: boolean;
|
|
1493
|
+
private _isConversationActive;
|
|
1494
|
+
set isConversationActive(val: boolean);
|
|
1495
|
+
get isConversationActive(): boolean;
|
|
1425
1496
|
readonly onStartConversation: _angular_core.OutputEmitterRef<IAgentCard>;
|
|
1426
1497
|
videoPlayerA: _angular_core.Signal<ElementRef<HTMLVideoElement>>;
|
|
1427
1498
|
videoPlayerB: _angular_core.Signal<ElementRef<HTMLVideoElement>>;
|
|
1428
1499
|
agentCard: _angular_core.WritableSignal<IAgentCard>;
|
|
1429
1500
|
showInfoLayer: _angular_core.WritableSignal<boolean>;
|
|
1430
1501
|
isTransparent: _angular_core.Signal<boolean>;
|
|
1502
|
+
isChatActive: _angular_core.Signal<boolean>;
|
|
1431
1503
|
constructor();
|
|
1432
1504
|
ngOnDestroy(): void;
|
|
1433
1505
|
ngOnInit(): Promise<void>;
|
|
@@ -1436,7 +1508,7 @@ declare class DcAgentCardConverseComponent implements OnInit, OnDestroy {
|
|
|
1436
1508
|
startConversation(): void;
|
|
1437
1509
|
toggleInfoLayer(): void;
|
|
1438
1510
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DcAgentCardConverseComponent, never>;
|
|
1439
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DcAgentCardConverseComponent, "dc-agent-card-converse", never, { "agentCardId": { "alias": "agentCardId"; "required": false; }; "useNativePlayer": { "alias": "useNativePlayer"; "required": false; }; }, { "onStartConversation": "onStartConversation"; }, never, never, true, never>;
|
|
1511
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DcAgentCardConverseComponent, "dc-agent-card-converse", never, { "agentCardId": { "alias": "agentCardId"; "required": false; }; "useNativePlayer": { "alias": "useNativePlayer"; "required": false; }; "isConversationActive": { "alias": "isConversationActive"; "required": false; }; }, { "onStartConversation": "onStartConversation"; }, never, never, true, never>;
|
|
1440
1512
|
}
|
|
1441
1513
|
|
|
1442
1514
|
declare class DcAgentCardDetailComponent extends EntityBaseDetailComponent<IAgentCard> {
|
|
@@ -1820,5 +1892,5 @@ declare class ChatEngineTestComponent {
|
|
|
1820
1892
|
|
|
1821
1893
|
declare const AGENT_CARDS_STATE_SERVICE: InjectionToken<MasterStateService<IAgentCard>>;
|
|
1822
1894
|
|
|
1823
|
-
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 };
|
|
1824
|
-
export type { Appearance, AudioGenerated, AudioStatus, BackgroundTask, CardTranslation, ChangePromptAction, CharacterCardData, ChatEvent, ConversationFlowFormGroup, ConversationSettingsFormGroup, DCAgentFormSettings, 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 };
|
|
1895
|
+
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, DcAgentCardConverseComponent, DcAgentCardDetailComponent, DcObserverInterventionComponent, 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 };
|
|
1896
|
+
export type { Appearance, AudioGenerated, AudioStatus, BackgroundTask, CardTranslation, ChangePromptAction, CharacterCardData, ChatEvent, ConversationFlowFormGroup, ConversationSettingsFormGroup, DCAgentFormSettings, 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, IInterventionState, IMoodState, IMoodStateRuntime, IObserverConfig, IRule, ISimpleAgent, ITTS, IVideoPlayerService, IWordMetadata, ModelFormGroup, ModelName, MultiLanguage, Persona, SimpleAgentTask, SimpleAgentTaskFormGroup, SimpleEvalResult, TextHTMLTag, TranscriptionsWhisper, TriggerTasksFormGroup, VoiceCloning, VoiceTTS, WordData };
|