Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 57 additions & 52 deletions bun.lock

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"gen:agent-dirs": "tsx scripts/sync-agent-dirs.ts"
},
"dependencies": {
"@hono/node-server": "^1.8.0",
"@hono/node-server": "^2.0.5",
"@puppeteer/browsers": "^3.0.6",
"adm-zip": "^0.5.16",
"adm-zip": "^0.6.0",
"citty": "^0.2.1",
"compare-versions": "^6.1.1",
"debug": "^4.4.0",
Expand All @@ -40,12 +40,12 @@
"giget": "^3.2.0",
"hono": "^4.0.0",
"ignore": "^5.3.2",
"onnxruntime-node": "1.23.2",
"onnxruntime-node": "1.21.1",
"open": "^10.0.0",
"postcss": "^8.5.8",
"prettier": "^3.8.1",
"puppeteer-core": "^25.2.1",
"sharp": "^0.34.5"
"sharp": "^0.35.0"
},
"devDependencies": {
"@clack/prompts": "^1.1.0",
Expand All @@ -58,7 +58,6 @@
"@hyperframes/producer": "workspace:*",
"@hyperframes/studio": "workspace:*",
"@hyperframes/studio-server": "workspace:*",
"@types/adm-zip": "^0.5.7",
"@types/fontkit": "^2.0.9",
"@types/mime-types": "^3.0.1",
"@types/node": "^25.0.10",
Expand Down
56 changes: 51 additions & 5 deletions packages/cli/src/background-removal/dependency-compat.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,64 @@ import { describe, expect, it } from "vitest";
const require = createRequire(import.meta.url);

describe("background-removal native dependency compatibility", () => {
it("pins onnxruntime-node to the last release with an Intel macOS binary", () => {
it("keeps CLI native dependencies above their patched security floors", () => {
const packagePath = fileURLToPath(new URL("../../package.json", import.meta.url));
const packageJson = JSON.parse(readFileSync(packagePath, "utf8")) as {
dependencies?: Record<string, string>;
};

expect(packageJson.dependencies?.["onnxruntime-node"]).toBe("1.23.2");
expect(packageJson.dependencies).toMatchObject({
"adm-zip": "^0.6.0",
sharp: "^0.35.0",
});
});

it("keeps every Node server consumer above the patched security floor", () => {
for (const manifest of [
"../../package.json",
"../../../engine/package.json",
"../../../producer/package.json",
"../../../gcp-cloud-run/package.json",
]) {
const packageJson = JSON.parse(
readFileSync(fileURLToPath(new URL(manifest, import.meta.url)), "utf8"),
) as {
dependencies?: Record<string, string>;
};
expect(packageJson.dependencies?.["@hono/node-server"], manifest).toBe("^2.0.5");
}
});

it("pins the newest clean-audit ONNX release that retains Intel macOS", () => {
const packagePath = fileURLToPath(new URL("../../package.json", import.meta.url));
const packageJson = JSON.parse(readFileSync(packagePath, "utf8")) as {
dependencies?: Record<string, string>;
};

// 1.22+ pulls vulnerable adm-zip <0.6.0, while later releases also drop
// the Intel macOS binary. Return to a newer ONNX release once it satisfies
// both the clean dependency graph and the six-platform binary contract.
expect(packageJson.dependencies?.["onnxruntime-node"]).toBe("1.21.1");

const bindingEntry = require.resolve("onnxruntime-node");
const packageRoot = join(dirname(bindingEntry), "..");
expect(existsSync(join(packageRoot, "bin/napi-v6/darwin/x64/onnxruntime_binding.node"))).toBe(
true,
);
const onnxPackageJson = JSON.parse(readFileSync(join(packageRoot, "package.json"), "utf8")) as {
dependencies?: Record<string, string>;
};
expect(onnxPackageJson.dependencies).not.toHaveProperty("adm-zip");

for (const [platform, arch] of [
["darwin", "arm64"],
["darwin", "x64"],
["linux", "arm64"],
["linux", "x64"],
["win32", "arm64"],
["win32", "x64"],
] as const) {
expect(
existsSync(join(packageRoot, "bin/napi-v3", platform, arch, "onnxruntime_binding.node")),
`${platform}/${arch} binding should be published`,
).toBe(true);
}
});
});
4 changes: 2 additions & 2 deletions packages/cli/src/capture/contactSheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Saves 50-65% tokens vs. AI agents reading images individually.
*/

import sharp from "sharp";
import sharp, { type OverlayOptions } from "sharp";
import { readdirSync, readFileSync, writeFileSync, unlinkSync, existsSync } from "node:fs";
import { join, extname, basename, dirname } from "node:path";

Expand Down Expand Up @@ -57,7 +57,7 @@ export async function createContactSheet(
const totalW = cols * cellW + (cols + 1) * padding;
const totalH = rows * (cellH + labelH) + (rows + 1) * padding;

const overlays: sharp.OverlayOptions[] = [];
const overlays: OverlayOptions[] = [];

for (let i = 0; i < files.length; i++) {
const col = i % cols;
Expand Down
2 changes: 1 addition & 1 deletion packages/engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@hono/node-server": "^1.13.0",
"@hono/node-server": "^2.0.5",
"@hyperframes/core": "workspace:^",
"@hyperframes/parsers": "workspace:^",
"hono": "^4.6.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/gcp-cloud-run/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"dependencies": {
"@google-cloud/storage": "^7.14.0",
"@google-cloud/workflows": "^4.2.0",
"@hono/node-server": "^1.13.0",
"@hono/node-server": "^2.0.5",
"@hyperframes/producer": "workspace:^",
"hono": "^4.6.0",
"puppeteer-core": "^25.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/producer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"@fontsource/oswald": "^5.2.8",
"@fontsource/outfit": "^5.2.8",
"@fontsource/space-mono": "^5.2.9",
"@hono/node-server": "^1.13.0",
"@hono/node-server": "^2.0.5",
"@hyperframes/core": "workspace:^",
"@hyperframes/engine": "workspace:^",
"@hyperframes/lint": "workspace:^",
Expand Down
Loading