ossclip 0.1.31 → 0.1.34

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.
@@ -0,0 +1,50 @@
1
+ /**
2
+ * The argv the editor's Render button replays (2026-08-29).
3
+ *
4
+ * A render started FROM the editor must reproduce what the user just
5
+ * reviewed. Replaying `command.json` verbatim did not: it carried
6
+ * `--produce`, so every render re-called the LLM, and the beat-sheet cache
7
+ * key covers the repaired words and the MEASURED framing — both of which the
8
+ * user's own editor work changes. The plan came back renumbered, edits
9
+ * anchored to scenes it no longer had were orphaned, and an approved cut was
10
+ * silently rewritten (the failure `produce.ts`' §143 note already named once,
11
+ * 2026-08-23; hit again through a different door).
12
+ *
13
+ * So the editor pins the plan on screen with `--scenes` (no LLM in the loop)
14
+ * and drops `--produce`. The two paths stay distinct on purpose:
15
+ *
16
+ * - CLI/CI: `--produce` plans fresh. The command line is the authority.
17
+ * - Editor: the reviewed plan is the authority; `replan` opts back in.
18
+ *
19
+ * Pure, so the whole matrix is testable without spawning a produce.
20
+ */
21
+ /** The reviewed plan the editor pins for a render (see the module docstring).
22
+ * Its own name, never `scenes-<key>.json`: those are keyed to a beat sheet
23
+ * this render may no longer match. */
24
+ export const REVIEWED_SCENES_BASENAME = "scenes-reviewed.json";
25
+
26
+ export function renderReplayArgs(
27
+ recorded: readonly string[],
28
+ opts: { scenesPath?: string; replan?: boolean },
29
+ ): string[] {
30
+ // A deliberate re-plan replays exactly what was recorded — including
31
+ // `--produce` when it was there, since that IS the fresh-plan request.
32
+ if (opts.replan === true || opts.scenesPath === undefined) return [...recorded];
33
+
34
+ const out: string[] = [];
35
+ for (let i = 0; i < recorded.length; i++) {
36
+ const arg = recorded[i]!;
37
+ // `--produce` is a boolean flag: drop it alone, never a following value.
38
+ if (arg === "--produce") continue;
39
+ // An existing `--scenes <path>` is dropped WITH its value: two of them
40
+ // would let commander pick one, and the stale one is precisely the plan
41
+ // the editor is not showing.
42
+ if (arg === "--scenes") {
43
+ i++;
44
+ continue;
45
+ }
46
+ out.push(arg);
47
+ }
48
+ out.push("--scenes", opts.scenesPath);
49
+ return out;
50
+ }
@@ -58,6 +58,8 @@ export function recordedProduceArgs(pins: {
58
58
  llmEffort?: "low" | "medium" | "high";
59
59
  clipWindow?: string;
60
60
  watermark?: boolean;
61
+ /** The RESOLVED cover-overlay switch — config-dependent, so pinned both ways. */
62
+ coverInVideo?: boolean;
61
63
  captions?: boolean;
62
64
  jumpCuts?: JumpCutsMode;
63
65
  /** The RESOLVED dictionary terms — pinned only when non-empty. */
@@ -110,6 +112,20 @@ export function recordedProduceArgs(pins: {
110
112
  if (pins.watermark !== undefined && !args.includes("--watermark") && !args.includes("--no-watermark")) {
111
113
  args.push(pins.watermark ? "--watermark" : "--no-watermark");
112
114
  }
115
+ // The cover overlay, the watermark's rationale VERBATIM and for a live
116
+ // reason, not future-proofing: its effective default is config-dependent
117
+ // (`coverInVideo: true` in ~/.ossclip/config.json), so an unpinned record
118
+ // would gain — or lose — an overlay on the first frames of the replayed
119
+ // video the moment that config is edited, or the moment Render runs on
120
+ // another machine. Both directions, includes-guarded on BOTH spellings so a
121
+ // typed flag is never doubled.
122
+ if (
123
+ pins.coverInVideo !== undefined &&
124
+ !args.includes("--cover-in-video") &&
125
+ !args.includes("--no-cover-in-video")
126
+ ) {
127
+ args.push(pins.coverInVideo ? "--cover-in-video" : "--no-cover-in-video");
128
+ }
113
129
  // The captions flag, pinned both ways like the watermark above — but here
114
130
  // as future-proofing plus consistency rather than a live bug: captions'
115
131
  // default is ON independent of any config today, so an argv without the
@@ -204,7 +204,11 @@ export class StageAnimator {
204
204
  const spinner = SPINNERS.neural[this.frameIndex % SPINNERS.neural.length];
205
205
  const dots = SPINNERS.dots[this.frameIndex % SPINNERS.dots.length];
206
206
  visual =
207
- `${ansi.bold}${ansi.brightMagenta}⚡ GEMINI 3.7 FLASH // NEURAL SCENE PLANNER${ansi.reset} ` +
207
+ // The caller's title, not a hardcoded model name: this header once
208
+ // said "GEMINI 3.7 FLASH" over a claude-cli run (2026-08-26 field
209
+ // report) — the subtitle names the real provider, and the header
210
+ // must not contradict it.
211
+ `${ansi.bold}${ansi.brightMagenta}⚡ ${this.title}${ansi.reset} ` +
208
212
  `${ansi.cyan}[${spinner}]${ansi.reset} ${ansi.dim}(${elapsedSec}s)${ansi.reset}\n` +
209
213
  ` ${ansi.brightCyan}${dots}${ansi.reset} ${ansi.brightWhite}${clamp(this.subtitle)}${ansi.reset}`;
210
214
  } else if (this.type === "whisper") {