@imferno/node 3.0.2-feat-docs-sample-imp-browser.07823ae → 3.0.2-feat-st2067-203-204-cpl-plugin-semantics.2c014ba

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 CHANGED
@@ -35,6 +35,26 @@ for (const issue of validation.errors) {
35
35
  console.log("CPLs:", Object.keys(pkg.compositionPlaylists).length);
36
36
  ```
37
37
 
38
+ `validatePath` hashes every asset (several at a time, like the CLI) and
39
+ blocks until done. To keep the event loop running, use the async variant:
40
+ same arguments, same result, on the libuv thread pool.
41
+
42
+ ```ts
43
+ import { validatePathAsync } from "@imferno/node";
44
+
45
+ const { validation } = await validatePathAsync("./my-imp");
46
+ ```
47
+
48
+ `validateUriAsync`, `buildReportFromPathAsync` and `buildReportFromUriAsync`
49
+ work the same way.
50
+
51
+ Each running `…Async` call holds one libuv worker thread for its whole run
52
+ (the hashing itself runs on imferno's own threads). The pool has 4 workers
53
+ by default and is shared with `fs`, `dns.lookup`, `crypto` and `zlib`, so
54
+ more than a few concurrent validations queue each other and that I/O. To
55
+ run more at once, raise the pool size before Node starts it, e.g.
56
+ `UV_THREADPOOL_SIZE=16 node app.js` (max 1024).
57
+
38
58
  ### Validate from a URI (filesystem or S3)
39
59
 
40
60
  ```js
@@ -46,6 +66,8 @@ const result2 = validateUri("file:///abs/path/to/my-imp");
46
66
 
47
67
  // S3 — prebuilt npm binaries include S3 support; uses the default AWS
48
68
  // credential chain (env vars, profile, or EC2/ECS/EKS IMDS)
69
+ // Only the XML is read from S3: presence, size and hash checks do not run,
70
+ // and the result says so (IMFERNO:Package/DiskChecksNotRun).
49
71
  const result3 = validateUri("s3://my-bucket/path/to/imp/");
50
72
 
51
73
  // Same options object as validatePath
@@ -127,13 +149,20 @@ console.log(getVersion()); // e.g. "2.0.0"
127
149
  | `app2eSpec` | `"auto" \| "none" \| "v2014" \| "v2016" \| "v2020" \| "v2023" \| "v2026"` | Application spec version |
128
150
  | `rules` | `Record<string, "off" \| "info" \| "warn" \| "error" \| "critical">` | ESLint-style per-rule severity overrides |
129
151
  | `aggregateRepeats` | `boolean` | Collapse repeated identical findings into one issue with `additional_instances` |
130
- | `skipDiskChecks` | `boolean` | Skip file manifest and MXF checks (path / URI functions only; in-memory input never touches disk) |
152
+ | `skipDiskChecks` | `boolean` | Skip every disk read: asset existence, size and hash checks and MXF checks (path / URI functions only; in-memory input never touches disk) |
153
+ | `skipHashes` | `boolean` | Skip hashing the assets; existence and size are still checked (path / URI functions only). Hashes are verified by default, like the CLI |
131
154
  | `credentials` | `S3Credentials \| null` | Explicit S3 credentials (URI functions only) |
132
155
 
156
+ An option the function does not accept, or a value of the wrong type, throws.
157
+ `null` and `undefined` mean not set for every option in the table, also one
158
+ the function does not take; an unknown key throws even as `null`, so a typo
159
+ like `{ skipHash: null }` is caught.
160
+
133
161
  ### TypeScript
134
162
 
135
163
  The package ships precise declarations, generated from the Rust types (no
136
- `any`). Every function is synchronous. All value types are exported from the
164
+ `any`). Every function is synchronous, except the `…Async` variants, which
165
+ return a Promise. All value types are exported from the
137
166
  main entry:
138
167
 
139
168
  ```ts
package/codes.d.ts CHANGED
@@ -8,14 +8,21 @@ export declare const codes: {
8
8
  readonly HeaderPartitionOpen: "ST377-1/HeaderPartitionOpen";
9
9
  readonly MissingHeaderMetadata: "ST377-1/MissingHeaderMetadata";
10
10
  readonly StructuralComponentDurationMissing: "ST377-1/StructuralComponentDurationMissing";
11
+ readonly FileDescriptorEssenceContainerMissing: "ST377-1/FileDescriptorEssenceContainerMissing";
12
+ readonly PrefaceEssenceContainersIncomplete: "ST377-1/PrefaceEssenceContainersIncomplete";
13
+ readonly PartitionEssenceContainersIncomplete: "ST377-1/PartitionEssenceContainersIncomplete";
11
14
  };
12
15
  readonly ST377_4: {
13
16
  readonly MCALinkIDMissing: "ST377-4/MCALinkIDMissing";
14
17
  readonly SoundfieldGroupLinkIDMismatch: "ST377-4/SoundfieldGroupLinkIDMismatch";
18
+ readonly MCALinkIDNotUnique: "ST377-4/MCALinkIDNotUnique";
19
+ readonly MCATagSymbolSyntax: "ST377-4/MCATagSymbolSyntax";
20
+ readonly SoundfieldGroupUnreferenced: "ST377-4/SoundfieldGroupUnreferenced";
15
21
  };
16
22
  readonly ST429_8: {
17
23
  readonly SizeMismatch: "ST429-8/SizeMismatch";
18
24
  readonly ChecksumMismatch: "ST429-8/ChecksumMismatch";
25
+ readonly MalformedXml: "ST429-8/MalformedXml";
19
26
  };
20
27
  readonly ST429_9: {
21
28
  readonly AssetListEmpty: "ST429-9/AssetListEmpty";
@@ -30,10 +37,20 @@ export declare const codes: {
30
37
  readonly AssetMapHasNoPackingList: "ST429-9/AssetMapHasNoPackingList";
31
38
  readonly PklIdNotInAssetMap: "ST429-9/PklIdNotInAssetMap";
32
39
  readonly AssetMapMalformedXml: "ST429-9/AssetMapMalformedXml";
40
+ readonly PackingListFlagNotPkl: "ST429-9/PackingListFlagNotPkl";
41
+ readonly VolumeCountNotOne: "ST429-9/VolumeCountNotOne";
42
+ readonly ChunkCountNotOne: "ST429-9/ChunkCountNotOne";
43
+ readonly ChunkVolumeIndexNotOne: "ST429-9/ChunkVolumeIndexNotOne";
44
+ readonly ChunkOffsetNotZero: "ST429-9/ChunkOffsetNotZero";
45
+ readonly ChunkLengthMismatch: "ST429-9/ChunkLengthMismatch";
46
+ readonly SymbolicLink: "ST429-9/SymbolicLink";
33
47
  };
34
48
  readonly ST2067_2: {
35
49
  readonly NotImfCompositionPlaylist: "ST2067-2/NotImfCompositionPlaylist";
50
+ readonly ApplicationIdentificationMissing: "ST2067-2/ApplicationIdentificationMissing";
51
+ readonly ApplicationIdentificationDuplicate: "ST2067-2/ApplicationIdentificationDuplicate";
36
52
  readonly PklMalformedXml: "ST2067-2/PklMalformedXml";
53
+ readonly NoPackingList: "ST2067-2/NoPackingList";
37
54
  readonly NoCpls: "ST2067-2/NoCpls";
38
55
  readonly SizeMismatch: "ST2067-2/SizeMismatch";
39
56
  readonly FileNotFound: "ST2067-2/FileNotFound";
@@ -55,6 +72,7 @@ export declare const codes: {
55
72
  readonly SoundfieldChannelCount: "ST2067-2/SoundfieldChannelCount";
56
73
  readonly DigitalSignature: "ST2067-2/DigitalSignature";
57
74
  readonly EssenceDescriptorList: "ST2067-2/EssenceDescriptorList";
75
+ readonly EssenceDescriptorContainerFormatMissing: "ST2067-2/EssenceDescriptorContainerFormatMissing";
58
76
  readonly CplIdAssetMapMismatch: "ST2067-2/CplIdAssetMapMismatch";
59
77
  readonly OperationalPatternNotOP1A: "ST2067-2/OperationalPatternNotOP1A";
60
78
  readonly SoundDescriptorNotWAVEPCM: "ST2067-2/SoundDescriptorNotWAVEPCM";
@@ -72,12 +90,20 @@ export declare const codes: {
72
90
  readonly SoundfieldGroupMissingMCATitleVersion: "ST2067-2/SoundfieldGroupMissingMCATitleVersion";
73
91
  readonly SoundfieldGroupMissingMCAAudioContentKind: "ST2067-2/SoundfieldGroupMissingMCAAudioContentKind";
74
92
  readonly SoundfieldGroupMissingMCAAudioElementKind: "ST2067-2/SoundfieldGroupMissingMCAAudioElementKind";
93
+ readonly MCATagNameMissing: "ST2067-2/MCATagNameMissing";
94
+ readonly GroupOfSoundfieldGroupsMissingMCATitle: "ST2067-2/GroupOfSoundfieldGroupsMissingMCATitle";
95
+ readonly GroupOfSoundfieldGroupsMissingMCATitleVersion: "ST2067-2/GroupOfSoundfieldGroupsMissingMCATitleVersion";
96
+ readonly GroupOfSoundfieldGroupsMissingMCAAudioContentKind: "ST2067-2/GroupOfSoundfieldGroupsMissingMCAAudioContentKind";
97
+ readonly GroupOfSoundfieldGroupsMissingMCAAudioElementKind: "ST2067-2/GroupOfSoundfieldGroupsMissingMCAAudioElementKind";
98
+ readonly AudioEssenceNotHomogeneous: "ST2067-2/AudioEssenceNotHomogeneous";
99
+ readonly AudioVirtualTrackLabelsDiffer: "ST2067-2/AudioVirtualTrackLabelsDiffer";
75
100
  readonly TimedTextUCSEncodingNotUTF8: "ST2067-2/TimedTextUCSEncodingNotUTF8";
76
101
  readonly TimedTextNamespaceNotIMSC: "ST2067-2/TimedTextNamespaceNotIMSC";
77
102
  readonly TimedTextResourceMIMETypeUnsupported: "ST2067-2/TimedTextResourceMIMETypeUnsupported";
78
103
  readonly TimedTextMappingKindNot0x13: "ST2067-2/TimedTextMappingKindNot0x13";
79
104
  readonly MainImageVirtualTrackCount: "ST2067-2/MainImageVirtualTrackCount";
80
105
  readonly AudioVirtualTrackMissing: "ST2067-2/AudioVirtualTrackMissing";
106
+ readonly TrackFileMediaType: "ST2067-2/TrackFileMediaType";
81
107
  };
82
108
  readonly ST2067_3: {
83
109
  readonly ContentTitleEmpty: "ST2067-3/ContentTitleEmpty";
@@ -103,8 +129,22 @@ export declare const codes: {
103
129
  readonly ResourceDuration: "ST2067-3/ResourceDuration";
104
130
  readonly RepeatCount: "ST2067-3/RepeatCount";
105
131
  readonly TrackFileId: "ST2067-3/TrackFileId";
132
+ readonly SourceEncodingMissing: "ST2067-3/SourceEncodingMissing";
106
133
  readonly VirtualTrackContinuity: "ST2067-3/VirtualTrackContinuity";
134
+ readonly VirtualTrackSequenceKind: "ST2067-3/VirtualTrackSequenceKind";
135
+ readonly ExtensionSequenceNotSequenceType: "ST2067-3/ExtensionSequenceNotSequenceType";
136
+ readonly ResourceTypeMixed: "ST2067-3/ResourceTypeMixed";
137
+ readonly MarkerSequenceResourceType: "ST2067-3/MarkerSequenceResourceType";
107
138
  readonly DanglingEssenceDescriptor: "ST2067-3/DanglingEssenceDescriptor";
139
+ readonly CplMediaType: "ST2067-3/CplMediaType";
140
+ readonly UniqueSequenceId: "ST2067-3/UniqueSequenceId";
141
+ readonly ContentMaturityRatingAgencyDuplicate: "ST2067-3/ContentMaturityRatingAgencyDuplicate";
142
+ readonly LocaleRegionInvalid: "ST2067-3/LocaleRegionInvalid";
143
+ readonly SignerWithoutSignature: "ST2067-3/SignerWithoutSignature";
144
+ readonly SignatureWithoutSigner: "ST2067-3/SignatureWithoutSigner";
145
+ readonly HashAlgorithmMissing: "ST2067-3/HashAlgorithmMissing";
146
+ readonly HashAlgorithmWithoutHash: "ST2067-3/HashAlgorithmWithoutHash";
147
+ readonly ResourceHashMismatch: "ST2067-3/ResourceHashMismatch";
108
148
  };
109
149
  readonly ST2067_5: {
110
150
  readonly OperationalPatternQualifier: "ST2067-5/OperationalPatternQualifier";
@@ -185,6 +225,11 @@ export declare const codes: {
185
225
  readonly HtIrvParameterBMax: "ST2067-21/HtIrvParameterBMax";
186
226
  readonly HtIrvParameterBRecommended: "ST2067-21/HtIrvParameterBRecommended";
187
227
  readonly J2K8KResolution: "ST2067-21/J2K8KResolution";
228
+ readonly RefLevelMissing: "ST2067-21/RefLevelMissing";
229
+ readonly DisplayF2Offset: "ST2067-21/DisplayF2Offset";
230
+ readonly J2CLayoutValue: "ST2067-21/J2CLayoutValue";
231
+ readonly PictureEssenceCoding: "ST2067-21/PictureEssenceCoding";
232
+ readonly HtCodestreamConstraints: "ST2067-21/HtCodestreamConstraints";
188
233
  };
189
234
  readonly ST2067_201: {
190
235
  readonly CodecForbidden: "ST2067-201/CodecForbidden";
@@ -212,6 +257,9 @@ export declare const codes: {
212
257
  readonly MCAChannelIDForbidden: "ST2067-201/MCAChannelIDForbidden";
213
258
  readonly EditRateNotIntegerMultiple: "ST2067-201/EditRateNotIntegerMultiple";
214
259
  readonly IabChannelSubDescriptorRecommended: "ST2067-201/IabChannelSubDescriptorRecommended";
260
+ readonly ConformsToSpecificationsMissing: "ST2067-201/ConformsToSpecificationsMissing";
261
+ readonly ConformsToSpecificationsInvalid: "ST2067-201/ConformsToSpecificationsInvalid";
262
+ readonly EssenceNotHomogeneous: "ST2067-201/EssenceNotHomogeneous";
215
263
  };
216
264
  readonly ST2067_202: {
217
265
  readonly NamespaceUriMissing: "ST2067-202/NamespaceUriMissing";
@@ -222,6 +270,36 @@ export declare const codes: {
222
270
  readonly ISXDVirtualTrackMissing: "ST2067-202/ISXDVirtualTrackMissing";
223
271
  readonly DataEssenceCodingMissing: "ST2067-202/DataEssenceCodingMissing";
224
272
  readonly DataEssenceCodingInvalid: "ST2067-202/DataEssenceCodingInvalid";
273
+ readonly EssenceContainerInvalid: "ST2067-202/EssenceContainerInvalid";
274
+ };
275
+ readonly ST2067_203: {
276
+ readonly SequenceResourceNotTrackFile: "ST2067-203/SequenceResourceNotTrackFile";
277
+ readonly VirtualTrackParameterSetMissing: "ST2067-203/VirtualTrackParameterSetMissing";
278
+ readonly VirtualTrackParameterSetDuplicate: "ST2067-203/VirtualTrackParameterSetDuplicate";
279
+ readonly VirtualTrackParameterSetIdDuplicate: "ST2067-203/VirtualTrackParameterSetIdDuplicate";
280
+ readonly VirtualTrackParameterSetOrphaned: "ST2067-203/VirtualTrackParameterSetOrphaned";
281
+ readonly VirtualTrackParameterSetInvalid: "ST2067-203/VirtualTrackParameterSetInvalid";
282
+ readonly OperationalModeUnknown: "ST2067-203/OperationalModeUnknown";
283
+ readonly OperationalModeNotRecognized: "ST2067-203/OperationalModeNotRecognized";
284
+ readonly SoundfieldGroupSelectorDuplicate: "ST2067-203/SoundfieldGroupSelectorDuplicate";
285
+ readonly SoundfieldGroupSelectorResourceIdOrphaned: "ST2067-203/SoundfieldGroupSelectorResourceIdOrphaned";
286
+ readonly SoundfieldGroupLinkIdDuplicate: "ST2067-203/SoundfieldGroupLinkIdDuplicate";
287
+ readonly EditRateNotHomogeneous: "ST2067-203/EditRateNotHomogeneous";
288
+ readonly EditRateNotMultipleOfMainImage: "ST2067-203/EditRateNotMultipleOfMainImage";
289
+ };
290
+ readonly ST2067_204: {
291
+ readonly SequenceResourceNotTrackFile: "ST2067-204/SequenceResourceNotTrackFile";
292
+ readonly VirtualTrackParameterSetMissing: "ST2067-204/VirtualTrackParameterSetMissing";
293
+ readonly VirtualTrackParameterSetDuplicate: "ST2067-204/VirtualTrackParameterSetDuplicate";
294
+ readonly VirtualTrackParameterSetIdDuplicate: "ST2067-204/VirtualTrackParameterSetIdDuplicate";
295
+ readonly VirtualTrackParameterSetOrphaned: "ST2067-204/VirtualTrackParameterSetOrphaned";
296
+ readonly VirtualTrackParameterSetInvalid: "ST2067-204/VirtualTrackParameterSetInvalid";
297
+ readonly OperationalModeUnknown: "ST2067-204/OperationalModeUnknown";
298
+ readonly OperationalModeNotRecognized: "ST2067-204/OperationalModeNotRecognized";
299
+ readonly SoundfieldGroupSelectorDuplicate: "ST2067-204/SoundfieldGroupSelectorDuplicate";
300
+ readonly SoundfieldGroupSelectorResourceIdOrphaned: "ST2067-204/SoundfieldGroupSelectorResourceIdOrphaned";
301
+ readonly SoundfieldGroupLinkIdDuplicate: "ST2067-204/SoundfieldGroupLinkIdDuplicate";
302
+ readonly EditRateNotHomogeneous: "ST2067-204/EditRateNotHomogeneous";
225
303
  };
226
304
  readonly XSD: {
227
305
  readonly ElementMissing: "XSD/ElementMissing";
@@ -233,11 +311,14 @@ export declare const codes: {
233
311
  readonly NotValidated: "XSD/NotValidated";
234
312
  };
235
313
  readonly IMFERNO: {
314
+ readonly ExtensionSequenceNotValidated: "IMFERNO/ExtensionSequenceNotValidated";
315
+ readonly SequenceListUnreadable: "IMFERNO/SequenceListUnreadable";
236
316
  readonly EditionAssumed: "IMFERNO/EditionAssumed";
237
317
  readonly EditionConflict: "IMFERNO/EditionConflict";
238
318
  readonly EditionPinned: "IMFERNO/EditionPinned";
239
319
  readonly PinNotApplied: "IMFERNO/PinNotApplied";
240
320
  readonly DeliveryNotChecked: "IMFERNO/DeliveryNotChecked";
321
+ readonly DiskChecksNotRun: "IMFERNO/DiskChecksNotRun";
241
322
  readonly OpenFailed: "IMFERNO/OpenFailed";
242
323
  readonly PartitionPackParseFailed: "IMFERNO/PartitionPackParseFailed";
243
324
  readonly RegXmlConversionFailed: "IMFERNO/RegXmlConversionFailed";
@@ -249,6 +330,7 @@ export declare const codes: {
249
330
  readonly ParseError: "IMFERNO/ParseError";
250
331
  readonly PklParseError: "IMFERNO/PklParseError";
251
332
  readonly XmlAssetParseError: "IMFERNO/XmlAssetParseError";
333
+ readonly CplUnparseable: "IMFERNO/CplUnparseable";
252
334
  readonly XmlReadError: "IMFERNO/XmlReadError";
253
335
  readonly ReadDirError: "IMFERNO/ReadDirError";
254
336
  readonly DirEntryError: "IMFERNO/DirEntryError";
package/codes.js CHANGED
@@ -8,14 +8,21 @@ const codes = {
8
8
  HeaderPartitionOpen: "ST377-1/HeaderPartitionOpen",
9
9
  MissingHeaderMetadata: "ST377-1/MissingHeaderMetadata",
10
10
  StructuralComponentDurationMissing: "ST377-1/StructuralComponentDurationMissing",
11
+ FileDescriptorEssenceContainerMissing: "ST377-1/FileDescriptorEssenceContainerMissing",
12
+ PrefaceEssenceContainersIncomplete: "ST377-1/PrefaceEssenceContainersIncomplete",
13
+ PartitionEssenceContainersIncomplete: "ST377-1/PartitionEssenceContainersIncomplete",
11
14
  },
12
15
  ST377_4: {
13
16
  MCALinkIDMissing: "ST377-4/MCALinkIDMissing",
14
17
  SoundfieldGroupLinkIDMismatch: "ST377-4/SoundfieldGroupLinkIDMismatch",
18
+ MCALinkIDNotUnique: "ST377-4/MCALinkIDNotUnique",
19
+ MCATagSymbolSyntax: "ST377-4/MCATagSymbolSyntax",
20
+ SoundfieldGroupUnreferenced: "ST377-4/SoundfieldGroupUnreferenced",
15
21
  },
16
22
  ST429_8: {
17
23
  SizeMismatch: "ST429-8/SizeMismatch",
18
24
  ChecksumMismatch: "ST429-8/ChecksumMismatch",
25
+ MalformedXml: "ST429-8/MalformedXml",
19
26
  },
20
27
  ST429_9: {
21
28
  AssetListEmpty: "ST429-9/AssetListEmpty",
@@ -30,10 +37,20 @@ const codes = {
30
37
  AssetMapHasNoPackingList: "ST429-9/AssetMapHasNoPackingList",
31
38
  PklIdNotInAssetMap: "ST429-9/PklIdNotInAssetMap",
32
39
  AssetMapMalformedXml: "ST429-9/AssetMapMalformedXml",
40
+ PackingListFlagNotPkl: "ST429-9/PackingListFlagNotPkl",
41
+ VolumeCountNotOne: "ST429-9/VolumeCountNotOne",
42
+ ChunkCountNotOne: "ST429-9/ChunkCountNotOne",
43
+ ChunkVolumeIndexNotOne: "ST429-9/ChunkVolumeIndexNotOne",
44
+ ChunkOffsetNotZero: "ST429-9/ChunkOffsetNotZero",
45
+ ChunkLengthMismatch: "ST429-9/ChunkLengthMismatch",
46
+ SymbolicLink: "ST429-9/SymbolicLink",
33
47
  },
34
48
  ST2067_2: {
35
49
  NotImfCompositionPlaylist: "ST2067-2/NotImfCompositionPlaylist",
50
+ ApplicationIdentificationMissing: "ST2067-2/ApplicationIdentificationMissing",
51
+ ApplicationIdentificationDuplicate: "ST2067-2/ApplicationIdentificationDuplicate",
36
52
  PklMalformedXml: "ST2067-2/PklMalformedXml",
53
+ NoPackingList: "ST2067-2/NoPackingList",
37
54
  NoCpls: "ST2067-2/NoCpls",
38
55
  SizeMismatch: "ST2067-2/SizeMismatch",
39
56
  FileNotFound: "ST2067-2/FileNotFound",
@@ -55,6 +72,7 @@ const codes = {
55
72
  SoundfieldChannelCount: "ST2067-2/SoundfieldChannelCount",
56
73
  DigitalSignature: "ST2067-2/DigitalSignature",
57
74
  EssenceDescriptorList: "ST2067-2/EssenceDescriptorList",
75
+ EssenceDescriptorContainerFormatMissing: "ST2067-2/EssenceDescriptorContainerFormatMissing",
58
76
  CplIdAssetMapMismatch: "ST2067-2/CplIdAssetMapMismatch",
59
77
  OperationalPatternNotOP1A: "ST2067-2/OperationalPatternNotOP1A",
60
78
  SoundDescriptorNotWAVEPCM: "ST2067-2/SoundDescriptorNotWAVEPCM",
@@ -72,12 +90,20 @@ const codes = {
72
90
  SoundfieldGroupMissingMCATitleVersion: "ST2067-2/SoundfieldGroupMissingMCATitleVersion",
73
91
  SoundfieldGroupMissingMCAAudioContentKind: "ST2067-2/SoundfieldGroupMissingMCAAudioContentKind",
74
92
  SoundfieldGroupMissingMCAAudioElementKind: "ST2067-2/SoundfieldGroupMissingMCAAudioElementKind",
93
+ MCATagNameMissing: "ST2067-2/MCATagNameMissing",
94
+ GroupOfSoundfieldGroupsMissingMCATitle: "ST2067-2/GroupOfSoundfieldGroupsMissingMCATitle",
95
+ GroupOfSoundfieldGroupsMissingMCATitleVersion: "ST2067-2/GroupOfSoundfieldGroupsMissingMCATitleVersion",
96
+ GroupOfSoundfieldGroupsMissingMCAAudioContentKind: "ST2067-2/GroupOfSoundfieldGroupsMissingMCAAudioContentKind",
97
+ GroupOfSoundfieldGroupsMissingMCAAudioElementKind: "ST2067-2/GroupOfSoundfieldGroupsMissingMCAAudioElementKind",
98
+ AudioEssenceNotHomogeneous: "ST2067-2/AudioEssenceNotHomogeneous",
99
+ AudioVirtualTrackLabelsDiffer: "ST2067-2/AudioVirtualTrackLabelsDiffer",
75
100
  TimedTextUCSEncodingNotUTF8: "ST2067-2/TimedTextUCSEncodingNotUTF8",
76
101
  TimedTextNamespaceNotIMSC: "ST2067-2/TimedTextNamespaceNotIMSC",
77
102
  TimedTextResourceMIMETypeUnsupported: "ST2067-2/TimedTextResourceMIMETypeUnsupported",
78
103
  TimedTextMappingKindNot0x13: "ST2067-2/TimedTextMappingKindNot0x13",
79
104
  MainImageVirtualTrackCount: "ST2067-2/MainImageVirtualTrackCount",
80
105
  AudioVirtualTrackMissing: "ST2067-2/AudioVirtualTrackMissing",
106
+ TrackFileMediaType: "ST2067-2/TrackFileMediaType",
81
107
  },
82
108
  ST2067_3: {
83
109
  ContentTitleEmpty: "ST2067-3/ContentTitleEmpty",
@@ -103,8 +129,22 @@ const codes = {
103
129
  ResourceDuration: "ST2067-3/ResourceDuration",
104
130
  RepeatCount: "ST2067-3/RepeatCount",
105
131
  TrackFileId: "ST2067-3/TrackFileId",
132
+ SourceEncodingMissing: "ST2067-3/SourceEncodingMissing",
106
133
  VirtualTrackContinuity: "ST2067-3/VirtualTrackContinuity",
134
+ VirtualTrackSequenceKind: "ST2067-3/VirtualTrackSequenceKind",
135
+ ExtensionSequenceNotSequenceType: "ST2067-3/ExtensionSequenceNotSequenceType",
136
+ ResourceTypeMixed: "ST2067-3/ResourceTypeMixed",
137
+ MarkerSequenceResourceType: "ST2067-3/MarkerSequenceResourceType",
107
138
  DanglingEssenceDescriptor: "ST2067-3/DanglingEssenceDescriptor",
139
+ CplMediaType: "ST2067-3/CplMediaType",
140
+ UniqueSequenceId: "ST2067-3/UniqueSequenceId",
141
+ ContentMaturityRatingAgencyDuplicate: "ST2067-3/ContentMaturityRatingAgencyDuplicate",
142
+ LocaleRegionInvalid: "ST2067-3/LocaleRegionInvalid",
143
+ SignerWithoutSignature: "ST2067-3/SignerWithoutSignature",
144
+ SignatureWithoutSigner: "ST2067-3/SignatureWithoutSigner",
145
+ HashAlgorithmMissing: "ST2067-3/HashAlgorithmMissing",
146
+ HashAlgorithmWithoutHash: "ST2067-3/HashAlgorithmWithoutHash",
147
+ ResourceHashMismatch: "ST2067-3/ResourceHashMismatch",
108
148
  },
109
149
  ST2067_5: {
110
150
  OperationalPatternQualifier: "ST2067-5/OperationalPatternQualifier",
@@ -185,6 +225,11 @@ const codes = {
185
225
  HtIrvParameterBMax: "ST2067-21/HtIrvParameterBMax",
186
226
  HtIrvParameterBRecommended: "ST2067-21/HtIrvParameterBRecommended",
187
227
  J2K8KResolution: "ST2067-21/J2K8KResolution",
228
+ RefLevelMissing: "ST2067-21/RefLevelMissing",
229
+ DisplayF2Offset: "ST2067-21/DisplayF2Offset",
230
+ J2CLayoutValue: "ST2067-21/J2CLayoutValue",
231
+ PictureEssenceCoding: "ST2067-21/PictureEssenceCoding",
232
+ HtCodestreamConstraints: "ST2067-21/HtCodestreamConstraints",
188
233
  },
189
234
  ST2067_201: {
190
235
  CodecForbidden: "ST2067-201/CodecForbidden",
@@ -212,6 +257,9 @@ const codes = {
212
257
  MCAChannelIDForbidden: "ST2067-201/MCAChannelIDForbidden",
213
258
  EditRateNotIntegerMultiple: "ST2067-201/EditRateNotIntegerMultiple",
214
259
  IabChannelSubDescriptorRecommended: "ST2067-201/IabChannelSubDescriptorRecommended",
260
+ ConformsToSpecificationsMissing: "ST2067-201/ConformsToSpecificationsMissing",
261
+ ConformsToSpecificationsInvalid: "ST2067-201/ConformsToSpecificationsInvalid",
262
+ EssenceNotHomogeneous: "ST2067-201/EssenceNotHomogeneous",
215
263
  },
216
264
  ST2067_202: {
217
265
  NamespaceUriMissing: "ST2067-202/NamespaceUriMissing",
@@ -222,6 +270,36 @@ const codes = {
222
270
  ISXDVirtualTrackMissing: "ST2067-202/ISXDVirtualTrackMissing",
223
271
  DataEssenceCodingMissing: "ST2067-202/DataEssenceCodingMissing",
224
272
  DataEssenceCodingInvalid: "ST2067-202/DataEssenceCodingInvalid",
273
+ EssenceContainerInvalid: "ST2067-202/EssenceContainerInvalid",
274
+ },
275
+ ST2067_203: {
276
+ SequenceResourceNotTrackFile: "ST2067-203/SequenceResourceNotTrackFile",
277
+ VirtualTrackParameterSetMissing: "ST2067-203/VirtualTrackParameterSetMissing",
278
+ VirtualTrackParameterSetDuplicate: "ST2067-203/VirtualTrackParameterSetDuplicate",
279
+ VirtualTrackParameterSetIdDuplicate: "ST2067-203/VirtualTrackParameterSetIdDuplicate",
280
+ VirtualTrackParameterSetOrphaned: "ST2067-203/VirtualTrackParameterSetOrphaned",
281
+ VirtualTrackParameterSetInvalid: "ST2067-203/VirtualTrackParameterSetInvalid",
282
+ OperationalModeUnknown: "ST2067-203/OperationalModeUnknown",
283
+ OperationalModeNotRecognized: "ST2067-203/OperationalModeNotRecognized",
284
+ SoundfieldGroupSelectorDuplicate: "ST2067-203/SoundfieldGroupSelectorDuplicate",
285
+ SoundfieldGroupSelectorResourceIdOrphaned: "ST2067-203/SoundfieldGroupSelectorResourceIdOrphaned",
286
+ SoundfieldGroupLinkIdDuplicate: "ST2067-203/SoundfieldGroupLinkIdDuplicate",
287
+ EditRateNotHomogeneous: "ST2067-203/EditRateNotHomogeneous",
288
+ EditRateNotMultipleOfMainImage: "ST2067-203/EditRateNotMultipleOfMainImage",
289
+ },
290
+ ST2067_204: {
291
+ SequenceResourceNotTrackFile: "ST2067-204/SequenceResourceNotTrackFile",
292
+ VirtualTrackParameterSetMissing: "ST2067-204/VirtualTrackParameterSetMissing",
293
+ VirtualTrackParameterSetDuplicate: "ST2067-204/VirtualTrackParameterSetDuplicate",
294
+ VirtualTrackParameterSetIdDuplicate: "ST2067-204/VirtualTrackParameterSetIdDuplicate",
295
+ VirtualTrackParameterSetOrphaned: "ST2067-204/VirtualTrackParameterSetOrphaned",
296
+ VirtualTrackParameterSetInvalid: "ST2067-204/VirtualTrackParameterSetInvalid",
297
+ OperationalModeUnknown: "ST2067-204/OperationalModeUnknown",
298
+ OperationalModeNotRecognized: "ST2067-204/OperationalModeNotRecognized",
299
+ SoundfieldGroupSelectorDuplicate: "ST2067-204/SoundfieldGroupSelectorDuplicate",
300
+ SoundfieldGroupSelectorResourceIdOrphaned: "ST2067-204/SoundfieldGroupSelectorResourceIdOrphaned",
301
+ SoundfieldGroupLinkIdDuplicate: "ST2067-204/SoundfieldGroupLinkIdDuplicate",
302
+ EditRateNotHomogeneous: "ST2067-204/EditRateNotHomogeneous",
225
303
  },
226
304
  XSD: {
227
305
  ElementMissing: "XSD/ElementMissing",
@@ -233,11 +311,14 @@ const codes = {
233
311
  NotValidated: "XSD/NotValidated",
234
312
  },
235
313
  IMFERNO: {
314
+ ExtensionSequenceNotValidated: "IMFERNO/ExtensionSequenceNotValidated",
315
+ SequenceListUnreadable: "IMFERNO/SequenceListUnreadable",
236
316
  EditionAssumed: "IMFERNO/EditionAssumed",
237
317
  EditionConflict: "IMFERNO/EditionConflict",
238
318
  EditionPinned: "IMFERNO/EditionPinned",
239
319
  PinNotApplied: "IMFERNO/PinNotApplied",
240
320
  DeliveryNotChecked: "IMFERNO/DeliveryNotChecked",
321
+ DiskChecksNotRun: "IMFERNO/DiskChecksNotRun",
241
322
  OpenFailed: "IMFERNO/OpenFailed",
242
323
  PartitionPackParseFailed: "IMFERNO/PartitionPackParseFailed",
243
324
  RegXmlConversionFailed: "IMFERNO/RegXmlConversionFailed",
@@ -249,6 +330,7 @@ const codes = {
249
330
  ParseError: "IMFERNO/ParseError",
250
331
  PklParseError: "IMFERNO/PklParseError",
251
332
  XmlAssetParseError: "IMFERNO/XmlAssetParseError",
333
+ CplUnparseable: "IMFERNO/CplUnparseable",
252
334
  XmlReadError: "IMFERNO/XmlReadError",
253
335
  ReadDirError: "IMFERNO/ReadDirError",
254
336
  DirEntryError: "IMFERNO/DirEntryError",
package/index.d.ts CHANGED
@@ -13,10 +13,18 @@ import type {
13
13
  export * from "./types";
14
14
  export { codes } from "./codes";
15
15
 
16
- /** Options for validating a package on disk (`validatePath`, `buildReportFromPath`). */
16
+ /** Options for validating a package on disk (`validatePath`, `buildReportFromPath` and their `…Async` variants). */
17
17
  export interface PathValidateOptions extends ValidateOptions {
18
- /** Skip file-manifest (size/presence) and MXF header checks. Default: `false`. */
18
+ /**
19
+ * Skip every disk read: asset presence, size and hash checks and MXF
20
+ * header checks (implies `skipHashes`). Only the XML is validated. Default: `false`.
21
+ */
19
22
  skipDiskChecks?: boolean;
23
+ /**
24
+ * Skip hashing the assets against their Packing List `<Hash>`; presence and
25
+ * size are still checked. Hashing reads every asset. Default: `false`.
26
+ */
27
+ skipHashes?: boolean;
20
28
  }
21
29
 
22
30
  /** Explicit S3 credentials for `s3://` URIs. Omit to use the default AWS credential chain. */
@@ -28,7 +36,12 @@ export interface S3Credentials {
28
36
  endpoint?: string;
29
37
  }
30
38
 
31
- /** Options for `validateUri` / `buildReportFromUri`. */
39
+ /**
40
+ * Options for `validateUri` / `buildReportFromUri` (and their `…Async` variants).
41
+ * For an `s3://` URI only the XML is read: the disk checks do not run, and the
42
+ * result carries an `IMFERNO:Package/DiskChecksNotRun` notice unless
43
+ * `skipDiskChecks` is set.
44
+ */
32
45
  export interface UriValidateOptions extends PathValidateOptions {
33
46
  /** Ignored for filesystem URIs. */
34
47
  credentials?: S3Credentials | null;
@@ -58,13 +71,26 @@ export declare function buildReport(files: Record<string, string>, options?: Val
58
71
  * Validate an IMF package directory on disk, returning the legacy
59
72
  * `ImfReport` summary. Prefer `validatePath` for new code.
60
73
  *
74
+ * Hashes the assets in parallel and blocks until done; see
75
+ * `buildReportFromPathAsync`.
76
+ *
61
77
  * @param path - Path to the IMP directory
62
- * @param options - Optional validation options (`coreSpec`, `cplSpec`, `iabSpec`, `app2eSpec`, `skipDiskChecks`, `rules`, `aggregateRepeats`)
78
+ * @param options - Optional validation options (`coreSpec`, `cplSpec`, `iabSpec`, `app2eSpec`, `skipDiskChecks`, `skipHashes`, `rules`, `aggregateRepeats`)
63
79
  * @returns An `ImfReport` with `package`, `cpls`, and `validation` fields.
64
80
  * @throws If the directory cannot be read, the package cannot be parsed, or the options are invalid.
65
81
  */
66
82
  export declare function buildReportFromPath(path: string, options?: PathValidateOptions | undefined | null): ImfReport
67
83
 
84
+ /**
85
+ * `buildReportFromPath` on the libuv thread pool: the event loop keeps
86
+ * running while the assets are hashed.
87
+ *
88
+ * @param path - Path to the IMP directory
89
+ * @param options - Optional validation options, as for `buildReportFromPath`
90
+ * @returns A Promise of the `ImfReport`; rejects where `buildReportFromPath` throws.
91
+ */
92
+ export declare function buildReportFromPathAsync(path: string, options?: PathValidateOptions | undefined | null): Promise<ImfReport>
93
+
68
94
  /**
69
95
  * Build the legacy `ImfReport` summary from a URI. Accepts the same URI forms
70
96
  * as `validateUri`; prefer `validateUri` for new code.
@@ -76,6 +102,15 @@ export declare function buildReportFromPath(path: string, options?: PathValidate
76
102
  */
77
103
  export declare function buildReportFromUri(uri: string, options?: UriValidateOptions | undefined | null): ImfReport
78
104
 
105
+ /**
106
+ * `buildReportFromUri` on the libuv thread pool.
107
+ *
108
+ * @param uri - Path or URI to the IMP
109
+ * @param options - Optional validation options, as for `buildReportFromUri`
110
+ * @returns A Promise of the `ImfReport`; rejects where `buildReportFromUri` throws.
111
+ */
112
+ export declare function buildReportFromUriAsync(uri: string, options?: UriValidateOptions | undefined | null): Promise<ImfReport>
113
+
79
114
  /**
80
115
  * Pretty-print a validation result as a human-readable string.
81
116
  *
@@ -139,25 +174,44 @@ export declare function toSarif(report: ValidationResult | ValidationReport): Sa
139
174
  * @param files - A map of filename to XML content
140
175
  * @param options - Optional validation options
141
176
  * @returns `{ package, validation }` — the full parsed package and all findings.
142
- * @throws Only if the options are invalid.
177
+ * @throws Only if the options are invalid (wrong type, unknown key).
143
178
  */
144
179
  export declare function validate(files: Record<string, string>, options?: ValidateOptions | undefined | null): ValidationResult
145
180
 
146
181
  /**
147
182
  * Parse and validate an IMF package directory on disk.
148
183
  *
184
+ * Like the CLI, checks every asset's presence and size and hashes it against
185
+ * its Packing List `<Hash>` unless `skipHashes` (or `skipDiskChecks`) is set.
186
+ * Hashing reads every asset (several at a time) and blocks until done; use
187
+ * `validatePathAsync` to keep the event loop running.
188
+ *
149
189
  * @param path - Path to the IMP directory
150
190
  * @param options - Optional validation options
151
191
  * @returns `{ package, validation }` — the full parsed package and all findings.
152
- * @throws If the directory cannot be read or the options are invalid.
192
+ * @throws If the directory cannot be read or the options are invalid
193
+ * (wrong type, unknown key).
153
194
  */
154
195
  export declare function validatePath(path: string, options?: PathValidateOptions | undefined | null): ValidationResult
155
196
 
197
+ /**
198
+ * `validatePath` on the libuv thread pool: the event loop keeps running
199
+ * while the assets are hashed. Same result as `validatePath`.
200
+ *
201
+ * @param path - Path to the IMP directory
202
+ * @param options - Optional validation options, as for `validatePath`
203
+ * @returns A Promise of `{ package, validation }`; rejects where `validatePath` throws.
204
+ */
205
+ export declare function validatePathAsync(path: string, options?: PathValidateOptions | undefined | null): Promise<ValidationResult>
206
+
156
207
  /**
157
208
  * Parse and validate an IMF package from a URI.
158
209
  *
159
210
  * Accepts `file://` URIs, bare filesystem paths, and (when built with the
160
211
  * `aws-s3` feature, as the prebuilt npm binaries are) `s3://bucket/prefix/`.
212
+ * Local packages get the disk checks of `validatePath`. An `s3://` package
213
+ * has only its XML read: presence, size and hash checks are not run, and the
214
+ * result says so with an `IMFERNO:Package/DiskChecksNotRun` notice.
161
215
  *
162
216
  * @param uri - Path or URI to the IMP
163
217
  * @param options - Optional validation options (plus `credentials` for S3)
@@ -165,3 +219,14 @@ export declare function validatePath(path: string, options?: PathValidateOptions
165
219
  * @throws If the URI cannot be read or the options are invalid.
166
220
  */
167
221
  export declare function validateUri(uri: string, options?: UriValidateOptions | undefined | null): ValidationResult
222
+
223
+ /**
224
+ * `validateUri` on the libuv thread pool: the event loop keeps running
225
+ * while the package is read and its assets are hashed. Same result as
226
+ * `validateUri`.
227
+ *
228
+ * @param uri - Path or URI to the IMP
229
+ * @param options - Optional validation options (plus `credentials` for S3)
230
+ * @returns A Promise of `{ package, validation }`; rejects where `validateUri` throws.
231
+ */
232
+ export declare function validateUriAsync(uri: string, options?: UriValidateOptions | undefined | null): Promise<ValidationResult>
package/index.mjs CHANGED
@@ -49,12 +49,16 @@ export const {
49
49
  buildReport,
50
50
  buildReportFromPath,
51
51
  buildReportFromUri,
52
+ buildReportFromPathAsync,
53
+ buildReportFromUriAsync,
52
54
  formatReport,
53
55
  parsePackage,
54
56
  parsePackageFromPath,
55
57
  validate,
56
58
  validatePath,
57
59
  validateUri,
60
+ validatePathAsync,
61
+ validateUriAsync,
58
62
  listRules,
59
63
  toSarif,
60
64
  } = nativeModule;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imferno/node",
3
- "version": "3.0.2-feat-docs-sample-imp-browser.07823ae",
3
+ "version": "3.0.2-feat-st2067-203-204-cpl-plugin-semantics.2c014ba",
4
4
  "description": "Native Node.js bindings for the imferno SMPTE ST 2067 IMF validator",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",
@@ -45,12 +45,12 @@
45
45
  "test": "vitest run"
46
46
  },
47
47
  "optionalDependencies": {
48
- "@imferno/node-darwin-arm64": "3.0.2-feat-docs-sample-imp-browser.07823ae",
49
- "@imferno/node-darwin-x64": "3.0.2-feat-docs-sample-imp-browser.07823ae",
50
- "@imferno/node-linux-x64-gnu": "3.0.2-feat-docs-sample-imp-browser.07823ae",
51
- "@imferno/node-linux-arm64-gnu": "3.0.2-feat-docs-sample-imp-browser.07823ae",
52
- "@imferno/node-win32-x64-msvc": "3.0.2-feat-docs-sample-imp-browser.07823ae",
53
- "@imferno/node-win32-arm64-msvc": "3.0.2-feat-docs-sample-imp-browser.07823ae"
48
+ "@imferno/node-darwin-arm64": "3.0.2-feat-st2067-203-204-cpl-plugin-semantics.2c014ba",
49
+ "@imferno/node-darwin-x64": "3.0.2-feat-st2067-203-204-cpl-plugin-semantics.2c014ba",
50
+ "@imferno/node-linux-x64-gnu": "3.0.2-feat-st2067-203-204-cpl-plugin-semantics.2c014ba",
51
+ "@imferno/node-linux-arm64-gnu": "3.0.2-feat-st2067-203-204-cpl-plugin-semantics.2c014ba",
52
+ "@imferno/node-win32-x64-msvc": "3.0.2-feat-st2067-203-204-cpl-plugin-semantics.2c014ba",
53
+ "@imferno/node-win32-arm64-msvc": "3.0.2-feat-st2067-203-204-cpl-plugin-semantics.2c014ba"
54
54
  },
55
55
  "publishConfig": {
56
56
  "access": "public"
package/types.d.ts CHANGED
@@ -6,6 +6,18 @@
6
6
  * ship their own copy: the WASM build serialises some CPL fields in camelCase.
7
7
  */
8
8
 
9
+ export type RuleValidationReason =
10
+ | {
11
+ kind: "unknown_source";
12
+ variant: string;
13
+ }
14
+ | {
15
+ kind: "matches_nothing";
16
+ }
17
+ | {
18
+ hint: string;
19
+ kind: "unsupported_pattern";
20
+ };
9
21
  /**
10
22
  * A SMPTE IMF UUID, serialised as a bare UUID string (e.g. "0eb3d1b9-b77b-4d3f-bbe5-7c69b15dca85")
11
23
  */
@@ -57,6 +69,8 @@ export type Spec =
57
69
  | "ST2067-21"
58
70
  | "ST2067-201"
59
71
  | "ST2067-202"
72
+ | "ST2067-203"
73
+ | "ST2067-204"
60
74
  | "XSD"
61
75
  | "IMFERNO";
62
76
  /**
@@ -120,6 +134,7 @@ export type VideoCodec =
120
134
  | "Jpeg2000Imf8k"
121
135
  | "Jpeg2000Broadcast"
122
136
  | "Jpeg2000Ht"
137
+ | "Jpeg2000HtNode"
123
138
  | "Vc5"
124
139
  | "Mpeg2"
125
140
  | "H264"
@@ -206,18 +221,6 @@ export type MimeType =
206
221
  * Mirrors ESLint's `"off"` / `"warn"` / `"error"` vocabulary, extended with the two IMF severity levels.
207
222
  */
208
223
  export type RuleSeverity = "off" | "info" | "warn" | "error" | "critical";
209
- export type RuleValidationReason =
210
- | {
211
- kind: "unknown_source";
212
- variant: string;
213
- }
214
- | {
215
- kind: "matches_nothing";
216
- }
217
- | {
218
- hint: string;
219
- kind: "unsupported_pattern";
220
- };
221
224
 
222
225
  /**
223
226
  * @deprecated
@@ -228,6 +231,10 @@ export type RuleValidationReason =
228
231
  export interface ImfReport {
229
232
  cpls: CplReport[];
230
233
  package: PackageSummary;
234
+ /**
235
+ * Keys of the `rules` option that select no rule (typos, unknown editions); they were ignored. Absent when every key matched.
236
+ */
237
+ ruleWarnings?: RuleValidationWarning[];
231
238
  validation: ValidationReport;
232
239
  }
233
240
  export interface CplReport {
@@ -318,6 +325,18 @@ export interface UnreferencedAsset {
318
325
  id: string;
319
326
  path: string;
320
327
  }
328
+ /**
329
+ * A diagnostic about a `RulesConfig` key that the engine couldn't match.
330
+ *
331
+ * Produced by `RulesConfig::validate`. Operators can use these at config-load time to catch typos before any validation work runs.
332
+ */
333
+ export interface RuleValidationWarning {
334
+ /**
335
+ * The configured key that triggered the warning.
336
+ */
337
+ key: string;
338
+ reason: RuleValidationReason;
339
+ }
321
340
  /**
322
341
  * Comprehensive validation report
323
342
  */
@@ -338,6 +357,10 @@ export interface ValidationReport {
338
357
  * Whether the package is compliant with base SMPTE standards
339
358
  */
340
359
  is_compliant: boolean;
360
+ /**
361
+ * Whether everything in the package was validated. False when a finding says part of it was not (e.g. `IMFERNO:Cpl/ExtensionSequenceNotValidated` for S-ADM audio): then `is_compliant` only covers what was checked. A rule override that switches such a finding `off` moves it to `suppressed` but keeps this false.
362
+ */
363
+ is_fully_validated: boolean;
341
364
  /**
342
365
  * Whether the package is playable despite issues
343
366
  */
@@ -539,10 +562,21 @@ export interface ChunkList {
539
562
  * A single file path entry in a ChunkList.
540
563
  */
541
564
  export interface Chunk {
565
+ /**
566
+ * `<Length>` in bytes, when present.
567
+ */
568
+ length?: number | null;
569
+ /**
570
+ * `<Offset>` in bytes, when present.
571
+ */
572
+ offset?: number | null;
542
573
  /**
543
574
  * File path relative to the IMP root directory.
544
575
  */
545
576
  path: string;
577
+ /**
578
+ * `<VolumeIndex>`; 1 when absent.
579
+ */
546
580
  volumeIndex: number;
547
581
  }
548
582
  /**
@@ -888,9 +922,9 @@ export interface IABEssenceDescriptor {
888
922
  */
889
923
  ContainerFormat?: string | null;
890
924
  /**
891
- * ST 2067-201 §5.9: ElectrospatialFormulation shall NOT be present.
925
+ * ST 2067-201 §5.9: if present, ElectrospatialFormulation shall be 15 (multi-channel mode default). Kept as written: RegXML writes the enumeration as its register symbol (`ElectroSpatialFormulation_MultiChannelMode`), some writers as the number. See `IABEssenceDescriptor::electrospatial_formulation_value`.
892
926
  */
893
- ElectrospatialFormulation?: number | null;
927
+ ElectrospatialFormulation?: string | null;
894
928
  InstanceID?: string | null;
895
929
  LinkedTrackID?: number | null;
896
930
  /**
@@ -914,7 +948,7 @@ export interface IABSubDescriptors {
914
948
  /**
915
949
  * Presence-only stub for ST 2067-201:2026 Annex E `IABChannelSubDescriptor`.
916
950
  *
917
- * The 2026 spec defines the full item set in Table E.1 (`IABBedMetaID`, `IABChannelID`, `IABAudioDescription`, `IABAudioDescriptionText`); imferno's CPL parser only needs to count occurrences to fire the `IabChannelSubDescriptorRecommended` warning, so the inner shape is intentionally permissive — any nested content deserialises into the catch-all map without affecting presence.
951
+ * The 2026 spec defines the full item set in Table E.1 (`IABBedMetaID`, `IABChannelID`, `IABAudioDescription`, `IABAudioDescriptionText`); imferno's CPL parser only needs to count occurrences to fire the `IabChannelSubDescriptorRecommended` notice, so the inner shape is intentionally permissive — any nested content deserialises into the catch-all map without affecting presence.
918
952
  */
919
953
  export interface IABChannelSubDescriptor {
920
954
  /**
@@ -943,6 +977,10 @@ export interface IABSoundfieldLabelSubDescriptor {
943
977
  * ISXD (Immersive Sound XML Data) essence descriptor — Dolby Atmos sidecar format
944
978
  */
945
979
  export interface ISXDDataEssenceDescriptor {
980
+ /**
981
+ * ST 2067-202 §9.1: the Essence Container UL shall be the Frame Wrapped ISXD Container UL (Table 3).
982
+ */
983
+ ContainerFormat?: string | null;
946
984
  DataEssenceCoding?: string | null;
947
985
  InstanceID?: string | null;
948
986
  LinkedTrackID?: number | null;
@@ -1089,6 +1127,9 @@ export interface SoundfieldGroupLabelSubDescriptor {
1089
1127
  */
1090
1128
  RFC5646SpokenLanguage?: LanguageTag | null;
1091
1129
  }
1130
+ /**
1131
+ * The CPL's `ExtensionProperties`: ApplicationIdentification (the Application IDs of every ST 2067-2 instance, space-separated), MaxCLL and MaxFALL.
1132
+ */
1092
1133
  export interface ExtensionProperties {
1093
1134
  ApplicationIdentification?: string | null;
1094
1135
  MaxCLL?: number | null;
@@ -1137,6 +1178,10 @@ export interface Segment {
1137
1178
  SequenceList: SequenceList;
1138
1179
  }
1139
1180
  export interface SequenceList {
1181
+ /**
1182
+ * Sequences whose element imferno does not model (ST 2067-3 §6.9.3 Extension Sequences, e.g. ST 2067-203 `MGASADMSignalSequence` or ST 2067-2 `CommentarySequence`), in document order. Filled by `parse_cpl` from the source XML so their EssenceDescriptor and Track File references resolve; no other rules are applied to them.
1183
+ */
1184
+ ExtensionSequence?: ExtensionSequence[];
1140
1185
  ForcedNarrativeSequence?: ForcedNarrativeSequence[];
1141
1186
  HearingImpairedCaptionsSequence?: HearingImpairedCaptionsSequence[];
1142
1187
  IABSequence?: IABSequence[];
@@ -1146,8 +1191,13 @@ export interface SequenceList {
1146
1191
  MarkerSequence?: MarkerSequence[];
1147
1192
  SubtitlesSequence?: SubtitlesSequence[];
1148
1193
  }
1149
- export interface ForcedNarrativeSequence {
1194
+ /**
1195
+ * A Sequence of a kind imferno does not model (ST 2067-3 §6.9.3 Extension Sequence). Every Sequence derives from SequenceType, so its Id, TrackId and Resources are kept; the element is named by `name` (local name) and `namespace` (namespace URI; null when the element has no namespace).
1196
+ */
1197
+ export interface ExtensionSequence {
1150
1198
  Id: ImfUuid;
1199
+ Name?: string;
1200
+ Namespace?: string | null;
1151
1201
  ResourceList: ResourceList;
1152
1202
  TrackId: ImfUuid;
1153
1203
  }
@@ -1162,17 +1212,40 @@ export interface Resource {
1162
1212
  Id: ImfUuid;
1163
1213
  IntrinsicDuration: number;
1164
1214
  KeyId?: ImfUuid | null;
1215
+ /**
1216
+ * `LeftEye` of a `cc:StereoImageTrackFileResourceType` resource (ST 2067-2:2013, :2016 and :2020). A stereo resource carries its SourceEncoding and TrackFileId per eye, not on the resource itself.
1217
+ */
1218
+ LeftEye?: StereoEye | null;
1165
1219
  Marker?: MarkerInfo[];
1166
1220
  RepeatCount?: number | null;
1221
+ /**
1222
+ * `RightEye` of a `cc:StereoImageTrackFileResourceType` resource.
1223
+ */
1224
+ RightEye?: StereoEye | null;
1167
1225
  SourceDuration?: number | null;
1168
1226
  SourceEncoding?: ImfUuid | null;
1169
1227
  TrackFileId?: ImfUuid | null;
1170
1228
  }
1229
+ /**
1230
+ * One eye of a stereo resource: a `cpl:TrackFileResourceType` (ST 2067-2). Only the track file reference fields are kept; the eye's timing fields are checked by the XSD layer.
1231
+ */
1232
+ export interface StereoEye {
1233
+ Hash?: string | null;
1234
+ Id?: ImfUuid | null;
1235
+ KeyId?: ImfUuid | null;
1236
+ SourceEncoding?: ImfUuid | null;
1237
+ TrackFileId?: ImfUuid | null;
1238
+ }
1171
1239
  export interface MarkerInfo {
1172
1240
  Annotation?: string | null;
1173
1241
  Label: MarkerLabelElement;
1174
1242
  Offset: number;
1175
1243
  }
1244
+ export interface ForcedNarrativeSequence {
1245
+ Id: ImfUuid;
1246
+ ResourceList: ResourceList;
1247
+ TrackId: ImfUuid;
1248
+ }
1176
1249
  export interface HearingImpairedCaptionsSequence {
1177
1250
  Id: ImfUuid;
1178
1251
  ResourceList: ResourceList;
@@ -1444,18 +1517,6 @@ export interface ValidationResult {
1444
1517
  rule_warnings?: RuleValidationWarning[];
1445
1518
  validation: ValidationReport;
1446
1519
  }
1447
- /**
1448
- * A diagnostic about a `RulesConfig` key that the engine couldn't match.
1449
- *
1450
- * Produced by `RulesConfig::validate`. Operators can use these at config-load time to catch typos before any validation work runs.
1451
- */
1452
- export interface RuleValidationWarning {
1453
- /**
1454
- * The configured key that triggered the warning.
1455
- */
1456
- key: string;
1457
- reason: RuleValidationReason;
1458
- }
1459
1520
 
1460
1521
  /**
1461
1522
  * Core constraints (ST 2067-2) edition to validate against. `"auto"` detects