@lingjingai/lj-awb-cli-pre 0.3.18 → 0.4.0

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 CHANGED
@@ -2,13 +2,13 @@
2
2
 
3
3
  `lj-awb` 是灵境 AWB / 动漫创作平台的命令行客户端。它把平台底层能力封装成稳定、可脚本化、Agent 友好的命令,并随包分发一套 `lj-awb` skill,方便 Codex、Claude 等 Agent 把自然语言任务编排成确定性的 CLI 调用。
4
4
 
5
- CLI 本身只负责平台调用、参数校验、精简输出和安全确认;自然语言理解、任务规划、项目产物写回由上层 Agent / skill 完成。
5
+ CLI 本身只负责平台调用、参数校验、人类友好输出、机器可读输出和安全确认;自然语言理解、任务规划、项目产物写回由上层 Agent / skill 完成。
6
6
 
7
7
  ```text
8
8
  用户 / Agent / CI
9
9
  -> lj-awb
10
10
  -> 灵境 AWB / 动漫平台 API
11
- -> compact text / JSON 结果
11
+ -> pretty / text / JSON / YAML / CSV 结果
12
12
  ```
13
13
 
14
14
  ## 能力概览
@@ -110,6 +110,7 @@ lj-awb account info
110
110
  ```bash
111
111
  lj-awb doctor
112
112
  lj-awb doctor --verify
113
+ lj-awb schema --brief -f json
113
114
  lj-awb schema -f json
114
115
  lj-awb schema --domain create -f json
115
116
  lj-awb auth status
@@ -141,21 +142,22 @@ lj-awb create image ... --yes
141
142
 
142
143
  ## Agent 接入建议
143
144
 
144
- Agent 不应该靠记忆猜命令参数。进入任务前推荐先读取机器可读契约:
145
+ Agent 不应该靠记忆猜命令参数。进入任务前先读轻量能力摘要;执行具体命令前再按需读取精确契约:
145
146
 
146
147
  ```bash
147
- lj-awb schema -f json
148
- lj-awb schema --domain create -f json
148
+ lj-awb schema --brief -f json
149
149
  lj-awb schema --domain create --command video -f json
150
150
  ```
151
151
 
152
+ 只有做覆盖校验、生成脚本或调试 schema 本身时,才需要读取完整 `lj-awb schema -f json`。
153
+
152
154
  正式创作前推荐做一次体检:
153
155
 
154
156
  ```bash
155
157
  lj-awb doctor --verify
156
158
  ```
157
159
 
158
- `auth status` 只检查本地是否配置 access key;`auth verify` 会联网校验 key 是否远端有效。`doctor` 默认只做本地检查;追加 `--verify` 后会联网校验 access key、当前用户和项目组。`schema` 返回每个命令的 `options[].key`,Agent 应使用这些 key 生成 CLI 参数,而不是解析自然语言 help。
160
+ `auth status` 只检查本地是否配置 access key;`auth verify` 会联网校验 key 是否远端有效。`doctor` 默认只做本地检查;追加 `--verify` 后会联网校验 access key、当前用户和项目组。精确 `schema` 返回每个命令的 `options[].key`,Agent 应使用这些 key 生成 CLI 参数,而不是解析自然语言 help。
159
161
 
160
162
  `schema` 还包含面向 Agent 的执行约束:
161
163
 
@@ -242,9 +244,11 @@ lj-awb create video \
242
244
  --yes
243
245
  ```
244
246
 
245
- ## JSON 输出契约
247
+ ## 输出契约
248
+
249
+ 默认输出是 `pretty`:面向人类阅读的彩色标题、摘要区、自动换行表格和下一步建议。表格由 `cli-table3` 做终端渲染,不是 CSV;颜色由 `chalk` 渲染,设置 `NO_COLOR=1` 可关闭,`FORCE_COLOR=1` 或 `LINGJING_AWB_COLOR=1` 可强制开启。Agent / 脚本不要依赖默认 pretty 解析字段:需要稳定 envelope 时显式追加 `-f json` 或 `--json`;需要低 token 的紧凑 key-value 兼容输出时传 `-f text`;列表导出可用 `-f csv`,可读结构化输出可用 `-f yaml`。
246
250
 
247
- 默认输出是 compact text,适合终端和 Agent 低 token 读取;复杂模型命令使用 `section:` + 缩进 `key=value` 的分区格式,避免 `params`、`resources`、`intents`、`next` 混在一屏里。只有需要完整嵌套结构、稳定 JSON envelope 或脚本严格解析时才追加 `-f json` 或 `--json`。`schema` 通常使用 JSON;`model options` 和 `model create-spec` 默认 text 先读,必要时再切 JSON。
251
+ `schema` 通常使用 JSON;`model options` 和 `model create-spec` 面向人类时可直接读默认 pretty,Agent 做参数决策时建议使用 `-f text`,脚本严格解析或需要完整嵌套结构时再切 `-f json`。
248
252
 
249
253
  输出字段只保留后续动作不可替代的信息。默认不返回平台原始 `raw`、COS 签名细节、重复的首个结果字段;任务结果统一使用 `resultUrls` 表达。
250
254
 
package/package.json CHANGED
@@ -1,12 +1,16 @@
1
1
  {
2
2
  "name": "@lingjingai/lj-awb-cli-pre",
3
- "version": "0.3.18",
3
+ "version": "0.4.0",
4
4
  "description": "Lingjing AWB CLI monorepo with shared core, standalone CLI, and agent skills (pre-release build pointing to https://animeworkbench-pre.lingjingai.cn)",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "bin": {
8
8
  "lj-awb": "packages/awb-cli/bin/lj-awb"
9
9
  },
10
+ "dependencies": {
11
+ "chalk": "^5.6.2",
12
+ "cli-table3": "^0.6.5"
13
+ },
10
14
  "engines": {
11
15
  "node": ">=20"
12
16
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingjingai/awb-cli-bin",
3
- "version": "0.3.18",
3
+ "version": "0.4.0",
4
4
  "description": "Standalone CLI for Lingjing AWB",
5
5
  "private": true,
6
6
  "license": "MIT",
@@ -13,6 +13,6 @@
13
13
  "README.md"
14
14
  ],
15
15
  "dependencies": {
16
- "@lingjingai/awb-core": "0.3.18"
16
+ "@lingjingai/awb-core": "0.4.0"
17
17
  }
18
18
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingjingai/awb-core",
3
- "version": "0.3.18",
3
+ "version": "0.4.0",
4
4
  "description": "Shared core runtime for Lingjing AWB CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -17,5 +17,9 @@
17
17
  "files": [
18
18
  "src",
19
19
  "README.md"
20
- ]
20
+ ],
21
+ "dependencies": {
22
+ "chalk": "^5.6.2",
23
+ "cli-table3": "^0.6.5"
24
+ }
21
25
  }