@zerogpu/browser-extension-sdk 0.2.1 → 0.2.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/README.md CHANGED
@@ -69,12 +69,10 @@ await initZeroGpuSdk({
69
69
  baseUrl: 'https://devices.zerogpu.ai'
70
70
  },
71
71
  telemetry: {
72
- // Enable/disable detailed console logs
72
+ // Enable/disable detailed console logs (redacted: ids/sizes/timings only)
73
73
  enableConsoleLogs: true,
74
74
  // Request geolocation permission (default: false)
75
- locationData: true,
76
- // Request camera permission (default: false) - *Not yet implemented*
77
- cameraData: false
75
+ locationData: true
78
76
  }
79
77
  }
80
78
  });
@@ -150,7 +148,34 @@ You can override any part of the configuration. Common overrides:
150
148
  - **`slm.modelUrl`**: Base URL that hosts the model assets (e.g., your CDN).
151
149
  - **`slm.sampleSummaryText`**: Text used for the on-device self-test before registration.
152
150
  - **`telemetry.locationData`**: If `true`, SDK attempts to gather GPS coordinates (triggers permission prompt).
153
- - **`telemetry.enableConsoleLogs`**: Force console logging on/off (default `false`).
151
+ - **`telemetry.enableConsoleLogs`**: Force console logging on/off (default `false`). Logs are redacted by construction: message types, request/model/device ids, counts, byte sizes, durations and error codes only — never task text, model output, message frames or session credentials.
152
+ - **`telemetry.cameraData`**: Deprecated and ignored. The camera-capture path was removed from the SDK entirely (ZGA-538); no camera code exists in the shipped bundle. The flag remains in the type only so existing integrations keep compiling.
153
+
154
+ ## Data collected at registration
155
+
156
+ The SDK collects coarse device-capability data and sends it to the ZeroGPU registry on
157
+ `POST /register` so the orchestrator can decide which model (if any) fits this device:
158
+ platform, user agent, language, timezone, CPU core count, approximate memory, screen
159
+ size, battery level, connection type, page URL/referrer, and — only with the
160
+ `locationData` opt-in — GPS coordinates.
161
+
162
+ ### WebGL renderer fingerprint
163
+
164
+ The SDK reads the WebGL renderer string (`WEBGL_debug_renderer_info` →
165
+ `UNMASKED_RENDERER_WEBGL`, e.g. `"Apple GPU"` or `"Adreno 660"`) and sends it in the
166
+ register payload twice, as `gpuRenderer` and as `webglFingerprint`:
167
+
168
+ - **What it is:** the GPU/driver identification string the browser exposes via WebGL.
169
+ No canvas is rendered or hashed; the two fields currently carry the same raw string.
170
+ - **What it is used for:** as a hardware-capability signal for model assignment (which
171
+ model fits this GPU class), and as a device-identity anchor — a stability signal that
172
+ helps the registry recognize a device across sessions alongside the stored
173
+ `deviceId` (a random UUID persisted in browser storage).
174
+ - **What it is not:** it is not used for cross-site tracking or advertising profiles,
175
+ and it identifies a hardware class rather than a person — many devices share the
176
+ same renderer string. Replacing this signal with per-device keypairs is planned
177
+ (see the confidentiality roadmap); until then this documentation is the honest
178
+ statement of what is collected.
154
179
 
155
180
  ## Local Testing
156
181
 
@@ -266,7 +291,7 @@ await initZeroGpuSdk({
266
291
  1. `initZeroGpuSdk` resolves configuration (env defaults + overrides).
267
292
  2. Device fingerprint + metadata are collected.
268
293
  3. Required SLM artifacts are downloaded to IndexedDB and loaded into Transformers.js. Timing metrics are recorded.
269
- 4. The SDK calls the orchestrator `/register` endpoint with device + model metadata. A shell-friendly cURL string is logged.
294
+ 4. The SDK calls the orchestrator `/register` endpoint with device + model metadata.
270
295
  5. The orchestrator responds with a `wsUrl`. The SDK opens a WebSocket, sends a `hello`, and listens for `summary_request` messages.
271
296
  6. Each `summary_request` executes against the on-device SLM (single flight enforced) and responds with `summary_response` containing the summarized text and rich metadata (timings, device info, model info).
272
297
  7. If the WebSocket closes or errors, the SDK marks the state as `error`. Reloading the host app re-initializes the SDK.
@@ -1,5 +1,5 @@
1
1
  {
2
- "sdkVersion": "0.2.1+8a18008",
2
+ "sdkVersion": "0.2.2+0a17606",
3
3
  "channel": "official",
4
4
  "transformersVersion": "2.17.2",
5
5
  "wllamaVersion": "2.3.5",
@@ -14,5 +14,5 @@
14
14
  "wllama/single-thread/wllama.wasm",
15
15
  "wllama/multi-thread/wllama.wasm"
16
16
  ],
17
- "builtAt": "2026-08-13T00:40:39.053Z"
17
+ "builtAt": "2026-08-19T11:39:56.086Z"
18
18
  }