@automovie/ingest 0.2.0 → 0.3.1

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.
Files changed (120) hide show
  1. package/lib/AUTOMOVIE_GLTF_MOTION_INTERPRETATION_PROFILE.d.ts +1 -1
  2. package/lib/AUTO_MOVIE_EXTERNAL_MODEL_INGEST_PROFILES.d.ts +1 -1
  3. package/lib/adoptAutoMovieExternalMotion.d.ts +3 -13
  4. package/lib/adoptAutoMovieExternalMotion.js +27 -1
  5. package/lib/adoptAutoMovieExternalMotion.js.map +1 -1
  6. package/lib/audio/decodeProductionAudioAsset.d.ts +2 -9
  7. package/lib/audio/decodeProductionAudioAsset.js.map +1 -1
  8. package/lib/audio/index.d.ts +0 -3
  9. package/lib/audio/index.js +0 -3
  10. package/lib/audio/index.js.map +1 -1
  11. package/lib/decodeAutoMoviePpmImage.d.ts +4 -12
  12. package/lib/decodeAutoMoviePpmImage.js +2 -2
  13. package/lib/decodeAutoMoviePpmImage.js.map +1 -1
  14. package/lib/humanoidSkeleton.d.ts +6 -5
  15. package/lib/humanoidSkeleton.js +15 -5
  16. package/lib/humanoidSkeleton.js.map +1 -1
  17. package/lib/index.d.ts +0 -14
  18. package/lib/index.js +0 -14
  19. package/lib/index.js.map +1 -1
  20. package/lib/ingestDocument.d.ts +1 -1
  21. package/lib/inspectAutoMovieExternalModelBytes.d.ts +2 -11
  22. package/lib/inspectAutoMovieExternalModelBytes.js.map +1 -1
  23. package/lib/internal/collectExternalResources.d.ts +1 -1
  24. package/lib/internal/collectExternalResources.js.map +1 -1
  25. package/lib/internal/inspectExternalMotion.d.ts +1 -1
  26. package/lib/internal/inspectExternalMotion.js.map +1 -1
  27. package/lib/internal/inspectExternalMotionNodes.d.ts +1 -1
  28. package/lib/internal/inspectExternalMotionNodes.js.map +1 -1
  29. package/lib/internal/validatePayloadClosure.d.ts +2 -1
  30. package/lib/internal/validatePayloadClosure.js.map +1 -1
  31. package/lib/isAutoMovieExternalModelIngestProfile.d.ts +1 -1
  32. package/lib/isAutoMovieExternalModelIngestProfile.js.map +1 -1
  33. package/package.json +6 -6
  34. package/src/AUTOMOVIE_GLTF_MOTION_INTERPRETATION_PROFILE.ts +1 -1
  35. package/src/AUTO_MOVIE_EXTERNAL_MODEL_INGEST_PROFILES.ts +1 -1
  36. package/src/adoptAutoMovieExternalMotion.ts +52 -38
  37. package/src/audio/decodeProductionAudioAsset.ts +6 -20
  38. package/src/audio/index.ts +0 -3
  39. package/src/decodeAutoMoviePpmImage.ts +9 -13
  40. package/src/humanoidSkeleton.ts +18 -5
  41. package/src/index.ts +0 -14
  42. package/src/ingestDocument.ts +1 -1
  43. package/src/inspectAutoMovieExternalModelBytes.ts +12 -29
  44. package/src/internal/collectExternalResources.ts +2 -1
  45. package/src/internal/inspectExternalMotion.ts +6 -3
  46. package/src/internal/inspectExternalMotionNodes.ts +2 -1
  47. package/src/internal/validatePayloadClosure.ts +4 -2
  48. package/src/isAutoMovieExternalModelIngestProfile.ts +2 -1
  49. package/lib/AutoMovieExternalModelIngestProfile.d.ts +0 -11
  50. package/lib/AutoMovieExternalModelIngestProfile.js +0 -3
  51. package/lib/AutoMovieExternalModelIngestProfile.js.map +0 -1
  52. package/lib/AutoMovieExternalMotionAdoptionDecision.d.ts +0 -11
  53. package/lib/AutoMovieExternalMotionAdoptionDecision.js +0 -3
  54. package/lib/AutoMovieExternalMotionAdoptionDecision.js.map +0 -1
  55. package/lib/AutoMovieGltfMotionInterpretationProfile.d.ts +0 -9
  56. package/lib/AutoMovieGltfMotionInterpretationProfile.js +0 -3
  57. package/lib/AutoMovieGltfMotionInterpretationProfile.js.map +0 -1
  58. package/lib/IAutoMovieExternalModelInspection.d.ts +0 -48
  59. package/lib/IAutoMovieExternalModelInspection.js +0 -3
  60. package/lib/IAutoMovieExternalModelInspection.js.map +0 -1
  61. package/lib/IAutoMovieExternalModelResource.d.ts +0 -18
  62. package/lib/IAutoMovieExternalModelResource.js +0 -3
  63. package/lib/IAutoMovieExternalModelResource.js.map +0 -1
  64. package/lib/IAutoMovieExternalMotionAdoption.d.ts +0 -23
  65. package/lib/IAutoMovieExternalMotionAdoption.js +0 -3
  66. package/lib/IAutoMovieExternalMotionAdoption.js.map +0 -1
  67. package/lib/IAutoMovieExternalMotionBoneMapping.d.ts +0 -15
  68. package/lib/IAutoMovieExternalMotionBoneMapping.js +0 -3
  69. package/lib/IAutoMovieExternalMotionBoneMapping.js.map +0 -1
  70. package/lib/IAutoMovieExternalMotionInspection.d.ts +0 -25
  71. package/lib/IAutoMovieExternalMotionInspection.js +0 -3
  72. package/lib/IAutoMovieExternalMotionInspection.js.map +0 -1
  73. package/lib/IAutoMovieExternalMotionNativeDecision.d.ts +0 -20
  74. package/lib/IAutoMovieExternalMotionNativeDecision.js +0 -3
  75. package/lib/IAutoMovieExternalMotionNativeDecision.js.map +0 -1
  76. package/lib/IAutoMovieExternalMotionNativeHandoff.d.ts +0 -18
  77. package/lib/IAutoMovieExternalMotionNativeHandoff.js +0 -3
  78. package/lib/IAutoMovieExternalMotionNativeHandoff.js.map +0 -1
  79. package/lib/IAutoMovieExternalMotionNodeInspection.d.ts +0 -21
  80. package/lib/IAutoMovieExternalMotionNodeInspection.js +0 -3
  81. package/lib/IAutoMovieExternalMotionNodeInspection.js.map +0 -1
  82. package/lib/IAutoMovieExternalMotionRetargetDecision.d.ts +0 -24
  83. package/lib/IAutoMovieExternalMotionRetargetDecision.js +0 -3
  84. package/lib/IAutoMovieExternalMotionRetargetDecision.js.map +0 -1
  85. package/lib/IAutoMovieExternalMotionRetargetHandoff.d.ts +0 -22
  86. package/lib/IAutoMovieExternalMotionRetargetHandoff.js +0 -3
  87. package/lib/IAutoMovieExternalMotionRetargetHandoff.js.map +0 -1
  88. package/lib/IAutoMovieExternalMotionSource.d.ts +0 -18
  89. package/lib/IAutoMovieExternalMotionSource.js +0 -3
  90. package/lib/IAutoMovieExternalMotionSource.js.map +0 -1
  91. package/lib/IAutoMovieIngestResult.d.ts +0 -17
  92. package/lib/IAutoMovieIngestResult.js +0 -3
  93. package/lib/IAutoMovieIngestResult.js.map +0 -1
  94. package/lib/audio/IAutoMovieDecodedProductionAudioAsset.d.ts +0 -28
  95. package/lib/audio/IAutoMovieDecodedProductionAudioAsset.js +0 -3
  96. package/lib/audio/IAutoMovieDecodedProductionAudioAsset.js.map +0 -1
  97. package/lib/audio/IAutoMovieProductionAudioProcessing.d.ts +0 -18
  98. package/lib/audio/IAutoMovieProductionAudioProcessing.js +0 -3
  99. package/lib/audio/IAutoMovieProductionAudioProcessing.js.map +0 -1
  100. package/lib/audio/IAutoMovieProductionWaveSourceFormat.d.ts +0 -39
  101. package/lib/audio/IAutoMovieProductionWaveSourceFormat.js +0 -3
  102. package/lib/audio/IAutoMovieProductionWaveSourceFormat.js.map +0 -1
  103. package/src/AutoMovieExternalModelIngestProfile.ts +0 -15
  104. package/src/AutoMovieExternalMotionAdoptionDecision.ts +0 -14
  105. package/src/AutoMovieGltfMotionInterpretationProfile.ts +0 -10
  106. package/src/IAutoMovieExternalModelInspection.ts +0 -62
  107. package/src/IAutoMovieExternalModelResource.ts +0 -20
  108. package/src/IAutoMovieExternalMotionAdoption.ts +0 -30
  109. package/src/IAutoMovieExternalMotionBoneMapping.ts +0 -17
  110. package/src/IAutoMovieExternalMotionInspection.ts +0 -32
  111. package/src/IAutoMovieExternalMotionNativeDecision.ts +0 -25
  112. package/src/IAutoMovieExternalMotionNativeHandoff.ts +0 -22
  113. package/src/IAutoMovieExternalMotionNodeInspection.ts +0 -26
  114. package/src/IAutoMovieExternalMotionRetargetDecision.ts +0 -31
  115. package/src/IAutoMovieExternalMotionRetargetHandoff.ts +0 -28
  116. package/src/IAutoMovieExternalMotionSource.ts +0 -20
  117. package/src/IAutoMovieIngestResult.ts +0 -19
  118. package/src/audio/IAutoMovieDecodedProductionAudioAsset.ts +0 -35
  119. package/src/audio/IAutoMovieProductionAudioProcessing.ts +0 -21
  120. package/src/audio/IAutoMovieProductionWaveSourceFormat.ts +0 -50
@@ -1,14 +0,0 @@
1
- import type { IAutoMovieExternalMotionNativeDecision } from "./IAutoMovieExternalMotionNativeDecision";
2
- import type { IAutoMovieExternalMotionRetargetDecision } from "./IAutoMovieExternalMotionRetargetDecision";
3
-
4
- /**
5
- * How the author uses one inspected take: replayed on its own rig, or retargeted onto a target rig by the engine later.
6
- *
7
- * @evidence contracts/development/design.md#principled-representation A discriminated union on `mode` lets TypeScript narrow the retarget-only fields, and adoption checks the discriminant at run time for untyped callers.
8
- * @evidence contracts/development/design.md#minimal-and-owned-surface The alias names the two supported uses in one place so adoption's parameter and the receipt's `mode` field derive from it.
9
- * @evidence contracts/development/design.md#prohibited-design-shortcuts Only the two declared modes exist; adoption throws on any other discriminant instead of defaulting to native playback.
10
- * @evidence contracts/development/common.md#meaningful-documentation The comment states what each arm means for the take: replay on its own rig or a later engine retarget.
11
- */
12
- export type AutoMovieExternalMotionAdoptionDecision =
13
- | IAutoMovieExternalMotionNativeDecision
14
- | IAutoMovieExternalMotionRetargetDecision;
@@ -1,10 +0,0 @@
1
- /**
2
- * Fixed metre, right-handed and Y-up meaning of normalized glTF motion.
3
- *
4
- * @evidence contracts/development/design.md#principled-representation One literal names the spatial interpretation glTF motion inspection applies without coordinate conversion.
5
- * @evidence contracts/development/design.md#minimal-and-owned-surface A dedicated type keeps the public runtime constant precisely typed without duplicating its interpretation choices.
6
- * @evidence contracts/development/design.md#prohibited-design-shortcuts The union admits no unannounced axis/unit convention or inferred scale from rig names.
7
- * @evidence contracts/development/common.md#meaningful-documentation The declaration identifies units, handedness and vertical axis for every imported track and node.
8
- */
9
- export type AutoMovieGltfMotionInterpretationProfile =
10
- "gltf-2.0-meter-right-handed-y-up";
@@ -1,62 +0,0 @@
1
- import type { AutoMovieHumanoidBone } from "@automovie/interface";
2
-
3
- import type { AutoMovieExternalModelIngestProfile } from "./AutoMovieExternalModelIngestProfile";
4
- import type { IAutoMovieExternalModelResource } from "./IAutoMovieExternalModelResource";
5
- import type { IAutoMovieExternalMotionInspection } from "./IAutoMovieExternalMotionInspection";
6
-
7
- /**
8
- * Byte-level facts the external-model builder accepts before materializing a source.
9
- *
10
- * Inspection is synchronous because the production builder already holds the exact resident bytes and must reject violations of its selected structural/profile contract before anything is built from them. It does not certify complete glTF validity or image media decoding. Hosts still construct the render mesh with their own loader from the same content-addressed asset; these facts only gate it.
11
- *
12
- * @evidence contracts/development/design.md#principled-representation The record reports only facts read from the declared JSON and checked against resident bytes: counts of the top-level arrays, the extension union, sidecar URIs, profile-proved humanoid slots with weight usage, and motion takes when the motion profile ran.
13
- * @evidence contracts/development/design.md#minimal-and-owned-surface One inspection result serves every profile, with `humanoidBones` empty and `motion` absent where a profile does not compute them, so the production inventory reads one shape.
14
- * @evidence contracts/development/design.md#prohibited-design-shortcuts `format` is a family label: a `.vrm` suffix or declared VRM extension produces `vrm`, while `vrm-humanoid-v1` separately checks VRM metadata; the label alone certifies no rig.
15
- * @evidence contracts/development/common.md#meaningful-documentation The comments state why inspection is synchronous, that hosts still load the render mesh themselves, how `format` is decided, the order of `extensions` and `resources`, how each profile fills `humanoidBones`, and when `motion` is present.
16
- */
17
- export interface IAutoMovieExternalModelInspection {
18
- /** Profile the caller selected and the inspection enforced. */
19
- profile: AutoMovieExternalModelIngestProfile;
20
-
21
- /** Container family: `vrm` for a `.vrm` suffix or an extension union containing `VRM` or `VRMC_vrm`, otherwise `gltf` or `glb` by suffix; this label alone does not prove VRM metadata. */
22
- format: "gltf" | "glb" | "vrm";
23
-
24
- /** GlTF asset version; only 2.0 is accepted. */
25
- version: "2.0";
26
-
27
- /** Lengths of the declared top-level arrays; an absent array counts zero. */
28
- counts: {
29
- /** Number of `nodes` entries. */
30
- nodes: number;
31
-
32
- /** Number of `meshes` entries. */
33
- meshes: number;
34
-
35
- /** Number of `skins` entries. */
36
- skins: number;
37
-
38
- /** Number of `animations` entries, read even when no motion is inspected. */
39
- animations: number;
40
- };
41
-
42
- /** Union of `extensionsUsed` and the root `extensions` keys, deduplicated and sorted in code-unit order. */
43
- extensions: string[];
44
-
45
- /** Sidecar buffers and images, one entry per distinct URI, sorted by URI in code-unit order. */
46
- resources: IAutoMovieExternalModelResource[];
47
-
48
- /** Humanoid slots the profile proved, empty for the static and motion profiles. `gltf-humanoid-v1` lists skin joints in node order whose names map to a slot, first node per slot; `vrm-humanoid-v1` lists the VRM declaration, with VRM 0.x thumb names migrated to their VRM 1.0 slots. */
49
- humanoidBones: Array<{
50
- /** Normalized humanoid slot. */
51
- bone: AutoMovieHumanoidBone;
52
-
53
- /** Zero-based index of the node carrying the slot. */
54
- node: number;
55
-
56
- /** Whether some skinned vertex gives this joint a positive weight. */
57
- weighted: boolean;
58
- }>;
59
-
60
- /** Normalized takes; present only under `gltf-motion-v1`. */
61
- motion?: IAutoMovieExternalMotionInspection;
62
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * One external URI whose resident bytes the builder must bind before ingest.
3
- *
4
- * Data URIs are decoded in place and never listed; only a URI that names a sidecar file appears here.
5
- *
6
- * @evidence contracts/development/design.md#principled-representation A resource is keyed by its exact declared URI and role, the two facts the builder needs to bind manifest-owned bytes, and a buffer keeps its glTF `byteLength` because the resolved bytes must match it.
7
- * @evidence contracts/development/design.md#minimal-and-owned-surface Buffers and images share one record discriminated by `kind`, since both resolve through the same `resolveResource` seam.
8
- * @evidence contracts/development/design.md#prohibited-design-shortcuts Data URIs are excluded rather than listed as resolvable, and an image carries `null` instead of an invented length.
9
- * @evidence contracts/development/common.md#meaningful-documentation The comments state that only sidecar URIs appear, that the URI is undecoded, which array declares each kind, and why an image has no length.
10
- */
11
- export interface IAutoMovieExternalModelResource {
12
- /** URI exactly as the glTF declares it, unresolved and undecoded. */
13
- uri: string;
14
-
15
- /** Whether a `buffers` or an `images` entry declares the URI. */
16
- kind: "buffer" | "image";
17
-
18
- /** Declared `byteLength` of a buffer, which the resolved bytes must equal; `null` for an image, which glTF gives no length. */
19
- byteLength: number | null;
20
- }
@@ -1,30 +0,0 @@
1
- import type { IAutoMovieClip } from "@automovie/interface";
2
-
3
- import type { AutoMovieExternalMotionAdoptionDecision } from "./AutoMovieExternalMotionAdoptionDecision";
4
- import type { IAutoMovieExternalMotionNativeHandoff } from "./IAutoMovieExternalMotionNativeHandoff";
5
- import type { IAutoMovieExternalMotionRetargetHandoff } from "./IAutoMovieExternalMotionRetargetHandoff";
6
- import type { IAutoMovieExternalMotionSource } from "./IAutoMovieExternalMotionSource";
7
-
8
- /**
9
- * Receipt connecting one byte-pinned take to native playback or a later engine retarget pass. It copies everything it holds, so mutating it never changes the inspection or the decision it came from.
10
- *
11
- * @evidence contracts/development/design.md#principled-representation The receipt pairs the byte identity with a deep copy of the chosen take and its handoff, so later stages work from a snapshot that mutation of the inspection or decision cannot alter.
12
- * @evidence contracts/development/design.md#minimal-and-owned-surface The producer repeats `handoff.mode` as top-level `mode` for inventory branching; the independent union fields do not statically correlate, so manually supplied receipts need admission.
13
- * @evidence contracts/development/design.md#prohibited-design-shortcuts The producer copies the selected take and declared decision fields after its mapped-basis checks; the type does not certify every unmapped rig field or authenticate externally constructed receipts.
14
- * @evidence contracts/development/common.md#meaningful-documentation The comments state that every member is a copy, that the take keeps source track order, and which consumer each handoff arm feeds.
15
- */
16
- export interface IAutoMovieExternalMotionAdoption {
17
- /** Copy of the source identity that was checked against the inspection. */
18
- source: IAutoMovieExternalMotionSource;
19
-
20
- /** The decision's mode, repeated by `handoff.mode`. */
21
- mode: AutoMovieExternalMotionAdoptionDecision["mode"];
22
-
23
- /** Deep copy of the selected take with its tracks in source order. */
24
- take: IAutoMovieClip;
25
-
26
- /** Mode-specific inputs for the builder or the retarget pass. */
27
- handoff:
28
- | IAutoMovieExternalMotionNativeHandoff
29
- | IAutoMovieExternalMotionRetargetHandoff;
30
- }
@@ -1,17 +0,0 @@
1
- import type { AutoMovieHumanoidBone } from "@automovie/interface";
2
-
3
- /**
4
- * One author-declared correspondence between an inspected node and a humanoid bone of the source rig.
5
- *
6
- * @evidence contracts/development/design.md#principled-representation A mapping row pairs an inspector-issued node id with a humanoid slot, so the correspondence is declared by the author against stable ids rather than inferred from node names.
7
- * @evidence contracts/development/design.md#minimal-and-owned-surface One flat pair per mapped node is the minimum that lets both decisions and both handoffs share the same element type.
8
- * @evidence contracts/development/design.md#prohibited-design-shortcuts The row carries no alias or fuzzy-match field; adoption refuses an unknown node, a bone the rig lacks, and any repeated node or bone.
9
- * @evidence contracts/development/common.md#meaningful-documentation The property comments give the node id form, that it must exist in the inspection, and that each bone and node maps at most once.
10
- */
11
- export interface IAutoMovieExternalMotionBoneMapping {
12
- /** Inspected node id such as `node_3`; it must exist in the inspection. */
13
- node: string;
14
-
15
- /** Source-rig bone the node plays; each bone and node maps at most once. */
16
- bone: AutoMovieHumanoidBone;
17
- }
@@ -1,32 +0,0 @@
1
- import type { IAutoMovieClip } from "@automovie/interface";
2
-
3
- import { AUTOMOVIE_GLTF_MOTION_INTERPRETATION_PROFILE } from "./AUTOMOVIE_GLTF_MOTION_INTERPRETATION_PROFILE";
4
- import type { IAutoMovieExternalMotionNodeInspection } from "./IAutoMovieExternalMotionNodeInspection";
5
-
6
- /**
7
- * Animation facts normalized from one exact glTF, GLB or VRM byte revision.
8
- *
9
- * @evidence contracts/development/design.md#principled-representation Takes are rewritten from FLOAT accessors to node tracks with exact copied keyframes under one declared spatial interpretation, so motion data is reproducible from the bytes alone.
10
- * @evidence contracts/development/design.md#minimal-and-owned-surface `nodeIds` duplicates the node ids as a plain list because mapping authors and the inventory consume the list without the transforms.
11
- * @evidence contracts/development/design.md#prohibited-design-shortcuts The literal constrains typed producers to one declared convention; the inspector emits it and adoption checks it at runtime, while this erased interface alone cannot authenticate externally supplied transforms or their units.
12
- * @evidence contracts/development/common.md#meaningful-documentation The comments state that the path and length repeat for adoption checks, the length excludes sidecars, and how takes are ordered, named, timed and flagged as non-looping.
13
- */
14
- export interface IAutoMovieExternalMotionInspection {
15
- /** Path whose suffix selected the decoder, repeated for adoption checks. */
16
- path: string;
17
-
18
- /** Length of the inspected container bytes, excluding sidecars. */
19
- byteLength: number;
20
-
21
- /** The fixed interpretation every node and track is read under. */
22
- interpretation: typeof AUTOMOVIE_GLTF_MOTION_INTERPRETATION_PROFILE;
23
-
24
- /** Every node in source order with its hierarchy and rest basis. */
25
- nodes: IAutoMovieExternalMotionNodeInspection[];
26
-
27
- /** The node ids in source order, for an explicit source-rig mapping. */
28
- nodeIds: string[];
29
-
30
- /** One clip `clip_{index}` per animation in source order, its tracks in channel order with FLOAT keyframes copied exactly, duration the latest keyframe time, and `loop` false. */
31
- takes: IAutoMovieClip[];
32
- }
@@ -1,25 +0,0 @@
1
- import type { IAutoMovieSkeleton } from "@automovie/interface";
2
-
3
- import type { IAutoMovieExternalMotionBoneMapping } from "./IAutoMovieExternalMotionBoneMapping";
4
-
5
- /**
6
- * Native use replays the inspected node tracks on the source rig the author declares; ingest infers no rig and matches no names.
7
- *
8
- * @evidence contracts/development/design.md#principled-representation Native use needs only the take, the author's source rig and the mapping, because the tracks replay on the rig the bytes describe and nothing is converted between skeletons.
9
- * @evidence contracts/development/design.md#minimal-and-owned-surface The native arm repeats the three shared fields rather than extending a base type, keeping each arm readable on its own at the cost of three duplicated property declarations.
10
- * @evidence contracts/development/design.md#prohibited-design-shortcuts The rig is not trusted blindly: adoption recomputes each mapped bone's parent and rest from the inspected nodes and requires exact equality.
11
- * @evidence contracts/development/common.md#meaningful-documentation The property comments state the take id form, the rig's id, uniqueness, hips and exact-basis requirements, and that the mapping must cover every animated node.
12
- */
13
- export interface IAutoMovieExternalMotionNativeDecision {
14
- /** Mode discriminator. */
15
- mode: "native";
16
-
17
- /** Inspected take id such as `clip_0`. */
18
- take: string;
19
-
20
- /** Source skeleton with a non-blank id, unique bones including `hips`, and, for every mapped bone, the parent and rest the inspected hierarchy implies with exact number equality. */
21
- sourceRig: IAutoMovieSkeleton;
22
-
23
- /** Non-empty node-to-bone mapping that covers every node the take animates; ingest never derives it from names. */
24
- mapping: IAutoMovieExternalMotionBoneMapping[];
25
- }
@@ -1,22 +0,0 @@
1
- import type { IAutoMovieSkeleton } from "@automovie/interface";
2
-
3
- import type { IAutoMovieExternalMotionBoneMapping } from "./IAutoMovieExternalMotionBoneMapping";
4
-
5
- /**
6
- * Validated inputs a native adoption hands to the motion builder, which still decides whether the take's interpolation and channel coverage can become clinical motion.
7
- *
8
- * @evidence contracts/development/design.md#principled-representation The handoff carries a rig whose mapped bones matched the inspected basis and a node-sorted mapping, a canonical order that makes two receipts for the same decision compare equal regardless of the author's row order.
9
- * @evidence contracts/development/design.md#minimal-and-owned-surface A separate handoff type keeps the builder's input apart from the author's decision, so the builder never sees the unvalidated take id field.
10
- * @evidence contracts/development/design.md#prohibited-design-shortcuts The handoff states that interpolation and channel coverage remain the builder's decision instead of claiming ingest proved the take convertible.
11
- * @evidence contracts/development/common.md#meaningful-documentation The comments state that the rig is a deep copy and that the mapping is sorted by node id in code-unit order.
12
- */
13
- export interface IAutoMovieExternalMotionNativeHandoff {
14
- /** Mode discriminator. */
15
- mode: "native";
16
-
17
- /** Deep copy of the decision's source rig, sharing nothing with it. */
18
- sourceRig: IAutoMovieSkeleton;
19
-
20
- /** Copy of the decision's mapping sorted by node id in code-unit order. */
21
- mapping: IAutoMovieExternalMotionBoneMapping[];
22
- }
@@ -1,26 +0,0 @@
1
- import type { IAutoMovieTransform } from "@automovie/interface";
2
-
3
- /**
4
- * One node of a motion source with the local rest basis read from its bytes.
5
- *
6
- * @evidence contracts/development/design.md#principled-representation Each node carries its index-derived id, parent id and a canonical local TRS with glTF defaults, rotation renormalized after a tolerance check, which is the basis motion adoption recomputes rest poses from.
7
- * @evidence contracts/development/design.md#minimal-and-owned-surface The record keeps both the stable id and the raw index so tracks and mappings cite ids while diagnostics can still name the source index.
8
- * @evidence contracts/development/design.md#prohibited-design-shortcuts A node matrix is refused rather than decomposed; omitted TRS fields receive glTF defaults and admitted rotation components are renormalized, so these records preserve the declared interpretation rather than the exact original rotation numbers.
9
- * @evidence contracts/development/common.md#meaningful-documentation The comments give the id form, the index base, the name and parent null cases, and every normalization the transform received.
10
- */
11
- export interface IAutoMovieExternalMotionNodeInspection {
12
- /** `node_{index}`, the id tracks and source-rig mappings cite. */
13
- id: string;
14
-
15
- /** Zero-based node index in the inspected glTF revision. */
16
- index: number;
17
-
18
- /** Declared name when non-empty, otherwise `null`. */
19
- name: string | null;
20
-
21
- /** Id of the node listing this one as a child, or `null` for a root. */
22
- parent: string | null;
23
-
24
- /** Parent-local rest TRS with glTF defaults for absent fields, finite components, positive scale, and the rotation renormalized to unit length after a 1e-4 magnitude tolerance check. */
25
- transform: IAutoMovieTransform;
26
- }
@@ -1,31 +0,0 @@
1
- import type { IAutoMovieSkeleton } from "@automovie/interface";
2
-
3
- import type { IAutoMovieExternalMotionBoneMapping } from "./IAutoMovieExternalMotionBoneMapping";
4
-
5
- /**
6
- * Retarget use declares the source rig, the mapping and the target identity, so the engine pass that later retargets the take guesses none of them.
7
- *
8
- * @evidence contracts/development/design.md#principled-representation Retargeting additionally needs a root translation multiplier and a target identity, the two inputs a skeleton-to-skeleton transfer cannot derive from the source bytes.
9
- * @evidence contracts/development/design.md#minimal-and-owned-surface The retarget arm is the native arm plus exactly those two fields, so the union's narrowing exposes them only where they apply.
10
- * @evidence contracts/development/design.md#prohibited-design-shortcuts Ingest validates the multiplier and target spelling but never resolves the target or picks a default scale, leaving both explicit for the engine pass.
11
- * @evidence contracts/development/common.md#meaningful-documentation The added properties state the finite-positive range of the multiplier and that the target is resolved after ingest.
12
- */
13
- export interface IAutoMovieExternalMotionRetargetDecision {
14
- /** Mode discriminator. */
15
- mode: "retarget";
16
-
17
- /** Inspected take id such as `clip_0`. */
18
- take: string;
19
-
20
- /** Source skeleton with a non-blank id, unique bones including `hips`, and, for every mapped bone, the parent and rest the inspected hierarchy implies with exact number equality. */
21
- sourceRig: IAutoMovieSkeleton;
22
-
23
- /** Non-empty node-to-bone mapping that covers every node the take animates; ingest never derives it from names. */
24
- mapping: IAutoMovieExternalMotionBoneMapping[];
25
-
26
- /** Multiplier for source root translation; finite and positive. */
27
- translationScale: number;
28
-
29
- /** Non-blank target rig or actor identity, resolved after ingest. */
30
- target: string;
31
- }
@@ -1,28 +0,0 @@
1
- import type { IAutoMovieSkeleton } from "@automovie/interface";
2
-
3
- import type { IAutoMovieExternalMotionBoneMapping } from "./IAutoMovieExternalMotionBoneMapping";
4
-
5
- /**
6
- * Inputs copied after adoption's mapped-basis and retarget-field checks; the engine-owned retarget pass still admits source conversion and source-target compatibility.
7
- *
8
- * @evidence contracts/development/design.md#principled-representation Besides the copied rig and sorted mapping, the retarget handoff forwards the validated multiplier and target unchanged, which is all the engine retarget pass needs from ingest.
9
- * @evidence contracts/development/design.md#minimal-and-owned-surface Its fields mirror the retarget decision minus the take id, so the receipt's take field is the single place the selected clip lives.
10
- * @evidence contracts/development/design.md#prohibited-design-shortcuts The documentation keeps source conversion and source-target compatibility as downstream checks rather than implying ingest performed them.
11
- * @evidence contracts/development/common.md#meaningful-documentation The property comments say which values were checked, finite-positive scale and non-blank target, and that the target is not resolved here.
12
- */
13
- export interface IAutoMovieExternalMotionRetargetHandoff {
14
- /** Mode discriminator. */
15
- mode: "retarget";
16
-
17
- /** Deep copy of the decision's source rig, sharing nothing with it. */
18
- sourceRig: IAutoMovieSkeleton;
19
-
20
- /** Copy of the decision's mapping sorted by node id in code-unit order. */
21
- mapping: IAutoMovieExternalMotionBoneMapping[];
22
-
23
- /** The decision's multiplier, checked finite and positive. */
24
- translationScale: number;
25
-
26
- /** The decision's target identity, checked non-blank but not resolved. */
27
- target: string;
28
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * Manifest-owned identity of the exact external motion bytes the author chose.
3
- *
4
- * Adoption compares path and byte length with the inspection and checks digest spelling. The digest remains the manifest owner's claim: equal path and length alone do not prove equal byte content, so that owner must bind the digest to the resident bytes before inspection.
5
- *
6
- * @evidence contracts/development/design.md#principled-representation Manifest path, digest and length identify the declared source; adoption proves path/length agreement and digest syntax, while digest-to-resident-byte binding remains the inventory caller's responsibility.
7
- * @evidence contracts/development/design.md#minimal-and-owned-surface The identity is its own record because the production inventory builds it from the manifest independently of the inspection, and the adoption copies it unchanged into the receipt.
8
- * @evidence contracts/development/design.md#prohibited-design-shortcuts Ingest never hashes the bytes itself; the digest format is checked and the hash stays the manifest's claim, which the documentation does not overstate as verified.
9
- * @evidence contracts/development/common.md#meaningful-documentation Each property states the constraint adoption enforces on it: non-blank and equal path, the `sha256:` digest spelling, and a positive safe-integer length equal to the inspection's.
10
- */
11
- export interface IAutoMovieExternalMotionSource {
12
- /** Manifest path; it must be non-blank and equal the inspected path. */
13
- path: string;
14
-
15
- /** `sha256:` plus 64 lowercase hex digits, pinned by the production manifest. */
16
- digest: string;
17
-
18
- /** Resident byte count; a positive safe integer equal to the inspected one. */
19
- byteLength: number;
20
- }
@@ -1,19 +0,0 @@
1
- import type { IAutoMovieClip, IAutoMovieNode } from "@automovie/interface";
2
-
3
- /**
4
- * The core node graph and clips one parsed glTF/GLB document maps to.
5
- *
6
- * Ids are positional: node `node_{i}` is the document's `i`-th node, clip `clip_{i}` its `i`-th animation, and mesh, camera and skin references are the decimal index of that resource in its root list. The ids are therefore stable for one document revision and never collide when names repeat, but they do not survive a re-export that reorders the lists.
7
- *
8
- * @evidence contracts/development/design.md#principled-representation Positional ids follow glTF's own index-based references, so a node, clip, mesh, camera or skin id equals its index in the document's lists and cross-references resolve without name lookup.
9
- * @evidence contracts/development/design.md#minimal-and-owned-surface The result is the two lists the engine already consumes, nodes and clips, with no wrapper around either.
10
- * @evidence contracts/development/design.md#prohibited-design-shortcuts The documentation states that positional ids do not survive a re-export that reorders the lists rather than presenting them as content identity.
11
- * @evidence contracts/development/common.md#meaningful-documentation The comments give the id scheme for every referenced resource, the parent meaning of each node, and the order, looping and duration meaning of each clip.
12
- */
13
- export interface IAutoMovieIngestResult {
14
- /** Every glTF node in document order as a core node whose `parent` names the node that lists it as a child, or `null` for a root. */
15
- nodes: IAutoMovieNode[];
16
-
17
- /** One non-looping clip per glTF animation in document order, its tracks in channel order and its duration the latest keyframe time in seconds. */
18
- clips: IAutoMovieClip[];
19
- }
@@ -1,35 +0,0 @@
1
- import type { IAutoMovieProductionAudioProcessing } from "./IAutoMovieProductionAudioProcessing";
2
- import type { IAutoMovieProductionWaveSourceFormat } from "./IAutoMovieProductionWaveSourceFormat";
3
-
4
- /**
5
- * One decoded WAVE source: its declared facts, the processing applied, and mono samples available to a caller's mixer.
6
- *
7
- * The `source*` facts and `durationSeconds` describe the file before downmix and resampling, because a render plan records them as the asset's identity; only `samples` and `processing` describe the output. Reporting the output as the source would let a resampled asset claim the plan's rate and hide a duration disagreement.
8
- *
9
- * @evidence contracts/development/design.md#principled-representation Source envelope facts, processing lineage and sample storage remain separate so consumers can compare declared source/output relationships. The Float32Array carries no rate metadata and this record cannot independently prove that its samples were generated at the declared rate.
10
- * @evidence contracts/development/design.md#minimal-and-owned-surface Source facts, processing and samples are three named parts of one decoder result instead of separate return paths, and the render package reuses the two nested types as its wave identity.
11
- * @evidence contracts/development/design.md#prohibited-design-shortcuts The decoder fills repeated source fields and `sourceFormat` from the same parsed values; this structural type neither correlates independently supplied records nor authenticates mutable sample bytes.
12
- * @evidence contracts/development/common.md#meaningful-documentation The comments state which fields describe the file and which the output, the units of rate and duration, and that samples are finite mono values at the requested rate.
13
- */
14
- export interface IAutoMovieDecodedProductionAudioAsset {
15
- /** Source rate in samples per second, before resampling. */
16
- sourceSampleRate: number;
17
-
18
- /** Source channel count, 1 or 2, before the mono downmix. */
19
- sourceChannels: number;
20
-
21
- /** Number of complete sample frames in the source `data` chunk. */
22
- sourceFrames: number;
23
-
24
- /** Source runtime in seconds, `sourceFrames / sourceSampleRate`. */
25
- durationSeconds: number;
26
-
27
- /** The file's own format declaration as parsed. */
28
- sourceFormat: IAutoMovieProductionWaveSourceFormat;
29
-
30
- /** The downmix and resampling applied to produce `samples`. */
31
- processing: IAutoMovieProductionAudioProcessing;
32
-
33
- /** Finite mono samples in [-1, 1] for PCM sources at `processing.outputSampleRate`; a new buffer the caller owns. */
34
- samples: Float32Array;
35
- }
@@ -1,21 +0,0 @@
1
- /**
2
- * The deterministic conversion `decodeProductionAudioAsset` applied to turn a WAVE source into mono mixer input, recorded so a render plan can check it against the source format it claims.
3
- *
4
- * @evidence contracts/development/design.md#principled-representation Stage kind, downmix coefficients and requested output rate let the render identity validator compare declared processing with source channels and rate; the record does not prove sample contents or specify a general resampling algorithm independently of the decoder.
5
- * @evidence contracts/development/design.md#minimal-and-owned-surface One flat record names the stage combination and its parameters; the render package's wave identity validator reads these four fields and nothing else.
6
- * @evidence contracts/development/design.md#prohibited-design-shortcuts Literal channel and stage vocabulary constrain names, but independent fields and numeric arrays do not enforce stage/rate/matrix correlation; the decoder produces those relations and the render wave-identity validator checks them.
7
- * @evidence contracts/development/common.md#meaningful-documentation The comments give the stage order, the output channel and rate meaning, and the row-by-column orientation and only values of the downmix matrix.
8
- */
9
- export interface IAutoMovieProductionAudioProcessing {
10
- /** Stages applied, in source order: `copy` for mono at the target rate, `downmix` for stereo at the target rate, `resample` for mono at another rate, and `downmix-resample` for stereo at another rate. */
11
- kind: "copy" | "downmix" | "resample" | "downmix-resample";
12
-
13
- /** Mixer-facing channel count; the decoder always folds to mono. */
14
- outputChannels: 1;
15
-
16
- /** Output rate in samples per second, the rate the caller requested. */
17
- outputSampleRate: number;
18
-
19
- /** Downmix coefficients with one row per output channel and one column per source channel: `[[1]]` for mono and `[[0.5, 0.5]]` for stereo. */
20
- matrix: readonly (readonly number[])[];
21
- }
@@ -1,50 +0,0 @@
1
- /**
2
- * Exact supported WAVE declaration before processing.
3
- *
4
- * These are the file's own facts, read from its format envelope and never inferred from its channel count: an extensible header names its speakers through `dwChannelMask` and its encoding through the full SubFormat GUID, while a legacy header carries the default mono front-center or stereo front-left/front-right semantics and says so in `layout.source`. The literal unions are the decoder's whole supported subset, so a value outside them was refused rather than recorded.
5
- *
6
- * @evidence contracts/development/design.md#principled-representation Each field mirrors a WAVEFORMATEX or WAVEFORMATEXTENSIBLE field the decoder reads, with the layout source and mask recording whether the speakers came from `dwChannelMask` or from the legacy default.
7
- * @evidence contracts/development/design.md#minimal-and-owned-surface One record keeps the envelope facts apart from the processing lineage, which lets the render plan validate a source identity separately from the conversion applied to it.
8
- * @evidence contracts/development/design.md#prohibited-design-shortcuts Closed unions constrain each vocabulary independently, while numeric ranges and encoding/precision/channel/layout/GUID relations remain producer invariants checked by the decoder and render wave-identity validator, not guarantees of this erased type.
9
- * @evidence contracts/development/common.md#meaningful-documentation The comments state where each fact comes from, which header spelling sets the mask and GUID, and that the literal unions are the supported subset.
10
- */
11
- export interface IAutoMovieProductionWaveSourceFormat {
12
- /** Media-family discriminant; WAVE is the only decoded family. */
13
- kind: "wave";
14
-
15
- /** Format-envelope spelling: `wave-format-ex` for a legacy tag, or `wave-format-extensible` for tag `0xFFFE` with a cbSize of at least 22. */
16
- header: "wave-format-ex" | "wave-format-extensible";
17
-
18
- /** Sample encoding: little-endian signed 16-bit PCM or 32-bit IEEE float. */
19
- encoding: "pcm-s16le" | "float-f32le";
20
-
21
- /** Bits each encoded channel sample occupies (`wBitsPerSample`). */
22
- containerBits: 16 | 32;
23
-
24
- /** Meaningful bits inside the container; `wValidBitsPerSample` for an extensible header, otherwise the container size. Always equal to `containerBits`, since partial precision is refused. */
25
- validBits: 16 | 32;
26
-
27
- /** Source rate in samples per second, before any resampling. */
28
- sampleRate: number;
29
-
30
- /** Source channel count, before the mono downmix. */
31
- channels: 1 | 2;
32
-
33
- /** Ordered speaker semantics and where they were declared. */
34
- layout: {
35
- /** Mono or stereo, matching `channels`. */
36
- kind: "mono" | "stereo";
37
-
38
- /** Speakers in channel order. */
39
- speakers: ["front-center"] | ["front-left", "front-right"];
40
-
41
- /** `channel-mask` when an extensible header declared the speakers, `legacy-default` when a legacy header implied them. */
42
- source: "legacy-default" | "channel-mask";
43
-
44
- /** The declared `dwChannelMask` (`0x4` mono, `0x3` stereo), or `null` for a legacy header, which has none. */
45
- mask: number | null;
46
- };
47
-
48
- /** Lowercase canonical SubFormat GUID text of an extensible header, or `null` for a legacy header, which has none. */
49
- subFormatGuid: string | null;
50
- }