@cloakapi/sdk 1.6.0 → 1.6.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 +10 -0
- package/README.md +6 -6
- package/dist/browser/index.d.mts +98 -89
- package/dist/browser/index.d.ts +98 -89
- package/dist/browser/index.js +1245 -123
- package/dist/browser/index.mjs +19 -4
- package/dist/browser/light.d.mts +2 -2
- package/dist/browser/light.d.ts +2 -2
- package/dist/browser/light.js +1 -1
- package/dist/browser/light.mjs +17 -2
- package/dist/browser/ner-pipeline-worker.mjs +1 -1
- package/dist/{chunk-6JZLCPZ7.mjs → chunk-3MXGO6NA.mjs} +11 -7
- package/dist/{chunk-EY35G37A.mjs → chunk-746IWCJ4.mjs} +224 -1
- package/dist/{chunk-7OIXV4CE.mjs → chunk-DDXSTIZ5.mjs} +242 -104
- package/dist/chunk-TWAQCP3Z.mjs +1258 -0
- package/dist/{chunk-JCTZ572R.mjs → chunk-ZAO5PEAG.mjs} +1 -1
- package/dist/device/index.d.mts +1 -1
- package/dist/device/index.d.ts +1 -1
- package/dist/device/index.mjs +7 -1251
- package/dist/{disclosure-Cslh-RaS.d.mts → disclosure-DnB-xYCb.d.mts} +1 -1
- package/dist/{disclosure-Cslh-RaS.d.ts → disclosure-DnB-xYCb.d.ts} +1 -1
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +12 -5
- package/dist/index.mjs +12 -5
- package/dist/node.d.mts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +311 -58
- package/dist/node.mjs +11 -6
- package/package.json +1 -1
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { C as CoverageStatus } from '../coverage-OYGXtboB.js';
|
|
2
2
|
import { N as NerCoverage, T as SupplementProcessingStatus, u as NerOrgSpan, U as UserCoverageAcceptance, x as NerUnavailableErrorShape } from '../local-pii-supplement-Db8n7ZuO.js';
|
|
3
3
|
export { D as DEFAULT_NER_REQUIREMENT, E as EnhancedNerRunner, p as EnhancedOrgRunner, q as NerLayerName, r as NerLayerOutcome, v as NerPersonSpan, w as NerRequirement, P as PersonModelTier, y as PersonNonLatinOutcome, z as ScriptRange, A as acceptReducedCoverage, V as activePersonModelTier, B as assertNerCoverage, F as buildNerCoverage, G as coverageStatusForNer, H as enhancedGazetteerActive, e as enhancedNerModelActive, I as enhancedNerRequirement, J as enhancedOrgModelActive, i as isAllowlistedOrg, K as isCoverageAcceptance, b as makeOrgSurrogate, n as nonLatinNerModelActive, L as nonLatinSentenceRanges, M as normaliseOrg, O as sentenceIsNonLatin, d as setEnhancedGazetteer, Q as setEnhancedNerRequirement, j as setEnhancedOrgModel, k as setNonLatinNerModel, R as splitSentenceRanges } from '../local-pii-supplement-Db8n7ZuO.js';
|
|
4
|
-
import { a as SurrogateModeReport, S as SurrogateMode, p as SurrogateContinuity, E as ExactReviewHandler, R as ReviewProcessingStatus, l as MarkerFormat } from '../disclosure-
|
|
5
|
-
export { C as CLK_DISCLOSURE_TEXT, c as CLK_DISCLOSURE_TEXT_MESSAGE_SCOPED, d as CLOAK_ANGLE_DISCLOSURE_TEXT, e as CLOAK_ANGLE_DISCLOSURE_TEXT_MESSAGE_SCOPED, f as CLOAK_ANGLE_HEADER, g as CLOAK_ANGLE_HEADER_MESSAGE_SCOPED, h as CONTINUITY_SENTENCE, D as DEFAULT_SURROGATE_MODE, i as DisclosureMessage, j as DisclosureTextOptions, L as LEGACY_SURROGATE_MODE_ALIASES, M as MODE_COPY, k as MODE_SHARED_NOTE, n as SDK_VERSION, o as SURROGATE_MODES, q as SurrogateModeCopy, r as SurrogateModeError, W as WithDisclosureOptions, s as coerceSurrogateMode, t as detectMarkerFormat, u as disclosureText, v as isSurrogateMode, w as resolveSurrogateMode, x as withDisclosure } from '../disclosure-
|
|
4
|
+
import { a as SurrogateModeReport, S as SurrogateMode, p as SurrogateContinuity, E as ExactReviewHandler, R as ReviewProcessingStatus, l as MarkerFormat } from '../disclosure-DnB-xYCb.js';
|
|
5
|
+
export { C as CLK_DISCLOSURE_TEXT, c as CLK_DISCLOSURE_TEXT_MESSAGE_SCOPED, d as CLOAK_ANGLE_DISCLOSURE_TEXT, e as CLOAK_ANGLE_DISCLOSURE_TEXT_MESSAGE_SCOPED, f as CLOAK_ANGLE_HEADER, g as CLOAK_ANGLE_HEADER_MESSAGE_SCOPED, h as CONTINUITY_SENTENCE, D as DEFAULT_SURROGATE_MODE, i as DisclosureMessage, j as DisclosureTextOptions, L as LEGACY_SURROGATE_MODE_ALIASES, M as MODE_COPY, k as MODE_SHARED_NOTE, n as SDK_VERSION, o as SURROGATE_MODES, q as SurrogateModeCopy, r as SurrogateModeError, W as WithDisclosureOptions, s as coerceSurrogateMode, t as detectMarkerFormat, u as disclosureText, v as isSurrogateMode, w as resolveSurrogateMode, x as withDisclosure } from '../disclosure-DnB-xYCb.js';
|
|
6
6
|
import { V as ValuePlacementWarning } from '../request-body-slots-BMShK1YO.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -362,13 +362,12 @@ declare function onDetectionLayerChange(fn: (s: DetectionLayerSnapshot) => void)
|
|
|
362
362
|
*/
|
|
363
363
|
declare function detectionLayerReport(): DetectionLayerReport;
|
|
364
364
|
/**
|
|
365
|
-
* The handle an in-flight load writes through.
|
|
366
|
-
*
|
|
367
|
-
* from transformers.js cannot wake a cancelled layer back up.
|
|
365
|
+
* The handle an in-flight load writes through. After the load is ready, failed,
|
|
366
|
+
* cancelled, or superseded, `active()` returns false and updates have no effect.
|
|
368
367
|
*/
|
|
369
368
|
interface DetectionLayerLoadHandle {
|
|
370
369
|
readonly id: DetectionLayerId;
|
|
371
|
-
/** True
|
|
370
|
+
/** True while this handle's load is in flight. */
|
|
372
371
|
active(): boolean;
|
|
373
372
|
/** Report progress in BYTES. Omit the numbers and it becomes unmeasurable. */
|
|
374
373
|
progress(p: {
|
|
@@ -1005,6 +1004,67 @@ declare function resolveConversation(supplied?: CloakConversation): {
|
|
|
1005
1004
|
continuity: SurrogateContinuity;
|
|
1006
1005
|
};
|
|
1007
1006
|
|
|
1007
|
+
/**
|
|
1008
|
+
* Apply Balanced or Max to a review the engine has already finished.
|
|
1009
|
+
*
|
|
1010
|
+
* A mode never decides whether tokenisation happened. This function only
|
|
1011
|
+
* rewrites stand-ins the engine already produced. It cannot put a detected
|
|
1012
|
+
* value back, and it cannot find a value the engine missed.
|
|
1013
|
+
*
|
|
1014
|
+
* Balanced returns the same object when every detected value already has a
|
|
1015
|
+
* safe stand-in. Identity stand-ins (empty, equal to the original, or still
|
|
1016
|
+
* present as a whole token in the body) are repaired first, in both modes.
|
|
1017
|
+
* Max rewrites the remaining realistic stand-ins to `<<CLOAK:TAG:n>>`. The
|
|
1018
|
+
* same original keeps the same placeholder for the whole body, and, when the
|
|
1019
|
+
* caller reuses a ledger, across later reviews.
|
|
1020
|
+
*
|
|
1021
|
+
* Secrets-class values the engine sealed as `[CLK-CARD|GOVID|IBAN|SECRET|PASSPORT-…]`
|
|
1022
|
+
* stay as sealed. A marker is not turned into another placeholder.
|
|
1023
|
+
*
|
|
1024
|
+
* Card runs the engine left in the body with no span are locked by
|
|
1025
|
+
* `finalCardBackstop` after the rewrite. The lock marker is not a function of
|
|
1026
|
+
* the card. Callers that need byte-stable output must not depend on a lock
|
|
1027
|
+
* that this pass actually inserts.
|
|
1028
|
+
*/
|
|
1029
|
+
interface ModeSpanLike {
|
|
1030
|
+
surrogate: string;
|
|
1031
|
+
original?: string;
|
|
1032
|
+
start?: number;
|
|
1033
|
+
end?: number;
|
|
1034
|
+
id?: string;
|
|
1035
|
+
type?: string;
|
|
1036
|
+
secrets?: boolean;
|
|
1037
|
+
}
|
|
1038
|
+
interface ModeReviewLike {
|
|
1039
|
+
body: string;
|
|
1040
|
+
map: Record<string, string>;
|
|
1041
|
+
originalText?: string;
|
|
1042
|
+
spans?: readonly ModeSpanLike[];
|
|
1043
|
+
}
|
|
1044
|
+
type PrivacyMode = 'balanced' | 'max';
|
|
1045
|
+
interface ModeLedger {
|
|
1046
|
+
perOriginal: Map<string, string>;
|
|
1047
|
+
counters: Map<string, number>;
|
|
1048
|
+
}
|
|
1049
|
+
declare function isSealedSecretMarker(value: unknown): boolean;
|
|
1050
|
+
declare function createModeLedger(): ModeLedger;
|
|
1051
|
+
/** Drop the process-wide default ledger. Callers that pass their own ledger are untouched. */
|
|
1052
|
+
declare function resetDefaultModeLedger(): void;
|
|
1053
|
+
/** Ledger stored on a conversation object so one value keeps one placeholder across turns. */
|
|
1054
|
+
declare function privacyLedgerFor(conversation: object): ModeLedger;
|
|
1055
|
+
/** Copy the privacy ledger onto a cloned conversation. No-op when the source has none. */
|
|
1056
|
+
declare function copyPrivacyLedger(from: object, to: object): void;
|
|
1057
|
+
/**
|
|
1058
|
+
* Returns the review as it should leave the device under `mode`.
|
|
1059
|
+
* Pass a ledger to keep placeholders stable across calls. Omit it and the
|
|
1060
|
+
* process-wide ledger is used, matching the app modules.
|
|
1061
|
+
* Unspanned card runs are locked after the rewrite, as the docs and convert
|
|
1062
|
+
* copies do.
|
|
1063
|
+
*/
|
|
1064
|
+
declare function applyPrivacyMode<T extends ModeReviewLike>(review: T, mode: PrivacyMode, ledger?: ModeLedger): T;
|
|
1065
|
+
/** Same function as {@link applyPrivacyMode}. The name the app modules use. */
|
|
1066
|
+
declare const applyPrivacyModeToReview: typeof applyPrivacyMode;
|
|
1067
|
+
|
|
1008
1068
|
/** The on-the-wire gazetteer asset shape (what a surface hosts + downloads). */
|
|
1009
1069
|
interface EnhancedGazetteerAsset {
|
|
1010
1070
|
id?: string;
|
|
@@ -1576,6 +1636,12 @@ declare function verifyReceipt(
|
|
|
1576
1636
|
opts?: { jwksJson?: string | null; verifyLink?: string },
|
|
1577
1637
|
): Promise<Verdict>;
|
|
1578
1638
|
|
|
1639
|
+
/**
|
|
1640
|
+
* Query the public campaign-fixture lookup without credentials.
|
|
1641
|
+
* Accepts a hyphenated UUID with version 1–8 and the RFC variant.
|
|
1642
|
+
* For account receipts, use the authenticated GET /api/v1/receipts/{jti}.
|
|
1643
|
+
* @throws {Error} Includes the server's error code and message when supplied.
|
|
1644
|
+
*/
|
|
1579
1645
|
declare function fetchReceiptByJti(jti: string): Promise<unknown>;
|
|
1580
1646
|
declare function fetchJwks(): Promise<string | null>;
|
|
1581
1647
|
|
|
@@ -1958,6 +2024,12 @@ interface GeneratedFile {
|
|
|
1958
2024
|
mime: string;
|
|
1959
2025
|
/** The raw file bytes, built on-device from real detokenised data. */
|
|
1960
2026
|
bytes: Uint8Array;
|
|
2027
|
+
/** Present when the requested PNG could not be encoded and SVG was returned. */
|
|
2028
|
+
formatSubstitution?: {
|
|
2029
|
+
requested: 'png';
|
|
2030
|
+
actual: 'svg';
|
|
2031
|
+
reason: 'png-rendering-unavailable';
|
|
2032
|
+
};
|
|
1961
2033
|
}
|
|
1962
2034
|
/**
|
|
1963
2035
|
* A named handle the model was told about (§2.4 structured-input injection).
|
|
@@ -2189,8 +2261,7 @@ declare function bundleZip(files: GeneratedFile[], name?: string): Promise<Gener
|
|
|
2189
2261
|
/**
|
|
2190
2262
|
* Chart builder — hand-rolled SVG (bar / line / scatter / pie), styled with the
|
|
2191
2263
|
* repo `dataviz` categorical palette (§9-RESOLVED #5). Zero dependency; renders
|
|
2192
|
-
* to a
|
|
2193
|
-
* that SVG (browser-only — falls back to SVG bytes where canvas is absent).
|
|
2264
|
+
* to a themeable SVG string or draws the same layout on a 2D canvas for PNG.
|
|
2194
2265
|
*
|
|
2195
2266
|
* This follows the dataviz method: fixed-order categorical hues (never cycled),
|
|
2196
2267
|
* thin marks, a legend for ≥2 series, recessive grid/axes, text in ink tokens
|
|
@@ -2280,9 +2351,8 @@ interface RunPythonOptions {
|
|
|
2280
2351
|
map?: TokenMap;
|
|
2281
2352
|
/** Real structured data bound to INPUT_ROWS/INPUT_TABLE/INPUT_TEXT handles. */
|
|
2282
2353
|
inputs?: InputBindings;
|
|
2283
|
-
/** Same-origin URL
|
|
2284
|
-
*
|
|
2285
|
-
* network lock relies on the JS guard + the PAGE CSP (see note below). */
|
|
2354
|
+
/** Same-origin worker URL. Set CSP on the served worker response.
|
|
2355
|
+
* If omitted, the SDK uses a Blob worker under the creating page's CSP. */
|
|
2286
2356
|
workerUrl?: string;
|
|
2287
2357
|
/** App-origin mirror base (default `/pyodide/`). */
|
|
2288
2358
|
mirrorBase?: string;
|
|
@@ -2290,21 +2360,12 @@ interface RunPythonOptions {
|
|
|
2290
2360
|
packages?: readonly string[];
|
|
2291
2361
|
/** Vendored pure-python wheel handles (micropip, same-origin). */
|
|
2292
2362
|
wheels?: string[];
|
|
2293
|
-
/**
|
|
2294
|
-
*
|
|
2295
|
-
* moment the `run` phase begins), the worker is terminated on overrun.
|
|
2296
|
-
* Default 60s. NOTE: this does NOT include the one-time runtime/package
|
|
2297
|
-
* download on first use — that is covered by `loadTimeoutMs` (F3), so a slow
|
|
2298
|
-
* first-run download never races the compute budget.
|
|
2299
|
-
*/
|
|
2363
|
+
/** Compute timeout in milliseconds from the first run progress message.
|
|
2364
|
+
* Default 60 seconds. Expiration terminates the worker. */
|
|
2300
2365
|
timeoutMs?: number;
|
|
2301
|
-
/**
|
|
2302
|
-
*
|
|
2303
|
-
*
|
|
2304
|
-
* RE-ARMED on every load-progress message, so each package gets its own fresh
|
|
2305
|
-
* window on a slow link. Once the runtime is cached this phase is near-instant
|
|
2306
|
-
* and the compute budget takes over. Default 180s. (F3)
|
|
2307
|
-
*/
|
|
2366
|
+
/** Runtime and package load timeout in milliseconds. Runtime and package
|
|
2367
|
+
* progress reset it before computation starts. Defaults to the greater of
|
|
2368
|
+
* 180 seconds and the compute timeout. */
|
|
2308
2369
|
loadTimeoutMs?: number;
|
|
2309
2370
|
/** Progress callback (runtime/package/run/stdout/stderr). */
|
|
2310
2371
|
onProgress?: (p: RunProgress) => void;
|
|
@@ -2326,39 +2387,11 @@ declare function runPythonWithBundle(codeOrPayload: string | RunPythonPayload, o
|
|
|
2326
2387
|
}>;
|
|
2327
2388
|
|
|
2328
2389
|
/**
|
|
2329
|
-
*
|
|
2330
|
-
*
|
|
2331
|
-
*
|
|
2332
|
-
*
|
|
2333
|
-
*
|
|
2334
|
-
* permits only credential-free GETs to the concrete Pyodide, model, and
|
|
2335
|
-
* transformers mirrors; it blocks same-origin application/API traffic too.
|
|
2336
|
-
*
|
|
2337
|
-
* DEFENCE IN DEPTH. This JS-level guard is the BELT; the browser-enforced CSP
|
|
2338
|
-
* (`connect-src 'self'` on the worker's own HTTP response — served by the
|
|
2339
|
-
* consumer, e.g. cloakup's /_cloak/pyodide-worker route) is the BRACES. Either
|
|
2340
|
-
* alone blocks the tested off-origin connect requests; together, a bypass of
|
|
2341
|
-
* one is caught by the other.
|
|
2342
|
-
*
|
|
2343
|
-
* WHY a narrow same-origin read stays allowed: Pyodide's own runtime + package loader
|
|
2344
|
-
* (`loadPyodide({indexURL})`, `loadPackage`, `micropip.install(url)`) fetch the
|
|
2345
|
-
* wasm + wheels over `fetch`/`importScripts`. Those targets are the APP-ORIGIN
|
|
2346
|
-
* pinned mirror (same-origin, version-locked, NO live PyPI). So the guard
|
|
2347
|
-
* ALLOWS GETs without bodies, caller headers, query strings, or cookies only at
|
|
2348
|
-
* `/pyodide/`, `/models/`, and `/vendor/transformers/`. XMLHttpRequest / WebSocket / EventSource /
|
|
2349
|
-
* sendBeacon have no legitimate use inside the sandbox (package loading uses
|
|
2350
|
-
* fetch) so they are neutered outright.
|
|
2351
|
-
*
|
|
2352
|
-
* PYODIDE HAS NO OTHER NETWORK PATH. CPython-in-WASM has no raw sockets; its
|
|
2353
|
-
* ONLY route to the network is the JS `fetch`/`XMLHttpRequest`/`WebSocket` this
|
|
2354
|
-
* guard controls (pyodide `pyfetch`, `js.fetch`, `requests`-via-`pyodide-http`
|
|
2355
|
-
* all funnel through JS fetch/XHR). This describes the guard's scope; it is not
|
|
2356
|
-
* a measurement of all network traffic or host-application handling.
|
|
2357
|
-
*
|
|
2358
|
-
* IMPORTANT: this function must stay FULLY SELF-CONTAINED (it references no
|
|
2359
|
-
* module-scope symbol) because the worker source is assembled by stringifying
|
|
2360
|
-
* it (`installNoNetworkGuard.toString()`), so the EXACT tested function is what
|
|
2361
|
-
* runs in the worker. Do not hoist helpers out of it.
|
|
2390
|
+
* JavaScript request guard shared by the Pyodide and speech-to-text workers.
|
|
2391
|
+
* The host owns browser-enforced CSP. This wrapper covers the named APIs
|
|
2392
|
+
* below. Dynamic import, nested workers and worker messaging are outside it.
|
|
2393
|
+
*
|
|
2394
|
+
* The function is serialized into worker source. Keep it self-contained.
|
|
2362
2395
|
*/
|
|
2363
2396
|
/** Options for the guard. */
|
|
2364
2397
|
interface NetworkGuardOptions {
|
|
@@ -2366,11 +2399,13 @@ interface NetworkGuardOptions {
|
|
|
2366
2399
|
selfOrigin: string;
|
|
2367
2400
|
/** Allow the fixed same-origin mirror GETs. Default true. */
|
|
2368
2401
|
allowSameOrigin?: boolean;
|
|
2402
|
+
/** Restrict mirror reads and classic script imports to these path prefixes. */
|
|
2403
|
+
mirrorPathPrefixes?: readonly string[];
|
|
2369
2404
|
}
|
|
2370
2405
|
/**
|
|
2371
2406
|
* Install the off-origin request guard on a worker/global scope, IN PLACE, before any
|
|
2372
|
-
* model/user code (or even Pyodide) runs.
|
|
2373
|
-
*
|
|
2407
|
+
* model/user code (or even Pyodide) runs. It captures the original
|
|
2408
|
+
* `fetch` and `importScripts` and mutates `scope` in place.
|
|
2374
2409
|
*
|
|
2375
2410
|
* Self-contained by design (see file header) so it can be stringified into the
|
|
2376
2411
|
* worker source verbatim.
|
|
@@ -2384,32 +2419,6 @@ declare function installNoNetworkGuard(scope: Record<string, unknown> & {
|
|
|
2384
2419
|
* so the worker runs the EXACT function this module's tests exercise. */
|
|
2385
2420
|
declare const NETWORK_GUARD_SOURCE: string;
|
|
2386
2421
|
|
|
2387
|
-
/**
|
|
2388
|
-
* Pyodide WEB-WORKER source (Tier B, spec §4). Owns CPython-in-WASM on its own
|
|
2389
|
-
* thread — no DOM, no window, no ambient authority. The main thread talks to it
|
|
2390
|
-
* only via structured-clone postMessage.
|
|
2391
|
-
*
|
|
2392
|
-
* WORKER SCOPE (enforced here + by the worker's CSP response header):
|
|
2393
|
-
* 1. OFF-ORIGIN REQUESTS — the worker guard (network-block.ts) is installed as the
|
|
2394
|
-
* VERY FIRST statement, before Pyodide or any model code runs. It is
|
|
2395
|
-
* inlined verbatim from the tested `installNoNetworkGuard` (via toString)
|
|
2396
|
-
* so the worker runs the exact function the tests exercise.
|
|
2397
|
-
* 2. SAME-ORIGIN MIRROR — Pyodide + packages load from the app-origin pinned
|
|
2398
|
-
* mirror (indexURL); the guard blocks covered off-origin fetches. Same-
|
|
2399
|
-
* origin mirror traffic is permitted and is not measured here.
|
|
2400
|
-
* 3. INPUT AS DATA — the real (already-detokenised) inputs are injected as
|
|
2401
|
-
* Python globals via `pyodide.toPy`, NEVER string-concatenated into the
|
|
2402
|
-
* source (§2.4 / §4.5), so a value that looks like code can't alter flow.
|
|
2403
|
-
* 4. MEMFS ONLY — outputs are read from Pyodide's in-memory `/out` dir; the
|
|
2404
|
-
* code cannot reach the real OS FS / OPFS / persistent storage.
|
|
2405
|
-
* 5. LIFECYCLE — the main-thread runner terminates this worker on timeout and
|
|
2406
|
-
* after every run (per-run teardown) to bound memory/leak growth.
|
|
2407
|
-
*
|
|
2408
|
-
* The source is a CLASSIC worker (importScripts loads pyodide.js). It is served
|
|
2409
|
-
* by the consumer from a same-origin URL whose HTTP response carries
|
|
2410
|
-
* `connect-src 'self'` (cloakup: /_cloak/pyodide-worker) so the browser enforces
|
|
2411
|
-
* the network lock independently of this JS guard.
|
|
2412
|
-
*/
|
|
2413
2422
|
/** Build the worker source string. `guardSource` is injected so the worker runs
|
|
2414
2423
|
* the identical, tested guard function. */
|
|
2415
2424
|
declare function buildPyodideWorkerSource(guardSource?: string): string;
|
|
@@ -2763,13 +2772,13 @@ interface RunCallOptions {
|
|
|
2763
2772
|
theme?: Theme;
|
|
2764
2773
|
/** Filename for the "download all as zip" bundle (multi-file). */
|
|
2765
2774
|
zipName?: string;
|
|
2766
|
-
/** run_python: same-origin
|
|
2775
|
+
/** run_python: same-origin worker URL. The host sets CSP on its response. */
|
|
2767
2776
|
workerUrl?: string;
|
|
2768
2777
|
/** run_python: app-origin package mirror base (default `/pyodide/`). */
|
|
2769
2778
|
mirrorBase?: string;
|
|
2770
2779
|
/** run_python: hard COMPUTE timeout (ms); the worker is terminated on overrun. */
|
|
2771
2780
|
timeoutMs?: number;
|
|
2772
|
-
/** run_python:
|
|
2781
|
+
/** run_python: runtime and package load timeout (ms). */
|
|
2773
2782
|
loadTimeoutMs?: number;
|
|
2774
2783
|
/** run_python: progress callback (runtime/package/run load steps). */
|
|
2775
2784
|
onProgress?: (p: RunProgress) => void;
|
|
@@ -3831,4 +3840,4 @@ interface CreateBrowserEngineOptions {
|
|
|
3831
3840
|
*/
|
|
3832
3841
|
declare function createBrowserEngine(options?: CreateBrowserEngineOptions): Promise<BrowserEngine>;
|
|
3833
3842
|
|
|
3834
|
-
export { ASR_WORKER_SOURCE, type ApplyReviewOptions, type ApplyReviewResult, AsrError, type AsrProgress, type AsrTask, type AudioLike, type BrowserEngine, BrowserEngineError, type BrowserTokenMap, type BrowserTokeniseResult, CATEGORICAL_DARK, CATEGORICAL_LIGHT, CODE_INTERPRETER_CAPABILITY_LABEL, CODE_INTERPRETER_SYSTEM_PROMPT, CODE_INTERPRETER_TOOLS, type ChartSeries, type ChartSpec, type Theme as ChartTheme, type ChartType, type CloakConversation, type CodeInterpreterCall, type CodeInterpreterCapability, type CodeInterpreterConfig, type CodeInterpreterKind, type CodeInterpreterManifest, type CodeInterpreterResult, type CodeInterpreterToolDescriptor, type CountersignedResult, CoverageStatus, type CreateBrowserEngineOptions, DEFAULT_MIRROR_BASE as DEFAULT_ASR_MIRROR_BASE, DEFAULT_MODEL as DEFAULT_ASR_MODEL, DEFAULT_RUNTIME_BASE as DEFAULT_ASR_RUNTIME_BASE, DEFAULT_ENHANCED_NER_MODEL_ID, DEFAULT_MIRROR_BASE$1 as DEFAULT_MIRROR_BASE, DEFAULT_WHEELS, DETECTION_LAYER_ORDER, type DetectedEntity, type DetectionLayerId, type DetectionLayerLoadHandle, type DetectionLayerPhase, type DetectionLayerProgress, type DetectionLayerReport, type DetectionLayerSnapshot, type DetectionLayerState, type DeviceKeyPair, type DeviceReceipt, DeviceReceiptError, type DeviceReceiptInput, type DocBlock, type EngineThreadInfo, type EngineThreadReason, type EnhancedGazetteerAsset, type EnhancedNerLoadResult, type EnhancedNerModelInfo, type EnhancedNerModelProgress, type EnhancedNerProgress, type ExtractFileForReviewResult, type ExtractOptions, type FailClosedRelay, type FailClosedRelayConfig, type FailClosedRelayResponse, type FileBuildClaim, type FileBuildFile, type FileBuildReceiptInput, type FileEgressClaim, type FileEgressFile, type FileEgressReceiptInput, type FileExtractFailure, type FileExtractKind, type FileExtractResult, type FileExtractSuccess, type FileFormat, type FileLike, type FileSpec, type GeneratedFile, HEADLINE_LANGUAGES, type InputBindings, type InputHandle, InterpreterError, type Row as InterpreterRow, type TokenMap as InterpreterTokenMap, LAYER_ACCURACY, LAYER_ACCURACY_PENDING_NOTE, LAYER_ACCURACY_PLACEHOLDER, type LayerAccuracyCopy, type LayerWaitOutcome, type LayerWaitResult, type LoadEnhancedNerModelOptions, type LoadEnhancedNerOptions, MICROPIP_WHEELS, type MakeFilePayload, type MakeFilesOptions, type ManualRedaction, MarkerFormat, NETWORK_GUARD_SOURCE, NerCoverage, NerOrgSpan, type NerTokenizerStyle, NerUnavailableError, NerUnavailableErrorShape, type NetworkGuardOptions, PORTAL_ENHANCED_NER_MODEL_ID, PRIVACY_TIERS, PYODIDE_PACKAGES, PYODIDE_VERSION, PYODIDE_WORKER_SOURCE, type PostureMarkerFormat, type PreparedRequestBodyResult, type PrivacyPosture, type PrivacyPostureOptions, RECEIPT_ATTESTATION_VERSION, type RebuildableFormat, type RebuiltFile, RelayError, type RelayTier, type RelayTierInput, type ResidualScanSpan, type ReviewDecision, type ReviewSpan, type ReviewSpanType, type ReviewTokenMap, type RowsOrHandle, type RunCallOptions, type RunProgress, type RunPythonOptions, type RunPythonPayload, type SelectionPart, type SelectionSplit, type SheetSpec, type SignDeviceReceiptOptions, type SpliceReviewedBodyOptions, SurrogateContinuity, SurrogateMode, SurrogateModeReport, TRANSCRIPTION_CAPABILITY_LABEL, TRANSCRIPTION_TOOLS, type TokeniseOptions, type TokeniseRequestBodyResult, type TokeniseReviewOptions, type TokeniseReviewResult, type TokenisedRequestBodyResult, type TranscribeOptions, type TranscriptSegment, type TranscriptionCapability, type TranscriptionConfig, type TranscriptionManifest, type TranscriptionResult, type TranscriptionToolDescriptor, type UnmeasurableReason, UserCoverageAcceptance, VALUE_CONSISTENCY_MAX_PER_VALUE, VALUE_CONSISTENCY_MAX_TOTAL, VALUE_CONSISTENCY_MIN_LENGTH, type Verdict, type VerdictCheck, WHISPER_LANGUAGES, WHISPER_MODELS, WHISPER_SAMPLE_RATE, type WaitForDetectionLayerOptions, type WhisperDtype, type WhisperModel, abortEnhancedNerLoad, accuracyStillPlaceholder, applyReviewDecisions, modelRoot as asrModelRoot, requiredMirrorFiles as asrRequiredMirrorFiles, runtimeUrl as asrRuntimeUrl, runtimeWasmBase as asrRuntimeWasmBase, beginDetectionLayerLoad, bindConversationSurrogates, bindRows, bindValue, bridgeOrgConnectorSpans, buildAsrWorkerSource, buildFile, buildPyodideWorkerSource, buildReviewSpans, bundleZip, cancelDetectionLayer, canonicalise as canonicaliseReceipt, categorical, chartToSvg, classifyEntityType, classifyFileForExtraction, cloneConversation, codeInterpreter, createBrowserEngine, createFailClosedRelay, declareDetectionLayerUnsupported, decodeToPcm16k, defaultLanguageFromLocale, describeCodeInterpreter, describeTranscription, detectTokenizerStyle, detectionLayerProgressSink, detectionLayerReport, detectionLayerSnapshot, detectionLayerState, detokeniseString, detokeniseValue, engineThreadInfo, enhancedNerModelInfo, expandValueOccurrences, extractFileForReview, extractTextFromFile, fetchJwks, fetchReceiptByJti, fileBuildOf, fileEgressOf, generateDeviceKeyPair, hasWholeTokenOccurrence, indexOfWholeToken, installNoNetworkGuard, isCountersignedResult, isEnhancedNerModelActive, isNerLoadAbortError, isNonLatinNerModelActive, isPlaceIndexReady, isRebuildableFormat, isSupportedLanguage, isWholeTokenOccurrence, loadEnhancedGazetteer, loadEnhancedNerModel, loadNonLatinNerModel, makeFiles, makeFilesWithBundle, newConversation, nonLatinNerModelInfo, offerWasmNameGazetteerIfEmpty, onDetectionLayerChange, onEngineThreadChange, parseFileSpec, parseRunPython, prewarmPlaceIndex, privacyPosture, pyodideIndexUrl, rebuildTextFile, receiptHash as receiptHashAsync, recommendedNerThreads, reconstructOrgSpans, renderSelectionSplit, replaceWholeTokenOccurrences, resampleLinear, residualRawPII, resolveModel as resolveAsrModel, resolveConversation, resolveWhisperLanguage, reviewWithGracefulCards, runPython, runPythonWithBundle, signDeviceReceipt, signFileBuildReceipt, signFileEgressReceipt, specsOf, splitSelectionIntoEntities, textLikelyContainsNames, transcribe, transcription, typeFromSurrogateMarker, unloadEnhancedGazetteer, unloadEnhancedNerModel, unloadNonLatinNerModel, vacateDetectionLayer, verifyCountersigned, verifyCountersignedJson, verifyDeviceReceipt, verifyReceipt, verifyChain as verifyReceiptChain, verifyReceiptJson, waitForDetectionLayer, wheelUrl };
|
|
3843
|
+
export { ASR_WORKER_SOURCE, type ApplyReviewOptions, type ApplyReviewResult, AsrError, type AsrProgress, type AsrTask, type AudioLike, type BrowserEngine, BrowserEngineError, type BrowserTokenMap, type BrowserTokeniseResult, CATEGORICAL_DARK, CATEGORICAL_LIGHT, CODE_INTERPRETER_CAPABILITY_LABEL, CODE_INTERPRETER_SYSTEM_PROMPT, CODE_INTERPRETER_TOOLS, type ChartSeries, type ChartSpec, type Theme as ChartTheme, type ChartType, type CloakConversation, type CodeInterpreterCall, type CodeInterpreterCapability, type CodeInterpreterConfig, type CodeInterpreterKind, type CodeInterpreterManifest, type CodeInterpreterResult, type CodeInterpreterToolDescriptor, type CountersignedResult, CoverageStatus, type CreateBrowserEngineOptions, DEFAULT_MIRROR_BASE as DEFAULT_ASR_MIRROR_BASE, DEFAULT_MODEL as DEFAULT_ASR_MODEL, DEFAULT_RUNTIME_BASE as DEFAULT_ASR_RUNTIME_BASE, DEFAULT_ENHANCED_NER_MODEL_ID, DEFAULT_MIRROR_BASE$1 as DEFAULT_MIRROR_BASE, DEFAULT_WHEELS, DETECTION_LAYER_ORDER, type DetectedEntity, type DetectionLayerId, type DetectionLayerLoadHandle, type DetectionLayerPhase, type DetectionLayerProgress, type DetectionLayerReport, type DetectionLayerSnapshot, type DetectionLayerState, type DeviceKeyPair, type DeviceReceipt, DeviceReceiptError, type DeviceReceiptInput, type DocBlock, type EngineThreadInfo, type EngineThreadReason, type EnhancedGazetteerAsset, type EnhancedNerLoadResult, type EnhancedNerModelInfo, type EnhancedNerModelProgress, type EnhancedNerProgress, type ExtractFileForReviewResult, type ExtractOptions, type FailClosedRelay, type FailClosedRelayConfig, type FailClosedRelayResponse, type FileBuildClaim, type FileBuildFile, type FileBuildReceiptInput, type FileEgressClaim, type FileEgressFile, type FileEgressReceiptInput, type FileExtractFailure, type FileExtractKind, type FileExtractResult, type FileExtractSuccess, type FileFormat, type FileLike, type FileSpec, type GeneratedFile, HEADLINE_LANGUAGES, type InputBindings, type InputHandle, InterpreterError, type Row as InterpreterRow, type TokenMap as InterpreterTokenMap, LAYER_ACCURACY, LAYER_ACCURACY_PENDING_NOTE, LAYER_ACCURACY_PLACEHOLDER, type LayerAccuracyCopy, type LayerWaitOutcome, type LayerWaitResult, type LoadEnhancedNerModelOptions, type LoadEnhancedNerOptions, MICROPIP_WHEELS, type MakeFilePayload, type MakeFilesOptions, type ManualRedaction, MarkerFormat, type ModeLedger, type ModeReviewLike, type ModeSpanLike, NETWORK_GUARD_SOURCE, NerCoverage, NerOrgSpan, type NerTokenizerStyle, NerUnavailableError, NerUnavailableErrorShape, type NetworkGuardOptions, PORTAL_ENHANCED_NER_MODEL_ID, PRIVACY_TIERS, PYODIDE_PACKAGES, PYODIDE_VERSION, PYODIDE_WORKER_SOURCE, type PostureMarkerFormat, type PreparedRequestBodyResult, type PrivacyMode, type PrivacyPosture, type PrivacyPostureOptions, RECEIPT_ATTESTATION_VERSION, type RebuildableFormat, type RebuiltFile, RelayError, type RelayTier, type RelayTierInput, type ResidualScanSpan, type ReviewDecision, type ReviewSpan, type ReviewSpanType, type ReviewTokenMap, type RowsOrHandle, type RunCallOptions, type RunProgress, type RunPythonOptions, type RunPythonPayload, type SelectionPart, type SelectionSplit, type SheetSpec, type SignDeviceReceiptOptions, type SpliceReviewedBodyOptions, SurrogateContinuity, SurrogateMode, SurrogateModeReport, TRANSCRIPTION_CAPABILITY_LABEL, TRANSCRIPTION_TOOLS, type TokeniseOptions, type TokeniseRequestBodyResult, type TokeniseReviewOptions, type TokeniseReviewResult, type TokenisedRequestBodyResult, type TranscribeOptions, type TranscriptSegment, type TranscriptionCapability, type TranscriptionConfig, type TranscriptionManifest, type TranscriptionResult, type TranscriptionToolDescriptor, type UnmeasurableReason, UserCoverageAcceptance, VALUE_CONSISTENCY_MAX_PER_VALUE, VALUE_CONSISTENCY_MAX_TOTAL, VALUE_CONSISTENCY_MIN_LENGTH, type Verdict, type VerdictCheck, WHISPER_LANGUAGES, WHISPER_MODELS, WHISPER_SAMPLE_RATE, type WaitForDetectionLayerOptions, type WhisperDtype, type WhisperModel, abortEnhancedNerLoad, accuracyStillPlaceholder, applyPrivacyMode, applyPrivacyModeToReview, applyReviewDecisions, modelRoot as asrModelRoot, requiredMirrorFiles as asrRequiredMirrorFiles, runtimeUrl as asrRuntimeUrl, runtimeWasmBase as asrRuntimeWasmBase, beginDetectionLayerLoad, bindConversationSurrogates, bindRows, bindValue, bridgeOrgConnectorSpans, buildAsrWorkerSource, buildFile, buildPyodideWorkerSource, buildReviewSpans, bundleZip, cancelDetectionLayer, canonicalise as canonicaliseReceipt, categorical, chartToSvg, classifyEntityType, classifyFileForExtraction, cloneConversation, codeInterpreter, copyPrivacyLedger, createBrowserEngine, createFailClosedRelay, createModeLedger, declareDetectionLayerUnsupported, decodeToPcm16k, defaultLanguageFromLocale, describeCodeInterpreter, describeTranscription, detectTokenizerStyle, detectionLayerProgressSink, detectionLayerReport, detectionLayerSnapshot, detectionLayerState, detokeniseString, detokeniseValue, engineThreadInfo, enhancedNerModelInfo, expandValueOccurrences, extractFileForReview, extractTextFromFile, fetchJwks, fetchReceiptByJti, fileBuildOf, fileEgressOf, generateDeviceKeyPair, hasWholeTokenOccurrence, indexOfWholeToken, installNoNetworkGuard, isCountersignedResult, isEnhancedNerModelActive, isNerLoadAbortError, isNonLatinNerModelActive, isPlaceIndexReady, isRebuildableFormat, isSealedSecretMarker, isSupportedLanguage, isWholeTokenOccurrence, loadEnhancedGazetteer, loadEnhancedNerModel, loadNonLatinNerModel, makeFiles, makeFilesWithBundle, newConversation, nonLatinNerModelInfo, offerWasmNameGazetteerIfEmpty, onDetectionLayerChange, onEngineThreadChange, parseFileSpec, parseRunPython, prewarmPlaceIndex, privacyLedgerFor, privacyPosture, pyodideIndexUrl, rebuildTextFile, receiptHash as receiptHashAsync, recommendedNerThreads, reconstructOrgSpans, renderSelectionSplit, replaceWholeTokenOccurrences, resampleLinear, resetDefaultModeLedger, residualRawPII, resolveModel as resolveAsrModel, resolveConversation, resolveWhisperLanguage, reviewWithGracefulCards, runPython, runPythonWithBundle, signDeviceReceipt, signFileBuildReceipt, signFileEgressReceipt, specsOf, splitSelectionIntoEntities, textLikelyContainsNames, transcribe, transcription, typeFromSurrogateMarker, unloadEnhancedGazetteer, unloadEnhancedNerModel, unloadNonLatinNerModel, vacateDetectionLayer, verifyCountersigned, verifyCountersignedJson, verifyDeviceReceipt, verifyReceipt, verifyChain as verifyReceiptChain, verifyReceiptJson, waitForDetectionLayer, wheelUrl };
|