@302ai/media-studio-cli 0.1.0-beta.5 → 0.1.0-beta.7
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/README.md +26 -2
- package/dist/index.js +2212 -82
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -53,7 +53,6 @@ msc chat "hi" --session <id> # 切换到指定会话并设为默认
|
|
|
53
53
|
msc sessions # 列出所有会话(标记当前默认 `(current)`)
|
|
54
54
|
msc sessions --json # 机器可读的原始 JSON 数组
|
|
55
55
|
msc sessions use <id> # 纯本地切换默认会话(零请求、不校验)
|
|
56
|
-
msc sessions rm <id> # 删除服务端会话(交互确认,或加 -y/--yes 跳过)
|
|
57
56
|
msc skills # 列出技能库(--plaza 浏览技能广场)
|
|
58
57
|
msc skills add <slug> # 从广场安装技能(如 brainstorming,见 --plaza --json 的 slug)
|
|
59
58
|
msc skills rm <command> # 从技能库移除(-y/--yes 跳过确认)
|
|
@@ -61,6 +60,9 @@ msc skills enable <command> # 启用 / disable 停用
|
|
|
61
60
|
msc --help # all flags
|
|
62
61
|
```
|
|
63
62
|
|
|
63
|
+
Session deletion is not available in the CLI. To delete a session, open the
|
|
64
|
+
corresponding session page in the Media Studio web app and delete it manually.
|
|
65
|
+
|
|
64
66
|
`msc --help` carries an agent-oriented quickstart — the auth prerequisite, the
|
|
65
67
|
three canonical calls, and the `--json` contract. `msc guide` prints the full
|
|
66
68
|
manual: every command, both JSON schemas, the `nextStep` values, exit codes,
|
|
@@ -180,6 +182,29 @@ alone triggers nothing.
|
|
|
180
182
|
flag on your account (a persistent change), is reported as
|
|
181
183
|
`Auto-enabled for this turn: …`, and a failed enable aborts the turn.
|
|
182
184
|
|
|
185
|
+
### Attachments
|
|
186
|
+
|
|
187
|
+
Attach local files to a chat turn using `@path` anywhere in the prompt:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
msc chat "看看 @cover.png 这张图" # bare path (ends at whitespace)
|
|
191
|
+
msc chat "总结 @/abs/path/notes.pdf" # absolute path
|
|
192
|
+
msc chat '对比 @"my docs/report.docx" 内容' # quoted path with spaces
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
The CLI mirrors the web composer's upload flow:
|
|
196
|
+
|
|
197
|
+
1. Validates each referenced file locally (exists, readable, supported extension, under 50 MB) before any network call.
|
|
198
|
+
2. Uploads each file via the web app's `POST /api/chat/attachments` endpoint with a terminal spinner (`Uploading attachment 1/2: cover.png`).
|
|
199
|
+
3. Rewrites the prompt to inline the remote URL using the web's `&&<url>&&` marker, which the upstream model and web session history natively understand.
|
|
200
|
+
4. Up to 5 unique attachments per turn (same as the web composer); referencing the same file twice uploads it once.
|
|
201
|
+
5. An unattachable reference (missing file, unsupported format) fails the turn before any session is provisioned.
|
|
202
|
+
6. Prose mentions (`@team 辛苦了`, email addresses) stay literal text — only tokens with a file extension or path slash are treated as attachments.
|
|
203
|
+
7. `@path` is local-filesystem-only: `@https://example.com/a.png` fails with `no such file`. There is no `@url` form — remote URLs are not attachments.
|
|
204
|
+
|
|
205
|
+
In `--json` mode the uploaded attachments are surfaced under the `attachments` array:
|
|
206
|
+
`[{ name, type, size, remoteUrl }]`.
|
|
207
|
+
|
|
183
208
|
### Staging server (expired TLS certificate)
|
|
184
209
|
|
|
185
210
|
The staging server's certificate is expired (ops declines renewal), so the
|
|
@@ -301,7 +326,6 @@ msc chat "刚才的数字是几?" # answers 42
|
|
|
301
326
|
msc sessions # shows session list with (current) marker
|
|
302
327
|
msc chat "hi" --session <id> # switch to specific session
|
|
303
328
|
msc sessions use <id> # switch default pointer locally
|
|
304
|
-
msc sessions rm <id> -y # delete session upstream (-y skips prompt)
|
|
305
329
|
```
|
|
306
330
|
|
|
307
331
|
Without the local server, point at production with
|