enricobuehler 4f9744db23
CI / build (pull_request) Successful in 36s
CI / publish (pull_request) Skipped
chore: plugin-kit 0.3.1 — the SQLite reader that made this plugin find nothing
The kit's `openReadOnly` built a `file:<path>?immutable=1` URI but opened it with
`{ readonly: true }`, which does not enable SQLite's URI filename parsing. On
Linux — Bun's bundled SQLite, unlike macOS's system one — that open always threw,
and every layer degrades an open failure to "this launcher isn't installed". So
this plugin reported 0 games on every box it has ever run on, while `detect`
happily said "present" (it only stats the file).

Nothing here was wrong; the parsing and the ids were right all along. Fixed in
punktfunk#78, published as plugin-kit 0.3.1.

The caret range already allowed it, but bun.lock pinned 0.3.0 exactly, so CI kept
testing against the broken reader.

Parity, run on .21 against a live host with the PUBLISHED 0.3.1 (not a patched
copy) — the gate that caught this in the first place:

    scan:   present: 1 games, 1 launcher entries   (was 0 games)
    parity: OK — 1 entries identical               (was: FAILED — 1 missing)

Gates: biome clean, tsc clean, 5/5 tests, bundle builds.
2026-08-06 20:28:54 +02:00
2026-08-06 15:17:12 +02:00
2026-08-05 19:09:01 +02:00
2026-08-05 19:09:01 +02:00
2026-08-05 19:09:01 +02:00
2026-08-05 19:09:01 +02:00
2026-08-05 19:09:01 +02:00
2026-08-05 19:09:01 +02:00
2026-08-05 19:09:01 +02:00

@punktfunk/plugin-lutris

Adds your installed Lutris games to a Punktfunk host's library — with their cover art, and with the session ending when you quit the game.

Install it from the host's plugin store (Library → Game sources → Add a source), or:

punktfunk-host plugins add lutris

Nothing to configure: it finds pga.db in the usual places (XDG data dir, ~/.local/share/lutris, Flatpak) and syncs from there. If yours lives somewhere else, set the path in Library → Game sources → Lutris → Settings.

What it replaces

Punktfunk used to scan Lutris from inside the host. This plugin is that scanner, lifted out — so you install it only if you use Lutris, and it can be updated without updating the host.

It claims the lutris store, which means your games keep exactly the ids they had before: Moonlight pins, cached box art, and your enabled/disabled state all carry over, and the host's built-in scanner switches itself off while this is installed. Remove the plugin and the built-in comes straight back.

Commands

punktfunk-plugin-lutris detect            # is Lutris installed on this host?
punktfunk-plugin-lutris scan --preview    # what WOULD be synced, as JSON (works with no host)
punktfunk-plugin-lutris uninstall         # drop the games and release the store claim

Parity — the release gate

Unit tests pin the parsing. What actually has to hold is that this plugin reproduces the in-host scanner it replaces, down to the ids — a plugin that parses perfectly but emits lutris:12.0 instead of lutris:12 breaks every Moonlight pin on the host, and no unit test notices.

So, on a box with Lutris installed, before installing this plugin:

punktfunk-plugin-lutris parity --snapshot before.json   # host still on its built-in scanner
punktfunk-plugin-lutris parity --compare  before.json   # offline; exits non-zero on any difference

--compare runs this plugin's own scan and diffs it: ids, titles, launch recipes, roles and metadata exactly; art by presence, not value — the representation legitimately changes here (the host's scanner inlined covers as data: URLs, this emits file:// paths the host proxies), so spot-check a few covers by eye once.

Do not publish a version whose parity run is red.

Development

bun install
bun run typecheck && bun test && bun run build

The framework — store claim, sync engine, __config, CLI verbs, and the launcher-file parsers — lives in @punktfunk/plugin-kit/library. This package is the Lutris-specific part: find pga.db, read it, map rows to entries. That is the whole design — see design/library-scanner-plugins.md in the main repo.

License

MIT OR Apache-2.0.

S
Description
A Punktfunk plugin that adds your Lutris games as a library source
Readme
60 KiB
Languages
TypeScript 100%