feat(media): @shade/media — seekable sealed media (SMF1), live channels, media routes and live relay

SMF1 seals a film, video, image or song once into a file any Range-capable
store can serve; the reader fetches only segments under the playhead and
checks each against a digest table pinned by the grant's root digest.
Live channels use a sender-key chain with per-frame Ed25519 signatures,
sticky init frames and keyframe snapshots for late joiners, and epoch
rotation to remove a viewer. Server side: a disk-backed media store with
signed owner uploads and a WebSocket relay with bounded backlog.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-10-18 20:41:31 +02:00
parent fb7f2e55c0
commit 9e64ec87be
25 changed files with 3994 additions and 26 deletions

View File

@@ -0,0 +1,24 @@
{
"name": "@shade/media",
"version": "4.15.0",
"description": "End-to-end encrypted media streaming for Shade — seekable sealed films, videos, images and audio, and live channels for logs, text and live video",
"type": "module",
"main": "src/index.ts",
"types": "src/index.ts",
"exports": {
".": "./src/index.ts",
"./node": "./src/node.ts",
"./server": "./src/server.ts",
"./browser": "./src/browser/index.ts"
},
"dependencies": {
"@noble/curves": "^2.0.1",
"@noble/hashes": "^2.0.1",
"hono": "^4.12.18"
},
"scripts": {
"test": "bun test",
"typecheck": "tsc --noEmit",
"build:sw": "bun build src/browser/sw.ts --outfile dist/shade-media-sw.js --target browser --minify"
}
}