connectbase-client 3.17.2 → 3.19.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/CHANGELOG.md CHANGED
@@ -3,6 +3,45 @@
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.19.0] - 2026-05-22
7
+
8
+ ### Added — AI 추론(reasoning) 스트리밍 (`chatStream` 의 `onReasoning`)
9
+
10
+ 추론형 모델의 추론 과정을 스트리밍으로 받는 `onReasoning` 콜백을 `cb.ai.chatStream` 에
11
+ 추가했다. 게이트웨이가 업스트림(openai 계열)의 `delta.reasoning` 을 토큰 청크의
12
+ `reasoning` 필드로 중계한다. 추론 델타는 본문(`content`)이 비어 있어 `onReasoning` 을
13
+ 쓰지 않는 구형 코드에는 영향이 없다 (하위호환).
14
+
15
+ ### Added — Agentic 검색 수행 신호 (`KnowledgeSearchResponse.agentic`)
16
+
17
+ `cb.knowledge.search` 응답에 `agentic` / `agentic_rounds` 필드를 추가했다. `agentic: true`
18
+ 를 보냈더라도 AI provider 미설정·LLM 오류로 단일 키워드 검색에 폴백되면 `agentic` 이
19
+ `false` 로 와, agentic 옵션이 실제로 수행됐는지 폴백됐는지 판별할 수 있다.
20
+
21
+ ### Note — npm 패키지 동기화
22
+
23
+ `onReasoning` 과 `knowledge.updateDocument`(아래 3.18.0 항목)는 코드에는 반영됐으나
24
+ npm 3.18.0 패키지에는 누락된 상태였다. 3.19.0 에 모두 정상 포함된다.
25
+
26
+ ## [3.18.0] - 2026-05-21
27
+
28
+ ### Added — Knowledge Base 문서 수정 (`knowledge.updateDocument`)
29
+
30
+ 기존 KB 문서를 수정하는 `cb.knowledge.updateDocument(kbID, docID, data)` 메서드를 추가했다.
31
+ `content` / `file_content` / `metadata` 중 하나라도 포함하면 서버가 전체 재색인(기존 청크
32
+ 삭제 → 재청킹 → 재색인)을 수행하며, `name` 만 보내면 재색인 없이 문서 라벨만 변경된다.
33
+ 재색인 시 서버는 `status='pending'` 으로 즉시 응답하고 색인은 백그라운드로 진행한다
34
+ (`addDocument` 와 동일).
35
+
36
+ - 신규 타입 `UpdateDocumentRequest` export.
37
+ - REST `PUT /v1/public/knowledge-bases/:kbID/documents/:docID` 에 대응.
38
+
39
+ ### Note — Knowledge Base 색인 과금
40
+
41
+ 서버에서 KB 문서 색인이 사용량 과금 대상이 되었다. 문서 생성·수정(재색인) 시 색인 토큰이,
42
+ 색인된 청크 보관 용량이 사용량으로 집계된다. SDK 사용 방식에는 변화가 없으며 BM25 키워드
43
+ 검색 자체는 외부 임베딩 API 비용이 없다.
44
+
6
45
  ## [3.17.2] - 2026-05-20
7
46
 
8
47
  ### Fixed — 콘솔 도메인 세션 쿠키 누수로 인한 앱 공개 API 401
package/README.md CHANGED
@@ -819,6 +819,11 @@ await cb.knowledge.addDocumentFromFile('kb-id', {
819
819
  const { documents } = await cb.knowledge.listDocuments('kb-id')
820
820
  await cb.knowledge.deleteDocument('kb-id', 'doc-id')
821
821
 
822
+ // 문서 수정 — content/file_content/metadata 변경 시 전체 재색인, name 만 보내면 라벨만 변경
823
+ await cb.knowledge.updateDocument('kb-id', 'doc-id', {
824
+ content: '환불은 구매 후 14일 이내에 가능합니다...',
825
+ })
826
+
822
827
  // 키워드 검색 (BM25)
823
828
  const results = await cb.knowledge.search('kb-id', {
824
829
  query: '환불 정책이 어떻게 되나요?',