@gaoding/cli 1.7.1 → 1.9.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.
Files changed (74) hide show
  1. package/contracts/operations/agent.send/input.schema.json +1 -1
  2. package/contracts/operations/model.get/input.schema.json +6 -0
  3. package/contracts/operations/model.get/output.schema.json +10 -1
  4. package/contracts/operations/tool.call/canvas-input.schema.json +60 -0
  5. package/contracts/operations/tool.call/models/image-edit-smart.schema.json +42 -0
  6. package/contracts/operations/tool.call/models/image-edit-standard.schema.json +33 -0
  7. package/contracts/operations/tool.call/models/image-enhance-smart.schema.json +27 -0
  8. package/contracts/operations/tool.call/models/image-enhance-standard.schema.json +27 -0
  9. package/contracts/operations/tool.call/models/image-expand-smart.schema.json +76 -0
  10. package/contracts/operations/tool.call/models/image-expand-standard.schema.json +61 -0
  11. package/contracts/operations/tool.call/models/image-layers-layout.schema.json +21 -0
  12. package/contracts/operations/tool.call/models/image-layers-smart.schema.json +28 -0
  13. package/contracts/operations/tool.call/models/image-matting-smart.schema.json +37 -0
  14. package/contracts/operations/tool.call/models/image-matting-standard.schema.json +26 -0
  15. package/contracts/operations/tool.call/models/image-ocr.schema.json +21 -0
  16. package/contracts/operations/tool.call/models/image-remove-smart.schema.json +32 -0
  17. package/contracts/operations/tool.call/models/image-remove-standard.schema.json +27 -0
  18. package/contracts/operations/tool.call/models/image-text-edit.schema.json +46 -0
  19. package/contracts/operations/tool.call/models/image-vectorize.schema.json +21 -0
  20. package/contracts/operations/tool.call/models/video-edit-smart.schema.json +76 -0
  21. package/contracts/operations/tool.call/models/video-enhance-smart.schema.json +33 -0
  22. package/contracts/operations/tool.call/models/video-enhance-standard.schema.json +27 -0
  23. package/contracts/operations/tool.call/ocr-payload.schema.json +66 -0
  24. package/contracts/operations/tool.call/output.schema.json +38 -0
  25. package/contracts/operations/tool.call/template-payload.schema.json +96 -0
  26. package/dist/src/bootstrap/create-runtime.js +61 -25
  27. package/dist/src/bootstrap/validators.js +1 -1
  28. package/dist/src/cli/action-binding.js +3 -0
  29. package/dist/src/cli/agent-commands.js +1 -0
  30. package/dist/src/cli/errors.js +43 -10
  31. package/dist/src/cli/model-commands.js +7 -4
  32. package/dist/src/cli/observed-errors.js +13 -5
  33. package/dist/src/cli/task-commands.js +1 -1
  34. package/dist/src/cli/tool-commands.js +3 -1
  35. package/dist/src/contracts/schema.js +4 -1
  36. package/dist/src/features/agent/creative-protocol.js +22 -5
  37. package/dist/src/features/agent/resource-authorizer.js +1 -0
  38. package/dist/src/features/agent/use-cases.js +15 -5
  39. package/dist/src/features/auth/sso-service.js +13 -4
  40. package/dist/src/features/dam/dam-api-adapter.js +1 -0
  41. package/dist/src/features/dam/file-downloader.js +23 -2
  42. package/dist/src/features/task/store.js +8 -4
  43. package/dist/src/features/task/use-cases.js +14 -11
  44. package/dist/src/features/tool/canvas-copy.js +61 -0
  45. package/dist/src/features/tool/canvas-media.js +193 -0
  46. package/dist/src/features/tool/canvas-models.js +109 -0
  47. package/dist/src/features/tool/canvas-pricing.js +81 -0
  48. package/dist/src/features/tool/canvas-recovery.js +68 -0
  49. package/dist/src/features/tool/canvas-results.js +144 -0
  50. package/dist/src/features/tool/canvas-tool-adapter.js +366 -0
  51. package/dist/src/features/tool/canvas-video.js +84 -0
  52. package/dist/src/features/tool/catalog.js +35 -13
  53. package/dist/src/features/tool/dynamic-schema.js +52 -23
  54. package/dist/src/features/tool/matting-billing.js +103 -0
  55. package/dist/src/features/tool/mns-catalog-adapter.js +66 -19
  56. package/dist/src/features/tool/resource-authorizer.js +34 -0
  57. package/dist/src/features/tool/scene-catalog-adapter.js +35 -0
  58. package/dist/src/features/tool/tool-api-adapter.js +24 -5
  59. package/dist/src/features/tool/use-cases.js +28 -3
  60. package/dist/src/features/update/update-service.js +4 -2
  61. package/dist/src/platform/file-lock.js +12 -0
  62. package/dist/src/platform/local-json-file.js +19 -5
  63. package/dist/src/platform/safe-upload-file.js +18 -10
  64. package/dist/src/platform/schema-issues.js +47 -2
  65. package/dist/src/platform/text-output.js +17 -4
  66. package/dist/src/product/config.js +12 -1
  67. package/dist/src/telemetry/failure-summary.js +18 -0
  68. package/package.json +5 -4
  69. package/skills/gd-cli/SKILL.md +2 -0
  70. package/skills/gd-cli/references/creation.md +2 -0
  71. package/skills/gd-cli/references/generation-constraints.md +3 -1
  72. package/skills/gd-cli/references/matting.md +29 -0
  73. package/skills/gd-cli/references/media-tools.md +40 -0
  74. package/skills/gd-cli/references/tool.md +5 -5
@@ -233,7 +233,7 @@
233
233
  "arguments": {
234
234
  "type": "object",
235
235
  "minProperties": 1,
236
- "description": "按模型公开字段传递的动态控制参数;素材使用独立 InputAssetPart。",
236
+ "description": "动态生成控制参数;结合 model get 与 agent send --help 核对所选模型在 Agent 路线接受的控制项。完整 Tool inputSchema 不是本字段的参数清单;prompt、素材、选区与画布要求通过独立文本/素材 Part 描述。未指定 model 时由服务端 Agent 处理。",
237
237
  "additionalProperties": true
238
238
  }
239
239
  }
@@ -13,6 +13,12 @@
13
13
  "minLength": 1,
14
14
  "pattern": ".*\\S.*",
15
15
  "description": "要读取的创作模型机器标识。"
16
+ },
17
+ "tool": {
18
+ "type": "string",
19
+ "minLength": 1,
20
+ "pattern": ".*\\S.*",
21
+ "description": "模型用途上下文;跨 Tool 模型须明确用途。"
16
22
  }
17
23
  }
18
24
  }
@@ -52,6 +52,11 @@
52
52
  "estimatedTime": {
53
53
  "$ref": "#/$defs/EstimatedTimeRange",
54
54
  "description": "模型当前可用配置的预估耗时区间。"
55
+ },
56
+ "inputSchema": {
57
+ "type": "object",
58
+ "description": "当前 Tool/Model 完整 JSON Schema,与执行校验使用同一来源。",
59
+ "additionalProperties": true
55
60
  }
56
61
  },
57
62
  "$defs": {
@@ -129,7 +134,11 @@
129
134
  "string",
130
135
  "number",
131
136
  "uri",
132
- "uri[]"
137
+ "uri[]",
138
+ "integer",
139
+ "boolean",
140
+ "object",
141
+ "array"
133
142
  ],
134
143
  "description": "规范化后的参数类型。"
135
144
  },
@@ -0,0 +1,60 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "CanvasToolArguments",
4
+ "oneOf": [
5
+ {
6
+ "$ref": "models/image-edit-standard.schema.json"
7
+ },
8
+ {
9
+ "$ref": "models/image-edit-smart.schema.json"
10
+ },
11
+ {
12
+ "$ref": "models/image-matting-standard.schema.json"
13
+ },
14
+ {
15
+ "$ref": "models/image-matting-smart.schema.json"
16
+ },
17
+ {
18
+ "$ref": "models/image-remove-standard.schema.json"
19
+ },
20
+ {
21
+ "$ref": "models/image-remove-smart.schema.json"
22
+ },
23
+ {
24
+ "$ref": "models/image-enhance-standard.schema.json"
25
+ },
26
+ {
27
+ "$ref": "models/image-enhance-smart.schema.json"
28
+ },
29
+ {
30
+ "$ref": "models/image-expand-standard.schema.json"
31
+ },
32
+ {
33
+ "$ref": "models/image-expand-smart.schema.json"
34
+ },
35
+ {
36
+ "$ref": "models/image-text-edit.schema.json"
37
+ },
38
+ {
39
+ "$ref": "models/image-ocr.schema.json"
40
+ },
41
+ {
42
+ "$ref": "models/image-layers-layout.schema.json"
43
+ },
44
+ {
45
+ "$ref": "models/image-layers-smart.schema.json"
46
+ },
47
+ {
48
+ "$ref": "models/image-vectorize.schema.json"
49
+ },
50
+ {
51
+ "$ref": "models/video-edit-smart.schema.json"
52
+ },
53
+ {
54
+ "$ref": "models/video-enhance-standard.schema.json"
55
+ },
56
+ {
57
+ "$ref": "models/video-enhance-smart.schema.json"
58
+ }
59
+ ]
60
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "ImageEditSmartInput",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "model",
8
+ "image",
9
+ "prompt"
10
+ ],
11
+ "properties": {
12
+ "model": {
13
+ "type": "string",
14
+ "const": "image-edit-smart"
15
+ },
16
+ "image": {
17
+ "type": "string",
18
+ "format": "uri",
19
+ "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
20
+ },
21
+ "prompt": {
22
+ "type": "string",
23
+ "minLength": 1,
24
+ "pattern": ".*\\S.*"
25
+ },
26
+ "mask": {
27
+ "type": "string",
28
+ "format": "uri",
29
+ "description": "与校正 EXIF 后原图同尺寸的全不透明二值 PNG,只含纯黑和纯白;非空白区标识处理目标,全白表示全图。CLI 将选区转为视觉边界提示,不能保证黑区像素完全不变。"
30
+ },
31
+ "referenceImages": {
32
+ "type": "array",
33
+ "items": {
34
+ "type": "string",
35
+ "format": "uri",
36
+ "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
37
+ },
38
+ "minItems": 1,
39
+ "uniqueItems": true
40
+ }
41
+ }
42
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "ImageEditStandardInput",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "model",
8
+ "image",
9
+ "mask",
10
+ "prompt"
11
+ ],
12
+ "properties": {
13
+ "model": {
14
+ "type": "string",
15
+ "const": "image-edit-standard"
16
+ },
17
+ "image": {
18
+ "type": "string",
19
+ "format": "uri",
20
+ "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
21
+ },
22
+ "mask": {
23
+ "type": "string",
24
+ "format": "uri",
25
+ "description": "与校正 EXIF 后原图同尺寸的全不透明二值 PNG,只含纯黑和纯白。白色处理、黑色保护;白区须非空,全白表示处理全图。"
26
+ },
27
+ "prompt": {
28
+ "type": "string",
29
+ "minLength": 1,
30
+ "pattern": ".*\\S.*"
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "ImageEnhanceSmartInput",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "model",
8
+ "image",
9
+ "prompt"
10
+ ],
11
+ "properties": {
12
+ "model": {
13
+ "type": "string",
14
+ "const": "image-enhance-smart"
15
+ },
16
+ "image": {
17
+ "type": "string",
18
+ "format": "uri",
19
+ "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
20
+ },
21
+ "prompt": {
22
+ "type": "string",
23
+ "minLength": 1,
24
+ "pattern": ".*\\S.*"
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "ImageEnhanceStandardInput",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "model",
8
+ "image",
9
+ "targetLongEdge"
10
+ ],
11
+ "properties": {
12
+ "model": {
13
+ "type": "string",
14
+ "const": "image-enhance-standard"
15
+ },
16
+ "image": {
17
+ "type": "string",
18
+ "format": "uri",
19
+ "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
20
+ },
21
+ "targetLongEdge": {
22
+ "type": "integer",
23
+ "minimum": 1,
24
+ "description": "目标长边像素;允许范围及步长来自实时目录。"
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "ImageExpandSmartInput",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "model",
8
+ "image",
9
+ "canvas",
10
+ "placement"
11
+ ],
12
+ "properties": {
13
+ "model": {
14
+ "type": "string",
15
+ "const": "image-expand-smart"
16
+ },
17
+ "image": {
18
+ "type": "string",
19
+ "format": "uri",
20
+ "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
21
+ },
22
+ "canvas": {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": [
26
+ "width",
27
+ "height"
28
+ ],
29
+ "properties": {
30
+ "width": {
31
+ "type": "integer",
32
+ "minimum": 1
33
+ },
34
+ "height": {
35
+ "type": "integer",
36
+ "minimum": 1
37
+ }
38
+ },
39
+ "description": "原图自然尺寸上的目标画布,不隐式缩放、旋转或裁切。"
40
+ },
41
+ "placement": {
42
+ "type": "object",
43
+ "additionalProperties": false,
44
+ "required": [
45
+ "x",
46
+ "y"
47
+ ],
48
+ "properties": {
49
+ "x": {
50
+ "type": "integer",
51
+ "minimum": 0
52
+ },
53
+ "y": {
54
+ "type": "integer",
55
+ "minimum": 0
56
+ }
57
+ },
58
+ "description": "原图左上角在目标画布中的像素坐标;原点为画布左上角,x 向右、y 向下。以自动转正后的原图自然尺寸放置,须完整位于画布内。"
59
+ },
60
+ "prompt": {
61
+ "type": "string",
62
+ "minLength": 1,
63
+ "pattern": ".*\\S.*"
64
+ },
65
+ "referenceImages": {
66
+ "type": "array",
67
+ "items": {
68
+ "type": "string",
69
+ "format": "uri",
70
+ "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
71
+ },
72
+ "minItems": 1,
73
+ "uniqueItems": true
74
+ }
75
+ }
76
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "ImageExpandStandardInput",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "model",
8
+ "image",
9
+ "canvas",
10
+ "placement"
11
+ ],
12
+ "properties": {
13
+ "model": {
14
+ "type": "string",
15
+ "const": "image-expand-standard"
16
+ },
17
+ "image": {
18
+ "type": "string",
19
+ "format": "uri",
20
+ "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
21
+ },
22
+ "canvas": {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": [
26
+ "width",
27
+ "height"
28
+ ],
29
+ "properties": {
30
+ "width": {
31
+ "type": "integer",
32
+ "minimum": 1
33
+ },
34
+ "height": {
35
+ "type": "integer",
36
+ "minimum": 1
37
+ }
38
+ },
39
+ "description": "原图自然尺寸上的目标画布,不隐式缩放、旋转或裁切。"
40
+ },
41
+ "placement": {
42
+ "type": "object",
43
+ "additionalProperties": false,
44
+ "required": [
45
+ "x",
46
+ "y"
47
+ ],
48
+ "properties": {
49
+ "x": {
50
+ "type": "integer",
51
+ "minimum": 0
52
+ },
53
+ "y": {
54
+ "type": "integer",
55
+ "minimum": 0
56
+ }
57
+ },
58
+ "description": "原图左上角在目标画布中的像素坐标;原点为画布左上角,x 向右、y 向下。以自动转正后的原图自然尺寸放置,须完整位于画布内。"
59
+ }
60
+ }
61
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "ImageLayersLayoutInput",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "model",
8
+ "image"
9
+ ],
10
+ "properties": {
11
+ "model": {
12
+ "type": "string",
13
+ "const": "image-layers-layout"
14
+ },
15
+ "image": {
16
+ "type": "string",
17
+ "format": "uri",
18
+ "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "ImageLayersSmartInput",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "model",
8
+ "image",
9
+ "maxLayers"
10
+ ],
11
+ "properties": {
12
+ "model": {
13
+ "type": "string",
14
+ "const": "image-layers-smart"
15
+ },
16
+ "image": {
17
+ "type": "string",
18
+ "format": "uri",
19
+ "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
20
+ },
21
+ "maxLayers": {
22
+ "type": "integer",
23
+ "minimum": 1,
24
+ "maximum": 17,
25
+ "description": "请求层数上限,不承诺恰好返回该数量。"
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "ImageMattingSmartInput",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "model",
8
+ "image",
9
+ "prompt"
10
+ ],
11
+ "properties": {
12
+ "model": {
13
+ "type": "string",
14
+ "const": "image-matting-smart"
15
+ },
16
+ "image": {
17
+ "type": "string",
18
+ "format": "uri",
19
+ "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
20
+ },
21
+ "prompt": {
22
+ "type": "string",
23
+ "minLength": 1,
24
+ "pattern": ".*\\S.*"
25
+ },
26
+ "mask": {
27
+ "type": "string",
28
+ "format": "uri",
29
+ "description": "与校正 EXIF 后原图同尺寸的全不透明二值 PNG,只含纯黑和纯白;非空白区标识处理目标,全白表示全图。CLI 将选区转为视觉边界提示,不能保证黑区像素完全不变。"
30
+ },
31
+ "cropToSubject": {
32
+ "type": "boolean",
33
+ "default": false,
34
+ "description": "按 alpha 主体边界裁切;默认保留合成图尺寸。"
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "ImageMattingStandardInput",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "model",
8
+ "image"
9
+ ],
10
+ "properties": {
11
+ "model": {
12
+ "type": "string",
13
+ "const": "image-matting-standard"
14
+ },
15
+ "image": {
16
+ "type": "string",
17
+ "format": "uri",
18
+ "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
19
+ },
20
+ "cropToSubject": {
21
+ "type": "boolean",
22
+ "default": false,
23
+ "description": "按 alpha 主体边界裁切;默认保留合成图尺寸。"
24
+ }
25
+ }
26
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "ImageOcrInput",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "model",
8
+ "image"
9
+ ],
10
+ "properties": {
11
+ "model": {
12
+ "type": "string",
13
+ "const": "image-ocr"
14
+ },
15
+ "image": {
16
+ "type": "string",
17
+ "format": "uri",
18
+ "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "ImageRemoveSmartInput",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "model",
8
+ "image",
9
+ "prompt"
10
+ ],
11
+ "properties": {
12
+ "model": {
13
+ "type": "string",
14
+ "const": "image-remove-smart"
15
+ },
16
+ "image": {
17
+ "type": "string",
18
+ "format": "uri",
19
+ "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
20
+ },
21
+ "prompt": {
22
+ "type": "string",
23
+ "minLength": 1,
24
+ "pattern": ".*\\S.*"
25
+ },
26
+ "mask": {
27
+ "type": "string",
28
+ "format": "uri",
29
+ "description": "与校正 EXIF 后原图同尺寸的全不透明二值 PNG,只含纯黑和纯白;非空白区标识处理目标,全白表示全图。CLI 将选区转为视觉边界提示,不能保证黑区像素完全不变。"
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "ImageRemoveStandardInput",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "model",
8
+ "image",
9
+ "mask"
10
+ ],
11
+ "properties": {
12
+ "model": {
13
+ "type": "string",
14
+ "const": "image-remove-standard"
15
+ },
16
+ "image": {
17
+ "type": "string",
18
+ "format": "uri",
19
+ "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
20
+ },
21
+ "mask": {
22
+ "type": "string",
23
+ "format": "uri",
24
+ "description": "与校正 EXIF 后原图同尺寸的全不透明二值 PNG,只含纯黑和纯白。白色处理、黑色保护;白区须非空,全白表示处理全图。"
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "ImageTextEditInput",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "model",
8
+ "image",
9
+ "replacements"
10
+ ],
11
+ "properties": {
12
+ "model": {
13
+ "type": "string",
14
+ "const": "image-text-edit"
15
+ },
16
+ "image": {
17
+ "type": "string",
18
+ "format": "uri",
19
+ "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
20
+ },
21
+ "replacements": {
22
+ "type": "array",
23
+ "minItems": 1,
24
+ "items": {
25
+ "type": "object",
26
+ "additionalProperties": false,
27
+ "required": [
28
+ "from",
29
+ "to"
30
+ ],
31
+ "properties": {
32
+ "from": {
33
+ "type": "string",
34
+ "minLength": 1,
35
+ "pattern": ".*\\S.*"
36
+ },
37
+ "to": {
38
+ "type": "string",
39
+ "description": "替换内容,空字符串表示删除。"
40
+ }
41
+ }
42
+ },
43
+ "description": "按原文替换,不承诺区分图中重复原文的某一次出现。"
44
+ }
45
+ }
46
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "ImageVectorizeInput",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "model",
8
+ "image"
9
+ ],
10
+ "properties": {
11
+ "model": {
12
+ "type": "string",
13
+ "const": "image-vectorize"
14
+ },
15
+ "image": {
16
+ "type": "string",
17
+ "format": "uri",
18
+ "description": "单个 HTTP(S) 或 CLI file:// 素材 URI。"
19
+ }
20
+ }
21
+ }