@blockcast/fec-worker 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +213 -0
- package/dist/.build-stamp +0 -0
- package/dist/fec-worker-client.d.ts +80 -0
- package/dist/fec-worker-client.d.ts.map +1 -0
- package/dist/fec-worker-client.js +270 -0
- package/dist/fec-worker-client.js.map +1 -0
- package/dist/fec-worker-types.d.ts +252 -0
- package/dist/fec-worker-types.d.ts.map +1 -0
- package/dist/fec-worker-types.js +11 -0
- package/dist/fec-worker-types.js.map +1 -0
- package/dist/fec-worker.d.ts +14 -0
- package/dist/fec-worker.d.ts.map +1 -0
- package/dist/fec-worker.js +565 -0
- package/dist/fec-worker.js.map +7 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/shred-fec-worker.d.ts +20 -0
- package/dist/shred-fec-worker.d.ts.map +1 -0
- package/dist/shred-fec-worker.js +349 -0
- package/dist/shred-fec-worker.js.map +7 -0
- package/dist/shred-worker-client.d.ts +104 -0
- package/dist/shred-worker-client.d.ts.map +1 -0
- package/dist/shred-worker-client.js +181 -0
- package/dist/shred-worker-client.js.map +1 -0
- package/dist/shred-worker-types.d.ts +179 -0
- package/dist/shred-worker-types.d.ts.map +1 -0
- package/dist/shred-worker-types.js +47 -0
- package/dist/shred-worker-types.js.map +1 -0
- package/dist/transfer.d.ts +9 -0
- package/dist/transfer.d.ts.map +1 -0
- package/dist/transfer.js +13 -0
- package/dist/transfer.js.map +1 -0
- package/package.json +54 -0
- package/src/__tests__/fec-worker-alta.test.ts +231 -0
- package/src/__tests__/fec-worker-cleanup-integration.test.ts +250 -0
- package/src/__tests__/fec-worker-pending-queue.test.ts +315 -0
- package/src/__tests__/fec-worker-repair-size.test.ts +1029 -0
- package/src/__tests__/fec-worker-wasm-contract.test.ts +84 -0
- package/src/__tests__/shred-fec-worker.test.ts +448 -0
- package/src/fec-worker-client.test.ts +530 -0
- package/src/fec-worker-client.ts +309 -0
- package/src/fec-worker-types.test.ts +400 -0
- package/src/fec-worker-types.ts +268 -0
- package/src/fec-worker.ts +1048 -0
- package/src/index.ts +32 -0
- package/src/shred-fec-worker.ts +558 -0
- package/src/shred-worker-client.test.ts +182 -0
- package/src/shred-worker-client.ts +222 -0
- package/src/shred-worker-types.ts +194 -0
- package/src/transfer.test.ts +24 -0
- package/src/transfer.ts +12 -0
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @blockcast/fec-worker — Shared Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* Defines the Worker message protocol (commands/events), FecTrackStats shape
|
|
5
|
+
* consumed by fec-panel (Phase 5) and CmcdProducer (Phase 6), and auth
|
|
6
|
+
* interface stubs (ALTA + relay block sig).
|
|
7
|
+
*
|
|
8
|
+
* Types here are importable from both main thread and Worker contexts.
|
|
9
|
+
*/
|
|
10
|
+
/** Per-track FEC configuration. Matches design spec section 3.2 FecTrackConfig. */
|
|
11
|
+
export interface FecTrackConfig {
|
|
12
|
+
/** Codec string, e.g. 'avc1.64001f', 'mp4a.40.2' */
|
|
13
|
+
codec: string;
|
|
14
|
+
/** Track name from catalog */
|
|
15
|
+
trackName: string;
|
|
16
|
+
/** Track media type */
|
|
17
|
+
trackType: "video" | "audio";
|
|
18
|
+
/** Video resolution (omitted for audio) */
|
|
19
|
+
resolution?: {
|
|
20
|
+
w: number;
|
|
21
|
+
h: number;
|
|
22
|
+
};
|
|
23
|
+
/** Video framerate (omitted for audio) */
|
|
24
|
+
framerate?: number;
|
|
25
|
+
/** Audio sample rate (omitted for video) */
|
|
26
|
+
sampleRate?: number;
|
|
27
|
+
/** FEC algorithm identifier: 'raptor', 'reed-solomon', 'none' */
|
|
28
|
+
algorithm: string;
|
|
29
|
+
/** Source symbols per block (K) */
|
|
30
|
+
k: number;
|
|
31
|
+
/** Repair symbols per block (P). NOT symbol size. */
|
|
32
|
+
repairCount: number;
|
|
33
|
+
/** Bytes per symbol */
|
|
34
|
+
symbolSize: number;
|
|
35
|
+
/** Interleave depth in frames (D) */
|
|
36
|
+
interleaveDepth: number;
|
|
37
|
+
/** Interleave depth in milliseconds (D * frameDurationMs) */
|
|
38
|
+
interleaveMs: number;
|
|
39
|
+
/** Catalog-derived source+repair delivery window used for decoder cleanup. */
|
|
40
|
+
deliveryWindowMs: number;
|
|
41
|
+
/** FEC encoding mode */
|
|
42
|
+
fecMode: "subframe" | "object";
|
|
43
|
+
/** MoQ repair track name (optional) */
|
|
44
|
+
repairTrack?: string;
|
|
45
|
+
/** Whether ALTA publisher auth is enabled (AUTH-01) */
|
|
46
|
+
altaEnabled: boolean;
|
|
47
|
+
/** Whether relay block signature verification is enabled (AUTH-01) */
|
|
48
|
+
relayBlockSigEnabled: boolean;
|
|
49
|
+
}
|
|
50
|
+
/** Per-block snapshot for live block visualization and stats. */
|
|
51
|
+
export interface FecBlockSnapshot {
|
|
52
|
+
/** Source block number */
|
|
53
|
+
sbn: number;
|
|
54
|
+
/** Current block state */
|
|
55
|
+
state: "collecting" | "complete" | "recovered" | "failed" | "green-fill";
|
|
56
|
+
/** Number of source symbols received */
|
|
57
|
+
sourceReceived: number;
|
|
58
|
+
/** Number of repair symbols received */
|
|
59
|
+
repairReceived: number;
|
|
60
|
+
/** Expected source symbols (K) */
|
|
61
|
+
k: number;
|
|
62
|
+
/** Expected repair symbols (P) */
|
|
63
|
+
repairCount: number;
|
|
64
|
+
/** Timestamp of first symbol arrival (ms) */
|
|
65
|
+
firstSymbolTs: number;
|
|
66
|
+
/** Timestamp of last symbol arrival (ms) */
|
|
67
|
+
lastSymbolTs: number;
|
|
68
|
+
/** Timestamp when block completed (ms), undefined if not yet complete */
|
|
69
|
+
completedTs?: number;
|
|
70
|
+
/** Deadline timestamp for block completion (ms) */
|
|
71
|
+
deadlineTs: number;
|
|
72
|
+
/** Count of source symbols with valid ALTA signature (AUTH-02) */
|
|
73
|
+
altaVerified: number;
|
|
74
|
+
/** Relay block signature validity: true/false after verification, null if not yet verified (AUTH-02) */
|
|
75
|
+
relayBlockSigValid: boolean | null;
|
|
76
|
+
}
|
|
77
|
+
/** Aggregate per-track FEC statistics. Consumed by fec-panel and CmcdProducer. */
|
|
78
|
+
export interface FecTrackStats {
|
|
79
|
+
/** Track configuration */
|
|
80
|
+
config: FecTrackConfig;
|
|
81
|
+
/** Total source symbols received */
|
|
82
|
+
sourceSymbols: number;
|
|
83
|
+
/** Total repair symbols received */
|
|
84
|
+
repairSymbols: number;
|
|
85
|
+
/** Blocks completed without recovery needed */
|
|
86
|
+
blocksComplete: number;
|
|
87
|
+
/** Blocks recovered via FEC */
|
|
88
|
+
blocksRecovered: number;
|
|
89
|
+
/** Blocks that failed (unrecoverable) */
|
|
90
|
+
blocksFailed: number;
|
|
91
|
+
/** Frames replaced with green-fill */
|
|
92
|
+
greenFillFrames: number;
|
|
93
|
+
/** Recovery success rate 0-100 */
|
|
94
|
+
recoveryRate: number;
|
|
95
|
+
/** Packets with valid publisher ALTA signature */
|
|
96
|
+
altaVerified: number;
|
|
97
|
+
/** Packets with MAC / signature / hash-chain mismatch (tamper-confirmed) */
|
|
98
|
+
altaFailed: number;
|
|
99
|
+
/** Packets that couldn't be verified due to missing trailer / not-ready verifier /
|
|
100
|
+
* late-joiner bootstrap gap. Neither tamper nor error — just unverifiable. */
|
|
101
|
+
altaPending: number;
|
|
102
|
+
/** Deferred-queue entries evicted by cap (queue full). Separate counter so
|
|
103
|
+
* cap misconfiguration is distinguishable from natural bootstrap-gap noise. */
|
|
104
|
+
altaPendingEvictedCap: number;
|
|
105
|
+
/** Deferred-queue entries evicted by TTL (retry window expired). */
|
|
106
|
+
altaPendingEvictedTtl: number;
|
|
107
|
+
/** verifyDetached / parse threw an exception (WASM trap, OOM, unmarshal panic).
|
|
108
|
+
* Not counted as altaFailed because the cause isn't crypto — helps ops
|
|
109
|
+
* distinguish infrastructure flake from tamper. */
|
|
110
|
+
altaError: number;
|
|
111
|
+
/** True if ALTA was enabled at configure time but the verifier WASM init
|
|
112
|
+
* failed. Ops alerting should treat this as "ALTA disabled due to error",
|
|
113
|
+
* distinct from "ALTA disabled by config" (altaEnabled flag not present). */
|
|
114
|
+
altaInitFailed: boolean;
|
|
115
|
+
/** Diagnostic: last ≤16 altaFailed events with full context (seq, error
|
|
116
|
+
* string from the verifier, auth+payload lengths, and which code path
|
|
117
|
+
* raised the failure). Bounded so it can't blow memory. Intended for
|
|
118
|
+
* investigation — not a stable API; consumers should treat it as
|
|
119
|
+
* opt-in and defensive (may be undefined). */
|
|
120
|
+
altaFailedDetails?: Array<{
|
|
121
|
+
seq: number;
|
|
122
|
+
error: string;
|
|
123
|
+
authLen: number;
|
|
124
|
+
payloadLen: number;
|
|
125
|
+
path: string;
|
|
126
|
+
}>;
|
|
127
|
+
/** Blocks with valid relay signature */
|
|
128
|
+
relayBlocksVerified: number;
|
|
129
|
+
/** Blocks with invalid relay signature */
|
|
130
|
+
relayBlocksFailed: number;
|
|
131
|
+
/** Current live source block number */
|
|
132
|
+
liveSbn: number;
|
|
133
|
+
/** Active block snapshots */
|
|
134
|
+
blocks: FecBlockSnapshot[];
|
|
135
|
+
/** Number of blocks in the interleave window */
|
|
136
|
+
interleaveWindowBlocks: number;
|
|
137
|
+
/** Average recovery latency (ms) */
|
|
138
|
+
avgRecoveryMs: number;
|
|
139
|
+
/** Maximum recovery latency (ms) */
|
|
140
|
+
maxRecoveryMs: number;
|
|
141
|
+
/** Repair symbols rejected before WASM because their byte length did not match T. */
|
|
142
|
+
repairSymbolSizeMismatch?: number;
|
|
143
|
+
/** Native decoder counters, converted to numbers so browser diagnostics remain JSON-safe. */
|
|
144
|
+
decoder?: {
|
|
145
|
+
sourcePackets: number;
|
|
146
|
+
repairPackets: number;
|
|
147
|
+
blocksComplete: number;
|
|
148
|
+
blocksRecovered: number;
|
|
149
|
+
blocksFailed: number;
|
|
150
|
+
bytesRecovered: number;
|
|
151
|
+
pendingBlocks: number;
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
/** Stable identities for Worker failures whose message text contains live values. */
|
|
155
|
+
export type FecWorkerErrorCode = "recovered-symbol-size-unconfigured" | "recovered-block-too-short" | "repair-symbol-size-mismatch" | "reset-failed" | "unknown-command" | "command-failed" | "worker-runtime" | "worker-message";
|
|
156
|
+
/** Per-frame metadata emitted with frame events from Worker. */
|
|
157
|
+
export interface FrameMeta {
|
|
158
|
+
/** ALTA verification result: true/false after check, null when ALTA not configured (AUTH-04) */
|
|
159
|
+
altaVerified: boolean | null;
|
|
160
|
+
/** Whether this frame was recovered via FEC (not received directly) */
|
|
161
|
+
recovered: boolean;
|
|
162
|
+
/** Source block number this frame belongs to */
|
|
163
|
+
sbn: number;
|
|
164
|
+
/** Encoding Symbol ID within the recovered source block (0..K-1). */
|
|
165
|
+
esi?: number;
|
|
166
|
+
}
|
|
167
|
+
/** Discriminated union of all commands sent from main thread to Worker. */
|
|
168
|
+
export type FecWorkerCommand = {
|
|
169
|
+
type: "configure";
|
|
170
|
+
config: FecTrackConfig;
|
|
171
|
+
wasmModule: WebAssembly.Module;
|
|
172
|
+
/**
|
|
173
|
+
* ALTA public key as PKCS#8 SubjectPublicKeyInfo DER bytes (self-describing).
|
|
174
|
+
* Algorithm (Ed25519 or ECDSA P-256) is auto-detected from the SPKI OID.
|
|
175
|
+
* Ed25519 SPKI is 44 bytes; P-256 uncompressed is 91 bytes.
|
|
176
|
+
*/
|
|
177
|
+
altaPublicKey?: ArrayBuffer;
|
|
178
|
+
/** Pre-compiled ALTA WASM module. Structured-cloneable (NOT transferable) — do not add to transfer list. */
|
|
179
|
+
altaWasmModule?: WebAssembly.Module;
|
|
180
|
+
} | {
|
|
181
|
+
type: "feedSource";
|
|
182
|
+
/** Flat 32-bit Source Symbol ID from the MMTP Source FEC Payload ID
|
|
183
|
+
* (ISO 23008-1 §C.5.2). The WASM decoder derives SBN = floor(ssId/K)
|
|
184
|
+
* and ESI = ssId % K internally — do NOT pre-compute. */
|
|
185
|
+
ssId: number;
|
|
186
|
+
data: ArrayBuffer;
|
|
187
|
+
ts: number;
|
|
188
|
+
/** Optional ALTA authenticator bytes (detached mode — 08-07 MMTP
|
|
189
|
+
* trailer). Present when the source packet carried a
|
|
190
|
+
* `[0xF0A1][len][auth]` trailer and ALTA is enabled at the worker.
|
|
191
|
+
* When omitted, the worker skips verification and the packet
|
|
192
|
+
* counts as `altaPending`. */
|
|
193
|
+
altaAuth?: ArrayBuffer;
|
|
194
|
+
/** Byte offset within `data` where the signed MMTP payload ends
|
|
195
|
+
* (== where the trailer began on the wire). Required when
|
|
196
|
+
* `altaAuth` is present. Worker constructs
|
|
197
|
+
* `payload = new Uint8Array(data, 0, altaPayloadEnd)` for
|
|
198
|
+
* `verifyDetached(altaAuth, payload)`. */
|
|
199
|
+
altaPayloadEnd?: number;
|
|
200
|
+
} | {
|
|
201
|
+
type: "feedRepair";
|
|
202
|
+
/** SS_Start: SS_ID of the first source symbol in the block
|
|
203
|
+
* (= SBN * SSB_length), from the MMTP Repair FEC Payload ID
|
|
204
|
+
* (ISO 23008-1 §C.5.3). */
|
|
205
|
+
ssStart: number;
|
|
206
|
+
/** SSB_length: K for this block (variable-K allowed per spec). */
|
|
207
|
+
ssbLength: number;
|
|
208
|
+
/** RS_ID: repair symbol index within the block; WASM maps to
|
|
209
|
+
* repair ESI = SSB_length + RS_ID. */
|
|
210
|
+
rsId: number;
|
|
211
|
+
data: ArrayBuffer;
|
|
212
|
+
ts: number;
|
|
213
|
+
} | {
|
|
214
|
+
type: "relayBlockSig";
|
|
215
|
+
sbn: number;
|
|
216
|
+
sig: ArrayBuffer;
|
|
217
|
+
hash: ArrayBuffer;
|
|
218
|
+
} | {
|
|
219
|
+
type: "cleanup";
|
|
220
|
+
/** Every timed-out block covered by this coalesced queue-drain barrier. */
|
|
221
|
+
sbns: number[];
|
|
222
|
+
} | {
|
|
223
|
+
type: "reset";
|
|
224
|
+
} | {
|
|
225
|
+
type: "dispose";
|
|
226
|
+
};
|
|
227
|
+
/** Discriminated union of all events emitted from Worker to main thread. */
|
|
228
|
+
export type FecWorkerEvent = {
|
|
229
|
+
type: "frame";
|
|
230
|
+
data: ArrayBuffer;
|
|
231
|
+
meta: FrameMeta;
|
|
232
|
+
} | {
|
|
233
|
+
type: "snapshot";
|
|
234
|
+
stats: FecTrackStats;
|
|
235
|
+
} | {
|
|
236
|
+
type: "blockUpdate";
|
|
237
|
+
block: FecBlockSnapshot;
|
|
238
|
+
} | {
|
|
239
|
+
type: "greenFill";
|
|
240
|
+
sbn: number;
|
|
241
|
+
data: ArrayBuffer;
|
|
242
|
+
} | {
|
|
243
|
+
type: "cleanupComplete";
|
|
244
|
+
sbns: number[];
|
|
245
|
+
} | {
|
|
246
|
+
type: "resetComplete";
|
|
247
|
+
} | {
|
|
248
|
+
type: "error";
|
|
249
|
+
message: string;
|
|
250
|
+
code?: FecWorkerErrorCode;
|
|
251
|
+
};
|
|
252
|
+
//# sourceMappingURL=fec-worker-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fec-worker-types.d.ts","sourceRoot":"","sources":["../src/fec-worker-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,mFAAmF;AACnF,MAAM,WAAW,cAAc;IAC9B,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,uBAAuB;IACvB,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC;IAC7B,2CAA2C;IAC3C,UAAU,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,iEAAiE;IACjE,SAAS,EAAE,MAAM,CAAC;IAClB,mCAAmC;IACnC,C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defines the Worker message protocol (commands/events), FecTrackStats shape
|
|
5
|
+
* consumed by fec-panel (Phase 5) and CmcdProducer (Phase 6), and auth
|
|
6
|
+
* interface stubs (ALTA + relay block sig).
|
|
7
|
+
*
|
|
8
|
+
* Types here are importable from both main thread and Worker contexts.
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=fec-worker-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fec-worker-types.js","sourceRoot":"","sources":["../src/fec-worker-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @blockcast/fec-worker — Worker Entry Point
|
|
3
|
+
*
|
|
4
|
+
* Runs inside DedicatedWorkerGlobalScope. Receives FecWorkerCommand messages,
|
|
5
|
+
* drives the MmtFecDecoder WASM module, emits FecWorkerEvent messages back.
|
|
6
|
+
*
|
|
7
|
+
* WASM bindings are resolved via:
|
|
8
|
+
* 1. (self as any).__MMT_WASM_BINDINGS__ — set by consumer's loader/importmap
|
|
9
|
+
* 2. Falls back to error if not available (no defaults)
|
|
10
|
+
*
|
|
11
|
+
* This file must NOT import DOM globals incompatible with Worker scope.
|
|
12
|
+
*/
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=fec-worker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fec-worker.d.ts","sourceRoot":"","sources":["../src/fec-worker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
|