connectbase-client 3.3.0 → 3.4.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,19 @@
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.3.1] - 2026-04-30
7
+
8
+ ### Fixed — Docs
9
+
10
+ 3.3.0 publish 직후 SDK 감사에서 `README.md` 의 `### Game Server` 섹션에 신규 API
11
+ `cb.game.config` 가 누락된 것을 발견. npm 페이지의 사용자 1차 문서 정합성을 위해
12
+ patch release 로 보강.
13
+
14
+ - README 의 `## API Reference > ### Game Server` 아래에 `#### cb.game.config — Feature
15
+ Opt-in (v3.1+, SDK 3.3.0+)` 섹션 추가 — get/set/enable/disable 4개 메서드 시그니처,
16
+ partial PATCH 의미, HTTP 응답 코드 표 (403 / 429 / 402), OPT_IN.md cross-link.
17
+ - 코드 동작 변화 없음. README/CHANGELOG 만 수정.
18
+
6
19
  ## [3.3.0] - 2026-04-30
7
20
 
8
21
  ### Added — `cb.game.config` (게임 기능 opt-in 토글)
package/README.md CHANGED
@@ -229,6 +229,43 @@ curl -X PUT "https://api.connectbase.world/v1/apps/{appID}/storages/webs/{storag
229
229
 
230
230
  ### Game Server
231
231
 
232
+ #### `cb.game.config` — Feature Opt-in (v3.1+, SDK 3.3.0+)
233
+
234
+ The game server's 7 features (`matchqueue` / `leaderboard` / `entity` / `scripts` /
235
+ `voice` / `replay` / `spectator`) are **explicit opt-in per app** as of v3.1
236
+ (2026-04-30). Disabled features return HTTP **403 `feature_disabled`**.
237
+ New apps default to all-OFF; existing apps without a config row fall back to
238
+ all-ON for compatibility.
239
+
240
+ ```typescript
241
+ // Inspect current toggles
242
+ const cfg = await cb.game.config.get(appId)
243
+ // → { matchqueue_enabled, leaderboard_enabled, entity_enabled, scripts_enabled,
244
+ // voice_enabled, replay_enabled, spectator_enabled }
245
+
246
+ // Partial update — only the keys you send are applied; others are preserved.
247
+ await cb.game.config.set(appId, {
248
+ matchqueue_enabled: true,
249
+ leaderboard_enabled: true,
250
+ })
251
+
252
+ // Single-toggle convenience wrappers
253
+ await cb.game.config.enable(appId, 'matchqueue_enabled')
254
+ await cb.game.config.disable(appId, 'voice_enabled')
255
+ ```
256
+
257
+ The PATCH publishes a NATS invalidation so game-server caches drop the entry
258
+ immediately (30s TTL is the safety net).
259
+
260
+ | HTTP code | Body `error` | Meaning | Client action |
261
+ |-----------|--------------|---------|---------------|
262
+ | **403** | `feature_disabled` | Feature is not enabled for this app | Toggle via console or `cb.game.config.set(...)` |
263
+ | **429** | `cap_exceeded` | Per-app cardinality cap reached | Remove old rows or ask the operator to raise the cap env |
264
+ | **402** | `quota_exceeded` | Plan limit reached on a write route | Upgrade plan |
265
+
266
+ See [docs/game-server/OPT_IN.md](https://github.com/connectbase-world/connectbase/blob/release/docs/game-server/OPT_IN.md)
267
+ for the full policy.
268
+
232
269
  #### GameRoom
233
270
 
234
271
  The main class for real-time game communication.