Repository navigation
Conversation
Starts the build of the first checkpoint: package files copied from the sibling plugin's shape, a Payload-free layout engine (tokens, fitting, sheet positions, the 4 x 6 in preset), the provider contract types, and a plugin that registers the three collections with writes closed by default. Not tested: any database, PDF or SVG output, the print endpoint, the admin UI, site filtering for scopeField. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reads, creates, updates and deletes now stay inside the person's own scope when scopeField is set, with scopeOf resolving the scope and failing closed. Shared (no scope) templates are readable by all and changed only by a platform admin. Covered on an in-memory MongoDB with two made-up sites. Not tested: the print endpoint's scope check (not built), a real site, a browser. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Both outputs draw the same marks, with barcodes, QR and Data Matrix as vectors from bwip-js (MIT) and the PDF written with pdfkit (MIT). The PDF writer is its own export so the plugin config does not load pdfkit. Not tested: PDF in a viewer or printer, SVG in a browser, scanning a printed code, sheet pages, images. Co-Authored-By: Claude Opus 5.5 <[email protected]>
POST /api/labels/print renders a PDF for given documents and a template. It refuses signed-out requests, people with no scope, another scope's template, any document the person cannot read and more than 2,000 labels, and writes one log entry of ids and counts. Not tested: over real HTTP, render time at 2,000 labels, sets, media choice, sheet pages. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The plugin now throws at config time unless access.manage or access.print is set, and no longer lets any signed-in person read templates or print. access.print decides printing, otherwise access.manage does. Template lookup tries the key, then the id as given, so numeric ids work on SQL databases. Not tested: numeric ids on a real SQL database; the cost of reading documents at depth 3. Co-Authored-By: Claude Opus 5.5 <[email protected]>
keepDays was stored but never used, and image elements were placeholder boxes. pruneLabelPrints deletes old log entries when the site schedules it. Images load only from upload collections the site names, as the person, as PNG or JPEG; web addresses are never fetched, and a failed image draws the placeholder with a warning. Not tested: cloud storage adapters, a scheduled job, print quality. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main took the core branch by rebase, so the same changes sit under new commit ids. Main's tree matches the core branch exactly, so this keeps the branch tree. Nothing is rewritten. Tests: see pull request. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The 180 day default only takes effect when the site schedules pruneLabelPrints, so the README now says so plainly. Docs only; no code changed and no tests were added. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Security and privacy review (EXTANT APE, Head of Research for Simon)Verdict: changes. The image handling can use up the server's memory. Checked and fine: CI green. Local: 49 of 49 tests pass. No new dependencies.
Fix before merge
Worth doing 🤖 Generated with Claude Code |
Review fixes: check file size before reading, cap total image bytes and PNG pixels, embed each picture once per PDF, refuse collections with local storage disabled, and make retention accept only whole days of 1 or more. Tested: new tests for the size and pixel limits, one embedded copy across 50 labels, and bad retention settings (51 pass). Not tested: a real storage adapter and a large PNG decode. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Captive Origins task K6.
Stacks on #1 (co/labels-core).
Tested: 49 tests, tsc, leak check. Not tested: cloud storage, a scheduled job.
🤖 Generated with Claude Code