@seecoolai/cli 0.0.0-stage → 0.1.0-canary.10.80e52474

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/package.json CHANGED
@@ -1,6 +1,28 @@
1
1
  {
2
2
  "name": "@seecoolai/cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0-canary.10.80e52474",
4
+ "description": "Agent-friendly CLI and Skills for Seecool",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "engines": {
8
+ "node": ">=20.0.0"
9
+ },
10
+ "bin": {
11
+ "seecool-cli": "./dist/bin.mjs"
12
+ },
13
+ "exports": {
14
+ "./skills/*": "./skills/*",
15
+ "./package.json": "./package.json"
16
+ },
17
+ "files": [
18
+ "dist/bin.mjs",
19
+ "skills",
20
+ "README.md",
21
+ "README.zh-CN.md",
22
+ "LICENSE"
23
+ ],
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "packageManager": "pnpm@10.32.1"
28
+ }
@@ -0,0 +1,38 @@
1
+ ---
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 and verification, OSS media uploads, AI model catalog queries, and routing to business skills (`seecool-drama`, `seecool-canvas`). (中文关键词:登录鉴权、国内海外区域、组织切换、算力余额、计费估价、素材库、上传、产物校验、AI模型、更新升级)"
4
+ ---
5
+
6
+ # Seecool Platform Skill
7
+
8
+ Use `seecool-cli` (`@seecoolai/cli`) as the shared platform foundation for all Seecool workspaces (`/drama` short-drama production, `/flow` canvas workflows, and shared account/asset/model operations).
9
+
10
+ ## Business Skill Routing
11
+
12
+ Always complete platform setup (`status --verify`, region, organization, balance/models) here, then route domain workflows to the dedicated business skill:
13
+
14
+ | Scope | Dedicated Skill | When to Load |
15
+ | --- | --- | --- |
16
+ | Platform Core | `seecool` (this skill) | Login/logout, `cn`/`global` region, organization switching, CLI updates, `balance`, `quote`, `asset`, `upload`, `model list`, `schema` |
17
+ | `/drama` Short Drama | `seecool-drama` | Project diagnostics (`drama inspect`), styles, projects, scripts, chapters, subjects, storyboards, voices, review & BGM |
18
+ | `/flow` Canvas | `seecool-canvas` | Canvas workflow boundary and node-graph operations |
19
+
20
+ ## Mandatory Global Execution Rules
21
+
22
+ 1. **Ensure CLI availability first**: prefer global `seecool-cli`; if missing, fall back to `npx -y @seecoolai/cli ...` or run `node scripts/ensure-cli.mjs`.
23
+ 2. **Always consume JSON**: pass `--json` (or run non-interactively) and parse `ok`, `data`, `error.code`, and `error.hint` from `stdout`. Ignore diagnostic messages on `stderr`.
24
+ 3. **Verify auth, organization, and CLI updates first**: run `seecool-cli status --verify --json` before any business call.
25
+ - If `data.update.update_available` is `true`, immediately run `data.update.command` (with `--json`), then re-read updated skill docs or inspect `seecool-cli schema --json` before continuing.
26
+ - If `data.logged_in` is `false`, run `seecool-cli login` (or `seecool-cli login --token-stdin` / `SEECOOL_TOKEN` in remote sandboxes).
27
+ 4. **Never invent IDs, assets, or model parameters**: always query `seecool-cli org list --json`, `seecool-cli asset list --json`, and `seecool-cli model list --type <text|image|video|audio|super_resolution_video> --json`.
28
+ 5. **Quote estimation, retry circuit breakers, and backend-controlled points enforcement**:
29
+ - Use `seecool-cli balance --json` and `seecool-cli quote` (or `--quote` on generation commands) when inspecting balance or estimating points before submitting paid operations. `--quote` issues a single-use, 15-minute `quote_token` scoped to the exact parameters; pass `--confirm-quote <token>` to execute (mandatory when `SEECOOL_REQUIRE_QUOTE_CONFIRM=1`). Do **not** block capability invocations on client-side balance checks — points balance validation during execution is enforced by the backend API response.
30
+ - Respect retry circuit breakers (`query`: 3 retries, `sync`: 2 retries, `generation`: 1 retry; tripped with `RETRY_LIMIT_EXCEEDED` — pass `--force-retry` only after diagnosing the root cause). On HTTP 429 (`RATE_LIMITED`), wait until `error.details.retry_after_at`.
31
+ - Verify delivered media URLs with `seecool-cli asset verify <url> --json` (supports SHA-256 hash comparison via `--compare-url` / `--previous-hash` and auto-refresh of expired signed URLs).
32
+ 6. **Auto-rename session when entering a project**: Once the user specifies or enters a project (e.g., via `drama inspect <projectId>`, `drama project get <projectId>`, or `drama project create`), if your host agent/client supports renaming the current conversation/session, rename it to `<项目名称-id>-<yyyy-MM-dd>` (using the project's actual name, numeric ID, and today's date in `yyyy-MM-dd`, e.g., `霓虹侦探-101-2026-12-01`). If the host agent does not support renaming conversations, skip silently without failing.
33
+ 7. **Never echo secrets & recover from parameter drift**: never log raw tokens. If a command unexpectedly fails with `BAD_REQUEST` or `INVALID_ARGUMENT`, run `seecool-cli status --check-update --json`, upgrade if available, and inspect `seecool-cli schema --json`.
34
+
35
+ ## Platform Command References
36
+
37
+ - [Auth, Region & Organization](commands/auth-and-region.md)
38
+ - [Balance, Assets, Quote, Upload & AI Model Catalog](commands/upload-and-models.md)
@@ -0,0 +1,46 @@
1
+ # Auth, Region & Organization Commands
2
+
3
+ ## Regions (`cn` / `global`)
4
+
5
+ Seecool deploys separate domestic (`cn`) and international (`global`) environments. Credentials and default `org_id` are isolated per region.
6
+
7
+ ```bash
8
+ seecool-cli region list --json
9
+ seecool-cli region use cn --json
10
+ seecool-cli region use global --json
11
+ ```
12
+
13
+ For a single command override without changing persistent state, pass `--region global` or set `SEECOOL_REGION=global`.
14
+
15
+ ## Authentication (`status` / `login` / `logout`)
16
+
17
+ ```bash
18
+ seecool-cli status --json
19
+ seecool-cli status --verify --json
20
+ seecool-cli status --check-update --json
21
+ seecool-cli update --json
22
+ seecool-cli login
23
+ seecool-cli login --region global
24
+ seecool-cli login --choose-region
25
+ seecool-cli login --no-open
26
+ seecool-cli logout --json
27
+ ```
28
+
29
+ - `seecool-cli status --json` includes `cli_version` and `update` (cached for 1 hour against npm `dist-tags`, automatically matching `canary` or `stable` channel; pass `--check-update` to bypass cache or set `SEECOOL_NO_UPDATE_CHECK=1` to disable). When `update.update_available` is `true`, run `update.command` (`seecool-cli update` auto-detects the current channel) and re-check `seecool-cli schema drama --json` if flags changed.
30
+ - In an interactive TTY, `seecool-cli login` prompts the user to choose **China (`cn`)** or **Global (`global`)** (defaulting to the saved region or local timezone) and persists the selection to `~/.config/seecool/config.json` once authorized.
31
+ - In non-TTY / Agent / `--json` mode, `seecool-cli login` never blocks for keyboard input; pass `--region cn|global` explicitly when targeting a specific region.
32
+ - `seecool-cli login` starts a single-use `127.0.0.1` callback server and opens the Seecool Web `/cli/authorize` page. The user must click confirm in the browser.
33
+ - In remote SSH/Docker sandboxes where localhost callback is unreachable, read credentials from stdin instead of passing tokens as arguments:
34
+ ```bash
35
+ printf '%s' "$SEECOOL_WEB_TOKEN" | seecool-cli login --token-stdin --json
36
+ ```
37
+ - `SEECOOL_TOKEN` overrides local credentials for stateless CI/Agent runs. `seecool-cli logout` only clears local credentials and reports `environment_still_active: true` if `SEECOOL_TOKEN` is still set.
38
+
39
+ ## Organizations (`org`)
40
+
41
+ ```bash
42
+ seecool-cli org list --json
43
+ seecool-cli org use 271 --json
44
+ ```
45
+
46
+ Use `--org-id <id>` on any business command to override `x-org-id` for that single invocation.
@@ -0,0 +1,70 @@
1
+ # Balance, Assets, Quote, Upload & AI Model Catalog Commands
2
+
3
+ ## Account Balance & Project Budget (`balance`)
4
+
5
+ Check the active organization's point balance (100 points = 1 CNY) and optional project/round budget limits before starting billable batches:
6
+
7
+ ```bash
8
+ seecool-cli balance --json
9
+ seecool-cli balance --project-id 101 --json
10
+ ```
11
+
12
+ ## Pre-Charge SKU Quote (`quote`)
13
+
14
+ Query backend SKU pricing (`/api/sku/display-map`) and compare estimated cost against current balance without submitting a billable task:
15
+
16
+ ```bash
17
+ seecool-cli quote --type image --model-id 12 --resolution 2K --quantity 4 --json
18
+ seecool-cli quote --type video --model-id 34 --resolution 720p --seconds 5 --quantity 3 --json
19
+ seecool-cli quote --type subtitle_erasure_video --source-profile seedance --json
20
+ seecool-cli quote --type super_resolution_video --model-id 99 --resolution 1080p --seconds 5 --json
21
+ ```
22
+
23
+ ## Asset Library (`asset`)
24
+
25
+ Query organization or project asset library items, folders, and media/usage constants:
26
+
27
+ ```bash
28
+ seecool-cli asset const --json
29
+ seecool-cli asset list --source-type group --media-type image --json
30
+ seecool-cli asset list --source-type project --project-id 101 --keyword "alley" --json
31
+ seecool-cli asset folders --source-type project --project-id 101 --json
32
+
33
+ # Verify media URL accessibility, byte size, SHA-256 hash, unchanged redraw detection & expired OSS URL auto-refresh
34
+ seecool-cli asset verify "https://..." --compare-url "https://..." --json
35
+ seecool-cli asset verify "https://..." --project-id 101 --setting-id 301 --strict --json
36
+ ```
37
+
38
+ ## Direct Media Upload (`upload`)
39
+
40
+ Uploads a local file by requesting an OSS direct-upload credential from Portal (`/api/upload/direct-credential`) using the active region's `country_type` (`internal` for `cn`, `foreign` for `global`), then streaming directly to OSS.
41
+
42
+ ```bash
43
+ # Validate file and target region without uploading
44
+ seecool-cli upload --path ./reference.png --dry-run --json
45
+
46
+ # Execute upload and obtain usable download_url (never use public_url)
47
+ seecool-cli upload --path ./reference.png --json
48
+
49
+ # Upload, verify reachability (HEAD with bounded GET fallback), and register into the Asset Library
50
+ seecool-cli upload --path ./reference.png --save-asset --source-type project --project-id 101 --usage-type character --verify --json
51
+ ```
52
+
53
+ Optional flags:
54
+ - `--content-type <mime>`: override inferred MIME type
55
+ - `--keep-original-name`: ask backend to preserve the source filename
56
+ - `--save-asset`: persist the uploaded media into the Seecool Asset Library (`/api/asset-store/create`)
57
+ - `--source-type <group|project>`, `--project-id <id>`, `--folder-id <id>`, `--usage-type <type>`, `--name <name>`, `--description <desc>`: asset library metadata when `--save-asset` is enabled
58
+ - `--verify`: verify uploaded `download_url` reachability and size (HTTP `HEAD`, falling back to bounded `GET` when `HEAD` is disallowed)
59
+
60
+ ## Backend AI Model Catalog (`model list`)
61
+
62
+ Always query available models from the backend catalog before submitting any generation task. Models without a matching `country_type` for the active region are automatically filtered out.
63
+
64
+ ```bash
65
+ seecool-cli model list --json
66
+ seecool-cli model list --type image --json
67
+ seecool-cli model list --type video --fields model_id,model_name,model_code,video_mode_type --json
68
+ ```
69
+
70
+ Supported `--type` values: `text`, `image`, `video`, `audio`, `text_agent`, `super_resolution_video`.
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { execFileSync } from "node:child_process";
4
+
5
+ const MIN_VERSION = "0.1.0";
6
+
7
+ function checkCli() {
8
+ try {
9
+ const version = execFileSync("seecool-cli", ["--version"], {
10
+ stdio: ["ignore", "pipe", "pipe"],
11
+ timeout: 5000,
12
+ })
13
+ .toString("utf8")
14
+ .trim();
15
+
16
+ console.log(
17
+ JSON.stringify({
18
+ ok: true,
19
+ installed: true,
20
+ command: "seecool-cli",
21
+ version,
22
+ min_version: MIN_VERSION,
23
+ }),
24
+ );
25
+ } catch {
26
+ console.log(
27
+ JSON.stringify({
28
+ ok: false,
29
+ installed: false,
30
+ min_version: MIN_VERSION,
31
+ install_command: "npx -y @seecoolai/cli install",
32
+ fallback_prefix: "npx -y @seecoolai/cli",
33
+ }),
34
+ );
35
+ process.exitCode = 1;
36
+ }
37
+ }
38
+
39
+ checkCli();
@@ -0,0 +1,22 @@
1
+ ---
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. (中文关键词:画布、节点工作流、Canvas、Flow)"
4
+ ---
5
+
6
+ # Seecool Canvas Skill
7
+
8
+ ## Current Availability (Phase 1 Boundary)
9
+
10
+ Dedicated `/flow` canvas CLI commands (canvas projects, node mutations, preflight, and canvas runs) are planned for a future release and are **not yet released** in this CLI version.
11
+
12
+ Do **not** invent or invoke unreleased `/flow` canvas subcommands. Verify currently available commands at any time with:
13
+
14
+ ```bash
15
+ seecool-cli schema --json
16
+ ```
17
+
18
+ ## Shared Platform Capabilities
19
+
20
+ Environment setup, authentication, region/organization switching, balance & quote checks, asset library queries, media uploads, and AI model catalog queries are provided by the shared `seecool` platform skill.
21
+
22
+ When `/flow` canvas commands ship in a future release, run `seecool-cli update` to upgrade both the CLI and this skill together.
@@ -0,0 +1,49 @@
1
+ ---
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. (中文关键词:短剧、漫剧、项目诊断、画面风格、建项、阶段流转、剧本、章节、主体、分镜、配乐)"
4
+ ---
5
+
6
+ # Seecool Drama Router Skill
7
+
8
+ Use `seecool-cli` (`@seecoolai/cli`) to diagnose `/drama` project state, enforce strict sequential stage ordering, and route each `/drama` task to its dedicated stage skill.
9
+
10
+ > **Platform Prerequisite**: Login/auth, `cn`/`global` region switching, organization selection, CLI updates, `balance`, `quote`, `asset`, `upload`, and `model list` are managed by the shared `seecool` platform skill. Ensure `seecool-cli status --verify --json` passes first.
11
+
12
+ ## Scope & Modular Stage Routing
13
+
14
+ Always inspect `project.stage` first and load only the skill for the active stage:
15
+
16
+ | `project_stage` | Stage | Dedicated Skill | Consolidated Commands |
17
+ | --- | --- | --- | --- |
18
+ | `10` | Script | `seecool-drama-script` | `drama style list`, `drama project create`, `drama script import\|split`, `drama project next-stage` |
19
+ | `20` | Chapter | `seecool-drama-chapter` | `drama chapter list\|get\|save\|delete`, `drama round list\|save\|delete`, `drama subject extract` |
20
+ | `30` | Subject | `seecool-drama-subject` | `drama subject list\|get\|save\|delete\|generate-images\|generate-one\|select-image\|bind-voice`, `drama voice list` |
21
+ | `40` | Storyboard | `seecool-drama-storyboard` | `drama storyboard split\|list\|save\|delete\|render-images\|render-frame\|select-image\|render-videos\|render-video\|select-video\|dialogue\|post`, `drama review prompt-risk\|celebrity` |
22
+ | `40` | BGM | `seecool-drama-bgm` | `drama bgm list\|upload-video\|create` |
23
+
24
+ ## Mandatory Drama Execution Rules
25
+
26
+ 1. **Always run `drama inspect` before operating on an existing project, and rename session if supported**:
27
+ ```bash
28
+ seecool-cli drama inspect <projectId> --json
29
+ ```
30
+ Read `project.stage`, `blockers`, and `next_actions`. Never guess which stage a project is in.
31
+ - **Session Auto-Rename**: As soon as the user enters or specifies a project (after `drama inspect <projectId>`, `drama project get <projectId>`, or `drama project create` returns the project's name and ID), if the current host agent supports renaming the conversation/session title, rename it to `<项目名称-id>-<yyyy-MM-dd>` (e.g., `霓虹侦探-101-2026-12-01`). If session renaming is not supported by the host agent, skip silently.
32
+ 2. **Strict Stage Gate — Verify Before Advancing, Never Skip or Cross Stages**:
33
+ - Advance sequentially (`10 → 20 → 30 → 40`) via a separate `seecool-cli drama project next-stage <id>` call after reading back and verifying outputs.
34
+ - 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.
35
+ - Never invoke a Stage `30` or `40` command while `project_stage` is still `10` or `20`; CLI rejects cross-stage calls with `STAGE_MISMATCH`.
36
+ - Pass `--wait` on async tasks (`extract`, `split`, `generate-images`, `render-images`, `render-videos`, `bgm create`) before advancing to the next stage.
37
+ 3. **Respect Subject Extraction Scope (Project-Wide Only)**:
38
+ - `drama subject extract` operates on the entire project (`--project-id` only) and does not support extracting a single or partial chapter/round.
39
+ - 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`).
40
+ 4. **Strict Prompt-First & Pre-Charge Quote Rule Across All Generation Endpoints**:
41
+ - Never invoke image, video, audio, or BGM generation when persisted prompts or upstream selections are missing.
42
+ - 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.
43
+ 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`.
44
+ 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).
45
+
46
+ ## Drama References
47
+
48
+ - [Inspect, Styles & Projects](commands/drama-project.md)
49
+ - [Async Delivery & Failure Policy](workflows/async-delivery.md)
@@ -0,0 +1,48 @@
1
+ # Inspect, Styles & Drama Projects
2
+
3
+ Projects automatically inherit `country_type` from the active region (`internal` for `cn`, `foreign` for `global`).
4
+
5
+ ## Diagnose Current Project State (Start Here)
6
+
7
+ ```bash
8
+ seecool-cli drama inspect 101 --json
9
+ ```
10
+
11
+ `drama inspect` aggregates `project.stage` (`10`/`20`/`30`/`40`), chapters/rounds, character/scene/item prompt & image coverage, running batch tasks, sampled storyboard frame/video readiness, `blockers`, and concrete `next_actions`.
12
+
13
+ ## Query Visual Style Packages (`seecool-cli drama style`)
14
+
15
+ ```bash
16
+ seecool-cli drama style list --json
17
+ ```
18
+
19
+ ## List, Inspect, Create & Advance Projects (`seecool-cli drama project`)
20
+
21
+ ```bash
22
+ seecool-cli drama project list --page 1 --limit 20 --fields id,project_name,project_stage --json
23
+ seecool-cli drama project get 101 --json
24
+
25
+ # Preview creation payload first
26
+ seecool-cli drama project create \
27
+ --name "Neon Detective" \
28
+ --aspect-ratio 9:16 \
29
+ --comic-type 2 \
30
+ --has-script 1 \
31
+ --has-round 1 \
32
+ --style-id 3 \
33
+ --dry-run --json
34
+
35
+ seecool-cli drama project create \
36
+ --name "Neon Detective" \
37
+ --aspect-ratio 9:16 \
38
+ --comic-type 2 --json
39
+ ```
40
+
41
+ ## Sequential Stage Advancement
42
+
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
+
45
+ ```bash
46
+ seecool-cli drama project next-stage 101 --dry-run --json
47
+ seecool-cli drama project next-stage 101 --json
48
+ ```
@@ -0,0 +1,19 @@
1
+ # Async Delivery & Failure Policy
2
+
3
+ ## Exit Codes
4
+
5
+ | Exit Code | Meaning | Agent Action |
6
+ | --- | --- | --- |
7
+ | `0` | Success | Parse `data` from `stdout` |
8
+ | `2` | Invalid arguments or config | Fix flags or `seecool.toml`; inspect `seecool-cli schema --json` |
9
+ | `3` | Unauthorized / expired token | Guide user to run `seecool-cli login` or fix `SEECOOL_TOKEN` |
10
+ | `4` | Forbidden | Verify active organization with `seecool-cli org list --json` |
11
+ | `5` | Resource not found | Re-query parent list instead of guessing IDs |
12
+ | `6` | Business conflict or preflight blocked | Report blocking details; do not force-resubmit |
13
+ | `1` | General or upstream error | Retry only when `error.retryable === true` |
14
+
15
+ ## Failure & Non-Duplication Rules
16
+
17
+ - Never blindly re-submit a paid generation task if a request timed out or returned an uncertain result; query task status first.
18
+ - Keep output payloads compact for large lists by passing `--fields`.
19
+ - When delivering generated media to the user, report real returned URLs/keys and explicitly state any partial failures.
@@ -0,0 +1,55 @@
1
+ ---
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. (中文关键词:背景音乐、AI配乐、BGM生成、场次视频上传)"
4
+ ---
5
+
6
+ # Seecool Drama — BGM Management
7
+
8
+ Handles the independent **BGM** workflow (`seecool-cli drama bgm`) at **Stage `40+`**.
9
+
10
+ ## Stage Entry & Mandatory Prerequisite Gates
11
+
12
+ 1. **Entry Gate**: Run `seecool-cli drama inspect <projectId> --json` and confirm `project.stage >= 40`. Never run BGM commands while `project_stage < 40` (CLI enforces `STAGE_MISMATCH`).
13
+ 2. **Mandatory Source Video & Prompt Gate**:
14
+ - Confirm a valid `source_id` exists in the round via `drama bgm list --project-id <id> --episode-id <ep> --round-id <r>` (or upload one via `drama bgm upload-video`).
15
+ - Provide a non-empty `--prompt` describing the desired BGM mood/style (CLI enforces `MISSING_BGM_PARAMS`).
16
+ 3. **Preview Before Submitting**: Always run `--dry-run` before creating billable BGM tasks.
17
+
18
+ ## Step 1: List Round Videos & BGM Status (or Upload a Video Cut)
19
+
20
+ ```bash
21
+ # Inspect round videos, BGM records, and current BGM task status
22
+ seecool-cli drama bgm list --project-id 101 --episode-id 5 --round-id 11 --json
23
+ seecool-cli drama bgm list --round-id 11 --source-id 991 --json
24
+
25
+ # Upload a local video cut and register it on the round
26
+ seecool-cli drama bgm upload-video --round-id 11 --path ./ep1-cut.mp4 --dry-run --json
27
+ seecool-cli drama bgm upload-video --round-id 11 --path ./ep1-cut.mp4 --json
28
+ ```
29
+
30
+ ## Step 2: Create AI BGM Task & Poll Until Settled
31
+
32
+ ```bash
33
+ seecool-cli drama bgm create \
34
+ --project-id 101 \
35
+ --episode-id 5 \
36
+ --round-id 11 \
37
+ --source-id 991 \
38
+ --prompt "Tense noir synth strings, slow buildup" \
39
+ --wait \
40
+ --dry-run --json
41
+
42
+ seecool-cli drama bgm create \
43
+ --project-id 101 \
44
+ --episode-id 5 \
45
+ --round-id 11 \
46
+ --source-id 991 \
47
+ --prompt "Tense noir synth strings, slow buildup" \
48
+ --wait --json
49
+ ```
50
+
51
+ Poll an in-progress round BGM job anytime:
52
+
53
+ ```bash
54
+ seecool-cli drama bgm list --round-id 11 --wait --timeout 600 --json
55
+ ```
@@ -0,0 +1,58 @@
1
+ ---
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. (中文关键词:章节管理、场次编辑、补充剧本、拆主体、提取角色场景道具)"
4
+ ---
5
+
6
+ # Seecool Drama — Stage 20: Chapter Management
7
+
8
+ Handles **Stage `20` (Chapter & Round)** operations. Do **not** run Stage `30` subject image generation or Stage `40` storyboard commands here.
9
+
10
+ ## Stage Entry & Exit Gates
11
+
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
+ - **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` settles successfully, extracted subjects (`character` / `scene` / `item`) are read back and confirmed, and `drama project next-stage <id>` advances `project_stage` to `30`.
15
+
16
+ ## Chapter Review & Editing (`seecool-cli drama chapter`)
17
+
18
+ ```bash
19
+ seecool-cli drama chapter list --project-id 101 --json
20
+ seecool-cli drama chapter get --project-id 101 --chapter-id 12 --json
21
+
22
+ # Create a new chapter (omit --chapter-id) or update an existing chapter (pass --chapter-id)
23
+ seecool-cli drama chapter save --project-id 101 --index 1 --title "Episode 1" --content-file ./ep1.txt --json
24
+ seecool-cli drama chapter save --project-id 101 --chapter-id 12 --index 1 --title "Episode 1 (Rev)" --content-file ./ep1.txt --json
25
+ seecool-cli drama chapter delete --project-id 101 --chapter-id 12 --yes --json
26
+
27
+ # Append additional chapters from a supplemental script file
28
+ seecool-cli drama script import --project-id 101 --path ./more-episodes.txt --supplement --json
29
+ ```
30
+
31
+ ## Round Review & Editing (`seecool-cli drama round`)
32
+
33
+ ```bash
34
+ seecool-cli drama round list --project-id 101 --json
35
+ seecool-cli drama round save --project-id 101 --chapter-id 12 --index 1 --title "Scene 1" --subtitle "Alley" --content "..." --json
36
+ seecool-cli drama round save --project-id 101 --chapter-id 12 --round-id 11 --title "Scene 1A" --content "..." --json
37
+ seecool-cli drama round delete --project-id 101 --round-id 11 --yes --json
38
+ ```
39
+
40
+ ## Transition to Stage 30: Extract Subjects & Wait
41
+
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:
45
+
46
+ ```bash
47
+ seecool-cli model list --type text --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
56
+ ```
57
+
58
+ Once extraction succeeds, subjects are verified, and `project_stage` is `30`, switch to `seecool-drama-subject`.
@@ -0,0 +1,79 @@
1
+ ---
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 + split), and advancing a project sequentially from stage 10 to stage 20. (中文关键词:短剧建项、画面风格、上传剧本、导入剧本、拆分剧本、拆场次、拆集)"
4
+ ---
5
+
6
+ # Seecool Drama — Stage 10: Script Management
7
+
8
+ Handles **Stage `10` (Script)** operations only. Once chapters exist and `project_stage` advances to `20`, hand off to `seecool-drama-chapter`.
9
+
10
+ ## Stage Entry & Exit Gates
11
+
12
+ - **Entry Gate**: Authenticated via `seecool-cli status --verify --json`, default org set, and either creating a new project or operating at `project_stage = 10` (`seecool-cli drama inspect <projectId> --json`).
13
+ - **Mandatory Script Split**: `seecool-cli drama script import` automatically uploads the script, binds `script_url`, and calls the script split interface (`split-chapter`). Never advance to Stage `20` without verified chapters (`drama project next-stage` blocks with `CHAPTERS_REQUIRED` if chapters are empty).
14
+ - **Exit Gate (`10 → 20`)**: `drama chapter list --project-id <id>` is non-empty and `project_stage` is updated to `20`.
15
+
16
+ ## Step 1: Browse Visual Styles & Create Project
17
+
18
+ Optional project budget and subtitle style parameters are supported at creation time (`--limit-mode 1|2`, `--limit-points <n>`, `--round-limit-mode 1|2`, `--round-points-limit <n>`, `--subtitle-font`, `--subtitle-font-size`, `--subtitle-position`, `--subtitle-bottom-margin`). Passing `--model-ids` validates every model against the active organization and region allowlist.
19
+
20
+ ```bash
21
+ seecool-cli drama style list --json
22
+ seecool-cli drama project create \
23
+ --name "Neon Detective" \
24
+ --aspect-ratio 9:16 \
25
+ --style-id 12 \
26
+ --has-script 1 \
27
+ --limit-mode 2 \
28
+ --limit-points 5000 \
29
+ --dry-run --json
30
+
31
+ seecool-cli drama project create \
32
+ --name "Neon Detective" \
33
+ --aspect-ratio 9:16 \
34
+ --style-id 12 \
35
+ --has-script 1 --json
36
+ ```
37
+
38
+ Once the project is created and you have its name and ID, if the current host agent supports renaming the conversation/session title, rename it to `<项目名称-id>-<yyyy-MM-dd>` (e.g., `Neon Detective-101-2026-12-01`).
39
+
40
+ ## Step 2: Import & Split Script (Supports File, Inline Text & Separated Split)
41
+
42
+ `drama script import` supports either `--path <file>` or inline `--text <content>`. By default it uploads, binds `script_url`, runs `split-chapter`, and verifies resulting chapters. Pass `--no-split` to upload & bind only (0-cost), then run `drama script split` separately.
43
+
44
+ ```bash
45
+ # Upload + bind + split in one command
46
+ seecool-cli drama script import \
47
+ --project-id 101 \
48
+ --path ./script.txt \
49
+ --next-stage \
50
+ --dry-run --json
51
+
52
+ seecool-cli drama script import \
53
+ --project-id 101 \
54
+ --path ./script.txt \
55
+ --next-stage --json
56
+
57
+ # Or upload inline text without splitting yet, then split separately
58
+ seecool-cli drama script import --project-id 101 --text "第1集 开场..." --no-split --json
59
+ seecool-cli drama script split --project-id 101 --next-stage --json
60
+ ```
61
+
62
+ If script format validation warnings are returned in `error.details`, review them with the user or explicitly re-run with `--skip-validation`:
63
+
64
+ ```bash
65
+ seecool-cli drama script import \
66
+ --project-id 101 \
67
+ --path ./script.txt \
68
+ --skip-validation \
69
+ --next-stage --json
70
+ ```
71
+
72
+ ## Step 3: Verify Chapters & Advance (if `--next-stage` was omitted)
73
+
74
+ ```bash
75
+ seecool-cli drama chapter list --project-id 101 --json
76
+ seecool-cli drama project next-stage 101 --json
77
+ ```
78
+
79
+ Once `project_stage` reaches `20`, switch to `seecool-drama-chapter`.