@vgai/editor-sdk 0.5.35 → 0.5.37

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@vgai/editor-sdk",
3
3
  "author": "Volter AI, Inc.",
4
4
  "license": "Apache-2.0",
5
- "version": "0.5.35",
5
+ "version": "0.5.37",
6
6
  "type": "module",
7
7
  "repository": {
8
8
  "type": "git",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@types/three": "^0.180.0",
27
- "@vgai/sdk": "0.5.35"
27
+ "@vgai/sdk": "0.5.37"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@vgai/engine": "*",
@@ -321,6 +321,47 @@ export interface ToolContributionSurfaces {
321
321
  readonly Object3DAuthoring: import('react').ComponentType<ToolObject3DAuthoringProps>;
322
322
  }
323
323
 
324
+ /** One bounded visual-history sample from the live Play recording. */
325
+ export interface ToolContributionRecordingFrame {
326
+ /** Monotonic within this recording, including after older frames are evicted. */
327
+ readonly sequence: number;
328
+ /** Position on the recording clock, measured from `startedAt`. */
329
+ readonly mediaTimeMs: number;
330
+ /** Wall-clock capture time, for correlating project-owned event streams. */
331
+ readonly capturedAt: string;
332
+ /** Borrowed object URL. It remains valid until this frame is evicted or Play ends. */
333
+ readonly src: string;
334
+ readonly width: number;
335
+ readonly height: number;
336
+ }
337
+
338
+ /** Stable snapshot returned by the live recording transport. */
339
+ export interface ToolContributionRecordingSnapshot {
340
+ readonly startedAt: string;
341
+ readonly width: number;
342
+ readonly height: number;
343
+ /** Latest sampled position on the live recording clock. */
344
+ readonly liveEdgeMs: number;
345
+ readonly sampleFps: number;
346
+ readonly retentionMs: number;
347
+ readonly frames: readonly ToolContributionRecordingFrame[];
348
+ /** A preview failure never stops the full WebM recording. */
349
+ readonly previewError: string | null;
350
+ }
351
+
352
+ /**
353
+ * Read-only visual history for the current Play recording.
354
+ *
355
+ * `getSnapshot` is referentially stable between notifications, so it can be
356
+ * passed directly to React's `useSyncExternalStore`. A `null` snapshot means
357
+ * Play is not currently recording (for example, a human-started Play session
358
+ * that did not explicitly start recording).
359
+ */
360
+ export interface ToolContributionRecording {
361
+ readonly getSnapshot: () => ToolContributionRecordingSnapshot | null;
362
+ readonly subscribe: (listener: () => void) => () => void;
363
+ }
364
+
324
365
  /**
325
366
  * The live game a contribution is looking at, or `null` when nothing is
326
367
  * playing.
@@ -341,6 +382,8 @@ export interface ToolContributionSurfaces {
341
382
  export interface ToolContributionPlay {
342
383
  readonly game: unknown;
343
384
  readonly instanceId: string;
385
+ /** The editor-owned recording transport shared by every project tool. */
386
+ readonly recording: ToolContributionRecording;
344
387
  }
345
388
 
346
389
  export interface ToolContributionProps {