@hyperframes/producer 0.8.158 → 0.8.159

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.
@@ -1,4 +1,5 @@
1
1
  // src/services/distributed/plan.ts
2
+ import { audioFailureDiagnostics as audioFailureDiagnostics3 } from "@hyperframes/engine";
2
3
  import {
3
4
  copyFileSync as copyFileSync5,
4
5
  cpSync as cpSync2,
@@ -57,6 +58,7 @@ function createConsoleLogger(level = "info") {
57
58
  var defaultLogger = createConsoleLogger("info");
58
59
 
59
60
  // src/services/renderOrchestrator.ts
61
+ import { audioFailureDiagnostics as audioFailureDiagnostics2 } from "@hyperframes/engine";
60
62
  import {
61
63
  existsSync as existsSync10,
62
64
  mkdirSync as mkdirSync6,
@@ -1120,15 +1122,17 @@ var EncoderInterruptedError = class extends Error {
1120
1122
  retryable = true;
1121
1123
  /** Retained inside the producer for diagnostics; never copied to the wire envelope. */
1122
1124
  diagnosticMessage;
1123
- constructor(prefix, diagnosticMessage) {
1125
+ audioFailures;
1126
+ constructor(prefix, diagnosticMessage, audioFailures = []) {
1124
1127
  super(`${prefix}: encoder process was interrupted by the host lifecycle`);
1125
1128
  this.name = "EncoderInterruptedError";
1126
1129
  this.diagnosticMessage = diagnosticMessage;
1130
+ this.audioFailures = audioFailures;
1127
1131
  }
1128
1132
  };
1129
1133
  function encoderFailureError(prefix, result) {
1130
1134
  const message = `${prefix}: ${result.error ?? "unknown encoder failure"}`;
1131
- return result.failureReason === "external_interruption" ? new EncoderInterruptedError(prefix, message) : new Error(message);
1135
+ return result.failureReason === "external_interruption" ? new EncoderInterruptedError(prefix, message, result.audioFailures) : new Error(message);
1132
1136
  }
1133
1137
 
1134
1138
  // src/services/render/artifactTransaction.ts
@@ -4838,8 +4842,12 @@ function appendAutoDetectedVideoAudio(composition, extracted) {
4838
4842
  import { join as join9 } from "node:path";
4839
4843
  import {
4840
4844
  MIXED_AUDIO_FILENAME,
4845
+ audioFailureDiagnostics,
4841
4846
  processCompositionAudio
4842
4847
  } from "@hyperframes/engine";
4848
+ function triggerFirst(failures, trigger) {
4849
+ return [trigger, ...(failures ?? []).filter((failure) => failure !== trigger)];
4850
+ }
4843
4851
  async function runAudioStage(input) {
4844
4852
  const {
4845
4853
  projectDir,
@@ -4905,7 +4913,8 @@ async function runAudioStage(input) {
4905
4913
  if (interrupted) {
4906
4914
  throw encoderFailureError("Audio processing failed", {
4907
4915
  error: interrupted.detail,
4908
- failureReason: "external_interruption"
4916
+ failureReason: "external_interruption",
4917
+ audioFailures: audioFailureDiagnostics(triggerFirst(audioResult.failures, interrupted))
4909
4918
  });
4910
4919
  }
4911
4920
  hasAudio = audioResult.success;
@@ -7109,6 +7118,7 @@ function applyDistributedAudioWarningPolicy(job, audioError, audioFailures = [],
7109
7118
  message: `Audio mix failed; output would be video-only: ${audioError}`,
7110
7119
  details: {
7111
7120
  mediaType: "audio",
7121
+ audioFailures: audioFailureDiagnostics3(audioFailures),
7112
7122
  failureReasons: [...new Set(audioFailures.map((failure) => failure.reason))],
7113
7123
  failureStages: [...new Set(audioFailures.map((failure) => failure.stage))],
7114
7124
  failureOwner,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": "0.1.0",
3
3
  "buildId": "dev",
4
- "sha256": "026d1ba602d0772cfb7c08d21f8e8c8af20f430db8582178fabe1cb61a517a39",
4
+ "sha256": "797fb123889f718e89c8195415a1b261e1dc75d99bee5e3477a0ebd3ccd61e50",
5
5
  "artifacts": {
6
6
  "iife": "hyperframe.runtime.iife.js",
7
7
  "esm": "hyperframe.runtime.mjs"