@gaoding/cli 0.0.0 → 1.0.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 (136) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +40 -3
  3. package/contracts/operations/agent.send/input.schema.json +353 -0
  4. package/contracts/operations/agent.send/output.schema.json +271 -0
  5. package/contracts/operations/auth.status/input.schema.json +7 -0
  6. package/contracts/operations/auth.status/output.schema.json +132 -0
  7. package/contracts/operations/dam.copy/input.schema.json +19 -0
  8. package/contracts/operations/dam.copy/output.schema.json +19 -0
  9. package/contracts/operations/dam.delete/input.schema.json +23 -0
  10. package/contracts/operations/dam.delete/output.schema.json +6 -0
  11. package/contracts/operations/dam.download/input.schema.json +14 -0
  12. package/contracts/operations/dam.download/output.schema.json +25 -0
  13. package/contracts/operations/dam.folder.list/input.schema.json +15 -0
  14. package/contracts/operations/dam.folder.list/output.schema.json +37 -0
  15. package/contracts/operations/dam.get/input.schema.json +16 -0
  16. package/contracts/operations/dam.get/output.schema.json +46 -0
  17. package/contracts/operations/dam.list/input.schema.json +44 -0
  18. package/contracts/operations/dam.list/output.schema.json +71 -0
  19. package/contracts/operations/dam.move/input.schema.json +19 -0
  20. package/contracts/operations/dam.move/output.schema.json +18 -0
  21. package/contracts/operations/dam.recycle.list/input.schema.json +13 -0
  22. package/contracts/operations/dam.recycle.list/output.schema.json +34 -0
  23. package/contracts/operations/dam.recycle.restore/input.schema.json +14 -0
  24. package/contracts/operations/dam.recycle.restore/output.schema.json +6 -0
  25. package/contracts/operations/dam.rename/input.schema.json +18 -0
  26. package/contracts/operations/dam.rename/output.schema.json +18 -0
  27. package/contracts/operations/dam.repository.list/input.schema.json +8 -0
  28. package/contracts/operations/dam.repository.list/output.schema.json +52 -0
  29. package/contracts/operations/dam.search/input.schema.json +46 -0
  30. package/contracts/operations/dam.search/output.schema.json +71 -0
  31. package/contracts/operations/dam.tag.list/input.schema.json +12 -0
  32. package/contracts/operations/dam.tag.list/output.schema.json +26 -0
  33. package/contracts/operations/dam.upload/input.schema.json +31 -0
  34. package/contracts/operations/dam.upload/output.schema.json +46 -0
  35. package/contracts/operations/editor.apply/input.schema.json +134 -0
  36. package/contracts/operations/editor.apply/output.schema.json +15 -0
  37. package/contracts/operations/editor.connect/input.schema.json +15 -0
  38. package/contracts/operations/editor.connect/output.schema.json +17 -0
  39. package/contracts/operations/editor.disconnect/input.schema.json +8 -0
  40. package/contracts/operations/editor.disconnect/output.schema.json +14 -0
  41. package/contracts/operations/editor.save/input.schema.json +8 -0
  42. package/contracts/operations/editor.save/output.schema.json +23 -0
  43. package/contracts/operations/editor.screenshot/input.schema.json +8 -0
  44. package/contracts/operations/editor.screenshot/output.schema.json +16 -0
  45. package/contracts/operations/editor.snapshot/input.schema.json +8 -0
  46. package/contracts/operations/editor.snapshot/output.schema.json +113 -0
  47. package/contracts/operations/model.get/input.schema.json +18 -0
  48. package/contracts/operations/model.get/output.schema.json +191 -0
  49. package/contracts/operations/model.list/input.schema.json +15 -0
  50. package/contracts/operations/model.list/output.schema.json +111 -0
  51. package/contracts/operations/org.current/input.schema.json +7 -0
  52. package/contracts/operations/org.current/output.schema.json +49 -0
  53. package/contracts/operations/org.list/input.schema.json +7 -0
  54. package/contracts/operations/org.list/output.schema.json +71 -0
  55. package/contracts/operations/tool.call/input.schema.json +35 -0
  56. package/contracts/operations/tool.call/output.schema.json +129 -0
  57. package/contracts/operations/tool.list/input.schema.json +7 -0
  58. package/contracts/operations/tool.list/output.schema.json +45 -0
  59. package/dist/bin/gd-cli.js +60 -0
  60. package/dist/bin/postinstall.js +42 -0
  61. package/dist/src/bootstrap/create-cli.js +112 -0
  62. package/dist/src/bootstrap/create-runtime.js +290 -0
  63. package/dist/src/bootstrap/validators.js +157 -0
  64. package/dist/src/cli/action-binding.js +109 -0
  65. package/dist/src/cli/agent-commands.js +49 -0
  66. package/dist/src/cli/auth-commands.js +55 -0
  67. package/dist/src/cli/dam-commands.js +469 -0
  68. package/dist/src/cli/editor-commands.js +73 -0
  69. package/dist/src/cli/errors.js +157 -0
  70. package/dist/src/cli/model-commands.js +61 -0
  71. package/dist/src/cli/org-commands.js +58 -0
  72. package/dist/src/cli/presenter.js +105 -0
  73. package/dist/src/cli/prompt.js +30 -0
  74. package/dist/src/cli/tool-commands.js +77 -0
  75. package/dist/src/cli/update-command.js +14 -0
  76. package/dist/src/contracts/schema.js +4 -0
  77. package/dist/src/features/agent/creative-agent-adapter.js +36 -0
  78. package/dist/src/features/agent/creative-protocol.js +432 -0
  79. package/dist/src/features/agent/creative-stream.js +127 -0
  80. package/dist/src/features/agent/use-cases.js +150 -0
  81. package/dist/src/features/auth/access-policy.js +101 -0
  82. package/dist/src/features/auth/credential-store.js +62 -0
  83. package/dist/src/features/auth/sso-service.js +194 -0
  84. package/dist/src/features/auth/state.js +129 -0
  85. package/dist/src/features/auth/use-cases.js +136 -0
  86. package/dist/src/features/dam/asset-projection.js +278 -0
  87. package/dist/src/features/dam/dam-api-adapter.js +562 -0
  88. package/dist/src/features/dam/file-downloader.js +242 -0
  89. package/dist/src/features/dam/object-storage.js +193 -0
  90. package/dist/src/features/dam/operation-executor.js +72 -0
  91. package/dist/src/features/dam/registered-uploader.js +247 -0
  92. package/dist/src/features/dam/repository-catalog.js +127 -0
  93. package/dist/src/features/dam/storage-upload.js +141 -0
  94. package/dist/src/features/dam/transient-uploader.js +17 -0
  95. package/dist/src/features/dam/use-cases.js +470 -0
  96. package/dist/src/features/editor/bridge-client.js +109 -0
  97. package/dist/src/features/editor/bridge-process.js +222 -0
  98. package/dist/src/features/editor/bridge-server.js +337 -0
  99. package/dist/src/features/editor/protocol.js +1 -0
  100. package/dist/src/features/editor/public-url.js +36 -0
  101. package/dist/src/features/editor/session-state.js +78 -0
  102. package/dist/src/features/editor/session.js +207 -0
  103. package/dist/src/features/editor/use-cases.js +88 -0
  104. package/dist/src/features/org/org-service.js +76 -0
  105. package/dist/src/features/org/use-cases.js +156 -0
  106. package/dist/src/features/skill/bundled-skills.js +55 -0
  107. package/dist/src/features/skill/installer.js +271 -0
  108. package/dist/src/features/tool/catalog.js +83 -0
  109. package/dist/src/features/tool/dynamic-schema.js +128 -0
  110. package/dist/src/features/tool/mns-catalog-adapter.js +265 -0
  111. package/dist/src/features/tool/tool-api-adapter.js +352 -0
  112. package/dist/src/features/tool/use-cases.js +177 -0
  113. package/dist/src/features/update/latest-version.js +37 -0
  114. package/dist/src/features/update/update-notification.js +262 -0
  115. package/dist/src/features/update/update-service.js +183 -0
  116. package/dist/src/platform/json-input.js +67 -0
  117. package/dist/src/platform/local-json-file.js +59 -0
  118. package/dist/src/platform/open-browser.js +8 -0
  119. package/dist/src/platform/redact.js +80 -0
  120. package/dist/src/platform/remote-error-evidence.js +80 -0
  121. package/dist/src/platform/remote-protocol.js +10 -0
  122. package/dist/src/platform/safe-upload-file.js +146 -0
  123. package/dist/src/platform/signature.js +20 -0
  124. package/dist/src/platform/signed-http-transport.js +143 -0
  125. package/dist/src/platform/url-safety.js +100 -0
  126. package/dist/src/telemetry/invocation.js +156 -0
  127. package/dist/src/telemetry/sls-sink.js +31 -0
  128. package/package.json +54 -8
  129. package/skills/gd-cli/SKILL.md +15 -0
  130. package/skills/gd-cli/references/auth-org.md +9 -0
  131. package/skills/gd-cli/references/creation.md +115 -0
  132. package/skills/gd-cli/references/dam.md +52 -0
  133. package/skills/gd-cli/references/editor.md +254 -0
  134. package/skills/gd-cli/references/errors.md +13 -0
  135. package/skills/gd-cli/references/update.md +13 -0
  136. package/index.js +0 -3
@@ -0,0 +1,113 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "EditorSnapshotResult",
4
+ "description": "当前编辑器中的受支持元素与选区。",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["elements", "selectedIds"],
8
+ "properties": {
9
+ "elements": {
10
+ "type": "array",
11
+ "description": "当前编辑器中的受支持元素。",
12
+ "items": {
13
+ "oneOf": [
14
+ { "$ref": "#/$defs/EditorShape" },
15
+ { "$ref": "#/$defs/EditorConnector" }
16
+ ]
17
+ }
18
+ },
19
+ "selectedIds": {
20
+ "type": "array",
21
+ "description": "当前选中元素的 ID。",
22
+ "items": {
23
+ "type": "string",
24
+ "minLength": 1,
25
+ "pattern": ".*\\S.*"
26
+ }
27
+ }
28
+ },
29
+ "$defs": {
30
+ "EditorShape": {
31
+ "title": "EditorShape",
32
+ "type": "object",
33
+ "additionalProperties": false,
34
+ "required": ["_type", "id", "shapeType", "x", "y", "w", "h", "fill", "stroke"],
35
+ "properties": {
36
+ "_type": {
37
+ "const": "shape",
38
+ "description": "元素类型。"
39
+ },
40
+ "id": {
41
+ "type": "string",
42
+ "minLength": 1,
43
+ "pattern": ".*\\S.*",
44
+ "description": "元素 ID。"
45
+ },
46
+ "shapeType": {
47
+ "type": "string",
48
+ "enum": ["rectangle", "rounded-rectangle", "triangle-up", "ellipse", "diamond"],
49
+ "description": "图形类型。"
50
+ },
51
+ "x": { "type": "number", "description": "左上角横坐标。" },
52
+ "y": { "type": "number", "description": "左上角纵坐标。" },
53
+ "w": { "type": "number", "description": "宽度。" },
54
+ "h": { "type": "number", "description": "高度。" },
55
+ "text": { "type": "string", "description": "图形中的文本。" },
56
+ "fill": {
57
+ "type": "string",
58
+ "minLength": 1,
59
+ "pattern": ".*\\S.*",
60
+ "description": "填充颜色。"
61
+ },
62
+ "stroke": {
63
+ "description": "描边颜色;null 表示无描边。",
64
+ "anyOf": [
65
+ { "type": "string", "minLength": 1, "pattern": ".*\\S.*" },
66
+ { "type": "null" }
67
+ ]
68
+ }
69
+ }
70
+ },
71
+ "EditorConnector": {
72
+ "title": "EditorConnector",
73
+ "type": "object",
74
+ "additionalProperties": false,
75
+ "required": ["_type", "id", "fromId", "toId", "lineType", "color"],
76
+ "properties": {
77
+ "_type": {
78
+ "const": "connector",
79
+ "description": "元素类型。"
80
+ },
81
+ "id": {
82
+ "type": "string",
83
+ "minLength": 1,
84
+ "pattern": ".*\\S.*",
85
+ "description": "连线 ID。"
86
+ },
87
+ "fromId": {
88
+ "type": "string",
89
+ "minLength": 1,
90
+ "pattern": ".*\\S.*",
91
+ "description": "起点元素 ID。"
92
+ },
93
+ "toId": {
94
+ "type": "string",
95
+ "minLength": 1,
96
+ "pattern": ".*\\S.*",
97
+ "description": "终点元素 ID。"
98
+ },
99
+ "lineType": {
100
+ "type": "string",
101
+ "enum": ["straight", "elbowed"],
102
+ "description": "连线类型。"
103
+ },
104
+ "color": {
105
+ "type": "string",
106
+ "minLength": 1,
107
+ "pattern": ".*\\S.*",
108
+ "description": "连线颜色。"
109
+ }
110
+ }
111
+ }
112
+ }
113
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "ModelGetInput",
4
+ "description": "读取一个创作模型完整信息的输入。",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "model"
9
+ ],
10
+ "properties": {
11
+ "model": {
12
+ "type": "string",
13
+ "minLength": 1,
14
+ "pattern": ".*\\S.*",
15
+ "description": "要读取的创作模型机器标识。"
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,191 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "ModelDetail",
4
+ "description": "一个创作模型的完整产品信息。",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "tool",
9
+ "model",
10
+ "title",
11
+ "parameters"
12
+ ],
13
+ "properties": {
14
+ "tool": {
15
+ "$ref": "#/$defs/NonBlankString",
16
+ "description": "模型所属的产品创作工具。"
17
+ },
18
+ "model": {
19
+ "$ref": "#/$defs/NonBlankString",
20
+ "description": "调用模型时使用的机器标识。"
21
+ },
22
+ "title": {
23
+ "$ref": "#/$defs/NonBlankString",
24
+ "description": "模型的展示名称。"
25
+ },
26
+ "description": {
27
+ "$ref": "#/$defs/NonBlankString",
28
+ "description": "模型的用途说明。"
29
+ },
30
+ "usageDescription": {
31
+ "$ref": "#/$defs/NonBlankString",
32
+ "description": "模型的使用说明。"
33
+ },
34
+ "outputMediaTypes": {
35
+ "type": "array",
36
+ "description": "模型支持的输出 MIME type。",
37
+ "items": {
38
+ "$ref": "#/$defs/NonBlankString"
39
+ }
40
+ },
41
+ "parameters": {
42
+ "type": "array",
43
+ "description": "当前模型允许调用者提供的公开参数。",
44
+ "items": {
45
+ "$ref": "#/$defs/ModelParameter"
46
+ }
47
+ },
48
+ "cost": {
49
+ "$ref": "#/$defs/CostRange",
50
+ "description": "模型当前可用配置的稿豆消耗区间。"
51
+ },
52
+ "estimatedTime": {
53
+ "$ref": "#/$defs/EstimatedTimeRange",
54
+ "description": "模型当前可用配置的预估耗时区间。"
55
+ }
56
+ },
57
+ "$defs": {
58
+ "NonBlankString": {
59
+ "type": "string",
60
+ "minLength": 1,
61
+ "pattern": ".*\\S.*"
62
+ },
63
+ "CostRange": {
64
+ "type": "object",
65
+ "additionalProperties": false,
66
+ "required": [
67
+ "unit",
68
+ "minimum",
69
+ "maximum"
70
+ ],
71
+ "properties": {
72
+ "unit": {
73
+ "const": "gaodou",
74
+ "description": "稿豆计价单位。"
75
+ },
76
+ "minimum": {
77
+ "type": "number",
78
+ "minimum": 0,
79
+ "description": "当前可用配置中的最低稿豆消耗。"
80
+ },
81
+ "maximum": {
82
+ "type": "number",
83
+ "minimum": 0,
84
+ "description": "当前可用配置中的最高稿豆消耗。"
85
+ }
86
+ }
87
+ },
88
+ "EstimatedTimeRange": {
89
+ "type": "object",
90
+ "additionalProperties": false,
91
+ "required": [
92
+ "unit",
93
+ "minimum",
94
+ "maximum"
95
+ ],
96
+ "properties": {
97
+ "unit": {
98
+ "const": "second",
99
+ "description": "秒级耗时单位。"
100
+ },
101
+ "minimum": {
102
+ "type": "number",
103
+ "minimum": 0,
104
+ "description": "当前可用配置中的最短预估耗时。"
105
+ },
106
+ "maximum": {
107
+ "type": "number",
108
+ "minimum": 0,
109
+ "description": "当前可用配置中的最长预估耗时。"
110
+ }
111
+ }
112
+ },
113
+ "ModelParameter": {
114
+ "type": "object",
115
+ "additionalProperties": false,
116
+ "required": [
117
+ "name",
118
+ "type",
119
+ "required"
120
+ ],
121
+ "properties": {
122
+ "name": {
123
+ "$ref": "#/$defs/NonBlankString",
124
+ "description": "调用模型时使用的参数名。"
125
+ },
126
+ "type": {
127
+ "type": "string",
128
+ "enum": [
129
+ "string",
130
+ "number",
131
+ "uri",
132
+ "uri[]"
133
+ ],
134
+ "description": "规范化后的参数类型。"
135
+ },
136
+ "required": {
137
+ "type": "boolean",
138
+ "description": "调用当前模型时是否必须提供该参数。"
139
+ },
140
+ "description": {
141
+ "$ref": "#/$defs/NonBlankString",
142
+ "description": "参数的用途说明。"
143
+ },
144
+ "default": {
145
+ "anyOf": [
146
+ {
147
+ "type": "string"
148
+ },
149
+ {
150
+ "type": "number"
151
+ },
152
+ {
153
+ "type": "boolean"
154
+ },
155
+ {
156
+ "type": "object"
157
+ },
158
+ {
159
+ "type": "array"
160
+ },
161
+ {
162
+ "type": "null"
163
+ }
164
+ ],
165
+ "description": "服务端声明的默认值。"
166
+ },
167
+ "options": {
168
+ "type": "array",
169
+ "description": "选择型参数当前允许的值。",
170
+ "items": {
171
+ "type": "object",
172
+ "additionalProperties": false,
173
+ "required": [
174
+ "value"
175
+ ],
176
+ "properties": {
177
+ "value": {
178
+ "$ref": "#/$defs/NonBlankString",
179
+ "description": "调用时提供的选项值。"
180
+ },
181
+ "label": {
182
+ "$ref": "#/$defs/NonBlankString",
183
+ "description": "选项的展示名称。"
184
+ }
185
+ }
186
+ }
187
+ }
188
+ }
189
+ }
190
+ }
191
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "ModelListInput",
4
+ "description": "列出当前可用创作模型的输入。",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "tool": {
9
+ "type": "string",
10
+ "minLength": 1,
11
+ "pattern": ".*\\S.*",
12
+ "description": "可选的创作工具机器标识。"
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,111 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "ModelListResult",
4
+ "description": "当前可用的创作模型摘要。",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "models"
9
+ ],
10
+ "properties": {
11
+ "models": {
12
+ "type": "array",
13
+ "description": "当前已发布且至少有一个上架 SKU 的创作模型。",
14
+ "items": {
15
+ "$ref": "#/$defs/ModelSummary"
16
+ }
17
+ }
18
+ },
19
+ "$defs": {
20
+ "NonBlankString": {
21
+ "type": "string",
22
+ "minLength": 1,
23
+ "pattern": ".*\\S.*"
24
+ },
25
+ "CostRange": {
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": [
29
+ "unit",
30
+ "minimum",
31
+ "maximum"
32
+ ],
33
+ "properties": {
34
+ "unit": {
35
+ "const": "gaodou",
36
+ "description": "稿豆计价单位。"
37
+ },
38
+ "minimum": {
39
+ "type": "number",
40
+ "minimum": 0,
41
+ "description": "当前可用配置中的最低稿豆消耗。"
42
+ },
43
+ "maximum": {
44
+ "type": "number",
45
+ "minimum": 0,
46
+ "description": "当前可用配置中的最高稿豆消耗。"
47
+ }
48
+ }
49
+ },
50
+ "EstimatedTimeRange": {
51
+ "type": "object",
52
+ "additionalProperties": false,
53
+ "required": [
54
+ "unit",
55
+ "minimum",
56
+ "maximum"
57
+ ],
58
+ "properties": {
59
+ "unit": {
60
+ "const": "second",
61
+ "description": "秒级耗时单位。"
62
+ },
63
+ "minimum": {
64
+ "type": "number",
65
+ "minimum": 0,
66
+ "description": "当前可用配置中的最短预估耗时。"
67
+ },
68
+ "maximum": {
69
+ "type": "number",
70
+ "minimum": 0,
71
+ "description": "当前可用配置中的最长预估耗时。"
72
+ }
73
+ }
74
+ },
75
+ "ModelSummary": {
76
+ "type": "object",
77
+ "additionalProperties": false,
78
+ "required": [
79
+ "tool",
80
+ "model",
81
+ "title"
82
+ ],
83
+ "properties": {
84
+ "tool": {
85
+ "$ref": "#/$defs/NonBlankString",
86
+ "description": "模型所属的产品创作工具。"
87
+ },
88
+ "model": {
89
+ "$ref": "#/$defs/NonBlankString",
90
+ "description": "调用模型时使用的机器标识。"
91
+ },
92
+ "title": {
93
+ "$ref": "#/$defs/NonBlankString",
94
+ "description": "模型的展示名称。"
95
+ },
96
+ "description": {
97
+ "$ref": "#/$defs/NonBlankString",
98
+ "description": "模型的用途说明。"
99
+ },
100
+ "cost": {
101
+ "$ref": "#/$defs/CostRange",
102
+ "description": "模型当前可用配置的稿豆消耗区间。"
103
+ },
104
+ "estimatedTime": {
105
+ "$ref": "#/$defs/EstimatedTimeRange",
106
+ "description": "模型当前可用配置的预估耗时区间。"
107
+ }
108
+ }
109
+ }
110
+ }
111
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.gaoding.com/operations/org.current/input.schema.json",
4
+ "title": "OrgCurrentInput",
5
+ "type": "object",
6
+ "additionalProperties": false
7
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.gaoding.com/operations/org.current/output.schema.json",
4
+ "title": "OrgCurrentResult",
5
+ "description": "本机当前选择的组织。",
6
+ "type": "object",
7
+ "required": [
8
+ "organization",
9
+ "next_steps"
10
+ ],
11
+ "properties": {
12
+ "organization": {
13
+ "description": "本机当前选择的组织;尚未选择时为 null。",
14
+ "oneOf": [
15
+ {
16
+ "type": "null"
17
+ },
18
+ {
19
+ "type": "object",
20
+ "required": [
21
+ "id",
22
+ "name"
23
+ ],
24
+ "properties": {
25
+ "id": {
26
+ "type": "string",
27
+ "minLength": 1,
28
+ "description": "当前组织 ID。"
29
+ },
30
+ "name": {
31
+ "type": "string",
32
+ "minLength": 1,
33
+ "description": "当前组织名称。"
34
+ }
35
+ },
36
+ "additionalProperties": false
37
+ }
38
+ ]
39
+ },
40
+ "next_steps": {
41
+ "type": "array",
42
+ "description": "尚未选择组织时的下一步命令。",
43
+ "items": {
44
+ "type": "string"
45
+ }
46
+ }
47
+ },
48
+ "additionalProperties": false
49
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.gaoding.com/operations/org.list/input.schema.json",
4
+ "title": "OrgListInput",
5
+ "type": "object",
6
+ "additionalProperties": false
7
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.gaoding.com/operations/org.list/output.schema.json",
4
+ "title": "OrgListResult",
5
+ "description": "当前账号可以访问的组织列表。",
6
+ "type": "object",
7
+ "required": [
8
+ "orgs",
9
+ "current_org_id"
10
+ ],
11
+ "properties": {
12
+ "orgs": {
13
+ "type": "array",
14
+ "description": "当前账号可以访问的组织。",
15
+ "items": {
16
+ "$ref": "#/$defs/OrgSummary"
17
+ }
18
+ },
19
+ "current_org_id": {
20
+ "type": [
21
+ "string",
22
+ "null"
23
+ ],
24
+ "description": "本机当前选择的组织 ID;尚未选择时为 null。"
25
+ }
26
+ },
27
+ "additionalProperties": false,
28
+ "$defs": {
29
+ "OrgSummary": {
30
+ "type": "object",
31
+ "required": [
32
+ "id",
33
+ "name"
34
+ ],
35
+ "properties": {
36
+ "id": {
37
+ "type": "string",
38
+ "minLength": 1,
39
+ "description": "组织 ID。"
40
+ },
41
+ "name": {
42
+ "type": "string",
43
+ "minLength": 1,
44
+ "description": "组织名称。"
45
+ },
46
+ "type": {
47
+ "type": "string",
48
+ "description": "组织类型。"
49
+ },
50
+ "status": {
51
+ "type": "string",
52
+ "description": "组织状态。"
53
+ },
54
+ "product_name": {
55
+ "type": "string",
56
+ "description": "当前产品版本名称。"
57
+ },
58
+ "product_type": {
59
+ "type": "string",
60
+ "description": "当前产品版本类型。"
61
+ },
62
+ "expires_at": {
63
+ "type": "string",
64
+ "format": "date-time",
65
+ "description": "产品到期时间,ISO 8601。"
66
+ }
67
+ },
68
+ "additionalProperties": false
69
+ }
70
+ }
71
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "ToolCallInput",
4
+ "description": "调用一个产品创作工具的结构化输入。",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "name",
9
+ "arguments"
10
+ ],
11
+ "properties": {
12
+ "name": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "pattern": ".*\\S.*",
16
+ "description": "要调用的产品创作工具机器标识。"
17
+ },
18
+ "arguments": {
19
+ "type": "object",
20
+ "description": "当前工具与模型接受的动态参数。",
21
+ "required": [
22
+ "model"
23
+ ],
24
+ "properties": {
25
+ "model": {
26
+ "type": "string",
27
+ "minLength": 1,
28
+ "pattern": ".*\\S.*",
29
+ "description": "要调用的创作模型机器标识。"
30
+ }
31
+ },
32
+ "additionalProperties": true
33
+ }
34
+ }
35
+ }