@cloakapi/sdk 1.5.0 → 1.6.1

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.
Files changed (38) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +24 -4
  3. package/dist/browser/index.d.mts +99 -89
  4. package/dist/browser/index.d.ts +99 -89
  5. package/dist/browser/index.js +1245 -123
  6. package/dist/browser/index.mjs +24 -8
  7. package/dist/browser/light.d.mts +3 -2
  8. package/dist/browser/light.d.ts +3 -2
  9. package/dist/browser/light.js +1 -1
  10. package/dist/browser/light.mjs +17 -2
  11. package/dist/browser/names/public.mjs +2 -2
  12. package/dist/browser/ner-pipeline-worker.mjs +3 -3
  13. package/dist/{chunk-6TMC2A6M.mjs → chunk-3MXGO6NA.mjs} +12 -8
  14. package/dist/{chunk-G6TZ6722.mjs → chunk-6E6T2YO5.mjs} +5 -915
  15. package/dist/{chunk-EY35G37A.mjs → chunk-746IWCJ4.mjs} +224 -1
  16. package/dist/chunk-L7RLVZMD.mjs +922 -0
  17. package/dist/{chunk-JV52VGVZ.mjs → chunk-TRWGRB2P.mjs} +1 -1
  18. package/dist/chunk-TWAQCP3Z.mjs +1258 -0
  19. package/dist/{chunk-36BC4GYL.mjs → chunk-VYGV643D.mjs} +262 -122
  20. package/dist/device/index.d.mts +1448 -0
  21. package/dist/device/index.d.ts +1448 -0
  22. package/dist/device/index.js +4539 -0
  23. package/dist/device/index.mjs +2462 -0
  24. package/dist/{disclosure-Cx6xS8Tj.d.mts → disclosure-BhM2Aqa2.d.mts} +2 -12
  25. package/dist/{disclosure-Cx6xS8Tj.d.ts → disclosure-BhM2Aqa2.d.ts} +2 -12
  26. package/dist/index.d.mts +3 -2
  27. package/dist/index.d.ts +3 -2
  28. package/dist/index.js +1 -1
  29. package/dist/index.mjs +14 -12
  30. package/dist/{local-pii-supplement-SUOJZO7X.mjs → local-pii-supplement-5KFFPDDN.mjs} +4 -4
  31. package/dist/node.d.mts +2 -1
  32. package/dist/node.d.ts +2 -1
  33. package/dist/node.js +311 -58
  34. package/dist/node.mjs +18 -12
  35. package/dist/request-body-slots-BMShK1YO.d.mts +56 -0
  36. package/dist/request-body-slots-BMShK1YO.d.ts +56 -0
  37. package/package.json +9 -2
  38. package/dist/{chunk-PEDVEDAW.mjs → chunk-66SEKCCN.mjs} +8 -8
@@ -1,8 +1,9 @@
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, V as ValuePlacementWarning, E as ExactReviewHandler, R as ReviewProcessingStatus, l as MarkerFormat } from '../disclosure-Cx6xS8Tj.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-Cx6xS8Tj.js';
4
+ import { a as SurrogateModeReport, S as SurrogateMode, p as SurrogateContinuity, E as ExactReviewHandler, R as ReviewProcessingStatus, l as MarkerFormat } from '../disclosure-BhM2Aqa2.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-BhM2Aqa2.js';
6
+ import { V as ValuePlacementWarning } from '../request-body-slots-BMShK1YO.js';
6
7
 
7
8
  /**
8
9
  * WHERE THE TOKENISER WASM RUNS.
@@ -361,13 +362,12 @@ declare function onDetectionLayerChange(fn: (s: DetectionLayerSnapshot) => void)
361
362
  */
362
363
  declare function detectionLayerReport(): DetectionLayerReport;
363
364
  /**
364
- * The handle an in-flight load writes through. Every method is a NO-OP once the
365
- * load has finished (ready, failed or cancelled), so a late `progress_callback`
366
- * 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.
367
367
  */
368
368
  interface DetectionLayerLoadHandle {
369
369
  readonly id: DetectionLayerId;
370
- /** True until the layer is ready / failed / cancelled. */
370
+ /** True while this handle's load is in flight. */
371
371
  active(): boolean;
372
372
  /** Report progress in BYTES. Omit the numbers and it becomes unmeasurable. */
373
373
  progress(p: {
@@ -1004,6 +1004,67 @@ declare function resolveConversation(supplied?: CloakConversation): {
1004
1004
  continuity: SurrogateContinuity;
1005
1005
  };
1006
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
+
1007
1068
  /** The on-the-wire gazetteer asset shape (what a surface hosts + downloads). */
1008
1069
  interface EnhancedGazetteerAsset {
1009
1070
  id?: string;
@@ -1575,6 +1636,12 @@ declare function verifyReceipt(
1575
1636
  opts?: { jwksJson?: string | null; verifyLink?: string },
1576
1637
  ): Promise<Verdict>;
1577
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
+ */
1578
1645
  declare function fetchReceiptByJti(jti: string): Promise<unknown>;
1579
1646
  declare function fetchJwks(): Promise<string | null>;
1580
1647
 
@@ -1957,6 +2024,12 @@ interface GeneratedFile {
1957
2024
  mime: string;
1958
2025
  /** The raw file bytes, built on-device from real detokenised data. */
1959
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
+ };
1960
2033
  }
1961
2034
  /**
1962
2035
  * A named handle the model was told about (§2.4 structured-input injection).
@@ -2188,8 +2261,7 @@ declare function bundleZip(files: GeneratedFile[], name?: string): Promise<Gener
2188
2261
  /**
2189
2262
  * Chart builder — hand-rolled SVG (bar / line / scatter / pie), styled with the
2190
2263
  * repo `dataviz` categorical palette (§9-RESOLVED #5). Zero dependency; renders
2191
- * to a crisp, themeable SVG string. PNG is an OffscreenCanvas rasterisation of
2192
- * 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.
2193
2265
  *
2194
2266
  * This follows the dataviz method: fixed-order categorical hues (never cycled),
2195
2267
  * thin marks, a legend for ≥2 series, recessive grid/axes, text in ink tokens
@@ -2279,9 +2351,8 @@ interface RunPythonOptions {
2279
2351
  map?: TokenMap;
2280
2352
  /** Real structured data bound to INPUT_ROWS/INPUT_TABLE/INPUT_TEXT handles. */
2281
2353
  inputs?: InputBindings;
2282
- /** Same-origin URL of the CSP-hardened worker script (STRONGLY preferred — it
2283
- * carries `connect-src 'self'`). If omitted, a Blob worker is used, whose
2284
- * 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. */
2285
2356
  workerUrl?: string;
2286
2357
  /** App-origin mirror base (default `/pyodide/`). */
2287
2358
  mirrorBase?: string;
@@ -2289,21 +2360,12 @@ interface RunPythonOptions {
2289
2360
  packages?: readonly string[];
2290
2361
  /** Vendored pure-python wheel handles (micropip, same-origin). */
2291
2362
  wheels?: string[];
2292
- /**
2293
- * Hard COMPUTE timeout in ms — applied to the actual code run (from the
2294
- * moment the `run` phase begins), the worker is terminated on overrun.
2295
- * Default 60s. NOTE: this does NOT include the one-time runtime/package
2296
- * download on first use — that is covered by `loadTimeoutMs` (F3), so a slow
2297
- * first-run download never races the compute budget.
2298
- */
2363
+ /** Compute timeout in milliseconds from the first run progress message.
2364
+ * Default 60 seconds. Expiration terminates the worker. */
2299
2365
  timeoutMs?: number;
2300
- /**
2301
- * First-load budget in ms for the one-time Pyodide runtime + package download
2302
- * (spec §5.2 — "~13 MB, first use only"). Generous by default (180s) and
2303
- * RE-ARMED on every load-progress message, so each package gets its own fresh
2304
- * window on a slow link. Once the runtime is cached this phase is near-instant
2305
- * and the compute budget takes over. Default 180s. (F3)
2306
- */
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. */
2307
2369
  loadTimeoutMs?: number;
2308
2370
  /** Progress callback (runtime/package/run/stdout/stderr). */
2309
2371
  onProgress?: (p: RunProgress) => void;
@@ -2325,39 +2387,11 @@ declare function runPythonWithBundle(codeOrPayload: string | RunPythonPayload, o
2325
2387
  }>;
2326
2388
 
2327
2389
  /**
2328
- * OFF-ORIGIN REQUEST BLOCKER — the #1 gate (spec §4.2, §8.2 Phase 2).
2329
- *
2330
- * The single most important control of the whole feature: the Pyodide worker
2331
- * that runs arbitrary model/user Python against the user's REAL, detokenised
2332
- * data must be unable to make the off-origin calls covered by this guard. It
2333
- * permits only credential-free GETs to the concrete Pyodide, model, and
2334
- * transformers mirrors; it blocks same-origin application/API traffic too.
2335
- *
2336
- * DEFENCE IN DEPTH. This JS-level guard is the BELT; the browser-enforced CSP
2337
- * (`connect-src 'self'` on the worker's own HTTP response — served by the
2338
- * consumer, e.g. cloakup's /_cloak/pyodide-worker route) is the BRACES. Either
2339
- * alone blocks the tested off-origin connect requests; together, a bypass of
2340
- * one is caught by the other.
2341
- *
2342
- * WHY a narrow same-origin read stays allowed: Pyodide's own runtime + package loader
2343
- * (`loadPyodide({indexURL})`, `loadPackage`, `micropip.install(url)`) fetch the
2344
- * wasm + wheels over `fetch`/`importScripts`. Those targets are the APP-ORIGIN
2345
- * pinned mirror (same-origin, version-locked, NO live PyPI). So the guard
2346
- * ALLOWS GETs without bodies, caller headers, query strings, or cookies only at
2347
- * `/pyodide/`, `/models/`, and `/vendor/transformers/`. XMLHttpRequest / WebSocket / EventSource /
2348
- * sendBeacon have no legitimate use inside the sandbox (package loading uses
2349
- * fetch) so they are neutered outright.
2350
- *
2351
- * PYODIDE HAS NO OTHER NETWORK PATH. CPython-in-WASM has no raw sockets; its
2352
- * ONLY route to the network is the JS `fetch`/`XMLHttpRequest`/`WebSocket` this
2353
- * guard controls (pyodide `pyfetch`, `js.fetch`, `requests`-via-`pyodide-http`
2354
- * all funnel through JS fetch/XHR). This describes the guard's scope; it is not
2355
- * a measurement of all network traffic or host-application handling.
2356
- *
2357
- * IMPORTANT: this function must stay FULLY SELF-CONTAINED (it references no
2358
- * module-scope symbol) because the worker source is assembled by stringifying
2359
- * it (`installNoNetworkGuard.toString()`), so the EXACT tested function is what
2360
- * 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.
2361
2395
  */
2362
2396
  /** Options for the guard. */
2363
2397
  interface NetworkGuardOptions {
@@ -2365,11 +2399,13 @@ interface NetworkGuardOptions {
2365
2399
  selfOrigin: string;
2366
2400
  /** Allow the fixed same-origin mirror GETs. Default true. */
2367
2401
  allowSameOrigin?: boolean;
2402
+ /** Restrict mirror reads and classic script imports to these path prefixes. */
2403
+ mirrorPathPrefixes?: readonly string[];
2368
2404
  }
2369
2405
  /**
2370
2406
  * Install the off-origin request guard on a worker/global scope, IN PLACE, before any
2371
- * model/user code (or even Pyodide) runs. Idempotent-safe: it captures the
2372
- * original `fetch` once. Returns nothing — it mutates `scope`.
2407
+ * model/user code (or even Pyodide) runs. It captures the original
2408
+ * `fetch` and `importScripts` and mutates `scope` in place.
2373
2409
  *
2374
2410
  * Self-contained by design (see file header) so it can be stringified into the
2375
2411
  * worker source verbatim.
@@ -2383,32 +2419,6 @@ declare function installNoNetworkGuard(scope: Record<string, unknown> & {
2383
2419
  * so the worker runs the EXACT function this module's tests exercise. */
2384
2420
  declare const NETWORK_GUARD_SOURCE: string;
2385
2421
 
2386
- /**
2387
- * Pyodide WEB-WORKER source (Tier B, spec §4). Owns CPython-in-WASM on its own
2388
- * thread — no DOM, no window, no ambient authority. The main thread talks to it
2389
- * only via structured-clone postMessage.
2390
- *
2391
- * WORKER SCOPE (enforced here + by the worker's CSP response header):
2392
- * 1. OFF-ORIGIN REQUESTS — the worker guard (network-block.ts) is installed as the
2393
- * VERY FIRST statement, before Pyodide or any model code runs. It is
2394
- * inlined verbatim from the tested `installNoNetworkGuard` (via toString)
2395
- * so the worker runs the exact function the tests exercise.
2396
- * 2. SAME-ORIGIN MIRROR — Pyodide + packages load from the app-origin pinned
2397
- * mirror (indexURL); the guard blocks covered off-origin fetches. Same-
2398
- * origin mirror traffic is permitted and is not measured here.
2399
- * 3. INPUT AS DATA — the real (already-detokenised) inputs are injected as
2400
- * Python globals via `pyodide.toPy`, NEVER string-concatenated into the
2401
- * source (§2.4 / §4.5), so a value that looks like code can't alter flow.
2402
- * 4. MEMFS ONLY — outputs are read from Pyodide's in-memory `/out` dir; the
2403
- * code cannot reach the real OS FS / OPFS / persistent storage.
2404
- * 5. LIFECYCLE — the main-thread runner terminates this worker on timeout and
2405
- * after every run (per-run teardown) to bound memory/leak growth.
2406
- *
2407
- * The source is a CLASSIC worker (importScripts loads pyodide.js). It is served
2408
- * by the consumer from a same-origin URL whose HTTP response carries
2409
- * `connect-src 'self'` (cloakup: /_cloak/pyodide-worker) so the browser enforces
2410
- * the network lock independently of this JS guard.
2411
- */
2412
2422
  /** Build the worker source string. `guardSource` is injected so the worker runs
2413
2423
  * the identical, tested guard function. */
2414
2424
  declare function buildPyodideWorkerSource(guardSource?: string): string;
@@ -2762,13 +2772,13 @@ interface RunCallOptions {
2762
2772
  theme?: Theme;
2763
2773
  /** Filename for the "download all as zip" bundle (multi-file). */
2764
2774
  zipName?: string;
2765
- /** run_python: same-origin CSP-hardened worker URL (strongly preferred). */
2775
+ /** run_python: same-origin worker URL. The host sets CSP on its response. */
2766
2776
  workerUrl?: string;
2767
2777
  /** run_python: app-origin package mirror base (default `/pyodide/`). */
2768
2778
  mirrorBase?: string;
2769
2779
  /** run_python: hard COMPUTE timeout (ms); the worker is terminated on overrun. */
2770
2780
  timeoutMs?: number;
2771
- /** run_python: first-load budget (ms) for the one-time runtime/package download (F3). */
2781
+ /** run_python: runtime and package load timeout (ms). */
2772
2782
  loadTimeoutMs?: number;
2773
2783
  /** run_python: progress callback (runtime/package/run load steps). */
2774
2784
  onProgress?: (p: RunProgress) => void;
@@ -3830,4 +3840,4 @@ interface CreateBrowserEngineOptions {
3830
3840
  */
3831
3841
  declare function createBrowserEngine(options?: CreateBrowserEngineOptions): Promise<BrowserEngine>;
3832
3842
 
3833
- 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 };