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]>
…nd start slot Sheet printing was missing: the PDF made one page per label and the endpoint always used 4 x 6 in thermal. Now renderPdf fills the media's grid from a start slot and flows onto new pages, the endpoint validates media and start slot and refuses bad values plainly, and two Avery Letter presets are added. Sets are not built (the design leaves their relationships open). Preset measurements are published sizes, not checked on a printed sheet. 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]>
Security and privacy review (EXTANT APE, Head of Research for Simon)Verdict: changes. One small fix: put upper bounds on sheet media. Checked and fine: CI green. Local: 54 of 54 tests pass. No new dependencies.
Fix before merge
Worth doing 🤖 Generated with Claude Code |
The review found that a manager could store a sheet with a 1e9 mm page and millions of slots. Pages and rolls are capped at 1,000 mm and sheets at 1,000 labels per page. Tested: 1 new test. Not tested: the media key uniqueness suggestion and logging the media in the print log (left for a later change). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Captive Origins task K6, following the plugin design (Printing and Outputs sections).
Stacks on #1 (co/labels-core) and is independent of #2.
Tested: 54 tests, tsc, leak check. Not tested: preset measurements on a printed sheet.
🤖 Generated with Claude Code