@vibexnpm/talkx 3.1.0 → 3.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibexnpm/talkx",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "type": "module",
5
5
  "description": "TalkFlow SDK - Chat & WebRTC unified client",
6
6
  "main": "dist/talkflow-sdk.umd.js",
@@ -11,6 +11,13 @@ import { WebSocketPaths, LogLevel, RoomListEventType, ChatRoomType, DefaultConfi
11
11
 
12
12
  const MAX_FILES_PER_MESSAGE = 20;
13
13
 
14
+ /**
15
+ * 방 PM 프롬프트 레이어 본문 한도.
16
+ * 서버 도메인 상수(PmPromptLayer.ROOM_CONTENT_MAX)의 미러 — 서버가 바뀌면 여기도 함께 올려야 한다.
17
+ * 값이 뒤처지면 서버는 받아주는데 SDK 가 먼저 막아 "저장이 안 된다"로 보인다.
18
+ */
19
+ const MAX_ROOM_PM_PROMPT_LENGTH = 20000;
20
+
14
21
  class ChatClient extends EventEmitter {
15
22
  /**
16
23
  * @param {Object} options
@@ -643,11 +650,11 @@ class ChatClient extends EventEmitter {
643
650
  /**
644
651
  * 방 PM 프롬프트 레이어 등록/수정 (upsert) — <b>방 주인(OWNER) 전용</b>.
645
652
  *
646
- * <p>저장 시 새 버전이 자동 기록된다 ({@link #getRoomPmPromptVersions}). 본문 한도 2,000자.
653
+ * <p>저장 시 새 버전이 자동 기록된다 ({@link #getRoomPmPromptVersions}). 본문 한도 20,000자.
647
654
  * 비주인 호출은 403 ({@code NOT_ROOM_ADMIN}).</p>
648
655
  *
649
656
  * @param {string} roomId - 채팅방 ID
650
- * @param {string} content - 레이어 본문 (1~2,000자). 방의 목적/맥락/금지사항 등 PM 에게 줄 추가 지시문.
657
+ * @param {string} content - 레이어 본문 (1~20,000자). 방의 목적/맥락/금지사항 등 PM 에게 줄 추가 지시문.
651
658
  * @returns {Promise<Object>} 저장된 PmPromptLayer
652
659
  *
653
660
  * @example
@@ -657,8 +664,8 @@ class ChatClient extends EventEmitter {
657
664
  if (typeof content !== 'string' || !content.trim()) {
658
665
  throw new Error('upsertRoomPmPrompt requires non-blank content');
659
666
  }
660
- if (content.length > 2000) {
661
- throw new Error('upsertRoomPmPrompt content exceeds 2000 characters');
667
+ if (content.length > MAX_ROOM_PM_PROMPT_LENGTH) {
668
+ throw new Error(`upsertRoomPmPrompt content exceeds ${MAX_ROOM_PM_PROMPT_LENGTH} characters`);
662
669
  }
663
670
 
664
671
  const response = await this.apiClient.put(`/api/v1/rooms/${roomId}/pm-prompt`, { content });
@@ -1756,7 +1763,7 @@ class ChatClient extends EventEmitter {
1756
1763
  *
1757
1764
  * @param {string} roomId - 채팅방 ID
1758
1765
  * @param {string} messageId - 메시지 ID
1759
- * @param {string} message - 수정할 내용 (max 5000자)
1766
+ * @param {string} message - 수정할 내용 (max 20000자)
1760
1767
  * @returns {Promise<Object>}
1761
1768
  *
1762
1769
  * @example