connectbase-client 3.35.0 → 3.35.2

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/CHANGELOG.md CHANGED
@@ -3,6 +3,26 @@
3
3
  본 SDK 의 모든 주요 변경사항을 [Keep a Changelog](https://keepachangelog.com/ko/1.1.0/) 형식으로 기록합니다.
4
4
  버전은 [Semantic Versioning](https://semver.org/lang/ko/) 을 따릅니다.
5
5
 
6
+ ## [3.35.2] - 2026-06-22
7
+
8
+ ### Changed — 문서·타입 폴리시 (런타임 동작 변화 없음)
9
+
10
+ SDK 감사에서 발견된 문서·타입 정합성 개선. 공개 API 의 런타임 동작은 동일하다.
11
+
12
+ - **README AI Streaming 멀티프로바이더 정정** — "Gemini 전용" 프레이밍을 제거하고 실제 지원 프로바이더 6종(`gemini` / `openai` / `claude` / `ollama` / `lm_studio` / `openai_compatible`)을 반영. Stream Options 표의 `provider` 타입을 전체 union 으로 교체하고, `provider`/`model`/`temperature` 의 기본값은 SDK 가 강제하지 않고 서버측 앱 AI 설정에서 결정됨을 명시. 누락돼 있던 `mcpGroup` 옵션도 표에 추가.
13
+ - **`endpoint.pollUntil` predicate 타입 강화 (타입 전용)** — predicate 파라미터를 `(body: any, ...)` → **`(body: unknown, ...)`** 로 변경. 공개 표면에 남아 있던 유일한 `any` 를 제거하고 호출자에게 응답 narrowing 을 강제한다. 런타임 동작은 동일하며, JSDoc 예제도 `unknown` narrowing 방식으로 갱신.
14
+ - **JSDoc 정정** — `recent-calls.ts` 의 breadcrumb 저장 정책 주석이 "쿼리 키 선별 redact" 라 적혀 있었으나 실제 구현은 쿼리스트링을 통째로 strip(더 안전)하므로 주석을 구현에 맞게 정정. `http.ts` 의 stale 참조 `client.support.getRecentCalls()` → `client.support.getRecentApiCalls()` 정정.
15
+
16
+ ## [3.35.1] - 2026-06-19
17
+
18
+ ### Changed — 내부 하드닝 (공개 API 동작 변화 없음)
19
+
20
+ 프론트엔드 감사에서 발견된 SDK 내부 타입·안전성 개선. 공개 API 시그니처와 런타임 동작은 동일하다.
21
+
22
+ - **`HttpClient.getAppId()` 공개 접근자 추가** — `database` API 의 `requireAppId()` 가 `(this.http as unknown as { config })` 로 private 필드를 침투하던 cast 를 제거하고 정식 접근자를 사용.
23
+ - **토큰 응답 검증 가드 추가** — `signUpMember`/게스트 재발급/신규 게스트 로그인의 `setTokens` 호출 전에 `assertShape({ access_token, refresh_token, ... })` 검증을 추가(기존 `signInMember`/`getMe` 와 동일 패턴). 정상 응답은 그대로 동작하며, 서버가 잘못된 토큰 응답을 줄 때만 조용히 잘못된 토큰을 저장하지 않고 throw 한다.
24
+ - **타입 안전성** — analytics 의 `(window as any)`/`(navigator as any)` 를 좁은 인터페이스(`VisitorTrackerBridge`/`NavigatorWithGPC`)로 교체. 런타임 동작 무변화.
25
+
6
26
  ## [3.35.0] - 2026-06-17
7
27
 
8
28
  ### Fixed — doc-audit 발견 SDK/서버 계약 버그 (퍼블리시 전엔 미동작이던 기능 정상화)
package/README.md CHANGED
@@ -113,7 +113,7 @@ try {
113
113
  - **Push Notifications**: Cross-platform push notification support
114
114
  - **WebRTC**: Real-time audio/video communication
115
115
  - **Payments**: Subscription and one-time payment support
116
- - **AI Streaming**: Real-time AI text generation via WebSocket (Gemini)
116
+ - **AI Streaming**: Real-time AI text generation via WebSocket (multi-provider: Gemini, OpenAI, Claude, Ollama, LM Studio, OpenAI-compatible)
117
117
  - **Knowledge Base (RAG)**: Document indexing + BM25 search with nori 한국어 형태소. PDF / DOCX / text file upload via `addDocumentFromFile`
118
118
  - **Endpoint**: Call your own GPU models on your own PC through one `cb_pk_*` key — ConnectBase forwards the payload as-is (dumb pipe)
119
119
  - **Support**: End-user feedback/issue reporting — users send issues to app operators, AI auto-classifies summary/urgency/category
@@ -959,7 +959,10 @@ const unsubTyping = await cb.realtime.onTypingChange('room-id', (typing) => {
959
959
 
960
960
  #### AI Streaming
961
961
 
962
- Real-time AI text generation using Gemini API through WebSocket.
962
+ Real-time AI text generation through WebSocket. The provider and model are
963
+ resolved from your app's AI config on the server; you can optionally override
964
+ them per request (`provider` / `model`). Supported providers: Gemini, OpenAI,
965
+ Claude, Ollama, LM Studio, and any OpenAI-compatible endpoint.
963
966
 
964
967
  ```typescript
965
968
  // Connect first
@@ -987,9 +990,11 @@ const session = await cb.realtime.stream(
987
990
  }
988
991
  },
989
992
  {
990
- model: 'gemini-2.0-flash', // Optional: default is gemini-2.0-flash
991
- temperature: 0.7, // Optional: 0.0-2.0, default 0.7
992
- maxTokens: 1000 // Optional: max output tokens
993
+ // All fields optional. When omitted, the server uses your app's AI config.
994
+ provider: 'openai', // Optional: override the app's configured provider
995
+ model: 'gpt-4o', // Optional: override the app's configured model
996
+ temperature: 0.7, // Optional: 0.0-2.0
997
+ maxTokens: 1000 // Optional: max output tokens
993
998
  }
994
999
  )
995
1000
 
@@ -997,16 +1002,17 @@ const session = await cb.realtime.stream(
997
1002
  await session.stop()
998
1003
  ```
999
1004
 
1000
- **Stream Options:**
1005
+ **Stream Options:** (all optional — defaults are resolved server-side from your app's AI config, not by the SDK)
1001
1006
  | Option | Type | Default | Description |
1002
1007
  |--------|------|---------|-------------|
1003
- | `provider` | `'gemini'` | `'gemini'` | AI provider |
1004
- | `model` | `string` | `'gemini-2.0-flash'` | Model name |
1008
+ | `provider` | `'gemini' \| 'openai' \| 'claude' \| 'ollama' \| 'lm_studio' \| 'openai_compatible'` | app config | Override the app's configured AI provider |
1009
+ | `model` | `string` | app config | Override the app's configured model |
1005
1010
  | `system` | `string` | - | System prompt |
1006
- | `temperature` | `number` | `0.7` | Creativity (0.0-2.0) |
1011
+ | `temperature` | `number` | app config | Creativity (0.0-2.0) |
1007
1012
  | `maxTokens` | `number` | - | Max output tokens |
1008
1013
  | `sessionId` | `string` | auto | Session tracking ID |
1009
1014
  | `metadata` | `object` | - | Custom metadata |
1015
+ | `mcpGroup` | `string` | - | MCP group slug — enables AI Agent mode (registered MCP server tools) |
1010
1016
 
1011
1017
  **Stream Result (onDone):**
1012
1018
  | Field | Type | Description |