@cliptude/cli 0.1.42 → 0.1.43

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.
@@ -701,6 +701,8 @@ def main(argv: list[str] | None = None) -> None:
701
701
  rn.add_argument("--wait", action="store_true", help="Poll until the render finishes")
702
702
  rn.add_argument("--accept-quality-findings", action="store_true",
703
703
  help="Agent-planned jobs: render although plan-review still lists plan quality findings")
704
+ rn.add_argument("--skip-frame-review", action="store_true",
705
+ help="Agent-planned jobs: render without having viewed every scene (only when the user says so)")
704
706
  _add_review_args(rn)
705
707
 
706
708
  rs = sub.add_parser("render-status", help="Get an editor render (output_url when done)")
@@ -977,6 +979,7 @@ def main(argv: list[str] | None = None) -> None:
977
979
  elif args.cmd == "render":
978
980
  payload = _spend_reviewed(args, lambda token: client.render_project(
979
981
  args.project_id, accept_quality_findings=args.accept_quality_findings, review_token=token,
982
+ skip_frame_review=args.skip_frame_review,
980
983
  ), "Render this MP4?")
981
984
  if args.wait:
982
985
  render_id = (payload.get("render") or {}).get("id")
@@ -1207,11 +1207,15 @@ class CliptudeClient:
1207
1207
 
1208
1208
  def render_project(
1209
1209
  self, project_id: int | str, *, accept_quality_findings: bool = False, review_token: str | None = None,
1210
+ skip_frame_review: bool = False,
1210
1211
  ) -> Any:
1211
1212
  """Render the edited timeline to a new MP4: free the first time, then 10% of the original generation.
1212
1213
 
1213
- A paid export first answers with the review (HTTP 428): resend with review_token."""
1214
+ A paid export first answers with the review (HTTP 428): resend with review_token. An agent-planned job
1215
+ answers 409 frames_not_viewed until view_scenes covered the timeline (skip_frame_review overrides)."""
1214
1216
  body: dict[str, Any] = {"accept_quality_findings": True} if accept_quality_findings else {}
1217
+ if skip_frame_review:
1218
+ body["skip_frame_review"] = True
1215
1219
  body.update(_review_job_fields(review_token, None, None))
1216
1220
  return self.request("POST", f"/api/v1/editor-projects/{_int_seg(project_id)}/render", json_body=body or None)
1217
1221
 
@@ -296,7 +296,7 @@ def build_server(*, with_http_auth: bool = False):
296
296
  "create_plan_job with script (prompt only when the user asks Cliptude to write it), poll get_job until "
297
297
  "plan_ready, get_narration (numbered sentences), get_kind_catalog (compact first), write the "
298
298
  "plan, check_plan until valid, lock_plan, continue_job, then get_plan_report. ONE REVIEW: when the first "
299
- "build is ready, open_editor_project and look at EVERY frame with view_scenes (0 to the end) once: replace "
299
+ "build is ready, open_editor_project and look at EVERY frame with view_scenes (0 to the end) once, even when get_plan_review lists no findings (render_project refuses until you have): replace "
300
300
  "any dead body or gore, other brands, logos, album art, footage of a game, match or show the video is not about, title cards, pictures whose place or era "
301
301
  "contradicts the story (a search naming a place can return a namesake elsewhere), near-black frames, clips floating in black bars, broken AI pictures and any picture held over ~8 s, all in ONE free revision whose fixes carry the replacement itself (footage, pictures or photos you downloaded and uploaded with upload_plan_media, used as keep; corrected board text). A job takes one revision (a second answers 409 review_used): Cliptude renders the revised build itself; poll get_job until render.status is completed and call show_publish_kit. Never review the rebuild or ask the user to. Generic "
302
302
  "shots of places name the story's setting (\"empty bed mud house\", not \"empty bed dark room\"). A video "
@@ -1195,7 +1195,7 @@ def build_server(*, with_http_auth: bool = False):
1195
1195
  def get_plan_review(
1196
1196
  job_id: Annotated[str, Field(min_length=8, description="Plan job UUID (status ready_for_edit)")],
1197
1197
  ) -> dict[str, Any]:
1198
- """What the built design shows, before any render: every picture/clip in order (beat, time, the sentence under it, what you asked for, what was used, a link to the file, and picked.why: why that file won, with a count of the other candidates get_plan_candidates lists for the beat) and every graphic (time on screen and the props it will be drawn with, or why it is missing), plus quality_findings: Cliptude's quality checks on the build. Fix every finding with fix_in "plan" (follow its how); fix_in "cliptude" ones are not yours. This is the job's one review: fix everything in one revision (check_plan/lock_plan + continue_job on the same job), choosing each replacement from get_plan_candidates or uploading your own, as keep; Cliptude renders the revised build itself and a second revision is refused (409 review_used). Poll get_job until render.status is completed, then show_publish_kit. If nothing needs fixing, render_project once (it refuses while plan findings remain unless accept_quality_findings is true), then show_publish_kit."""
1198
+ """What the built design shows, before any render: every picture/clip in order (beat, time, the sentence under it, what you asked for, what was used, a link to the file, and picked.why: why that file won, with a count of the other candidates get_plan_candidates lists for the beat) and every graphic (time on screen and the props it will be drawn with, or why it is missing), plus quality_findings: Cliptude's quality checks on the build. Fix every finding with fix_in "plan" (follow its how); fix_in "cliptude" ones are not yours. This is the job's one review: fix everything in one revision (check_plan/lock_plan + continue_job on the same job), choosing each replacement from get_plan_candidates or uploading your own, as keep; Cliptude renders the revised build itself and a second revision is refused (409 review_used). Poll get_job until render.status is completed, then show_publish_kit. An empty quality_findings list is not a review: it only means Cliptude's own checks passed. Look at the video yourself with view_scenes (0 to the end) before deciding nothing needs fixing; render_project refuses an agent-planned job until you have (409 frames_not_viewed). If nothing needs fixing, render_project once (it also refuses while plan findings remain unless accept_quality_findings is true), then show_publish_kit."""
1199
1199
  try:
1200
1200
  return _untrusted(_client().get_plan_review(job_id))
1201
1201
  except Exception as exc:
@@ -1518,11 +1518,15 @@ def build_server(*, with_http_auth: bool = False):
1518
1518
  str | None,
1519
1519
  Field(description=SPEND_REVIEW_TOKEN_HELP),
1520
1520
  ] = None,
1521
+ skip_frame_review: Annotated[
1522
+ bool,
1523
+ Field(description="Agent-planned jobs only: render although view_scenes has not covered the whole video. Set it only when the user says to ship without looking."),
1524
+ ] = False,
1521
1525
  ) -> dict[str, Any]:
1522
- """Render the edited timeline to a new MP4. The first export of a project is free; later exports cost 10% of the original generation (export_credits_due on the project says the exact amount). A paid export first returns a review (status 428, detail.review with the credits) and renders nothing: show it to the user, wait for their explicit OK, then call again with the same arguments and review_token. Poll get_render for output_url. On an agent-planned job, a first build with quality_findings the plan can fix returns 409 quality_findings_open: fix them in the job's one revision (Cliptude then renders that build itself, so this call is not needed)."""
1526
+ """Render the edited timeline to a new MP4. The first export of a project is free; later exports cost 10% of the original generation (export_credits_due on the project says the exact amount). A paid export first returns a review (status 428, detail.review with the credits) and renders nothing: show it to the user, wait for their explicit OK, then call again with the same arguments and review_token. Poll get_render for output_url. On an agent-planned job, a first build with quality_findings the plan can fix returns 409 quality_findings_open: fix them in the job's one revision (Cliptude then renders that build itself, so this call is not needed). An agent-planned job also answers 409 frames_not_viewed until you have looked at the whole video with view_scenes (0 to the end, following next_start_s): a clean get_plan_review is not a review, only Cliptude's own checks passing."""
1523
1527
  try:
1524
1528
  return _client().render_project(project_id, accept_quality_findings=accept_quality_findings,
1525
- review_token=review_token)
1529
+ review_token=review_token, skip_frame_review=skip_frame_review)
1526
1530
  except Exception as exc:
1527
1531
  return _err(exc)
1528
1532
 
@@ -521,11 +521,19 @@ var Views = (function () {
521
521
  var id = String(job.id || job.job_id || "");
522
522
  var stage = job.stage || job.status || "";
523
523
  var label = STATUS_LABELS[stage] || String(stage).replace(/_/g, " ");
524
- var pct = Math.max(0, Math.min(100, Number(job.progress || 0)));
524
+ // get_job sends progress as a fraction (0.5 while sourcing); it was drawn as 0.5% and read "1%".
525
+ var raw = Number(job.progress || 0);
526
+ var pct = Math.max(0, Math.min(100, raw <= 1 ? raw * 100 : raw));
527
+ // The job's own progress moves by stage (sourcing sits at one value for most of the build), so a step that
528
+ // counts its work ("Sourcing B-roll assets... (88/105, reused 0)") drives the bar while it runs.
529
+ var stepMatch = /\((\d+)\s*\/\s*(\d+)/.exec(String(job.current_step || ""));
530
+ var stepPct = null;
531
+ if (stepMatch && Number(stepMatch[2]) > 0) stepPct = Math.max(0, Math.min(100, 100 * Number(stepMatch[1]) / Number(stepMatch[2])));
525
532
  var failed = stage === "failed" || job.status === "failed";
526
533
  var ready = isReady(job);
527
534
  var done = ready || failed || job.status === "completed" || stage === "plan_ready" || stage === "script_ready";
528
535
  if (ready) pct = 100;
536
+ var barPct = (!ready && stepPct !== null) ? stepPct : pct;
529
537
 
530
538
  UI.clear(container);
531
539
  container.appendChild(h("div", { class: "head" }, [
@@ -534,11 +542,12 @@ var Views = (function () {
534
542
  ]));
535
543
  if (!failed) {
536
544
  container.appendChild(h("div", { class: "bar", role: "progressbar", "aria-valuemin": "0", "aria-valuemax": "100",
537
- "aria-valuenow": String(Math.round(pct)), "aria-label": "Progress" }, [h("span", { style: { width: pct + "%" } })]));
545
+ "aria-valuenow": String(Math.round(barPct)), "aria-label": stepPct !== null && !ready ? "Progress of this step" : "Progress" },
546
+ [h("span", { style: { width: barPct + "%" } })]));
538
547
  }
539
548
  var facts = [];
540
549
  if (!done && job.current_step) facts.push(h("span", {}, [String(job.current_step)]));
541
- if (!done) facts.push(h("span", { class: "muted" }, [Math.round(pct) + "%"]));
550
+ if (!done) facts.push(h("span", { class: "muted" }, [stepPct !== null ? Math.round(stepPct) + "% of this step" : Math.round(pct) + "%"]));
542
551
  if (job.estimated_minutes && !done) facts.push(h("span", { class: "muted" }, ["≈ " + job.estimated_minutes + " min"]));
543
552
  if (job.duration) facts.push(h("span", { class: "muted" }, [job.duration + " min video"]));
544
553
  if (id) facts.push(h("span", { class: "muted" }, ["Job " + id.slice(0, 8)]));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cliptude/cli",
3
- "version": "0.1.42",
3
+ "version": "0.1.43",
4
4
  "description": "Cliptude CLI — generate videos from saved templates.",
5
5
  "homepage": "https://github.com/cliptude/cliptude#readme",
6
6
  "bin": {
package/pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "cliptude-mcp"
7
- version = "0.1.42"
7
+ version = "0.1.43"
8
8
  description = "Cliptude jobs CLI and MCP server (thin client of /api/v1)."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"