max-agent-ui 0.0.37 → 0.0.39

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
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { InjectionToken, OnInit, EventEmitter, DestroyRef } from '@angular/core';
2
+ import { InjectionToken, OnInit, DoCheck, EventEmitter, DestroyRef } from '@angular/core';
3
3
  import { HttpClient } from '@angular/common/http';
4
4
  import { Observable } from 'rxjs';
5
5
 
@@ -30,7 +30,7 @@ interface AssistantConfirmation {
30
30
  }
31
31
  interface AssistantAnalyticsPage {
32
32
  offset: number;
33
- pageSize: 250;
33
+ pageSize: 100;
34
34
  }
35
35
  interface AssistantStructuredAction {
36
36
  capabilityKey: string;
@@ -275,7 +275,7 @@ interface AssistantResponseTable {
275
275
  interface AssistantResponseTablePagination {
276
276
  query: string;
277
277
  offset: number;
278
- pageSize: 250;
278
+ pageSize: 100;
279
279
  totalRecords: number;
280
280
  totalRecordsExact?: boolean;
281
281
  returnedRecords: number;
@@ -344,6 +344,8 @@ interface AssistantFeedbackResponse {
344
344
  submittedAt: string;
345
345
  }
346
346
  interface AssistantChatRequest {
347
+ conversationStateVersion?: 1;
348
+ conversationState?: string;
347
349
  message: string;
348
350
  stream?: boolean;
349
351
  conversationId?: string;
@@ -357,22 +359,28 @@ interface AssistantChatRequest {
357
359
  }
358
360
  interface AssistantChatProgress {
359
361
  type: 'progress';
360
- stage: 'request' | 'intent_projection' | 'embedding' | 'capability_routing' | 'argument_extraction' | 'api_call' | 'action' | 'response';
362
+ stage: 'request' | 'authorization' | 'intent_projection' | 'embedding' | 'capability_routing' | 'argument_extraction' | 'api_call' | 'action' | 'response';
361
363
  message: string;
362
364
  }
363
365
  interface AssistantChatDelta {
364
366
  type: 'delta';
365
367
  delta: string;
366
368
  }
367
- type AssistantChatActivity = AssistantChatProgress | AssistantChatDelta;
369
+ interface AssistantChatData {
370
+ type: 'data';
371
+ data: Pick<AssistantChatResponse, 'displayResponse' | 'cards'>;
372
+ }
373
+ type AssistantChatActivity = AssistantChatProgress | AssistantChatDelta | AssistantChatData;
368
374
  type AssistantChatStreamEvent = AssistantChatActivity | {
369
375
  type: 'result';
370
376
  response: AssistantChatResponse;
371
377
  } | {
372
378
  type: 'error';
373
379
  message: string;
380
+ code?: string;
374
381
  };
375
382
  interface AssistantChatResponse {
383
+ conversationState?: string;
376
384
  answer: string;
377
385
  conversationId: string;
378
386
  product: string;
@@ -434,6 +442,8 @@ interface AssistantMessage {
434
442
  actionDecision?: AssistantConfirmation['decision'];
435
443
  capabilityKey?: string;
436
444
  isError?: boolean;
445
+ isOffline?: boolean;
446
+ isAccessUnavailable?: boolean;
437
447
  isStreaming?: boolean;
438
448
  processingUpdates?: AssistantChatProgress[];
439
449
  streamingContent?: string;
@@ -446,6 +456,9 @@ interface AssistantBootstrapConfig {
446
456
  }
447
457
 
448
458
  interface MaxAssistantConfig {
459
+ /** Per-request transient state supplied by the assistant, never persisted by the host. */
460
+ conversationStateVersion?: 1;
461
+ conversationState?: string;
449
462
  apiBaseUrl?: string;
450
463
  assistantApiUrl?: string;
451
464
  app?: AssistantProduct;
@@ -495,13 +508,9 @@ declare class MaxAssistantFeedbackService {
495
508
 
496
509
  declare class MaxAssistantExportService {
497
510
  exportTableToExcel(table: AssistantResponseTable): Promise<void>;
498
- exportVisualisationToPdf(visualisation: AssistantVisualisation): Promise<void>;
499
- private chartTotal;
500
- private chartTypeLabel;
511
+ exportVisualisationToPdf(visualisation: AssistantVisualisation, visualisationElement: HTMLElement): Promise<void>;
501
512
  private toExportCellValue;
502
513
  private exportFileName;
503
- private fallbackColor;
504
- private pdfColor;
505
514
  private downloadFile;
506
515
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantExportService, never>;
507
516
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantExportService>;
@@ -538,6 +547,10 @@ declare const ASSISTANT_UI_COPY: {
538
547
  placeholder: string;
539
548
  startingMessage: string;
540
549
  errorMessage: string;
550
+ offlineTitle: string;
551
+ accessUnavailableTitle: string;
552
+ accessUnavailableMessage: string;
553
+ offlineMessage: string;
541
554
  };
542
555
  interface SupportTicketFormValue {
543
556
  name: string;
@@ -558,13 +571,14 @@ interface AssistantEntitySuggestionOption extends AssistantSuggestionOption {
558
571
  presentation: 'person_card' | 'entity_tag';
559
572
  entity: AssistantSuggestionEntity;
560
573
  }
561
- declare class MaxAssistantComponent implements OnInit {
574
+ declare class MaxAssistantComponent implements OnInit, DoCheck {
562
575
  private readonly assistantService;
563
576
  private readonly exportService;
564
577
  private readonly feedbackService;
565
578
  private readonly supportService;
566
579
  private readonly destroyRef;
567
580
  private readonly defaultConfig;
581
+ private readonly sessionState;
568
582
  private messagesViewport?;
569
583
  private activeTurnAnchorMessageId?;
570
584
  private scrollToLatestTimer?;
@@ -609,6 +623,9 @@ declare class MaxAssistantComponent implements OnInit {
609
623
  protected supportTicketForm: SupportTicketFormValue;
610
624
  constructor(assistantService: MaxAssistantService, exportService: MaxAssistantExportService, feedbackService: MaxAssistantFeedbackService, supportService: MaxAssistantSupportService, destroyRef: DestroyRef, defaultConfig: MaxAssistantConfig);
611
625
  ngOnInit(): void;
626
+ ngDoCheck(): void;
627
+ resetSession(): void;
628
+ protected onPageHide(): void;
612
629
  focusComposer(): void;
613
630
  protected get uiCopy(): typeof ASSISTANT_UI_COPY;
614
631
  protected get bootstrapConfig(): AssistantBootstrapConfig;
@@ -654,6 +671,7 @@ declare class MaxAssistantComponent implements OnInit {
654
671
  protected getTableRowActions(table: AssistantResponseTable, rowIndex: number): AssistantResponseTableAction[];
655
672
  protected useTableAction(action: AssistantResponseTableAction): void;
656
673
  protected resolvePendingAction(message: AssistantMessage, decision: AssistantConfirmation['decision']): void;
674
+ private createErrorMessage;
657
675
  private resolveErrorMessage;
658
676
  protected onComposerKeydown(event: KeyboardEvent): void;
659
677
  protected isDetailsVisible(messageId: string): boolean;
@@ -668,7 +686,7 @@ declare class MaxAssistantComponent implements OnInit {
668
686
  protected isTablePageLoading(messageId: string, tableIndex: number): boolean;
669
687
  protected tablePageError(messageId: string, tableIndex: number): string | undefined;
670
688
  protected exportTable(table: AssistantResponseTable): void;
671
- protected exportVisualisation(visualisation: AssistantVisualisation): void;
689
+ protected exportVisualisation(visualisation: AssistantVisualisation, visualisationElement: HTMLElement): void;
672
690
  protected chartType(visualisation: AssistantVisualisation): 'bar' | 'line' | 'doughnut' | 'pie' | 'radar' | 'polarArea';
673
691
  protected chartData(visualisation: AssistantVisualisation): {
674
692
  labels: string[];
@@ -768,4 +786,4 @@ declare class MaxAgentShiftCardComponent {
768
786
  }
769
787
 
770
788
  export { MAX_ASSISTANT_CONFIG, MaxAgentEntityOptionComponent, MaxAgentShiftCardComponent, MaxAssistantComponent, MaxAssistantFeedbackService, MaxAssistantService, MaxAssistantSupportService };
771
- export type { AssistantAnalyticsPage, AssistantApiCall, AssistantCard, AssistantChatActivity, AssistantChatDelta, AssistantChatProgress, AssistantChatRequest, AssistantChatResponse, AssistantChatStreamEvent, AssistantConfirmation, AssistantContextResolution, AssistantConversationMessage, AssistantDeveloperTrace, AssistantDisplayResponse, AssistantExtractedIntent, AssistantFeedbackCategory, AssistantFeedbackRequest, AssistantFeedbackResponse, AssistantFieldMap, AssistantFieldValue, AssistantHelpGuide, AssistantHelpIcon, AssistantHostAction, AssistantMessage, AssistantPendingAction, AssistantProduct, AssistantRequestContext, AssistantResponseTable, AssistantResponseTableAction, AssistantResponseTableColumn, AssistantResponseTablePagination, AssistantRotaCalendar, AssistantSearchResult, AssistantSelectableEntity, AssistantShiftCard, AssistantShiftCardGroup, AssistantSource, AssistantStructuredAction, AssistantSuggestion, AssistantSuggestionEntity, AssistantSuggestionOption, AssistantSupportSeverity, AssistantSupportTag, AssistantSupportTagSeverity, AssistantSupportTicketRequest, AssistantSupportTicketResponse, AssistantToolExecution, AssistantTraceControl, AssistantTraceStep, AssistantTraceStepCategory, AssistantTraceStepMetadata, AssistantTraceStepStatus, AssistantTraceTechnology, AssistantUser, AssistantVisualisation, AssistantVisualisationDataset, AssistantVisualisationType, MaxAgentShiftCardVariant, MaxAssistantConfig };
789
+ export type { AssistantAnalyticsPage, AssistantApiCall, AssistantCard, AssistantChatActivity, AssistantChatData, AssistantChatDelta, AssistantChatProgress, AssistantChatRequest, AssistantChatResponse, AssistantChatStreamEvent, AssistantConfirmation, AssistantContextResolution, AssistantConversationMessage, AssistantDeveloperTrace, AssistantDisplayResponse, AssistantExtractedIntent, AssistantFeedbackCategory, AssistantFeedbackRequest, AssistantFeedbackResponse, AssistantFieldMap, AssistantFieldValue, AssistantHelpGuide, AssistantHelpIcon, AssistantHostAction, AssistantMessage, AssistantPendingAction, AssistantProduct, AssistantRequestContext, AssistantResponseTable, AssistantResponseTableAction, AssistantResponseTableColumn, AssistantResponseTablePagination, AssistantRotaCalendar, AssistantSearchResult, AssistantSelectableEntity, AssistantShiftCard, AssistantShiftCardGroup, AssistantSource, AssistantStructuredAction, AssistantSuggestion, AssistantSuggestionEntity, AssistantSuggestionOption, AssistantSupportSeverity, AssistantSupportTag, AssistantSupportTagSeverity, AssistantSupportTicketRequest, AssistantSupportTicketResponse, AssistantToolExecution, AssistantTraceControl, AssistantTraceStep, AssistantTraceStepCategory, AssistantTraceStepMetadata, AssistantTraceStepStatus, AssistantTraceTechnology, AssistantUser, AssistantVisualisation, AssistantVisualisationDataset, AssistantVisualisationType, MaxAgentShiftCardVariant, MaxAssistantConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "max-agent-ui",
3
- "version": "0.0.37",
3
+ "version": "0.0.39",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },