@seecoolai/cli 0.1.0-canary.6.c03a4a20 → 0.1.0-canary.8.2b883823

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.
package/dist/bin.mjs CHANGED
@@ -7156,9 +7156,31 @@ const TERMINAL_STATUSES = /* @__PURE__ */ new Set([
7156
7156
  "idle",
7157
7157
  "done"
7158
7158
  ]);
7159
+ const FAILED_STATUSES = /* @__PURE__ */ new Set([
7160
+ "fail",
7161
+ "failed",
7162
+ "error",
7163
+ "cancelled",
7164
+ "canceled",
7165
+ "timeout"
7166
+ ]);
7159
7167
  function isRecord$7(value) {
7160
7168
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
7161
7169
  }
7170
+ function isFailedStatus(status) {
7171
+ if (typeof status !== "string") return false;
7172
+ return FAILED_STATUSES.has(status.trim().toLowerCase());
7173
+ }
7174
+ function isTaskInfoFailed(task) {
7175
+ if (!isRecord$7(task)) return false;
7176
+ if (isFailedStatus(task.status)) return true;
7177
+ if (isRecord$7(task.stats_json)) {
7178
+ const failedCount = typeof task.stats_json.fail === "number" ? task.stats_json.fail : 0;
7179
+ const completedCount = typeof task.stats_json.completed === "number" ? task.stats_json.completed : 0;
7180
+ if (failedCount > 0 && completedCount === 0) return true;
7181
+ }
7182
+ return false;
7183
+ }
7162
7184
  function classifyStatus(status) {
7163
7185
  if (typeof status !== "string") return "unknown";
7164
7186
  const normalized = status.trim().toLowerCase();
@@ -7205,6 +7227,27 @@ function isCharacterBatchSettled(payload, taskType) {
7205
7227
  return isBatchPayloadSettled(payload);
7206
7228
  }
7207
7229
  /**
7230
+ * Checks whether a settled `/api/script-character-ai-batch/status` payload contains
7231
+ * any failed extraction/generation task.
7232
+ */
7233
+ function hasCharacterBatchFailure(payload, taskType) {
7234
+ if (!isRecord$7(payload)) return false;
7235
+ if (isRecord$7(payload.batches)) {
7236
+ const batches = payload.batches;
7237
+ if (taskType) return isTaskInfoFailed(batches[taskType]);
7238
+ for (const [key, entry] of Object.entries(batches)) {
7239
+ if (!entry) continue;
7240
+ if (key === "asset_recommend" && isRecord$7(entry)) {
7241
+ for (const recTask of Object.values(entry)) if (isTaskInfoFailed(recTask)) return true;
7242
+ continue;
7243
+ }
7244
+ if (isTaskInfoFailed(entry)) return true;
7245
+ }
7246
+ return false;
7247
+ }
7248
+ return isTaskInfoFailed(payload);
7249
+ }
7250
+ /**
7208
7251
  * Settlement check for `/api/storyboard-ai-batch/generate-storyboard-status`.
7209
7252
  * Real backend shape: `{ task_id, status: "pending" | "in_progress" | "completed" | "fail", ... }` or array.
7210
7253
  */
@@ -7216,6 +7259,17 @@ function isStoryboardSplitSettled(payload) {
7216
7259
  return isBatchPayloadSettled(payload);
7217
7260
  }
7218
7261
  /**
7262
+ * Checks whether a settled `/api/storyboard-ai-batch/generate-storyboard-status` payload
7263
+ * terminated in a failed state.
7264
+ */
7265
+ function hasStoryboardSplitFailure(payload) {
7266
+ if (!payload) return false;
7267
+ if (Array.isArray(payload)) return payload.some((item) => hasStoryboardSplitFailure(item));
7268
+ if (!isRecord$7(payload)) return false;
7269
+ if ("status" in payload) return isFailedStatus(payload.status);
7270
+ return false;
7271
+ }
7272
+ /**
7219
7273
  * Settlement check for `/api/storyboard-ai-batch/status`.
7220
7274
  * Real backend shape: `Array<{ storyboard_id: number, tasks: Array<{ status, task_type }> }>`.
7221
7275
  */
@@ -7285,14 +7339,6 @@ function isBatchPayloadSettled(payload) {
7285
7339
  if (typeof obj.status === "string") return classifyStatus(obj.status) !== "active";
7286
7340
  return true;
7287
7341
  }
7288
- const FAILED_STATUSES = /* @__PURE__ */ new Set([
7289
- "fail",
7290
- "failed",
7291
- "error",
7292
- "cancelled",
7293
- "canceled",
7294
- "timeout"
7295
- ]);
7296
7342
  const SUCCEEDED_STATUSES = /* @__PURE__ */ new Set([
7297
7343
  "completed",
7298
7344
  "succeeded",
@@ -8387,7 +8433,7 @@ const directCredentialResponseSchema = objectType({
8387
8433
  data: objectType({
8388
8434
  provider: stringType(),
8389
8435
  key: stringType(),
8390
- public_url: stringType().url(),
8436
+ public_url: stringType().nullable().optional(),
8391
8437
  download_url: stringType().nullable().optional(),
8392
8438
  upload: objectType({
8393
8439
  upload_url: stringType().nullable().optional(),
@@ -8541,6 +8587,11 @@ async function uploadFileDirect(client, options) {
8541
8587
  code: "INVALID_UPLOAD_CREDENTIAL",
8542
8588
  exitCode: ExitCode.GeneralError
8543
8589
  });
8590
+ const downloadUrl = typeof cred.download_url === "string" ? cred.download_url.trim() : "";
8591
+ if (!downloadUrl) throw new CliError("Direct upload credential is missing a usable download_url.", {
8592
+ code: "INVALID_UPLOAD_CREDENTIAL",
8593
+ exitCode: ExitCode.GeneralError
8594
+ });
8544
8595
  const fileBytes = fs.readFileSync(resolvedPath);
8545
8596
  const formData = new FormData();
8546
8597
  formData.append("key", fields.key);
@@ -8562,8 +8613,8 @@ async function uploadFileDirect(client, options) {
8562
8613
  return {
8563
8614
  provider: cred.provider,
8564
8615
  key: cred.key,
8565
- url: cred.public_url,
8566
- ...cred.download_url ? { download_url: cred.download_url } : {},
8616
+ url: downloadUrl,
8617
+ download_url: downloadUrl,
8567
8618
  file_name: fileName,
8568
8619
  content_type: contentType,
8569
8620
  size_bytes: stat.size
@@ -9566,17 +9617,11 @@ function assertStoryboardVideoPromptsReady(options) {
9566
9617
  if (id !== null) byId.set(id, sb);
9567
9618
  }
9568
9619
  const missingPromptIds = [];
9569
- const missingFrameIds = [];
9570
- const needsFrameImage = options.mode === "first_frame" || options.mode === "first_last_frame";
9571
9620
  for (const id of options.targetIds) {
9572
9621
  const sb = byId.get(id);
9573
9622
  if (!sb) continue;
9574
9623
  const video = isRecord$3(sb.video) ? sb.video : null;
9575
9624
  if (!video || !hasNonEmptyText(video.video_desc)) missingPromptIds.push(id);
9576
- if (needsFrameImage) {
9577
- const frames = Array.isArray(sb.frames) ? sb.frames.filter(isRecord$3) : [];
9578
- if (!(hasNonEmptyText(sb.selected_image_url) || frames.some((f) => hasNonEmptyText(f.selected_image_url)))) missingFrameIds.push(id);
9579
- }
9580
9625
  }
9581
9626
  if (missingPromptIds.length > 0) throw new CliError(`Cannot generate storyboard videos: ${missingPromptIds.length} storyboard(s) are missing persisted video prompts (video_desc).`, {
9582
9627
  code: "MISSING_VIDEO_PROMPT",
@@ -9584,12 +9629,6 @@ function assertStoryboardVideoPromptsReady(options) {
9584
9629
  hint: `Pass \`--prepare-prompts\` to \`drama storyboard render-videos\` or save video prompts via \`seecool-cli drama storyboard save --project-id <id> --video-id <videoId> --video-prompt "<prompt>"\`.`,
9585
9630
  details: { missing_storyboard_ids: missingPromptIds }
9586
9631
  });
9587
- if (missingFrameIds.length > 0) throw new CliError(`Cannot generate ${options.mode} videos: ${missingFrameIds.length} storyboard(s) have no selected frame image (selected_image_url).`, {
9588
- code: "MISSING_SELECTED_FRAME",
9589
- exitCode: ExitCode.Conflict,
9590
- hint: `Generate storyboard frames and select a winning image via \`seecool-cli drama storyboard select-image <frameId> --url "<url>"\` before generating videos.`,
9591
- details: { missing_storyboard_ids: missingFrameIds }
9592
- });
9593
9632
  }
9594
9633
  function assertBgmCreateParamsReady(payload) {
9595
9634
  const hasRoundId = asNumber$1(payload.round_id) !== null;
@@ -10401,8 +10440,8 @@ async function inspectDramaProject(client, projectId) {
10401
10440
  });
10402
10441
  nextActions.push({
10403
10442
  step: "stage-20-extract-subjects",
10404
- command: `seecool-cli drama subject extract --project-id ${projectId} --wait --next-stage`,
10405
- reason: "Extract characters, scenes, and items concurrently, wait until settled, and advance project_stage to 30."
10443
+ command: `seecool-cli drama subject extract --project-id ${projectId} --wait`,
10444
+ reason: "Extract characters, scenes, and items for the entire project, wait until settled, verify subjects via `drama subject list`, then run `drama project next-stage`."
10406
10445
  });
10407
10446
  } else {
10408
10447
  if (totalMissingPrompts > 0) {
@@ -10433,8 +10472,8 @@ async function inspectDramaProject(client, projectId) {
10433
10472
  }
10434
10473
  if (stage < 40 && chapterItems.length > 0 && totalSubjects > 0 && batchSettled) nextActions.push({
10435
10474
  step: "stage-30-split-storyboards",
10436
- command: `seecool-cli drama storyboard split --project-id ${projectId} --scope first --wait --next-stage --dry-run`,
10437
- reason: "Format script, submit initial storyboard split, wait until settled, and advance project_stage to 40."
10475
+ command: `seecool-cli drama storyboard split --project-id ${projectId} --scope first --wait --dry-run`,
10476
+ reason: "Format script, submit initial storyboard split, wait until settled, verify storyboards via `drama storyboard list`, then run `drama project next-stage`."
10438
10477
  });
10439
10478
  if (stage >= 40) {
10440
10479
  const firstRound = rounds[0];
@@ -10449,36 +10488,22 @@ async function inspectDramaProject(client, projectId) {
10449
10488
  command: `seecool-cli drama storyboard split --project-id ${projectId} --scope first --wait --dry-run`,
10450
10489
  reason: "Wait for storyboard split or re-run `seecool-cli drama storyboard split`."
10451
10490
  });
10452
- } else {
10453
- if (withSelectedFrame < totalStoryboards) {
10454
- blockers.push({
10455
- code: "STORYBOARDS_MISSING_FRAME",
10456
- stage: 40,
10457
- message: `${totalStoryboards - withSelectedFrame} of ${totalStoryboards} sampled storyboards have no selected_image_url.`
10458
- });
10459
- nextActions.push({
10460
- step: "stage-40-generate-frames",
10461
- command: firstRound?.episode_id ? `seecool-cli drama storyboard render-images --project-id ${projectId} --episode-id ${firstRound.episode_id} --model-id <imageModelId> --prepare-prompts --wait --dry-run` : `seecool-cli drama storyboard list --project-id ${projectId} --round-id ${firstRound?.round_id ?? "<roundId>"}`,
10462
- reason: "Persist frame prompts, render storyboard images, and select frames via `seecool-cli drama storyboard select-image`."
10463
- });
10464
- }
10465
- if (withSelectedVideo < totalStoryboards) {
10466
- blockers.push({
10467
- code: "STORYBOARDS_MISSING_VIDEO",
10468
- stage: 40,
10469
- message: `${totalStoryboards - withSelectedVideo} of ${totalStoryboards} sampled storyboards have no selected_video_url.`
10470
- });
10471
- nextActions.push({
10472
- step: "stage-40-generate-videos",
10473
- command: `seecool-cli drama storyboard render-videos --project-id ${projectId}${firstRound?.episode_id ? ` --episode-id ${firstRound.episode_id}` : ""} --round-id ${firstRound?.round_id ?? "<roundId>"} --model-id <videoModelId> --mode first_frame --prepare-prompts --wait --dry-run`,
10474
- reason: "Persist video_desc prompts, render storyboard videos, and select cuts via `seecool-cli drama storyboard select-video`."
10475
- });
10476
- } else if (firstRound?.round_id) nextActions.push({
10477
- step: "stage-40-bgm",
10478
- command: `seecool-cli drama bgm list --round-id ${firstRound.round_id}`,
10479
- reason: "All sampled storyboards have selected videos; proceed with dub/subtitle/super-res (`drama storyboard post`) or BGM (`drama bgm`)."
10491
+ } else if (withSelectedVideo < totalStoryboards) {
10492
+ blockers.push({
10493
+ code: "STORYBOARDS_MISSING_VIDEO",
10494
+ stage: 40,
10495
+ message: `${totalStoryboards - withSelectedVideo} of ${totalStoryboards} sampled storyboards have no selected_video_url.`
10480
10496
  });
10481
- }
10497
+ nextActions.push({
10498
+ step: "stage-40-generate-videos",
10499
+ command: `seecool-cli drama storyboard render-videos --project-id ${projectId}${firstRound?.episode_id ? ` --episode-id ${firstRound.episode_id}` : ""} --round-id ${firstRound?.round_id ?? "<roundId>"} --model-id <videoModelId> --prepare-prompts --wait --dry-run`,
10500
+ reason: "Persist video_desc prompts, render storyboard videos (reference_image mode), and select cuts via `seecool-cli drama storyboard select-video`."
10501
+ });
10502
+ } else if (firstRound?.round_id) nextActions.push({
10503
+ step: "stage-40-bgm",
10504
+ command: `seecool-cli drama bgm list --round-id ${firstRound.round_id}`,
10505
+ reason: "All sampled storyboards have selected videos; proceed with dub/subtitle/super-res (`drama storyboard post`) or BGM (`drama bgm`)."
10506
+ });
10482
10507
  }
10483
10508
  return {
10484
10509
  project: {
@@ -11022,11 +11047,6 @@ function enforceQuoteConfirmation(options) {
11022
11047
  return null;
11023
11048
  }
11024
11049
  // src/commands/drama/storyboard-and-video.ts
11025
- const VALID_VIDEO_MODES = /* @__PURE__ */ new Set([
11026
- "first_frame",
11027
- "first_last_frame",
11028
- "reference_image"
11029
- ]);
11030
11050
  function extractStoryboardList(raw) {
11031
11051
  if (Array.isArray(raw)) return raw.filter((x) => Boolean(x) && typeof x === "object");
11032
11052
  if (raw && typeof raw === "object" && Array.isArray(raw.list)) return raw.list.filter((x) => Boolean(x) && typeof x === "object");
@@ -11034,7 +11054,7 @@ function extractStoryboardList(raw) {
11034
11054
  }
11035
11055
  function registerStoryboardAndVideoCommands(dramaCmd, ctx) {
11036
11056
  const storyboardCmd = dramaCmd.command("storyboard").description("Stage 40: split storyboards, edit shots, render frames & videos, manage dialogues/audio, and run dub/subtitle/super-res");
11037
- storyboardCmd.command("split").description("Split storyboards (auto-formats script on initial --scope split; supports --wait and --next-stage to enter stage 40)").requiredOption("--project-id <id>", "Project ID").option("--scope <all|first>", "Initial split scope (all | first; transitions Stage 30 -> 40)").option("--episode-id <id>", "Episode ID (for resplitting an episode/round at Stage 40)").option("--round-id <id>", "Chapter round ID (paired with --episode-id for resplit)").option("--model-id <id>", "Text AI model ID").option("--next-stage", "Advance project_stage to 40 after initial split succeeds").option("--wait", "Poll until storyboard split settles").option("--timeout <sec>", "Wait timeout in seconds", "600").option("--interval-ms <ms>", "Polling interval in milliseconds", "3000").option("--yes", "Confirm destructive overwrite when resplitting existing storyboards").option("--params <json>", "Additional JSON payload fields").option("--dry-run", "Preview request payload without calling API").action(async (opts) => {
11057
+ storyboardCmd.command("split").description("Split storyboards (auto-formats script on initial --scope split; use --wait and verify storyboards before advancing to stage 40)").requiredOption("--project-id <id>", "Project ID").option("--scope <all|first>", "Initial split scope (all | first; transitions Stage 30 -> 40)").option("--episode-id <id>", "Episode ID (for resplitting an episode/round at Stage 40)").option("--round-id <id>", "Chapter round ID (paired with --episode-id for resplit)").option("--model-id <id>", "Text AI model ID").option("--next-stage", "Advance project_stage to 40 after --wait settles without failure (requires --wait)").option("--wait", "Poll until storyboard split settles").option("--timeout <sec>", "Wait timeout in seconds", "600").option("--interval-ms <ms>", "Polling interval in milliseconds", "3000").option("--yes", "Confirm destructive overwrite when resplitting existing storyboards").option("--params <json>", "Additional JSON payload fields").option("--dry-run", "Preview request payload without calling API").action(async (opts) => {
11038
11058
  const projectId = parseIntArg(opts.projectId, "--project-id");
11039
11059
  if (opts.scope && opts.scope !== "all" && opts.scope !== "first") throw new CliError(`Invalid --scope "${opts.scope}". Expected all | first.`, {
11040
11060
  code: "INVALID_ARGUMENT",
@@ -11044,6 +11064,11 @@ function registerStoryboardAndVideoCommands(dramaCmd, ctx) {
11044
11064
  code: "INVALID_ARGUMENT",
11045
11065
  exitCode: ExitCode.ValidationError
11046
11066
  });
11067
+ if (opts.nextStage && !opts.wait) throw new CliError("--next-stage requires --wait so project_stage only advances after storyboard split settles.", {
11068
+ code: "INVALID_ARGUMENT",
11069
+ exitCode: ExitCode.ValidationError,
11070
+ hint: "Pass --wait alongside --next-stage, or omit --next-stage and run `seecool-cli drama project next-stage <projectId>` after verifying split storyboards."
11071
+ });
11047
11072
  const isInitial = Boolean(opts.scope);
11048
11073
  const episodeId = opts.episodeId ? parseIntArg(opts.episodeId, "--episode-id") : void 0;
11049
11074
  const roundId = opts.roundId ? parseIntArg(opts.roundId, "--round-id") : void 0;
@@ -11062,6 +11087,7 @@ function registerStoryboardAndVideoCommands(dramaCmd, ctx) {
11062
11087
  steps: [
11063
11088
  ...isInitial ? ["/api/script-chapter/format-chapter"] : [],
11064
11089
  "/api/storyboard-ai-batch/generate-storyboard",
11090
+ ...opts.wait ? ["/api/storyboard-ai-batch/generate-storyboard-status (poll until settled)"] : [],
11065
11091
  ...opts.nextStage ? ["/api/project/update-stage (40)"] : []
11066
11092
  ],
11067
11093
  payload,
@@ -11079,10 +11105,6 @@ function registerStoryboardAndVideoCommands(dramaCmd, ctx) {
11079
11105
  });
11080
11106
  const format = isInitial ? await formatDramaChapter(client, { project_id: projectId }) : void 0;
11081
11107
  const split = await submitDramaStoryboardSplit(client, payload);
11082
- const stage = opts.nextStage ? await updateDramaProjectStage(client, {
11083
- id: projectId,
11084
- project_stage: 40
11085
- }) : void 0;
11086
11108
  const status = opts.wait ? await pollUntilSettled({
11087
11109
  fetchStatus: () => getDramaStoryboardSplitStatus(client, {
11088
11110
  project_id: projectId,
@@ -11093,11 +11115,21 @@ function registerStoryboardAndVideoCommands(dramaCmd, ctx) {
11093
11115
  timeoutMs: parseIntArg(opts.timeout, "--timeout") * 1e3,
11094
11116
  intervalMs: parseIntArg(opts.intervalMs, "--interval-ms")
11095
11117
  }) : void 0;
11118
+ if (status !== void 0 && hasStoryboardSplitFailure(status)) throw new CliError("Storyboard split task settled with failed status; project_stage was not advanced.", {
11119
+ code: "BATCH_TASK_FAILED",
11120
+ exitCode: ExitCode.Conflict,
11121
+ hint: "Inspect split status and resolve the failure before advancing to stage 40.",
11122
+ details: { status }
11123
+ });
11124
+ const stage = opts.nextStage ? await updateDramaProjectStage(client, {
11125
+ id: projectId,
11126
+ project_stage: 40
11127
+ }) : void 0;
11096
11128
  ctx.emitSuccess({
11097
11129
  ...format !== void 0 ? { format } : {},
11098
11130
  split,
11099
- ...stage !== void 0 ? { stage } : {},
11100
- ...status !== void 0 ? { status } : {}
11131
+ ...status !== void 0 ? { status } : {},
11132
+ ...stage !== void 0 ? { stage } : {}
11101
11133
  }, {
11102
11134
  region: config.region,
11103
11135
  orgId: orgId ?? null
@@ -11419,11 +11451,7 @@ function registerStoryboardAndVideoCommands(dramaCmd, ctx) {
11419
11451
  orgId: orgId ?? null
11420
11452
  });
11421
11453
  });
11422
- storyboardCmd.command("render-videos").description("Batch generate storyboard videos (Stage 40; enforces selected frame & video_desc, or pass --prepare-prompts to generate & wait first)").requiredOption("--project-id <id>", "Project ID").requiredOption("--model-id <id>", "AI video model ID").option("--mode <mode>", "Video mode (first_frame | first_last_frame | reference_image)", "first_frame").option("--storyboards <spec>", "Explicit storyboard IDs with optional durations, e.g. 501:5,502:10").option("--round-id <id>", "Chapter round ID (auto-resolves storyboards & enables --wait polling)").option("--episode-id <id>", "Optional episode ID").option("--all-shots", "Include storyboards that already have selected_video_url").option("--only-failed", "Retry only storyboards whose latest video task failed (requires --round-id)").option("--prepare-prompts", "Auto-generate video_desc prompts (video-auto-link) and wait before submitting videos").option("--text-model-id <id>", "Optional text model ID for --prepare-prompts").option("--duration <sec>", "Default duration in seconds", "5").option("--ratio <ratio>", "Aspect ratio", "9:16").option("--resolution <res>", "Resolution (e.g. 720p, 1080p)", "720p").option("--generate-audio", "Enable model audio generation").option("--wait", "Poll round video status until settled (requires --round-id)").option("--timeout <sec>", "Wait timeout in seconds", "900").option("--interval-ms <ms>", "Polling interval in milliseconds", "5000").option("--params <json>", "Additional JSON payload fields").option("--quote", "Estimate points cost and check balance without submitting tasks").option("--confirm-quote <token>", "Single-use quote_token from --quote confirming estimated points").option("--force-retry", "Reset retry circuit breaker for this batch after manual confirmation").option("--dry-run", "Preview request payload without calling API").action(async (opts) => {
11423
- if (!VALID_VIDEO_MODES.has(opts.mode)) throw new CliError(`Invalid --mode "${opts.mode}". Expected first_frame | first_last_frame | reference_image.`, {
11424
- code: "INVALID_ARGUMENT",
11425
- exitCode: ExitCode.ValidationError
11426
- });
11454
+ storyboardCmd.command("render-videos").description("Batch generate storyboard videos in reference_image mode (Stage 40; enforces persisted video_desc, or pass --prepare-prompts to generate & wait first)").requiredOption("--project-id <id>", "Project ID").requiredOption("--model-id <id>", "AI video model ID").option("--storyboards <spec>", "Explicit storyboard IDs with optional durations, e.g. 501:5,502:10").option("--round-id <id>", "Chapter round ID (auto-resolves storyboards & enables --wait polling)").option("--episode-id <id>", "Optional episode ID").option("--all-shots", "Include storyboards that already have selected_video_url").option("--only-failed", "Retry only storyboards whose latest video task failed (requires --round-id)").option("--prepare-prompts", "Auto-generate video_desc prompts (video-auto-link) and wait before submitting videos").option("--text-model-id <id>", "Optional text model ID for --prepare-prompts").option("--duration <sec>", "Default duration in seconds", "5").option("--ratio <ratio>", "Aspect ratio", "9:16").option("--resolution <res>", "Resolution (e.g. 720p, 1080p)", "720p").option("--generate-audio", "Enable model audio generation").option("--wait", "Poll round video status until settled (requires --round-id)").option("--timeout <sec>", "Wait timeout in seconds", "900").option("--interval-ms <ms>", "Polling interval in milliseconds", "5000").option("--params <json>", "Additional JSON payload fields").option("--quote", "Estimate points cost and check balance without submitting tasks").option("--confirm-quote <token>", "Single-use quote_token from --quote confirming estimated points").option("--force-retry", "Reset retry circuit breaker for this batch after manual confirmation").option("--dry-run", "Preview request payload without calling API").action(async (opts) => {
11427
11455
  const projectId = parseIntArg(opts.projectId, "--project-id");
11428
11456
  const roundId = opts.roundId ? parseIntArg(opts.roundId, "--round-id") : void 0;
11429
11457
  const episodeId = opts.episodeId ? parseIntArg(opts.episodeId, "--episode-id") : void 0;
@@ -11484,7 +11512,7 @@ function registerStoryboardAndVideoCommands(dramaCmd, ctx) {
11484
11512
  project_id: projectId,
11485
11513
  ai_video_model_id: parseIntArg(opts.modelId, "--model-id"),
11486
11514
  ai_video_model_params: aiVideoModelParams,
11487
- video_mode_type: opts.mode,
11515
+ video_mode_type: "reference_image",
11488
11516
  storyboards
11489
11517
  };
11490
11518
  if (opts.dryRun) {
@@ -11502,7 +11530,6 @@ function registerStoryboardAndVideoCommands(dramaCmd, ctx) {
11502
11530
  const quoteScope = {
11503
11531
  project_id: projectId,
11504
11532
  model_id: parseIntArg(opts.modelId, "--model-id"),
11505
- mode: opts.mode,
11506
11533
  resolution: opts.resolution,
11507
11534
  ratio: opts.ratio,
11508
11535
  storyboards
@@ -11579,8 +11606,7 @@ function registerStoryboardAndVideoCommands(dramaCmd, ctx) {
11579
11606
  }));
11580
11607
  if (fetchedItems) assertStoryboardVideoPromptsReady({
11581
11608
  storyboards: fetchedItems,
11582
- targetIds: storyboards.map((s) => s.id),
11583
- mode: opts.mode
11609
+ targetIds: storyboards.map((s) => s.id)
11584
11610
  });
11585
11611
  const submitted = await runWithRetryGuard({
11586
11612
  operationType: "generation",
@@ -11605,11 +11631,7 @@ function registerStoryboardAndVideoCommands(dramaCmd, ctx) {
11605
11631
  orgId: orgId ?? null
11606
11632
  });
11607
11633
  });
11608
- storyboardCmd.command("render-video <videoId>").description("Generate video for a single storyboard (Stage 40; persists --prompt to video_desc first, then submits)").requiredOption("--project-id <id>", "Project ID").requiredOption("--model-id <id>", "AI video model ID").requiredOption("--prompt <text>", "Video prompt (persisted to video_desc before generation)").option("--mode <mode>", "Video mode (first_frame | first_last_frame | reference_image)", "first_frame").option("--ratio <ratio>", "Aspect ratio", "9:16").option("--resolution <res>", "Resolution (e.g. 720p, 1080p)", "720p").option("--duration <sec>", "Video duration in seconds", "5").option("--count <n>", "Number of candidate videos", "1").option("--generate-audio", "Enable model audio generation").option("--ref-images <csv>", "Optional comma-separated reference image URLs").option("--params <json>", "Additional JSON payload fields").option("--quote", "Estimate points cost and check balance without submitting task").option("--confirm-quote <token>", "Single-use quote_token from --quote confirming estimated points").option("--force-retry", "Reset retry circuit breaker for this video after manual confirmation").option("--dry-run", "Preview request payload without calling API").action(async (videoIdArg, opts) => {
11609
- if (!VALID_VIDEO_MODES.has(opts.mode)) throw new CliError(`Invalid --mode "${opts.mode}". Expected first_frame | first_last_frame | reference_image.`, {
11610
- code: "INVALID_ARGUMENT",
11611
- exitCode: ExitCode.ValidationError
11612
- });
11634
+ storyboardCmd.command("render-video <videoId>").description("Generate video for a single storyboard in reference_image mode (Stage 40; persists --prompt to video_desc first, then submits)").requiredOption("--project-id <id>", "Project ID").requiredOption("--model-id <id>", "AI video model ID").requiredOption("--prompt <text>", "Video prompt (persisted to video_desc before generation)").option("--ratio <ratio>", "Aspect ratio", "9:16").option("--resolution <res>", "Resolution (e.g. 720p, 1080p)", "720p").option("--duration <sec>", "Video duration in seconds", "5").option("--count <n>", "Number of candidate videos", "1").option("--generate-audio", "Enable model audio generation").option("--ref-images <csv>", "Optional comma-separated reference image URLs").option("--params <json>", "Additional JSON payload fields").option("--quote", "Estimate points cost and check balance without submitting task").option("--confirm-quote <token>", "Single-use quote_token from --quote confirming estimated points").option("--force-retry", "Reset retry circuit breaker for this video after manual confirmation").option("--dry-run", "Preview request payload without calling API").action(async (videoIdArg, opts) => {
11613
11635
  const videoId = parseIntArg(videoIdArg, "videoId");
11614
11636
  const projectId = parseIntArg(opts.projectId, "--project-id");
11615
11637
  const trimmedPrompt = opts.prompt.trim();
@@ -11635,7 +11657,7 @@ function registerStoryboardAndVideoCommands(dramaCmd, ctx) {
11635
11657
  ai_video_model_id: parseIntArg(opts.modelId, "--model-id"),
11636
11658
  ai_video_model_prompt: trimmedPrompt,
11637
11659
  ai_video_model_params: aiVideoModelParams,
11638
- video_mode_type: opts.mode,
11660
+ video_mode_type: "reference_image",
11639
11661
  ...refImages ? { ai_video_model_reference_image_urls: refImages } : {}
11640
11662
  };
11641
11663
  if (opts.dryRun) {
@@ -11652,7 +11674,6 @@ function registerStoryboardAndVideoCommands(dramaCmd, ctx) {
11652
11674
  project_id: projectId,
11653
11675
  video_id: videoId,
11654
11676
  model_id: parseIntArg(opts.modelId, "--model-id"),
11655
- mode: opts.mode,
11656
11677
  resolution: opts.resolution,
11657
11678
  duration: parseIntArg(opts.duration, "--duration"),
11658
11679
  count: parseIntArg(opts.count, "--count")
@@ -12264,15 +12285,41 @@ function parseSettingType(value) {
12264
12285
  exitCode: ExitCode.ValidationError
12265
12286
  });
12266
12287
  }
12288
+ const UNSUPPORTED_EXTRACT_SCOPE_KEYS = [
12289
+ "round_id",
12290
+ "round_ids",
12291
+ "chapter_round_id",
12292
+ "chapter_round_ids",
12293
+ "episode_id",
12294
+ "episode_ids",
12295
+ "chapter_id",
12296
+ "chapter_ids"
12297
+ ];
12298
+ function assertProjectWideExtractParams(extra) {
12299
+ const disallowed = UNSUPPORTED_EXTRACT_SCOPE_KEYS.filter((key) => key in extra && extra[key] !== void 0 && extra[key] !== null);
12300
+ if (disallowed.length > 0) throw new CliError(`drama subject extract is project-wide only and does not support partial scope parameters (${disallowed.join(", ")}).`, {
12301
+ code: "UNSUPPORTED_PARTIAL_SCOPE",
12302
+ exitCode: ExitCode.ValidationError,
12303
+ hint: "Explain to the user that subject extraction runs on the entire project (--project-id only). Do not pass chapter/episode/round fields in --params.",
12304
+ details: { disallowed_params: disallowed }
12305
+ });
12306
+ }
12267
12307
  function registerSubjectCommands(dramaCmd, ctx) {
12268
12308
  const subjectCmd = dramaCmd.command("subject").description("Stage 30: extract, edit prompts, generate & select images, and bind voices for characters/scenes/items");
12269
- subjectCmd.command("extract").description("Concurrently extract characters, scenes, and items from chapters (Stage 20 -> 30; supports --wait and --next-stage)").requiredOption("--project-id <id>", "Project ID").option("--model-id <id>", "Optional text AI model ID").option("--style-prompt-ids <csv>", "Optional comma-separated style_prompt_ids").option("--next-stage", "Advance project_stage to 30 after submitting extraction").option("--wait", "Poll until all extraction batch tasks settle").option("--timeout <sec>", "Wait timeout in seconds", "600").option("--interval-ms <ms>", "Polling interval in milliseconds", "3000").option("--params <json>", "Additional JSON payload fields").option("--dry-run", "Preview extraction payloads without calling API").action(async (opts) => {
12309
+ subjectCmd.command("extract").description("Concurrently extract characters, scenes, and items for the entire project (project-wide only, Stage 20 -> 30; use --wait, then verify subjects before advancing stage)").requiredOption("--project-id <id>", "Project ID (project-wide; partial chapter/round extraction is not supported)").option("--model-id <id>", "Optional text AI model ID").option("--style-prompt-ids <csv>", "Optional comma-separated style_prompt_ids").option("--next-stage", "Advance project_stage to 30 after --wait settles without failure (requires --wait)").option("--wait", "Poll until all extraction batch tasks settle").option("--timeout <sec>", "Wait timeout in seconds", "600").option("--interval-ms <ms>", "Polling interval in milliseconds", "3000").option("--params <json>", "Additional JSON payload fields").option("--dry-run", "Preview extraction payloads without calling API").action(async (opts) => {
12270
12310
  const projectId = parseIntArg(opts.projectId, "--project-id");
12311
+ const extraParams = parseJsonObject(opts.params, "--params");
12312
+ assertProjectWideExtractParams(extraParams);
12313
+ if (opts.nextStage && !opts.wait) throw new CliError("--next-stage requires --wait so project_stage only advances after extraction settles.", {
12314
+ code: "INVALID_ARGUMENT",
12315
+ exitCode: ExitCode.ValidationError,
12316
+ hint: "Pass --wait alongside --next-stage, or omit --next-stage and run `seecool-cli drama project next-stage <projectId>` after verifying extracted subjects."
12317
+ });
12271
12318
  const payload = {
12272
12319
  project_id: projectId,
12273
12320
  ...opts.modelId ? { model_id: parseIntArg(opts.modelId, "--model-id") } : {},
12274
12321
  ...opts.stylePromptIds ? { style_prompt_ids: parseIntList(opts.stylePromptIds, "--style-prompt-ids") } : {},
12275
- ...parseJsonObject(opts.params, "--params")
12322
+ ...extraParams
12276
12323
  };
12277
12324
  if (opts.dryRun) {
12278
12325
  ctx.emitSuccess({
@@ -12282,6 +12329,7 @@ function registerSubjectCommands(dramaCmd, ctx) {
12282
12329
  "/api/script-character-ai-batch/v2/extract-character",
12283
12330
  "/api/script-character-ai-batch/v2/extract-scenes",
12284
12331
  "/api/script-character-ai-batch/v2/extract-items",
12332
+ ...opts.wait ? ["/api/script-character-ai-batch/status (poll until settled)"] : [],
12285
12333
  ...opts.nextStage ? ["/api/project/update-stage (30)"] : []
12286
12334
  ],
12287
12335
  payload,
@@ -12297,22 +12345,28 @@ function registerSubjectCommands(dramaCmd, ctx) {
12297
12345
  submitDramaExtractScenes(client, payload),
12298
12346
  submitDramaExtractItems(client, payload)
12299
12347
  ]);
12300
- const stage = opts.nextStage ? await updateDramaProjectStage(client, {
12301
- id: projectId,
12302
- project_stage: 30
12303
- }) : void 0;
12304
12348
  const settled = opts.wait ? await pollUntilSettled({
12305
12349
  fetchStatus: () => getDramaCharacterBatchStatus(client, { project_id: projectId }),
12306
12350
  isDone: (statusPayload) => isCharacterBatchSettled(statusPayload),
12307
12351
  timeoutMs: parseIntArg(opts.timeout, "--timeout") * 1e3,
12308
12352
  intervalMs: parseIntArg(opts.intervalMs, "--interval-ms")
12309
12353
  }) : void 0;
12354
+ if (settled !== void 0 && hasCharacterBatchFailure(settled)) throw new CliError("Subject extraction batch settled with failed task(s); project_stage was not advanced.", {
12355
+ code: "BATCH_TASK_FAILED",
12356
+ exitCode: ExitCode.Conflict,
12357
+ hint: "Inspect extraction status and retry failed subject extraction before advancing to stage 30.",
12358
+ details: { status: settled }
12359
+ });
12360
+ const stage = opts.nextStage ? await updateDramaProjectStage(client, {
12361
+ id: projectId,
12362
+ project_stage: 30
12363
+ }) : void 0;
12310
12364
  ctx.emitSuccess({
12311
12365
  character,
12312
12366
  scene,
12313
12367
  item,
12314
- ...stage !== void 0 ? { stage } : {},
12315
- ...settled !== void 0 ? { status: settled } : {}
12368
+ ...settled !== void 0 ? { status: settled } : {},
12369
+ ...stage !== void 0 ? { stage } : {}
12316
12370
  }, {
12317
12371
  region: config.region,
12318
12372
  orgId: orgId ?? null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seecoolai/cli",
3
- "version": "0.1.0-canary.6.c03a4a20",
3
+ "version": "0.1.0-canary.8.2b883823",
4
4
  "description": "Agent-friendly CLI and Skills for Seecool",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: seecool
3
- description: Core platform skill for Seecool via seecool-cli. Use for CLI setup and updates, login/auth, region switching (cn/global), organization switching, points balance and project budget checks, pre-charge SKU quotes, asset library queries, OSS media uploads, AI model catalog queries, and routing to business skills (`seecool-drama`, `seecool-canvas`).
3
+ description: Core platform skill for Seecool via seecool-cli. Use for CLI setup and updates, login/auth, region switching (cn/global), organization switching, points balance and project budget checks, pre-charge SKU quotes, asset library queries and verification, OSS media uploads, AI model catalog queries, and routing to business skills (`seecool-drama`, `seecool-canvas`). (中文关键词:登录鉴权、国内海外区域、组织切换、算力余额、计费估价、素材库、上传、产物校验、AI模型、更新升级)
4
4
  ---
5
5
 
6
6
  # Seecool Platform Skill
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: seecool-canvas
3
- description: Use when a user asks about Seecool /flow canvas node-graph CLI operations (canvas projects, node mutations, preflight, and canvas runs). For login/auth, region, organization, balance, asset library, uploads, or AI model catalog, use the `seecool` platform skill.
3
+ description: Use when a user asks about Seecool /flow canvas node-graph CLI operations (canvas projects, node mutations, preflight, and canvas runs). For login/auth, region, organization, balance, asset library, uploads, or AI model catalog, use the `seecool` platform skill. (中文关键词:画布、节点工作流、Canvas、Flow)
4
4
  ---
5
5
 
6
6
  # Seecool Canvas Skill
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: seecool-drama
3
- description: Short-drama (/drama) workflow router skill for Seecool via seecool-cli. Use for project diagnostics (`drama inspect`), visual styles, project creation, sequential stage progression, and routing /drama projects to the dedicated stage skill (script, chapter, subject, storyboard, or bgm). For login/auth, region, organization, balance, quote, asset library, uploads, or AI model catalog, use the `seecool` platform skill.
3
+ description: Short-drama (/drama) workflow router skill for Seecool via seecool-cli. Use for project diagnostics (`drama inspect`), visual styles, project creation, sequential stage progression, and routing /drama projects to the dedicated stage skill (script, chapter, subject, storyboard, or bgm). For login/auth, region, organization, balance, quote, asset library, uploads, or AI model catalog, use the `seecool` platform skill. (中文关键词:短剧、漫剧、项目诊断、画面风格、建项、阶段流转、剧本、章节、主体、分镜、配乐)
4
4
  ---
5
5
 
6
6
  # Seecool Drama Router Skill
@@ -28,15 +28,19 @@ Always inspect `project.stage` first and load only the skill for the active stag
28
28
  seecool-cli drama inspect <projectId> --json
29
29
  ```
30
30
  Read `project.stage`, `blockers`, and `next_actions`. Never guess which stage a project is in.
31
- 2. **Strict Stage Gate — Never Skip or Cross Stages**:
32
- - Advance sequentially (`10 → 20 → 30 → 40`) via `seecool-cli drama project next-stage <id>` or each stage's `--next-stage` flag.
31
+ 2. **Strict Stage Gate — Verify Before Advancing, Never Skip or Cross Stages**:
32
+ - Advance sequentially (`10 → 20 → 30 → 40`) via a separate `seecool-cli drama project next-stage <id>` call after reading back and verifying outputs.
33
+ - For `drama subject extract` and `drama storyboard split`, default to `--wait` and omit `--next-stage`; verify the extracted subjects or split storyboards first, then run `drama project next-stage <id>` separately.
33
34
  - Never invoke a Stage `30` or `40` command while `project_stage` is still `10` or `20`; CLI rejects cross-stage calls with `STAGE_MISMATCH`.
34
35
  - Pass `--wait` on async tasks (`extract`, `split`, `generate-images`, `render-images`, `render-videos`, `bgm create`) before advancing to the next stage.
35
- 3. **Strict Prompt-First & Pre-Charge Quote Rule Across All Generation Endpoints**:
36
+ 3. **Respect Subject Extraction Scope (Project-Wide Only)**:
37
+ - `drama subject extract` operates on the entire project (`--project-id` only) and does not support extracting a single or partial chapter/round.
38
+ - If the user asks to extract subjects for only one or some scenes/rounds, explain this limitation and do not submit a whole-project extraction unless the user explicitly agrees. Never pass round/chapter IDs via `--params` (CLI blocks with `UNSUPPORTED_PARTIAL_SCOPE`).
39
+ 4. **Strict Prompt-First & Pre-Charge Quote Rule Across All Generation Endpoints**:
36
40
  - Never invoke image, video, audio, or BGM generation when persisted prompts or upstream selections are missing.
37
41
  - Always save/confirm prompts first (or use `--prepare-prompts` / `--prompt` on single redraw), estimate cost with `--quote` (or `seecool-cli balance --project-id <id> --json`), preview with `--dry-run`, and confirm billable batches with the user when appropriate.
38
- 4. **Never invent style, voice, or model IDs**: query `seecool-cli drama style list --json`, `seecool-cli drama voice list --json`, and `seecool-cli model list --type <text|image|video|super_resolution_video> --json`.
39
- 5. **Recover from parameter drift**: if a drama command fails with `BAD_REQUEST` or `INVALID_ARGUMENT`, inspect `seecool-cli schema drama --json` (and check `seecool` platform skill for CLI updates).
42
+ 5. **Never invent style, voice, or model IDs**: query `seecool-cli drama style list --json`, `seecool-cli drama voice list --json`, and `seecool-cli model list --type <text|image|video|super_resolution_video> --json`.
43
+ 6. **Recover from parameter drift**: if a drama command fails with `BAD_REQUEST` or `INVALID_ARGUMENT`, inspect `seecool-cli schema drama --json` (and check `seecool` platform skill for CLI updates).
40
44
 
41
45
  ## Drama References
42
46
 
@@ -40,7 +40,7 @@ seecool-cli drama project create \
40
40
 
41
41
  ## Sequential Stage Advancement
42
42
 
43
- Stage codes match the Web stepper: `10`=Script, `20`=Chapter, `30`=Subject, `40`=Storyboard & BGM. Always advance sequentially (`10 → 20 → 30 → 40`):
43
+ Stage codes match the Web stepper: `10`=Script, `20`=Chapter, `30`=Subject, `40`=Storyboard & BGM. Always advance sequentially (`10 → 20 → 30 → 40`) in a separate call after verifying outputs from the current stage. For `drama subject extract` and `drama storyboard split`, pass `--wait` without `--next-stage`, read back the extracted subjects or split storyboards, then run `drama project next-stage`:
44
44
 
45
45
  ```bash
46
46
  seecool-cli drama project next-stage 101 --dry-run --json
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: seecool-drama-bgm
3
- description: Use for Seecool /drama BGM Management (Stage 40+) via seecool-cli: listing round videos and BGM status, uploading a round video cut for BGM, and creating/polling AI BGM generation tasks with verified source IDs and prompts.
3
+ description: Use for Seecool /drama BGM Management (Stage 40+) via seecool-cli: listing round videos and BGM status, uploading a round video cut for BGM, and creating/polling AI BGM generation tasks with verified source IDs and prompts. (中文关键词:背景音乐、AI配乐、BGM生成、场次视频上传)
4
4
  ---
5
5
 
6
6
  # Seecool Drama — BGM Management
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: seecool-drama-chapter
3
- description: Use for Seecool /drama Stage 20 (Chapter & Round Management) via seecool-cli: reviewing, creating, updating, and deleting chapters and rounds, appending supplemental scripts, and extracting subjects to advance from stage 20 to stage 30.
3
+ description: Use for Seecool /drama Stage 20 (Chapter & Round Management) via seecool-cli: reviewing, creating, updating, and deleting chapters and rounds, appending supplemental scripts, and extracting subjects to advance from stage 20 to stage 30. (中文关键词:章节管理、场次编辑、补充剧本、拆主体、提取角色场景道具)
4
4
  ---
5
5
 
6
6
  # Seecool Drama — Stage 20: Chapter Management
@@ -11,7 +11,7 @@ Handles **Stage `20` (Chapter & Round)** operations. Do **not** run Stage `30` s
11
11
 
12
12
  - **Entry Gate**: Run `seecool-cli drama inspect <projectId> --json` and confirm `project.stage >= 20` and `chapters.count > 0`. If `project.stage < 20`, stop and finish `seecool-drama-script` first.
13
13
  - **No Cross-Stage Calls**: Never jump directly to Stage `40` or call image generation while `project.stage` is still `20`.
14
- - **Exit Gate (`20 → 30`)**: Chapters and rounds are reviewed, `drama subject extract --wait --next-stage` settles with extracted subjects, and `project_stage` is `30`.
14
+ - **Exit Gate (`20 → 30`)**: Chapters and rounds are reviewed, `drama subject extract --wait` settles successfully, extracted subjects (`character` / `scene` / `item`) are read back and confirmed, and `drama project next-stage <id>` advances `project_stage` to `30`.
15
15
 
16
16
  ## Chapter Review & Editing (`seecool-cli drama chapter`)
17
17
 
@@ -39,12 +39,20 @@ seecool-cli drama round delete --project-id 101 --round-id 11 --yes --json
39
39
 
40
40
  ## Transition to Stage 30: Extract Subjects & Wait
41
41
 
42
- Query available text models, concurrently extract characters/scenes/items, wait until settled, and advance `project_stage` to `30`:
42
+ **Scope: project ID only.** `drama subject extract` runs across the entire project and does **not** support extracting a single or partial chapter/round. If the user asks to extract only one or some scenes/rounds, explain this limitation and do **not** submit a whole-project extraction unless the user explicitly agrees to the broader scope. Do not simulate partial scope via `--params` (CLI rejects with `UNSUPPORTED_PARTIAL_SCOPE`).
43
+
44
+ Query available text models, submit extraction with `--wait` (omit `--next-stage`), read back the extracted characters/scenes/items to verify completeness, then advance `project_stage` to `30` via a separate `drama project next-stage` call:
43
45
 
44
46
  ```bash
45
47
  seecool-cli model list --type text --json
46
- seecool-cli drama subject extract --project-id 101 --model-id 7 --wait --next-stage --dry-run --json
47
- seecool-cli drama subject extract --project-id 101 --model-id 7 --wait --next-stage --json
48
+ seecool-cli drama subject extract --project-id 101 --model-id 7 --wait --dry-run --json
49
+ seecool-cli drama subject extract --project-id 101 --model-id 7 --wait --json
50
+
51
+ # Read back extracted subjects before advancing to Stage 30
52
+ seecool-cli drama subject list --project-id 101 --type character --json
53
+ seecool-cli drama subject list --project-id 101 --type scene --json
54
+ seecool-cli drama subject list --project-id 101 --type item --json
55
+ seecool-cli drama project next-stage 101 --json
48
56
  ```
49
57
 
50
- Once extraction settles and `project_stage` is `30`, switch to `seecool-drama-subject`.
58
+ Once extraction succeeds, subjects are verified, and `project_stage` is `30`, switch to `seecool-drama-subject`.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: seecool-drama-script
3
- description: Use for Seecool /drama Stage 10 (Script Management) via seecool-cli: creating projects, choosing visual styles, importing scripts (upload + bind + mandatory split), and advancing a project sequentially from stage 10 to stage 20.
3
+ description: Use for Seecool /drama Stage 10 (Script Management) via seecool-cli: creating projects, choosing visual styles, importing scripts (upload + bind + split), and advancing a project sequentially from stage 10 to stage 20. (中文关键词:短剧建项、画面风格、上传剧本、导入剧本、拆分剧本、拆场次、拆集)
4
4
  ---
5
5
 
6
6
  # Seecool Drama — Stage 10: Script Management
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: seecool-drama-storyboard
3
- description: Use for Seecool /drama Stage 40 (Storyboard, Frames, Videos, Dialogues/TTS, Dubbing, Subtitles & Super-Resolution) via seecool-cli: splitting storyboards, editing shots and prompts, rendering and selecting frames and videos, managing dialogues and TTS audio, and running dubbing, subtitles, subtitle erasure, and super-resolution.
3
+ description: Use for Seecool /drama Stage 40 (Storyboard, Frames, Videos, Dialogues/TTS, Dubbing, Subtitles, Super-Resolution & Review) via seecool-cli: splitting storyboards, editing shots and prompts, rendering and selecting frames and videos, managing dialogues and TTS audio, running dubbing, subtitles, subtitle erasure, super-resolution, and prompt-risk or celebrity review. (中文关键词:拆分镜、重拆镜、分镜生图、镜头生视频、台词配音、音频合成、字幕合成、字幕擦除、视频超分、提示词风控、名人检测)
4
4
  ---
5
5
 
6
6
  # Seecool Drama — Stage 40: Storyboard, Audio, Subtitle & Super-Res
@@ -11,14 +11,15 @@ Handles **Stage `40`** storyboard production and shot-level post-processing (dia
11
11
  ## Stage Entry & Mandatory Prompt/Asset Gates
12
12
 
13
13
  1. **Entry Gate**:
14
- - Initial `drama storyboard split --scope first|all --wait --next-stage` requires `project_stage >= 30` and advances `project_stage` to `40` (auto-formats script internally).
14
+ - Initial `drama storyboard split --scope first|all --wait` requires `project_stage >= 30` (auto-formats script internally). Omit `--next-stage`, read back the split storyboards via `drama storyboard list` to verify them, then run `drama project next-stage <id>` separately to enter Stage `40`.
15
15
  - All other storyboard, frame, video, dialogue/audio, and post-processing commands require `project_stage >= 40`. Never cross-stage while `project_stage < 40`.
16
- 2. **Mandatory Image Prompt Gate**:
17
- - Never call `drama storyboard render-images` with missing frame image prompts (`frame_desc`) unless `--prepare-prompts` is enabled (which generates and waits for prompts before generating images).
16
+ 2. **Optional Frame Image Prompt Gate**:
17
+ - Storyboard keyframe images (`render-images` / `render-frame`) are optional reference assets in `/drama`. When rendering frames, never call `drama storyboard render-images` with missing `frame_desc` unless `--prepare-prompts` is enabled (which generates and waits for prompts before generating images).
18
18
  - Single-frame `drama storyboard render-frame <frameId> --prompt "..."` persists `frame_desc` first, then submits generation.
19
- 3. **Mandatory Video Prompt & Selected Frame Gate**:
20
- - `drama storyboard render-videos` requires persisted `video_desc` (or `--prepare-prompts` to generate and wait first) AND a selected frame `selected_image_url` for `first_frame` / `first_last_frame` modes.
21
- - Single-shot `drama storyboard render-video <videoId> --prompt "..."` persists `video_desc` first, then submits generation.
19
+ 3. **Mandatory Video Prompt Gate (`reference_image` Mode)**:
20
+ - `/drama` video generation always uses `reference_image` mode (legacy `first_frame` / `first_last_frame` modes are not used in `/drama`).
21
+ - `drama storyboard render-videos` requires persisted `video_desc` (or `--prepare-prompts` to generate and wait first).
22
+ - Single-shot `drama storyboard render-video <videoId> --prompt "..."` persists `video_desc` first, then submits generation (pass `--ref-images` to attach explicit reference image URLs when needed).
22
23
  4. **Select Winning Assets**: Always pair `--url` and `--pool-id` in `drama storyboard select-video`.
23
24
 
24
25
  ## Step 1: Initial Storyboard Split (`30 → 40`) & Resplit
@@ -29,15 +30,18 @@ seecool-cli drama storyboard split \
29
30
  --scope first \
30
31
  --model-id 7 \
31
32
  --wait \
32
- --next-stage \
33
33
  --dry-run --json
34
34
 
35
35
  seecool-cli drama storyboard split \
36
36
  --project-id 101 \
37
37
  --scope first \
38
38
  --model-id 7 \
39
- --wait \
40
- --next-stage --json
39
+ --wait --json
40
+
41
+ # Read back split storyboards before advancing to Stage 40
42
+ seecool-cli drama storyboard list --project-id 101 --episode-id 5 --round-id 11 --json
43
+ seecool-cli drama project next-stage 101 --json
44
+ seecool-cli drama inspect 101 --json
41
45
 
42
46
  # Resplit a specific episode/round (Stage 40 — destructive if storyboards already exist; requires --yes)
43
47
  seecool-cli drama storyboard split --project-id 101 --episode-id 5 --round-id 11 --model-id 7 --yes --wait --json
@@ -56,7 +60,7 @@ seecool-cli drama storyboard save --project-id 101 --video-id 701 --video-prompt
56
60
  seecool-cli drama storyboard delete 8801 --project-id 101 --yes --json
57
61
  ```
58
62
 
59
- ## Step 3: Render & Select Frame Images
63
+ ## Step 3: Render & Select Frame Images (Optional Reference Frames)
60
64
 
61
65
  ```bash
62
66
  seecool-cli model list --type image --json
@@ -85,7 +89,7 @@ seecool-cli drama storyboard render-frame 601 \
85
89
  seecool-cli drama storyboard select-image 601 --url "https://..." --json
86
90
  ```
87
91
 
88
- ## Step 4: Render & Select Storyboard Videos
92
+ ## Step 4: Render & Select Storyboard Videos (`reference_image` Mode)
89
93
 
90
94
  ```bash
91
95
  seecool-cli model list --type video --json
@@ -95,7 +99,6 @@ seecool-cli drama storyboard render-videos \
95
99
  --project-id 101 \
96
100
  --round-id 11 \
97
101
  --model-id 34 \
98
- --mode first_frame \
99
102
  --ratio 9:16 \
100
103
  --resolution 720p \
101
104
  --quote --json
@@ -106,7 +109,6 @@ seecool-cli drama storyboard render-videos \
106
109
  --episode-id 5 \
107
110
  --round-id 11 \
108
111
  --model-id 34 \
109
- --mode first_frame \
110
112
  --ratio 9:16 \
111
113
  --resolution 720p \
112
114
  --prepare-prompts \
@@ -121,12 +123,12 @@ seecool-cli drama storyboard render-videos \
121
123
  --only-failed \
122
124
  --wait --json
123
125
 
124
- # Single video redraw (persists video_desc first)
126
+ # Single video redraw (persists video_desc first; pass --ref-images for explicit reference images)
125
127
  seecool-cli drama storyboard render-video 701 \
126
128
  --project-id 101 \
127
129
  --model-id 34 \
128
130
  --prompt "Slow dolly forward" \
129
- --mode first_frame \
131
+ --ref-images "https://..." \
130
132
  --ratio 9:16 \
131
133
  --resolution 720p \
132
134
  --duration 5 \
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: seecool-drama-subject
3
- description: Use for Seecool /drama Stage 30 (Subject Management: characters, scenes, items) via seecool-cli: inspecting and saving subject prompts before image generation, generating and selecting subject images, binding character voices, and handing off to storyboard split for stage 40.
3
+ description: Use for Seecool /drama Stage 30 (Subject Management: characters, scenes, items) via seecool-cli: inspecting and saving subject prompts before image generation, generating and selecting subject images, binding character voices, and handing off to storyboard split for stage 40. (中文关键词:主体管理、角色三视图、场景图、道具图、主体生图、选图、角色音色绑定)
4
4
  ---
5
5
 
6
6
  # Seecool Drama — Stage 30: Subject Management
@@ -91,4 +91,4 @@ seecool-cli drama subject bind-voice 301 --voice-desc "Deep calm narrator" --voi
91
91
 
92
92
  ## Exit Gate (`30 → 40`)
93
93
 
94
- Once subjects have `final_image` selected, switch to `seecool-drama-storyboard` to run `drama storyboard split --scope first --wait --next-stage` (transitions `project_stage` to `40`).
94
+ Once subjects have `final_image` selected, switch to `seecool-drama-storyboard` to run `drama storyboard split --scope first --wait`, read back the split storyboards to verify completeness, and then separately advance `project_stage` to `40` via `drama project next-stage <id>`.