gooseworks 0.5.9-dev.59.2b371ca1 → 0.5.9

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 (55) hide show
  1. package/README.md +6 -4
  2. package/dist/kit/core/assembly-timeline.d.ts +184 -0
  3. package/dist/kit/core/assembly-timeline.d.ts.map +1 -0
  4. package/dist/kit/core/assembly-timeline.js +476 -0
  5. package/dist/kit/core/assembly-timeline.js.map +1 -0
  6. package/dist/kit/core/device.d.ts.map +1 -1
  7. package/dist/kit/core/device.js +1 -0
  8. package/dist/kit/core/device.js.map +1 -1
  9. package/dist/kit/core/eyes.d.ts +49 -2
  10. package/dist/kit/core/eyes.d.ts.map +1 -1
  11. package/dist/kit/core/eyes.js +102 -9
  12. package/dist/kit/core/eyes.js.map +1 -1
  13. package/dist/kit/core/final-measure.d.ts +138 -0
  14. package/dist/kit/core/final-measure.d.ts.map +1 -0
  15. package/dist/kit/core/final-measure.js +492 -0
  16. package/dist/kit/core/final-measure.js.map +1 -0
  17. package/dist/kit/core/outcome.d.ts +5 -1
  18. package/dist/kit/core/outcome.d.ts.map +1 -1
  19. package/dist/kit/core/outcome.js +14 -2
  20. package/dist/kit/core/outcome.js.map +1 -1
  21. package/dist/kit/core/run.d.ts +7 -0
  22. package/dist/kit/core/run.d.ts.map +1 -1
  23. package/dist/kit/core/run.js +304 -8
  24. package/dist/kit/core/run.js.map +1 -1
  25. package/dist/kit/core/version.d.ts +3 -1
  26. package/dist/kit/core/version.d.ts.map +1 -1
  27. package/dist/kit/core/version.js +4 -2
  28. package/dist/kit/core/version.js.map +1 -1
  29. package/dist/kit/line/types.d.ts +2 -0
  30. package/dist/kit/line/types.d.ts.map +1 -1
  31. package/dist/kit/maker/inputs.js +1 -1
  32. package/dist/kit/maker/make.d.ts +8 -0
  33. package/dist/kit/maker/make.d.ts.map +1 -1
  34. package/dist/kit/maker/make.js +34 -1
  35. package/dist/kit/maker/make.js.map +1 -1
  36. package/dist/kit/maker/parts/html-frames/{1.2.1 → 1.3.1}/part.json +42 -4
  37. package/dist/kit/maker/parts/html-frames/src/part.d.ts.map +1 -1
  38. package/dist/kit/maker/parts/html-frames/src/part.js +5 -1
  39. package/dist/kit/maker/parts/html-frames/src/part.js.map +1 -1
  40. package/dist/kit/maker/under.d.ts +2 -0
  41. package/dist/kit/maker/under.d.ts.map +1 -1
  42. package/dist/kit/maker/under.js +11 -0
  43. package/dist/kit/maker/under.js.map +1 -1
  44. package/dist/skills/master-skill.d.ts +2 -2
  45. package/dist/skills/master-skill.d.ts.map +1 -1
  46. package/dist/skills/master-skill.js +3 -3
  47. package/dist/skills/master-skill.js.map +1 -1
  48. package/dist/skills/server-entry-skills.d.ts +3 -3
  49. package/dist/skills/server-entry-skills.d.ts.map +1 -1
  50. package/dist/skills/server-entry-skills.js +34 -35
  51. package/dist/skills/server-entry-skills.js.map +1 -1
  52. package/package.json +9 -4
  53. package/skills/goose-video/SKILL.md +2 -2
  54. package/skills/make-custom-video/SKILL.md +23 -29
  55. package/skills/manifest.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"outcome.js","sourceRoot":"","sources":["../../../src/kit/core/outcome.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,8BAMC;AAuBD,oCAgBC;AAMD,gCASC;AAsCD,oCAIC;AAGD,wBA2BC;AAMD,kCAwCC;AAeD,4BAsBC;AAGD,kCAYC;AArRD,iGAAiG;AACjG,6FAA6F;AAC7F,0CAA0C;AAC1C,0CAAkD;AAClD,2BAA0D;AAC1D,2CAA6B;AAE7B,iCAA6D;AAC7D,mCAAoD;AAEpD,iCAAwD;AAExD,uFAAuF;AAC1E,QAAA,UAAU,GAAG;IACxB,+CAA+C;IAC/C,IAAI,EAAE,CAAC;IACP,iFAAiF;IACjF,MAAM,EAAE,CAAC;IACT,yCAAyC;IACzC,OAAO,EAAE,CAAC;IACV,gGAAgG;IAChG,SAAS,EAAE,CAAC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AAoB,OAAO,EAAE,CAAC;KAClE,CAAC;AACJ,CAAC"}
@@ -68,6 +68,13 @@ export declare const CEILING_WORDS = "Making this video took much longer than it
68
68
  export declare const TAKE_FIT_PARTS: ReadonlySet<string>;
69
69
  /** The person's words for a take-fit part's refusal, the same as gooseworks-app's TAKE_FIT_MESSAGE. */
70
70
  export declare const TAKE_FIT_WORDS = "The clip was made, but we couldn\u2019t line it up with the plan\u2019s lines to cut it. That\u2019s on our side, not the plan. Run it again; what was made so far is kept.";
71
+ /**
72
+ * The card's notes while a custom video waits on its maker's agent (plain words, at most 200
73
+ * characters, never a path). The run is still on: the same command resumes it.
74
+ */
75
+ export declare const WAITING_FOR_SOURCE_REVIEW = "Waiting for the new clips to be reviewed before the edit goes on";
76
+ export declare const WAITING_FOR_CONTENT_REVIEW = "Waiting for the finished video\u2019s picture and sound review before it is sent";
77
+ export declare const WAITING_FOR_MEASURED_FIX = "The finished video failed a sound or picture measurement and is being fixed before it is sent";
71
78
  /** What the finished video must be, handed to every layer as `expect`. Exported for tests. */
72
79
  export declare function expectationOf(style: LoadedStyle['style'], plan: ApprovedPlan): OutputExpectation;
73
80
  /** The first line after the hand-over: which video, for which brand, on which GooseWorks. */
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/kit/core/run.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAOV,SAAS,EAET,iBAAiB,EAQlB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAA0D,KAAK,KAAK,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACpH,OAAO,EAAwC,KAAK,YAAY,EAAqB,KAAK,WAAW,EAA8F,MAAM,eAAe,CAAC;AAQzN,OAAO,KAAK,EAAE,OAAO,EAAc,MAAM,QAAQ,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAYpC,OAAO,EAA8B,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AACv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) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.TAKE_FIT_WORDS = exports.TAKE_FIT_PARTS = exports.CEILING_WORDS = exports.RUN_CEILING_MIN_MS = exports.RUN_CEILING_MAX_MS = exports.LAYER_ORDER = void 0;
36
+ exports.WAITING_FOR_MEASURED_FIX = exports.WAITING_FOR_CONTENT_REVIEW = exports.WAITING_FOR_SOURCE_REVIEW = exports.TAKE_FIT_WORDS = exports.TAKE_FIT_PARTS = exports.CEILING_WORDS = exports.RUN_CEILING_MIN_MS = exports.RUN_CEILING_MAX_MS = exports.LAYER_ORDER = void 0;
37
37
  exports.expectationOf = expectationOf;
38
38
  exports.startLine = startLine;
39
39
  exports.makeVideo = makeVideo;
@@ -57,6 +57,8 @@ const client_1 = require("../line/client");
57
57
  const types_1 = require("../line/types");
58
58
  const bind_1 = require("./bind");
59
59
  const eyes_1 = require("./eyes");
60
+ const assembly_timeline_1 = require("./assembly-timeline");
61
+ const final_measure_1 = require("./final-measure");
60
62
  const outcome_1 = require("./outcome");
61
63
  const canonical_1 = require("./canonical");
62
64
  const device_1 = require("./device");
@@ -81,6 +83,8 @@ const version_1 = require("./version");
81
83
  const version_2 = require("../../version");
82
84
  exports.LAYER_ORDER = ['brand', 'captions', 'sound', 'check'];
83
85
  const SLOT_KIND = { brand: 'compose', captions: 'caption', sound: 'mix', check: 'check' };
86
+ /** Matches the backend upload manifest limit, including source timeline and full rubric. */
87
+ const MAX_MANIFEST_BYTES = 128 * 1024;
84
88
  /** The server's checks a layer can redo. */
85
89
  const SERVER_CHECK_SLOT = { sound: 'sound', captions: 'captions' };
86
90
  /** Pixel size of each aspect the plan may pick (short side 1080). */
@@ -137,6 +141,13 @@ const REPORTED_STOPS = new Map([
137
141
  ['file_unavailable', 'file_unavailable'],
138
142
  ['piece_lost', 'piece_lost'],
139
143
  ]);
144
+ /**
145
+ * The card's notes while a custom video waits on its maker's agent (plain words, at most 200
146
+ * characters, never a path). The run is still on: the same command resumes it.
147
+ */
148
+ exports.WAITING_FOR_SOURCE_REVIEW = 'Waiting for the new clips to be reviewed before the edit goes on';
149
+ exports.WAITING_FOR_CONTENT_REVIEW = 'Waiting for the finished video’s picture and sound review before it is sent';
150
+ exports.WAITING_FOR_MEASURED_FIX = 'The finished video failed a sound or picture measurement and is being fixed before it is sent';
140
151
  /** At most this many warnings go up with the video, for its delivery summary. */
141
152
  const MAX_SENT_WARNINGS = 6;
142
153
  /** What the final check noted without failing the video, in its own words. */
@@ -744,6 +755,19 @@ class Maker {
744
755
  this.failureResumable = resumable;
745
756
  void this.reporter.fail({ step: step.slice(0, 60), code: FAILURE_CODE.test(code) ? code : 'change_request', detail: detail.trim().slice(0, 2000), ...(fromPart === undefined ? {} : { from_part: fromPart }) });
746
757
  }
758
+ /**
759
+ * A stop that waits on a review or a fix the agent makes: before the kit exits, the line hears a
760
+ * running report with a plain note, so the card says what it waits for instead of going quiet.
761
+ * Never throws; a report that can't be sent only costs the card its note.
762
+ */
763
+ async reportWaiting(note) {
764
+ if (!this.reporter || this.reporter.refused)
765
+ return;
766
+ this.book.note = note;
767
+ this.reporter.resume();
768
+ await this.reporter.send(true).catch(() => undefined);
769
+ await this.reporter.flush().catch(() => undefined);
770
+ }
747
771
  async saveRun() {
748
772
  this.run.updated_at = this.now().toISOString();
749
773
  await this.store.writeRun(this.run);
@@ -952,6 +976,106 @@ class Maker {
952
976
  const scope = { plan: this.planScope, brand: this.brand, steps: outputs, assets: this.style.assets };
953
977
  const hashes = {};
954
978
  let timeline = null;
979
+ // Review metadata travels outside old part schemas, which reject unknown Timeline fields.
980
+ const customMetadata = this.style.style;
981
+ let assemblyRaw = customMetadata.assembly_timeline;
982
+ let contentReview = customMetadata.content_review;
983
+ const sourceReviewPath = path.join(this.layout.final, 'source-reviews.json');
984
+ let sourceReviews = {};
985
+ try {
986
+ const saved = JSON.parse(await (0, promises_1.readFile)(sourceReviewPath, 'utf8'));
987
+ if (!saved || !saved.steps || typeof saved.steps !== 'object' || Array.isArray(saved.steps))
988
+ throw new Error('steps must be a map');
989
+ sourceReviews = saved.steps;
990
+ }
991
+ catch (error) {
992
+ if (error.code !== 'ENOENT')
993
+ throw new errors_1.KitStop('The saved source reviews could not be read. Repair source-reviews.json before resuming.', 'change_request', 'bad_input');
994
+ }
995
+ const sourceFiles = new Map();
996
+ const collectFiles = (value) => {
997
+ if ((0, canonical_1.isFileRef)(value)) {
998
+ sourceFiles.set(value.sha256, value);
999
+ return;
1000
+ }
1001
+ if (Array.isArray(value)) {
1002
+ value.forEach(collectFiles);
1003
+ return;
1004
+ }
1005
+ if (value && typeof value === 'object')
1006
+ Object.values(value).forEach(collectFiles);
1007
+ };
1008
+ collectFiles(this.planScope);
1009
+ const retainReviewedFiles = async (value) => {
1010
+ if ((0, canonical_1.isFileRef)(value)) {
1011
+ if (!(0, paths_1.isInside)(this.layout.root, value.path))
1012
+ throw new errors_1.KitStop('A reviewed source belongs to another job.', 'change_request', 'bad_input');
1013
+ const directory = path.join(this.layout.inputs, 'reviewed');
1014
+ const held = { ...value, path: path.join(directory, `${value.sha256}${path.extname(value.path)}`) };
1015
+ if (await (0, files_1.intact)(held))
1016
+ return held;
1017
+ if (!(await (0, files_1.intact)(value)))
1018
+ throw new errors_1.KitStop('A reviewed source changed or is missing. Keep the candidate bytes before resuming.', 'change_request', 'bad_input');
1019
+ await (0, promises_1.mkdir)(directory, { recursive: true, mode: 0o700 });
1020
+ await (0, promises_1.copyFile)(value.path, held.path);
1021
+ if (!(await (0, files_1.intact)(held)))
1022
+ throw new errors_1.KitStop('The retained source copy did not match its review.', 'failed', 'tool_failed');
1023
+ return held;
1024
+ }
1025
+ if (Array.isArray(value))
1026
+ return Promise.all(value.map(retainReviewedFiles));
1027
+ if (value && typeof value === 'object')
1028
+ return Object.fromEntries(await Promise.all(Object.entries(value).map(async ([key, item]) => [key, await retainReviewedFiles(item)])));
1029
+ return value;
1030
+ };
1031
+ const acceptTimeline = (out) => {
1032
+ collectFiles(out);
1033
+ if (out.assembly_timeline !== undefined)
1034
+ assemblyRaw = out.assembly_timeline;
1035
+ if (out.content_review !== undefined)
1036
+ contentReview = out.content_review;
1037
+ if (out.timeline && typeof out.timeline === 'object') {
1038
+ const { assembly_timeline, content_review, ...ordinary } = out.timeline;
1039
+ if (assembly_timeline !== undefined)
1040
+ assemblyRaw = assembly_timeline;
1041
+ if (content_review !== undefined)
1042
+ contentReview = content_review;
1043
+ timeline = ordinary;
1044
+ out.timeline = ordinary;
1045
+ }
1046
+ };
1047
+ /**
1048
+ * The declaration rule: a part gets the source-linked timeline only where its input schema
1049
+ * declares `assembly_timeline`, as a top-level input or inside an object input (its `timeline`,
1050
+ * `under_timeline` or any other, after following local `$ref`s). Older parts never see it.
1051
+ * Returns whether the part declared it, so its answer may carry the timeline back.
1052
+ */
1053
+ const exposeAssemblyToDeclaredSchema = (loaded, inputs) => {
1054
+ const root = loaded.manifest.inputs;
1055
+ const declares = (node) => {
1056
+ let schema = node;
1057
+ for (let depth = 0; depth < 8 && typeof schema?.$ref === 'string' && schema.$ref.startsWith('#/'); depth++) {
1058
+ let target = root;
1059
+ for (const name of schema.$ref.slice(2).split('/'))
1060
+ target = target && typeof target === 'object' ? target[name.replace(/~1/g, '/').replace(/~0/g, '~')] : undefined;
1061
+ schema = target && typeof target === 'object' ? target : undefined;
1062
+ }
1063
+ const properties = schema?.properties;
1064
+ return !!properties && Object.prototype.hasOwnProperty.call(properties, 'assembly_timeline');
1065
+ };
1066
+ let declared = declares(root);
1067
+ if (declared && assemblyRaw)
1068
+ inputs.assembly_timeline = assemblyRaw;
1069
+ const properties = (root.properties ?? {});
1070
+ for (const [key, value] of Object.entries(inputs)) {
1071
+ if (key === 'assembly_timeline' || !value || typeof value !== 'object' || Array.isArray(value) || (0, canonical_1.isFileRef)(value) || !declares(properties[key]))
1072
+ continue;
1073
+ declared = true;
1074
+ if (assemblyRaw)
1075
+ inputs[key] = { ...value, assembly_timeline: assemblyRaw };
1076
+ }
1077
+ return declared;
1078
+ };
955
1079
  const fixes = this.run.fixes ?? [];
956
1080
  const fixed = (id, inputs) => {
957
1081
  const mine = fixes.filter((f) => f.target === id);
@@ -963,11 +1087,48 @@ class Maker {
963
1087
  for (const step of this.style.style.timeline) {
964
1088
  const loaded = this.parts.get(step.id);
965
1089
  const { inputs, round } = fixed(step.id, this.bind(step.id, step.inputs, scope));
1090
+ exposeAssemblyToDeclaredSchema(loaded, inputs);
1091
+ // Only the predeclared staged creator route consumes review evidence. Capture/script/budget stay frozen.
1092
+ const properties = loaded.manifest.inputs.properties;
1093
+ const stagedSourceReview = Boolean(properties?.accepted_sources && properties?.generation_stage?.enum?.includes('reviewed_pipeline'));
1094
+ const alignedVoiceReview = Boolean(properties?.reviewed_alignments);
1095
+ if (stagedSourceReview) {
1096
+ inputs.generation_stage = 'reviewed_pipeline';
1097
+ const reviewed = sourceReviews[step.id];
1098
+ if (reviewed?.accepted_sources !== undefined)
1099
+ inputs.accepted_sources = await retainReviewedFiles(reviewed.accepted_sources);
1100
+ if (reviewed?.qualification !== undefined)
1101
+ inputs.qualification = reviewed.qualification;
1102
+ }
1103
+ if (alignedVoiceReview) {
1104
+ const reviewed = sourceReviews[step.id];
1105
+ if (reviewed?.reviewed_alignments !== undefined)
1106
+ inputs.reviewed_alignments = await retainReviewedFiles(reviewed.reviewed_alignments);
1107
+ }
966
1108
  const ref = (0, lock_1.lockedRef)(step.part, this.lock);
967
1109
  const out = await this.runStep({ id: step.id, ref, loaded, inputs, models: this.modelsOf(ref, loaded), fix: round }, hashes);
1110
+ acceptTimeline(out);
968
1111
  outputs.set(step.id, out);
969
- if (out.timeline && typeof out.timeline === 'object')
970
- timeline = out.timeline;
1112
+ const provenance = out.provenance;
1113
+ const creatorPending = stagedSourceReview && out.content_review_status === 'pending' && provenance?.source_content_review !== 'pass';
1114
+ const voiceTimingPending = alignedVoiceReview && out.timing_status === 'requires_reviewed_alignment';
1115
+ const voiceInputRevision = (0, canonical_1.canonicalHash)((0, canonical_1.hashView)({ ...inputs, reviewed_alignments: undefined }));
1116
+ const voiceSources = alignedVoiceReview ? fileRefsIn(out).filter((file) => file.media === 'audio') : [];
1117
+ const voiceRecord = sourceReviews[step.id];
1118
+ const reviewedVoice = (file) => {
1119
+ const r = Array.isArray(voiceRecord?.voice_reviews) ? voiceRecord.voice_reviews.find((review) => review?.source_sha256 === file.sha256) : null;
1120
+ return !!r && r.inputs_revision === voiceInputRevision && r.status === 'pass' && typeof r.reviewer === 'string' && !!r.reviewer.trim() && r.audio_listened === true && typeof r.start_s === 'number' && Number.isFinite(r.start_s) && r.start_s === 0 && typeof r.end_s === 'number' && Number.isFinite(r.end_s) && file.duration_s !== undefined && r.end_s >= file.duration_s - 0.02 && ['script', 'voice', 'pronunciation', 'performance'].every((axis) => r.checks?.[axis] === 'pass');
1121
+ };
1122
+ const voiceContentPending = alignedVoiceReview && out.content_review_status === 'pending' && (!voiceSources.length || voiceSources.some((file) => !reviewedVoice(file)));
1123
+ if (creatorPending || voiceTimingPending || voiceContentPending) {
1124
+ await (0, promises_1.mkdir)(this.layout.final, { recursive: true, mode: 0o700 });
1125
+ const request = path.join(this.layout.final, `source-review-request-${step.id}.json`);
1126
+ await (0, save_1.writeJson)(request, { step: step.id, inputs_revision: creatorPending ? (0, canonical_1.canonicalHash)((0, canonical_1.hashView)(inputs)) : voiceInputRevision, outputs: out,
1127
+ instructions: creatorPending ? 'Review the actual source clips with moving picture and audio using the existing ingredient review. Save accepted_sources and qualification under this step in source-reviews.json, then resume the same command. Do not alter the approved script, capture or budget. Failed or incomplete source reviews cannot enter assembly.' : 'Listen to every actual source and finished voice track, including word endings and joins. Save voice_reviews under this step in source-reviews.json. Each record needs source_sha256, this inputs_revision, status pass, reviewer, audio_listened true, start_s 0, end_s covering the whole source, and checks script/voice/pronunciation/performance pass. If measured alignment is missing, also supply reviewed_alignments with tag-free spoken timings. No script, voice or model change is authorized by these review records.',
1128
+ review_file: sourceReviewPath });
1129
+ await this.reportWaiting(exports.WAITING_FOR_SOURCE_REVIEW);
1130
+ throw new errors_1.KitStop(`A source candidate is saved for review at ${request}. Save its actual review in ${sourceReviewPath}, then resume this command; existing paid pieces are reused.`, 'stop', 'source_review_incomplete');
1131
+ }
971
1132
  }
972
1133
  const last = this.style.style.timeline[this.style.style.timeline.length - 1];
973
1134
  const made = outputs.get(last.id)?.video;
@@ -975,27 +1136,38 @@ class Maker {
975
1136
  throw new errors_1.KitStop('The style’s last step made no video.', 'change_request');
976
1137
  let cut = made;
977
1138
  timeline ??= await this.bareTimeline(cut);
1139
+ const assemblyBeforeLayers = (0, assembly_timeline_1.normalizeAssemblyTimeline)(assemblyRaw, { speech: this.style.style.traits.speech });
1140
+ if (assemblyBeforeLayers.status === 'invalid')
1141
+ throw new errors_1.KitStop(`The source-linked edit is inconsistent: ${assemblyBeforeLayers.issues.join(' ')}`, 'change_request', 'output_invalid');
978
1142
  let words;
979
1143
  let captions;
980
1144
  let verdict = null;
1145
+ let beforeSound;
981
1146
  for (const slot of this.layersOn()) {
1147
+ if (slot === 'sound')
1148
+ beforeSound = cut.path;
982
1149
  const id = `layer-${slot}`;
983
1150
  const loaded = this.parts.get(id);
984
1151
  const ref = { id: loaded.manifest.id, version: loaded.manifest.version };
985
1152
  const { inputs, round } = fixed(id, { video: cut, timeline, brand: this.brand, expect: expectationOf(this.style.style, this.handed.plan), ...(words ? { words } : {}) });
1153
+ const linked = exposeAssemblyToDeclaredSchema(loaded, inputs);
986
1154
  const out = await this.runStep({ id, ref, loaded, inputs, models: this.modelsOf(ref, loaded), fix: round }, hashes);
987
1155
  if (slot === 'check') {
1156
+ // The check judges the video; it never replaces its timeline or its source-linked edit.
1157
+ collectFiles(out);
988
1158
  verdict = out.verdict;
989
1159
  continue;
990
1160
  }
1161
+ acceptTimeline(out);
1162
+ if (assemblyRaw && !linked && (slot === 'sound' || slot === 'captions')) {
1163
+ this.deps.log.write('warn', 'a layer cannot update the source-linked timeline', { step: id, part: `${ref.id}@${ref.version}`, note: 'its changes are checked only by the final measurements' });
1164
+ }
991
1165
  const video = out.video;
992
1166
  if (!(0, canonical_1.isFileRef)(video) || video.media !== 'video') {
993
1167
  this.deps.log.write('error', 'layer made no video', { step: id });
994
1168
  throw new errors_1.KitStop(`Finishing this video gave back no video. ${PLAN_CHANGE}`, 'change_request', 'output_invalid');
995
1169
  }
996
1170
  cut = video;
997
- if (out.timeline && typeof out.timeline === 'object')
998
- timeline = out.timeline;
999
1171
  if (slot === 'captions') {
1000
1172
  if ((0, canonical_1.isFileRef)(out.words))
1001
1173
  words = out.words;
@@ -1005,7 +1177,51 @@ class Maker {
1005
1177
  }
1006
1178
  if (!verdict || typeof verdict.pass !== 'boolean' || !Array.isArray(verdict.checks))
1007
1179
  throw new errors_1.KitStop('The final check gave no verdict.', 'change_request');
1008
- return { cut, captions, verdict, steps: hashes, timeline };
1180
+ const assembly = (0, assembly_timeline_1.normalizeAssemblyTimeline)(assemblyRaw, { speech: this.style.style.traits.speech });
1181
+ if (assembly.status === 'invalid')
1182
+ throw new errors_1.KitStop(`The finished edit has inconsistent source timing: ${assembly.issues.join(' ')}`, 'change_request', 'output_invalid');
1183
+ if (assembly.timeline) {
1184
+ if (Math.abs(assembly.timeline.duration_ms / 1000 - timeline.duration_s) > Math.max(0.05, 2 / timeline.fps))
1185
+ throw new errors_1.KitStop('The finished picture duration differs from its source-linked edit.', 'change_request', 'output_invalid');
1186
+ // A path in a declaration is insufficient: resolve against registered, hash-checked files.
1187
+ const pictures = (0, assembly_timeline_1.assemblyPictureSources)(assembly.timeline);
1188
+ const audible = [...assembly.timeline.audio_cues.map((c) => c.source),
1189
+ ...assembly.timeline.segments.flatMap((s) => s.speech_driver ? [s.speech_driver] : [])];
1190
+ const linked = [...pictures.map((p) => p.source), ...audible];
1191
+ const sourceProbe = (0, toolchain_1.kitTools)({ ffmpeg: this.tools.ffmpeg.path ?? 'ffmpeg', ffprobe: this.tools.ffprobe.path ?? 'ffprobe', toolchain: this.toolchain }, this.stop.signal).probe;
1192
+ for (const source of linked) {
1193
+ const file = sourceFiles.get(source.sha256);
1194
+ if (!file || !(await (0, files_1.intact)(file)))
1195
+ throw new errors_1.KitStop(`A timeline source is missing or changed: ${source.asset_id}`, 'change_request', 'output_invalid');
1196
+ const sourcePictures = pictures.filter((p) => p.source.sha256 === source.sha256 && p.source.asset_id === source.asset_id);
1197
+ if (sourcePictures.some((p) => p.source_kind !== file.media))
1198
+ throw new errors_1.KitStop(`A picture source has a different media kind: ${source.asset_id}`, 'change_request', 'output_invalid');
1199
+ const actual = await sourceProbe(file.path);
1200
+ if (sourcePictures.length && !actual.has_video)
1201
+ throw new errors_1.KitStop(`A picture source has no readable picture: ${source.asset_id}`, 'change_request', 'output_invalid');
1202
+ for (const { source: shown } of sourcePictures) {
1203
+ const crop = shown.crop;
1204
+ if (!crop)
1205
+ continue;
1206
+ if (!actual.width || !actual.height || crop.x + crop.w > actual.width || crop.y + crop.h > actual.height)
1207
+ throw new errors_1.KitStop(`A picture crop is outside its ${actual.width ?? '?'}×${actual.height ?? '?'} source: ${source.asset_id}`, 'change_request', 'output_invalid');
1208
+ // Zoom, not resolution: scaling the whole frame up is fine, cropping in past 1.5x is not.
1209
+ const zoom = (0, assembly_timeline_1.cropZoom)(crop, { width: actual.width, height: actual.height }, timeline);
1210
+ if (zoom > assembly_timeline_1.MAX_ZOOM + 1e-9)
1211
+ throw new errors_1.KitStop(`A picture crop zooms in ${zoom.toFixed(2)}x, over the ${assembly_timeline_1.MAX_ZOOM}x limit: ${source.asset_id}. Use a wider or sharper source.`, 'change_request', 'output_invalid');
1212
+ }
1213
+ if (audible.some((a) => a.sha256 === source.sha256 && a.asset_id === source.asset_id) && !actual.has_audio)
1214
+ throw new errors_1.KitStop(`An audio source has no readable audio: ${source.asset_id}`, 'change_request', 'output_invalid');
1215
+ // A still is intentionally held; only moving/audio sources have a media clock.
1216
+ if (file.media !== 'image' && (actual.duration_s === undefined || source.out_ms > actual.duration_s * 1000 + 1))
1217
+ throw new errors_1.KitStop(`A timeline source window exceeds the actual file: ${source.asset_id}`, 'change_request', 'output_invalid');
1218
+ source.path = file.path;
1219
+ }
1220
+ timeline.assembly_timeline = assembly.timeline;
1221
+ }
1222
+ if (contentReview && typeof contentReview === 'object')
1223
+ timeline.content_review = contentReview;
1224
+ return { cut, captions, verdict, steps: hashes, timeline, beforeSound };
1009
1225
  }
1010
1226
  /** A style step's inputs: a reference the kit can't resolve goes to the log, plain words to the person. */
1011
1227
  bind(stepId, inputs, scope) {
@@ -1364,6 +1580,75 @@ class Maker {
1364
1580
  captions_vtt = captions.toString('utf8');
1365
1581
  }
1366
1582
  const eyes = await this.lookAt(candidate, current);
1583
+ const assembly = (0, assembly_timeline_1.normalizeAssemblyTimeline)(current.timeline.assembly_timeline, { speech: this.style.style.traits.speech });
1584
+ let contentReview = current.timeline.content_review;
1585
+ const reviewPath = path.join(this.layout.final, 'content-review.json');
1586
+ try {
1587
+ contentReview = JSON.parse(await (0, promises_1.readFile)(reviewPath, 'utf8'));
1588
+ }
1589
+ catch (error) {
1590
+ if (error.code !== 'ENOENT')
1591
+ throw new errors_1.KitStop('The saved content review could not be read. Repair that JSON before resuming.', 'change_request', 'output_invalid');
1592
+ }
1593
+ const custom = this.style.style.id.startsWith('custom-');
1594
+ let measuredDurationMs = null;
1595
+ let hasAudio = false;
1596
+ if (custom) {
1597
+ try {
1598
+ const probe = (0, toolchain_1.kitTools)({ ffmpeg: this.tools.ffmpeg.path ?? '', ffprobe: this.tools.ffprobe.path ?? '', toolchain: this.toolchain }, this.stop.signal).probe;
1599
+ const info = await probe(candidate);
1600
+ measuredDurationMs = (0, assembly_timeline_1.measuredFinalDurationMs)(info.duration_s);
1601
+ hasAudio = info.has_audio === true;
1602
+ }
1603
+ catch {
1604
+ // Missing measurement leaves review incomplete; the edit clock is not a fallback.
1605
+ }
1606
+ }
1607
+ // Early feedback on the exact bytes (gooseworks-final-measure/1); the server measures them again and decides.
1608
+ let finalMeasure = null;
1609
+ let measureProblem = null;
1610
+ const measurePath = path.join(this.layout.final, 'final-measure.json');
1611
+ if (custom) {
1612
+ if (measuredDurationMs === null || !this.tools.ffmpeg.path)
1613
+ measureProblem = 'its length could not be read';
1614
+ else {
1615
+ try {
1616
+ finalMeasure = await (0, final_measure_1.measureFinal)({ ffmpeg: this.tools.ffmpeg.path, file: candidate, outputSha256: sha256, durationMs: measuredDurationMs, hasAudio, timeline: assembly.timeline, signal: this.stop.signal });
1617
+ }
1618
+ catch (error) {
1619
+ measureProblem = 'the video tools could not read it';
1620
+ this.deps.log.write('warn', 'the final could not be measured', { error: error instanceof Error ? error.message : String(error) });
1621
+ }
1622
+ }
1623
+ await (0, save_1.writeJson)(measurePath, finalMeasure ?? { format: final_measure_1.FINAL_MEASURE_FORMAT, output_sha256: sha256, measured_duration_ms: measuredDurationMs, checks: [], error: measureProblem });
1624
+ }
1625
+ const measureFailures = finalMeasure ? (0, final_measure_1.finalMeasureFailures)(finalMeasure) : [];
1626
+ const contentProblems = (0, assembly_timeline_1.finalContentReviewProblems)(contentReview, sha256, assembly, custom ? measuredDurationMs : undefined, finalMeasure);
1627
+ await (0, save_1.writeJson)(path.join(this.layout.final, 'assembly-evidence.json'), { output_sha256: sha256, measured_duration_ms: measuredDurationMs, ...assembly, source_bytes_verified: assembly.status === 'complete', content_review_status: contentProblems.length ? 'incomplete' : 'approved', content_review_problems: contentProblems });
1628
+ if (custom && (measureProblem || measureFailures.length)) {
1629
+ this.run.status = 'failed';
1630
+ await this.saveRun();
1631
+ await this.reportWaiting(exports.WAITING_FOR_MEASURED_FIX);
1632
+ this.reporter.close();
1633
+ const why = measureProblem ? `The candidate at ${candidate} could not be measured (${measureProblem}), so it wasn’t sent.` : `The candidate at ${candidate} failed its measured checks, so it wasn’t sent. ${measureFailures.join(' ')}`;
1634
+ return { status: 'stopped', code: 'final_measure_failed', message: `${why} Fix the edit, then run the same command again; unchanged assets are reused. The measurements are in ${measurePath}.` };
1635
+ }
1636
+ if (custom && contentProblems.length) {
1637
+ await (0, save_1.writeJson)(path.join(this.layout.final, 'review-request.json'), {
1638
+ candidate, output_sha256: sha256, measured_duration_ms: measuredDurationMs, timeline_revision: assembly.revision,
1639
+ creative_contract_revision: assembly.timeline?.creative_contract_revision ?? null,
1640
+ assembly_issues: assembly.issues, content_review_problems: contentProblems, final_measure_file: measurePath,
1641
+ instructions: 'Review this exact candidate from start to end. Record actual observations and unresolved issues (severity P0, P1 or P2; only P2 lets it go up). Save the completed review as content-review.json beside this request, then resume the same video make command. capabilities says how you perceived it: audio is listened only when a person or an audio-capable model heard the whole final, otherwise measured; motion is watched only when the moving picture was actually watched, otherwise measured. A measured review is accepted only when the final measurements pass (final-measure.json). Never claim listened or watched that did not happen. Fields not in the template are refused.',
1642
+ template: { output_sha256: sha256, timeline_revision: assembly.revision, creative_contract_revision: assembly.timeline?.creative_contract_revision ?? null,
1643
+ reviewer: '', verdict: 'incomplete', capabilities: { audio: 'measured', motion: 'measured' }, coverage: [], unresolved_issues: [],
1644
+ dimensions: Object.fromEntries(assembly_timeline_1.CONTENT_DIMENSIONS.map((name) => [name, { status: 'incomplete', note: 'Not reviewed yet' }])) },
1645
+ });
1646
+ this.run.status = 'failed';
1647
+ await this.saveRun();
1648
+ await this.reportWaiting(exports.WAITING_FOR_CONTENT_REVIEW);
1649
+ this.reporter.close();
1650
+ return { status: 'stopped', code: 'content_review_incomplete', message: `The candidate is saved at ${candidate}. Its picture/audio review is incomplete. Save the actual review in ${reviewPath}, then resume the same command; unchanged assets are reused.` };
1651
+ }
1367
1652
  this.book.note = 'Sending your video for its final check';
1368
1653
  this.run.status = 'uploading';
1369
1654
  await this.saveRun();
@@ -1371,7 +1656,14 @@ class Maker {
1371
1656
  let check;
1372
1657
  try {
1373
1658
  const noted = [...verdictWarnings(current.verdict), ...(eyes?.warnings ?? [])].slice(0, MAX_SENT_WARNINGS);
1374
- check = await this.sendUpload(sha256, data, captions_vtt, { ...this.manifestFor(current.steps), ...(noted.length ? { check_warnings: noted } : {}) });
1659
+ check = await this.sendUpload(sha256, data, captions_vtt, { ...this.manifestFor(current.steps),
1660
+ // Local file paths stay on this computer; the revision never included them.
1661
+ ...(assembly.timeline ? { assembly_timeline: (0, assembly_timeline_1.portableTimeline)(assembly.timeline) } : {}),
1662
+ ...(contentReview ? { content_review: contentReview } : {}),
1663
+ ...(finalMeasure ? { final_measure: finalMeasure } : {}),
1664
+ assembly_evidence: { status: assembly.status, revision: assembly.revision, output_sha256: sha256, source_bytes_verified: assembly.status === 'complete', issues: assembly.issues },
1665
+ content_review_status: contentProblems.length ? 'incomplete' : 'approved',
1666
+ ...(noted.length ? { check_warnings: noted } : {}) });
1375
1667
  }
1376
1668
  catch (error) {
1377
1669
  if (error instanceof client_1.LineError)
@@ -1386,7 +1678,7 @@ class Maker {
1386
1678
  await this.cleanTmp();
1387
1679
  return {
1388
1680
  status: 'done',
1389
- message: `Your video is ready. It passed the final check. Saved here: ${final}`,
1681
+ message: `The video was made and passed its file checks. Review the actual picture and audio before calling it ready. Saved here: ${final}`,
1390
1682
  final,
1391
1683
  ...(eyes?.contact_sheet ? { contact_sheet: eyes.contact_sheet } : {}),
1392
1684
  ...(eyes?.warnings.length ? { warnings: eyes.warnings.map((w) => w.message) } : {}),
@@ -1423,6 +1715,8 @@ class Maker {
1423
1715
  * that upload, which gives the same answer.
1424
1716
  */
1425
1717
  async sendUpload(sha256, data, captions_vtt, manifest) {
1718
+ if (Buffer.byteLength(JSON.stringify(manifest), 'utf8') > MAX_MANIFEST_BYTES)
1719
+ throw new errors_1.KitStop('The source and review record exceeds the upload limit. Keep the candidate and move lengthy supporting notes to evidence files before resuming.', 'change_request', 'bad_input');
1426
1720
  const { line } = this.deps;
1427
1721
  const saved = (await this.store.readUpload()) ?? { uploads: [] };
1428
1722
  const finish = async (stage) => {
@@ -1474,6 +1768,8 @@ class Maker {
1474
1768
  ffmpeg,
1475
1769
  final,
1476
1770
  timeline: made.timeline,
1771
+ beforeSound: made.beforeSound,
1772
+ custom: this.style.style.id.startsWith('custom-'),
1477
1773
  products: products.map((p) => ({
1478
1774
  ...(typeof p?.name === 'string' ? { name: p.name } : {}),
1479
1775
  photos: (Array.isArray(p?.images) ? p.images : []).filter((ref) => (0, canonical_1.isFileRef)(ref) && ref.media === 'image').map((ref) => ref.path),