@zerogpu/browser-extension-sdk 0.2.3 → 0.3.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/README.md +35 -0
- package/bin/zerogpu.mjs +171 -29
- package/dist/assets/zerogpu-assets.json +2 -2
- package/dist/extension/zerogpu-background.js +42 -1
- package/dist/extension/zerogpu-background.js.map +1 -1
- package/dist/extension/zerogpu-offscreen.js +182 -10
- package/dist/extension/zerogpu-offscreen.js.map +1 -1
- package/dist/extension/zerogpu-settings-link.js +9 -0
- package/dist/extension/zerogpu-settings-link.js.map +1 -1
- package/dist/loader.js +1 -1
- package/dist/loader.js.map +1 -1
- package/dist/manifest.json +5 -5
- package/dist/types/extension/background.d.ts +10 -0
- package/dist/types/extension/consent.d.ts +0 -5
- package/dist/types/extension/offscreen.d.ts +23 -0
- package/dist/types/public-api.d.ts +14 -0
- package/dist/types/runtime/custom-params.d.ts +34 -0
- package/dist/types/transport/http.d.ts +3 -0
- package/dist/v/{zerogpu-browser-sdk.85b3f7e3cc11.umd.js → zerogpu-browser-sdk.8d29febc744c.umd.js} +177 -9
- package/dist/v/zerogpu-browser-sdk.8d29febc744c.umd.js.map +1 -0
- package/dist/zerogpu-browser-sdk.cjs +176 -8
- package/dist/zerogpu-browser-sdk.cjs.map +1 -1
- package/dist/zerogpu-browser-sdk.esm.js +176 -9
- package/dist/zerogpu-browser-sdk.esm.js.map +1 -1
- package/dist/zerogpu-browser-sdk.umd.js +176 -8
- package/dist/zerogpu-browser-sdk.umd.js.map +1 -1
- package/docs/extension-developer-guide.md +74 -2
- package/package.json +1 -1
- package/dist/v/zerogpu-browser-sdk.85b3f7e3cc11.umd.js.map +0 -1
package/README.md
CHANGED
|
@@ -138,6 +138,41 @@ builds.
|
|
|
138
138
|
| `appUserId` | `string` | `undefined` | Optional user identifier (e.g. Telegram ID) for telemetry. |
|
|
139
139
|
| `edgeOperatorKey` | `string` | `undefined` | Operator key forwarded to `/register` as `x-edge-operator-key`. The orchestrator resolves the project from this key. |
|
|
140
140
|
| `overrides` | `Partial<SdkConfig>` | `{}` | Deep merge overrides for internal config. |
|
|
141
|
+
| `customParams` | `{ cust_param1?, cust_param2?, cust_param3? }` | `undefined` | Operator macros attached to every request this device serves. See [Custom macros](#custom-macros-cust_param13). |
|
|
142
|
+
|
|
143
|
+
### Custom macros (`cust_param1..3`)
|
|
144
|
+
|
|
145
|
+
Three opaque slots for your own reporting dimensions — placement, cohort,
|
|
146
|
+
campaign, app surface. ZeroGPU stores and counts them against every request your
|
|
147
|
+
devices serve, never interprets them, and reports them back only to you (never
|
|
148
|
+
to the API customer whose request the device served).
|
|
149
|
+
|
|
150
|
+
```ts
|
|
151
|
+
await initZeroGpuSdk({
|
|
152
|
+
edgeOperatorKey: 'your-edge-operator-key',
|
|
153
|
+
customParams: { cust_param1: 'placement_home', cust_param2: 'cohort_b' }
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
// Later — replaces the whole map; omitted slots become unset, {} clears all.
|
|
157
|
+
setCustomParams({ cust_param1: 'placement_settings' });
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Script tag: `data-cust-param1`, `data-cust-param2`, `data-cust-param3` (the
|
|
161
|
+
loader forwards them). `ZeroGpuSdk.setCustomParams(...)` is queued like
|
|
162
|
+
`initZeroGpuSdk` if called before the core bundle loads. Works the same inside
|
|
163
|
+
Telegram Mini Apps.
|
|
164
|
+
|
|
165
|
+
- **Values only.** The slot name is the key, so send the value itself
|
|
166
|
+
(`cust_param1: '1231231313'`), never a nested parameter
|
|
167
|
+
(`cust_param1: 'user-id=1231231313'`). Letters, digits, `.`, `_` and `-`
|
|
168
|
+
only; anything else is dropped with an always-on warning.
|
|
169
|
+
- Strings, numbers and booleans are accepted (numbers/booleans become strings);
|
|
170
|
+
other keys and types are dropped with a console warning (with
|
|
171
|
+
`enableConsoleLogs`). Control characters are stripped, values are trimmed,
|
|
172
|
+
and anything over 128 characters is truncated rather than rejected.
|
|
173
|
+
- **No personal data.** Email-shaped values are dropped with an always-on
|
|
174
|
+
warning. Values cannot be deleted individually once recorded.
|
|
175
|
+
- `setCustomParams` applies from the next request served; no re-registration.
|
|
141
176
|
|
|
142
177
|
### `SdkConfig` Overrides
|
|
143
178
|
|
package/bin/zerogpu.mjs
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
* zerogpu — CLI for integrating the ZeroGPU SDK into a Chrome (MV3) extension.
|
|
4
4
|
*
|
|
5
5
|
* npx zerogpu vendor [outDir] Copy the SDK + model runtimes into the extension
|
|
6
|
-
* (default: vendor/zerogpu)
|
|
6
|
+
* (default: vendor/zerogpu), and add the opt-out
|
|
7
|
+
* origin to manifest.json if it is missing.
|
|
8
|
+
* Run this in your build.
|
|
7
9
|
* npx zerogpu init [--dir .] Vendor + scaffold offscreen/background glue and
|
|
8
10
|
* patch manifest.json. For a brand-new extension.
|
|
9
11
|
* npx zerogpu doctor [--dir .] Check manifest + that vendored assets are in sync.
|
|
@@ -85,9 +87,100 @@ const ensureDistPresent = () => {
|
|
|
85
87
|
}
|
|
86
88
|
};
|
|
87
89
|
|
|
90
|
+
// --- manifest helpers (shared by vendor + init) -------------------------------
|
|
91
|
+
|
|
92
|
+
const uniqueMerge = (existing, additions) => {
|
|
93
|
+
const out = Array.isArray(existing) ? [...existing] : [];
|
|
94
|
+
for (const item of additions) {
|
|
95
|
+
if (!out.includes(item)) out.push(item);
|
|
96
|
+
}
|
|
97
|
+
return out;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Merge the ZeroGPU settings-page origin into `externally_connectable.matches`.
|
|
102
|
+
* Merged, never replaced — a host may already allow its own site, and its `ids`
|
|
103
|
+
* entry is left alone. Returns whether anything actually changed, so a caller
|
|
104
|
+
* that runs on every build can leave a correct manifest untouched.
|
|
105
|
+
*
|
|
106
|
+
* Creating the key is not a neutral act. Chrome reads an absent
|
|
107
|
+
* `externally_connectable` as "every extension may connect, no web page may";
|
|
108
|
+
* once the key exists, an unspecified `ids` means "no extension may". So adding
|
|
109
|
+
* only `matches` to a manifest that had no key would quietly revoke
|
|
110
|
+
* extension-to-extension messaging the host still has today. `ids: ["*"]`
|
|
111
|
+
* records what was already in force rather than granting anything new.
|
|
112
|
+
*
|
|
113
|
+
* A host that declared the key itself has already made that choice — even as an
|
|
114
|
+
* empty object — so `ids` is never added to one that exists.
|
|
115
|
+
*/
|
|
116
|
+
const ensureExternallyConnectable = (manifest) => {
|
|
117
|
+
const declared = manifest.externally_connectable;
|
|
118
|
+
const existing = declared?.matches;
|
|
119
|
+
const merged = uniqueMerge(existing, EXTERNALLY_CONNECTABLE_MATCHES);
|
|
120
|
+
if (Array.isArray(existing) && merged.length === existing.length) return false;
|
|
121
|
+
if (!declared) {
|
|
122
|
+
manifest.externally_connectable = { matches: merged, ids: ['*'] };
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
declared.matches = merged;
|
|
126
|
+
return true;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* The file's own indentation, so rewriting it produces a one-line diff instead
|
|
131
|
+
* of reformatting a manifest the host may keep at 4 spaces or tabs.
|
|
132
|
+
*/
|
|
133
|
+
const detectIndent = (raw) => {
|
|
134
|
+
const match = raw.match(/\n([ \t]+)"/);
|
|
135
|
+
if (!match) return 2;
|
|
136
|
+
return match[1].includes('\t') ? '\t' : match[1].length;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* The file's own line ending, for the same reason as the indentation: a manifest
|
|
141
|
+
* kept at CRLF must come back CRLF, or the one-key diff becomes a whole-file one.
|
|
142
|
+
* `JSON.stringify` only ever emits `\n`, and a newline inside a JSON string is
|
|
143
|
+
* escaped rather than literal, so rewriting every `\n` is safe.
|
|
144
|
+
*/
|
|
145
|
+
const detectEol = (raw) => (raw.includes('\r\n') ? '\r\n' : '\n');
|
|
146
|
+
|
|
88
147
|
// --- vendor ------------------------------------------------------------------
|
|
89
148
|
|
|
90
|
-
|
|
149
|
+
/**
|
|
150
|
+
* Add the settings-page origin to the extension's manifest if it is missing.
|
|
151
|
+
*
|
|
152
|
+
* `vendor` is a build step, so this writes only when the entry is actually
|
|
153
|
+
* absent: once added, every later build is a no-op that never touches the file.
|
|
154
|
+
* It is here rather than in `init` alone because `init` runs once, at scaffold
|
|
155
|
+
* time — every extension integrated before the opt-out shipped would otherwise
|
|
156
|
+
* keep a manifest that silently makes the opt-out link a dead end.
|
|
157
|
+
*/
|
|
158
|
+
const patchExternallyConnectable = (root) => {
|
|
159
|
+
const file = path.join(root, 'manifest.json');
|
|
160
|
+
// Vendoring from a build directory is legitimate, and there is no way to guess
|
|
161
|
+
// where the real manifest lives. `doctor` is what reports the gap in that case.
|
|
162
|
+
if (!existsSync(file)) return;
|
|
163
|
+
|
|
164
|
+
const raw = readFileSync(file, 'utf8');
|
|
165
|
+
let manifest;
|
|
166
|
+
try {
|
|
167
|
+
manifest = JSON.parse(raw);
|
|
168
|
+
} catch {
|
|
169
|
+
log(c.warn('! manifest.json is not valid JSON — left unchanged.'));
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (!ensureExternallyConnectable(manifest)) return;
|
|
174
|
+
|
|
175
|
+
const eol = detectEol(raw);
|
|
176
|
+
const body = JSON.stringify(manifest, null, detectIndent(raw)).replace(/\n/g, eol);
|
|
177
|
+
writeFileSync(file, body + (raw.endsWith('\n') ? eol : ''));
|
|
178
|
+
log(c.ok(`✓ Added ${EXTERNALLY_CONNECTABLE_MATCHES.join(', ')} to manifest.json`));
|
|
179
|
+
log(c.dim(' externally_connectable — without it the ZeroGPU settings page cannot'));
|
|
180
|
+
log(c.dim(' reach this extension, so end users have no way to opt out.'));
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
const vendor = (outDir, manifestRoot = process.cwd()) => {
|
|
91
184
|
ensureDistPresent();
|
|
92
185
|
const target = path.resolve(process.cwd(), outDir || path.join('vendor', 'zerogpu'));
|
|
93
186
|
mkdirSync(target, { recursive: true });
|
|
@@ -100,6 +193,8 @@ const vendor = (outDir) => {
|
|
|
100
193
|
// All pinned runtime assets (transformers + ONNX wasm, wllama + wasm, manifest).
|
|
101
194
|
cpSync(distAssets, target, { recursive: true });
|
|
102
195
|
|
|
196
|
+
patchExternallyConnectable(manifestRoot);
|
|
197
|
+
|
|
103
198
|
const manifest = readAssetsManifest(target);
|
|
104
199
|
const rel = path.relative(process.cwd(), target) || '.';
|
|
105
200
|
log(c.ok(`✓ Vendored ZeroGPU runtime into ${rel}`));
|
|
@@ -172,6 +267,7 @@ const OPTIONS_HTML = `<!DOCTYPE html>
|
|
|
172
267
|
body { font-family: system-ui, sans-serif; margin: 2rem; max-width: 34rem; line-height: 1.5; }
|
|
173
268
|
.row { display: flex; align-items: flex-start; gap: .75rem; margin-top: 1.5rem; }
|
|
174
269
|
.muted { color: #666; font-size: .875rem; }
|
|
270
|
+
.error { color: #b3261e; font-weight: 500; }
|
|
175
271
|
</style>
|
|
176
272
|
</head>
|
|
177
273
|
<body>
|
|
@@ -195,35 +291,85 @@ const OPTIONS_JS = `// Reads and writes the ZeroGPU consent flag through the ser
|
|
|
195
291
|
const box = document.getElementById("zerogpu-opt-in");
|
|
196
292
|
const status = document.getElementById("zerogpu-status");
|
|
197
293
|
|
|
294
|
+
// The last state the service worker confirmed, and which request confirmed it.
|
|
295
|
+
// A failed write puts the box back to this, instead of leaving the user's click
|
|
296
|
+
// standing as though it had saved.
|
|
297
|
+
let stored = null;
|
|
298
|
+
let storedSeq = 0;
|
|
299
|
+
|
|
300
|
+
// The bridge answers each request on its own: a read is a storage lookup, a
|
|
301
|
+
// write also waits for the offscreen document to start or stop. So the initial
|
|
302
|
+
// read can land after a write the user has already made. Only the newest
|
|
303
|
+
// request is allowed to paint; an older answer is stale by definition.
|
|
304
|
+
let latest = 0;
|
|
305
|
+
|
|
306
|
+
const request = (message, done) => {
|
|
307
|
+
const seq = ++latest;
|
|
308
|
+
chrome.runtime.sendMessage(message, (res) => {
|
|
309
|
+
// Read lastError either way — left unread, Chrome logs it as unchecked. It
|
|
310
|
+
// is also the only signal when the service worker never answers at all.
|
|
311
|
+
const error = chrome.runtime.lastError?.message;
|
|
312
|
+
// Too stale to paint is not too stale to be true. A write that landed while
|
|
313
|
+
// a newer one was in flight is still the freshest word on what is actually
|
|
314
|
+
// stored, and dropping it would leave a later failure restoring the box to
|
|
315
|
+
// a state two toggles old. Only an older answer than the one already
|
|
316
|
+
// recorded is discarded.
|
|
317
|
+
if (res?.ok && seq > storedSeq) {
|
|
318
|
+
stored = res.consent;
|
|
319
|
+
storedSeq = seq;
|
|
320
|
+
}
|
|
321
|
+
if (seq === latest) done(res, error);
|
|
322
|
+
});
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
const setStatus = (text, isError) => {
|
|
326
|
+
status.textContent = text;
|
|
327
|
+
status.classList.toggle("error", !!isError);
|
|
328
|
+
};
|
|
329
|
+
|
|
198
330
|
const render = (consent) => {
|
|
331
|
+
box.indeterminate = false;
|
|
199
332
|
box.checked = !!consent?.optedIn;
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
333
|
+
setStatus(
|
|
334
|
+
consent?.updatedAt
|
|
335
|
+
? \`Last changed \${new Date(consent.updatedAt).toLocaleString()}.\`
|
|
336
|
+
: "",
|
|
337
|
+
false
|
|
338
|
+
);
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
// Nothing was stored, so the SDK is still doing whatever it was doing before the
|
|
342
|
+
// click. Show that, and never a bare unchecked box — that would claim sharing is
|
|
343
|
+
// off while it is running.
|
|
344
|
+
const restore = (message) => {
|
|
345
|
+
if (stored) {
|
|
346
|
+
box.indeterminate = false;
|
|
347
|
+
box.checked = !!stored.optedIn;
|
|
348
|
+
} else {
|
|
349
|
+
box.indeterminate = true;
|
|
350
|
+
}
|
|
351
|
+
setStatus(message, true);
|
|
203
352
|
};
|
|
204
353
|
|
|
205
|
-
|
|
206
|
-
if (res?.ok)
|
|
354
|
+
request({ type: "zerogpu:getConsent" }, (res, error) => {
|
|
355
|
+
if (res?.ok) {
|
|
356
|
+
render(res.consent);
|
|
357
|
+
return;
|
|
358
|
+
}
|
|
359
|
+
restore(error || res?.error || "Could not read your current setting.");
|
|
207
360
|
});
|
|
208
361
|
|
|
209
362
|
box.addEventListener("change", () => {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
363
|
+
request({ type: "zerogpu:setConsent", optedIn: box.checked }, (res, error) => {
|
|
364
|
+
if (res?.ok) {
|
|
365
|
+
render(res.consent);
|
|
366
|
+
return;
|
|
214
367
|
}
|
|
215
|
-
|
|
368
|
+
restore(error || res?.error || "Could not save your choice — sharing is unchanged.");
|
|
369
|
+
});
|
|
216
370
|
});
|
|
217
371
|
`;
|
|
218
372
|
|
|
219
|
-
const uniqueMerge = (existing, additions) => {
|
|
220
|
-
const out = Array.isArray(existing) ? [...existing] : [];
|
|
221
|
-
for (const item of additions) {
|
|
222
|
-
if (!out.includes(item)) out.push(item);
|
|
223
|
-
}
|
|
224
|
-
return out;
|
|
225
|
-
};
|
|
226
|
-
|
|
227
373
|
const patchManifest = (dir) => {
|
|
228
374
|
const file = path.join(dir, 'manifest.json');
|
|
229
375
|
if (!existsSync(file)) {
|
|
@@ -241,13 +387,8 @@ const patchManifest = (dir) => {
|
|
|
241
387
|
manifest.background = { service_worker: 'background.js' };
|
|
242
388
|
}
|
|
243
389
|
// Lets the ZeroGPU-hosted settings page message this extension so an end user
|
|
244
|
-
// can turn sharing off.
|
|
245
|
-
|
|
246
|
-
manifest.externally_connectable = manifest.externally_connectable || {};
|
|
247
|
-
manifest.externally_connectable.matches = uniqueMerge(
|
|
248
|
-
manifest.externally_connectable.matches,
|
|
249
|
-
EXTERNALLY_CONNECTABLE_MATCHES
|
|
250
|
-
);
|
|
390
|
+
// can turn sharing off. No content script and no extra host permission needed.
|
|
391
|
+
ensureExternallyConnectable(manifest);
|
|
251
392
|
if (!manifest.options_page && !manifest.options_ui) {
|
|
252
393
|
manifest.options_ui = { page: 'options.html', open_in_tab: true };
|
|
253
394
|
}
|
|
@@ -268,7 +409,7 @@ const scaffoldFile = (dir, name, contents) => {
|
|
|
268
409
|
const init = (dir) => {
|
|
269
410
|
const root = path.resolve(process.cwd(), dir || '.');
|
|
270
411
|
if (!existsSync(root)) die(`Directory not found: ${root}`);
|
|
271
|
-
vendor(path.join(root, 'vendor', 'zerogpu'));
|
|
412
|
+
vendor(path.join(root, 'vendor', 'zerogpu'), root);
|
|
272
413
|
scaffoldFile(root, 'offscreen.html', OFFSCREEN_HTML);
|
|
273
414
|
scaffoldFile(root, 'offscreen.js', OFFSCREEN_JS);
|
|
274
415
|
scaffoldFile(root, 'background.js', BACKGROUND_JS);
|
|
@@ -423,7 +564,8 @@ const main = () => {
|
|
|
423
564
|
|
|
424
565
|
Usage:
|
|
425
566
|
npx zerogpu vendor [outDir] Copy SDK + model runtimes into the extension
|
|
426
|
-
(default: vendor/zerogpu)
|
|
567
|
+
(default: vendor/zerogpu) + add the opt-out origin
|
|
568
|
+
to manifest.json. Run this in your build.
|
|
427
569
|
npx zerogpu init [--dir .] Vendor + scaffold offscreen/background + patch manifest
|
|
428
570
|
npx zerogpu doctor [--dir .] Verify the integration is wired and in sync
|
|
429
571
|
`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"sdkVersion": "0.
|
|
2
|
+
"sdkVersion": "0.3.0+b41a26f",
|
|
3
3
|
"channel": "official",
|
|
4
4
|
"transformersVersion": "2.17.2",
|
|
5
5
|
"wllamaVersion": "2.3.5",
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
"wllama/single-thread/wllama.wasm",
|
|
17
17
|
"wllama/multi-thread/wllama.wasm"
|
|
18
18
|
],
|
|
19
|
-
"builtAt": "2026-
|
|
19
|
+
"builtAt": "2026-09-18T14:17:47.575Z"
|
|
20
20
|
}
|
|
@@ -67,7 +67,7 @@ var ZeroGpuBackground = (function (exports) {
|
|
|
67
67
|
* bridge listens on `chrome.storage.onChanged` and starts or stops the SDK in
|
|
68
68
|
* response, so no caller needs to do both.
|
|
69
69
|
*/
|
|
70
|
-
const
|
|
70
|
+
const writeZeroGpuConsent = async (optedIn, source) => {
|
|
71
71
|
const next = { optedIn, updatedAt: new Date().toISOString(), source };
|
|
72
72
|
const area = getLocalStorageArea();
|
|
73
73
|
// Deliberately not symmetric with the read above. A read fails open so the SDK
|
|
@@ -80,6 +80,22 @@ var ZeroGpuBackground = (function (exports) {
|
|
|
80
80
|
await area.set({ [ZEROGPU_CONSENT_KEY]: next });
|
|
81
81
|
return next;
|
|
82
82
|
};
|
|
83
|
+
/**
|
|
84
|
+
* Serialises writes, for the same reason the bridge serialises applies. Toggling
|
|
85
|
+
* twice in quick succession is two concurrent calls — each bridge message is
|
|
86
|
+
* handled independently — and `storage.local` promises no ordering between
|
|
87
|
+
* them, so the earlier decision could be the one that lands last and persists
|
|
88
|
+
* while the user is looking at the later one. Queueing also keeps `updatedAt`
|
|
89
|
+
* in step with what actually got stored.
|
|
90
|
+
*/
|
|
91
|
+
let writeQueue = Promise.resolve();
|
|
92
|
+
const setZeroGpuConsent = (optedIn, source = 'extension') => {
|
|
93
|
+
const write = writeQueue.then(() => writeZeroGpuConsent(optedIn, source),
|
|
94
|
+
// A rejected write must not poison the queue for every later call.
|
|
95
|
+
() => writeZeroGpuConsent(optedIn, source));
|
|
96
|
+
writeQueue = write.catch(() => undefined);
|
|
97
|
+
return write;
|
|
98
|
+
};
|
|
83
99
|
/**
|
|
84
100
|
* Subscribe to consent changes from any extension context (the hosted settings
|
|
85
101
|
* page writing through the service worker, the options page, another window).
|
|
@@ -146,6 +162,7 @@ var ZeroGpuBackground = (function (exports) {
|
|
|
146
162
|
};
|
|
147
163
|
/** Matches the offscreen document's own protocol (offscreen.ts). */
|
|
148
164
|
const OFFSCREEN_DISABLE_MESSAGE = 'zerogpu:disable';
|
|
165
|
+
const OFFSCREEN_SET_CUSTOM_PARAMS_MESSAGE = 'zerogpu:setCustomParams';
|
|
149
166
|
/** Origins allowed to talk to the extension. Must stay in step with the
|
|
150
167
|
* `externally_connectable.matches` entry the CLI writes into manifest.json. */
|
|
151
168
|
const DEFAULT_ALLOWED_ORIGINS = ['https://zerogpu.ai', 'https://www.zerogpu.ai'];
|
|
@@ -233,6 +250,29 @@ var ZeroGpuBackground = (function (exports) {
|
|
|
233
250
|
// closeDocument rejects when there is no document; either way we are done.
|
|
234
251
|
}
|
|
235
252
|
};
|
|
253
|
+
/**
|
|
254
|
+
* Replace the operator macros (`cust_param1`..`cust_param3`) in the running
|
|
255
|
+
* offscreen SDK; `{}` clears them. Resolves false when there is no document to
|
|
256
|
+
* receive them (user opted out, or not started yet). The values live as long
|
|
257
|
+
* as that document — for values that must survive a restart, pass
|
|
258
|
+
* `customParams` to `initZeroGpuOffscreen` as well.
|
|
259
|
+
*/
|
|
260
|
+
const setZeroGpuCustomParams = async (customParams, options = {}) => {
|
|
261
|
+
const path = options.offscreenPath ?? DEFAULT_OFFSCREEN_PATH;
|
|
262
|
+
const runtime = getChrome()?.runtime;
|
|
263
|
+
if (!runtime?.sendMessage || !(await hasOffscreenDocument(path)))
|
|
264
|
+
return false;
|
|
265
|
+
try {
|
|
266
|
+
const response = (await runtime.sendMessage({
|
|
267
|
+
type: OFFSCREEN_SET_CUSTOM_PARAMS_MESSAGE,
|
|
268
|
+
customParams
|
|
269
|
+
}));
|
|
270
|
+
return response?.ok === true;
|
|
271
|
+
}
|
|
272
|
+
catch {
|
|
273
|
+
return false;
|
|
274
|
+
}
|
|
275
|
+
};
|
|
236
276
|
/**
|
|
237
277
|
* Serialises applies. A single opt-out arrives twice — once inline from the
|
|
238
278
|
* message handler (so the response reflects reality) and once from
|
|
@@ -356,6 +396,7 @@ var ZeroGpuBackground = (function (exports) {
|
|
|
356
396
|
exports.onZeroGpuConsentChanged = onZeroGpuConsentChanged;
|
|
357
397
|
exports.registerZeroGpuConsentBridge = registerZeroGpuConsentBridge;
|
|
358
398
|
exports.setZeroGpuConsent = setZeroGpuConsent;
|
|
399
|
+
exports.setZeroGpuCustomParams = setZeroGpuCustomParams;
|
|
359
400
|
exports.startZeroGpuIfConsented = startZeroGpuIfConsented;
|
|
360
401
|
exports.stopZeroGpuOffscreen = stopZeroGpuOffscreen;
|
|
361
402
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zerogpu-background.js","sources":["../../../src/extension/consent.ts","../../../src/extension/background.ts"],"sourcesContent":[null,null],"names":[],"mappings":";;;IAAA;;;;;;;;;;;IAWG;IAEH;AACO,UAAM,mBAAmB,GAAG;IAYnC;;;;IAIG;AACI,UAAM,eAAe,GAAmB;IAC7C,IAAA,OAAO,EAAE,IAAI;IACb,IAAA,SAAS,EAAE,IAAI;IACf,IAAA,MAAM,EAAE;;IAyBV,MAAM,mBAAmB,GAAG,MAC1B,OAAO,MAAM,KAAK,WAAW,GAAG,MAAM,EAAE,OAAO,EAAE,KAAK,GAAG,SAAS;IAEpE;;;;;IAKG;IACH,MAAM,SAAS,GAAG,CAAC,GAAY,KAAoB;IACjD,IAAA,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ;IAAE,QAAA,OAAO,eAAe;QAC3D,MAAM,KAAK,GAAG,GAA8B;IAC5C,IAAA,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,SAAS;IAAE,QAAA,OAAO,eAAe;QAC9D,OAAO;YACL,OAAO,EAAE,KAAK,CAAC,OAAO;IACtB,QAAA,SAAS,EAAE,OAAO,KAAK,CAAC,SAAS,KAAK,QAAQ,GAAG,KAAK,CAAC,SAAS,GAAG,IAAI;IACvE,QAAA,MAAM,EACJ,KAAK,CAAC,MAAM,KAAK,WAAW,IAAI,KAAK,CAAC,MAAM,KAAK,eAAe,IAAI,KAAK,CAAC,MAAM,KAAK;kBACjF,KAAK,CAAC;IACR,cAAE;SACP;IACH,CAAC;IAED;AACO,UAAM,iBAAiB,GAAG,YAAoC;IACnE,IAAA,MAAM,IAAI,GAAG,mBAAmB,EAAE;IAClC,IAAA,IAAI,CAAC,IAAI;IAAE,QAAA,OAAO,eAAe;IACjC,IAAA,IAAI;YACF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC;YAClD,OAAO,SAAS,CAAC,MAAM,GAAG,mBAAmB,CAAC,CAAC;QACjD;IAAE,IAAA,MAAM;;IAEN,QAAA,OAAO,eAAe;QACxB;IACF;IAEA;AACO,UAAM,gBAAgB,GAAG,YAA8B,CAAC,MAAM,iBAAiB,EAAE,EAAE;IAE1F;;;;IAIG;
|
|
1
|
+
{"version":3,"file":"zerogpu-background.js","sources":["../../../src/extension/consent.ts","../../../src/extension/background.ts"],"sourcesContent":[null,null],"names":[],"mappings":";;;IAAA;;;;;;;;;;;IAWG;IAEH;AACO,UAAM,mBAAmB,GAAG;IAYnC;;;;IAIG;AACI,UAAM,eAAe,GAAmB;IAC7C,IAAA,OAAO,EAAE,IAAI;IACb,IAAA,SAAS,EAAE,IAAI;IACf,IAAA,MAAM,EAAE;;IAyBV,MAAM,mBAAmB,GAAG,MAC1B,OAAO,MAAM,KAAK,WAAW,GAAG,MAAM,EAAE,OAAO,EAAE,KAAK,GAAG,SAAS;IAEpE;;;;;IAKG;IACH,MAAM,SAAS,GAAG,CAAC,GAAY,KAAoB;IACjD,IAAA,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ;IAAE,QAAA,OAAO,eAAe;QAC3D,MAAM,KAAK,GAAG,GAA8B;IAC5C,IAAA,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,SAAS;IAAE,QAAA,OAAO,eAAe;QAC9D,OAAO;YACL,OAAO,EAAE,KAAK,CAAC,OAAO;IACtB,QAAA,SAAS,EAAE,OAAO,KAAK,CAAC,SAAS,KAAK,QAAQ,GAAG,KAAK,CAAC,SAAS,GAAG,IAAI;IACvE,QAAA,MAAM,EACJ,KAAK,CAA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