@gaoding/cli 2.1.0 → 2.1.1

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.
Files changed (114) hide show
  1. package/contracts/operations/agent.send/input.schema.json +8 -84
  2. package/contracts/operations/agent.send/output.schema.json +6 -6
  3. package/contracts/operations/dam.folder.list/input.schema.json +1 -1
  4. package/contracts/operations/dam.folder.list/output.schema.json +1 -1
  5. package/contracts/operations/dam.list/input.schema.json +2 -5
  6. package/contracts/operations/dam.list/output.schema.json +1 -1
  7. package/contracts/operations/dam.search/input.schema.json +2 -5
  8. package/contracts/operations/dam.search/output.schema.json +1 -1
  9. package/contracts/operations/model.get/output.schema.json +6 -5
  10. package/contracts/operations/model.list/output.schema.json +5 -4
  11. package/contracts/operations/task.get/output.schema.json +22 -11
  12. package/contracts/operations/tool.call/models/image-edit-smart.schema.json +7 -5
  13. package/contracts/operations/tool.call/models/image-edit-standard.schema.json +6 -4
  14. package/contracts/operations/tool.call/models/image-enhance-smart.schema.json +5 -3
  15. package/contracts/operations/tool.call/models/image-enhance-standard.schema.json +3 -2
  16. package/contracts/operations/tool.call/models/image-expand-smart.schema.json +16 -10
  17. package/contracts/operations/tool.call/models/image-expand-standard.schema.json +13 -8
  18. package/contracts/operations/tool.call/models/image-layers-layout.schema.json +3 -2
  19. package/contracts/operations/tool.call/models/image-layers-smart.schema.json +3 -4
  20. package/contracts/operations/tool.call/models/image-matting-smart.schema.json +6 -4
  21. package/contracts/operations/tool.call/models/image-matting-standard.schema.json +3 -2
  22. package/contracts/operations/tool.call/models/image-ocr.schema.json +3 -2
  23. package/contracts/operations/tool.call/models/image-remove-smart.schema.json +6 -4
  24. package/contracts/operations/tool.call/models/image-remove-standard.schema.json +4 -3
  25. package/contracts/operations/tool.call/models/image-text-edit.schema.json +5 -3
  26. package/contracts/operations/tool.call/models/image-vectorize.schema.json +3 -2
  27. package/contracts/operations/tool.call/models/video-edit-smart.schema.json +6 -6
  28. package/contracts/operations/tool.call/models/video-enhance-smart.schema.json +7 -4
  29. package/contracts/operations/tool.call/models/video-enhance-standard.schema.json +5 -3
  30. package/contracts/operations/tool.call/ocr-payload.schema.json +4 -5
  31. package/contracts/operations/tool.call/output.schema.json +9 -8
  32. package/dist/bin/postinstall.js +22 -6
  33. package/dist/bin/task-worker.js +2 -2
  34. package/dist/src/bootstrap/create-cli.js +13 -6
  35. package/dist/src/bootstrap/create-runtime.js +98 -28
  36. package/dist/src/bootstrap/run-task-worker.js +6 -2
  37. package/dist/src/bootstrap/validators.js +1 -1
  38. package/dist/src/cli/action-binding.js +14 -37
  39. package/dist/src/cli/agent-commands.js +11 -11
  40. package/dist/src/cli/auth-commands.js +2 -1
  41. package/dist/src/cli/creation-help.js +9 -0
  42. package/dist/src/cli/dam-commands.js +10 -14
  43. package/dist/src/cli/editor-commands.js +7 -5
  44. package/dist/src/cli/errors.js +81 -22
  45. package/dist/src/cli/host-input.js +64 -5
  46. package/dist/src/cli/model-commands.js +9 -3
  47. package/dist/src/cli/observed-errors.js +7 -3
  48. package/dist/src/cli/org-commands.js +3 -1
  49. package/dist/src/cli/task-commands.js +6 -2
  50. package/dist/src/cli/tool-commands.js +12 -11
  51. package/dist/src/features/agent/creative-agent-adapter.js +6 -2
  52. package/dist/src/features/agent/creative-protocol.js +8 -29
  53. package/dist/src/features/agent/resource-authorizer.js +25 -17
  54. package/dist/src/features/agent/result-reader.js +31 -14
  55. package/dist/src/features/agent/use-cases.js +6 -31
  56. package/dist/src/features/credits/use-cases.js +55 -28
  57. package/dist/src/features/dam/asset-projection.js +3 -6
  58. package/dist/src/features/dam/dam-api-adapter.js +30 -15
  59. package/dist/src/features/dam/repository-catalog.js +30 -21
  60. package/dist/src/features/dam/use-cases.js +12 -7
  61. package/dist/src/features/editor/bridge-client.js +0 -2
  62. package/dist/src/features/editor/public-url.js +1 -36
  63. package/dist/src/features/editor/session.js +3 -2
  64. package/dist/src/features/editor/use-cases.js +27 -2
  65. package/dist/src/features/org/org-service.js +10 -1
  66. package/dist/src/features/org/use-cases.js +18 -4
  67. package/dist/src/features/task/process-owner.js +54 -0
  68. package/dist/src/features/task/store.js +37 -10
  69. package/dist/src/features/task/task-background.js +5 -2
  70. package/dist/src/features/task/use-cases.js +184 -84
  71. package/dist/src/features/tool/argument-paths.js +14 -0
  72. package/dist/src/features/tool/canvas-copy.js +28 -15
  73. package/dist/src/features/tool/canvas-matting.js +123 -0
  74. package/dist/src/features/tool/canvas-media.js +100 -52
  75. package/dist/src/features/tool/canvas-models.js +66 -33
  76. package/dist/src/features/tool/canvas-pricing.js +12 -0
  77. package/dist/src/features/tool/canvas-recovery.js +13 -30
  78. package/dist/src/features/tool/canvas-results.js +79 -87
  79. package/dist/src/features/tool/canvas-tool-adapter.js +134 -157
  80. package/dist/src/features/tool/canvas-video.js +44 -37
  81. package/dist/src/features/tool/dynamic-schema.js +39 -40
  82. package/dist/src/features/tool/ffprobe-executable.js +21 -0
  83. package/dist/src/features/tool/mns-catalog-adapter.js +61 -24
  84. package/dist/src/features/tool/resource-authorizer.js +11 -3
  85. package/dist/src/features/tool/tool-api-adapter.js +73 -82
  86. package/dist/src/features/tool/tool-errors.js +25 -0
  87. package/dist/src/features/tool/tool-output.js +15 -0
  88. package/dist/src/features/tool/use-cases.js +74 -98
  89. package/dist/src/features/update/update-service.js +95 -21
  90. package/dist/src/platform/media-type.js +46 -0
  91. package/dist/src/platform/public-url.js +35 -0
  92. package/dist/src/platform/remote-error-evidence.js +33 -6
  93. package/dist/src/platform/resource-auth-key.js +35 -1
  94. package/dist/src/platform/safe-upload-file.js +36 -41
  95. package/dist/src/platform/signature.js +2 -2
  96. package/dist/src/platform/signed-http-transport.js +4 -1
  97. package/dist/src/platform/url-safety.js +6 -1
  98. package/dist/src/platform/webm-header.js +41 -0
  99. package/dist/src/telemetry/command-route.js +38 -0
  100. package/dist/src/telemetry/command-routes.json +1 -0
  101. package/dist/src/telemetry/failure-summary.js +1 -1
  102. package/dist/src/telemetry/invocation.js +1 -2
  103. package/dist/src/telemetry/process-errors.js +17 -33
  104. package/dist/src/telemetry/sanitize.js +19 -4
  105. package/dist/src/telemetry/sls-sink.js +8 -0
  106. package/package.json +4 -4
  107. package/skills/gd-cli/SKILL.md +18 -5
  108. package/skills/gd-cli/references/agent.md +9 -4
  109. package/skills/gd-cli/references/creation.md +3 -1
  110. package/skills/gd-cli/references/editor.md +7 -5
  111. package/skills/gd-cli/references/errors.md +19 -8
  112. package/skills/gd-cli/references/matting.md +3 -5
  113. package/skills/gd-cli/references/media-tools.md +10 -4
  114. package/skills/gd-cli/references/tool.md +9 -15
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "title": "AgentSendInput",
4
- "description": "发送给稿定 Agent 的结构化创作消息。",
4
+ "description": "发送一次业务策划或持续创作消息;先读 agent send --help 了解本轮回复、续聊与任务取回。",
5
5
  "type": "object",
6
6
  "additionalProperties": false,
7
7
  "required": [
@@ -25,7 +25,7 @@
25
25
  "type": "string",
26
26
  "minLength": 1,
27
27
  "pattern": ".*\\S.*",
28
- "description": "继续已有创作 Context 时使用服务端返回的标识。"
28
+ "description": "首次省略;继续同一创作(包括回答补充/确认)时原样使用上一轮 message.contextId,不使用 taskId。"
29
29
  },
30
30
  "parts": {
31
31
  "type": "array",
@@ -79,30 +79,6 @@
79
79
  }
80
80
  }
81
81
  },
82
- {
83
- "properties": {
84
- "parts": {
85
- "type": "array",
86
- "contains": {
87
- "$ref": "#/$defs/FirstFramePart"
88
- },
89
- "minContains": 0,
90
- "maxContains": 1
91
- }
92
- }
93
- },
94
- {
95
- "properties": {
96
- "parts": {
97
- "type": "array",
98
- "contains": {
99
- "$ref": "#/$defs/LastFramePart"
100
- },
101
- "minContains": 0,
102
- "maxContains": 1
103
- }
104
- }
105
- },
106
82
  {
107
83
  "if": {
108
84
  "properties": {
@@ -179,7 +155,7 @@
179
155
  "format": "uri",
180
156
  "minLength": 1,
181
157
  "pattern": ".*\\S.*",
182
- "description": "HTTP(S) 素材或由 CLI 处理的 file:// 本地文件。"
158
+ "description": "HTTP(S) 素材 URL,或 CLI 使用的标准本地 file URI。用 Python Path(path).resolve().as_uri() / Node.js pathToFileURL(path).href 从真实路径生成,转义中文、空格和 #;已有 HTTP(S) URL 原样使用。"
183
159
  },
184
160
  "mediaType": {
185
161
  "type": "string",
@@ -200,12 +176,12 @@
200
176
  "properties": {
201
177
  "role": {
202
178
  "type": "string",
203
- "enum": [
179
+ "examples": [
204
180
  "reference",
205
181
  "first_frame",
206
182
  "last_frame"
207
183
  ],
208
- "description": "素材角色;省略时按 reference 处理。"
184
+ "description": "素材角色;常用 reference、first_frame、last_frame,省略按 reference 处理。其他服务角色按所给字符串传递。"
209
185
  }
210
186
  }
211
187
  }
@@ -254,18 +230,18 @@
254
230
  "questionMessageId",
255
231
  "answers"
256
232
  ],
257
- "description": "对上一轮 Agent 追问的回答。",
233
+ "description": "回答上一轮 Agent 的结构化补充/确认问题;该 Part 必须是 parts 唯一一项,同时沿用 message.contextId。普通文本续聊用 TextPart。",
258
234
  "properties": {
259
235
  "questionMessageId": {
260
236
  "type": "string",
261
237
  "minLength": 1,
262
238
  "pattern": ".*\\S.*",
263
- "description": "上一轮追问消息的标识。"
239
+ "description": "上一轮返回的 message.messageId 原值;不是 taskId 或 contextId。"
264
240
  },
265
241
  "answers": {
266
242
  "type": "array",
267
243
  "minItems": 1,
268
- "description": "按问题原文给出的回答。",
244
+ "description": "保留上一轮 questions 中的 question 原文,values 使用用户选择或自由回答,不擅自替用户作答。",
269
245
  "items": {
270
246
  "type": "object",
271
247
  "additionalProperties": false,
@@ -296,58 +272,6 @@
296
272
  }
297
273
  }
298
274
  }
299
- },
300
- "FirstFramePart": {
301
- "allOf": [
302
- {
303
- "$ref": "#/$defs/InputAssetPart"
304
- },
305
- {
306
- "type": "object",
307
- "properties": {
308
- "metadata": {
309
- "type": "object",
310
- "properties": {
311
- "role": {
312
- "const": "first_frame"
313
- }
314
- },
315
- "required": [
316
- "role"
317
- ]
318
- }
319
- },
320
- "required": [
321
- "metadata"
322
- ]
323
- }
324
- ]
325
- },
326
- "LastFramePart": {
327
- "allOf": [
328
- {
329
- "$ref": "#/$defs/InputAssetPart"
330
- },
331
- {
332
- "type": "object",
333
- "properties": {
334
- "metadata": {
335
- "type": "object",
336
- "properties": {
337
- "role": {
338
- "const": "last_frame"
339
- }
340
- },
341
- "required": [
342
- "role"
343
- ]
344
- }
345
- },
346
- "required": [
347
- "metadata"
348
- ]
349
- }
350
- ]
351
275
  }
352
276
  }
353
277
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "title": "AgentSendOutput",
4
- "description": "稿定 Agent 同步返回的最终消息与实际稿豆消耗。",
4
+ "description": "本轮 Agent 的完整回复及实际消耗;回复可能是文本、资源或补充/确认问题,不保证本轮已有成品。",
5
5
  "type": "object",
6
6
  "additionalProperties": false,
7
7
  "required": [
@@ -11,11 +11,11 @@
11
11
  "properties": {
12
12
  "message": {
13
13
  "$ref": "#/$defs/AgentMessage",
14
- "description": "本次调用返回的最终 Agent 消息。"
14
+ "description": "本轮已完成的回复;读取 parts 后决定交付实际资源、转述文本或向用户提问。"
15
15
  },
16
16
  "usage": {
17
17
  "$ref": "#/$defs/AgentUsage",
18
- "description": "本次调用由最终消息结算的实际稿豆消耗。"
18
+ "description": "本轮服务已确认的实扣合计;若命令提示计费记录不完整,此数仅是已知部分,请以对应账单为准。"
19
19
  }
20
20
  },
21
21
  "$defs": {
@@ -48,7 +48,7 @@
48
48
  "properties": {
49
49
  "cost": {
50
50
  "$ref": "#/$defs/ActualCost",
51
- "description": "本次 Agent 调用的实际总消耗。"
51
+ "description": "本轮有有效实扣记录的金额合计;若命令提示计费不完整,以账单为准,不能据此推断免费。"
52
52
  },
53
53
  "items": {
54
54
  "type": "array",
@@ -99,7 +99,7 @@
99
99
  "parts": {
100
100
  "type": "array",
101
101
  "minItems": 1,
102
- "description": "最终文本、素材或有效追问。",
102
+ "description": "本轮文本、资源或有效问题;按实际内容交付,不能把计划或确认文本说成图片/视频已生成。续聊沿用 contextId,结构化答复使用 messageId。",
103
103
  "items": {
104
104
  "$ref": "#/$defs/AgentPart"
105
105
  }
@@ -181,7 +181,7 @@
181
181
  "format": "uri",
182
182
  "minLength": 1,
183
183
  "pattern": ".*\\S.*",
184
- "description": "生成素材的访问 URL。"
184
+ "description": "生成素材的完整访问 URL。交付时原样保留查询参数,不截断、拼接或按诊断日志脱敏规则删除授权参数。"
185
185
  },
186
186
  "mediaType": {
187
187
  "type": "string",
@@ -9,7 +9,7 @@
9
9
  "parentId": { "$ref": "#/$defs/nonblank", "default": "0", "description": "父文件夹 ID。" },
10
10
  "query": { "$ref": "#/$defs/nonblank", "description": "文件夹标题关键词。" },
11
11
  "page": { "type": "integer", "minimum": 1, "default": 1, "description": "页码。" },
12
- "pageSize": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20, "description": "每页数量。" }
12
+ "pageSize": { "type": "integer", "minimum": 1, "default": 20, "description": "每页数量。" }
13
13
  },
14
14
  "$defs": { "nonblank": { "type": "string", "minLength": 1, "pattern": ".*\\S.*" } }
15
15
  }
@@ -9,7 +9,7 @@
9
9
  "repository_id": { "$ref": "#/$defs/nonblank" },
10
10
  "parent_id": { "$ref": "#/$defs/nonblank" },
11
11
  "page": { "type": "integer", "minimum": 1 },
12
- "page_size": { "type": "integer", "minimum": 1, "maximum": 100 },
12
+ "page_size": { "type": "integer", "minimum": 1 },
13
13
  "total": { "type": "integer", "minimum": 0 },
14
14
  "folders": { "type": "array", "items": { "$ref": "#/$defs/folder" } }
15
15
  },
@@ -16,20 +16,17 @@
16
16
  "type": { "$ref": "#/$defs/assetType", "description": "素材类型。" },
17
17
  "assetFormats": {
18
18
  "type": "array",
19
- "minItems": 1,
20
- "items": { "$ref": "#/$defs/nonblank" },
19
+ "items": { "type": "string" },
21
20
  "description": "文件格式筛选。"
22
21
  },
23
22
  "tagIds": {
24
23
  "type": "array",
25
- "minItems": 1,
26
- "items": { "$ref": "#/$defs/nonblank" },
24
+ "items": { "type": "string" },
27
25
  "description": "标签 ID 筛选。"
28
26
  },
29
27
  "pageSize": {
30
28
  "type": "integer",
31
29
  "minimum": 1,
32
- "maximum": 100,
33
30
  "description": "DAM 请求的分页大小。"
34
31
  },
35
32
  "cursor": { "$ref": "#/$defs/nonblank", "description": "分页游标。" }
@@ -12,7 +12,7 @@
12
12
  "items": { "$ref": "#/$defs/nonblank" },
13
13
  "description": "本次查询的资源库 ID。"
14
14
  },
15
- "page_size": { "type": "integer", "minimum": 1, "maximum": 100, "description": "本次 DAM 请求的分页大小;实际 assets 数量可能大于该值。" },
15
+ "page_size": { "type": "integer", "minimum": 1, "description": "本次 DAM 请求的分页大小;实际 assets 数量可能大于该值。" },
16
16
  "total": { "type": "integer", "minimum": 0, "description": "匹配素材总数。" },
17
17
  "finish": { "type": "boolean", "description": "是否已到最后一页。" },
18
18
  "next_cursor": { "$ref": "#/$defs/nonblank", "description": "下一页游标。" },
@@ -18,20 +18,17 @@
18
18
  "type": { "$ref": "#/$defs/assetType", "description": "素材类型。" },
19
19
  "assetFormats": {
20
20
  "type": "array",
21
- "minItems": 1,
22
- "items": { "$ref": "#/$defs/nonblank" },
21
+ "items": { "type": "string" },
23
22
  "description": "文件格式筛选。"
24
23
  },
25
24
  "tagIds": {
26
25
  "type": "array",
27
- "minItems": 1,
28
- "items": { "$ref": "#/$defs/nonblank" },
26
+ "items": { "type": "string" },
29
27
  "description": "标签 ID 筛选。"
30
28
  },
31
29
  "pageSize": {
32
30
  "type": "integer",
33
31
  "minimum": 1,
34
- "maximum": 100,
35
32
  "description": "DAM 请求的分页大小。"
36
33
  },
37
34
  "cursor": { "$ref": "#/$defs/nonblank", "description": "分页游标。" }
@@ -12,7 +12,7 @@
12
12
  "items": { "$ref": "#/$defs/nonblank" },
13
13
  "description": "本次查询的资源库 ID。"
14
14
  },
15
- "page_size": { "type": "integer", "minimum": 1, "maximum": 100, "description": "本次 DAM 请求的分页大小;实际 assets 数量可能大于该值。" },
15
+ "page_size": { "type": "integer", "minimum": 1, "description": "本次 DAM 请求的分页大小;实际 assets 数量可能大于该值。" },
16
16
  "total": { "type": "integer", "minimum": 0, "description": "匹配素材总数。" },
17
17
  "finish": { "type": "boolean", "description": "是否已到最后一页。" },
18
18
  "next_cursor": { "$ref": "#/$defs/nonblank", "description": "下一页游标。" },
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "cost": {
49
49
  "$ref": "#/$defs/CostRange",
50
- "description": "模型当前可用配置的稿豆消耗区间。"
50
+ "description": "当前配置的目录预估价格区间,不表示实际扣费;计量模型的公式见 usageDescription。"
51
51
  },
52
52
  "estimatedTime": {
53
53
  "$ref": "#/$defs/EstimatedTimeRange",
@@ -55,7 +55,7 @@
55
55
  },
56
56
  "inputSchema": {
57
57
  "type": "object",
58
- "description": "当前 Tool/Model 完整 JSON Schema,与执行校验使用同一来源。",
58
+ "description": "当前 Tool/Model 的完整公开输入 Schema,指导字段、类型、媒体角色和取值;CLI 仅检查自身构造请求所必需的条件,业务接受性由执行服务判断。",
59
59
  "additionalProperties": true
60
60
  }
61
61
  },
@@ -81,14 +81,15 @@
81
81
  "minimum": {
82
82
  "type": "number",
83
83
  "minimum": 0,
84
- "description": "当前可用配置中的最低稿豆消耗。"
84
+ "description": "目录预估价格区间的下限。"
85
85
  },
86
86
  "maximum": {
87
87
  "type": "number",
88
88
  "minimum": 0,
89
- "description": "当前可用配置中的最高稿豆消耗。"
89
+ "description": "目录预估价格区间的上限。"
90
90
  }
91
- }
91
+ },
92
+ "description": "Model Catalog 目录估价,不是实际扣费;minimum 与 maximum 相等也仍是估价。"
92
93
  },
93
94
  "EstimatedTimeRange": {
94
95
  "type": "object",
@@ -38,14 +38,15 @@
38
38
  "minimum": {
39
39
  "type": "number",
40
40
  "minimum": 0,
41
- "description": "当前可用配置中的最低稿豆消耗。"
41
+ "description": "目录预估价格区间的下限。"
42
42
  },
43
43
  "maximum": {
44
44
  "type": "number",
45
45
  "minimum": 0,
46
- "description": "当前可用配置中的最高稿豆消耗。"
46
+ "description": "目录预估价格区间的上限。"
47
47
  }
48
- }
48
+ },
49
+ "description": "Model Catalog 目录估价,不是实际扣费;minimum 与 maximum 相等也仍是估价。"
49
50
  },
50
51
  "EstimatedTimeRange": {
51
52
  "type": "object",
@@ -99,7 +100,7 @@
99
100
  },
100
101
  "cost": {
101
102
  "$ref": "#/$defs/CostRange",
102
- "description": "模型当前可用配置的稿豆消耗区间。"
103
+ "description": "当前配置的目录预估价格区间,不表示实际扣费。"
103
104
  },
104
105
  "estimatedTime": {
105
106
  "$ref": "#/$defs/EstimatedTimeRange",
@@ -44,25 +44,30 @@
44
44
  "properties": {
45
45
  "taskId": {
46
46
  "type": "string",
47
- "format": "uuid"
47
+ "format": "uuid",
48
+ "description": "本机原创作的任务 ID;用 task get 继续取回,不用于 Agent 续聊。"
48
49
  },
49
50
  "operation": {
50
51
  "enum": [
51
52
  "agent.send",
52
53
  "tool.call"
53
- ]
54
+ ],
55
+ "description": "决定 result 的结构及费用含义:agent.send 为本轮回复和实扣,tool.call 为工具产物和估价。"
54
56
  },
55
57
  "label": {
56
58
  "type": "string",
57
- "maxLength": 200
59
+ "maxLength": 200,
60
+ "description": "用于在任务列表定位原需求的摘要,不是结果。"
58
61
  },
59
62
  "createdAt": {
60
63
  "type": "string",
61
- "format": "date-time"
64
+ "format": "date-time",
65
+ "description": "本地任务创建时刻。"
62
66
  },
63
67
  "updatedAt": {
64
68
  "type": "string",
65
- "format": "date-time"
69
+ "format": "date-time",
70
+ "description": "本地记录最近更新时刻,不等同服务端完成时间。"
66
71
  },
67
72
  "state": {
68
73
  "enum": [
@@ -70,14 +75,17 @@
70
75
  "completed",
71
76
  "failed",
72
77
  "unknown"
73
- ]
78
+ ],
79
+ "description": "running 表示仍在执行。现在需要结果时继续查同一 ID,明确稍后取回时先交接 ID 和状态。completed 时交付 result 中的实际内容。failed 时根据 note 说明原因。unknown 时保留原 ID 核查。"
74
80
  },
75
81
  "contextId": {
76
82
  "type": "string",
77
- "minLength": 1
83
+ "minLength": 1,
84
+ "description": "Agent 对话上下文;续聊使用结果中的 message.contextId,查询仍用 taskId。"
78
85
  },
79
86
  "note": {
80
- "type": "string"
87
+ "type": "string",
88
+ "description": "已有事实、失败或无法确认原因;保留其含义,不据查询成功推断生成成功。"
81
89
  },
82
90
  "result": {
83
91
  "oneOf": [
@@ -87,7 +95,8 @@
87
95
  {
88
96
  "$ref": "../tool.call/output.schema.json"
89
97
  }
90
- ]
98
+ ],
99
+ "description": "仅 completed 时提供原调用完整结果;同一 taskId 重读不累计 usage。Tool cost.minimum/maximum 是估价,Agent cost.amount 是本轮实扣。交付本次返回的完整链接;再次查询可更新稿定结构化资源的授权,第三方签名和正文保持原样。"
91
100
  },
92
101
  "partialResult": {
93
102
  "oneOf": [
@@ -97,7 +106,9 @@
97
106
  {
98
107
  "$ref": "../tool.call/output.schema.json"
99
108
  }
100
- ]
109
+ ],
110
+ "description": "已取得的消息或中间结果快照,不证明本轮完成;不能当作完整交付或最终费用。"
101
111
  }
102
- }
112
+ },
113
+ "description": "原创作调用的当前状态;查询退出码 0 不代表该任务完成。依 state 和 operation 读取结果,不重复发起创作。"
103
114
  }
@@ -11,22 +11,24 @@
11
11
  "properties": {
12
12
  "model": {
13
13
  "type": "string",
14
- "const": "image-edit-smart"
14
+ "const": "image-edit-smart",
15
+ "description": "本次调用的模型机器标识;使用当前 model list/get 返回值。"
15
16
  },
16
17
  "image": {
17
18
  "type": "string",
18
19
  "format": "uri",
19
- "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
20
+ "description": "本次要处理的原图 URI;HTTP(S) URL 或标准 file URI。参考图另放 referenceImages(若该模型支持),不与原图互换。"
20
21
  },
21
22
  "prompt": {
22
23
  "type": "string",
23
24
  "minLength": 1,
24
- "pattern": ".*\\S.*"
25
+ "pattern": ".*\\S.*",
26
+ "description": "说明本次处理目标、需要的变化和需保留内容;按用户要求填写,媒体本身放在对应 URI 字段。"
25
27
  },
26
28
  "mask": {
27
29
  "type": "string",
28
30
  "format": "uri",
29
- "description": "与校正 EXIF 后原图同尺寸的全不透明二值 PNG,只含纯黑和纯白;非空白区标识处理目标,全白表示全图。CLI 将选区转为视觉边界提示,不能保证黑区像素完全不变。"
31
+ "description": "与校正 EXIF 后原图同尺寸的全不透明二值 PNG。白色选中处理目标,黑色表示选区外。白色选区须非空,全白表示选中全图。RGB 只用 0/0/0 或 255/255/255,有 alpha 时全部为 255。请将彩色圈选或带半透明、灰边的预览另制为蒙版。CLI 将选区轮廓标在主图上供模型参考,模型可能改动选区外的内容。"
30
32
  },
31
33
  "referenceImages": {
32
34
  "type": "array",
@@ -36,7 +38,7 @@
36
38
  "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
37
39
  },
38
40
  "minItems": 1,
39
- "uniqueItems": true
41
+ "description": "额外参考图片 URI 数组,按顺序说明各图用途;不代替原图或 mask。"
40
42
  }
41
43
  }
42
44
  }
@@ -12,22 +12,24 @@
12
12
  "properties": {
13
13
  "model": {
14
14
  "type": "string",
15
- "const": "image-edit-standard"
15
+ "const": "image-edit-standard",
16
+ "description": "本次调用的模型机器标识;使用当前 model list/get 返回值。"
16
17
  },
17
18
  "image": {
18
19
  "type": "string",
19
20
  "format": "uri",
20
- "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
21
+ "description": "本次要处理的原图 URI;HTTP(S) URL 或标准 file URI。参考图另放 referenceImages(若该模型支持),不与原图互换。"
21
22
  },
22
23
  "mask": {
23
24
  "type": "string",
24
25
  "format": "uri",
25
- "description": "与校正 EXIF 后原图同尺寸的全不透明二值 PNG,只含纯黑和纯白。白色处理、黑色保护;白区须非空,全白表示处理全图。"
26
+ "description": "与校正 EXIF 后原图同尺寸的全不透明二值 PNG,只含纯黑和纯白。白色处理、黑色保护;白区须非空,全白表示处理全图。 像素 RGB 只能全为 0 或全为 255;有 alpha 时全部为 255。不要提交半透明、灰阶抗锯齿或彩色圈选预览。"
26
27
  },
27
28
  "prompt": {
28
29
  "type": "string",
29
30
  "minLength": 1,
30
- "pattern": ".*\\S.*"
31
+ "pattern": ".*\\S.*",
32
+ "description": "说明本次处理目标、需要的变化和需保留内容;按用户要求填写,媒体本身放在对应 URI 字段。"
31
33
  }
32
34
  }
33
35
  }
@@ -11,17 +11,19 @@
11
11
  "properties": {
12
12
  "model": {
13
13
  "type": "string",
14
- "const": "image-enhance-smart"
14
+ "const": "image-enhance-smart",
15
+ "description": "本次调用的模型机器标识;使用当前 model list/get 返回值。"
15
16
  },
16
17
  "image": {
17
18
  "type": "string",
18
19
  "format": "uri",
19
- "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
20
+ "description": "本次要处理的原图 URI;HTTP(S) URL 或标准 file URI。参考图另放 referenceImages(若该模型支持),不与原图互换。"
20
21
  },
21
22
  "prompt": {
22
23
  "type": "string",
23
24
  "minLength": 1,
24
- "pattern": ".*\\S.*"
25
+ "pattern": ".*\\S.*",
26
+ "description": "说明本次处理目标、需要的变化和需保留内容;按用户要求填写,媒体本身放在对应 URI 字段。"
25
27
  }
26
28
  }
27
29
  }
@@ -11,12 +11,13 @@
11
11
  "properties": {
12
12
  "model": {
13
13
  "type": "string",
14
- "const": "image-enhance-standard"
14
+ "const": "image-enhance-standard",
15
+ "description": "本次调用的模型机器标识;使用当前 model list/get 返回值。"
15
16
  },
16
17
  "image": {
17
18
  "type": "string",
18
19
  "format": "uri",
19
- "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
20
+ "description": "本次要处理的原图 URI;HTTP(S) URL 或标准 file URI。参考图另放 referenceImages(若该模型支持),不与原图互换。"
20
21
  },
21
22
  "targetLongEdge": {
22
23
  "type": "integer",
@@ -12,12 +12,13 @@
12
12
  "properties": {
13
13
  "model": {
14
14
  "type": "string",
15
- "const": "image-expand-smart"
15
+ "const": "image-expand-smart",
16
+ "description": "本次调用的模型机器标识;使用当前 model list/get 返回值。"
16
17
  },
17
18
  "image": {
18
19
  "type": "string",
19
20
  "format": "uri",
20
- "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
21
+ "description": "本次要处理的原图 URI;HTTP(S) URL 或标准 file URI。参考图另放 referenceImages(若该模型支持),不与原图互换。"
21
22
  },
22
23
  "canvas": {
23
24
  "type": "object",
@@ -29,14 +30,16 @@
29
30
  "properties": {
30
31
  "width": {
31
32
  "type": "integer",
32
- "minimum": 1
33
+ "minimum": 1,
34
+ "description": "布局画布的宽度,以原图自然像素计。宽高用于确定输出比例,成品尺寸随分辨率档位变化。"
33
35
  },
34
36
  "height": {
35
37
  "type": "integer",
36
- "minimum": 1
38
+ "minimum": 1,
39
+ "description": "布局画布的高度,以原图自然像素计。宽高用于确定输出比例,成品尺寸随分辨率档位变化。"
37
40
  }
38
41
  },
39
- "description": "原图自然尺寸上的目标画布,不隐式缩放、旋转或裁切。"
42
+ "description": "用于放置原图的布局画布,宽高确定输出比例。成品像素尺寸取决于所选分辨率档位。"
40
43
  },
41
44
  "placement": {
42
45
  "type": "object",
@@ -48,19 +51,22 @@
48
51
  "properties": {
49
52
  "x": {
50
53
  "type": "integer",
51
- "minimum": 0
54
+ "minimum": 0,
55
+ "description": "原图左上角距画布左边的像素数。"
52
56
  },
53
57
  "y": {
54
58
  "type": "integer",
55
- "minimum": 0
59
+ "minimum": 0,
60
+ "description": "原图左上角距画布上边的像素数。"
56
61
  }
57
62
  },
58
- "description": "原图左上角在目标画布中的像素坐标;原点为画布左上角,x 向右、y 向下。以自动转正后的原图自然尺寸放置,须完整位于画布内。"
63
+ "description": "原图左上角在布局画布中的坐标,以自动转正后的原图自然像素计。x 向右、y 向下,原图须完整放入布局。"
59
64
  },
60
65
  "prompt": {
61
66
  "type": "string",
62
67
  "minLength": 1,
63
- "pattern": ".*\\S.*"
68
+ "pattern": ".*\\S.*",
69
+ "description": "说明本次处理目标、需要的变化和需保留内容;按用户要求填写,媒体本身放在对应 URI 字段。"
64
70
  },
65
71
  "referenceImages": {
66
72
  "type": "array",
@@ -70,7 +76,7 @@
70
76
  "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
71
77
  },
72
78
  "minItems": 1,
73
- "uniqueItems": true
79
+ "description": "额外参考图片 URI 数组,按顺序说明各图用途;不代替原图或 mask。"
74
80
  }
75
81
  }
76
82
  }