@hyperframes/producer 0.8.192 → 0.8.194

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.
@@ -219,6 +219,8 @@ export interface RemoteProjectFile {
219
219
  readonly url: string;
220
220
  /** A file of only this video's audio, when one was stored: the audio mix reads it, not the video. */
221
221
  readonly audioSidecarUrl?: string;
222
+ /** The file's stored ffprobe JSON: the plan reads it instead of probing the file over the network. */
223
+ readonly probeFactsUrl?: string;
222
224
  readonly sha256: string;
223
225
  readonly sizeBytes: number;
224
226
  }
@@ -0,0 +1,4 @@
1
+ export declare function wantsProbeFacts(path: string): boolean;
2
+ /** `unavailable`: no ffprobe on this machine. `none`: the file cannot be probed. */
3
+ export type ProbeFactsOutcome = "built" | "none" | "unavailable";
4
+ export declare function buildProbeFacts(inputPath: string, outputPath: string, signal?: AbortSignal): Promise<ProbeFactsOutcome>;
@@ -1,4 +1,4 @@
1
- import { type ResolvedDuration, type UnresolvedElement } from "@hyperframes/core";
1
+ import { type RateSpec, type ResolvedDuration, type UnresolvedElement } from "@hyperframes/core";
2
2
  import { type VideoElement, type ImageElement, type AudioElement, type AudioVolumeKeyframe } from "@hyperframes/engine";
3
3
  import type { Page } from "puppeteer-core";
4
4
  import { type ProducerLogger } from "../logger.js";
@@ -216,6 +216,7 @@ export interface BrowserMediaElement {
216
216
  /** True when compilation inferred duration from the fallback source. */
217
217
  durationInferred: boolean;
218
218
  mediaStart: number;
219
+ playbackRate: RateSpec;
219
220
  loop: boolean;
220
221
  hasAudio: boolean;
221
222
  volume: number;
@@ -1,3 +1,4 @@
1
+ import { type ProducerLogger } from "../../logger.js";
1
2
  import type { RenderOutputFormat } from "./renderFormat.js";
2
3
  export type ArtifactKind = "file" | "directory";
3
4
  export interface ArtifactTransactionFileSystem {
@@ -113,13 +114,14 @@ export declare function buildArtifactExpectation(input: {
113
114
  export declare class ArtifactTransaction {
114
115
  private readonly kind;
115
116
  private readonly fileSystem;
117
+ private readonly logger;
116
118
  readonly destinationPath: string;
117
119
  readonly stagingPath: string;
118
120
  private readonly transactionDirectory;
119
121
  private readonly backupPath;
120
122
  private state;
121
123
  private readonly durationProbe;
122
- constructor(destinationPath: string, kind: ArtifactKind, fileSystem?: ArtifactTransactionFileSystem, durationProbe?: ArtifactDurationProbe);
124
+ constructor(destinationPath: string, kind: ArtifactKind, fileSystem?: ArtifactTransactionFileSystem, durationProbe?: ArtifactDurationProbe, logger?: Pick<ProducerLogger, "debug">);
123
125
  validate(expected?: ArtifactValidationExpectation): Promise<void>;
124
126
  private assertReadableNonEmptyDirectory;
125
127
  /**
@@ -24,6 +24,12 @@ export declare function worstSubTimelineWaitOutcome(perfs: CapturePerfSummary[])
24
24
  export declare function pushWorkerDedupPerfs(results: ReadonlyArray<{
25
25
  perf?: CapturePerfSummary;
26
26
  }>, sink: CapturePerfSummary[]): void;
27
+ /** Adds each worker's page-error console lines to `sink`, once per distinct line. */
28
+ export declare function pushWorkerPageErrors(results: ReadonlyArray<{
29
+ pageErrorLines?: string[];
30
+ }>, sink: string[]): void;
31
+ /** The console lines plus the workers' page-error lines the console does not already hold. */
32
+ export declare function withWorkerPageErrors(consoleLines: string[], workerLines: string[]): string[];
27
33
  /**
28
34
  * Collapse per-session/per-worker static-dedup perf into one render-level
29
35
  * outcome. enabled/armed = OR across workers (they run the same gates on the
@@ -17,7 +17,7 @@
17
17
  * - `perfStages.audioProcessMs` is set whether or not the call ran.
18
18
  */
19
19
  import type { Fps } from "@hyperframes/core";
20
- import { type AudioProcessingFailure } from "@hyperframes/engine";
20
+ import { type AudioProcessingFailure, type MixResult } from "@hyperframes/engine";
21
21
  import type { CompositionMetadata } from "../shared.js";
22
22
  import type { ProducerLogger } from "../../../logger.js";
23
23
  export interface AudioStageInput {
@@ -59,5 +59,7 @@ export interface AudioStageResult {
59
59
  audioError?: string;
60
60
  /** Bounded typed causes for policy, telemetry, and caller classification. */
61
61
  audioFailures?: AudioProcessingFailure[];
62
+ /** Wall ms per phase of the audio mix. */
63
+ audioPhaseMs?: MixResult["phaseMs"];
62
64
  }
63
65
  export declare function runAudioStage(input: AudioStageInput): Promise<AudioStageResult>;
@@ -603,6 +603,8 @@ export declare function executeDiskCaptureWithAdaptiveRetry(options: {
603
603
  frameRangeStart?: number;
604
604
  /** Mutated in place — replaced each attempt so only the final attempt's worker perf survives (see retry reset below). */
605
605
  dedupPerfs: CapturePerfSummary[];
606
+ /** Mutated in place: the workers' page-error console lines, for the render's error count. */
607
+ pageErrorLines?: string[];
606
608
  }): Promise<CaptureAttemptSummary[]>;
607
609
  export type RenderConfigInput = Omit<RenderConfig, "fps"> & {
608
610
  fps: FpsInput;
@@ -704,6 +706,8 @@ export interface ElementTagScan {
704
706
  * live count and uses this only when no such session exists.
705
707
  */
706
708
  export declare function scanElementTags(html: string): ElementTagScan;
709
+ /** Longest a live probe-page read may hold the render; a busy page otherwise waits out the CDP timeout. */
710
+ export declare const PROBE_READ_TIMEOUT_MS = 5000;
707
711
  /**
708
712
  * Element count for the short-comp band's gate, WITH PROVENANCE.
709
713
  *
@@ -726,7 +730,7 @@ export declare function scanElementTags(html: string): ElementTagScan;
726
730
  * the fleet distribution recorded by the baseline release must be measured
727
731
  * by the same resolver that later gates routing, or the baseline is invalid.
728
732
  */
729
- export declare function resolveCompositionElementCount(probeSession: Pick<CaptureSession, "isInitialized" | "page"> | null, html: string): Promise<{
733
+ export declare function resolveCompositionElementCount(probeSession: Pick<CaptureSession, "isInitialized" | "page"> | null, html: string, log?: Pick<ProducerLogger, "warn">): Promise<{
730
734
  count: number;
731
735
  source: "live" | "static";
732
736
  byTag?: Readonly<Record<string, number>>;
@@ -759,7 +763,7 @@ export declare function detectAdaptersStatic(html: string): RuntimeAdapterName[]
759
763
  * Runtime adapters a composition exercises. Unlike `resolveCompositionElementCount`
760
764
  * (one source of truth, for gating), this is observational: unions live + static every render.
761
765
  */
762
- export declare function resolveAdaptersUsed(probeSession: Pick<CaptureSession, "isInitialized" | "page"> | null, html: string): Promise<readonly RuntimeAdapterName[]>;
766
+ export declare function resolveAdaptersUsed(probeSession: Pick<CaptureSession, "isInitialized" | "page"> | null, html: string, log?: Pick<ProducerLogger, "warn">): Promise<readonly RuntimeAdapterName[]>;
763
767
  /**
764
768
  * Max-merge init telemetry across per-worker capture perf summaries — the
765
769
  * success-path channel for PARALLEL renders, whose worker console buffers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/producer",
3
- "version": "0.8.192",
3
+ "version": "0.8.194",
4
4
  "description": "HTML-to-video rendering engine using Chrome's BeginFrame API",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,11 +35,11 @@
35
35
  "postcss": "^8.4.0",
36
36
  "puppeteer": "^25.2.1",
37
37
  "puppeteer-core": "^25.2.1",
38
- "@hyperframes/lint": "0.8.192",
39
- "@hyperframes/core": "0.8.192",
40
- "@hyperframes/parsers": "0.8.192",
41
- "@hyperframes/studio-server": "0.8.192",
42
- "@hyperframes/engine": "0.8.192"
38
+ "@hyperframes/core": "0.8.194",
39
+ "@hyperframes/engine": "0.8.194",
40
+ "@hyperframes/parsers": "0.8.194",
41
+ "@hyperframes/lint": "0.8.194",
42
+ "@hyperframes/studio-server": "0.8.194"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/node": "^25.0.10",
@@ -48,7 +48,7 @@
48
48
  "tsx": "^4.21.0",
49
49
  "typescript": "^5.7.2",
50
50
  "vitest": "^4.1.11",
51
- "@hyperframes/aws-lambda": "0.8.192"
51
+ "@hyperframes/aws-lambda": "0.8.194"
52
52
  },
53
53
  "engines": {
54
54
  "node": ">=22"