@gaoding/cli 1.8.0 → 1.9.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.
- package/contracts/operations/agent.send/input.schema.json +1 -1
- package/contracts/operations/agent.send/output.schema.json +1 -1
- package/contracts/operations/model.get/input.schema.json +6 -0
- package/contracts/operations/model.get/output.schema.json +10 -1
- package/contracts/operations/tool.call/canvas-input.schema.json +60 -0
- package/contracts/operations/tool.call/models/image-edit-smart.schema.json +42 -0
- package/contracts/operations/tool.call/models/image-edit-standard.schema.json +33 -0
- package/contracts/operations/tool.call/models/image-enhance-smart.schema.json +27 -0
- package/contracts/operations/tool.call/models/image-enhance-standard.schema.json +27 -0
- package/contracts/operations/tool.call/models/image-expand-smart.schema.json +76 -0
- package/contracts/operations/tool.call/models/image-expand-standard.schema.json +61 -0
- package/contracts/operations/tool.call/models/image-layers-layout.schema.json +21 -0
- package/contracts/operations/tool.call/models/image-layers-smart.schema.json +28 -0
- package/contracts/operations/tool.call/models/image-matting-smart.schema.json +37 -0
- package/contracts/operations/tool.call/models/image-matting-standard.schema.json +26 -0
- package/contracts/operations/tool.call/models/image-ocr.schema.json +21 -0
- package/contracts/operations/tool.call/models/image-remove-smart.schema.json +32 -0
- package/contracts/operations/tool.call/models/image-remove-standard.schema.json +27 -0
- package/contracts/operations/tool.call/models/image-text-edit.schema.json +46 -0
- package/contracts/operations/tool.call/models/image-vectorize.schema.json +21 -0
- package/contracts/operations/tool.call/models/video-edit-smart.schema.json +76 -0
- package/contracts/operations/tool.call/models/video-enhance-smart.schema.json +33 -0
- package/contracts/operations/tool.call/models/video-enhance-standard.schema.json +27 -0
- package/contracts/operations/tool.call/ocr-payload.schema.json +66 -0
- package/contracts/operations/tool.call/output.schema.json +38 -0
- package/contracts/operations/tool.call/template-payload.schema.json +96 -0
- package/dist/bin/gd-cli.js +31 -24
- package/dist/bin/insmind-cli.js +31 -24
- package/dist/bin/task-worker.js +4 -1
- package/dist/src/analytics/device.js +2 -2
- package/dist/src/bootstrap/create-cli.js +7 -0
- package/dist/src/bootstrap/create-runtime.js +53 -30
- package/dist/src/bootstrap/run-task-worker.js +5 -1
- package/dist/src/bootstrap/validators.js +11 -4
- package/dist/src/cli/agent-commands.js +1 -0
- package/dist/src/cli/dam-commands.js +3 -3
- package/dist/src/cli/errors.js +63 -15
- package/dist/src/cli/model-commands.js +6 -3
- package/dist/src/cli/observed-errors.js +3 -1
- package/dist/src/cli/tool-commands.js +2 -0
- package/dist/src/contracts/schema.js +4 -1
- package/dist/src/features/agent/creative-agent-adapter.js +37 -11
- package/dist/src/features/agent/creative-protocol.js +31 -10
- package/dist/src/features/agent/creative-stream.js +54 -6
- package/dist/src/features/agent/resource-authorizer.js +1 -0
- package/dist/src/features/agent/result-reader.js +3 -1
- package/dist/src/features/agent/use-cases.js +15 -5
- package/dist/src/features/auth/credential-store.js +6 -10
- package/dist/src/features/auth/sso-service.js +22 -6
- package/dist/src/features/auth/state.js +6 -0
- package/dist/src/features/auth/use-cases.js +90 -32
- package/dist/src/features/dam/asset-projection.js +10 -1
- package/dist/src/features/dam/dam-api-adapter.js +30 -15
- package/dist/src/features/dam/input.js +23 -0
- package/dist/src/features/dam/use-cases.js +32 -22
- package/dist/src/features/task/store.js +5 -5
- package/dist/src/features/task/task-background.js +67 -19
- package/dist/src/features/task/use-cases.js +38 -9
- package/dist/src/features/tool/canvas-copy.js +61 -0
- package/dist/src/features/tool/canvas-media.js +248 -0
- package/dist/src/features/tool/canvas-models.js +109 -0
- package/dist/src/features/tool/canvas-pricing.js +81 -0
- package/dist/src/features/tool/canvas-recovery.js +68 -0
- package/dist/src/features/tool/canvas-results.js +144 -0
- package/dist/src/features/tool/canvas-tool-adapter.js +366 -0
- package/dist/src/features/tool/canvas-video.js +84 -0
- package/dist/src/features/tool/catalog.js +35 -13
- package/dist/src/features/tool/dynamic-schema.js +55 -25
- package/dist/src/features/tool/matting-billing.js +115 -0
- package/dist/src/features/tool/mns-catalog-adapter.js +66 -19
- package/dist/src/features/tool/resource-authorizer.js +34 -0
- package/dist/src/features/tool/scene-catalog-adapter.js +35 -0
- package/dist/src/features/tool/tool-api-adapter.js +29 -17
- package/dist/src/features/tool/use-cases.js +28 -3
- package/dist/src/platform/file-lock.js +58 -15
- package/dist/src/platform/input-uri.js +105 -0
- package/dist/src/platform/local-json-file.js +7 -4
- package/dist/src/platform/remote-error-evidence.js +23 -1
- package/dist/src/platform/safe-upload-file.js +18 -4
- package/dist/src/platform/schema-issues.js +18 -0
- package/dist/src/platform/signed-http-transport.js +77 -16
- package/dist/src/platform/text-output.js +55 -13
- package/dist/src/product/config.js +12 -1
- package/dist/src/telemetry/failure-summary.js +53 -2
- package/dist/src/telemetry/host-diagnostics.js +95 -0
- package/dist/src/telemetry/invocation.js +24 -3
- package/dist/src/telemetry/process-errors.js +2 -1
- package/dist/src/telemetry/sls-sink.js +66 -18
- package/package.json +5 -4
- package/skills/gd-cli/SKILL.md +2 -0
- package/skills/gd-cli/references/creation.md +2 -0
- package/skills/gd-cli/references/generation-constraints.md +3 -1
- package/skills/gd-cli/references/matting.md +29 -0
- package/skills/gd-cli/references/media-tools.md +40 -0
- package/skills/gd-cli/references/tool.md +4 -4
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
"arguments": {
|
|
234
234
|
"type": "object",
|
|
235
235
|
"minProperties": 1,
|
|
236
|
-
"description": "
|
|
236
|
+
"description": "动态生成控制参数;结合 model get 与 agent send --help 核对所选模型在 Agent 路线接受的控制项。完整 Tool inputSchema 不是本字段的参数清单;prompt、素材、选区与画布要求通过独立文本/素材 Part 描述。未指定 model 时由服务端 Agent 处理。",
|
|
237
237
|
"additionalProperties": true
|
|
238
238
|
}
|
|
239
239
|
}
|
|
@@ -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
|
+
}
|