@nodetool-ai/execution 0.8.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 (231) hide show
  1. package/README.md +129 -0
  2. package/dist/.nodetool-build-stamp +1 -0
  3. package/dist/app-debug/app-spec.d.ts +94 -0
  4. package/dist/app-debug/app-spec.d.ts.map +1 -0
  5. package/dist/app-debug/app-spec.js +710 -0
  6. package/dist/app-debug/app-spec.js.map +1 -0
  7. package/dist/app-debug/application-target.d.ts +53 -0
  8. package/dist/app-debug/application-target.d.ts.map +1 -0
  9. package/dist/app-debug/application-target.js +126 -0
  10. package/dist/app-debug/application-target.js.map +1 -0
  11. package/dist/app-debug/bundle-target.d.ts +21 -0
  12. package/dist/app-debug/bundle-target.d.ts.map +1 -0
  13. package/dist/app-debug/bundle-target.js +51 -0
  14. package/dist/app-debug/bundle-target.js.map +1 -0
  15. package/dist/app-debug/graph-shape.d.ts +14 -0
  16. package/dist/app-debug/graph-shape.d.ts.map +1 -0
  17. package/dist/app-debug/graph-shape.js +23 -0
  18. package/dist/app-debug/graph-shape.js.map +1 -0
  19. package/dist/app-debug/index.d.ts +26 -0
  20. package/dist/app-debug/index.d.ts.map +1 -0
  21. package/dist/app-debug/index.js +19 -0
  22. package/dist/app-debug/index.js.map +1 -0
  23. package/dist/app-debug/markdown.d.ts +6 -0
  24. package/dist/app-debug/markdown.d.ts.map +1 -0
  25. package/dist/app-debug/markdown.js +133 -0
  26. package/dist/app-debug/markdown.js.map +1 -0
  27. package/dist/app-debug/runtime.d.ts +267 -0
  28. package/dist/app-debug/runtime.d.ts.map +1 -0
  29. package/dist/app-debug/runtime.js +633 -0
  30. package/dist/app-debug/runtime.js.map +1 -0
  31. package/dist/app-debug/script-operation.d.ts +58 -0
  32. package/dist/app-debug/script-operation.d.ts.map +1 -0
  33. package/dist/app-debug/script-operation.js +44 -0
  34. package/dist/app-debug/script-operation.js.map +1 -0
  35. package/dist/app-debug/simulate.d.ts +85 -0
  36. package/dist/app-debug/simulate.d.ts.map +1 -0
  37. package/dist/app-debug/simulate.js +991 -0
  38. package/dist/app-debug/simulate.js.map +1 -0
  39. package/dist/app-debug/summarize.d.ts +64 -0
  40. package/dist/app-debug/summarize.d.ts.map +1 -0
  41. package/dist/app-debug/summarize.js +65 -0
  42. package/dist/app-debug/summarize.js.map +1 -0
  43. package/dist/app-debug/types.d.ts +343 -0
  44. package/dist/app-debug/types.d.ts.map +1 -0
  45. package/dist/app-debug/types.js +2 -0
  46. package/dist/app-debug/types.js.map +1 -0
  47. package/dist/cost-ledger.d.ts +147 -0
  48. package/dist/cost-ledger.d.ts.map +1 -0
  49. package/dist/cost-ledger.js +288 -0
  50. package/dist/cost-ledger.js.map +1 -0
  51. package/dist/debug/collector.d.ts +28 -0
  52. package/dist/debug/collector.d.ts.map +1 -0
  53. package/dist/debug/collector.js +284 -0
  54. package/dist/debug/collector.js.map +1 -0
  55. package/dist/debug/index.d.ts +15 -0
  56. package/dist/debug/index.d.ts.map +1 -0
  57. package/dist/debug/index.js +16 -0
  58. package/dist/debug/index.js.map +1 -0
  59. package/dist/debug/types.d.ts +179 -0
  60. package/dist/debug/types.d.ts.map +1 -0
  61. package/dist/debug/types.js +11 -0
  62. package/dist/debug/types.js.map +1 -0
  63. package/dist/debug/verdict.d.ts +27 -0
  64. package/dist/debug/verdict.d.ts.map +1 -0
  65. package/dist/debug/verdict.js +51 -0
  66. package/dist/debug/verdict.js.map +1 -0
  67. package/dist/executor-resolver.d.ts +13 -0
  68. package/dist/executor-resolver.d.ts.map +1 -0
  69. package/dist/executor-resolver.js +13 -0
  70. package/dist/executor-resolver.js.map +1 -0
  71. package/dist/fal-output-decoder.d.ts +36 -0
  72. package/dist/fal-output-decoder.d.ts.map +1 -0
  73. package/dist/fal-output-decoder.js +129 -0
  74. package/dist/fal-output-decoder.js.map +1 -0
  75. package/dist/generation-lifecycle.d.ts +54 -0
  76. package/dist/generation-lifecycle.d.ts.map +1 -0
  77. package/dist/generation-lifecycle.js +431 -0
  78. package/dist/generation-lifecycle.js.map +1 -0
  79. package/dist/generation-recovery-worker.d.ts +100 -0
  80. package/dist/generation-recovery-worker.d.ts.map +1 -0
  81. package/dist/generation-recovery-worker.js +995 -0
  82. package/dist/generation-recovery-worker.js.map +1 -0
  83. package/dist/generation-tracker.d.ts +83 -0
  84. package/dist/generation-tracker.d.ts.map +1 -0
  85. package/dist/generation-tracker.js +436 -0
  86. package/dist/generation-tracker.js.map +1 -0
  87. package/dist/index.d.ts +28 -0
  88. package/dist/index.d.ts.map +1 -0
  89. package/dist/index.js +21 -0
  90. package/dist/index.js.map +1 -0
  91. package/dist/js-script-debug/index.d.ts +13 -0
  92. package/dist/js-script-debug/index.d.ts.map +1 -0
  93. package/dist/js-script-debug/index.js +12 -0
  94. package/dist/js-script-debug/index.js.map +1 -0
  95. package/dist/js-script-debug/markdown.d.ts +6 -0
  96. package/dist/js-script-debug/markdown.d.ts.map +1 -0
  97. package/dist/js-script-debug/markdown.js +62 -0
  98. package/dist/js-script-debug/markdown.js.map +1 -0
  99. package/dist/js-script-debug/outputs.d.ts +20 -0
  100. package/dist/js-script-debug/outputs.d.ts.map +1 -0
  101. package/dist/js-script-debug/outputs.js +30 -0
  102. package/dist/js-script-debug/outputs.js.map +1 -0
  103. package/dist/js-script-debug/report.d.ts +15 -0
  104. package/dist/js-script-debug/report.d.ts.map +1 -0
  105. package/dist/js-script-debug/report.js +90 -0
  106. package/dist/js-script-debug/report.js.map +1 -0
  107. package/dist/js-script-debug/types.d.ts +63 -0
  108. package/dist/js-script-debug/types.d.ts.map +1 -0
  109. package/dist/js-script-debug/types.js +10 -0
  110. package/dist/js-script-debug/types.js.map +1 -0
  111. package/dist/js-script-debug/validate.d.ts +38 -0
  112. package/dist/js-script-debug/validate.d.ts.map +1 -0
  113. package/dist/js-script-debug/validate.js +137 -0
  114. package/dist/js-script-debug/validate.js.map +1 -0
  115. package/dist/message-stream.d.ts +33 -0
  116. package/dist/message-stream.d.ts.map +1 -0
  117. package/dist/message-stream.js +58 -0
  118. package/dist/message-stream.js.map +1 -0
  119. package/dist/normalize-graph.d.ts +13 -0
  120. package/dist/normalize-graph.d.ts.map +1 -0
  121. package/dist/normalize-graph.js +63 -0
  122. package/dist/normalize-graph.js.map +1 -0
  123. package/dist/output-names.d.ts +13 -0
  124. package/dist/output-names.d.ts.map +1 -0
  125. package/dist/output-names.js +13 -0
  126. package/dist/output-names.js.map +1 -0
  127. package/dist/predicates.d.ts +6 -0
  128. package/dist/predicates.d.ts.map +1 -0
  129. package/dist/predicates.js +6 -0
  130. package/dist/predicates.js.map +1 -0
  131. package/dist/preflight.d.ts +87 -0
  132. package/dist/preflight.d.ts.map +1 -0
  133. package/dist/preflight.js +139 -0
  134. package/dist/preflight.js.map +1 -0
  135. package/dist/provider-secret-key.d.ts +3 -0
  136. package/dist/provider-secret-key.d.ts.map +1 -0
  137. package/dist/provider-secret-key.js +7 -0
  138. package/dist/provider-secret-key.js.map +1 -0
  139. package/dist/service/app-debug-service.d.ts +78 -0
  140. package/dist/service/app-debug-service.d.ts.map +1 -0
  141. package/dist/service/app-debug-service.js +201 -0
  142. package/dist/service/app-debug-service.js.map +1 -0
  143. package/dist/service/app-run-server.d.ts +28 -0
  144. package/dist/service/app-run-server.d.ts.map +1 -0
  145. package/dist/service/app-run-server.js +104 -0
  146. package/dist/service/app-run-server.js.map +1 -0
  147. package/dist/service/debug-sessions.d.ts +158 -0
  148. package/dist/service/debug-sessions.d.ts.map +1 -0
  149. package/dist/service/debug-sessions.js +358 -0
  150. package/dist/service/debug-sessions.js.map +1 -0
  151. package/dist/service/index.d.ts +22 -0
  152. package/dist/service/index.d.ts.map +1 -0
  153. package/dist/service/index.js +17 -0
  154. package/dist/service/index.js.map +1 -0
  155. package/dist/service/job-progress.d.ts +40 -0
  156. package/dist/service/job-progress.d.ts.map +1 -0
  157. package/dist/service/job-progress.js +53 -0
  158. package/dist/service/job-progress.js.map +1 -0
  159. package/dist/service/workflow-run.d.ts +279 -0
  160. package/dist/service/workflow-run.d.ts.map +1 -0
  161. package/dist/service/workflow-run.js +598 -0
  162. package/dist/service/workflow-run.js.map +1 -0
  163. package/dist/service/workflow-workspace.d.ts +89 -0
  164. package/dist/service/workflow-workspace.d.ts.map +1 -0
  165. package/dist/service/workflow-workspace.js +160 -0
  166. package/dist/service/workflow-workspace.js.map +1 -0
  167. package/dist/session.d.ts +62 -0
  168. package/dist/session.d.ts.map +1 -0
  169. package/dist/session.js +353 -0
  170. package/dist/session.js.map +1 -0
  171. package/dist/sketch-debug/index.d.ts +11 -0
  172. package/dist/sketch-debug/index.d.ts.map +1 -0
  173. package/dist/sketch-debug/index.js +10 -0
  174. package/dist/sketch-debug/index.js.map +1 -0
  175. package/dist/sketch-debug/markdown.d.ts +6 -0
  176. package/dist/sketch-debug/markdown.d.ts.map +1 -0
  177. package/dist/sketch-debug/markdown.js +93 -0
  178. package/dist/sketch-debug/markdown.js.map +1 -0
  179. package/dist/sketch-debug/report.d.ts +15 -0
  180. package/dist/sketch-debug/report.d.ts.map +1 -0
  181. package/dist/sketch-debug/report.js +98 -0
  182. package/dist/sketch-debug/report.js.map +1 -0
  183. package/dist/sketch-debug/types.d.ts +62 -0
  184. package/dist/sketch-debug/types.d.ts.map +1 -0
  185. package/dist/sketch-debug/types.js +10 -0
  186. package/dist/sketch-debug/types.js.map +1 -0
  187. package/dist/sketch-debug/validate.d.ts +14 -0
  188. package/dist/sketch-debug/validate.d.ts.map +1 -0
  189. package/dist/sketch-debug/validate.js +478 -0
  190. package/dist/sketch-debug/validate.js.map +1 -0
  191. package/dist/supervisor.d.ts +45 -0
  192. package/dist/supervisor.d.ts.map +1 -0
  193. package/dist/supervisor.js +97 -0
  194. package/dist/supervisor.js.map +1 -0
  195. package/dist/timeline-debug/index.d.ts +11 -0
  196. package/dist/timeline-debug/index.d.ts.map +1 -0
  197. package/dist/timeline-debug/index.js +10 -0
  198. package/dist/timeline-debug/index.js.map +1 -0
  199. package/dist/timeline-debug/legibility.d.ts +23 -0
  200. package/dist/timeline-debug/legibility.d.ts.map +1 -0
  201. package/dist/timeline-debug/legibility.js +240 -0
  202. package/dist/timeline-debug/legibility.js.map +1 -0
  203. package/dist/timeline-debug/markdown.d.ts +6 -0
  204. package/dist/timeline-debug/markdown.d.ts.map +1 -0
  205. package/dist/timeline-debug/markdown.js +103 -0
  206. package/dist/timeline-debug/markdown.js.map +1 -0
  207. package/dist/timeline-debug/motion.d.ts +20 -0
  208. package/dist/timeline-debug/motion.d.ts.map +1 -0
  209. package/dist/timeline-debug/motion.js +362 -0
  210. package/dist/timeline-debug/motion.js.map +1 -0
  211. package/dist/timeline-debug/report.d.ts +16 -0
  212. package/dist/timeline-debug/report.d.ts.map +1 -0
  213. package/dist/timeline-debug/report.js +100 -0
  214. package/dist/timeline-debug/report.js.map +1 -0
  215. package/dist/timeline-debug/showcase.d.ts +7 -0
  216. package/dist/timeline-debug/showcase.d.ts.map +1 -0
  217. package/dist/timeline-debug/showcase.js +347 -0
  218. package/dist/timeline-debug/showcase.js.map +1 -0
  219. package/dist/timeline-debug/types.d.ts +64 -0
  220. package/dist/timeline-debug/types.d.ts.map +1 -0
  221. package/dist/timeline-debug/types.js +10 -0
  222. package/dist/timeline-debug/types.js.map +1 -0
  223. package/dist/timeline-debug/validate.d.ts +24 -0
  224. package/dist/timeline-debug/validate.d.ts.map +1 -0
  225. package/dist/timeline-debug/validate.js +1432 -0
  226. package/dist/timeline-debug/validate.js.map +1 -0
  227. package/dist/types.d.ts +211 -0
  228. package/dist/types.d.ts.map +1 -0
  229. package/dist/types.js +2 -0
  230. package/dist/types.js.map +1 -0
  231. package/package.json +103 -0
@@ -0,0 +1,362 @@
1
+ import { ANIMATED_PROPERTY_FOLD, CUSTOM_ANIMATION_PRESET_ID, IDENTITY_SAMPLE, compileClipAnimations, getAnimationPreset, normalizeCustomCurves, resolveCustomMask } from "@nodetool-ai/timeline";
2
+ import { clipStaggerCount } from "@nodetool-ai/timeline/scene";
3
+ /** Sub-millisecond slack, so float window math is not reported as a clamp. */
4
+ const EPSILON_MS = 0.5;
5
+ const clipLabel = (clip) => `${clip.name || clip.id}`;
6
+ /**
7
+ * The animations the compiler would actually compile.
8
+ *
9
+ * An unknown preset, a role the preset does not offer and unusable baked curves
10
+ * are all reported by their own codes (`unknown_animation_preset`,
11
+ * `custom_animation_invalid`), and compiling them would additionally print a
12
+ * console warning from inside the engine — noise on a CLI run that has already
13
+ * named the problem. Filtering here keeps one finding per defect.
14
+ */
15
+ function compilableAnimations(clip) {
16
+ const out = [];
17
+ for (const animation of clip.animations ?? []) {
18
+ if (animation.enabled === false)
19
+ continue;
20
+ if (animation.preset === CUSTOM_ANIMATION_PRESET_ID) {
21
+ if (!animation.custom?.curves?.length &&
22
+ (animation.styleTracks?.length || animation.textAnimator)) {
23
+ out.push(animation);
24
+ continue;
25
+ }
26
+ const baked = normalizeCustomCurves(animation.custom?.curves, animation.custom?.timeBase);
27
+ if (!baked.ok)
28
+ continue;
29
+ if (!resolveCustomMask(baked.curves, animation.custom?.mask).ok)
30
+ continue;
31
+ out.push(animation);
32
+ continue;
33
+ }
34
+ const preset = getAnimationPreset(animation.preset);
35
+ if (!preset || !preset.roles.includes(animation.role))
36
+ continue;
37
+ out.push(animation);
38
+ }
39
+ return out;
40
+ }
41
+ function heldInterval(compiled, clipDurationMs) {
42
+ return {
43
+ fromMs: compiled.holdBefore ? 0 : compiled.windowStartMs,
44
+ toMs: compiled.holdAfter ? clipDurationMs : compiled.windowEndMs
45
+ };
46
+ }
47
+ /**
48
+ * Two animations driving one `replace` channel over the same instants (I3).
49
+ *
50
+ * `positionX/Y`, `anchorX/Y` and `trimStart/End` set an absolute value instead
51
+ * of composing, so the last enabled animation in document order wins and the
52
+ * other's curve is discarded — silently, and only where they overlap, which is
53
+ * why this is a warning rather than something a preview would reveal.
54
+ */
55
+ function replaceOverlapIssues(clip, compiled) {
56
+ const byChannel = new Map();
57
+ for (const animation of compiled) {
58
+ const interval = heldInterval(animation, clip.durationMs);
59
+ const claimed = new Set();
60
+ for (const curve of animation.curves) {
61
+ if (ANIMATED_PROPERTY_FOLD[curve.property] !== "replace")
62
+ continue;
63
+ if (claimed.has(curve.property))
64
+ continue;
65
+ claimed.add(curve.property);
66
+ const list = byChannel.get(curve.property);
67
+ const entry = { id: animation.id, ...interval };
68
+ if (list)
69
+ list.push(entry);
70
+ else
71
+ byChannel.set(curve.property, [entry]);
72
+ }
73
+ }
74
+ const issues = [];
75
+ for (const [channel, entries] of byChannel) {
76
+ for (let i = 0; i < entries.length - 1; i += 1) {
77
+ for (let j = i + 1; j < entries.length; j += 1) {
78
+ const a = entries[i];
79
+ const b = entries[j];
80
+ const fromMs = Math.max(a.fromMs, b.fromMs);
81
+ const toMs = Math.min(a.toMs, b.toMs);
82
+ if (toMs - fromMs <= EPSILON_MS)
83
+ continue;
84
+ issues.push({
85
+ severity: "warning",
86
+ code: "replace_curves_overlap",
87
+ message: `Clip "${clipLabel(clip)}" animations "${a.id}" and "${b.id}" both drive ${channel} between ${Math.round(fromMs)}ms and ${Math.round(toMs)}ms — ${channel} replaces rather than composes, so the last enabled animation in document order wins and the other's curve is discarded over that span.`,
88
+ path: "animations[*]",
89
+ clipId: clip.id,
90
+ trackId: clip.trackId
91
+ });
92
+ }
93
+ }
94
+ }
95
+ return issues;
96
+ }
97
+ /**
98
+ * Motion the clip cannot hold.
99
+ *
100
+ * The compiler clamps a window to the clip and drops one that starts at or
101
+ * after clip end, so an entrance authored longer than its clip plays truncated
102
+ * — or never — with nothing said. Both are warnings: the clip still renders,
103
+ * it just does not perform the motion that was written.
104
+ *
105
+ * A `fullClip` preset (`kenBurns`) ignores duration and delay by design and is
106
+ * skipped. A `"loop"` runs to clip end by construction, so only a delay past
107
+ * the clip's end can drop it, which the dropped branch covers.
108
+ */
109
+ function windowIssues(clip, animations, compiled) {
110
+ const byId = new Map(compiled.map((entry) => [entry.id, entry]));
111
+ const issues = [];
112
+ const at = { clipId: clip.id, trackId: clip.trackId, path: "animations[*]" };
113
+ for (const animation of animations) {
114
+ if (getAnimationPreset(animation.preset)?.fullClip === true)
115
+ continue;
116
+ const delayMs = Math.max(0, animation.delayMs ?? 0);
117
+ const durationMs = Math.max(1, animation.durationMs);
118
+ const entry = byId.get(animation.id);
119
+ if (!entry) {
120
+ issues.push({
121
+ severity: "warning",
122
+ code: "animation_exceeds_clip",
123
+ message: `Clip "${clipLabel(clip)}" animation "${animation.id}" (${animation.preset}, ${animation.role}) asks for ${durationMs}ms after a ${delayMs}ms delay on a ${clip.durationMs}ms clip — the window falls outside the clip, so the animation never runs.`,
124
+ ...at
125
+ });
126
+ continue;
127
+ }
128
+ if (animation.role === "loop")
129
+ continue;
130
+ const requestedMs = durationMs + (entry.stagger?.maxDelayMs ?? 0);
131
+ const actualMs = entry.windowEndMs - entry.windowStartMs;
132
+ if (actualMs + EPSILON_MS >= requestedMs)
133
+ continue;
134
+ issues.push({
135
+ severity: "warning",
136
+ code: "animation_exceeds_clip",
137
+ message: `Clip "${clipLabel(clip)}" animation "${animation.id}" (${animation.preset}, ${animation.role}) needs ${Math.round(requestedMs)}ms after a ${delayMs}ms delay but the ${clip.durationMs}ms clip leaves ${Math.round(actualMs)}ms — the window is clamped, so the motion is cut short.`,
138
+ ...at
139
+ });
140
+ }
141
+ return issues;
142
+ }
143
+ /**
144
+ * A stagger whose span did not fit the clip.
145
+ *
146
+ * When the units cannot all animate at the authored `offsetMs` the compiler
147
+ * shrinks the offset rather than the per-unit duration, so every unit still
148
+ * completes and the effect reads faster and flatter than it was written —
149
+ * `compressed` on the compiled stagger is the compiler saying so (T8).
150
+ */
151
+ function staggerIssues(clip, compiled) {
152
+ const issues = [];
153
+ for (const entry of compiled) {
154
+ const stagger = entry.stagger;
155
+ if (!stagger?.compressed)
156
+ continue;
157
+ issues.push({
158
+ severity: "warning",
159
+ code: "stagger_compressed",
160
+ message: `Clip "${clipLabel(clip)}" animation "${entry.id}" staggers ${stagger.count} ${stagger.unit}(s) over a ${clip.durationMs}ms clip — the per-unit offset was shrunk to ${Math.round(stagger.offsetMs)}ms to make them fit, so the units overlap more than authored. Lengthen the clip or shorten the animation.`,
161
+ path: "animations[*].stagger.offsetMs",
162
+ clipId: clip.id,
163
+ trackId: clip.trackId
164
+ });
165
+ }
166
+ return issues;
167
+ }
168
+ /**
169
+ * A typewriter stored with a plain duration.
170
+ *
171
+ * `animate_clip` stores the preset as `durationMs: 1` plus a per-character
172
+ * `stagger` (`typewriterTiming`). Without the stagger the preset is one held
173
+ * opacity step over the whole block, and the caret draws only on a staggered
174
+ * reveal, so nothing types.
175
+ */
176
+ function typewriterIssues(clip, animations) {
177
+ const issues = [];
178
+ for (const animation of animations) {
179
+ if (animation.preset !== "typewriter" || animation.stagger)
180
+ continue;
181
+ issues.push({
182
+ severity: "warning",
183
+ code: "typewriter_not_staggered",
184
+ message: `Clip "${clipLabel(clip)}" animation "${animation.id}" stores a typewriter as a ${animation.durationMs}ms duration with no stagger — nothing draws for ${animation.durationMs}ms, then the whole text appears at once with no caret. Store the per-character form \`animate_clip\` writes: \`durationMs: 1\` with \`stagger: {unit: "character", offsetMs}\`, or re-apply the preset through \`animate_clip\`.`,
185
+ path: "animations[*].stagger",
186
+ clipId: clip.id,
187
+ trackId: clip.trackId
188
+ });
189
+ }
190
+ return issues;
191
+ }
192
+ /**
193
+ * The value a channel shows when no animation drives it: the sampler's
194
+ * identity for a composing channel, the clip's own value (and the field that
195
+ * stores it) for a replace channel. `undefined` when that value comes from
196
+ * layout this check does not resolve (a clip with no stored transform).
197
+ */
198
+ function restValue(clip, property) {
199
+ const own = (value, field) => value === undefined ? undefined : { value, field };
200
+ switch (property) {
201
+ case "wipeProgress":
202
+ return { value: 1 };
203
+ case "trimStart":
204
+ return own(clip.shapeStyle?.trimStart ?? 0, "shapeStyle.trimStart");
205
+ case "trimEnd":
206
+ return own(clip.shapeStyle?.trimEnd ?? 1, "shapeStyle.trimEnd");
207
+ case "positionX":
208
+ return own(clip.transform?.position.x, "transform.position.x");
209
+ case "positionY":
210
+ return own(clip.transform?.position.y, "transform.position.y");
211
+ case "anchorX":
212
+ return own(clip.transform?.anchor.x, "transform.anchor.x");
213
+ case "anchorY":
214
+ return own(clip.transform?.anchor.y, "transform.anchor.y");
215
+ default:
216
+ return { value: IDENTITY_SAMPLE[property] };
217
+ }
218
+ }
219
+ /**
220
+ * A custom `"out"` whose curve starts away from rest after clip start.
221
+ *
222
+ * An `"out"` holds its t=1 value to clip end but contributes nothing before its
223
+ * window, so the channel shows its rest value there and jumps to the first
224
+ * keyframe when the window opens. Builders turn an `"in"` that ends away from
225
+ * rest into an `"out"` to keep the end value, which is how a gauge arc drawn
226
+ * from `trimEnd: 0` shows a full ring first. A preset `"out"` is reversed to
227
+ * start at rest, and a source-anchored curve has no clip-time first value, so
228
+ * only clip-based custom curves are checked.
229
+ */
230
+ function restBeforeWindowIssues(clip, animations, compiled) {
231
+ const custom = new Set(animations
232
+ .filter((animation) => animation.preset === CUSTOM_ANIMATION_PRESET_ID)
233
+ .map((animation) => animation.id));
234
+ const issues = [];
235
+ for (const entry of compiled) {
236
+ if (entry.role !== "out" || !custom.has(entry.id))
237
+ continue;
238
+ if (entry.timeBase === "source" || entry.windowStartMs <= EPSILON_MS)
239
+ continue;
240
+ for (const curve of entry.curves) {
241
+ const first = curve.keyframes[0]?.value;
242
+ const rest = restValue(clip, curve.property);
243
+ if (first === undefined || rest === undefined)
244
+ continue;
245
+ if (Math.abs(first - rest.value) <= 1e-3)
246
+ continue;
247
+ // A replace channel takes the clip's own value only while undriven, so
248
+ // storing the first keyframe there fixes the frames before the window
249
+ // alone. A composing channel's rest is fixed, so only the window can move.
250
+ const fix = rest.field
251
+ ? `Set the clip's \`${rest.field}\` to ${first}, or lengthen the animation so its window starts at clip start.`
252
+ : "Lengthen the animation so its window starts at clip start.";
253
+ issues.push({
254
+ severity: "warning",
255
+ code: "animation_holds_rest_before_window",
256
+ message: `Clip "${clipLabel(clip)}" animation "${entry.id}" (custom, out) starts its ${curve.property} curve at ${first}, but an "out" does not apply before its window — ${curve.property} renders at the rest value ${rest.value} until ${Math.round(entry.windowStartMs)}ms, then jumps to ${first}. ${fix}`,
257
+ path: "animations[*].custom.curves",
258
+ clipId: clip.id,
259
+ trackId: clip.trackId
260
+ });
261
+ }
262
+ }
263
+ return issues;
264
+ }
265
+ /**
266
+ * `timeRemap.keyframes` must ascend in `t` (D13). `sourceMs` may descend —
267
+ * that is reverse playback — but a `t` that repeats or goes backwards makes the
268
+ * piecewise evaluation ambiguous: the source time for an instant depends on
269
+ * which segment is asked, so the clip decodes from somewhere nobody chose. An
270
+ * error, because unlike a mask or a transition there is no sane thing to draw
271
+ * instead.
272
+ */
273
+ function timeRemapIssues(clip) {
274
+ const keyframes = clip.timeRemap?.keyframes;
275
+ if (!keyframes || keyframes.length < 2)
276
+ return [];
277
+ const issues = [];
278
+ for (let i = 1; i < keyframes.length; i += 1) {
279
+ const previous = keyframes[i - 1];
280
+ const current = keyframes[i];
281
+ if (current.t > previous.t)
282
+ continue;
283
+ issues.push({
284
+ severity: "error",
285
+ code: "time_remap_not_monotonic",
286
+ message: `Clip "${clipLabel(clip)}" remaps time with keyframe ${i} at t=${current.t}, at or before keyframe ${i - 1} at t=${previous.t} — \`t\` must ascend. \`sourceMs\` may descend, which is how a reverse is written.`,
287
+ path: `timeRemap.keyframes[${i}].t`,
288
+ clipId: clip.id,
289
+ trackId: clip.trackId
290
+ });
291
+ break;
292
+ }
293
+ return issues;
294
+ }
295
+ /** The animated properties a link on each channel replaces (`resolveAnimatedLayerProps`). */
296
+ const LINK_REPLACES = {
297
+ positionX: ["positionX", "offsetX"],
298
+ positionY: ["positionY", "offsetY"],
299
+ scale: ["scale", "scaleX", "scaleY"],
300
+ rotation: ["rotation"],
301
+ opacity: ["opacity"]
302
+ };
303
+ /** The clip's own value on a link channel, and the value a wiggle centres on. */
304
+ function staticChannel(clip, channel) {
305
+ const t = clip.transform;
306
+ switch (channel) {
307
+ case "positionX": return { value: t?.position.x ?? 0, wiggleBase: 0 };
308
+ case "positionY": return { value: t?.position.y ?? 0, wiggleBase: 0 };
309
+ case "scale": return { value: ((t?.scale.x ?? 1) + (t?.scale.y ?? 1)) / 2, wiggleBase: 1 };
310
+ case "rotation": return { value: t?.rotation ?? 0, wiggleBase: 0 };
311
+ default: return { value: clip.opacity ?? 1, wiggleBase: 1 };
312
+ }
313
+ }
314
+ /**
315
+ * A link that silently discards other motion on its channel.
316
+ *
317
+ * A link sets its channel's value outright: the clip's animations on that
318
+ * channel are ignored while it is set, and a wiggle centres on the channel's
319
+ * identity, not on the clip's own placement.
320
+ */
321
+ function linkOverrideIssues(clip, compiled) {
322
+ const issues = [];
323
+ for (const [index, link] of (clip.animationLinks ?? []).entries()) {
324
+ const replaced = new Set(LINK_REPLACES[link.target]);
325
+ const animated = [...new Set(compiled.flatMap((entry) => entry.curves.map((curve) => curve.property).filter((property) => replaced.has(property))))];
326
+ const reasons = [];
327
+ if (animated.length)
328
+ reasons.push(`the clip's own ${animated.join(", ")} animation`);
329
+ if ("kind" in link) {
330
+ const { value, wiggleBase } = staticChannel(clip, link.target);
331
+ if (Math.abs(value - wiggleBase) > 1e-6)
332
+ reasons.push(`its authored ${link.target} of ${Math.round(value * 1000) / 1000} (the wiggle centres on ${wiggleBase})`);
333
+ }
334
+ if (!reasons.length)
335
+ continue;
336
+ issues.push({
337
+ severity: "warning",
338
+ code: "animation_link_overrides",
339
+ message: `Clip "${clipLabel(clip)}" links ${link.target}, which sets that channel outright and discards ${reasons.join(" and ")}. Put the link on a child clip and the other motion on its parent group.`,
340
+ path: `animationLinks[${index}]`,
341
+ clipId: clip.id,
342
+ trackId: clip.trackId
343
+ });
344
+ }
345
+ return issues;
346
+ }
347
+ /**
348
+ * Every motion finding for one clip. `canvas` is the sequence's pixel size,
349
+ * which the compiler needs to resolve a preset's normalized distances and to
350
+ * count the wrapped lines of a `"line"` stagger.
351
+ */
352
+ export function checkClipMotion(clip, canvas) {
353
+ const issues = timeRemapIssues(clip);
354
+ const animations = compilableAnimations(clip);
355
+ if (animations.length === 0)
356
+ return [...issues, ...linkOverrideIssues(clip, [])];
357
+ const { unit: staggerUnit, count: staggerCount } = clipStaggerCount(clip, canvas);
358
+ const compiled = compileClipAnimations(animations, clip.durationMs, canvas, { staggerCount, staggerUnit });
359
+ issues.push(...windowIssues(clip, animations, compiled), ...staggerIssues(clip, compiled), ...typewriterIssues(clip, animations), ...restBeforeWindowIssues(clip, animations, compiled), ...replaceOverlapIssues(clip, compiled), ...linkOverrideIssues(clip, compiled));
360
+ return issues;
361
+ }
362
+ //# sourceMappingURL=motion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"motion.js","sourceRoot":"","sources":["../../src/timeline-debug/motion.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EAKlB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAI/D,8EAA8E;AAC9E,MAAM,UAAU,GAAG,GAAG,CAAC;AAEvB,MAAM,SAAS,GAAG,CAAC,IAAkB,EAAU,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC;AAE5E;;;;;;;;GAQG;AACH,SAAS,oBAAoB,CAAC,IAAkB;IAC9C,MAAM,GAAG,GAAoB,EAAE,CAAC;IAChC,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,UAAU,IAAI,EAAE,EAAE,CAAC;QAC9C,IAAI,SAAS,CAAC,OAAO,KAAK,KAAK;YAAE,SAAS;QAC1C,IAAI,SAAS,CAAC,MAAM,KAAK,0BAA0B,EAAE,CAAC;YACpD,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM;gBACjC,CAAC,SAAS,CAAC,WAAW,EAAE,MAAM,IAAI,SAAS,CAAC,YAAY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,sBAAsB,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,EACrD,GAAG,oBAAoB,CAAC,IAAI,EAAE,QAAQ,CAAC,EACvC,GAAG,kBAAkB,CAAC,IAAI,EAAE,QAAQ,CAAC,CACtC,CAAC;IACF,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { TimelineDebugReport, TimelineDebugTarget, TimelineInteractionRecord } from "./types.js";
2
+ import { type TimelineValidationMeta } from "./validate.js";
3
+ interface TimelineDebugReportInput {
4
+ target: TimelineDebugTarget;
5
+ /** The document as loaded — untrusted, validated here. */
6
+ document: unknown;
7
+ meta?: TimelineValidationMeta;
8
+ interactions?: TimelineInteractionRecord[];
9
+ /** Bridge snapshot after the scripted session (`TimelineBridgeFinalState`). */
10
+ finalState?: unknown;
11
+ /** Document reconstructed from the final state, validated as a second pass. */
12
+ finalDocument?: unknown;
13
+ }
14
+ export declare function buildTimelineDebugReport(input: TimelineDebugReportInput): TimelineDebugReport;
15
+ export {};
16
+ //# sourceMappingURL=report.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/timeline-debug/report.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAEV,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EAG1B,MAAM,YAAY,CAAC;AACpB,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,eAAe,CAAC;AAyFvB,UAAU,wBAAwB;IAChC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,0DAA0D;IAC1D,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,sBAAsB,CAAC;IAC9B,YAAY,CAAC,EAAE,yBAAyB,EAAE,CAAC;IAC3C,+EAA+E;IAC/E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,+EAA+E;IAC/E,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,wBAAwB,GAC9B,mBAAmB,CAwCrB"}
@@ -0,0 +1,100 @@
1
+ import { validateTimelineSequence } from "./validate.js";
2
+ import { isNumber } from "../predicates.js";
3
+ const DEFAULTS = { fps: 30, width: 1920, height: 1080 };
4
+ /**
5
+ * What a headless timeline run cannot answer. Fixed, because the boundary is a
6
+ * property of the harness, not of the document it was pointed at.
7
+ */
8
+ const NOT_SIMULATED = [
9
+ "Rendering and compositing — no pixels are produced, so nothing here sees a frame.",
10
+ "Playback timing — transport, scrubbing, and audio/video sync are untested.",
11
+ "Video and audio decode — asset durations, real frame rates, and codec support are unknown.",
12
+ "Generation providers — no clip media is produced; `generated` clips are checked structurally only.",
13
+ "Asset I/O — asset ids are never resolved or fetched.",
14
+ "`get_clip_frames` and any other frame-sampling tool."
15
+ ];
16
+ const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
17
+ const countAndDuration = (document) => {
18
+ if (!isRecord(document))
19
+ return { trackCount: 0, clipCount: 0, durationMs: 0 };
20
+ const tracks = Array.isArray(document.tracks) ? document.tracks : [];
21
+ const clips = Array.isArray(document.clips) ? document.clips : [];
22
+ let durationMs = 0;
23
+ for (const clip of clips) {
24
+ if (!isRecord(clip))
25
+ continue;
26
+ const start = isNumber(clip.startMs) ? clip.startMs : 0;
27
+ const length = isNumber(clip.durationMs) ? clip.durationMs : 0;
28
+ durationMs = Math.max(durationMs, start + Math.max(0, length));
29
+ }
30
+ return { trackCount: tracks.length, clipCount: clips.length, durationMs };
31
+ };
32
+ const describe = (issue) => {
33
+ const where = issue.clipId ?? issue.trackId ?? issue.path;
34
+ return where
35
+ ? `[${issue.code}] ${where}: ${issue.message}`
36
+ : `[${issue.code}] ${issue.message}`;
37
+ };
38
+ function buildTimelineVerdict(validation, interactions, finalValidation) {
39
+ const failedSteps = interactions.filter((step) => !step.ok);
40
+ const issues = [
41
+ ...validation.errors.map(describe),
42
+ ...failedSteps.map((step) => `Interaction \`${step.tool}\` failed${step.error ? `: ${step.error}` : ""}`),
43
+ ...(finalValidation?.errors ?? []).map((issue) => `After edits — ${describe(issue)}`)
44
+ ];
45
+ const warnings = [
46
+ ...validation.warnings.map(describe),
47
+ ...(finalValidation?.warnings ?? []).map((issue) => `After edits — ${describe(issue)}`)
48
+ ];
49
+ const ok = issues.length === 0;
50
+ const warningCount = warnings.length;
51
+ const headline = ok
52
+ ? `Timeline is sound — ${interactions.length} interaction(s) ran clean` +
53
+ (warningCount > 0 ? `, ${warningCount} warning(s)` : "") +
54
+ "."
55
+ : `Timeline has ${issues.length} problem(s)` +
56
+ (failedSteps.length > 0
57
+ ? `, ${failedSteps.length} failed interaction(s)`
58
+ : "") +
59
+ (warningCount > 0 ? `, ${warningCount} warning(s)` : "") +
60
+ ` — ${issues[0]}`;
61
+ return warningCount > 0
62
+ ? { ok, headline, issues, warnings }
63
+ : { ok, headline, issues };
64
+ }
65
+ export function buildTimelineDebugReport(input) {
66
+ const validation = validateTimelineSequence(input.document, input.meta);
67
+ const finalValidation = input.finalDocument === undefined
68
+ ? undefined
69
+ : validateTimelineSequence(input.finalDocument, input.meta);
70
+ const interactions = input.interactions ?? [];
71
+ // The final document is what the session left behind, so it — not the input
72
+ // — describes the sequence the report is about.
73
+ const counted = countAndDuration(input.finalDocument ?? input.document);
74
+ const meta = {
75
+ fps: input.meta?.fps && input.meta.fps > 0 ? input.meta.fps : DEFAULTS.fps,
76
+ width: input.meta?.width && input.meta.width > 0
77
+ ? input.meta.width
78
+ : DEFAULTS.width,
79
+ height: input.meta?.height && input.meta.height > 0
80
+ ? input.meta.height
81
+ : DEFAULTS.height,
82
+ ...counted
83
+ };
84
+ const report = {
85
+ target: input.target,
86
+ meta,
87
+ validation,
88
+ interactions,
89
+ notSimulated: [...NOT_SIMULATED],
90
+ verdict: buildTimelineVerdict(validation, interactions, finalValidation)
91
+ };
92
+ if (input.finalState !== undefined) {
93
+ report.finalState = input.finalState;
94
+ }
95
+ if (finalValidation) {
96
+ report.finalValidation = finalValidation;
97
+ }
98
+ return report;
99
+ }
100
+ //# sourceMappingURL=report.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report.js","sourceRoot":"","sources":["../../src/timeline-debug/report.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,wBAAwB,EAEzB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAK5C,MAAM,QAAQ,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAW,CAAC;AAEjE;;;GAGG;AACH,MAAM,aAAa,GAA0B;IAC3C,mFAAmF;IACnF,4EAA4E;IAC5E,4FAA4F;IAC5F,oGAAoG;IACpG,sDAAsD;IACtD,sDAAsD;CACvD,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAoC,EAAE,CACpE,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAEvE,MAAM,gBAAgB,GAAG,CACvB,QAAiB,EACjB,EAAE;IACF,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACrB,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;IACxD,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrE,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IAClE,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,QAA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3B,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI;QACJ,UAAU;QACV,YAAY;QACZ,YAAY,EAAE,CAAC,GAAG,aAAa,CAAC;QAChC,OAAO,EAAE,oBAAoB,CAAC,UAAU,EAAE,YAAY,EAAE,eAAe,CAAC;KACzE,CAAC;IACF,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;QACnC,MAAM,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;IACvC,CAAC;IACD,IAAI,eAAe,EAAE,CAAC;QACpB,MAAM,CAAC,eAAe,GAAG,eAAe,CAAC;IAC3C,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { TimelineDocument } from "@nodetool-ai/protocol/api-schemas/timeline.js";
2
+ import type { TimelineDebugIssue } from "./types.js";
3
+ export declare function checkShowcase(doc: TimelineDocument, canvas: {
4
+ width: number;
5
+ height: number;
6
+ }): TimelineDebugIssue[];
7
+ //# sourceMappingURL=showcase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"showcase.d.ts","sourceRoot":"","sources":["../../src/timeline-debug/showcase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,gBAAgB,EACjB,MAAM,+CAA+C,CAAC;AAOvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AA8LrD,wBAAgB,aAAa,CAC3B,GAAG,EAAE,gBAAgB,EACrB,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACxC,kBAAkB,EAAE,CA2PtB"}