@pippit-dev/cli 0.0.13 → 0.0.14
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 +6 -6
- package/package.json +1 -1
- package/skills/short-drama/SKILL.md +30 -20
package/checksums.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
2d0d79a7a277b9969076a38d3584b6dfc9fece10d6505edc314e56a67ab78974 pippit-tool-cli-0.0.14-darwin-amd64.tar.gz
|
|
2
|
+
e1ecf0319de259bf7e790e90a96e0e596a4a04b5f0b5c774196fd7a5048e9336 pippit-tool-cli-0.0.14-darwin-arm64.tar.gz
|
|
3
|
+
09056e9f1b2241c7021bb9cb47279d6497848adaea72fb5531cf1ed62a7e6e88 pippit-tool-cli-0.0.14-linux-amd64.tar.gz
|
|
4
|
+
2b50fa3f7745e6cb5436d82f309870cf17b7faa52ab5129b3179cee69e6b6c88 pippit-tool-cli-0.0.14-linux-arm64.tar.gz
|
|
5
|
+
ffaaca77e50f4962713ce871a871d47992c276ac174c8721c507359b369afcb4 pippit-tool-cli-0.0.14-windows-amd64.zip
|
|
6
|
+
6cb91adab8d2004160f6792014fd948aea3368c38f38f30aabccd381d31e82eb pippit-tool-cli-0.0.14-windows-arm64.zip
|
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@ metadata:
|
|
|
25
25
|
|
|
26
26
|
1. **提交短剧 Run 任务** - 创建新会话或向已有会话发送短剧创作需求。
|
|
27
27
|
2. **查询会话进展** - 根据 `thread_id`、`run_id`、`after_seq` 拉取短剧任务消息列表。
|
|
28
|
-
3. **上传文件** -
|
|
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
|
-
#
|
|
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.
|
|
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.
|
|
134
|
-
|
|
135
|
-
|
|
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
|
-
|
|
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.
|
|
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
|
-
"
|
|
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
|
|
@@ -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.
|
|
287
|
-
2.
|
|
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`
|
|
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` 必须是包含文件名的目标文件路径。
|