@vibexnpm/talkx 2.3.1 → 2.5.0

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/dist/index.d.ts CHANGED
@@ -378,6 +378,7 @@ export const WebSocketPaths: {
378
378
  getChatDestination(roomId: string): string;
379
379
  getChatReadDestination(roomId: string): string;
380
380
  getChatTypingDestination(roomId: string): string;
381
+ getChatAssistantStreamDestination(roomId: string): string;
381
382
  readonly ROOM_LIST_USER_DESTINATION: string;
382
383
  getWebRTCDestination(roomId: string): string;
383
384
  getWebRTCUserDestination(): string;
@@ -735,6 +736,42 @@ export interface TypingEvent {
735
736
  senderType: 'USER' | 'ASSISTANT';
736
737
  }
737
738
 
739
+ /**
740
+ * AI 진행 표시 이벤트 — `/topic/chat/{roomId}/assistant-stream` 의 PHASE/DONE.
741
+ *
742
+ * typing 과 별개의 가산 UX 레이어(설계 ASSISTANT_PROGRESS_STREAMING_DESIGN.md). 서버가 typing 도 이중발행하므로
743
+ * 구버전 SDK 는 본 이벤트를 못 받아도 기존 typing 으로 정상 동작한다. UI 는 `active:true` 면 `label`(또는 `phase`)
744
+ * 로 단계를 표시하고, `active:false`(DONE·어시 메시지 도착·TTL 만료) 면 해제한다.
745
+ *
746
+ * 현재는 PM_BACKSTAGE(방당 단일 PM) 만 phase 를 발행 — 멘션/버튼/14인 경로는 본 이벤트 없이 typing 만.
747
+ */
748
+ export interface AssistantProgressEvent {
749
+ /** 채팅방 ID. */
750
+ roomId: string;
751
+ /** 어시 응답 1회분 식별(멀티 응답/중복 dedup). 일부 종료 emit 에선 null. */
752
+ streamId: string | null;
753
+ /** 진행 주체 페르소나 ID. */
754
+ personaId: string | null;
755
+ /** 진행 단계 — `active:true` 일 때. 종료 시 null. */
756
+ phase: 'THINKING' | 'SEARCHING' | 'PLANNING' | 'WRITING' | null;
757
+ /** phase 의 기본 표시 라벨(예: "생각 중…"). SDK 매핑 — 커스텀하려면 `phase` 사용. 종료 시 null. */
758
+ label: string | null;
759
+ /** true=진행중(PHASE/DELTA) / false=종료(DONE·메시지 도착·TTL). */
760
+ active: boolean;
761
+ /** 토큰 스트림 누적 텍스트(B) — DELTA 수신 시 지금까지 모인 전체. 버블에 그대로 렌더. PHASE-only/종료 시 null. */
762
+ text?: string | null;
763
+ /** 이번 토큰 청크(B) — append 렌더를 선호할 때. DELTA 수신 시만. */
764
+ delta?: string | null;
765
+ /** 토큰 청크 순서/누락 감지(B) — DELTA 수신 시만. */
766
+ seq?: number | null;
767
+ /** 종료(DONE) 결과 — DONE 수신 시만. */
768
+ status?: 'SUCCEEDED' | 'FAILED' | 'CANCELLED' | 'TIMEOUT' | null;
769
+ /** 종료(DONE, SUCCEEDED) 시 영속된 최종 메시지 ID. */
770
+ messageId?: string | null;
771
+ /** 종료 사유 — 'message'(어시 메시지 도착) / 'timeout'(TTL). DONE 수신 해제엔 없음. */
772
+ reason?: 'message' | 'timeout' | null;
773
+ }
774
+
738
775
  // ============================================================================
739
776
  // Options — constructor & method
740
777
  // ============================================================================
@@ -1056,7 +1093,7 @@ export interface RetentionCleanupPayload {
1056
1093
  * TalkFlowClient 이벤트 맵 — 런타임 {@code TalkFlowClient.js} 의 {@code this.emit(...)} 호출 기반.
1057
1094
  *
1058
1095
  * <p><b>Connection 관련</b>: stateChange, connected, disconnected, reconnecting, connectionError, tokenSet, loggedOut</p>
1059
- * <p><b>Chat 관련 (ChatClient 이벤트를 이 이름으로 re-emit)</b>: chatMessage, newChatMessage, messageUpdated, messageDeleted, reactionChanged, linkPreviewAttached, messageRead, typing, memberJoined, memberLeft, roomSubscribed, roomUnsubscribed, roomListSubscribed, roomListUnsubscribed, roomListUpdate, roomListMessage, roomListCreated, roomListJoined, roomListLeft, roomListSelfLeft, roomListRoomUpdated, retentionCleanup</p>
1096
+ * <p><b>Chat 관련 (ChatClient 이벤트를 이 이름으로 re-emit)</b>: chatMessage, newChatMessage, messageUpdated, messageDeleted, reactionChanged, linkPreviewAttached, messageRead, typing, assistantProgress, memberJoined, memberLeft, roomSubscribed, roomUnsubscribed, roomListSubscribed, roomListUnsubscribed, roomListUpdate, roomListMessage, roomListCreated, roomListJoined, roomListLeft, roomListSelfLeft, roomListRoomUpdated, retentionCleanup</p>
1060
1097
  * <p><b>Push 관련</b>: pushEnabled, pushFailed, pushNotification</p>
1061
1098
  * <p><b>WebRTC 관련</b>: localStreamStarted, localStreamStopped, remoteTrack, screenShareStarted, screenShareEnded, deviceChange, mediaStateChanged, callStarted, callEnded, callRequested, callAccepted, callRejected, callCancelled, callInvitation, callBusy, incomingCall, incomingCallWhileBusy, userJoined, userLeft, participantLeft, participantMediaState, peerConnected, peerDisconnected, peerClosed, webrtcError</p>
1062
1099
  */
@@ -1085,6 +1122,7 @@ export interface TalkFlowClientEvents {
1085
1122
  messageTranslated: ChatMessageReceivedPayload;
1086
1123
  messageRead: MessageReadEventPayload;
1087
1124
  typing: TypingEvent;
1125
+ assistantProgress: AssistantProgressEvent;
1088
1126
  memberJoined: MemberChangePayload;
1089
1127
  memberLeft: MemberChangePayload;
1090
1128
  roomSubscribed: { roomId: string };
@@ -1198,6 +1236,7 @@ export interface ChatClientEvents {
1198
1236
  retentionCleanup: RetentionCleanupPayload;
1199
1237
  messageRead: MessageReadEventPayload;
1200
1238
  typing: TypingEvent;
1239
+ assistantProgress: AssistantProgressEvent;
1201
1240
  }
1202
1241
 
1203
1242
  /**