mesauth-angular 1.24.0 → 1.25.1

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": "mesauth-angular",
3
- "version": "1.24.0",
3
+ "version": "1.25.1",
4
4
  "description": "Angular helper library to connect to a backend API and SignalR hub to surface the current logged-in user and incoming notifications with dark/light theme support",
5
5
  "keywords": [
6
6
  "angular",
@@ -162,6 +162,11 @@ declare class MesAuthService {
162
162
  readonly notifications$: Observable<any>;
163
163
  private readonly _approvalEvents;
164
164
  readonly approvalEvents$: Observable<any>;
165
+ /** Fires when the notification list was modified externally (e.g. AI marked-all-read). */
166
+ private readonly _notificationsModified;
167
+ readonly notificationsModified$: Observable<void>;
168
+ /** Called by AI client tools after any notification-mutating action. */
169
+ signalNotificationsModified(): void;
165
170
  private apiBase;
166
171
  private config;
167
172
  private http;
@@ -620,7 +625,12 @@ interface ChatToolEvent {
620
625
  name: string;
621
626
  side: 'server' | 'client';
622
627
  status: 'running' | 'ok' | 'error' | 'awaiting-approval' | 'declined';
628
+ /** Short plain-English label shown next to the tool name in the chip. */
623
629
  summary?: string;
630
+ /** Pretty-printed full result (typically JSON). When present, the chip is expandable. */
631
+ detail?: string;
632
+ /** UI-only: whether the detail panel under this chip is currently open. */
633
+ expanded?: boolean;
624
634
  args?: any;
625
635
  readOnly?: boolean;
626
636
  }
@@ -669,6 +679,12 @@ interface AiUserLesson {
669
679
  createdAt: string;
670
680
  updatedAt: string;
671
681
  }
682
+ /** A question the AI is asking the user via the ask_user tool (pauses the orchestrator loop). */
683
+ interface PendingQuestion {
684
+ callId: string;
685
+ message: string;
686
+ options?: string[];
687
+ }
672
688
  /** Stream event types matching MesAuth.Api's AiStreamEvent JSON. */
673
689
  type AiSseEvent = {
674
690
  type: 'session';
@@ -688,6 +704,7 @@ type AiSseEvent = {
688
704
  id: string;
689
705
  ok: boolean;
690
706
  summary?: string;
707
+ detail?: string;
691
708
  } | {
692
709
  type: 'client_tool_call';
693
710
  id: string;
@@ -708,6 +725,7 @@ interface PendingApproval {
708
725
  args: any;
709
726
  side: 'client';
710
727
  }
728
+
711
729
  /**
712
730
  * Drives the chat panel.
713
731
  *
@@ -722,6 +740,8 @@ declare class MaAiService {
722
740
  readonly streaming: _angular_core.WritableSignal<boolean>;
723
741
  /** When non-null, a write-class client tool is awaiting user confirmation. */
724
742
  readonly pendingApproval: _angular_core.WritableSignal<PendingApproval>;
743
+ /** When non-null, the AI called ask_user and is waiting for the user's answer. */
744
+ readonly pendingQuestion: _angular_core.WritableSignal<PendingQuestion>;
725
745
  readonly lastError: _angular_core.WritableSignal<string>;
726
746
  private sessionId;
727
747
  /** Verbs the user already chose "always approve" for in this session. */
@@ -734,6 +754,10 @@ declare class MaAiService {
734
754
  resetSession(): void;
735
755
  /** Cancel the in-flight stream (if any). The session id is preserved so the user can resume. */
736
756
  cancel(): void;
757
+ /** Send the user's answer to a pending ask_user question back to the orchestrator. */
758
+ resolveQuestion(answer: string): Promise<void>;
759
+ /** Toggle the expanded/collapsed state of a tool chip with detail content. */
760
+ toggleToolExpanded(callId: string): void;
737
761
  /** User typed and submitted a message. */
738
762
  send(text: string, currentRoute?: string): Promise<void>;
739
763
  /**
@@ -752,7 +776,11 @@ declare class MaAiService {
752
776
  private markToolStatus;
753
777
  private finalizeAssistant;
754
778
  private verbOf;
779
+ /** Short plain-English label for the chip — never raw JSON. */
755
780
  private summarize;
781
+ private summarizeJson;
782
+ /** Pretty-printed JSON for the expandable panel; null when content isn't JSON. */
783
+ private prettyDetail;
756
784
  private uid;
757
785
  /** GET /ai/conversations — list this user's past conversations (most recent first). */
758
786
  listConversations(take?: number): Promise<AiConversationSummary[]>;
@@ -805,8 +833,10 @@ declare class MaAiChatPanelComponent implements AfterViewInit, OnDestroy {
805
833
  readonly messages: _angular_core.WritableSignal<mesauth_angular.ChatBubble[]>;
806
834
  readonly streaming: _angular_core.WritableSignal<boolean>;
807
835
  readonly pendingApproval: _angular_core.WritableSignal<mesauth_angular.PendingApproval>;
836
+ readonly pendingQuestion: _angular_core.WritableSignal<mesauth_angular.PendingQuestion>;
808
837
  readonly lastError: _angular_core.WritableSignal<string>;
809
838
  readonly hasMessages: _angular_core.Signal<boolean>;
839
+ readonly questionInput: _angular_core.WritableSignal<string>;
810
840
  private isDragging;
811
841
  private dragStartX;
812
842
  private dragStartWidth;
@@ -827,6 +857,9 @@ declare class MaAiChatPanelComponent implements AfterViewInit, OnDestroy {
827
857
  approve(): void;
828
858
  alwaysApprove(): void;
829
859
  decline(): void;
860
+ answerQuestion(answer: string): void;
861
+ onToolChipClick(t: ChatToolEvent): void;
862
+ submitQuestionInput(): void;
830
863
  startResize(ev: PointerEvent): void;
831
864
  onResizeMove(ev: PointerEvent): void;
832
865
  endResize(ev: PointerEvent): void;
@@ -1140,7 +1173,7 @@ interface MaUiManifest {
1140
1173
  quickPrompts?: string[];
1141
1174
  }
1142
1175
  /** Current installed package version — keep in sync with package.json. */
1143
- declare const PACKAGE_VERSION = "1.24.0";
1176
+ declare const PACKAGE_VERSION = "1.25.1";
1144
1177
  /**
1145
1178
  * Provides server-driven UI configuration loaded from the hosted manifest.
1146
1179
  * Components read `labels()` and `features()` signals instead of hardcoded strings.
@@ -1438,4 +1471,4 @@ declare class MaAiMarkdownPipe implements PipeTransform {
1438
1471
  declare function renderMarkdown(src: string): string;
1439
1472
 
1440
1473
  export { ALL_ACTIONS, AVATAR_FRAMES, ApprovalActionType, ApprovalDocumentStatus, ApprovalStepMode, ApprovalStepStatus, DEFAULT_AI_CONFIG, MES_AUTH_AI_CONFIG, MES_AUTH_CONFIG, MaAiButtonComponent, MaAiChatPanelComponent, MaAiHistoryListComponent, MaAiLessonsEditorComponent, MaAiMarkdownPipe, MaAiService, MaAiToolsRegistry, MaApprovalPanelComponent, MaApprovalService, MaArvContainerComponent, MaAvatarComponent, MaIconComponent, MaThemeDirective, MaUiConfigService, MaUserComponent, MaUserMenuColor, MaUserMenuComponent, MaUserXComponent, MesAuthModule, MesAuthService, NotificationBadgeComponent, NotificationPanelComponent, NotificationType, PACKAGE_VERSION, ThemeService, ToastContainerComponent, ToastService, UserProfileComponent, extractXMaPerm, mesAuthInterceptor, provideMesAuth, provideMesAuthAi, renderMarkdown, runReturnViaPostMessageIfRequested, runSsoCheckHandshake, withXMaPerm, xMaResource };
1441
- export type { AiConversationDetail, AiConversationSummary, AiSseEvent, AiStoredMessage, AiStoredToolCall, AiUserLesson, ApprovalDashboardDto, ApprovalDocumentDto, ApprovalDocumentSummaryDto, ApprovalHistoryDto, ApprovalReferenceDto, ApprovalStepDto, ApprovalStepRequest, ApprovalSubmitResult, ApprovalTemplateDto, ApprovalTemplateStepDto, ApprovalTemplateSummaryDto, ApproveRejectRequest, AvatarFrameDef, AvatarShape, AvatarSize, ChatBubble, ChatToolEvent, ClientTool, ClientToolSchema, CreateApprovalRequest, CreateApprovalResponseDto, CreateApprovalTemplateRequest, DelegateRequest, FrontEndRoute, IUser, MaAiPanelMode, MaUiManifest, MesAuthAiConfig, MesAuthConfig, NotificationDto, PagedList, PendingApproval, PermissionHeader, RealTimeNotificationDto, RequestConfig, RolePreviewUserDto, StepRoleDto, Theme, Toast, UpdateApprovalTemplateRequest, UserFrontEndRoutesGrouped };
1474
+ export type { AiConversationDetail, AiConversationSummary, AiSseEvent, AiStoredMessage, AiStoredToolCall, AiUserLesson, ApprovalDashboardDto, ApprovalDocumentDto, ApprovalDocumentSummaryDto, ApprovalHistoryDto, ApprovalReferenceDto, ApprovalStepDto, ApprovalStepRequest, ApprovalSubmitResult, ApprovalTemplateDto, ApprovalTemplateStepDto, ApprovalTemplateSummaryDto, ApproveRejectRequest, AvatarFrameDef, AvatarShape, AvatarSize, ChatBubble, ChatToolEvent, ClientTool, ClientToolSchema, CreateApprovalRequest, CreateApprovalResponseDto, CreateApprovalTemplateRequest, DelegateRequest, FrontEndRoute, IUser, MaAiPanelMode, MaUiManifest, MesAuthAiConfig, MesAuthConfig, NotificationDto, PagedList, PendingApproval, PendingQuestion, PermissionHeader, RealTimeNotificationDto, RequestConfig, RolePreviewUserDto, StepRoleDto, Theme, Toast, UpdateApprovalTemplateRequest, UserFrontEndRoutesGrouped };