Desktop app that records your on-screen work session and uses the GitHub Copilot SDK to reconstruct it as an intent + ordered steps, then builds a reusable Skill or Automation for Microsoft Autopilots like Scout, Microsoft Copilot Cowork, or Copilot Studio.
TypeScript agent-skillsai-agentsautomationcopilotcopilot-clicopilot-coworkcopilot-studioelectronmicrosoft-scoutscreen-recording
Prepare release 0.4.0 while preserving main README
adileid11df4c44b5a
diff --cc .github/workflows/non-windows.ymlindex c9f543a,ac3ce45..6247bb4--- a/.github/workflows/non-windows.yml+++ b/.github/workflows/non-windows.yml@@@ -58,23 -61,8 +61,23 @@@ jobstest -x "$stub"plutil -lint "$plist"- - run: npm ci+ - run: npm ci --ignore-scripts=false --dangerously-allow-all-scripts=false --strict-allow-scripts- - run: npm run compliance:licenses+ - name: Cache compliance source downloads+ uses: actions/cache@v4+ with:+ path: .compliance-cache+ key: compliance-${{ runner.os }}-${{ hashFiles('third_party/compliance-policy.json') }}+ restore-keys: compliance-${{ runner.os }}-++ # macOS arm64 is a release target, so it must be able to produce the complete+ # corresponding-source bundle. Linux installs from source and only needs the+ # license inventory.+ - name: Prepare compliance materials (release target)+ if: runner.os == 'macOS'+ run: npm run compliance:prepare+ - name: Prepare compliance licenses (source-install platform)+ if: runner.os != 'macOS'+ run: npm run compliance:licenses- name: Verify platform license coveragerun: |node --input-type=module -e "diff --cc .github/workflows/windows.ymlindex fb40037,177874f..9ca15a2--- a/.github/workflows/windows.yml+++ b/.github/workflows/windows.yml@@@ -67,13 -67,9 +67,16 @@@ jobsarchitecture: ${{ matrix.arch }}cache: npm+ - name: Validate lockfile portability+ run: npm run check:lockfile++ - name: Cache compliance source downloads+ uses: actions/cache@v4+ with:+ path: .compliance-cache+ key: compliance-windows-${{ matrix.arch }}-${{ hashFiles('third_party/compliance-policy.json') }}+ restore-keys: compliance-windows-${{ matrix.arch }}-+- name: Install native dependenciesshell: pwshrun: |diff --cc electron/sensitive/frame-redact.tsindex 0000000,3939c24..086b23dmode 000000,100644..100644--- a/electron/sensitive/frame-redact.ts+++ b/electron/sensitive/frame-redact.ts@@@ -1,0 -1,286 +1,286 @@@+ // Frame OCR + blur for the Advanced protection layer. When Advanced+ // protection is on, screen frames the describer would send to GitHub Copilot are+ // first OCR'd on-device; any word whose text trips the same detectors used for the+ // session's text (secrets, structured PII) — or matches a value already detected+ // elsewhere in the session — is covered with an opaque box before the JPEG leaves+ // the machine. The OCR text itself is never sent; only the blurred image is. Boxes+ // are solid and irreversible (safer than a reversible blur).++ import { createRequire } from "node:module";++ import {+ resolveOverlaps,+ scanStructuredPii,+ type SensitiveMatch,+ } from "../../common/sensitive";+ import { createLogger } from "../logger";+ import { frameSecretMatches } from "./frame-heuristics";+ import type { Ocr, OcrWord } from "./ocr";+ import { scanSecrets } from "./secrets";++ const require = createRequire(import.meta.url);+ const log = createLogger("Sensitive/frames");+-type Sharp = typeof import("sharp");++type Sharp = (typeof import("sharp"))["default"];+ let sharpMod: Sharp | null | undefined;+ function sharp(): Sharp | null {+ if (sharpMod === undefined) {+ try {+ sharpMod = require("sharp") as Sharp;+ } catch (err) {+ log.warn("sharp unavailable; frame blur disabled:", message(err));+ sharpMod = null;+ }+ }+ return sharpMod;+ }++ function message(err: unknown): string {+ return err instanceof Error ? err.message : String(err);+ }++ interface Rect {+ left: number;+ top: number;+ width: number;+ height: number;+ }++ /** A pixel box to paint over a sensitive region of a frame. */+ export type FrameBox = Rect;++ export interface FrameBoxOptions {+ width: number;+ height: number;+ /** Values already detected in the session's text (cross-feed blur). */+ knownValues?: string[];+ /** Padding added around each detected word box, in pixels. */+ padding?: number;+ }++ /**+ * Map every sensitive region in a set of OCR words to a padded pixel box. Runs the+ * shared detectors (secrets + structured PII) over the recognized text, plus a+ * literal search for known session values, then selects every OCR word whose+ * character span overlaps a match. Pure and side-effect-free (no sharp, no image+ * IO) so it can be exercised deterministically. Returns the boxes to blur.+ */+ export async function sensitiveFrameBoxes(words: OcrWord[], opts: FrameBoxOptions): Promise<FrameBox[]> {+ if (words.length === 0) return [];+ const padding = opts.padding ?? 4;+ const knownValues = [...new Set((opts.knownValues ?? []).filter((v) => v.length >= 3))];++ // Join words into one string, remembering each word's char span + box. Tesseract+ // often emits an "@" (or a value split around one) as its own token with spaces on+ // each side, e.g. `jordan.blake @ example.com`; a space next to "@" is never+ // meaningful in the values we detect, so we glue across it to keep emails intact+ // for the detectors. Other separators (spaces in card/phone numbers) are preserved.+ let joined = "";+ const spans: Array<{ start: number; end: number; word: OcrWord }> = [];+ for (const word of words) {+ const glue = joined.endsWith("@") || word.text.startsWith("@");+ if (joined && !glue) joined += " ";+ const start = joined.length;+ joined += word.text;+ spans.push({ start, end: joined.length, word });+ }++ const matches = await matchesInOcrText(joined, knownValues);+ if (matches.length === 0) return [];++ const rects: FrameBox[] = [];+ const seen = new Set<OcrWord>();+ for (const match of matches) {+ for (const span of spans) {+ if (span.start < match.end && match.start < span.end && !seen.has(span.word)) {+ seen.add(span.word);+ rects.push(boxFor(span.word, opts.width, opts.height, padding));+ }+ }+ }+ return rects;+ }++ /** All detector matches in the recognized text, plus literal known-value hits. */+ async function matchesInOcrText(+ text: string,+ knownValues: string[],+ ): Promise<SensitiveMatch[]> {+ const secrets = await scanSecrets(text);+ const pii = scanStructuredPii(text);+ // Frame-only, reading-independent structural detection: locates secret-shaped+ // regions (high-entropy tokens, credential assignments) even when OCR garbles+ // the exact glyphs, which the fixed-pattern secret detectors above require.+ // Recall-first — see frame-heuristics.ts for the trade-off.+ const structural = frameSecretMatches(text);+ const known: SensitiveMatch[] = [];+ for (const value of knownValues) {+ for (let i = text.indexOf(value); i >= 0; i = text.indexOf(value, i + 1)) {+ known.push({+ category: "password",+ label: "Known sensitive value",+ severity: "high",+ value,+ start: i,+ end: i + value.length,+ rank: 100,+ });+ }+ }+ return resolveOverlaps([...secrets, ...pii, ...structural, ...known]);+ }++ /** A padded, image-clamped box for one OCR word. */+ function boxFor(word: OcrWord, width: number, height: number, padding: number): Rect {+ const x0 = Math.max(0, Math.floor(word.bbox.x0) - padding);+ const y0 = Math.max(0, Math.floor(word.bbox.y0) - padding);+ const x1 = Math.min(width, Math.ceil(word.bbox.x1) + padding);+ const y1 = Math.min(height, Math.ceil(word.bbox.y1) + padding);+ return { left: x0, top: y0, width: Math.max(1, x1 - x0), height: Math.max(1, y1 - y0) };+ }++ /**+ * Redacts sensitive regions from screen frames before they're sent. The get_frames+ * tool uses the flags to decide policy:+ * - `active` false → Advanced protection is off; serve raw frames (baseline).+ * - `active` true, `ready` false → assets still loading; WITHHOLD frames.+ * - `active` true, `ready` true → blur detected regions per frame.+ */+ export interface FrameRedactor {+ /** Advanced protection is on for this run (frames must be protected). */+ readonly active: boolean;+ /** OCR is available; when false while `active`, the caller withholds frames. */+ readonly ready: boolean;+ /** Running tally of what was blurred across this analyze run, for the review+ * summary. Counts each source frame once (repeat requests are cached). */+ readonly stats: FrameRedactionStats;+ /** Produce a protected JPEG for a source frame, or null on failure (the caller+ * then withholds that frame rather than risk serving raw pixels). */+ redactFrame(sourceFramePath: string): Promise<Buffer | null>;+ }++ /** How many screen images were blurred, and how many on-screen regions in them. */+ export interface FrameRedactionStats {+ /** Distinct source frames in which at least one region was covered. */+ framesBlurred: number;+ /** Total regions (boxes) painted across all frames. */+ regionsBlurred: number;+ }++ const NO_FRAME_STATS: FrameRedactionStats = Object.freeze({ framesBlurred: 0, regionsBlurred: 0 });++ /** A no-op redactor for when Advanced protection is off — frames pass through. */+ export const INACTIVE_FRAME_REDACTOR: FrameRedactor = {+ active: false,+ ready: true,+ stats: NO_FRAME_STATS,+ redactFrame: async () => null,+ };++ /** A fail-safe redactor for when Advanced protection is ON but the scan could not+ * run (e.g. it threw): `active` with `ready:false` makes get_frames WITHHOLD every+ * frame rather than serve raw pixels we never got a chance to inspect. */+ export const WITHHOLD_FRAME_REDACTOR: FrameRedactor = {+ active: true,+ ready: false,+ stats: NO_FRAME_STATS,+ redactFrame: async () => null,+ };++ export interface FrameRedactorOptions {+ ocr: Ocr | null;+ /** Values already detected in the session's text (cross-feed blur). */+ knownValues: string[];+ /** Padding added around each detected word box, in pixels. */+ padding?: number;+ }++ /**+ * OCR-backed frame redactor. Recognizes words + boxes, runs the shared detectors+ * over the recognized text (plus a literal search for known session values), and+ * paints an opaque box over every matched word. Results are cached per source+ * frame path for the lifetime of the redactor (one analyze run).+ */+ export class OcrFrameRedactor implements FrameRedactor {+ readonly active = true;+ private readonly ocr: Ocr | null;+ private readonly knownValues: string[];+ private readonly padding: number;+ private readonly cache = new Map<string, Buffer | null>();+ private framesBlurred = 0;+ private regionsBlurred = 0;++ constructor(opts: FrameRedactorOptions) {+ this.ocr = opts.ocr;+ this.knownValues = [...new Set(opts.knownValues.filter((v) => v.length >= 3))];+ this.padding = opts.padding ?? 4;+ }++ get ready(): boolean {+ return this.ocr != null && sharp() != null;+ }++ get stats(): FrameRedactionStats {+ return { framesBlurred: this.framesBlurred, regionsBlurred: this.regionsBlurred };+ }++ async redactFrame(sourceFramePath: string): Promise<Buffer | null> {+ if (!this.ocr) return null;+ const cached = this.cache.get(sourceFramePath);+ if (cached !== undefined) return cached;+ let result: Buffer | null;+ try {+ result = await this.buildRedactedFrame(sourceFramePath);+ } catch (err) {+ log.warn("frame redaction failed:", message(err));+ result = null;+ }+ this.cache.set(sourceFramePath, result);+ return result;+ }++ private async buildRedactedFrame(sourceFramePath: string): Promise<Buffer | null> {+ const s = sharp();+ if (!s || !this.ocr) return null;++ // Throws on OCR engine failure → caught by redactFrame → the frame is withheld+ // (never served unblurred). A text-free frame resolves to [] and serves normally.+ const words = await this.ocr.recognize(sourceFramePath);+ const image = s(sourceFramePath);+ const meta = await image.metadata();+ const width = meta.width ?? 0;+ const height = meta.height ?? 0;+ if (!width || !height) return null;++ const boxes = await sensitiveFrameBoxes(words, {+ width,+ height,+ knownValues: this.knownValues,+ padding: this.padding,+ });+ if (boxes.length === 0) {+ // Nothing sensitive on screen — re-encode so callers uniformly serve the+ // redactor's output (and never accidentally serve the raw file bytes).+ return image.jpeg({ quality: 85 }).toBuffer();+ }++ // Count once per distinct source frame (redactFrame caches, so buildRedactedFrame+ // only runs on the first request for a given path).+ this.framesBlurred += 1;+ this.regionsBlurred += boxes.length;++ const overlays = boxes.map((box) => ({+ input: {+ create: {+ width: box.width,+ height: box.height,+ channels: 3 as const,+ background: { r: 17, g: 17, b: 17 },+ },+ },+ left: box.left,+ top: box.top,+ }));+ return image.composite(overlays).jpeg({ quality: 85 }).toBuffer();+ }+ }diff --cc electron/sensitive/ocr.tsindex 0000000,95890fb..a694010mode 000000,100644..100644--- a/electron/sensitive/ocr.ts+++ b/electron/sensitive/ocr.ts@@@ -1,0 -1,295 +1,295 @@@+ // On-device OCR for the Advanced protection layer. Wraps tesseract.js v7+ // (Apache-2.0) behind a small worker pool. Used only to LOCATE text regions in+ // screen frames so they can be blurred before a JPEG leaves the machine — the OCR+ // text itself is never sent to the model. Fully offline: the WASM core ships in+ // the tesseract.js-core node_module and the language data is a local file the+ // model manager downloads once into the app's models dir.++ import { existsSync } from "node:fs";+ import { createRequire } from "node:module";+ import path from "node:path";++ import { app } from "electron";++ import { createLogger } from "../logger";+ import { tessdataFileName } from "./tessdata-source";++ export { tessdataFileName };++ const require = createRequire(import.meta.url);+ const log = createLogger("Sensitive/ocr");+-type SharpModule = typeof import("sharp");++type SharpModule = (typeof import("sharp"))["default"];+ let sharpMod: SharpModule | null | undefined;+ function sharp(): SharpModule | null {+ if (sharpMod === undefined) {+ try {+ sharpMod = require("sharp") as SharpModule;+ } catch (err) {+ log.warn("sharp unavailable; OCR preprocessing disabled:", err instanceof Error ? err.message : err);+ sharpMod = null;+ }+ }+ return sharpMod;+ }++ // Captured screen frames are heavily downscaled (~1100px wide), which turns small+ // UI / spreadsheet text into OCR garbage — the detectors then match nothing and+ // sensitive regions would ship unblurred. Before recognizing, we upscale, drop to+ // grayscale, and stretch contrast so small text becomes legible to Tesseract. The+ // box coordinates are divided back down by the applied scale so callers still get+ // boxes in the SOURCE image's pixel space. Width is capped so a large display can't+ // blow up OCR cost.+ //+ // 3× was chosen by A/B'ing config candidates through the realistic degraded-frame+ // eval (evals/sensitive/ocr-realistic.ts). Dictionary-disable, user_defined_dpi,+ // PSM 11 and inversion all moved nothing. 4× is NOT a free win: it lets one extra+ // borderline token (a 20-char AWS key) land on-pattern, but at the same time flips a+ // digit in a Visa number so it fails the Luhn check and leaks — trading a common,+ // high-value card for a rare vision-only key that captured terminal/clipboard text+ // usually cross-feeds anyway. So we stay at 3×; high-entropy secrets that appear+ // ONLY on screen are an accepted OCR gap (see the xfail cases in the eval).+ const OCR_UPSCALE = 3;+ const OCR_MAX_WIDTH = 3600;++ /** Upscale + grayscale + contrast-normalise an image for OCR. Returns the processed+ * buffer and the scale factor applied (so word boxes can be mapped back to source+ * pixels). Falls back to the original input at scale 1 if sharp is unavailable or+ * preprocessing fails. */+ async function preprocessForOcr(image: string | Buffer): Promise<{ input: string | Buffer; scale: number }> {+ const s = sharp();+ if (!s) return { input: image, scale: 1 };+ try {+ const pipeline = s(image);+ const meta = await pipeline.metadata();+ const width = meta.width ?? 0;+ if (!width) return { input: image, scale: 1 };+ const target = Math.min(width * OCR_UPSCALE, OCR_MAX_WIDTH);+ const scale = target / width;+ if (scale <= 1) return { input: image, scale: 1 };+ const buffer = await pipeline.resize({ width: Math.round(target) }).grayscale().normalise().toBuffer();+ return { input: buffer, scale };+ } catch (err) {+ log.warn("OCR preprocessing failed; using raw image:", err instanceof Error ? err.message : err);+ return { input: image, scale: 1 };+ }+ }++ /** Where downloaded on-device models live — shared with narration so one dir holds+ * them all. Overridable via SKILL_RECORDER_MODELS_DIR for tests/CI. */+ export function modelsCacheDir(): string {+ const override = process.env.SKILL_RECORDER_MODELS_DIR;+ if (override) return path.resolve(override);+ return path.join(app.getPath("userData"), "models");+ }++ /** LSTM-only engine — matches the fast LSTM traineddata and skips legacy components. */+ const OEM_LSTM_ONLY = 1;++ /** One recognized word with its pixel bounding box in the source image. */+ export interface OcrWord {+ text: string;+ confidence: number;+ bbox: { x0: number; y0: number; x1: number; y1: number };+ }++ type TesseractModule = typeof import("tesseract.js");+ type TWorker = Awaited<ReturnType<TesseractModule["createWorker"]>>;++ interface RawWord {+ text?: string;+ confidence?: number;+ bbox?: { x0: number; y0: number; x1: number; y1: number };+ }+ interface RawPage {+ blocks?: Array<{ paragraphs?: Array<{ lines?: Array<{ words?: RawWord[] }> }> }> | null;+ }++ /** Absolute path to the tesseract.js-core package dir (holds the WASM variants).+ * Resolved from node_modules at runtime like the app's other native deps. */+ export function resolveCorePath(): string {+ return path.dirname(require.resolve("tesseract.js-core/package.json"));+ }++ export interface OcrOptions {+ /** Directory containing the `<code>.traineddata` files (managed by the model manager). */+ langPath: string;+ /** Number of reusable workers. Small by default — a few frames per call. */+ poolSize?: number;+ }++ /**+ * A reusable pool of tesseract workers. Workers are expensive to create (each+ * loads the WASM core + language data), so they're built once on first use and+ * reused across recognitions. Recognitions beyond the pool size queue until a+ * worker frees up. `recognize` THROWS on engine failure (rather than returning an+ * empty result) so the frame redactor can tell "OCR failed" apart from "blank+ * screen" and withhold the frame instead of serving unblurred pixels; a genuinely+ * text-free image still resolves with an empty word list.+ *+ * Before recognition each image is upscaled + grayscaled + contrast-normalised+ * (see `preprocessForOcr`) because captured frames are downscaled enough that small+ * on-screen text would otherwise OCR to garbage and defeat the blur pass. Word boxes+ * are mapped back to the source image's pixel space before they're returned.+ */+ export class Ocr {+ private readonly langPath: string;+ private readonly lang: string;+ private readonly poolSize: number;+ private tesseract: TesseractModule | null = null;+ private workers: TWorker[] = [];+ private idle: TWorker[] = [];+ private readonly waiters: Array<{+ resolve: (worker: TWorker) => void;+ reject: (err: Error) => void;+ }> = [];+ private initPromise: Promise<void> | null = null;+ private terminated = false;++ constructor(opts: OcrOptions) {+ this.langPath = opts.langPath;+ this.lang = "eng";+ this.poolSize = Math.max(1, Math.min(4, opts.poolSize ?? 2));+ }++ /** True once the English tessdata exists and workers can be built. */+ isLanguageDataPresent(): boolean {+ return existsSync(path.join(this.langPath, tessdataFileName(this.lang)));+ }++ /** Eagerly build the worker pool so the first frame isn't slow and readiness is+ * genuine (surfaces a load failure now rather than at serve time). */+ async warm(): Promise<void> {+ await this.ensureInit();+ }++ private async ensureInit(): Promise<void> {+ if (this.initPromise) return this.initPromise;+ this.initPromise = (async () => {+ if (!this.isLanguageDataPresent()) {+ throw new Error("OCR language data is not available.");+ }+ // Build into a local list and only publish the pool once EVERY worker is up, so+ // a failure partway through doesn't leave half-built workers in the pool for a+ // retry to duplicate (and leak).+ const built: TWorker[] = [];+ try {+ for (let i = 0; i < this.poolSize; i++) built.push(await this.spawnWorker());+ } catch (err) {+ await Promise.all(built.map((w) => w.terminate().catch(() => undefined)));+ throw err;+ }+ if (this.terminated) {+ // terminate() ran while we were building: tear the new set down instead of+ // publishing it, so disabling protection mid-warm can't leave live workers.+ await Promise.all(built.map((w) => w.terminate().catch(() => undefined)));+ throw new Error("OCR engine has been terminated.");+ }+ this.workers.push(...built);+ this.idle.push(...built);+ })().catch((err) => {+ this.initPromise = null;+ throw err;+ });+ return this.initPromise;+ }++ /** Create one fully-configured worker. Extracted as a seam so the pool lifecycle+ * (build/rollback/terminate) can be unit-tested without the real WASM engine. */+ protected async spawnWorker(): Promise<TWorker> {+ const tesseract = (this.tesseract ??= await import("tesseract.js"));+ const corePath = resolveCorePath();+ const worker = await tesseract.createWorker(this.lang, OEM_LSTM_ONLY, {+ corePath,+ langPath: this.langPath,+ // "none": never touch a write-back cache; always read the local+ // traineddata from langPath. Fully offline, no network fallback.+ cacheMethod: "none",+ gzip: false,+ workerBlobURL: false,+ legacyCore: false,+ legacyLang: false,+ });+ // Treat each frame as one uniform block. On dense screen captures this+ // recovers far more text than the default auto-segmentation (which drops+ // regions it misjudges as non-text), maximizing recall for the blur pass.+ await worker.setParameters({ tessedit_pageseg_mode: tesseract.PSM.SINGLE_BLOCK });+ return worker;+ }++ /** Recognize words + boxes in one image (a JPEG file path or a Buffer). Throws on+ * engine failure so callers withhold the frame rather than treat a failed read as+ * "nothing to blur"; a successful read of a text-free image returns []. */+ async recognize(image: string | Buffer): Promise<OcrWord[]> {+ if (this.terminated) throw new Error("OCR engine has been terminated.");+ await this.ensureInit();+ const { input, scale } = await preprocessForOcr(image);+ const worker = await this.acquire();+ try {+ const { data } = await worker.recognize(input, {}, { blocks: true });+ return wordsFrom(data as unknown as RawPage, scale);+ } catch (err) {+ log.warn("recognize failed:", err instanceof Error ? err.message : err);+ throw err instanceof Error ? err : new Error(String(err));+ } finally {+ this.release(worker);+ }+ }++ private acquire(): Promise<TWorker> {+ if (this.terminated) return Promise.reject(new Error("OCR engine has been terminated."));+ const worker = this.idle.pop();+ if (worker) return Promise.resolve(worker);+ return new Promise<TWorker>((resolve, reject) => this.waiters.push({ resolve, reject }));+ }++ private release(worker: TWorker): void {+ // If the pool was torn down while this recognition was in flight, the worker has+ // already been terminated by terminate(); don't resurrect it into the idle set.+ if (this.terminated) return;+ const waiter = this.waiters.shift();+ if (waiter) waiter.resolve(worker);+ else this.idle.push(worker);+ }++ /** Tear down all workers (called when Advanced protection is disabled / on quit). */+ async terminate(): Promise<void> {+ this.terminated = true;+ const workers = this.workers;+ this.workers = [];+ this.idle = [];+ // Fail any queued recognitions right away so they withhold their frame instead of+ // waiting on an in-flight (possibly hung) recognize to hand back a now-dead worker.+ const pending = this.waiters.splice(0);+ for (const waiter of pending) waiter.reject(new Error("OCR engine has been terminated."));+ await Promise.all(workers.map((worker) => worker.terminate().catch(() => undefined)));+ }+ }++ /** Flatten a recognition result to non-empty words with boxes. Word boxes are in+ * the OCR (possibly upscaled) image space; dividing by `scale` maps them back to+ * the source image's pixel coordinates so callers can blur the original frame. */+ function wordsFrom(page: RawPage, scale = 1): OcrWord[] {+ const out: OcrWord[] = [];+ for (const block of page.blocks ?? []) {+ for (const para of block.paragraphs ?? []) {+ for (const line of para.lines ?? []) {+ for (const word of line.words ?? []) {+ const text = (word.text ?? "").trim();+ if (!text || !word.bbox) continue;+ out.push({+ text,+ confidence: typeof word.confidence === "number" ? word.confidence : 0,+ bbox: {+ x0: word.bbox.x0 / scale,+ y0: word.bbox.y0 / scale,+ x1: word.bbox.x1 / scale,+ y1: word.bbox.y1 / scale,+ },+ });+ }+ }+ }+ }+ return out;+ }diff --cc evals/sensitive/fixtures/templates.tsindex 0000000,445e90c..12f2a62mode 000000,100644..100644--- a/evals/sensitive/fixtures/templates.ts+++ b/evals/sensitive/fixtures/templates.ts@@@ -1,0 -1,311 +1,311 @@@+ // Realistic fixtures for the degraded-frame OCR eval. Each fixture is authored as+ // an SVG that mimics a real app surface (a spreadsheet with tinted cells, a dark+ // terminal, a billing form, a code editor) at a "native display" width, with small+ // UI-sized fonts — NOT the clean, oversized black-on-white text the older+ // ocr-images eval renders. The SVG is rendered then downscaled to a ~1108px capture+ // (see degrade.ts) before OCR, so the eval stresses exactly what broke in+ // production: small on-screen text going to OCR garbage.+ //+ // Ground truth is derived from the layout geometry itself (the rect we allocate for+ // each value), so it can never drift from what's drawn — no hand-maintained label+ // file. Every sensitive region carries an `entityType` for per-type recall, and may+ // carry an `xfail` reason for a known, accepted OCR gap.++ import type { GtRect } from "./degrade";+-export type SharpModule = typeof import("sharp");++export type SharpModule = (typeof import("sharp"))["default"];++ /** Entity taxonomy mirrored from common/sensitive.ts SensitiveCategory, used to+ * break recall down per detail type. */+ export type EntityType =+ | "ssn"+ | "credit-card"+ | "phone"+ | "email"+ | "api-key"+ | "jwt"+ | "private-key"+ | "password";++ export interface FixtureRegion {+ /** The literal on-screen text (for reporting + as a `knownValue` seed if needed). */+ text: string;+ /** Ground-truth rectangle in the fixture's hi-res coordinate space. */+ rect: GtRect;+ /** True when this region MUST be covered by a blur box before the frame ships. */+ sensitive: boolean;+ /** Detail type — required for sensitive regions (drives per-type recall). */+ entityType?: EntityType;+ /** When set, this sensitive region is a KNOWN OCR gap: a miss is reported XFAIL+ * (not a hard failure) and an unexpected catch is reported XPASS. */+ xfail?: string;+ }++ export interface RealisticFixture {+ id: string;+ about: string;+ hiResWidth: number;+ hiResHeight: number;+ svg: string;+ regions: FixtureRegion[];+ /** Values already known from the session's text channel (cross-feed blur). */+ knownValues?: string[];+ }++ function escapeXml(s: string): string {+ return s+ .replace(/&/g, "&")+ .replace(/</g, "<")+ .replace(/>/g, ">")+ .replace(/"/g, """)+ .replace(/'/g, "'");+ }++ const SANS = "Arial, 'Helvetica Neue', Helvetica, sans-serif";+ const MONO = "'DejaVu Sans Mono', 'Liberation Mono', 'Courier New', monospace";++ interface TextOpts {+ size: number;+ fill?: string;+ family?: string;+ weight?: number | "bold" | "normal";+ }+ interface RectOpts {+ fill?: string;+ stroke?: string;+ strokeWidth?: number;+ }++ /** Tiny imperative SVG builder that keeps drawn geometry and ground-truth regions+ * in lock-step. Text is placed by its cell so a value's ground-truth rect is the+ * cell we drew it in (robust to per-platform font-metric variance). */+ class Canvas {+ private readonly parts: string[] = [];+ readonly regions: FixtureRegion[] = [];++ constructor(+ readonly width: number,+ readonly height: number,+ background: string,+ ) {+ this.parts.push(`<rect width="${width}" height="${height}" fill="${background}"/>`);+ }++ rect(x: number, y: number, w: number, h: number, opts: RectOpts = {}): void {+ const fill = opts.fill ?? "none";+ const stroke = opts.stroke ? ` stroke="${opts.stroke}" stroke-width="${opts.strokeWidth ?? 1}"` : "";+ this.parts.push(`<rect x="${x}" y="${y}" width="${w}" height="${h}" fill="${fill}"${stroke}/>`);+ }++ /** Draw text with its LEFT edge at x and BASELINE at y. */+ text(x: number, y: number, s: string, opts: TextOpts): void {+ const family = opts.family ?? SANS;+ const weight = opts.weight ? ` font-weight="${opts.weight}"` : "";+ this.parts.push(+ `<text x="${x}" y="${y}" font-family="${family}" font-size="${opts.size}" fill="${opts.fill ?? "#111"}"${weight}>${escapeXml(s)}</text>`,+ );+ }++ /** Draw a value inside a cell [cx,cy,cw,ch] and record its ground-truth rect as+ * that cell (optionally sensitive). Text is vertically centered on the cell. */+ cell(+ cx: number,+ cy: number,+ cw: number,+ ch: number,+ value: string,+ text: TextOpts,+ region?: Omit<FixtureRegion, "rect" | "text">,+ ): void {+ const padX = Math.round(ch * 0.22);+ const baseline = cy + Math.round(ch * 0.5 + text.size * 0.35);+ this.text(cx + padX, baseline, value, text);+ if (region) {+ this.regions.push({ text: value, rect: { x0: cx, y0: cy, x1: cx + cw, y1: cy + ch }, ...region });+ }+ }++ svg(): string {+ return `<svg xmlns="http://www.w3.org/2000/svg" width="${this.width}" height="${this.height}">${this.parts.join("")}</svg>`;+ }+ }++ /* -------------------------------------------------------------------------- */+ /* Fixture: payroll spreadsheet — SSNs + phones in a tinted grid. */+ /* -------------------------------------------------------------------------- */++ function spreadsheetPayroll(): RealisticFixture {+ const W = 1920;+ const rowH = 58;+ const top = 150;+ const cols = [+ { key: "name", x: 40, w: 460, label: "Employee" },+ { key: "ssn", x: 520, w: 420, label: "SSN" },+ { key: "phone", x: 960, w: 520, label: "Phone" },+ ];+ const rows: Array<{ name: string; ssn: string; phone: string }> = [+ { name: "Ava Chen", ssn: "123-45-6789", phone: "(415) 555-0132" },+ { name: "Liam Ortiz", ssn: "234-56-7890", phone: "(212) 555-0147" },+ { name: "Noah Kim", ssn: "345-67-8901", phone: "(650) 555-0188" },+ { name: "Mia Patel", ssn: "456-78-9012", phone: "(312) 555-0164" },+ { name: "Emma Ruiz", ssn: "567-89-0123", phone: "(646) 555-0175" },+ ];+ const H = top + rows.length * rowH + 40;+ const c = new Canvas(W, H, "#ffffff");+ c.text(40, 70, "Q3 Payroll — Confidential", { size: 34, weight: "bold" });++ // Header row (tinted, like a real sheet).+ c.rect(40, top - rowH, 1440, rowH, { fill: "#e8eef5", stroke: "#c3ccd6" });+ for (const col of cols) {+ c.rect(col.x, top - rowH, col.w, rowH, { stroke: "#c3ccd6" });+ c.text(col.x + 14, top - rowH + Math.round(rowH * 0.62), col.label, { size: 24, fill: "#444", weight: "bold" });+ }++ rows.forEach((r, i) => {+ const y = top + i * rowH;+ const band = i % 2 === 0 ? "#ffffff" : "#f5f8fb"; // alternating rows+ for (const col of cols) c.rect(col.x, y, col.w, rowH, { fill: band, stroke: "#dfe5ec" });+ c.cell(cols[0].x, y, cols[0].w, rowH, r.name, { size: 24 }); // clean name+ c.regions.push({ text: r.name, rect: { x0: cols[0].x, y0: y, x1: cols[0].x + cols[0].w, y1: y + rowH }, sensitive: false });+ c.cell(cols[1].x, y, cols[1].w, rowH, r.ssn, { size: 24 }, { sensitive: true, entityType: "ssn" });+ c.cell(cols[2].x, y, cols[2].w, rowH, r.phone, { size: 24 }, { sensitive: true, entityType: "phone" });+ });++ return { id: "spreadsheet-payroll", about: "Payroll grid: SSNs + phones in small tinted cells", hiResWidth: W, hiResHeight: H, svg: c.svg(), regions: c.regions };+ }++ /* -------------------------------------------------------------------------- */+ /* Fixture: billing form — email + Visa + Amex (Amex is a known OCR gap). */+ /* -------------------------------------------------------------------------- */++ function billingForm(): RealisticFixture {+ const W = 1680;+ const c = new Canvas(W, 620, "#f2f4f7");+ c.rect(120, 60, 1440, 500, { fill: "#ffffff", stroke: "#d7dce3" });+ c.text(160, 130, "Billing details", { size: 30, weight: "bold" });++ const fieldX = 160;+ const inputX = 520;+ const inputW = 900;+ const rows: Array<{ label: string; value: string; sensitive?: EntityType; tint?: string; xfail?: string }> = [+ { label: "Cardholder", value: "Jordan Blake" },+ { label: "Email", value: "[email protected]", sensitive: "email" },+ { label: "Card (Visa)", value: "4111 1111 1111 1111", sensitive: "credit-card" },+ {+ label: "Card (Amex)",+ value: "3782 822463 10005",+ sensitive: "credit-card",+ tint: "#fdecea", // red-tinted highlighted cell — the documented hard case+ xfail: "Amex in a red-tinted cell: global-threshold OCR garbles the digits (known gap)",+ },+ ];+ const startY = 190;+ const rowH = 78;+ rows.forEach((r, i) => {+ const y = startY + i * rowH;+ c.text(fieldX, y + 44, r.label, { size: 24, fill: "#555" });+ c.rect(inputX, y + 12, inputW, 52, { fill: r.tint ?? "#fbfcfd", stroke: "#c9d0d8" });+ if (r.sensitive) {+ c.cell(inputX, y + 12, inputW, 52, r.value, { size: 24 }, { sensitive: true, entityType: r.sensitive, xfail: r.xfail });+ } else {+ c.cell(inputX, y + 12, inputW, 52, r.value, { size: 24 });+ c.regions.push({ text: r.value, rect: { x0: inputX, y0: y + 12, x1: inputX + inputW, y1: y + 64 }, sensitive: false });+ }+ });+ c.rect(inputX, startY + rows.length * rowH + 10, 200, 52, { fill: "#2d6cdf" });+ c.text(inputX + 46, startY + rows.length * rowH + 44, "Save", { size: 24, fill: "#ffffff", weight: "bold" });++ return { id: "billing-form", about: "Payment form: email + Visa + Amex (Amex tinted-cell = xfail)", hiResWidth: W, hiResHeight: 620, svg: c.svg(), regions: c.regions };+ }++ /* -------------------------------------------------------------------------- */+ /* Fixture: terminal — GitHub token + AWS key amid ordinary logs. */+ /* -------------------------------------------------------------------------- */++ function terminalSecrets(): RealisticFixture {+ const W = 1760;+ const lineH = 46;+ const top = 60;+ const lines: Array<{ pre: string; secret?: { value: string; entityType: EntityType } }> = [+ { pre: "$ ./deploy.sh --env production" },+ { pre: "[info] authenticating to registry" },+ { pre: "export GITHUB_TOKEN=", secret: { value: "ghp_1a2B3c4D5e6F7g8H9i0J1k2L3m4N5o6P7q8R", entityType: "api-key" } },+ { pre: "[info] uploading build artifacts" },+ { pre: "AWS_ACCESS_KEY_ID=", secret: { value: "AKIA5XYQ7WZ3PLMN8RTV", entityType: "api-key" } },+ { pre: "[info] deployment complete in 42s" },+ ];+ const H = top + lines.length * lineH + 30;+ const c = new Canvas(W, H, "#1e1e1e");+ lines.forEach((ln, i) => {+ const y = top + i * lineH;+ const baseline = y + 30;+ c.text(30, baseline, ln.pre, { size: 24, family: MONO, fill: "#d6d6d6" });+ if (ln.secret) {+ // Monospace: advance width ≈ 0.6em per char, so the secret starts right after+ // the prefix. Its ground-truth rect is that trailing span of the line.+ const startX = 30 + Math.round(ln.pre.length * 24 * 0.6);+ const secretW = Math.round(ln.secret.value.length * 24 * 0.6) + 20;+ c.text(startX, baseline, ln.secret.value, { size: 24, family: MONO, fill: "#d6d6d6" });+ // These high-entropy secrets are now caught reading-independently: OCR+ // garbles the exact glyphs (and may split the token across a space), but the+ // structural detector (frame-heuristics.ts) blurs them by shape — a long,+ // high-entropy, mixed character-class run (plus credential-assignment+ // context), with no vendor/prefix list. So they're expected-detect, not a gap.+ c.regions.push({ text: ln.secret.value, rect: { x0: startX - 6, y0: y + 4, x1: startX + secretW, y1: y + lineH }, sensitive: true, entityType: ln.secret.entityType });+ } else {+ c.regions.push({ text: ln.pre, rect: { x0: 24, y0: y + 4, x1: 30 + Math.round(ln.pre.length * 24 * 0.6), y1: y + lineH }, sensitive: false });+ }+ });+ return { id: "terminal-secrets", about: "Dark terminal: GitHub token + AWS key amid logs", hiResWidth: W, hiResHeight: H, svg: c.svg(), regions: c.regions };+ }++ /* -------------------------------------------------------------------------- */+ /* Fixture: code editor — Stripe key + JWT in a config file. */+ /* -------------------------------------------------------------------------- */++ function codeConfig(): RealisticFixture {+ const W = 1760;+ const lineH = 46;+ const top = 60;+ const gutter = 90;+ const jwt =+ "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NSIsIm5hbWUiOiJKb2UifQ.dozjgNryP4J3jVmNHl0w5N_XgL0n3I9PlFUP0THsR8U";+ const lines: Array<{ text: string; secret?: { value: string; entityType: EntityType } }> = [+ { text: "# config/production.yaml" },+ { text: "service: recorder-api" },+ { text: "stripe_secret_key: ", secret: { value: "sk_live_" + "4eC39HqLyjWDarjtT1zdp7dcABCDEFGH1234", entityType: "api-key" } },+ { text: "retries: 3" },+ { text: "session_jwt: ", secret: { value: jwt, entityType: "jwt" } },+ { text: "log_level: info" },+ ];+ const H = top + lines.length * lineH + 30;+ const c = new Canvas(W, H, "#1e1e2e");+ c.rect(0, 0, gutter, H, { fill: "#181825" });+ lines.forEach((ln, i) => {+ const y = top + i * lineH;+ const baseline = y + 30;+ c.text(24, baseline, String(i + 1), { size: 22, family: MONO, fill: "#6c7086" });+ const keyColor = ln.text.startsWith("#") ? "#7f849c" : "#a6adc8";+ c.text(gutter + 20, baseline, ln.text, { size: 24, family: MONO, fill: keyColor });+ if (ln.secret) {+ const startX = gutter + 20 + Math.round(ln.text.length * 24 * 0.6);+ const secretW = Math.round(ln.secret.value.length * 24 * 0.6) + 20;+ c.text(startX, baseline, ln.secret.value, { size: 24, family: MONO, fill: "#a6e3a1" });+ // Caught reading-independently by the structural detector (see the terminal+ // fixture): a Stripe key / JWT is high-entropy, so even when OCR misreads a+ // glyph or injects a space it's blurred by shape (length + character-class+ // entropy + credential-assignment context, no prefix list). Expected-detect.+ c.regions.push({ text: ln.secret.value, rect: { x0: startX - 6, y0: y + 4, x1: startX + secretW, y1: y + lineH }, sensitive: true, entityType: ln.secret.entityType });+ } else {+ c.regions.push({ text: ln.text, rect: { x0: gutter + 14, y0: y + 4, x1: gutter + 20 + Math.round(ln.text.length * 24 * 0.6), y1: y + lineH }, sensitive: false });+ }+ });+ return { id: "code-config", about: "Code editor: Stripe key + JWT in a YAML config", hiResWidth: W, hiResHeight: H, svg: c.svg(), regions: c.regions };+ }++ export const realisticFixtures: RealisticFixture[] = [+ spreadsheetPayroll(),+ billingForm(),+ terminalSecrets(),+ codeConfig(),+ ];diff --cc evals/sensitive/ocr-images.tsindex 0000000,f73c95b..80f612fmode 000000,100644..100644--- a/evals/sensitive/ocr-images.ts+++ b/evals/sensitive/ocr-images.ts@@@ -1,0 -1,263 +1,263 @@@+ // OPT-IN real-image OCR eval (NOT part of the hermetic `eval:sensitive` run).+ //+ // The default sensitive frame eval feeds SYNTHETIC OCR words to the box mapper, so+ // it can't catch the real leak vector: Tesseract misreading on-screen text badly+ // enough that a secret/PII value is never detected (and the frame ships unblurred).+ // This harness closes that gap end-to-end: it renders text to actual JPEGs, runs+ // the REAL `Ocr` engine + the shared detectors via `sensitiveFrameBoxes`, and checks+ // that every sensitive line gets a blur box while clean lines are left alone.+ //+ // It is non-hermetic (needs the tesseract WASM core, `sharp` with system fonts, and+ // a one-time traineddata download per language), so it lives behind its own script+ // and SELF-SKIPS (exit 0) when the environment can't support it rather than failing.+ //+ // Run:+ // npm run eval:sensitive:ocr # renders text → JPEG, real Tesseract (English)+ // npm run eval:sensitive:ocr -- --keep # print each rendered case's OCR text++ import { createRequire } from "node:module";+ import { existsSync } from "node:fs";+ import { mkdir, rename, writeFile } from "node:fs/promises";+ import path from "node:path";++ import { Ocr, tessdataFileName, type OcrWord } from "../../electron/sensitive/ocr";+ import { sensitiveFrameBoxes, type FrameBox } from "../../electron/sensitive/frame-redact";++ const require = createRequire(import.meta.url);+ const TESSDATA_BASE = "https://raw.githubusercontent.com/tesseract-ocr/tessdata_fast/65727574dfcd264acbb0c3e07860e4e9e9b22185";+ const CACHE_DIR = path.join(process.cwd(), "evals", ".cache", "tessdata");++ // Layout: one row per line, generous line height, so a box's vertical position+ // alone tells us which line it covers (robust to Tesseract's horizontal jitter).+ const WIDTH = 1000;+ const PAD = 34;+ const LINE_H = 74;+ const FONT = 34;++ interface Row {+ text: string;+ /** Sensitive rows MUST get a blur box; clean rows must NOT. */+ sensitive: boolean;+ }++ interface OcrImageCase {+ id: string;+ about: string;+ rows: Row[];+ /** Session values known from clean text (cross-feed blur). */+ knownValues?: string[];+ }++ const cases: OcrImageCase[] = [+ {+ id: "eng-secret-token",+ about: "GitHub token on screen amid ordinary log lines (English)",+ rows: [+ { text: "Deployment log for release build", sensitive: false },+ { text: "token ghp_abcdefghij0123456789ABCDEFGHIJKLMNPQ", sensitive: true },+ { text: "Status: completed successfully", sensitive: false },+ ],+ },+ {+ id: "eng-card-and-email",+ about: "Credit card + email on screen (English)",+ rows: [+ { text: "Customer billing record", sensitive: false },+ { text: "Card 4111 1111 1111 1111 exp 09 27", sensitive: true },+ { text: "Contact [email protected]", sensitive: true },+ { text: "Notes: follow up next week", sensitive: false },+ ],+ },+ {+ id: "eng-known-crossfeed",+ about: "Codeword known from clean text is blurred wherever it appears (English)",+ knownValues: ["APERTURE"],+ rows: [+ { text: "Project APERTURE kickoff", sensitive: true },+ { text: "Public roadmap discussion", sensitive: false },+ ],+ },+ {+ // The eng-only product decision in action: a Japanese screen with English-only+ // traineddata loaded. The Latin email is ASCII, so eng OCR still reads (and+ // blurs) it even though the surrounding Japanese lines come back as garbage.+ id: "eng-only-email-amid-japanese",+ about: "Latin email amid Japanese text, read with ENGLISH-ONLY traineddata",+ rows: [+ { text: "ログイン情報の確認", sensitive: false },+ { text: "メール: [email protected]", sensitive: true },+ { text: "処理が完了しました", sensitive: false },+ ],+ },+ ];++ function escapeXml(s: string): string {+ return s+ .replace(/&/g, "&")+ .replace(/</g, "<")+ .replace(/>/g, ">")+ .replace(/"/g, """)+ .replace(/'/g, "'");+ }++ interface Rendered {+ buffer: Buffer;+ width: number;+ height: number;+ bands: Array<{ top: number; bottom: number }>;+ }+-type SharpModule = typeof import("sharp");++type SharpModule = (typeof import("sharp"))["default"];++ /** Render rows to a JPEG (black text on white), one row per fixed-height band. */+ async function renderRows(sharp: SharpModule, rows: Row[]): Promise<Rendered> {+ const height = PAD * 2 + rows.length * LINE_H;+ const bands = rows.map((_, i) => ({ top: PAD + i * LINE_H, bottom: PAD + (i + 1) * LINE_H }));+ const texts = rows+ .map((row, i) => {+ const y = PAD + i * LINE_H + Math.round((LINE_H + FONT) / 2) - 6;+ return `<text x="${PAD}" y="${y}" font-family="sans-serif" font-size="${FONT}" fill="#000">${escapeXml(row.text)}</text>`;+ })+ .join("");+ const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${WIDTH}" height="${height}"><rect width="${WIDTH}" height="${height}" fill="#fff"/>${texts}</svg>`;+ const buffer = await sharp(Buffer.from(svg)).jpeg({ quality: 92 }).toBuffer();+ return { buffer, width: WIDTH, height, bands };+ }++ function boxOverlapsBand(box: FrameBox, band: { top: number; bottom: number }): boolean {+ return box.top < band.bottom && band.top < box.top + box.height;+ }++ async function ensureTraineddata(code: string): Promise<boolean> {+ const dest = path.join(CACHE_DIR, tessdataFileName(code));+ if (existsSync(dest)) return true;+ await mkdir(CACHE_DIR, { recursive: true });+ try {+ const res = await fetch(`${TESSDATA_BASE}/${tessdataFileName(code)}`);+ if (!res.ok) return false;+ const buf = Buffer.from(await res.arrayBuffer());+ const tmp = `${dest}.tmp.${process.pid}`;+ await writeFile(tmp, buf);+ await rename(tmp, dest);+ return true;+ } catch {+ return false;+ }+ }++ interface CaseResult {+ id: string;+ about: string;+ status: "pass" | "fail" | "skip";+ detail: string;+ ocrText?: string;+ }++ const ocrPools = new Map<string, Ocr>();++ function pool(): Ocr {+ let p = ocrPools.get("eng");+ if (!p) {+ p = new Ocr({ langPath: CACHE_DIR, poolSize: 1 });+ ocrPools.set("eng", p);+ }+ return p;+ }++ async function scoreCase(sharp: SharpModule, c: OcrImageCase, keep: boolean): Promise<CaseResult> {+ if (!(await ensureTraineddata("eng"))) {+ return { id: c.id, about: c.about, status: "skip", detail: `no traineddata for "eng" (offline?)` };+ }++ let words: OcrWord[];+ const rendered = await renderRows(sharp, c.rows);+ try {+ words = await pool().recognize(rendered.buffer);+ } catch (err) {+ return { id: c.id, about: c.about, status: "skip", detail: `OCR engine unavailable: ${err instanceof Error ? err.message : err}` };+ }+ const ocrText = words.map((w) => w.text).join(" ");++ const boxes = await sensitiveFrameBoxes(words, {+ width: rendered.width,+ height: rendered.height,+ knownValues: c.knownValues,+ });++ const problems: string[] = [];+ rendered.bands.forEach((band, i) => {+ const covered = boxes.some((b) => boxOverlapsBand(b, band));+ const row = c.rows[i];+ if (row.sensitive && !covered) problems.push(`leaked (no blur): "${row.text}"`);+ if (!row.sensitive && covered) problems.push(`over-blur (clean line covered): "${row.text}"`);+ });++ const result: CaseResult = {+ id: c.id,+ about: c.about,+ status: problems.length ? "fail" : "pass",+ detail: problems.length ? problems.join("; ") : `${boxes.length} box(es) over ${c.rows.filter((r) => r.sensitive).length} sensitive line(s)`,+ };+ if (keep) result.ocrText = ocrText;+ return result;+ }++ /** Probe render+OCR of a known string; returns false if the environment can't OCR. */+ async function environmentUsable(sharp: SharpModule): Promise<boolean> {+ if (!(await ensureTraineddata("eng"))) return false;+ try {+ const probe = await renderRows(sharp, [{ text: "Sensitive check 12345", sensitive: false }]);+ const words = await pool().recognize(probe.buffer);+ const text = words.map((w) => w.text).join(" ");+ return /12345/.test(text);+ } catch {+ return false;+ }+ }++ function loadSharp(): SharpModule | null {+ try {+ return require("sharp") as SharpModule;+ } catch {+ return null;+ }+ }++ async function main(): Promise<void> {+ const keep = process.argv.includes("--keep");+ console.error(`\nSkill Recorder — real-image OCR redaction eval (opt-in, non-hermetic)`);++ const sharp = loadSharp();+ if (!sharp) {+ console.error(" SKIP: sharp is not available; cannot render eval images.\n");+ process.exit(0);+ }+ if (!(await environmentUsable(sharp))) {+ console.error(" SKIP: OCR could not read a probe image (missing fonts, WASM core, or traineddata download).\n");+ await Promise.all([...ocrPools.values()].map((p) => p.terminate().catch(() => {})));+ process.exit(0);+ }++ const results: CaseResult[] = [];+ for (const c of cases) results.push(await scoreCase(sharp, c, keep));+ await Promise.all([...ocrPools.values()].map((p) => p.terminate().catch(() => {})));++ console.error("─".repeat(64));+ for (const r of results) {+ const tag = r.status === "pass" ? "PASS" : r.status === "skip" ? "SKIP" : "FAIL";+ console.error(` ${tag} ${r.id} — ${r.about}`);+ console.error(` ${r.detail}`);+ if (r.ocrText) console.error(` OCR: ${r.ocrText}`);+ }++ const failed = results.filter((r) => r.status === "fail");+ const passed = results.filter((r) => r.status === "pass").length;+ const skipped = results.filter((r) => r.status === "skip").length;+ console.error(`\n ${passed} passed · ${failed.length} failed · ${skipped} skipped (of ${results.length})\n`);+ process.exit(failed.length ? 1 : 0);+ }++ main().catch((err) => {+ console.error("OCR image harness crashed:", err);+ process.exit(3);+ });diff --cc package-lock.jsonindex ee3cdcc,95f8b92..6018d32--- a/package-lock.json+++ b/package-lock.json@@@ -1,12 -1,12 +1,12 @@@{"name": "skill-recorder",- "version": "0.3.1",- "version": "0.3.0",++ "version": "0.4.0","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "skill-recorder",- "version": "0.3.1",- "version": "0.3.0",++ "version": "0.4.0","license": "MIT","dependencies": {"@github/copilot-sdk": "^1.0.6",@@@ -15,7 -18,9 +18,9 @@@"koffi": "^3.1.1","react": "^19.2.5","react-dom": "^19.2.5",- "sharp": "^0.34.5",+ "sharp": "^0.35.3",+ "tesseract.js": "^7.0.0",+ "tesseract.js-core": "^7.0.0","zod": "^4.3.6"},"devDependencies": {@@@ -342,8 -353,8 +353,8 @@@},"node_modules/@emnapi/core": {"version": "1.11.3",- "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@emnapi/core/-/core-1.11.3.tgz",+ "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.3.tgz",- "integrity": "sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg==",+ "integrity": "sha1-XpU0ikLNHgbwuao4DNdAkdqk1SA=","dev": true,"license": "MIT","optional": true,@@@ -355,8 -366,8 +366,8 @@@},"node_modules/@emnapi/runtime": {"version": "1.11.3",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@emnapi/runtime/-/runtime-1.11.3.tgz",+ "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz",- "integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==",+ "integrity": "sha1-hCV647BTHrKuwf+iPXBwDaAHupU=","license": "MIT","optional": true,"dependencies": {@@@ -578,9 -589,9 +589,9 @@@}},"node_modules/@img/sharp-darwin-arm64": {- "version": "0.34.5",- "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.5.tgz",- "integrity": "sha1-bgcy3K3hJrZnCveqFwYLkmg16oY=",+ "version": "0.35.3",- "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.35.3.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.35.3.tgz",+ "integrity": "sha1-iydAiEvFixJ/wwIEeaASlPoQlcs=","cpu": ["arm64"],@@@ -600,9 -611,9 +611,9 @@@}},"node_modules/@img/sharp-darwin-x64": {- "version": "0.34.5",- "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.5.tgz",- "integrity": "sha1-Gbwd1uum1alig0mLnJ9AEYDunHs=",+ "version": "0.35.3",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.35.3.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.35.3.tgz",+ "integrity": "sha1-kt+RMg+vV8xUszEYV3DVqT1RAEk=","cpu": ["x64"],@@@ -618,32 -629,13 +629,32 @@@"url": "https://opencollective.com/libvips"},"optionalDependencies": {- "@img/sharp-libvips-darwin-x64": "1.2.4"+ "@img/sharp-libvips-darwin-x64": "1.3.2"+ }+ },+ "node_modules/@img/sharp-freebsd-wasm32": {+ "version": "0.35.3",- "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-freebsd-wasm32/-/sharp-freebsd-wasm32-0.35.3.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-freebsd-wasm32/-/sharp-freebsd-wasm32-0.35.3.tgz",+ "integrity": "sha1-SAGME3mo9QfWgdbNjb5D2XldyAk=",+ "license": "Apache-2.0",+ "optional": true,+ "os": [+ "freebsd"+ ],+ "dependencies": {+ "@img/sharp-wasm32": "0.35.3"+ },+ "engines": {+ "node": ">=20.9.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"}},"node_modules/@img/sharp-libvips-darwin-arm64": {- "version": "1.2.4",- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.4.tgz",- "integrity": "sha1-KJTAy4fUInbDiJlC6OLbUXpJLEM=",+ "version": "1.3.2",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.3.2.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.3.2.tgz",+ "integrity": "sha1-IntB/8bJlhK86rpW+ZShkz13lXM=","cpu": ["arm64"],@@@ -657,9 -649,9 +668,9 @@@}},"node_modules/@img/sharp-libvips-darwin-x64": {- "version": "1.2.4",- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.2.4.tgz",- "integrity": "sha1-5jaB9FOalK+c0XJG7YiBc0OG+Mw=",+ "version": "1.3.2",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.3.2.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.3.2.tgz",+ "integrity": "sha1-aUkD7EEMAJRc5bDCbayD1xhMi4Y=","cpu": ["x64"],@@@ -673,9 -665,9 +684,9 @@@}},"node_modules/@img/sharp-libvips-linux-arm": {- "version": "1.2.4",- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.2.4.tgz",- "integrity": "sha1-uSYN0evm+eO9vL3KydKsEl81hS0=",+ "version": "1.3.2",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.3.2.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.3.2.tgz",+ "integrity": "sha1-5g4IjIBr3hrCi+ZItgw0ZfQcGKc=","cpu": ["arm"],@@@ -689,9 -681,9 +700,9 @@@}},"node_modules/@img/sharp-libvips-linux-arm64": {- "version": "1.2.4",- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.2.4.tgz",- "integrity": "sha1-sbKIs2hks7zlRa2R+m2tzxpK0xg=",+ "version": "1.3.2",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.3.2.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.3.2.tgz",+ "integrity": "sha1-Sd3xVnKGZqId7tBxbzu3K7NRF54=","cpu": ["arm64"],@@@ -705,9 -697,9 +716,9 @@@}},"node_modules/@img/sharp-libvips-linux-ppc64": {- "version": "1.2.4",- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.2.4.tgz",- "integrity": "sha1-S4Ps8qgpBXIis4hIx7Ai57TQeqc=",+ "version": "1.3.2",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.3.2.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.3.2.tgz",+ "integrity": "sha1-vjFhqv1llBez4mN037vNLaK/tiw=","cpu": ["ppc64"],@@@ -721,9 -713,9 +732,9 @@@}},"node_modules/@img/sharp-libvips-linux-riscv64": {- "version": "1.2.4",- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.2.4.tgz",- "integrity": "sha1-iAtGeACeWiCArxkjMrALCq+KSN4=",+ "version": "1.3.2",- "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.3.2.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.3.2.tgz",+ "integrity": "sha1-vwCKZ3nZvitWpN9nt1OUH3Z8lX0=","cpu": ["riscv64"],@@@ -737,9 -729,9 +748,9 @@@}},"node_modules/@img/sharp-libvips-linux-s390x": {- "version": "1.2.4",- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.2.4.tgz",- "integrity": "sha1-dPNDyOEPrYIbOPdc7TBIiTncWew=",+ "version": "1.3.2",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.3.2.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.3.2.tgz",+ "integrity": "sha1-lYOBS421iInIW62eXgt4JSV/85Q=","cpu": ["s390x"],@@@ -753,9 -745,9 +764,9 @@@}},"node_modules/@img/sharp-libvips-linux-x64": {- "version": "1.2.4",- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.2.4.tgz",- "integrity": "sha1-30GD6L2EEPfWG2aFmjXt6rClMc4=",+ "version": "1.3.2",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.3.2.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.3.2.tgz",+ "integrity": "sha1-q8mjEUSVtwW6ILfBVoue7NYq67s=","cpu": ["x64"],@@@ -769,9 -761,9 +780,9 @@@}},"node_modules/@img/sharp-libvips-linuxmusl-arm64": {- "version": "1.2.4",- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.2.4.tgz",- "integrity": "sha1-yNa0ghHfZxN1QQB+6NG3sfjKjgY=",+ "version": "1.3.2",- "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.3.2.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.3.2.tgz",+ "integrity": "sha1-5Y+xSnh58V2ecKmChw84TzmoMqI=","cpu": ["arm64"],@@@ -785,9 -777,9 +796,9 @@@}},"node_modules/@img/sharp-libvips-linuxmusl-x64": {- "version": "1.2.4",- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.2.4.tgz",- "integrity": "sha1-vhHHW+5bCAy+4xoVOod5RI+Rn3U=",+ "version": "1.3.2",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.3.2.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.3.2.tgz",+ "integrity": "sha1-VhFID8t0Zd1TFgRNtTrXqEPtSvg=","cpu": ["x64"],@@@ -801,9 -793,9 +812,9 @@@}},"node_modules/@img/sharp-linux-arm": {- "version": "0.34.5",- "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.5.tgz",- "integrity": "sha1-X7DDaV3RJSLTnD/3pryBZGF4Cg0=",+ "version": "0.35.3",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linux-arm/-/sharp-linux-arm-0.35.3.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.35.3.tgz",+ "integrity": "sha1-yNpQDEAWiTqJ1G6YMtCKBu73fyc=","cpu": ["arm"],@@@ -823,9 -815,9 +834,9 @@@}},"node_modules/@img/sharp-linux-arm64": {- "version": "0.34.5",- "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.5.tgz",- "integrity": "sha1-eqd2TvnAAfFeYQVG1C/OVpEXkMw=",+ "version": "0.35.3",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.35.3.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.35.3.tgz",+ "integrity": "sha1-RLZYI+zJd9RYWzCAcP/zlHJW3gQ=","cpu": ["arm64"],@@@ -845,9 -837,9 +856,9 @@@}},"node_modules/@img/sharp-linux-ppc64": {- "version": "0.34.5",- "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.34.5.tgz",- "integrity": "sha1-nCE6gVIKIMr2aXjz1MB0Vv8uCBM=",+ "version": "0.35.3",- "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.35.3.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.35.3.tgz",+ "integrity": "sha1-6h19uBj1KvHh4FfoLVXyOy3jhkw=","cpu": ["ppc64"],@@@ -867,9 -859,9 +878,9 @@@}},"node_modules/@img/sharp-linux-riscv64": {- "version": "0.34.5",- "resolved": "https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.34.5.tgz",- "integrity": "sha1-zdKBgndOrb4E9iZ1oWqrvMuDP2A=",+ "version": "0.35.3",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.35.3.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.35.3.tgz",+ "integrity": "sha1-civXmUZYeRsC0QN+oJyly3gDDY0=","cpu": ["riscv64"],@@@ -889,9 -881,9 +900,9 @@@}},"node_modules/@img/sharp-linux-s390x": {- "version": "0.34.5",- "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.5.tgz",- "integrity": "sha1-k+rGAbnzKbsnkX4OGQmMci1jDfc=",+ "version": "0.35.3",- "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.35.3.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.35.3.tgz",+ "integrity": "sha1-6ClIF9faSVVBpKhw9W5rXQ+GQ80=","cpu": ["s390x"],@@@ -911,9 -903,9 +922,9 @@@}},"node_modules/@img/sharp-linux-x64": {- "version": "0.34.5",- "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.5.tgz",- "integrity": "sha1-VavHzXVP/KUAK2wrcZq9/IRoGag=",+ "version": "0.35.3",- "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linux-x64/-/sharp-linux-x64-0.35.3.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.35.3.tgz",+ "integrity": "sha1-mEPDLzmurEtg3WD540FlIKTk3kY=","cpu": ["x64"],@@@ -933,9 -925,9 +944,9 @@@}},"node_modules/@img/sharp-linuxmusl-arm64": {- "version": "0.34.5",- "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.5.tgz",- "integrity": "sha1-1lFe6XG7YvcwAaSCm52GWhG3cIY=",+ "version": "0.35.3",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.35.3.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.35.3.tgz",+ "integrity": "sha1-nP7k7MPUGrmidOAZ3+e0BihAUQw=","cpu": ["arm64"],@@@ -955,9 -947,9 +966,9 @@@}},"node_modules/@img/sharp-linuxmusl-x64": {- "version": "0.34.5",- "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.5.tgz",- "integrity": "sha1-2Xl4rsfFIS+ZlxTy9bc2RX4S7p8=",+ "version": "0.35.3",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.35.3.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.35.3.tgz",+ "integrity": "sha1-IE0GeMjDsVMA2aJuy5wNzaEcpd4=","cpu": ["x64"],@@@ -977,25 -969,9 +988,25 @@@}},"node_modules/@img/sharp-wasm32": {- "version": "0.34.5",- "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.34.5.tgz",- "integrity": "sha1-LxWAOqYm+MWd18nQu8dm8atSz6A=",+ "version": "0.35.3",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-wasm32/-/sharp-wasm32-0.35.3.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.35.3.tgz",+ "integrity": "sha1-QviXm9vhpUGi6bmdO1vgfmtxx8A=",+ "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",+ "optional": true,+ "dependencies": {+ "@emnapi/runtime": "^1.11.1"+ },+ "engines": {+ "node": ">=20.9.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-webcontainers-wasm32": {+ "version": "0.35.3",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-webcontainers-wasm32/-/sharp-webcontainers-wasm32-0.35.3.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-webcontainers-wasm32/-/sharp-webcontainers-wasm32-0.35.3.tgz",+ "integrity": "sha1-gjqqk9FNuEmZ1bXcln/1bPGWbZ8=","cpu": ["wasm32"],@@@ -1012,9 -988,9 +1023,9 @@@}},"node_modules/@img/sharp-win32-arm64": {- "version": "0.34.5",- "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.34.5.tgz",- "integrity": "sha1-Nwbp46w1/d/ByH+U6Enxt1MHzgo=",+ "version": "0.35.3",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.35.3.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.35.3.tgz",+ "integrity": "sha1-81VNRcviRTKgrepzbsV2WPdKKRE=","cpu": ["arm64"],@@@ -1031,9 -1007,9 +1042,9 @@@}},"node_modules/@img/sharp-win32-ia32": {- "version": "0.34.5",- "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.5.tgz",- "integrity": "sha1-C3EWZZmwSeAy8IX7kmPgL05HiN4=",+ "version": "0.35.3",- "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.35.3.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.35.3.tgz",+ "integrity": "sha1-CUKyZDvLV+SEGf5BGd6EB4rgrHQ=","cpu": ["ia32"],@@@ -1050,9 -1026,9 +1061,9 @@@}},"node_modules/@img/sharp-win32-x64": {- "version": "0.34.5",- "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.5.tgz",- "integrity": "sha1-qB/7AOaSZ80KHWJurtuKhDCysvg=",+ "version": "0.35.3",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-win32-x64/-/sharp-win32-x64-0.35.3.tgz",++ "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.35.3.tgz",+ "integrity": "sha1-iiXKzcdajCYHfAf7pR6AVqrkdPE=","cpu": ["x64"],@@@ -1166,9 -1142,9 +1177,9 @@@},"node_modules/@isaacs/fs-minipass": {"version": "4.0.1",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz",+ "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz","integrity": "sha1-LVmuOrSzj7QnC/oj0w+OLobH/jI=",- "dev": true,+ "devOptional": true,"license": "ISC","dependencies": {"minipass": "^7.0.4"@@@ -1506,9 -1482,19 +1517,9 @@@"node": ">= 6.0.0"}},- "node_modules/@mapbox/node-pre-gyp/node_modules/chownr": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",- "integrity": "sha1-Fb++U9LqtM9w8YqM1o6+Wzyx3s4=",- "license": "ISC",- "optional": true,- "engines": {- "node": ">=10"- }- },"node_modules/@mapbox/node-pre-gyp/node_modules/https-proxy-agent": {"version": "5.0.1",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz","integrity": "sha1-xZ7yJKBP6LdU89sAY6Jeow0ABdY=","license": "MIT","optional": true,@@@ -1520,9 -1506,78 +1531,9 @@@"node": ">= 6"}},- "node_modules/@mapbox/node-pre-gyp/node_modules/minipass": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz",- "integrity": "sha1-PpeI/7kLaUpdDslEeaRbXYc4Ez0=",- "license": "ISC",- "optional": true,- "engines": {- "node": ">=8"- }- },- "node_modules/@mapbox/node-pre-gyp/node_modules/minizlib": {- "version": "2.1.2",- "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",- "integrity": "sha1-6Q00Zrogm5MkUVCKEc49NjIUWTE=",- "license": "MIT",- "optional": true,- "dependencies": {- "minipass": "^3.0.0",- "yallist": "^4.0.0"- },- "engines": {- "node": ">= 8"- }- },- "node_modules/@mapbox/node-pre-gyp/node_modules/minizlib/node_modules/minipass": {- "version": "3.3.6",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",- "integrity": "sha1-e7o4TbOhUg0YycDlJRw0ROld2Uo=",- "license": "ISC",- "optional": true,- "dependencies": {- "yallist": "^4.0.0"- },- "engines": {- "node": ">=8"- }- },- "node_modules/@mapbox/node-pre-gyp/node_modules/mkdirp": {- "version": "1.0.4",- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",- "integrity": "sha1-PrXtYmInVteaXw4qIh3+utdcL34=",- "license": "MIT",- "optional": true,- "bin": {- "mkdirp": "bin/cmd.js"- },- "engines": {- "node": ">=10"- }- },- "node_modules/@mapbox/node-pre-gyp/node_modules/tar": {- "version": "6.2.1",- "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz",- "integrity": "sha1-cXVJxUG8PCrxV1G+qUsd0GjUsDo=",- "deprecated": "Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]",- "license": "ISC",- "optional": true,- "dependencies": {- "chownr": "^2.0.0",- "fs-minipass": "^2.0.0",- "minipass": "^5.0.0",- "minizlib": "^2.1.1",- "mkdirp": "^1.0.3",- "yallist": "^4.0.0"- },- "engines": {- "node": ">=10"- }- },"node_modules/@napi-rs/wasm-runtime": {"version": "1.1.6",- "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.6.tgz",+ "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.6.tgz","integrity": "sha1-7TOAbQ+b6Y3HbQw9T9hy/acBtdU=","dev": true,"license": "MIT",@@@ -2578,12 -2750,12 +2706,12 @@@}},"node_modules/adm-zip": {- "version": "0.5.18",- "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.18.tgz",- "integrity": "sha1-KDoF8r8eP9MV8PMc3im3puPBYZ0=",+ "version": "0.6.0",- "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/adm-zip/-/adm-zip-0.6.0.tgz",++ "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.6.0.tgz",+ "integrity": "sha1-u8XGwzN1XpZ6Bt2YdH9DHh1To88=","license": "MIT","engines": {- "node": ">=12.0"+ "node": ">=14.0"}},"node_modules/agent-base": {@@@ -3299,9 -3508,19 +3464,9 @@@"balanced-match": "^1.0.0"}},- "node_modules/cacache/node_modules/chownr": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",- "integrity": "sha1-Fb++U9LqtM9w8YqM1o6+Wzyx3s4=",- "license": "ISC",- "optional": true,- "engines": {- "node": ">=10"- }- },"node_modules/cacache/node_modules/fs-minipass": {"version": "3.0.3",- "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/fs-minipass/-/fs-minipass-3.0.3.tgz",+ "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz","integrity": "sha1-eahZgcTcEgBl6W9iCGv2+dwmzFQ=","license": "ISC","optional": true,@@@ -3357,9 -3576,104 +3522,9 @@@"url": "https://github.com/sponsors/isaacs"}},- "node_modules/cacache/node_modules/minizlib": {- "version": "2.1.2",- "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",- "integrity": "sha1-6Q00Zrogm5MkUVCKEc49NjIUWTE=",- "license": "MIT",- "optional": true,- "dependencies": {- "minipass": "^3.0.0",- "yallist": "^4.0.0"- },- "engines": {- "node": ">= 8"- }- },- "node_modules/cacache/node_modules/minizlib/node_modules/minipass": {- "version": "3.3.6",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",- "integrity": "sha1-e7o4TbOhUg0YycDlJRw0ROld2Uo=",- "license": "ISC",- "optional": true,- "dependencies": {- "yallist": "^4.0.0"- },- "engines": {- "node": ">=8"- }- },- "node_modules/cacache/node_modules/mkdirp": {- "version": "1.0.4",- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",- "integrity": "sha1-PrXtYmInVteaXw4qIh3+utdcL34=",- "license": "MIT",- "optional": true,- "bin": {- "mkdirp": "bin/cmd.js"- },- "engines": {- "node": ">=10"- }- },- "node_modules/cacache/node_modules/tar": {- "version": "6.2.1",- "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz",- "integrity": "sha1-cXVJxUG8PCrxV1G+qUsd0GjUsDo=",- "deprecated": "Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]",- "license": "ISC",- "optional": true,- "dependencies": {- "chownr": "^2.0.0",- "fs-minipass": "^2.0.0",- "minipass": "^5.0.0",- "minizlib": "^2.1.1",- "mkdirp": "^1.0.3",- "yallist": "^4.0.0"- },- "engines": {- "node": ">=10"- }- },- "node_modules/cacache/node_modules/tar/node_modules/fs-minipass": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",- "integrity": "sha1-f1A2/b8SxjwWkZDL5BmchSJx+fs=",- "license": "ISC",- "optional": true,- "dependencies": {- "minipass": "^3.0.0"- },- "engines": {- "node": ">= 8"- }- },- "node_modules/cacache/node_modules/tar/node_modules/fs-minipass/node_modules/minipass": {- "version": "3.3.6",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",- "integrity": "sha1-e7o4TbOhUg0YycDlJRw0ROld2Uo=",- "license": "ISC",- "optional": true,- "dependencies": {- "yallist": "^4.0.0"- },- "engines": {- "node": ">=8"- }- },- "node_modules/cacache/node_modules/tar/node_modules/minipass": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz",- "integrity": "sha1-PpeI/7kLaUpdDslEeaRbXYc4Ez0=",- "license": "ISC",- "optional": true,- "engines": {- "node": ">=8"- }- },"node_modules/cacheable-lookup": {"version": "5.0.4",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz",+ "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz","integrity": "sha1-WmuGWyxENXvj1evCpGewMnGacAU=","dev": true,"license": "MIT",@@@ -3419,9 -3733,9 +3584,9 @@@},"node_modules/chownr": {"version": "3.0.0",- "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/chownr/-/chownr-3.0.0.tgz",+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz","integrity": "sha1-mFXmTs0kCpzEJnzopKpdJKHaFeQ=",- "dev": true,+ "devOptional": true,"license": "BlueOak-1.0.0","engines": {"node": ">=18"@@@ -4316,10 -4644,9 +4495,9 @@@"license": "MIT"},"node_modules/fast-uri": {- "version": "3.1.3",- "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.3.tgz",- "integrity": "sha1-9pWkDwBqulBWMVc6ACHdshGUrRE=",+ "version": "3.1.4",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/fast-uri/-/fast-uri-3.1.4.tgz",++ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.4.tgz",+ "integrity": "sha1-Oz2vnOaPQflW3wtQUTLAz86ex68=",- "dev": true,"funding": [{"type": "github",@@@ -4456,9 -4795,35 +4646,9 @@@"node": ">=12"}},- "node_modules/fs-minipass": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",- "integrity": "sha1-f1A2/b8SxjwWkZDL5BmchSJx+fs=",- "license": "ISC",- "optional": true,- "dependencies": {- "minipass": "^3.0.0"- },- "engines": {- "node": ">= 8"- }- },- "node_modules/fs-minipass/node_modules/minipass": {- "version": "3.3.6",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",- "integrity": "sha1-e7o4TbOhUg0YycDlJRw0ROld2Uo=",- "license": "ISC",- "optional": true,- "dependencies": {- "yallist": "^4.0.0"- },- "engines": {- "node": ">=8"- }- },"node_modules/fs.realpath": {"version": "1.0.0",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/fs.realpath/-/fs.realpath-1.0.0.tgz",+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz","integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=","devOptional": true,"license": "ISC"@@@ -4628,9 -4993,19 +4818,9 @@@"balanced-match": "^1.0.0"}},- "node_modules/get-windows/node_modules/chownr": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",- "integrity": "sha1-Fb++U9LqtM9w8YqM1o6+Wzyx3s4=",- "license": "ISC",- "optional": true,- "engines": {- "node": ">=10"- }- },"node_modules/get-windows/node_modules/env-paths": {"version": "2.2.1",- "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/env-paths/-/env-paths-2.2.1.tgz",+ "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz","integrity": "sha1-QgOZ1BbOH76bwKB8Yvpo1n/Q+PI=","license": "MIT","optional": true,@@@ -4676,9 -5051,49 +4866,9 @@@"url": "https://github.com/sponsors/isaacs"}},- "node_modules/get-windows/node_modules/minizlib": {- "version": "2.1.2",- "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",- "integrity": "sha1-6Q00Zrogm5MkUVCKEc49NjIUWTE=",- "license": "MIT",- "optional": true,- "dependencies": {- "minipass": "^3.0.0",- "yallist": "^4.0.0"- },- "engines": {- "node": ">= 8"- }- },- "node_modules/get-windows/node_modules/minizlib/node_modules/minipass": {- "version": "3.3.6",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",- "integrity": "sha1-e7o4TbOhUg0YycDlJRw0ROld2Uo=",- "license": "ISC",- "optional": true,- "dependencies": {- "yallist": "^4.0.0"- },- "engines": {- "node": ">=8"- }- },- "node_modules/get-windows/node_modules/mkdirp": {- "version": "1.0.4",- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",- "integrity": "sha1-PrXtYmInVteaXw4qIh3+utdcL34=",- "license": "MIT",- "optional": true,- "bin": {- "mkdirp": "bin/cmd.js"- },- "engines": {- "node": ">=10"- }- },"node_modules/get-windows/node_modules/node-gyp": {"version": "10.3.1",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/node-gyp/-/node-gyp-10.3.1.tgz",+ "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.3.1.tgz","integrity": "sha1-HdGhocbFxZ2hp2rqBqBieGssiho=","license": "MIT","optional": true,@@@ -4727,9 -5142,38 +4917,9 @@@"node": "^14.17.0 || ^16.13.0 || >=18.0.0"}},- "node_modules/get-windows/node_modules/tar": {- "version": "6.2.1",- "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz",- "integrity": "sha1-cXVJxUG8PCrxV1G+qUsd0GjUsDo=",- "deprecated": "Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]",- "license": "ISC",- "optional": true,- "dependencies": {- "chownr": "^2.0.0",- "fs-minipass": "^2.0.0",- "minipass": "^5.0.0",- "minizlib": "^2.1.1",- "mkdirp": "^1.0.3",- "yallist": "^4.0.0"- },- "engines": {- "node": ">=10"- }- },- "node_modules/get-windows/node_modules/tar/node_modules/minipass": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz",- "integrity": "sha1-PpeI/7kLaUpdDslEeaRbXYc4Ez0=",- "license": "ISC",- "optional": true,- "engines": {- "node": ">=8"- }- },"node_modules/get-windows/node_modules/which": {"version": "4.0.0",- "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/which/-/which-4.0.0.tgz",+ "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz","integrity": "sha1-zWC150UDo/vPv2zWtBOKi65kTBo=","license": "ISC","optional": true,@@@ -5963,9 -6485,9 +6231,9 @@@},"node_modules/minizlib": {"version": "3.1.0",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/minizlib/-/minizlib-3.1.0.tgz",+ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz","integrity": "sha1-atdsOo8QInybUdHJrI4wsn9aJRw=",- "dev": true,+ "devOptional": true,"license": "MIT","dependencies": {"minipass": "^7.1.2"@@@ -7052,17 -7598,18 +7344,17 @@@"optional": true},"node_modules/sharp": {- "version": "0.34.5",- "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.5.tgz",- "integrity": "sha1-tvFI5LjGHxeXveEanRz+u64sV7A=",- "hasInstallScript": true,+ "version": "0.35.3",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/sharp/-/sharp-0.35.3.tgz",++ "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.35.3.tgz",+ "integrity": "sha1-Qe0hpGQGvhY+rNC+ezZLQvzyiF8=","license": "Apache-2.0","dependencies": {- "@img/colour": "^1.0.0",+ "@img/colour": "^1.1.0","detect-libc": "^2.1.2",- "semver": "^7.7.3"+ "semver": "^7.8.5"},"engines": {- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ "node": ">=20.9.0"},"funding": {"url": "https://opencollective.com/libvips"@@@ -7343,10 -7893,10 +7644,10 @@@}},"node_modules/tar": {- "version": "7.5.20",- "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.20.tgz",- "integrity": "sha1-N6ZaqRHL1phkAC4Uv4qSalVR4kA=",- "dev": true,+ "version": "7.5.22",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/tar/-/tar-7.5.22.tgz",++ "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.22.tgz",+ "integrity": "sha1-ppb5mBNucUh9w/hpqFu6LGeXG6k=",+ "devOptional": true,"license": "BlueOak-1.0.0","dependencies": {"@isaacs/fs-minipass": "^4.0.0",@@@ -7373,9 -7923,9 +7674,9 @@@},"node_modules/tar/node_modules/yallist": {"version": "5.0.0",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/yallist/-/yallist-5.0.0.tgz",+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz","integrity": "sha1-AOLeRDY57Q14/YfeDSdGn7z/tTM=",- "dev": true,+ "devOptional": true,"license": "BlueOak-1.0.0","engines": {"node": ">=18"diff --cc package.jsonindex 7aa16a2,6097b17..ba6b2d8--- a/package.json+++ b/package.json@@@ -1,6 -1,6 +1,6 @@@{"name": "skill-recorder",- "version": "0.3.1",- "version": "0.3.0",++ "version": "0.4.0","description": "Records a user's on-screen work session and derives a structured description for building AI-agent skills.","author": "Skill Recorder contributors","repository": "github:microsoft/skill-recorder",@@@ -36,7 -49,9 +49,9 @@@"koffi": "^3.1.1","react": "^19.2.5","react-dom": "^19.2.5",- "sharp": "^0.34.5",+ "sharp": "^0.35.3",+ "tesseract.js": "^7.0.0",+ "tesseract.js-core": "^7.0.0","zod": "^4.3.6"},"optionalDependencies": {@@@ -56,12 -73,15 +73,20 @@@"vite": "^8.0.16","vite-plugin-electron": "1.0.4"},+ "overrides": {+ "adm-zip": "$adm-zip",+ "fast-uri": "^3.1.4",+ "sharp": "$sharp",+ "tar": "^7.5.21"+ },+ "allowScripts": {+ "electron-winstaller": false,+ "[email protected]": true,+ "[email protected]": true,+ "[email protected]": true,+ "protobufjs": false,- "[email protected]": true,+ "tesseract.js": false+ },"build": {"appId": "com.skillrecorder.app","productName": "Skill Recorder",diff --cc scripts/compliance.mjsindex f550711,024dbbd..b8ef675--- a/scripts/compliance.mjs+++ b/scripts/compliance.mjs@@@ -88,84 -92,123 +92,199 @@@ export const legalTextSpecs =url: `${mozillaLicense}/LICENSE-MPL-2.0`,marker: "Mozilla Public License Version 2.0",},+ {+ id: "artistic-2.0",+ fileName: "Artistic-2.0.txt",+ url: `${spdxLicenseText}/Artistic-2.0.txt`,+ marker: "The Artistic License 2.0",+ },];+/**+ * Sharp ships a WebAssembly build that npm installs on every platform because+ * `@img/sharp-wasm32` itself declares no `os`/`cpu`; only its `freebsd`/`webcontainers`+ * wrappers do. It is never loaded by the packaged application, so it and its+ * WASM-only runtime dependency are excluded from every Electron artifact instead of+ * receiving static-LGPL treatment.+ */+export const excludedWasmPackages = [+ "@img/sharp-wasm32",+ "@img/sharp-freebsd-wasm32",+ "@img/sharp-webcontainers-wasm32",+ "@emnapi/runtime",+];++/**+ * The single native payload that is actually packaged for each platform. Windows links+ * libvips into `@img/sharp-win32-*`; every other platform loads a separate+ * `@img/sharp-libvips-*` package, which is the only one carrying `versions.json` and the+ * upstream third-party notices.+ */+export const nativePayloadCandidates = {+ "win32-x64": ["@img/sharp-win32-x64"],+ "win32-arm64": ["@img/sharp-win32-arm64"],+ "darwin-x64": ["@img/sharp-libvips-darwin-x64"],+ "darwin-arm64": ["@img/sharp-libvips-darwin-arm64"],+ "linux-x64": ["@img/sharp-libvips-linux-x64", "@img/sharp-libvips-linuxmusl-x64"],+ "linux-arm64": ["@img/sharp-libvips-linux-arm64", "@img/sharp-libvips-linuxmusl-arm64"],+};++/** Targets that may produce a redistributable artifact and must pass full source preparation. */+export const releaseTargets = ["win32-x64", "win32-arm64", "darwin-arm64"];++/**+ * npm does not persist the `libc` field into `package-lock.json`, so `npm ci` installs both+ * the glibc and musl Linux payloads regardless of the host. Their manifests are identical,+ * but only one is loadable, so the running C library decides which one is authoritative.+ */+export function detectLinuxLibc(report = process.report) {+ const glibcVersion = report?.getReport?.()?.header?.glibcVersionRuntime;+ return typeof glibcVersion === "string" && glibcVersion.length > 0 ? "glibc" : "musl";+}++const nativeBinaryPattern = /\.(?:node|dll|dylib|so(?:\.\d+)*)$/;++/** Manifest tokens such as `732665c` or `0826579` identify a Git commit, not a release. */+export function isCommitToken(version) {+ return /^[0-9a-f]{7,40}$/.test(String(version ?? ""));+}++export function resolveReviewedCommit(component, version, sourceCommits) {+ const key = `${component}@${version}`;+ const resolved = sourceCommits?.[key];+ if (!/^[0-9a-f]{40}$/.test(resolved ?? "")) {+ throw new Error(+ `Sharp native component ${key} is identified by an abbreviated Git commit with no ` ++ "reviewed 40-character upstream commit. Add it to sourceCommits in " ++ "third_party/compliance-policy.json.",+ );+ }+ if (!resolved.startsWith(version)) {+ throw new Error(+ `Reviewed commit ${resolved} for ${key} does not extend the manifest token ${version}.`,+ );+ }+ return resolved;+}++function gitArchiveSpec(name, gitRepository, commitWebBase, gitRevision) {+ return {+ fileName: `${name}-${gitRevision}.tar`,+ url: `${commitWebBase}/${gitRevision}`,+ gitRepository,+ gitRevision,+ archivePrefix: `${name}-${gitRevision}/`,+ };+}+ const tesseractCoreSources = {+ core: {+ archiveName: "tesseract-js-core",+ gitRepository: "https://github.com/naptha/tesseract.js-core.git",+ webBase: "https://github.com/naptha/tesseract.js-core/tree",+ },+ giflib: {+ archiveName: "tesseract-core-giflib",+ gitRepository: "https://github.com/mirrorer/giflib.git",+ rawBase: "https://raw.githubusercontent.com/mirrorer/giflib",+ webBase: "https://github.com/mirrorer/giflib/tree",+ },+ leptonica: {+ archiveName: "tesseract-core-leptonica",+ gitRepository: "https://github.com/DanBloomberg/leptonica.git",+ rawBase: "https://raw.githubusercontent.com/DanBloomberg/leptonica",+ webBase: "https://github.com/DanBloomberg/leptonica/tree",+ },+ libjpeg: {+ archiveName: "tesseract-core-libjpeg",+ gitRepository: "https://github.com/LuaDist/libjpeg.git",+ rawBase: "https://raw.githubusercontent.com/LuaDist/libjpeg",+ webBase: "https://github.com/LuaDist/libjpeg/tree",+ },+ libpng: {+ archiveName: "tesseract-core-libpng",+ gitRepository: "https://github.com/glennrp/libpng.git",+ rawBase: "https://raw.githubusercontent.com/glennrp/libpng",+ webBase: "https://github.com/glennrp/libpng/tree",+ },+ libtiff: {+ archiveName: "tesseract-core-libtiff",+ gitRepository: "https://gitlab.com/libtiff/libtiff.git",+ rawBase: "https://gitlab.com/libtiff/libtiff/-/raw",+ webBase: "https://gitlab.com/libtiff/libtiff/-/tree",+ },+ libwebp: {+ archiveName: "tesseract-core-libwebp",+ gitRepository: "https://github.com/webmproject/libwebp.git",+ rawBase: "https://raw.githubusercontent.com/webmproject/libwebp",+ webBase: "https://github.com/webmproject/libwebp/tree",+ },+ openlibm: {+ archiveName: "tesseract-core-openlibm",+ gitRepository: "https://github.com/JuliaMath/openlibm.git",+ rawBase: "https://raw.githubusercontent.com/JuliaMath/openlibm",+ webBase: "https://github.com/JuliaMath/openlibm/tree",+ },+ tesseract: {+ archiveName: "tesseract-core-tesseract",+ gitRepository: "https://github.com/Balearica/tesseract.git",+ rawBase: "https://raw.githubusercontent.com/Balearica/tesseract",+ webBase: "https://github.com/Balearica/tesseract/tree",+ },+ zlib: {+ archiveName: "tesseract-core-zlib",+ gitRepository: "https://github.com/madler/zlib.git",+ rawBase: "https://raw.githubusercontent.com/madler/zlib",+ webBase: "https://github.com/madler/zlib/tree",+ },+ };++ const tesseractCoreNoticeFiles = {+ giflib: {+ path: "COPYING",+ outputFile: "giflib-COPYING.txt",+ marker: "The GIFLIB distribution is Copyright",+ },+ leptonica: {+ path: "leptonica-license.txt",+ outputFile: "leptonica-LICENSE.txt",+ marker: "Copyright (C) 2001-2020 Leptonica",+ },+ libjpeg: {+ path: "README",+ outputFile: "libjpeg-README.txt",+ marker: "LEGAL ISSUES",+ },+ libpng: {+ path: "LICENSE",+ outputFile: "libpng-LICENSE.txt",+ marker: "PNG Reference Library License version 2",+ },+ libtiff: {+ path: "COPYRIGHT",+ outputFile: "libtiff-COPYRIGHT.txt",+ marker: "Copyright (c) 1988-1997 Sam Leffler",+ },+ libwebp: {+ path: "COPYING",+ outputFile: "libwebp-COPYING.txt",+ marker: "Copyright (c) 2010, Google Inc.",+ },+ openlibm: {+ path: "LICENSE.md",+ outputFile: "openlibm-LICENSE.md",+ marker: "OpenLibm contains code that is covered by various licenses.",+ },+ tesseract: {+ path: "LICENSE",+ outputFile: "tesseract-LICENSE.txt",+ marker: "Apache License",+ },+ zlib: {+ path: "README",+ outputFile: "zlib-README.txt",+ marker: "ZLIB DATA COMPRESSION LIBRARY",+ },-};++}const sourceBuilders = {aom: (version) => ({@@@ -539,6 -494,224 +658,177 @@@ export function buildNativeSourceSpecsreturn specs.sort((a, b) => a.id.localeCompare(b.id));}+ function assertExactKeys(value, expected, label) {+ const actual = Object.keys(value ?? {}).sort();+ const sortedExpected = [...expected].sort();+ if (JSON.stringify(actual) !== JSON.stringify(sortedExpected)) {+ throw new Error(+ `${label} differ from the reviewed set; expected ${sortedExpected.join(", ")}, ` ++ `found ${actual.join(", ") || "(none)"}.`,+ );+ }+ }++ function reviewedTesseractSourceRevisions(tesseract) {+ const expected = Object.keys(tesseractCoreSources);+ assertExactKeys(tesseract?.sourceRevisions, expected, "Tesseract source revisions");+ for (const [name, revision] of Object.entries(tesseract.sourceRevisions)) {+ if (!/^[a-f0-9]{40}$/.test(revision)) {+ throw new Error(`Tesseract ${name} source revision must be a full Git commit.`);+ }+ }+ return tesseract.sourceRevisions;+ }++ export function buildTesseractSourceSpecs(tesseract) {+ if (!/^\d+\.\d+\.\d+$/.test(tesseract?.coreVersion ?? "")) {+ throw new Error("Tesseract.js-core must have a reviewed exact version.");+ }+ const revisions = reviewedTesseractSourceRevisions(tesseract);+ return Object.entries(tesseractCoreSources)+ .map(([name, source]) => {+ const revision = revisions[name];+ const isCore = name === "core";+ return {+ id: isCore+ ? `tesseract-js-core@${tesseract.coreVersion}`+ : `tesseract-core-${name}@${revision}`,+ version: isCore ? tesseract.coreVersion : revision,+ fileName: `${source.archiveName}-${revision}.tar`,+ url: `${source.webBase}/${revision}`,+ gitRepository: source.gitRepository,+ gitRevision: revision,+ archivePrefix: `${source.archiveName}-${revision}/`,+ reason: isCore+ ? "Build scripts and source for the packaged Tesseract WebAssembly runtime."+ : `Source and license material for ${name}, statically linked into Tesseract WebAssembly.`,+ };+ })+ .sort((a, b) => a.id.localeCompare(b.id));+ }++ function packageNameFromLockPath(lockPath) {+ return lockPath.split("node_modules/").at(-1);+ }++ export function buildArtisticSourceSpecs(lock, reviewedPackages) {+ const installed = new Map();+ for (const [lockPath, entry] of Object.entries(lock.packages ?? {})) {+ if (!lockPath || entry.dev || entry.license !== "Artistic-2.0") continue;+ const name = packageNameFromLockPath(lockPath);+ const versions = installed.get(name) ?? new Set();+ versions.add(entry.version);+ installed.set(name, versions);+ }++ assertExactKeys(+ Object.fromEntries(installed),+ Object.keys(reviewedPackages ?? {}),+ "Artistic-2.0 packages",+ );+ return Object.entries(reviewedPackages ?? {})+ .map(([name, version]) => {+ const versions = installed.get(name);+ if (versions?.size !== 1 || !versions.has(version)) {+ throw new Error(+ `${name} Artistic-2.0 versions have not been reviewed: ` ++ `${[...(versions ?? [])].join(", ") || "(missing)"}; expected ${version}.`,+ );+ }+ if (name.includes("/")) {+ throw new Error(`Scoped Artistic-2.0 package ${name} needs an explicit source URL.`);+ }+ return {+ id: `npm-source-${name}@${version}`,+ version,+ fileName: `${name}-${version}.tgz`,+ url: `https://registry.npmjs.org/${name}/-/${name}-${version}.tgz`,+ reason:+ "Verbatim Standard Version source for an Artistic-2.0 package distributed with the app.",+ };+ })+ .sort((a, b) => a.id.localeCompare(b.id));+ }++ export function buildComplianceSourceSpecs(nativeVersions, lock, policy, platform) {+ return [+ ...buildNativeSourceSpecs(nativeVersions, {+ platform,+ sharpVersion: policy.sharp,+ sharpLibvipsVersion: policy.sharpLibvips.version,+ electronVersion: policy.electron.version,+ ffmpegRevision: policy.electron.ffmpegRevision,++ sourceCommits: policy.sourceCommits,+ }),+ ...buildTesseractSourceSpecs(policy.tesseract),+ ...buildArtisticSourceSpecs(lock, policy.artisticPackages),+ ].sort((a, b) => a.id.localeCompare(b.id));+ }++ export function buildTesseractNoticeSpecs(tesseract) {+ const revisions = reviewedTesseractSourceRevisions(tesseract);+ const specs = Object.entries(tesseractCoreNoticeFiles).map(([name, notice]) => {+ const source = tesseractCoreSources[name];+ const revision = revisions[name];+ return {+ id: `tesseract-core-${name}-license`,+ fileName: `tesseract-core-${notice.outputFile}`,+ outputPath: `tesseract-core/${notice.outputFile}`,+ url: `${source.rawBase}/${revision}/${notice.path}`,+ marker: notice.marker,+ };+ });++ const tessdataRevision = tesseract?.tessdata?.revision;+ if (!/^[a-f0-9]{40}$/.test(tessdataRevision ?? "")) {+ throw new Error("Tesseract tessdata revision must be a full Git commit.");+ }+ specs.push({+ id: "tessdata-fast-license",+ fileName: "tessdata-fast-LICENSE.txt",+ outputPath: "tesseract-core/tessdata-fast-LICENSE.txt",+ url:+ `https://raw.githubusercontent.com/tesseract-ocr/tessdata_fast/` ++ `${tessdataRevision}/LICENSE`,+ marker: "Apache License",+ });+ return specs.sort((a, b) => a.id.localeCompare(b.id));+ }++ export function buildStaticRemoteMaterialSpecs(policy) {+ return [+ ...legalTextSpecs.map((spec) => ({+ ...spec,+ outputPath: `licenses/${spec.fileName}`,+ })),+ ...buildTesseractNoticeSpecs(policy.tesseract),+ ].sort((a, b) => a.id.localeCompare(b.id));+ }++ export function assertReviewedTessdataPins(source, tessdata) {+ const revision = source.match(/export const TESSDATA_COMMIT = "([a-f0-9]{40})"/)?.[1];+ if (revision !== tessdata?.revision) {+ throw new Error(+ `Runtime tessdata revision ${revision ?? "(missing)"} has not been reviewed; ` ++ `expected ${tessdata?.revision ?? "(missing)"}.`,+ );+ }++ const block = source.match(/export const TESSDATA_SHA256:[\s\S]*?=\s*\{([\s\S]*?)\};/)?.[1];+ if (!block) throw new Error("Runtime tessdata SHA-256 map could not be read.");+ const runtimeFiles = Object.fromEntries(+ [...block.matchAll(/^\s*([A-Za-z0-9_-]+):\s*"([a-f0-9]{64})",?\s*$/gm)].map(+ ([, name, sha256]) => [`${name}.traineddata`, sha256],+ ),+ );+ assertExactKeys(runtimeFiles, Object.keys(tessdata.files ?? {}), "Tessdata files");+ for (const [name, sha256] of Object.entries(tessdata.files ?? {})) {+ if (runtimeFiles[name] !== sha256) {+ throw new Error(`Runtime tessdata hash for ${name} does not match the reviewed policy.`);+ }+ }+ }+export async function prepareCompliance({rootDir = repositoryRoot,outputDir = complianceOutput,@@@ -549,18 -722,8 +839,18 @@@const policy = readJson(path.join(rootDir, "third_party", "compliance-policy.json"));const lock = readJson(path.join(rootDir, "package-lock.json"));+ const manifest = readJson(path.join(rootDir, "package.json"));+ const target = `${process.platform}-${process.arch}`;+ assertWasmExcludedFromPackaging(manifest.build);+ assertLockfileClosure(lock);+ if (includeSources && !releaseTargets.includes(target)) {+ throw new Error(+ `${target} is not a supported release target (${releaseTargets.join(", ")}). Run ` ++ "compliance:licenses instead of preparing a redistributable bundle.",+ );+ }const packages = collectProductionPackages(rootDir, lock);- validateReviewedVersions(packages, lock, policy);+ validateReviewedVersions(packages, lock, policy, rootDir);await removeStalePartialFiles(path.join(rootDir, ".compliance-cache"));await rm(outputDir, { recursive: true, force: true });@@@ -910,12 -1074,31 +1214,37 @@@ function buildLicenseInventory(rootDirreturn packages.map((pkg) => {const files = findPackageLicenseFiles(pkg.directory);+ // Sharp's platform packages declare compound SPDX expressions but ship at most the+ // permissive half, so they are resolved term by term before the file-based path.+ if (pkg.name.startsWith("@img/sharp-")) {+ return reviewedSharpLicenseEntry(pkg, policy, files);+ }++ if (pkg.license === "Artistic-2.0") {+ if (files.length === 0) {+ throw new Error(`${pkg.name}@${pkg.version} is missing its Artistic-2.0 notice.`);+ }+ return {+ name: pkg.name,+ version: pkg.version,+ license: pkg.license,+ packagePath: pkg.lockPath,+ licenseSource: `${files.join(", ")}, licenses/Artistic-2.0.txt`,+ text: [+ ...files.map(+ (file) =>+ `----- ${file} -----\n${readFileSync(+ path.join(pkg.directory, ...file.split("/")),+ "utf8",+ ).trim()}`,+ ),+ "The complete Artistic License 2.0 accompanies this application at " ++ "licenses/Artistic-2.0.txt. Verbatim package source is listed in " ++ "SOURCE-MANIFEST.json for redistributable builds.",+ ].join("\n\n"),+ };+ }+if (files.length > 0) {return {name: pkg.name,diff --cc scripts/compliance.test.mjsindex 10d199a,d7bb101..5c4f2f6--- a/scripts/compliance.test.mjs+++ b/scripts/compliance.test.mjs@@@ -6,29 -6,35 +6,46 @@@ import path from "node:path"import test from "node:test";import { fileURLToPath } from "node:url";+ import {+ assertPortableLockfileRegistries,+ assertPolicyCapableNpm,+ assertReviewedInstallScripts,+ normalizeLockfileRegistryUrls,+ } from "./check-lockfile-portability.mjs";+ import {+ assertReviewedPackagePath,+ exitCodeForSignal,+ sanitizeElectronEnvironment,+ } from "./run-reviewed-electron.mjs";import {+ assertLockfileClosure,assertReviewedCopilotCliVersions,+ assertReviewedTessdataPins,+ assertWasmExcludedFromPackaging,+ buildArtisticSourceSpecs,+ buildComplianceSourceSpecs,buildNativeSourceSpecs,+ buildStaticRemoteMaterialSpecs,+ buildTesseractNoticeSpecs,+ buildTesseractSourceSpecs,deterministicGitConfigArgs,+ detectLinuxLibc,+ excludedWasmPackages,findPackageLicenseFiles,hasExpectedFileHeader,+ isCommitToken,isLicenseFileName,legalTextSpecs,+ nativePayloadCandidates,onnxRefForVersion,+ releaseTargets,+ resolveReviewedCommit,reviewedSharpLibvipsLicenseEntry,+ reviewedSharpLicenseEntry,reviewedMaterialHash,renderRelinking,+ selectNativePayload,+ splitSpdxAnd,verifyComplianceDirectory,} from "./compliance.mjs";@@@ -125,12 -119,93 +147,97 @@@ test("nested package legal files are di}});+ test("Tesseract WebAssembly source and notices are pinned to the reviewed build", () => {+ const sources = buildTesseractSourceSpecs(repoPolicy.tesseract);+ assert.equal(sources.length, 10);+ assert.deepEqual(+ new Set(sources.map(({ id }) => id)),+ new Set([+ "[email protected]",+ ...Object.entries(repoPolicy.tesseract.sourceRevisions)+ .filter(([name]) => name !== "core")+ .map(([name, revision]) => `tesseract-core-${name}@${revision}`),+ ]),+ );+ for (const source of sources) {+ assert.match(source.gitRevision, /^[a-f0-9]{40}$/);+ assert.match(source.url, new RegExp(`${source.gitRevision}$`));+ assert.match(source.fileName, /\.tar$/);+ }++ const notices = buildTesseractNoticeSpecs(repoPolicy.tesseract);+ assert.equal(notices.length, 10);+ assert(notices.some(({ id }) => id === "tessdata-fast-license"));+ for (const notice of notices) {+ assert.doesNotMatch(notice.url, /\/(?:master|main|HEAD)(?:\/|$)/);+ assert.match(notice.outputPath, /^tesseract-core\//);+ assert.match(repoPolicy.remoteMaterials[notice.id], /^[a-f0-9]{64}$/);+ }+ });++ test("runtime tessdata pins match the reviewed model policy", async () => {+ const source = await readFile(+ path.join(repoRoot, "electron", "sensitive", "tessdata-source.ts"),+ "utf8",+ );+ assert.doesNotThrow(() =>+ assertReviewedTessdataPins(source, repoPolicy.tesseract.tessdata),+ );+ assert.throws(+ () =>+ assertReviewedTessdataPins(+ source.replace(repoPolicy.tesseract.tessdata.revision, "f".repeat(40)),+ repoPolicy.tesseract.tessdata,+ ),+ /has not been reviewed/,+ );+ });++ test("Artistic-2.0 packages retain exact Standard Version source", () => {+ const sources = buildArtisticSourceSpecs(repoLock, repoPolicy.artisticPackages);+ assert.equal(sources.length, 5);+ for (const source of sources) {+ assert.match(source.url, /^https:\/\/registry\.npmjs\.org\/[^/]+\/-\/[^/]+\.tgz$/);+ assert.match(source.reason, /Standard Version source/);+ }++ const changed = structuredClone(repoLock);+ changed.packages["node_modules/editions"].version = "99.0.0";+ assert.throws(+ () => buildArtisticSourceSpecs(changed, repoPolicy.artisticPackages),+ /have not been reviewed/,+ );+ });++ test("every reviewed source hash is referenced by the release manifest", () => {- const expected = buildComplianceSourceSpecs(- nativeVersions,- repoLock,- repoPolicy,- "win32",- ).map(({ id }) => id);++ const darwinVersions = {++ ...nativeVersions,++ archive: "3.8.8",++ expat: "2.8.2",++ ffi: "3.6.0",++ glib: "2.89.1",++ heif: "1.23.1",++ pango: "1.58.0",++ rsvg: "2.62.90",++ tiff: "d01a94b",++ uhdr: "1acdbed",++ };++ const expected = [++ ...buildComplianceSourceSpecs(nativeVersions, repoLock, repoPolicy, "win32"),++ ...buildComplianceSourceSpecs(darwinVersions, repoLock, repoPolicy, "darwin"),++ ].map(({ id }) => id);+ assert.deepEqual(+ new Set(Object.keys(repoPolicy.sourceMaterials)),+ new Set(expected),+ );+ });+test("native source manifest covers dependencies, build scripts, and patches", () => {- const sources = buildNativeSourceSpecs(nativeVersions, {- platform: "win32",- sharpVersion: "0.34.5",- sharpLibvipsVersion: "1.2.4",- electronVersion: "43.1.1",- ffmpegRevision: "ad41607c61898cf7150e0fb20fe4bbabd44922a3",- });+ const sources = buildNativeSourceSpecs(nativeVersions, specOptions);const ids = new Set(sources.map(({ id }) => id));- for (const dependency of Object.keys(nativeVersions)) {- assert(ids.has(`sharp-native-${dependency}`), `missing ${dependency}`);+ for (const [dependency, version] of Object.entries(nativeVersions)) {+ assert(ids.has(`sharp-native-${dependency}@${version}`), `missing ${dependency}`);}for (const required of ["sharp",@@@ -154,151 -230,6 +261,124 @@@assert.doesNotMatch(ffmpeg.url, /\+archive/);});+test("source ids are version qualified so both platform payloads coexist", () => {+ const windows = buildNativeSourceSpecs(nativeVersions, specOptions);+ const posix = buildNativeSourceSpecs(+ { ...nativeVersions, archive: "3.8.8", tiff: "d01a94b", uhdr: "1acdbed" },+ { ...specOptions, platform: "darwin" },+ );+ assert(windows.some(({ id }) => id === "[email protected]"));+ assert(posix.some(({ id }) => id === "[email protected]"));+ const shared = new Set(windows.map(({ id }) => id));+ assert(+ posix.some(({ id }) => id.startsWith("sharp-native-") && !shared.has(id)),+ "platform payloads must be able to pin different component versions",+ );+});++test("only components present in the payload manifest are required", () => {+ const trimmed = { ...nativeVersions };+ delete trimmed.aom;+ const ids = new Set(buildNativeSourceSpecs(trimmed, specOptions).map(({ id }) => id));+ assert.equal(ids.has("[email protected]"), false);+ assert.equal([...ids].some((id) => id.startsWith("sharp-native-spng")), false);+});++test("an unknown payload component fails closed", () => {+ assert.throws(+ () => buildNativeSourceSpecs({ ...nativeVersions, brandnew: "1.0.0" }, specOptions),+ /has no reviewed source builder/,+ );+});++test("commit-identified components resolve to reviewed immutable revisions", () => {+ assert.equal(isCommitToken("732665c"), true);+ assert.equal(isCommitToken("4.7.1"), false);+ assert.equal(+ resolveReviewedCommit("tiff", "732665c", sourceCommits),+ "732665c2c8785cec3e1f46ba9908575f0f3a8059",+ );+ assert.throws(+ () => resolveReviewedCommit("tiff", "abcdef1", sourceCommits),+ /no reviewed 40-character upstream commit/,+ );+ assert.throws(+ () => resolveReviewedCommit("tiff", "732665c", { "tiff@732665c": "f".repeat(40) }),+ /does not extend the manifest token/,+ );++ const sources = buildNativeSourceSpecs(nativeVersions, specOptions);+ for (const [id, repository, revision] of [+ ["sharp-native-tiff@732665c", "https://gitlab.com/libtiff/libtiff.git", "732665c2c8785cec3e1f46ba9908575f0f3a8059"],+ ["sharp-native-uhdr@13a058f", "https://github.com/google/libultrahdr.git", "13a058f452d846e43d4691f6885eeeaa8b0ea8d0"],+ ["sharp-native-mozjpeg@0826579", "https://github.com/mozilla/mozjpeg.git", "08265790774cd0714832c9e675522acbe5581437"],+ ]) {+ const spec = sources.find((entry) => entry.id === id);+ assert(spec, `missing ${id}`);+ assert.equal(spec.gitRepository, repository);+ assert.equal(spec.gitRevision, revision);+ assert.doesNotMatch(spec.url, /archive\/refs/);+ }+});++test("commit-identified components fall back to tagged tarballs", () => {+ const sources = buildNativeSourceSpecs(+ { ...nativeVersions, tiff: "4.7.1", uhdr: "1.4.0", mozjpeg: "4.1.5" },+ specOptions,+ );+ assert.equal(+ sources.find(({ id }) => id === "[email protected]").gitRepository,+ undefined,+ );+ assert.match(+ sources.find(({ id }) => id === "[email protected]").url,+ /archive\/refs\/tags\/v1\.4\.0\.tar\.gz$/,+ );+});++test("build patches match the platform that applies them", () => {+ const windows = new Set(buildNativeSourceSpecs(nativeVersions, specOptions).map(({ id }) => id));+ const posix = new Set(+ buildNativeSourceSpecs(nativeVersions, { ...specOptions, platform: "darwin" }).map(+ ({ id }) => id,+ ),+ );++ // Windows patches all live inside the build-win64-mxe archive.+ assert(windows.has("libvips-windows-build"));+ assert.equal([...windows].some((id) => id.startsWith("sharp-patch-")), false);++ assert.equal(posix.has("libvips-windows-build"), false);+ for (const required of [+ "sharp-patch-glib-without-gregex",+ "sharp-patch-libvips-soversion",+ "sharp-patch-mozjpeg-simd-fdct",+ "sharp-patch-uhdr-platform-detection",+ ]) {+ assert(posix.has(required), `missing ${required}`);+ }+ for (const removed of [+ "sharp-patch-aom",+ "sharp-patch-highway",+ "sharp-patch-libvips-heif",+ ]) {+ assert.equal(posix.has(removed), false, `${removed} is no longer applied upstream`);+ }+});++test("every source specification uses an immutable revision or release", () => {+ for (const platform of ["win32", "darwin"]) {+ for (const spec of buildNativeSourceSpecs(nativeVersions, { ...specOptions, platform })) {+ assert.doesNotMatch(+ spec.url,+ /\/(?:master|main|HEAD)(?:[/.]|$)|pull\/\d+\.(?:patch|diff)|patch-diff\.githubusercontent/,+ `${spec.id} must not reference a mutable upstream ref`,+ );+ if (spec.gitRevision) assert.match(spec.gitRevision, /^[0-9a-f]{40}$/);+ }+ }+});+- test("every reviewed source material is still referenced by a payload", () => {- const referenced = new Set([- ...buildNativeSourceSpecs(nativeVersions, {- ...specOptions,- sharpVersion: repoPolicy.sharp,- sharpLibvipsVersion: repoPolicy.sharpLibvips.version,- electronVersion: repoPolicy.electron.version,- ffmpegRevision: repoPolicy.electron.ffmpegRevision,- sourceCommits: repoPolicy.sourceCommits,- }).map(({ id }) => id),- ...buildNativeSourceSpecs(- { ...nativeVersions, archive: "3.8.8", expat: "2.8.2", ffi: "3.6.0", glib: "2.89.1", heif: "1.23.1", pango: "1.58.0", rsvg: "2.62.90", tiff: "d01a94b", uhdr: "1acdbed" },- {- ...specOptions,- platform: "darwin",- sharpVersion: repoPolicy.sharp,- sharpLibvipsVersion: repoPolicy.sharpLibvips.version,- electronVersion: repoPolicy.electron.version,- ffmpegRevision: repoPolicy.electron.ffmpegRevision,- sourceCommits: repoPolicy.sourceCommits,- },- ).map(({ id }) => id),- ]);- const orphaned = Object.keys(repoPolicy.sourceMaterials).filter((id) => !referenced.has(id));- assert.deepEqual(orphaned, [], "compliance-policy.json retains unused source hashes");- });-test("git archives ignore host line-ending and global attribute settings", () => {assert.deepEqual(deterministicGitConfigArgs, ["-c",@@@ -369,213 -300,96 +449,303 @@@ test("platform Sharp/libvips packages u);});+test("compound SPDX expressions are split into individual terms", () => {+ assert.deepEqual(splitSpdxAnd("Apache-2.0 AND LGPL-3.0-or-later AND MIT"), [+ "Apache-2.0",+ "LGPL-3.0-or-later",+ "MIT",+ ]);+ assert.deepEqual(splitSpdxAnd("(MIT AND Apache-2.0)"), ["MIT", "Apache-2.0"]);+ assert.deepEqual(splitSpdxAnd("MIT"), ["MIT"]);+ assert.deepEqual(splitSpdxAnd(undefined), []);+});++test("every declared Sharp license term resolves to concrete text", async () => {+ const root = await mkdtemp(path.join(tmpdir(), "skill-recorder-sharp-license-"));+ try {+ await writeFile(+ path.join(root, "LICENSE"),+ " Apache License\n Version 2.0, January 2004\n",+ );+ const policy = { sharp: "0.35.3", sharpLibvips: { version: "1.3.2" } };+ const pkg = {+ name: "@img/sharp-win32-arm64",+ version: "0.35.3",+ license: "Apache-2.0 AND LGPL-3.0-or-later",+ lockPath: "node_modules/@img/sharp-win32-arm64",+ directory: root,+ };+ const entry = reviewedSharpLicenseEntry(pkg, policy, ["LICENSE"]);+ assert.equal(entry.licenseSource, "LICENSE, licenses/LGPL-3.0.txt");+ assert.match(entry.text, /Apache License/);+ assert.match(entry.text, /licenses\/LGPL-3\.0\.txt/);++ const wasm = reviewedSharpLicenseEntry(+ { ...pkg, name: "@img/sharp-wasm32", license: "Apache-2.0 AND LGPL-3.0-or-later AND MIT" },+ policy,+ ["LICENSE"],+ );+ assert.match(wasm.licenseSource, /canonical SPDX MIT text/);+ assert.match(wasm.text, /MIT License/);++ // The permissive half alone is never enough for a compound expression.+ assert.throws(+ () => reviewedSharpLicenseEntry(pkg, policy, []),+ /declares Apache-2\.0 but ships no Apache license text/,+ );+ assert.throws(+ () => reviewedSharpLicenseEntry({ ...pkg, license: "Apache-2.0 AND GPL-3.0" }, policy, ["LICENSE"]),+ /unexpected license metadata/,+ );+ assert.throws(+ () => reviewedSharpLicenseEntry({ ...pkg, version: "0.35.4" }, policy, ["LICENSE"]),+ /No reviewed Sharp license override/,+ );+ } finally {+ await rm(root, { recursive: true, force: true });+ }+});++test("exactly one architecture-matched native payload is packaged", async () => {+ const root = await mkdtemp(path.join(tmpdir(), "skill-recorder-payload-"));+ try {+ const make = async (name) => {+ const directory = path.join(root, name.replaceAll("/", "_"));+ await mkdir(directory, { recursive: true });+ await writeFile(path.join(directory, "versions.json"), JSON.stringify({ vips: "8.18.3" }));+ return { name, version: "0.35.3", directory, lockPath: `node_modules/${name}` };+ };+ const win64 = await make("@img/sharp-win32-x64");+ const winArm = await make("@img/sharp-win32-arm64");+ const wasm = await make("@img/sharp-wasm32");+ const rogue = await make("@img/sharp-linux-x64");++ assert.equal(+ selectNativePayload([winArm, wasm], { platform: "win32", arch: "arm64" }).name,+ "@img/sharp-win32-arm64",+ );+ assert.throws(+ () => selectNativePayload([wasm], { platform: "win32", arch: "arm64" }),+ /No Sharp native payload is installed/,+ );+ assert.throws(+ () => selectNativePayload([win64], { platform: "win32", arch: "arm64" }),+ /Unexpected Sharp native payload installed/,+ );+ assert.throws(+ () => selectNativePayload([winArm, rogue], { platform: "win32", arch: "arm64" }),+ /Unexpected Sharp native payload installed/,+ );+ assert.throws(+ () => selectNativePayload([winArm], { platform: "freebsd", arch: "x64" }),+ /is not a reviewed Sharp native platform/,+ );++ const musl = await make("@img/sharp-libvips-linuxmusl-x64");+ const glibc = await make("@img/sharp-libvips-linux-x64");+ // npm installs both Linux payloads on every host because package-lock.json cannot+ // record `libc`; the running C library decides which one is authoritative.+ assert.equal(+ selectNativePayload([musl, glibc], { platform: "linux", arch: "x64", libc: "glibc" }).name,+ "@img/sharp-libvips-linux-x64",+ );+ assert.equal(+ selectNativePayload([musl, glibc], { platform: "linux", arch: "x64", libc: "musl" }).name,+ "@img/sharp-libvips-linuxmusl-x64",+ );+ // With only one payload installed there is nothing to disambiguate, so a libc+ // misdetection must not turn a working install into a hard failure.+ assert.equal(+ selectNativePayload([musl], { platform: "linux", arch: "x64", libc: "glibc" }).name,+ "@img/sharp-libvips-linuxmusl-x64",+ );+ assert.throws(+ () => selectNativePayload([musl, glibc], { platform: "darwin", arch: "x64" }),+ /Unexpected Sharp native payload installed/,+ );+ } finally {+ await rm(root, { recursive: true, force: true });+ }++ assert.equal(detectLinuxLibc({ getReport: () => ({ header: { glibcVersionRuntime: "2.39" } }) }), "glibc");+ assert.equal(detectLinuxLibc({ getReport: () => ({ header: {} }) }), "musl");+ assert.equal(detectLinuxLibc({ getReport: () => ({}) }), "musl");+ assert.ok(["glibc", "musl"].includes(detectLinuxLibc()));++ assert.deepEqual(Object.keys(nativePayloadCandidates).sort(), [+ "darwin-arm64",+ "darwin-x64",+ "linux-arm64",+ "linux-x64",+ "win32-arm64",+ "win32-x64",+ ]);+ assert.deepEqual(releaseTargets, ["win32-x64", "win32-arm64", "darwin-arm64"]);+});++test("the lockfile resolves every dependency npm ci needs on other platforms", async () => {+ const lock = JSON.parse(await readFile(path.join(repoRoot, "package-lock.json"), "utf8"));+ assert.doesNotThrow(() => assertLockfileClosure(lock));++ // npm on Windows drops entries that only Linux and macOS install, which breaks the+ // documented `npm ci` source-install path.+ const pruned = structuredClone(lock);+ delete pruned.packages["node_modules/@emnapi/runtime"];+ assert.throws(+ () => assertLockfileClosure(pruned),+ /@img\/sharp-wasm32 -> @emnapi\/runtime/,+ );++ assert.doesNotThrow(() =>+ assertLockfileClosure({+ packages: {+ "": { dependencies: { a: "^1.0.0" } },+ "node_modules/a": { version: "1.0.0", dependencies: { b: "^1.0.0" } },+ "node_modules/a/node_modules/b": { version: "1.0.0" },+ },+ }),+ );+ assert.throws(+ () => assertLockfileClosure({ packages: { "": { dependencies: { a: "^1.0.0" } } } }),+ /<root> -> a/,+ );+ assert.throws(() => assertLockfileClosure({}), /must declare a packages map/);+});++test("Electron notices are reviewed per release target", async () => {+ const policy = JSON.parse(+ await readFile(path.join(repoRoot, "third_party", "compliance-policy.json"), "utf8"),+ );+ // Chromium's notice file differs per platform, so a single reviewed hash would either+ // fail macOS or wave through an unreviewed Windows notice.+ assert.deepEqual(Object.keys(policy.electron.notices).sort(), [...releaseTargets].sort());+ const chromium = new Set(+ releaseTargets.map((target) => policy.electron.notices[target]["LICENSES.chromium.html"]),+ );+ assert.equal(chromium.size, 2, "Windows and macOS ship different Chromium notices");+ for (const target of releaseTargets) {+ assert.ok(policy.electron.distributions[target], `${target} needs a reviewed distribution`);+ for (const notice of ["LICENSE.electron.txt", "LICENSES.chromium.html"]) {+ assert.match(policy.electron.notices[target][notice], /^[a-f0-9]{64}$/);+ }+ }+});++test("the WASM payload is excluded from every Electron artifact", () => {+ assert.deepEqual(excludedWasmPackages, [+ "@img/sharp-wasm32",+ "@img/sharp-freebsd-wasm32",+ "@img/sharp-webcontainers-wasm32",+ "@emnapi/runtime",+ ]);+ assert.doesNotThrow(() => assertWasmExcludedFromPackaging(repoManifest.build));+ for (const list of ["files", "win"]) {+ const build = structuredClone(repoManifest.build);+ const target = list === "files" ? build.files : build.win.files;+ target.splice(target.indexOf("!node_modules/@img/sharp-wasm32/**"), 1);+ assert.throws(+ () => assertWasmExcludedFromPackaging(build),+ /does not exclude @img\/sharp-wasm32/,+ );+ }+});++test("only supported release targets are packaged", () => {+ assert.equal(repoManifest.build.linux, undefined, "Linux is not a release target");+ assert.deepEqual(repoManifest.build.mac.target, ["dmg", "zip"]);+ assert.equal(repoManifest.build.win.target, "nsis");+});++ test("the lockfile is registry-portable and install scripts are reviewed", async () => {+ assert.doesNotThrow(() => assertPortableLockfileRegistries(repoLock));+ assert.doesNotThrow(() => assertReviewedInstallScripts(repoLock, repoManifest));++ const internal = {+ packages: {+ "node_modules/example": {+ version: "1.0.0",+ resolved:+ "https://ms-feed-25.pkgs.visualstudio.com/feed/_packaging/npm/npm/registry/example/-/example-1.0.0.tgz",+ },+ },+ };+ assert.throws(+ () => assertPortableLockfileRegistries(internal),+ /non-portable resolved URLs/,+ );+ assert.equal(normalizeLockfileRegistryUrls(internal), 1);+ assert.equal(+ internal.packages["node_modules/example"].resolved,+ "https://registry.npmjs.org/example/-/example-1.0.0.tgz",+ );+ assert.doesNotThrow(() => assertPortableLockfileRegistries(internal));++ const scriptLock = {+ packages: {+ "node_modules/native-alias": {+ version: "2.0.0",+ resolved: "https://registry.npmjs.org/native/-/native-2.0.0.tgz",+ hasInstallScript: true,+ },+ "node_modules/noisy": {+ version: "3.0.0",+ resolved: "https://registry.npmjs.org/noisy/-/noisy-3.0.0.tgz",+ hasInstallScript: true,+ },+ },+ };+ assert.doesNotThrow(() =>+ assertReviewedInstallScripts(scriptLock, {+ allowScripts: { "[email protected]": true, noisy: false },+ }),+ );+ assert.throws(+ () =>+ assertReviewedInstallScripts(scriptLock, {+ allowScripts: { "native-alias": false },+ }),+ /does not match an install-script package/,+ );+ assert.throws(+ () =>+ assertReviewedInstallScripts(scriptLock, {+ allowScripts: { native: true },+ }),+ /must pin an installed package version/,+ );+ assert.throws(+ () => assertReviewedInstallScripts(scriptLock, { allowScripts: {} }),+ /has no reviewed decision/,+ );+ assert.doesNotThrow(() => assertPolicyCapableNpm("11.17.0"));+ assert.doesNotThrow(() => assertPolicyCapableNpm("12.0.0"));+ assert.throws(+ () => assertPolicyCapableNpm("11.16.0"),+ /npm 11\.17\.0 or newer/,+ );++ assert.deepEqual(+ sanitizeElectronEnvironment({+ ELECTRON_OVERRIDE_DIST_PATH: "unreviewed",+ npm_config_electron_customdir: "wrong-release",+ npm_config_electron_mirror: "https://example.invalid",+ npm_package_config_electron_customFilename: "wrong.zip",+ npm_package_config_electron_use_remote_checksums: "1",+ PATH: "retained",+ }),+ { PATH: "retained" },+ );+ assert.doesNotThrow(() =>+ assertReviewedPackagePath("electron.exe", "electron.exe"),+ );+ assert.throws(+ () => assertReviewedPackagePath("electron.exe", "unreviewed.exe"),+ /does not match the reviewed runtime/,+ );+ assert.equal(exitCodeForSignal("SIGINT"), 130);+ assert.equal(exitCodeForSignal("SIGTERM"), 143);+ });+test("unreviewed source hashes fail closed", () => {assert.equal(reviewedMaterialHash("source", { source: "a".repeat(64) }, "Source material"),diff --cc scripts/install-windows.test.ps1index 2180323,d02982f..d156dcc--- a/scripts/install-windows.test.ps1+++ b/scripts/install-windows.test.ps1@@@ -92,6 -92,62 +92,61 @@@ tryif ([IO.Directory]::Exists((ConvertTo-ExtendedLengthPath -Path $destinationDirectory))) {throw "Remove-DirectoryTree left the destination directory behind."}-+ $lockedSourceDirectory = Join-Path $testRoot "locked-source"+ $lockedDestinationDirectory = Join-Path $testRoot "locked-destination"+ $lockedFile = Join-Path $lockedSourceDirectory "scanned.exe"+ $readyFile = Join-Path $testRoot "locker-ready"+ [IO.Directory]::CreateDirectory($lockedSourceDirectory) | Out-Null+ [IO.File]::WriteAllText($lockedFile, "endpoint scanner simulation")++ $escapedLockedFile = $lockedFile.Replace("'", "''")+ $escapedReadyFile = $readyFile.Replace("'", "''")+ $lockerSource = @"+ `$stream = [IO.File]::Open(+ '$escapedLockedFile',+ [IO.FileMode]::Open,+ [IO.FileAccess]::Read,+ [IO.FileShare]::Read+ )+ try {+ [IO.File]::WriteAllText('$escapedReadyFile', 'ready')+ Start-Sleep -Milliseconds 500+ } finally {+ `$stream.Dispose()+ }+ "@+ $encodedLockerSource = [Convert]::ToBase64String(+ [Text.Encoding]::Unicode.GetBytes($lockerSource)+ )+ $powerShellExecutable = [Diagnostics.Process]::GetCurrentProcess().MainModule.FileName+ $locker = Start-Process `+ -FilePath $powerShellExecutable `+ -ArgumentList @("-NoProfile", "-NonInteractive", "-EncodedCommand", $encodedLockerSource) `+ -PassThru+ try {+ $readyDeadline = (Get-Date).AddSeconds(10)+ while (-not [IO.File]::Exists($readyFile)) {+ if ((Get-Date) -ge $readyDeadline -or $locker.HasExited) {+ throw "The directory-lock test helper did not become ready."+ }+ Start-Sleep -Milliseconds 25+ }++ Move-DirectoryTree `+ -Source $lockedSourceDirectory `+ -Destination $lockedDestinationDirectory `+ -MaxAttempts 6 `+ -RetryDelayMilliseconds 100+ if (-not [IO.Directory]::Exists($lockedDestinationDirectory)) {+ throw "Move-DirectoryTree did not recover from a transient file lock."+ }+ } finally {+ if (-not $locker.HasExited) {+ Stop-Process -Id $locker.Id -Force+ $locker.WaitForExit()+ }+ $locker.Dispose()+ }} finally {Remove-DirectoryTree -Path $testRoot}diff --cc scripts/review-compliance-sources.mjsindex 5ff39ce,9e6a6ca..8277ccf--- a/scripts/review-compliance-sources.mjs+++ b/scripts/review-compliance-sources.mjs@@@ -1,21 -1,11 +1,16 @@@#!/usr/bin/env node/**- * Reviewer tool that proposes SHA-256 values for `third_party/compliance-policy.json`.+ * Proposes SHA-256 values for newly reviewed compliance materials.*- * `npm run compliance:prepare` is deliberately fail-closed: it will only accept source- * material whose hash is already recorded in the policy, so it can never be used to- * bootstrap new hashes. This script performs that bootstrap step separately, under human- * review, and never writes to the policy itself — it prints a patch for a reviewer to- * inspect and apply.+ * The release path never bootstraps trust: `compliance:prepare` accepts only+ * hashes already committed to the policy. This separate reviewer utility+ * retrieves the exact pinned inputs and prints policy entries for inspection;+ * it never edits the policy.+ *+ * Usage:+ * node scripts/review-compliance-sources.mjs [--platform win32|darwin|linux]+ * [--versions <versions.json>]+ * [--all]- *- * Defaults to the payload installed for the current platform. `--versions` allows a- * reviewer to generate the hashes for another platform's manifest from one machine;- * `--all` also re-derives material that already has a reviewed hash.*/import { execFile } from "node:child_process";import { createWriteStream, existsSync, readFileSync, statSync } from "node:fs";@@@ -36,10 -27,11 +31,11 @@@ importconst execFileAsync = promisify(execFile);const rootDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");- const reviewDir = path.join(rootDir, ".compliance-review");+ const reviewDir = path.join(rootDir, ".compliance-cache", "review");-const reviewGitDir = path.join(tmpdir(), "skill-recorder-compliance-review-git");++const reviewGitDir = path.join(reviewDir, "git");function parseArguments(argv) {- const options = { platform: process.platform, versions: null, all: false };- const options = { all: false, versions: null };++ const options = { all: false, platform: process.platform, versions: null };for (let index = 0; index < argv.length; index += 1) {const argument = argv[index];if (argument === "--all") options.all = true;@@@ -106,89 -102,115 +108,115 @@@ async function runGit(args, cwd)}async function gitArchive(spec, target) {- const repository = path.join(reviewDir, "git", spec.id.replaceAll(/[^A-Za-z0-9._-]/g, "_"));+ const safeId = spec.id.replaceAll(/[^A-Za-z0-9._-]/g, "_");+ const repository = path.join(reviewGitDir, `${safeId}-${process.pid}`);await rm(repository, { recursive: true, force: true });await mkdir(repository, { recursive: true });- await runGit(["init", "--quiet"], repository);- await runGit(- ["fetch", "--depth=1", "--no-tags", "--quiet", spec.gitRepository, spec.gitRevision],- repository,- );- const resolved = await runGit(["rev-parse", "FETCH_HEAD"], repository);- if (resolved !== spec.gitRevision) {- throw new Error(`Fetched ${spec.id} revision ${resolved}; expected ${spec.gitRevision}.`);+ try {+ await runGit(["init", "--quiet"], repository);+ await runGit(+ ["fetch", "--depth=1", "--no-tags", "--quiet", spec.gitRepository, spec.gitRevision],+ repository,+ );+ const resolved = await runGit(["rev-parse", "FETCH_HEAD"], repository);+ if (resolved !== spec.gitRevision) {+ throw new Error(`Fetched ${spec.id} revision ${resolved}; expected ${spec.gitRevision}.`);+ }+ await runGit(+ [+ ...deterministicGitConfigArgs,+ "archive",+ "--format=tar",+ `--prefix=${spec.archivePrefix}`,+ `--output=${target}`,+ "FETCH_HEAD",+ ],+ repository,+ );+ } finally {+ await rm(repository, { recursive: true, force: true });}- await runGit(- [- ...deterministicGitConfigArgs,- "archive",- "--format=tar",- `--prefix=${spec.archivePrefix}`,- `--output=${target}`,- "FETCH_HEAD",- ],- repository,- );}- async function main() {- const options = parseArguments(process.argv.slice(2));- const policy = JSON.parse(- readFileSync(path.join(rootDir, "third_party", "compliance-policy.json"), "utf8"),+ async function mapLimit(items, limit, worker) {+ const results = new Array(items.length);+ let next = 0;+ await Promise.all(+ Array.from({ length: Math.min(limit, items.length) }, async () => {+ for (;;) {+ const index = next;+ next += 1;+ if (index >= items.length) return;+ results[index] = await worker(items[index]);+ }+ }),);- const versions = loadVersions(options);- const specs = buildNativeSourceSpecs(versions, {- platform: options.platform,- sharpVersion: policy.sharp,- sharpLibvipsVersion: policy.sharpLibvips.version,- electronVersion: policy.electron.version,- ffmpegRevision: policy.electron.ffmpegRevision,- sourceCommits: policy.sourceCommits,- });-- const pending = specs.filter(({ id }) => options.all || !policy.sourceMaterials?.[id]);- if (pending.length === 0) {- console.log("Every source material for this manifest already has a reviewed hash.");- return;- }+ return results;+ }- await mkdir(path.join(reviewDir, "sources"), { recursive: true });- const results = [];- const failures = [];- const queue = [...pending];- const workers = Array.from({ length: 4 }, async () => {- for (let spec = queue.shift(); spec; spec = queue.shift()) {- const target = path.join(reviewDir, "sources", spec.fileName);- try {- await rm(target, { force: true });- if (spec.gitRepository) await gitArchive(spec, target);- else await download(spec.url, target);- if (!(await hasExpectedFileHeader(spec.fileName, target))) {- throw new Error("retrieved material is not a valid archive or patch");- }- results.push({ id: spec.id, url: spec.url, sha256: await sha256File(target) });- } catch (error) {- failures.push({ id: spec.id, url: spec.url, message: error.message });- }+ async function reviewSources(specs, policy, all) {+ const pending = specs.filter(({ id }) => all || !hasReviewedHash(policy.sourceMaterials, id));+ return mapLimit(pending, 4, async (spec) => {+ const target = path.join(reviewDir, "sources", spec.fileName);+ await mkdir(path.dirname(target), { recursive: true });+ await rm(target, { force: true });+ if (spec.gitRepository) await gitArchive(spec, target);+ else await download(spec.url, target);+ if (!(await hasExpectedFileHeader(spec.fileName, target))) {+ throw new Error(`${spec.id} did not produce a valid source archive.`);}+ return { id: spec.id, sha256: await sha256File(target), url: spec.url };});- await Promise.all(workers);+ }- results.sort((a, b) => a.id.localeCompare(b.id));- failures.sort((a, b) => a.id.localeCompare(b.id));+ async function reviewRemoteMaterials(specs, policy, all) {+ const pending = specs.filter(({ id }) => all || !hasReviewedHash(policy.remoteMaterials, id));+ return mapLimit(pending, 4, async (spec) => {+ const target = path.join(reviewDir, "remote", spec.fileName);+ await mkdir(path.dirname(target), { recursive: true });+ await rm(target, { force: true });+ await download(spec.url, target);+ const content = readFileSync(target, "utf8");+ if (!content.includes(spec.marker)) {+ throw new Error(`${spec.id} does not contain expected marker "${spec.marker}".`);+ }+ return { id: spec.id, sha256: await sha256File(target), url: spec.url };+ });+ }- console.log(`\nReviewed source material for ${options.platform} (vips ${versions.vips}):\n`);- for (const { id, url } of results) console.log(` ${id}\n ${url}`);- console.log("\nProposed third_party/compliance-policy.json sourceMaterials entries:\n");+ function printEntries(label, results) {+ console.log(`\nProposed third_party/compliance-policy.json ${label} entries:\n`);+ if (results.length === 0) {+ console.log(" (none)");+ return;+ }console.log(- results.map(({ id, sha256 }) => ` ${JSON.stringify(id)}: ${JSON.stringify(sha256)}`).join(",\n"),+ results+ .sort((a, b) => a.id.localeCompare(b.id))+ .map(({ id, sha256 }) => ` ${JSON.stringify(id)}: ${JSON.stringify(sha256)}`)+ .join(",\n"),);+ }- if (failures.length > 0) {- console.error("\nFailed to retrieve:");- for (const { id, url, message } of failures) console.error(` ${id} (${url}): ${message}`);- process.exitCode = 1;- }+ async function main() {+ const options = parseArguments(process.argv.slice(2));+ const policy = JSON.parse(+ readFileSync(path.join(rootDir, "third_party", "compliance-policy.json"), "utf8"),+ );+ const lock = JSON.parse(readFileSync(path.join(rootDir, "package-lock.json"), "utf8"));+ const nativeVersions = loadNativeVersions(lock, options.versions);+ const sourceSpecs = buildComplianceSourceSpecs(+ nativeVersions,+ lock,+ policy,- process.platform,++ options.platform,+ );+ const [sources, remote] = await Promise.all([+ reviewSources(sourceSpecs, policy, options.all),+ reviewRemoteMaterials(buildStaticRemoteMaterialSpecs(policy), policy, options.all),+ ]);+ printEntries("sourceMaterials", sources);+ printEntries("remoteMaterials", remote);}await main();diff --cc third_party/compliance-policy.jsonindex f9798a7,0b2b974..2d477ad--- a/third_party/compliance-policy.json+++ b/third_party/compliance-policy.json@@@ -14,24 -14,44 +14,54 @@@"win32-x64": "b4e9995cd3f65785eb8818276aa9020f3165ab11da41b3c762616d4a0ad8c7ad"},"notices": {- "LICENSE.electron.txt": "5154e165bd6c2cc0cfbcd8916498c7abab0497923bafcd5cb07673fe8480087d",- "LICENSES.chromium.html": "b911161e6594ec76b872498b423c54406168f2974e0d407a847f7de1e5ff94dd"+ "win32-x64": {+ "LICENSE.electron.txt": "5154e165bd6c2cc0cfbcd8916498c7abab0497923bafcd5cb07673fe8480087d",+ "LICENSES.chromium.html": "b911161e6594ec76b872498b423c54406168f2974e0d407a847f7de1e5ff94dd"+ },+ "win32-arm64": {+ "LICENSE.electron.txt": "5154e165bd6c2cc0cfbcd8916498c7abab0497923bafcd5cb07673fe8480087d",+ "LICENSES.chromium.html": "b911161e6594ec76b872498b423c54406168f2974e0d407a847f7de1e5ff94dd"+ },+ "darwin-arm64": {+ "LICENSE.electron.txt": "5154e165bd6c2cc0cfbcd8916498c7abab0497923bafcd5cb07673fe8480087d",+ "LICENSES.chromium.html": "4fc0507a046b9ecd0738b2dd64119b5ec8bc29ac0221b63edb693fd5fd497c87"+ }}},- "sharp": "0.34.5",+ "sharp": "0.35.3","sharpLibvips": {- "version": "1.2.4"+ "version": "1.3.2"},+ "secretlint": "13.0.4",+ "artisticPackages": {+ "binaryextensions": "6.11.0",+ "editions": "6.22.0",+ "istextorbinary": "9.5.0",+ "textextensions": "6.11.0",+ "version-range": "4.15.0"+ },+ "tesseract": {+ "jsVersion": "7.0.0",+ "coreVersion": "7.0.0",+ "sourceRevisions": {+ "core": "acffef2b66eb44a31df297e11d905f4b39001068",+ "giflib": "fa37672085ce4b3d62c51627ab3c8cf2dda8009a",+ "leptonica": "4af068b56a9674da915debea4ed7e1b9885b17e8",+ "libjpeg": "6c0fcb8ddee365e7abc4d332662b06900612e923",+ "libpng": "a37d4836519517bdce6cb9d956092321eca3e73b",+ "libtiff": "b51bb157123264e26d34c09cc673d213aea61fc7",+ "libwebp": "20ef03ee351d4ff03fc5ff3ec4804a879d1b9d5c",+ "openlibm": "ae2d91698508701c83cab83714d42a1146dccf85",+ "tesseract": "2a9c1c49c360462733c386d2a44fcd22c4e21411",+ "zlib": "21767c654d31d2dccdde4330529775c6c5fd5389"+ },+ "tessdata": {+ "revision": "65727574dfcd264acbb0c3e07860e4e9e9b22185",+ "files": {+ "eng.traineddata": "7d4322bd2a7749724879683fc3912cb542f19906c83bcc1a52132556427170b2"+ }+ }+ },"onnxruntime": {"1.24.3": "v1.24.3","1.24.0-dev.20251116-b39e144322": "b39e144322",@@@ -47,62 -68,72 +78,87 @@@"onnxruntime-1.24.3-license": "2f07c72751aed99790b8a4869cf2311df85a860b22ded05fa22803587a48922c","onnxruntime-1.24.3-notices": "0e07b95f3a8d6230037707c5c4a2b554d12c4cb67369669ac255635528ffcee2","onnxruntime-1.26.0-dev.20260416-b7804b056c-license": "2f07c72751aed99790b8a4869cf2311df85a860b22ded05fa22803587a48922c",- "onnxruntime-1.26.0-dev.20260416-b7804b056c-notices": "0e07b95f3a8d6230037707c5c4a2b554d12c4cb67369669ac255635528ffcee2"+ "onnxruntime-1.26.0-dev.20260416-b7804b056c-notices": "0e07b95f3a8d6230037707c5c4a2b554d12c4cb67369669ac255635528ffcee2",+ "tessdata-fast-license": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30",+ "tesseract-core-giflib-license": "0c9b7990ecdca88b676db232c226548ac408b279f550d424d996f0d83591dd8e",+ "tesseract-core-leptonica-license": "87829abb5bbb00b55a107365da89e9a33f86c4250169e5a1e5588505be7d5806",+ "tesseract-core-libjpeg-license": "c791da525733040e622ed257c7b096b8f5191b332604ead0c6bc2b54cbd8e0d1",+ "tesseract-core-libpng-license": "33ba4e187d8b0c8d7ab2bc2e522bb095219e03089e9aa0122b4fb9eb2b7de82b",+ "tesseract-core-libtiff-license": "fbd6fed7938541d2c809c0826225fc85e551fdbfa8732b10f0c87e0847acafd7",+ "tesseract-core-libwebp-license": "5aec868f669e384a22372a4e8a1a6cd7d44c64cd451f960ca69cc170d1e13acf",+ "tesseract-core-openlibm-license": "b1843fbf5b03f519a5f0a44fce751bdd1022ae7148614923f9d6293e17a18b17",+ "tesseract-core-tesseract-license": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30",+ "tesseract-core-zlib-license": "fc2c3368901700f0acdeb1d8afeaca5923296768ec6824ecdf627aac396001fd"},+ "sourceCommits": {+ "mozjpeg@0826579": "08265790774cd0714832c9e675522acbe5581437",+ "tiff@732665c": "732665c2c8785cec3e1f46ba9908575f0f3a8059",+ "tiff@d01a94b": "d01a94be176f5f6a87f7ee1c0b32e65416aa2b4d",+ "uhdr@13a058f": "13a058f452d846e43d4691f6885eeeaa8b0ea8d0",+ "uhdr@1acdbed": "1acdbed8c712e6923ebf9de4e7c8d8dda06509e9"+ },"sourceMaterials": {"electron": "9fa9a84bc0ee0aab5ec7f46de991dc55904e634fb566a75bb3f93599c861c46a","electron-ffmpeg": "e84618cc968bb2895ad494c86943c020b242a74f905fc412653c1068a37ea640","electron-ffmpeg-patch-link-with-loader-path": "849b0fbef990623b0caf187c75a3f31f53ed4390e5770196d47880056b53dc7e",- "libvips-windows-build": "241e9b486a14eb1a6b531591f703aeb7d3497c762fc209b2de6a3fdaa67ec8fb",- "sharp": "8b4d7e0149fee8d273b1b674ede7886bb7b7b172ebec0398d0b8dbaf816214d2",- "sharp-libvips-build": "d434fe577941e979438431ccbdf59ea86a5d559d6b218d6ec2a8ea466ad7c868",- "sharp-native-aom": "19e45a5a7192d690565229983dad900e76b513a02306c12053fb9a262cbeca7d",- "sharp-native-archive": "db0dee91561cbd957689036a3a71281efefd131d35d1d98ebbc32720e4da58e2",- "sharp-native-cairo": "445ed8208a6e4823de1226a74ca319d3600e83f6369f99b14265006599c32ccb",- "sharp-native-cgif": "d6cb312c7da2c6c9f310811aa3658120c0316ba130c48a012e7baf3698920fe9",- "sharp-native-exif": "62f74cf3bf673a6e24d2de68f6741643718541f83aca5947e76e3978c25dce83",- "sharp-native-expat": "71df8f40706a7bb0a80a5367079ea75d91da4f8c65c58ec59bcdfbf7decdab9f",- "sharp-native-ffi": "f3a3082a23b37c293a4fcd1053147b371f2ff91fa7ea1b2a52e335676bac82dc",- "sharp-native-fontconfig": "82e73b26adad651b236e5f5d4b3074daf8ff0910188808496326bd3449e5261d",- "sharp-native-freetype": "44bd69d1f0750603410cfd4f26f1c5523c5a3a087a2dfa8639b757dc7c6677be",- "sharp-native-fribidi": "1b1cde5b235d40479e91be2f0e88a309e3214c8ab470ec8a2744d82a5a9ea05c",- "sharp-native-glib": "119d1708ca022556d6d2989ee90ad1b82bd9c0d1667e066944a6d0020e2d5e57",- "sharp-native-harfbuzz": "0238bf7ada6b1fb92984f69f8b9cd66518af83cf24f7db1cfe60c772c42312d3",- "sharp-native-heif": "68ac9084243004e0ef3633f184eeae85d615fe7e4444373a0a21cebccae9d12a",- "sharp-native-highway": "07b3c1ba2c1096878a85a31a5b9b3757427af963b1141ca904db2f9f4afe0bc2",- "sharp-native-imagequant": "47d2a84b7b1052975c9d50a3d4e3cacbf57b43d84a4c3131210848ead9964dfb",- "sharp-native-lcms": "d11af569e42a1baa1650d20ad61d12e41af4fead4aa7964a01f93b08b53ab074",- "sharp-native-mozjpeg": "b680167bd5d9afebdd576a12f8c49d2c9066a3b92ef96a2b2c5f7829b8600fe5",- "sharp-native-pango": "890640c841dae77d3ae3d8fe8953784b930fa241b17423e6120c7bfdf8b891e7",- "sharp-native-pixman": "d09c44ebc3bd5bee7021c79f922fe8fb2fb57f7320f55e97ff9914d2346a591c",- "sharp-native-png": "71158e53cfdf2877bc99bcab33641d78df3f48e6e0daad030afe9cb8c031aa46",- "sharp-native-proxy-libintl": "f7a1cbd7579baaf575c66f9d99fb6295e9b0684a28b095967cfda17857595303",- "sharp-native-rsvg": "4644d83623dd61cc4479c2b3c372e1da2b281552ebc90035c8d1ac502eb1dc00",- "sharp-native-spng": "47ec02be6c0a6323044600a9221b049f63e1953faf816903e7383d4dc4234487",- "sharp-native-tiff": "f698d94f3103da8ca7438d84e0344e453fe0ba3b7486e04c5bf7a9a3fabe9b69",- "sharp-native-vips": "41e9a1439cd57dcc6d4435a085e2cfe181d9da1962fa84a484f09e8b536e4b77",- "sharp-native-webp": "e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564",- "sharp-native-xml2": "c008bac08fd5c7b4a87f7b8a71f283fa581d80d80ff8d2efd3b26224c39bc54c",- "sharp-native-zlib-ng": "5b3b022489f3ced82384f06db1e13ba148cbce38c7941e424d6cb414416acd18",- "sharp-patch-aom": "9905702d2be0d790ca9a47752f2e6f84b37e085f43c58e1d2dd66896e9fd5694",+ "libvips-windows-build": "05c9f3708ce8afe820d4a401e8b270e30c8bd6270e75a6cfb97f918f2f087962",+ "sharp": "0217f802064e589131536bdac8d1beb5b8a40953d1f066771204a0e5956750e6",+ "sharp-libvips-build": "ac2f07da237416598c5e8b85e6d4c2ff5da87e5c818744daf7634645d2e0f337",+ "[email protected]": "44bf90dbd23e734d50e70a8c41c285193922938bd0d3bc2ee56764d181d55ef5",+ "[email protected]": "d3a8ba457ae25c27c84fd2830a2efdcc5b1d40bf585d4eb0d35f47e99e5d4774",+ "[email protected]": "3873a88801da067d0528a989af06877710529d50ee8fe6f3970cbb4302efb918",+ "[email protected]": "445ed8208a6e4823de1226a74ca319d3600e83f6369f99b14265006599c32ccb",+ "[email protected]": "dcc7731e974ee77db75df26c99aca4d95f11ca2d267d870d42bce1e0d1e1e75f",+ "[email protected]": "4a055ed6575e61ca46c3172be3c753cc16c9becd0f99ec71d58dd0e471476c0c",+ "[email protected]": "10b195ee78160a908388180a8fe3603d4e9a12f4755fbf5f3816b23a9d750da0",+ "[email protected]": "3ad89b8588e6644bd4e49981480d48b21289eebbcd4f0a1a4afb1c29f99b6ab4",+ "[email protected]": "f3a3082a23b37c293a4fcd1053147b371f2ff91fa7ea1b2a52e335676bac82dc",+ "[email protected]": "31ff1fe32deaebfbb388727f32677bb254bf2a41382c51464c0b1837c9ee9828",+ "[email protected]": "e9309564717b6301230112b173f36c288489479d381d2f0add1210ca5b16ba7e",+ "[email protected]": "dc49de6b01a266eef4876a4dd34d9842c475d3e28ff2eff63bd2fb760ab56261",+ "[email protected]": "1b1cde5b235d40479e91be2f0e88a309e3214c8ab470ec8a2744d82a5a9ea05c",+ "[email protected]": "205bf5dab175de68f11e33be7bb36d4ad4c5a5097d8c0c88a8682b257b6293dc",+ "[email protected]": "74447129c31afe141810f995626e8b99ab677413dae76ee3cf5a9cc6e75a486e",+ "[email protected]": "3c2a9006a7e1bf58737e557014d7882c554c628fb379a9f00008f5ea53dbbdfb",+ "[email protected]": "4c9182b18897617182eed12ab5eb9f9d855b3aa3a736d6bdb31abc034ec7d393",+ "[email protected]": "0de0327f60fcd47de90d5654c6fe152232738d60d84fe084ec3e0f35e03b166a",+ "[email protected]": "e72241ac9524bb653ae52ced768b508045d4438726a303f10181a38f764a453c",+ "[email protected]": "47d2a84b7b1052975c9d50a3d4e3cacbf57b43d84a4c3131210848ead9964dfb",+ "[email protected]": "bfc54f7bab59fbc921012014a8032e4cba4abd46db47d46b76416a8c0b2815c8",+ "sharp-native-mozjpeg@0826579": "7181e99a96c62a426293c09f37c94e2637a6af86e7729f5ab75891c85e9cfd2a",+ "[email protected]": "e65d6d117080dc3aeeb7d8b4b3b518f7383aa2e6cfce23117c623cd624764c2f",+ "[email protected]": "bc5bad6213ad4886a47d1e80292fd850b64159b50db67917a43d9ea80ee2298a",+ "[email protected]": "d09c44ebc3bd5bee7021c79f922fe8fb2fb57f7320f55e97ff9914d2346a591c",+ "[email protected]": "a9d4df463d36a6e5f9c29bd6f4967312d17e996c1854f3511f833924eb1993cf",+ "[email protected]": "f7a1cbd7579baaf575c66f9d99fb6295e9b0684a28b095967cfda17857595303",+ "[email protected]": "7eb449b2722a768021356f66dfee3202c229b54ed4e6a70ce40c090e97ff16f2",+ "[email protected]": "5d108758255c225590d862d94f2591ee1f8cc976dc7b25b06eaba74f21850f08",+ "sharp-native-tiff@732665c": "9266662c24df398fc113d453f8eaf3347e7be47004b0f451b425740ee6dfcec4",+ "sharp-native-tiff@d01a94b": "c040cf975f30f74fa586700ce3b5191bc6543b696ed2c99f62c53399960a4ea2",+ "sharp-native-uhdr@13a058f": "c4855df878f1b2f5a451a4206a9fff555549e14a1dd4c6552d2539e89df965b2",+ "sharp-native-uhdr@1acdbed": "42b7276e3d7387ca0cdfd93da63f31e163f2c521aef5d165c2cd3bf9ed84c976",+ "[email protected]": "f41285b61bfb495605494f074ca341f7791a1d406e2f157dcea606ef1ae1b146",+ "[email protected]": "e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564",+ "[email protected]": "78262a6e7ac170d6528ebfe2efccdf220191a5af6a6cd61ea4a9a9a5042c7a07",+ "[email protected]": "f9c65aa9c852eb8255b636fd9f07ce1c406f061ec19a2e7d508b318ca0c907d1","sharp-patch-glib-without-gregex": "b1f2930a11292e529de137c7eb723850e0cc0969b1a2b0358196389312acd272",- "sharp-patch-highway": "6ce65c4a6e90a4293da81cd3e932e81fd7ac77f31058143241ca9b8dd085098c",- "sharp-patch-libvips-heif": "59a547c12915bc2670c37ff88200ebe74fe70aacce6e20b7069157a0d6a098c8","sharp-patch-libvips-soversion": "256b7d6f8c973bb53b20cff5171c7117d6b35d3aa4e72d22cb906f4fe1e2c890",+ "sharp-patch-mozjpeg-simd-fdct": "a65f87cadf3a6052e44d6314c906f6e2891352f82646b8a6f0b8fcf2c1891e7c",- "sharp-patch-uhdr-platform-detection": "e0106f9458626f6745a9a9a3841478b7a42f6905f67373d19f6f9b897c33ada5"++ "sharp-patch-uhdr-platform-detection": "e0106f9458626f6745a9a9a3841478b7a42f6905f67373d19f6f9b897c33ada5",+ "[email protected]": "52904eaa521067a062c75c601b47eb055474298ade50d6509458cd3157eb01bd",+ "[email protected]": "ad07726331c2c4ffe29ff4d6744dcbae664ec4693a1b73c54be1b6835a79272e",+ "[email protected]": "9a37f144a9742a1d2bac9fb5abff38009406b3e0d4abf6ab5a8369b09c44ef1a",+ "[email protected]": "76194efbd484b3ac3be4cdc0d649ba8b9c0e154a53062ac067348e469cc66c09",+ "[email protected]": "fe26fd34a2432f197b89833c8e1e2807b1a7bec17cd8a7fb27956bab251a6d1a",+ "[email protected]": "b1af71435fc45cd5d9f3f9342b28f2ba649de4661a0fb2933da727a5648be262",+ "tesseract-core-giflib@fa37672085ce4b3d62c51627ab3c8cf2dda8009a": "99067b2e3f4bfc3b95770a56e9def1daac843ecb6be5480cb776757b606ac076",+ "tesseract-core-leptonica@4af068b56a9674da915debea4ed7e1b9885b17e8": "f889351f7df174ae9c15f27784b106310a1356d9152537543a334df08fd92961",+ "tesseract-core-libjpeg@6c0fcb8ddee365e7abc4d332662b06900612e923": "79b3dc9496f015a5562f9170aabd0526b3efc5b5b8f71d9379c54d4d882a6099",+ "tesseract-core-libpng@a37d4836519517bdce6cb9d956092321eca3e73b": "2429c23e583db954e5f8e8b92638a118bb8902f4d993ecfe0ce34b8afd05f507",+ "tesseract-core-libtiff@b51bb157123264e26d34c09cc673d213aea61fc7": "e1e754ed88de9370637aecf75f36e31d77adccf6c0fab441816895dc92975a12",+ "tesseract-core-libwebp@20ef03ee351d4ff03fc5ff3ec4804a879d1b9d5c": "397362f82d42c5577705979557f08d611d86e07abcaeeb66b78629df587f1df7",+ "tesseract-core-openlibm@ae2d91698508701c83cab83714d42a1146dccf85": "7994b52a180357322559cafb745f03c5c1ee8f2f38c28bad1e224ce2a0221d7f",+ "tesseract-core-tesseract@2a9c1c49c360462733c386d2a44fcd22c4e21411": "e021944185ecb88c2f003e706b5c416e7bef6074d4d8be39f6c98fe0695b24a8",+ "tesseract-core-zlib@21767c654d31d2dccdde4330529775c6c5fd5389": "f1cdebb848d8110eba6773a481fd92cd34104f4b27deac5f7cf59b445a05f857"}}