Skip to content

v2.13.0 — Signed attachment delivery (RFC 0015)

Latest

Choose a tag to compare

@7nohe 7nohe released this 27 Aug 13:57
f9a0641

Highlights

RFC 0015 — Signed Attachment Delivery Route, closing v1's one real capability gap: private attachments on the local disk and on R2 without presign credentials.

  • @guren/core 1.11.0configureAttachments() gains delivery and a widened disks map (serve: 'auto' | 'redirect' | 'proxy' | 'direct'). With delivery configured, private-disk URLs become path-relative signed route URLs (purpose-scoped HMAC keyring, expiresIn/disposition overrides). registerAttachmentRoutes(router) mounts the route: uniform-404 signature verification, serve-time variant resolution, 302 redirects to per-request presigned URLs on capabilities.presignedGet disks, and hardened proxy responses (inline allowlist, nosniff, CSP: sandbox, Referrer-Policy: no-referrer, resolved-object ETag/304, HEAD short-circuit) everywhere else. Also .guren/attachments.gen.ts codegen (AttachmentsMap).
  • @guren/server 2.13.0signUrl/verifySignedUrl accept app-relative input, canonicalize by code unit, and reject non-integer expires; StorageDriver gains optional getStream (Local/S3 implemented), capabilities (declared, never probed), and temporaryUrl response overrides (S3 presigned ResponseContentDisposition/ResponseContentType).
  • @guren/plugin-cloudflare 0.5.0R2Driver.getStream over the binding's ranged get, capabilities.presignedGet derived from presign config, per-credential/day SigV4 signing-key cache. Private attachments now work on the binding alone (the route proxies get().body through the Worker); note R2's S3 API ignores response header overrides — serve: 'proxy' forces Content-Disposition.
  • @guren/cli 2.12.0guren check gains the delivery wiring rules (delivery configured but registerAttachmentRoutes() unmounted; route-name collisions; serve: 'redirect' on a driver that cannot presign), plus attachments codegen and agent:sync --prune rule handling.
  • @guren/testing 1.7.0view() mocking support.
  • create-guren-app 1.10.1 — template dependency ranges follow the new versions.

Docs: the attachments guide's "URLs and visibility" section now documents the delivery route end to end (en/ja); the Cloudflare guide covers binding-only private attachments.

See each package's CHANGELOG for details. Refs: RFC 0015 (rfcs/0015-signed-attachment-delivery.md).