Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
5cd13f9
feat: Angry Miao Infinity image rule and separate lighting cards
kennedy Dec 2, 2026
8eb4273
feat(traits): give the angry-miao driver family the advanced, sleep a…
kennedy Dec 3, 2026
34b603e
feat(preview): Angry Miao Infinity .100, .97 and .100R2 fixtures
kennedy Dec 5, 2026
d2e040d
revert: drop the Angry Miao Infinity image rule until there is licens…
kennedy Dec 5, 2026
7c549f3
fix(devices): lock debounce, sleep and processing controls while sett…
kennedy Dec 5, 2026
0ac4fbe
feat(devices): say when a mouse is read-only or only its receiver ans…
kennedy Dec 5, 2026
ea4fdf3
feat(devices): show a spare battery next to the mouse battery
kennedy Dec 5, 2026
161c3fb
fix(hardware-test): read-only skip reason and receiver-only link check
kennedy Dec 5, 2026
436d71f
fix(buttons): show the Default note only when the menu offers Default
kennedy Dec 5, 2026
6792bf6
fix(hardware-test): don't repeat the brand in the device identity row
kennedy Dec 5, 2026
cc25282
feat(devices): say Bluetooth for Bluetooth connections
kennedy Dec 5, 2026
db0498e
fix(hardware-test): put mouse and receiver firmware on separate lines
kennedy Dec 5, 2026
8a0b845
refactor(preview): keep the Angry Miao fixtures in src/device/angry-m…
kennedy Dec 5, 2026
5bcd1b6
feat(firmware): version names and packages in the firmware manifest
kennedy Dec 5, 2026
8e279a8
feat(firmware): name Angry Miao .100 firmware with the vendor's versions
kennedy Dec 5, 2026
9cb4449
feat(devices): spare battery next to the mouse battery, and receiver …
kennedy Dec 5, 2026
0ecb334
Merge remote-tracking branch 'upstream/main' into feat/angry-miao-sup…
kennedy Dec 5, 2026
73704b4
feat(firmware): one section per device, with version names, open by d…
kennedy Dec 5, 2026
9eeb8e8
fix: address review on the Angry Miao PR
kennedy Dec 5, 2026
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
197 changes: 170 additions & 27 deletions public/firmware-manifest.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,176 @@
{
"_comment": "AUTO-GENERATED — do not edit by hand. Regenerate with: node scripts/generate-firmware-manifest.mjs. Sources: Logitech update CDN depots listed in scripts/firmware-depots.seed.json (plain HTTPS, no auth). Versions/hashes/blockers are re-derived from each depot's dfu.json every run.",
"_comment": "AUTO-GENERATED — do not edit by hand. Regenerate with: node scripts/generate-firmware-manifest.mjs. Sources: Logitech update CDN depots listed in scripts/firmware-depots.seed.json (plain HTTPS, no auth), and vendor version tables (ammaster.angrymiao.com). Versions/hashes/blockers are re-derived from each depot's dfu.json every run.",
"manifestVersion": 3,
"updatedAt": "2026-10-10T19:45:56.998Z",
"source": "scripts/generate-firmware-manifest.mjs over updates.ghub.logitechg.com",
"updatedAt": "2026-12-05T04:56:09.955Z",
"source": "scripts/generate-firmware-manifest.mjs over updates.ghub.logitechg.com and ammaster.angrymiao.com",
"devices": [
{
"id": "8bitdo-retro-r8-mouse",
"brand": "8BitDo",
"nameMatch": [
"Retro R8"
],
"firmwareName": "Mouse",
"latestVersion": "11.03",
"required": false,
"downloadUrl": "https://support.8bitdo.com/",
"releaseNotes": "Mouse 11.03 == latest non-beta R8 mouse firmware in the 8BitDo firmware API (firmware_type 84) on 2026-12-01. Check-only: update through 8BitDo Ultimate Software V2."
},
{
"id": "8bitdo-retro-r8-receiver",
"brand": "8BitDo",
"nameMatch": [
"Retro R8"
],
"firmwareName": "Receiver",
"latestVersion": "10.14",
"required": false,
"downloadUrl": "https://support.8bitdo.com/",
"releaseNotes": "Receiver 10.14 == latest non-beta R8 2.4G receiver firmware in the 8BitDo firmware API (firmware_type 85) on 2026-12-01. Check-only; see mouse entry."
},
{
"id": "angry-miao-am30-mouse",
"brand": "Angry Miao",
"interfaceIds": [
"3151_402a",
"3151_5007",
"3151_402c"
],
"packageOf": {
"device": "mouse",
"parts": [
"Mouse USB",
"Mouse SoC"
],
"versions": {
"1.0.3,1.0.4": "1.0",
"1.0.3,1.0.5": "1.1",
"1.0.3,1.0.7": "1.2",
"1.0.3,1.0.8": "1.3",
"1.0.3,1.0.9": "1.4",
"1.0.3,1.1.0": "1.5",
"1.0.3,1.1.1": "1.6",
"1.0.3,1.1.2": "1.7",
"1.0.3,1.1.3": "1.8",
"1.0.3,1.1.4": "1.9"
}
},
"latestVersion": "1.9"
},
{
"id": "angry-miao-am30-mouse-soc",
"brand": "Angry Miao",
"interfaceIds": [
"3151_402a",
"3151_5007",
"3151_402c"
],
"firmwareName": "Mouse SoC",
"versionNames": {
"0x0317": "1.1.0",
"0x0318": "1.1.1",
"0x0319": "1.1.2",
"0x0320": "1.1.3",
"0x0321": "1.1.4"
},
"latestVersion": "1.1.4"
},
{
"id": "angry-miao-am30-mouse-usb",
"brand": "Angry Miao",
"interfaceIds": [
"3151_402a",
"3151_5007",
"3151_402c"
],
"firmwareName": "Mouse USB",
"versionNames": {
"0x0100": "1.0.0",
"0x0101": "1.0.3"
},
"latestVersion": "1.0.3"
},
{
"id": "angry-miao-am30-receiver",
"brand": "Angry Miao",
"interfaceIds": [
"3151_402a",
"3151_5007",
"3151_402c"
],
"packageOf": {
"device": "receiver",
"parts": [
"Receiver USB",
"Receiver RF",
"Receiver LED"
],
"versions": {
"1.0.4,1.0.5,1.0.3": "1.0",
"1.0.4,1.0.5,1.0.4": "1.1",
"1.0.4,1.0.6,1.0.5": "1.2",
"1.0.4,1.0.7,1.0.5": "1.3",
"1.0.4,1.0.8,1.0.5": "1.4",
"1.0.5,1.0.8,1.0.5": "1.5",
"1.0.7,1.0.8,1.0.5": "1.6"
}
},
"latestVersion": "1.6"
},
{
"id": "angry-miao-am30-receiver-led",
"brand": "Angry Miao",
"interfaceIds": [
"3151_402a",
"3151_5007",
"3151_402c"
],
"firmwareName": "Receiver LED",
"versionNames": {
"0x0104": "1.0.1",
"0x0105": "1.0.2",
"0x0106": "1.0.3",
"0x0108": "1.0.4",
"0x0109": "1.0.5"
},
"latestVersion": "1.0.5"
},
{
"id": "angry-miao-am30-receiver-rf",
"brand": "Angry Miao",
"interfaceIds": [
"3151_402a",
"3151_5007",
"3151_402c"
],
"firmwareName": "Receiver RF",
"versionNames": {
"0xea": "1.0.3",
"0xeb": "1.0.4",
"0xec": "1.0.5",
"0xed": "1.0.6",
"0xee": "1.0.7",
"0xf0": "1.0.8"
},
"latestVersion": "1.0.8"
},
{
"id": "angry-miao-am30-receiver-usb",
"brand": "Angry Miao",
"interfaceIds": [
"3151_402a",
"3151_5007",
"3151_402c"
],
"firmwareName": "Receiver USB",
"versionNames": {
"0x0004": "1.0.3",
"0x0005": "1.0.4",
"0x0006": "1.0.5",
"0x0008": "1.0.7"
},
"latestVersion": "1.0.7"
},
{
"id": "c53a_dfu@40.3.14:046d_c53a",
"depot": "c53a_dfu",
Expand Down Expand Up @@ -686,30 +853,6 @@
"releaseNotes": "Updated USB device name to \"Yeti X WoW Edition\"",
"startBlockers": [],
"startWarnings": []
},
{
"id": "8bitdo-retro-r8-mouse",
"brand": "8BitDo",
"nameMatch": [
"Retro R8"
],
"firmwareName": "Mouse",
"latestVersion": "11.03",
"required": false,
"downloadUrl": "https://support.8bitdo.com/",
"releaseNotes": "Mouse 11.03 == latest non-beta R8 mouse firmware in the 8BitDo firmware API (firmware_type 84) on 2026-12-01. Check-only: update through 8BitDo Ultimate Software V2."
},
{
"id": "8bitdo-retro-r8-receiver",
"brand": "8BitDo",
"nameMatch": [
"Retro R8"
],
"firmwareName": "Receiver",
"latestVersion": "10.14",
"required": false,
"downloadUrl": "https://support.8bitdo.com/",
"releaseNotes": "Receiver 10.14 == latest non-beta R8 2.4G receiver firmware in the 8BitDo firmware API (firmware_type 85) on 2026-12-01. Check-only; see mouse entry."
}
]
}
72 changes: 63 additions & 9 deletions scripts/generate-firmware-manifest.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//
// Usage:
// node scripts/generate-firmware-manifest.mjs [--only <substring>] [--output <path>]
// (Requires Node ≥ 18. Run from the openmouse repo root.)
// (Requires Node ≥ 23.6, which runs the TypeScript converters it imports. Run from the openmouse repo root.)
//
// Encrypted depots: a few depots (some keyboards, some receivers) carry a
// {header-sha, key-id} index instead of a file list — per-depot
Expand All @@ -32,6 +32,13 @@
// Hand entries: scripts/firmware-manifest.extra.json holds confirmed values
// for devices without usable depots (merged last, extra wins on id clash).
//
// Vendor version tables: some vendors publish a lookup from raw firmware codes
// to their own version names instead of depots. A converter per vendor turns
// the table into ordinary entries (`versionNames` for parts, `packageOf` for
// packages), so the app never needs vendor code. The browser cannot read those
// endpoints, so each run fetches them here. A table that fails to download
// keeps that vendor's entries from the previous manifest.
//
// Safety: downloads are verified (archive parses end-to-end; binaries are
// cross-checked against dfu.json hashes where present). A depot that fails
// to download or parse is skipped with a warning, never fatal — the
Expand All @@ -41,6 +48,7 @@ import { writeFileSync, readFileSync } from "node:fs";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import { createHash } from "node:crypto";
import { AM30_ENTRY_PREFIX, AM30_VERSION_MAP_URL, am30ManifestEntries } from "../src/device/angry-miao/firmware.ts";

const here = dirname(fileURLToPath(import.meta.url));
const root = join(here, "..");
Expand All @@ -58,6 +66,17 @@ const outputPath = flag("--output") ?? join(root, "public", "firmware-manifest.j

const seed = JSON.parse(readFileSync(join(here, "firmware-depots.seed.json"), "utf8"));

const VENDOR_TABLES = [
{ id: AM30_ENTRY_PREFIX, url: AM30_VERSION_MAP_URL, toEntries: am30ManifestEntries },
];

let previousManifest = null;
try {
previousManifest = JSON.parse(readFileSync(outputPath, "utf8"));
} catch {
// First run: nothing to carry forward.
}

function depotUrl(entry) {
return `${CDN_HOST}/depots/${entry.uuid}/${entry.name}.depot`;
}
Expand Down Expand Up @@ -115,10 +134,17 @@ async function fetchDepot(entry) {
return Buffer.from(await response.arrayBuffer());
}

async function fetchVendorEntries(source) {
const response = await fetch(source.url, { signal: AbortSignal.timeout(30000) });
if (!response.ok) throw new Error(`HTTP ${response.status} for ${source.url}`);
return source.toEntries(await response.json());
}

const devices = [];
const warnings = [];
const seen = new Set();
let depotOkCount = 0;
let vendorOkCount = 0;

for (const entry of seed) {
if (onlyFilter && !entry.name.toLowerCase().includes(onlyFilter.toLowerCase())) continue;
Expand Down Expand Up @@ -171,6 +197,20 @@ for (const entry of seed) {
}
}

for (const source of VENDOR_TABLES) {
if (onlyFilter && !source.id.includes(onlyFilter.toLowerCase())) continue;
try {
const entries = await fetchVendorEntries(source);
devices.push(...entries);
Comment thread
kennedy marked this conversation as resolved.
Resolved
vendorOkCount += 1;
console.log(`ok ${source.id} (${entries.length} entries)`);
} catch (error) {
const kept = (previousManifest?.devices ?? []).filter((device) => device.id.startsWith(source.id));
devices.push(...kept);
warnings.push(`${source.id}: ${kept.length > 0 ? "kept the previous entries" : "skipped"} (${error instanceof Error ? error.message : String(error)})`);
}
}


// Hand-maintained entries (confirmed values, non-depot devices). Extra wins.
const extraPath = join(here, 'firmware-manifest.extra.json');
Expand All @@ -185,12 +225,24 @@ try {
warnings.push('extra entries unreadable: ' + (error instanceof Error ? error.message : String(error)));
}

// `--only` refreshes the selected sources and keeps every other entry of the previous manifest.
if (onlyFilter && previousManifest) {
const filter = onlyFilter.toLowerCase();
const selected = (entry) =>
(typeof entry.depot === "string" && entry.depot.toLowerCase().includes(filter))
|| VENDOR_TABLES.some((source) => source.id.includes(filter) && entry.id.startsWith(source.id));
const fresh = new Set(devices.map((d) => d.id));
for (const entry of previousManifest.devices ?? []) {
if (!fresh.has(entry.id) && !selected(entry)) devices.push(entry);
}
}

// Version history: carry forward the previous manifest (if this run
// overwrites a real one) so each entry accumulates [{version, date}]
// whenever its version moves. First sightings start empty — history is
// earned, never invented.
try {
const previous = JSON.parse(readFileSync(outputPath, 'utf8'));
if (previousManifest) {
const previous = previousManifest;
const prevById = new Map((previous.devices ?? []).map((d) => [d.id, d]));
for (const device of devices) {
const prev = prevById.get(device.id);
Expand All @@ -201,30 +253,32 @@ try {
}
if (history.length > 0) device.history = history.slice(0, 8);
}
} catch {
// No previous manifest (first run) — nothing to carry.
}

devices.sort((a, b) => a.id.localeCompare(b.id));

// A run that resolved nothing must never overwrite a good manifest: exit
// non-zero and leave the previous file (and its version history) in place.
const okCount = depotOkCount;
// A full run needs the depots; a `--only` run needs one selected source.
const okCount = onlyFilter ? depotOkCount + vendorOkCount : depotOkCount;
if (okCount <= 0) {
console.log(`\nwrote 0 entries to ${outputPath}`);
for (const warning of warnings) console.log(`warn: ${warning}`);
console.error("error: no depots resolved; refusing to overwrite the manifest");
console.error(onlyFilter
? `error: no source matching "${onlyFilter}" resolved; refusing to overwrite the manifest`
: "error: no depots resolved; refusing to overwrite the manifest");
process.exit(1);
}

const manifest = {
_comment:
"AUTO-GENERATED — do not edit by hand. Regenerate with: node scripts/generate-firmware-manifest.mjs. " +
"Sources: Logitech update CDN depots listed in scripts/firmware-depots.seed.json (plain HTTPS, no auth). " +
"Sources: Logitech update CDN depots listed in scripts/firmware-depots.seed.json (plain HTTPS, no auth), " +
"and vendor version tables (ammaster.angrymiao.com). " +
"Versions/hashes/blockers are re-derived from each depot's dfu.json every run.",
manifestVersion: MANIFEST_VERSION,
updatedAt: new Date().toISOString(),
source: "scripts/generate-firmware-manifest.mjs over updates.ghub.logitechg.com",
source: "scripts/generate-firmware-manifest.mjs over updates.ghub.logitechg.com and ammaster.angrymiao.com",
devices,
};

Expand Down
Loading