Package not found. Please check the package name and try again.

@pippit-dev/cli 0.0.13 → 0.0.15

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/checksums.txt CHANGED
@@ -1,6 +1,6 @@
1
- c02c37229ea76195c04881880a9d5a913ab95846958ab4e4ab41bc2b82649e49 pippit-tool-cli-0.0.13-darwin-amd64.tar.gz
2
- 4937231063eeaad1e494be4f2b6218860313abbf529d868568d9d6e48bf62e3e pippit-tool-cli-0.0.13-darwin-arm64.tar.gz
3
- da2bb0c5472bdd02a2cc861a17564254abb86fa5c63c44b58c7fbb64211550f1 pippit-tool-cli-0.0.13-linux-amd64.tar.gz
4
- 476e0907a6983f9360324732411edcd9c2c80f9d903a7974949ef2d09b1f35ba pippit-tool-cli-0.0.13-linux-arm64.tar.gz
5
- cfe8e5b92b8b6abbf5ed3abc9ce31c1371efcc34698edfa5ee2d8d675d4f7886 pippit-tool-cli-0.0.13-windows-amd64.zip
6
- edff7af4414b2b080338f96eab5ce9cca2a14d4bd8fc3099a1af7a2dc43109d2 pippit-tool-cli-0.0.13-windows-arm64.zip
1
+ fa8c1c2792f7d35d5cc3d404d54f3739b27d293f752109a12b1eb472a42cb137 pippit-tool-cli-0.0.15-darwin-amd64.tar.gz
2
+ b7fea091af69a21d3817af90781c89c45c2c3a7eebfbcaf9c7d1cc4ed5817661 pippit-tool-cli-0.0.15-darwin-arm64.tar.gz
3
+ 8efb9fbdf2bcb67444ace90f376b82f81b6e7d28c17f8a63cf3f659796ec4a9f pippit-tool-cli-0.0.15-linux-amd64.tar.gz
4
+ 6e9b689ca808704d551967abdf9e3bf7bbb462e8f87978b9f5f8d09c49ae8e31 pippit-tool-cli-0.0.15-linux-arm64.tar.gz
5
+ 1dcb53bd959026ddcae51c2cf50174ab90c900875992c28b3d568cf88fcb5408 pippit-tool-cli-0.0.15-windows-amd64.zip
6
+ 4c1cdaea7521d9600ad33a2091e078104a5891d7950c527bc05176bd0cf2ffba pippit-tool-cli-0.0.15-windows-arm64.zip
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pippit-dev/cli",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "description": "Pippit CLI",
5
5
  "bin": {
6
6
  "pippit-tool-cli": "scripts/run.js"
@@ -25,7 +25,7 @@ metadata:
25
25
 
26
26
  1. **提交短剧 Run 任务** - 创建新会话或向已有会话发送短剧创作需求。
27
27
  2. **查询会话进展** - 根据 `thread_id`、`run_id`、`after_seq` 拉取短剧任务消息列表。
28
- 3. **上传文件** - 上传短剧相关参考文件,得到文件 ID,供后续任务引用。
28
+ 3. **上传文件** - 上传本地 `.doc` / `.txt` 参考文件,得到 `asset_id`,供后续任务引用。
29
29
  4. **获取会话文件** - 根据 `thread_id` 拉取会话文件列表,得到 `file_path`、`download_url`。这和查询会话进展同等重要。
30
30
  5. **下载重要资产** - 使用文件列表中的 `download_url` 下载资源,并按 `file_path` 写入用户本地目标文件路径。
31
31
 
@@ -50,7 +50,7 @@ pippit-tool-cli short-drama +submit-run --message "创作一个赛博朋克短
50
50
  # 向已有会话追加新的短剧需求
51
51
  pippit-tool-cli short-drama +submit-run --message "继续写下一集,重点描写主角的逃亡" --thread-id THREAD_ID
52
52
 
53
- # 携带已上传文件 ID 提交任务
53
+ # 携带已上传剧本文件 asset_id 提交任务;同一 thread_id 只允许一个剧本文件
54
54
  pippit-tool-cli short-drama +submit-run --message "参考这个大纲写第一集" --asset-ids ASSET_ID
55
55
  ```
56
56
 
@@ -65,12 +65,22 @@ pippit-tool-cli short-drama +get-thread --thread-id THREAD_ID --run-id RUN_ID --
65
65
 
66
66
  ### 3. 上传文件
67
67
 
68
- 当用户提供短剧大纲、人物设定、世界观设定、已有分集或剧本等本地文件路径时,可先上传文件。
68
+ 当用户提供短剧大纲、人物设定、世界观设定、已有分集或剧本等本地参考文件时,可先上传文件。`+upload-file` 当前只接收本地文件路径,并且只支持 `.doc` 和 `.txt` 后缀;不要把 `.md`、`.pdf`、图片、视频或 URL 传给该命令。
69
69
 
70
70
  ```bash
71
- pippit-tool-cli short-drama +upload-file --path /path/to/outline.md
71
+ pippit-tool-cli short-drama +upload-file --path /path/to/outline.txt
72
72
  ```
73
73
 
74
+ 上传成功后命令只返回 `asset_id`:
75
+
76
+ ```json
77
+ {
78
+ "asset_id": "asset_..."
79
+ }
80
+ ```
81
+
82
+ 后续提交任务时,把该值作为唯一的 `--asset-ids` 传给 `+submit-run`。单次创作会话中(相同 `thread_id`),只支持上传并绑定一个剧本文件;如果用户提供多个剧本文件,先让用户选择一个,或为不同剧本分别开启新的创作会话,不要在同一 `thread_id` 下重复追加剧本文件。
83
+
74
84
  ### 4. 获取会话文件
75
85
 
76
86
  ```bash
@@ -130,11 +140,13 @@ pippit-tool-cli short-drama +download-result --url DOWNLOAD_URL --output-path FI
130
140
  ### 场景 2:用户提供参考文件要求创作
131
141
 
132
142
  ```
133
- 1. pippit-tool-cli short-drama +upload-file --path /path/to/file
134
- 拿到 file_id
135
- 2. pippit-tool-cli short-drama +submit-run --message "用户的原始短剧需求" --asset-ids file_id
143
+ 1. 检查用户提供的是一个本地 `.doc` `.txt` 剧本文件路径;如果不是,告知当前上传命令只支持这两类文件,不要擅自转换或改写文件。
144
+ 2. pippit-tool-cli short-drama +upload-file --path /path/to/file.txt
145
+ 拿到 asset_id
146
+ 3. pippit-tool-cli short-drama +submit-run --message "用户的原始短剧需求" --asset-ids asset_id
136
147
  → 拿到 thread_id、run_id 和 web_thread_link
137
- 3. 后续同场景 1 的并行查询、重要资产发现和文件下载流程
148
+ 4. 记录该 thread_id 已绑定这个剧本文件;后续同一 thread_id 的续写或修改只传 --thread-id,不再传新的剧本 asset_id
149
+ 5. 后续同场景 1 的并行查询、重要资产发现和文件下载流程
138
150
  ```
139
151
 
140
152
  ### 场景 3:在已有短剧会话中续写或修改
@@ -142,7 +154,8 @@ pippit-tool-cli short-drama +download-result --url DOWNLOAD_URL --output-path FI
142
154
  ```
143
155
  1. pippit-tool-cli short-drama +submit-run --message "用户的新需求" --thread-id THREAD_ID
144
156
  → 拿到新的 run_id 和 web_thread_link
145
- 2. 继续按场景 1 展示进展、处理用户补充问题、获取新增会话文件列表,并及时下载新增重要资产
157
+ 2. 如果该 THREAD_ID 已经绑定过剧本文件,不要再上传或通过 --asset-ids 追加第二个剧本文件
158
+ 3. 继续按场景 1 展示进展、处理用户补充问题、获取新增会话文件列表,并及时下载新增重要资产
146
159
  ```
147
160
 
148
161
  ## 轮询策略
@@ -202,17 +215,12 @@ pippit-tool-cli short-drama +download-result --url DOWNLOAD_URL --output-path FI
202
215
 
203
216
  ```json
204
217
  {
205
- "scene": "short-drama",
206
- "file_id": "file_...",
207
- "status": "uploaded",
208
- "uploaded_at": "2026-05-19T00:00:00Z",
209
- "request": {
210
- "path": "/path/to/file",
211
- "file_name": "file.md"
212
- }
218
+ "asset_id": "asset_..."
213
219
  }
214
220
  ```
215
221
 
222
+ `+upload-file` 通过 `multipart/form-data` 上传文件,表单文件字段名为 `file`。本地文件必须存在、不能是目录,后缀必须是 `.doc` 或 `.txt`;不支持的后缀会直接报错。返回的 `asset_id` 来自服务端 `pippit_asset_id`,如果没有该字段才回退到 `asset_id`。
223
+
216
224
  **+list-thread-file** 返回:
217
225
 
218
226
  ```json
@@ -245,7 +253,7 @@ pippit-tool-cli short-drama +download-result --url DOWNLOAD_URL --output-path FI
245
253
 
246
254
  ### 获取会话文件
247
255
 
248
- 从 `+list-thread-file` 的 `files` 中逐个读取文件元信息:`file_path`、`file_name`、`download_url`。重点识别剧本设计、场景设计、场景图、人物角色设计、人物图、分集草稿、故事板、最终视频产物等重要资产。
256
+ 从 `+list-thread-file` 的 `files` 中逐个读取文件元信息:`file_path`、`download_url`。重点识别剧本大纲、故事线设计、场景设计说明、场景图、人物角色设计说明、人物图、分集草稿、分镜片段视频、故事板、最终视频产物等重要资产。
249
257
 
250
258
  ```
251
259
  1. 有download_url的重要资产
@@ -283,8 +291,8 @@ pippit-tool-cli short-drama +download-result --url DOWNLOAD_URL --output-path FI
283
291
 
284
292
  你要做的只有三件事:
285
293
 
286
- 1. **上传**:如果用户给了本地参考文件,先调用 `+upload-file`。
287
- 2. **提交任务**:把用户原始短剧需求和文件 ID 通过 `+submit-run` 发给后端。
294
+ 1. **上传**:如果用户给了本地 `.doc` / `.txt` 参考文件,先调用 `+upload-file`。
295
+ 2. **提交任务**:首次创作时把用户原始短剧需求和唯一剧本 `asset_id` 通过 `+submit-run --asset-ids` 发给后端;同一 `thread_id` 后续续写或修改不再追加新的剧本文件。
288
296
  3. **传话、取文件、下载资源**:根据 `+get-thread` 返回的消息展示进展、问题和结果;根据 `+list-thread-file` 获取文件列表;再根据 `download_url` 调用 `+download-result` 把缺失资源下载到用户本地。
289
297
 
290
298
  **不要做的事:**
@@ -301,7 +309,9 @@ pippit-tool-cli short-drama +download-result --url DOWNLOAD_URL --output-path FI
301
309
  - `--message` 是用户的原始短剧需求,不能为空。
302
310
  - 查询进展时优先使用 `+submit-run` 返回的 `thread_id` 和 `run_id`。
303
311
  - `--after-seq` 用于增量拉取消息,首次查询可设置为 `0`。
304
- - `+upload-file` 当前用于短剧场景文件上传链路,上传后将返回可传给 `+submit-run` 的文件 ID。
312
+ - `+upload-file` 当前用于短剧场景文件上传链路,只支持本地 `.doc` / `.txt` 文件;`--path` 不能为空,路径必须指向真实文件,不能是目录。
313
+ - `+upload-file` 上传成功后只返回 `asset_id`;把该值原样作为 `+submit-run --asset-ids` 的参数。
314
+ - 单次创作会话中(相同 `thread_id`),`+submit-run` 只支持绑定一个剧本文件。不要在同一 `thread_id` 下重复上传并追加第二个剧本 `asset_id`;用户给多个剧本时,先让用户选择一个,或分别开启新的创作会话。
305
315
  - `+list-thread-file` 只需要 `thread_id`;分页参数使用 `--page-num 1 --page-size 200` 起步,`total` 达到 200 时下一轮递增 `page-num`。
306
316
  - `+list-thread-file` 和 `+download-result` 是两个不同的 CLI 指令:前者获取会话文件元信息,后者下载 URL 资源并写入到本地目标文件路径。
307
317
  - `+download-result` 接收 `--url`、`--output-path`、`--workers`;`--output-path` 必须是包含文件名的目标文件路径。