tinet-agent-cli 0.1.0.dev36__py3-none-any.whl
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.
- taco/__init__.py +1 -0
- taco/agent_openapi/__init__.py +1 -0
- taco/agent_openapi/catalog.py +198 -0
- taco/agent_openapi/models.py +47 -0
- taco/agent_openapi/parameters.py +111 -0
- taco/agent_openapi/service.py +73 -0
- taco/aikb/__init__.py +4 -0
- taco/aikb/catalog.py +380 -0
- taco/aikb/executors.py +157 -0
- taco/aikb/file_input.py +55 -0
- taco/aikb/models.py +42 -0
- taco/aikb/parameters.py +135 -0
- taco/aikb/service.py +68 -0
- taco/assets/__init__.py +1 -0
- taco/assets/agent_openapi/catalog.json +14 -0
- taco/assets/agent_openapi/operations/conversation/list-conversations.json +67 -0
- taco/assets/agent_openapi/operations/message/list-conversation-messages.json +80 -0
- taco/assets/agent_openapi/operations/trace/list-message-traces.json +72 -0
- taco/assets/aikb/catalog.json +41 -0
- taco/assets/aikb/operations/conversation/chat-conversation-on-open.json +99 -0
- taco/assets/aikb/operations/directory/delete-directory.json +81 -0
- taco/assets/aikb/operations/directory/edit-directory.json +97 -0
- taco/assets/aikb/operations/directory/list-directory-tree.json +106 -0
- taco/assets/aikb/operations/directory/save-directory.json +109 -0
- taco/assets/aikb/operations/faq/create-faq.json +193 -0
- taco/assets/aikb/operations/faq/delete-faq.json +81 -0
- taco/assets/aikb/operations/faq/describe-faq.json +82 -0
- taco/assets/aikb/operations/faq/edit-faq.json +193 -0
- taco/assets/aikb/operations/faq/list-faqs.json +136 -0
- taco/assets/aikb/operations/file/create-file.json +145 -0
- taco/assets/aikb/operations/file/delete-files.json +110 -0
- taco/assets/aikb/operations/file/describe-file.json +82 -0
- taco/assets/aikb/operations/file/get-file-upload-url.json +154 -0
- taco/assets/aikb/operations/file/list-files.json +146 -0
- taco/assets/aikb/operations/media/describe-faq-media-url.json +98 -0
- taco/assets/aikb/operations/media/describe-file-media-url.json +90 -0
- taco/assets/aikb/operations/oss/signature-for-upload.json +85 -0
- taco/assets/aikb/operations/recycle-bin/list-recycled-items.json +151 -0
- taco/assets/aikb/operations/repository/describe-bot-repository.json +71 -0
- taco/assets/aikb/operations/repository/list-private-repositories.json +75 -0
- taco/assets/aikb/operations/repository/list-public-repositories.json +75 -0
- taco/assets/aikb/operations/search/search-knowledge-on-open.json +180 -0
- taco/assets/examples/README.md +3 -0
- taco/assets/examples/agent-basic.json +16 -0
- taco/assets/examples/agent-builtin-tool.json +28 -0
- taco/assets/examples/agent-workflow-tool.json +30 -0
- taco/assets/examples/chatflow-basic.json +24 -0
- taco/assets/examples/workflow-http.json +34 -0
- taco/assets/manifest.json +12 -0
- taco/assets/scenarios/README.md +3 -0
- taco/assets/scenarios/agent-basic.json +80 -0
- taco/assets/scenarios/agent-builtin-tool.json +116 -0
- taco/assets/scenarios/agent-workflow-tool.json +277 -0
- taco/assets/schemas/README.md +3 -0
- taco/assets/schemas/agent-tool.json +71 -0
- taco/assets/schemas/agent.json +199 -0
- taco/assets/schemas/chatflow.json +1048 -0
- taco/assets/schemas/workflow.http.json +1052 -0
- taco/assets/schemas/workflow.json +1052 -0
- taco/assets/skills/README.md +3 -0
- taco/assets/skills/taco/SKILL.md +68 -0
- taco/assets/skills/taco/manifest.json +10 -0
- taco/cli.py +127 -0
- taco/commands/__init__.py +1 -0
- taco/commands/agent.py +760 -0
- taco/commands/aikb.py +132 -0
- taco/commands/app.py +151 -0
- taco/commands/category.py +37 -0
- taco/commands/chatflow.py +183 -0
- taco/commands/credential.py +222 -0
- taco/commands/discovery.py +409 -0
- taco/commands/model.py +55 -0
- taco/commands/profile.py +124 -0
- taco/commands/tool.py +61 -0
- taco/commands/workflow.py +714 -0
- taco/core/__init__.py +1 -0
- taco/core/access_token_manager.py +98 -0
- taco/core/api_client.py +263 -0
- taco/core/assets.py +81 -0
- taco/core/config_store.py +209 -0
- taco/core/context.py +19 -0
- taco/core/developer_center_client.py +165 -0
- taco/core/errors.py +19 -0
- taco/core/file_lock.py +80 -0
- taco/core/http_headers.py +21 -0
- taco/core/openapi_signer.py +221 -0
- taco/core/output.py +72 -0
- taco/core/profile_manager.py +217 -0
- taco/core/profile_resolver.py +151 -0
- taco/core/secure_file.py +76 -0
- taco/release.py +363 -0
- taco/services/__init__.py +1 -0
- taco/services/agent_service.py +314 -0
- taco/services/app_service.py +153 -0
- taco/services/category_service.py +57 -0
- taco/services/model_service.py +117 -0
- taco/services/tool_service.py +482 -0
- taco/services/workflow_compiler.py +1665 -0
- taco/services/workflow_service.py +652 -0
- taco/services/workflow_tool_service.py +439 -0
- tinet_agent_cli-0.1.0.dev36.dist-info/METADATA +158 -0
- tinet_agent_cli-0.1.0.dev36.dist-info/RECORD +104 -0
- tinet_agent_cli-0.1.0.dev36.dist-info/WHEEL +4 -0
- tinet_agent_cli-0.1.0.dev36.dist-info/entry_points.txt +2 -0
|
@@ -0,0 +1,1052 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://tinet.local/schemas/taco/workflow.http.json",
|
|
4
|
+
"title": "TACO Workflow HTTP DSL",
|
|
5
|
+
"description": "声明式 Workflow YAML 的本地校验 schema;支持 http / code / knowledge-retrieval / llm / template-transform 节点编排,以及 branch / parallel / iterate 控制流。",
|
|
6
|
+
"x-taco": {
|
|
7
|
+
"example": "workflow-http",
|
|
8
|
+
"commands": [
|
|
9
|
+
"workflow validate"
|
|
10
|
+
],
|
|
11
|
+
"risks": [
|
|
12
|
+
"workflow validate 仅执行本地校验和编译,不会发送 HTTP 请求。",
|
|
13
|
+
"DSL 只能引用 secrets 名称,不能写入真实密钥值。",
|
|
14
|
+
"当前 Dify 普通 HTTP executor 无法安全替换动态 JSON body;json data 仅允许静态 JSON,动态客户输入请改用 query 或 x-www-form-urlencoded。",
|
|
15
|
+
"知识检索节点首期仅支持 multiple 多路召回。",
|
|
16
|
+
"branch / parallel 的 then/else/branches 内暂不支持再嵌套控制流。",
|
|
17
|
+
"iterate.steps 内首期仅允许业务节点(http / code / knowledge-retrieval),不可嵌套控制流。",
|
|
18
|
+
"llm 首期仅支持 basic prompt(无 vision/memory/RAG context);template-transform 须显式声明 variables。"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"type": "object",
|
|
22
|
+
"required": [
|
|
23
|
+
"kind",
|
|
24
|
+
"name",
|
|
25
|
+
"inputs",
|
|
26
|
+
"outputs"
|
|
27
|
+
],
|
|
28
|
+
"properties": {
|
|
29
|
+
"kind": {
|
|
30
|
+
"const": "workflow"
|
|
31
|
+
},
|
|
32
|
+
"name": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"minLength": 1
|
|
35
|
+
},
|
|
36
|
+
"description": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"inputs": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"propertyNames": {
|
|
42
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
|
|
43
|
+
"maxLength": 30
|
|
44
|
+
},
|
|
45
|
+
"additionalProperties": {
|
|
46
|
+
"$ref": "#/$defs/input"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"nodes": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"minItems": 1,
|
|
52
|
+
"items": {
|
|
53
|
+
"$ref": "#/$defs/step"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"outputs": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"propertyNames": {
|
|
59
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
|
|
60
|
+
"maxLength": 30
|
|
61
|
+
},
|
|
62
|
+
"additionalProperties": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"minLength": 1
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"publish": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"required": [
|
|
70
|
+
"asTool"
|
|
71
|
+
],
|
|
72
|
+
"properties": {
|
|
73
|
+
"asTool": {
|
|
74
|
+
"type": "boolean"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"additionalProperties": false
|
|
78
|
+
},
|
|
79
|
+
"steps": {
|
|
80
|
+
"type": "array",
|
|
81
|
+
"minItems": 1,
|
|
82
|
+
"items": {
|
|
83
|
+
"$ref": "#/$defs/step"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"$defs": {
|
|
88
|
+
"input": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"required": [
|
|
91
|
+
"type",
|
|
92
|
+
"required"
|
|
93
|
+
],
|
|
94
|
+
"properties": {
|
|
95
|
+
"type": {
|
|
96
|
+
"enum": [
|
|
97
|
+
"string",
|
|
98
|
+
"number",
|
|
99
|
+
"select"
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
"required": {
|
|
103
|
+
"type": "boolean"
|
|
104
|
+
},
|
|
105
|
+
"description": {
|
|
106
|
+
"type": "string"
|
|
107
|
+
},
|
|
108
|
+
"options": {
|
|
109
|
+
"type": "array",
|
|
110
|
+
"items": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"minLength": 1
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"max_length": {
|
|
116
|
+
"type": "integer",
|
|
117
|
+
"minimum": 1
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"allOf": [
|
|
121
|
+
{
|
|
122
|
+
"if": {
|
|
123
|
+
"properties": {
|
|
124
|
+
"type": {
|
|
125
|
+
"const": "select"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"required": [
|
|
129
|
+
"type"
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
"then": {
|
|
133
|
+
"required": [
|
|
134
|
+
"options"
|
|
135
|
+
],
|
|
136
|
+
"properties": {
|
|
137
|
+
"options": {
|
|
138
|
+
"minItems": 1
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
"additionalProperties": false
|
|
145
|
+
},
|
|
146
|
+
"scalar": {
|
|
147
|
+
"type": [
|
|
148
|
+
"string",
|
|
149
|
+
"number",
|
|
150
|
+
"boolean"
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
"lineScalar": {
|
|
154
|
+
"oneOf": [
|
|
155
|
+
{
|
|
156
|
+
"type": "string",
|
|
157
|
+
"not": {
|
|
158
|
+
"pattern": "[\\r\\n\\u000B\\u000C\\u001C\\u001D\\u001E\\u0085\\u2028\\u2029]"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"type": [
|
|
163
|
+
"number",
|
|
164
|
+
"boolean"
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
"headerScalar": {
|
|
170
|
+
"allOf": [
|
|
171
|
+
{
|
|
172
|
+
"$ref": "#/$defs/lineScalar"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"if": {
|
|
176
|
+
"type": "string"
|
|
177
|
+
},
|
|
178
|
+
"then": {
|
|
179
|
+
"not": {
|
|
180
|
+
"pattern": "\\{\\{[ \\t]{0,16}[A-Za-z][A-Za-z0-9_]{0,49}\\.[A-Za-z_][A-Za-z0-9_]{0,29}[ \\t]{0,16}\\}\\}"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
"headerName": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
|
|
189
|
+
},
|
|
190
|
+
"stringMap": {
|
|
191
|
+
"type": "object",
|
|
192
|
+
"additionalProperties": {
|
|
193
|
+
"$ref": "#/$defs/scalar"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"headerMap": {
|
|
197
|
+
"type": "object",
|
|
198
|
+
"propertyNames": {
|
|
199
|
+
"$ref": "#/$defs/headerName"
|
|
200
|
+
},
|
|
201
|
+
"additionalProperties": {
|
|
202
|
+
"$ref": "#/$defs/headerScalar"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"queryMap": {
|
|
206
|
+
"type": "object",
|
|
207
|
+
"propertyNames": {
|
|
208
|
+
"minLength": 1,
|
|
209
|
+
"pattern": "^(?!\\s)(?!.*\\s$)[^:\\r\\n\\u000B\\u000C\\u001C\\u001D\\u001E\\u0085\\u2028\\u2029]+$"
|
|
210
|
+
},
|
|
211
|
+
"additionalProperties": {
|
|
212
|
+
"$ref": "#/$defs/lineScalar"
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"authorization": {
|
|
216
|
+
"type": "object",
|
|
217
|
+
"required": [
|
|
218
|
+
"type"
|
|
219
|
+
],
|
|
220
|
+
"properties": {
|
|
221
|
+
"type": {
|
|
222
|
+
"enum": [
|
|
223
|
+
"no-auth",
|
|
224
|
+
"api-key"
|
|
225
|
+
]
|
|
226
|
+
},
|
|
227
|
+
"config": {
|
|
228
|
+
"$ref": "#/$defs/authorizationConfig"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"allOf": [
|
|
232
|
+
{
|
|
233
|
+
"if": {
|
|
234
|
+
"properties": {
|
|
235
|
+
"type": {
|
|
236
|
+
"const": "no-auth"
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"required": [
|
|
240
|
+
"type"
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
"then": {
|
|
244
|
+
"not": {
|
|
245
|
+
"required": [
|
|
246
|
+
"config"
|
|
247
|
+
]
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"if": {
|
|
253
|
+
"properties": {
|
|
254
|
+
"type": {
|
|
255
|
+
"const": "api-key"
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"required": [
|
|
259
|
+
"type"
|
|
260
|
+
]
|
|
261
|
+
},
|
|
262
|
+
"then": {
|
|
263
|
+
"required": [
|
|
264
|
+
"config"
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
],
|
|
269
|
+
"additionalProperties": false
|
|
270
|
+
},
|
|
271
|
+
"authorizationConfig": {
|
|
272
|
+
"type": "object",
|
|
273
|
+
"required": [
|
|
274
|
+
"type",
|
|
275
|
+
"api_key"
|
|
276
|
+
],
|
|
277
|
+
"properties": {
|
|
278
|
+
"type": {
|
|
279
|
+
"enum": [
|
|
280
|
+
"basic",
|
|
281
|
+
"bearer",
|
|
282
|
+
"custom"
|
|
283
|
+
]
|
|
284
|
+
},
|
|
285
|
+
"api_key": {
|
|
286
|
+
"type": "string",
|
|
287
|
+
"pattern": "^\\{\\{[ \\t]{0,16}secrets\\.[A-Za-z_][A-Za-z0-9_]{0,29}[ \\t]{0,16}\\}\\}$"
|
|
288
|
+
},
|
|
289
|
+
"header": {
|
|
290
|
+
"$ref": "#/$defs/headerName"
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"allOf": [
|
|
294
|
+
{
|
|
295
|
+
"if": {
|
|
296
|
+
"properties": {
|
|
297
|
+
"type": {
|
|
298
|
+
"const": "custom"
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
"required": [
|
|
302
|
+
"type"
|
|
303
|
+
]
|
|
304
|
+
},
|
|
305
|
+
"then": {
|
|
306
|
+
"required": [
|
|
307
|
+
"header"
|
|
308
|
+
],
|
|
309
|
+
"properties": {
|
|
310
|
+
"header": {
|
|
311
|
+
"minLength": 1
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
],
|
|
317
|
+
"additionalProperties": false
|
|
318
|
+
},
|
|
319
|
+
"jsonValue": {
|
|
320
|
+
"oneOf": [
|
|
321
|
+
{
|
|
322
|
+
"type": [
|
|
323
|
+
"string",
|
|
324
|
+
"number",
|
|
325
|
+
"boolean",
|
|
326
|
+
"null"
|
|
327
|
+
]
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"type": "array",
|
|
331
|
+
"items": {
|
|
332
|
+
"$ref": "#/$defs/jsonValue"
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"$ref": "#/$defs/jsonObject"
|
|
337
|
+
}
|
|
338
|
+
]
|
|
339
|
+
},
|
|
340
|
+
"jsonObject": {
|
|
341
|
+
"type": "object",
|
|
342
|
+
"additionalProperties": {
|
|
343
|
+
"$ref": "#/$defs/jsonValue"
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"body": {
|
|
347
|
+
"type": "object",
|
|
348
|
+
"description": "JSON body 仅允许静态 JSON;动态值请改用 query 或 x-www-form-urlencoded。",
|
|
349
|
+
"required": [
|
|
350
|
+
"type"
|
|
351
|
+
],
|
|
352
|
+
"properties": {
|
|
353
|
+
"type": {
|
|
354
|
+
"enum": [
|
|
355
|
+
"none",
|
|
356
|
+
"x-www-form-urlencoded",
|
|
357
|
+
"raw-text",
|
|
358
|
+
"json"
|
|
359
|
+
]
|
|
360
|
+
},
|
|
361
|
+
"data": {}
|
|
362
|
+
},
|
|
363
|
+
"allOf": [
|
|
364
|
+
{
|
|
365
|
+
"if": {
|
|
366
|
+
"properties": {
|
|
367
|
+
"type": {
|
|
368
|
+
"const": "none"
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
"required": [
|
|
372
|
+
"type"
|
|
373
|
+
]
|
|
374
|
+
},
|
|
375
|
+
"then": {
|
|
376
|
+
"not": {
|
|
377
|
+
"required": [
|
|
378
|
+
"data"
|
|
379
|
+
]
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"if": {
|
|
385
|
+
"properties": {
|
|
386
|
+
"type": {
|
|
387
|
+
"const": "json"
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
"required": [
|
|
391
|
+
"type"
|
|
392
|
+
]
|
|
393
|
+
},
|
|
394
|
+
"then": {
|
|
395
|
+
"required": [
|
|
396
|
+
"data"
|
|
397
|
+
],
|
|
398
|
+
"properties": {
|
|
399
|
+
"data": {
|
|
400
|
+
"oneOf": [
|
|
401
|
+
{
|
|
402
|
+
"type": "string"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"$ref": "#/$defs/jsonObject"
|
|
406
|
+
}
|
|
407
|
+
]
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"if": {
|
|
414
|
+
"properties": {
|
|
415
|
+
"type": {
|
|
416
|
+
"const": "raw-text"
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
"required": [
|
|
420
|
+
"type"
|
|
421
|
+
]
|
|
422
|
+
},
|
|
423
|
+
"then": {
|
|
424
|
+
"required": [
|
|
425
|
+
"data"
|
|
426
|
+
],
|
|
427
|
+
"properties": {
|
|
428
|
+
"data": {
|
|
429
|
+
"type": "string"
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"if": {
|
|
436
|
+
"properties": {
|
|
437
|
+
"type": {
|
|
438
|
+
"const": "x-www-form-urlencoded"
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
"required": [
|
|
442
|
+
"type"
|
|
443
|
+
]
|
|
444
|
+
},
|
|
445
|
+
"then": {
|
|
446
|
+
"required": [
|
|
447
|
+
"data"
|
|
448
|
+
],
|
|
449
|
+
"properties": {
|
|
450
|
+
"data": {
|
|
451
|
+
"$ref": "#/$defs/stringMap"
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
],
|
|
457
|
+
"additionalProperties": false
|
|
458
|
+
},
|
|
459
|
+
"timeout": {
|
|
460
|
+
"type": "object",
|
|
461
|
+
"properties": {
|
|
462
|
+
"connect": {
|
|
463
|
+
"type": "integer",
|
|
464
|
+
"minimum": 0
|
|
465
|
+
},
|
|
466
|
+
"read": {
|
|
467
|
+
"type": "integer",
|
|
468
|
+
"minimum": 0
|
|
469
|
+
},
|
|
470
|
+
"write": {
|
|
471
|
+
"type": "integer",
|
|
472
|
+
"minimum": 0
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
"additionalProperties": false
|
|
476
|
+
},
|
|
477
|
+
"retry": {
|
|
478
|
+
"type": "object",
|
|
479
|
+
"properties": {
|
|
480
|
+
"enabled": {
|
|
481
|
+
"type": "boolean"
|
|
482
|
+
},
|
|
483
|
+
"retry_enabled": {
|
|
484
|
+
"type": "boolean"
|
|
485
|
+
},
|
|
486
|
+
"max_retries": {
|
|
487
|
+
"type": "integer",
|
|
488
|
+
"minimum": 0,
|
|
489
|
+
"maximum": 10
|
|
490
|
+
},
|
|
491
|
+
"interval": {
|
|
492
|
+
"type": "integer",
|
|
493
|
+
"minimum": 0
|
|
494
|
+
},
|
|
495
|
+
"retry_interval": {
|
|
496
|
+
"type": "integer",
|
|
497
|
+
"minimum": 0
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
"additionalProperties": false
|
|
501
|
+
},
|
|
502
|
+
"httpNode": {
|
|
503
|
+
"type": "object",
|
|
504
|
+
"required": [
|
|
505
|
+
"id",
|
|
506
|
+
"type",
|
|
507
|
+
"method",
|
|
508
|
+
"url"
|
|
509
|
+
],
|
|
510
|
+
"properties": {
|
|
511
|
+
"id": {
|
|
512
|
+
"type": "string",
|
|
513
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
514
|
+
"maxLength": 50
|
|
515
|
+
},
|
|
516
|
+
"type": {
|
|
517
|
+
"const": "http"
|
|
518
|
+
},
|
|
519
|
+
"method": {
|
|
520
|
+
"enum": [
|
|
521
|
+
"GET",
|
|
522
|
+
"POST",
|
|
523
|
+
"PUT",
|
|
524
|
+
"PATCH",
|
|
525
|
+
"DELETE",
|
|
526
|
+
"HEAD",
|
|
527
|
+
"get",
|
|
528
|
+
"post",
|
|
529
|
+
"put",
|
|
530
|
+
"patch",
|
|
531
|
+
"delete",
|
|
532
|
+
"head"
|
|
533
|
+
]
|
|
534
|
+
},
|
|
535
|
+
"url": {
|
|
536
|
+
"type": "string",
|
|
537
|
+
"minLength": 1
|
|
538
|
+
},
|
|
539
|
+
"query": {
|
|
540
|
+
"$ref": "#/$defs/queryMap"
|
|
541
|
+
},
|
|
542
|
+
"headers": {
|
|
543
|
+
"$ref": "#/$defs/headerMap"
|
|
544
|
+
},
|
|
545
|
+
"body": {
|
|
546
|
+
"$ref": "#/$defs/body"
|
|
547
|
+
},
|
|
548
|
+
"authorization": {
|
|
549
|
+
"$ref": "#/$defs/authorization"
|
|
550
|
+
},
|
|
551
|
+
"timeout": {
|
|
552
|
+
"$ref": "#/$defs/timeout"
|
|
553
|
+
},
|
|
554
|
+
"retry": {
|
|
555
|
+
"$ref": "#/$defs/retry"
|
|
556
|
+
}
|
|
557
|
+
},
|
|
558
|
+
"additionalProperties": false
|
|
559
|
+
},
|
|
560
|
+
"codeNode": {
|
|
561
|
+
"type": "object",
|
|
562
|
+
"required": [
|
|
563
|
+
"id",
|
|
564
|
+
"type",
|
|
565
|
+
"language",
|
|
566
|
+
"code",
|
|
567
|
+
"outputs"
|
|
568
|
+
],
|
|
569
|
+
"properties": {
|
|
570
|
+
"id": {
|
|
571
|
+
"type": "string",
|
|
572
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
573
|
+
"maxLength": 50
|
|
574
|
+
},
|
|
575
|
+
"type": {
|
|
576
|
+
"const": "code"
|
|
577
|
+
},
|
|
578
|
+
"language": {
|
|
579
|
+
"enum": [
|
|
580
|
+
"python3",
|
|
581
|
+
"javascript"
|
|
582
|
+
]
|
|
583
|
+
},
|
|
584
|
+
"code": {
|
|
585
|
+
"type": "string",
|
|
586
|
+
"minLength": 1
|
|
587
|
+
},
|
|
588
|
+
"variables": {
|
|
589
|
+
"type": "object",
|
|
590
|
+
"propertyNames": {
|
|
591
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
|
|
592
|
+
"maxLength": 30
|
|
593
|
+
},
|
|
594
|
+
"additionalProperties": {
|
|
595
|
+
"type": "string",
|
|
596
|
+
"minLength": 1
|
|
597
|
+
}
|
|
598
|
+
},
|
|
599
|
+
"outputs": {
|
|
600
|
+
"type": "object",
|
|
601
|
+
"minProperties": 1,
|
|
602
|
+
"propertyNames": {
|
|
603
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
|
|
604
|
+
"maxLength": 30
|
|
605
|
+
},
|
|
606
|
+
"additionalProperties": {
|
|
607
|
+
"type": "object",
|
|
608
|
+
"required": [
|
|
609
|
+
"type"
|
|
610
|
+
],
|
|
611
|
+
"properties": {
|
|
612
|
+
"type": {
|
|
613
|
+
"enum": [
|
|
614
|
+
"string",
|
|
615
|
+
"number",
|
|
616
|
+
"object",
|
|
617
|
+
"array[string]",
|
|
618
|
+
"array[number]",
|
|
619
|
+
"array[object]"
|
|
620
|
+
]
|
|
621
|
+
}
|
|
622
|
+
},
|
|
623
|
+
"additionalProperties": false
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
"additionalProperties": false
|
|
628
|
+
},
|
|
629
|
+
"knowledgeRetrievalNode": {
|
|
630
|
+
"type": "object",
|
|
631
|
+
"required": [
|
|
632
|
+
"id",
|
|
633
|
+
"type",
|
|
634
|
+
"query",
|
|
635
|
+
"dataset_ids"
|
|
636
|
+
],
|
|
637
|
+
"properties": {
|
|
638
|
+
"id": {
|
|
639
|
+
"type": "string",
|
|
640
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
641
|
+
"maxLength": 50
|
|
642
|
+
},
|
|
643
|
+
"type": {
|
|
644
|
+
"const": "knowledge-retrieval"
|
|
645
|
+
},
|
|
646
|
+
"query": {
|
|
647
|
+
"type": "string",
|
|
648
|
+
"minLength": 1
|
|
649
|
+
},
|
|
650
|
+
"dataset_ids": {
|
|
651
|
+
"type": "array",
|
|
652
|
+
"minItems": 1,
|
|
653
|
+
"items": {
|
|
654
|
+
"type": "string",
|
|
655
|
+
"minLength": 1
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
"retrieval_mode": {
|
|
659
|
+
"const": "multiple"
|
|
660
|
+
},
|
|
661
|
+
"top_k": {
|
|
662
|
+
"type": "integer",
|
|
663
|
+
"minimum": 1,
|
|
664
|
+
"maximum": 10
|
|
665
|
+
},
|
|
666
|
+
"score_threshold": {
|
|
667
|
+
"type": [
|
|
668
|
+
"number",
|
|
669
|
+
"null"
|
|
670
|
+
],
|
|
671
|
+
"minimum": 0,
|
|
672
|
+
"maximum": 1
|
|
673
|
+
},
|
|
674
|
+
"reranking_enable": {
|
|
675
|
+
"type": "boolean"
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
"additionalProperties": false
|
|
679
|
+
},
|
|
680
|
+
"branchStep": {
|
|
681
|
+
"type": "object",
|
|
682
|
+
"required": [
|
|
683
|
+
"id",
|
|
684
|
+
"branch"
|
|
685
|
+
],
|
|
686
|
+
"properties": {
|
|
687
|
+
"id": {
|
|
688
|
+
"type": "string",
|
|
689
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
690
|
+
"maxLength": 50
|
|
691
|
+
},
|
|
692
|
+
"branch": {
|
|
693
|
+
"type": "object",
|
|
694
|
+
"required": [
|
|
695
|
+
"when",
|
|
696
|
+
"then",
|
|
697
|
+
"else"
|
|
698
|
+
],
|
|
699
|
+
"properties": {
|
|
700
|
+
"when": {
|
|
701
|
+
"type": "object",
|
|
702
|
+
"required": [
|
|
703
|
+
"left",
|
|
704
|
+
"op"
|
|
705
|
+
],
|
|
706
|
+
"properties": {
|
|
707
|
+
"left": {
|
|
708
|
+
"type": "string",
|
|
709
|
+
"minLength": 1
|
|
710
|
+
},
|
|
711
|
+
"op": {
|
|
712
|
+
"enum": [
|
|
713
|
+
"is",
|
|
714
|
+
"is not",
|
|
715
|
+
"contains",
|
|
716
|
+
"not contains",
|
|
717
|
+
"empty",
|
|
718
|
+
"not empty",
|
|
719
|
+
"=",
|
|
720
|
+
"≠",
|
|
721
|
+
">",
|
|
722
|
+
"<",
|
|
723
|
+
"≥",
|
|
724
|
+
"≤"
|
|
725
|
+
]
|
|
726
|
+
},
|
|
727
|
+
"right": {
|
|
728
|
+
"type": [
|
|
729
|
+
"string",
|
|
730
|
+
"number",
|
|
731
|
+
"boolean",
|
|
732
|
+
"null"
|
|
733
|
+
]
|
|
734
|
+
}
|
|
735
|
+
},
|
|
736
|
+
"additionalProperties": false
|
|
737
|
+
},
|
|
738
|
+
"then": {
|
|
739
|
+
"type": "array",
|
|
740
|
+
"minItems": 1,
|
|
741
|
+
"items": {
|
|
742
|
+
"oneOf": [
|
|
743
|
+
{
|
|
744
|
+
"$ref": "#/$defs/httpNode"
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
"$ref": "#/$defs/codeNode"
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
"$ref": "#/$defs/knowledgeRetrievalNode"
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
"$ref": "#/$defs/llmNode"
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
"$ref": "#/$defs/templateTransformNode"
|
|
757
|
+
}
|
|
758
|
+
]
|
|
759
|
+
}
|
|
760
|
+
},
|
|
761
|
+
"else": {
|
|
762
|
+
"type": "array",
|
|
763
|
+
"minItems": 1,
|
|
764
|
+
"items": {
|
|
765
|
+
"oneOf": [
|
|
766
|
+
{
|
|
767
|
+
"$ref": "#/$defs/httpNode"
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
"$ref": "#/$defs/codeNode"
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
"$ref": "#/$defs/knowledgeRetrievalNode"
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
"$ref": "#/$defs/llmNode"
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
"$ref": "#/$defs/templateTransformNode"
|
|
780
|
+
}
|
|
781
|
+
]
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
"additionalProperties": false
|
|
786
|
+
}
|
|
787
|
+
},
|
|
788
|
+
"additionalProperties": false
|
|
789
|
+
},
|
|
790
|
+
"parallelStep": {
|
|
791
|
+
"type": "object",
|
|
792
|
+
"required": [
|
|
793
|
+
"id",
|
|
794
|
+
"parallel"
|
|
795
|
+
],
|
|
796
|
+
"properties": {
|
|
797
|
+
"id": {
|
|
798
|
+
"type": "string",
|
|
799
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
800
|
+
"maxLength": 50
|
|
801
|
+
},
|
|
802
|
+
"parallel": {
|
|
803
|
+
"type": "object",
|
|
804
|
+
"required": [
|
|
805
|
+
"branches"
|
|
806
|
+
],
|
|
807
|
+
"properties": {
|
|
808
|
+
"branches": {
|
|
809
|
+
"type": "array",
|
|
810
|
+
"minItems": 2,
|
|
811
|
+
"items": {
|
|
812
|
+
"type": "array",
|
|
813
|
+
"minItems": 1,
|
|
814
|
+
"items": {
|
|
815
|
+
"oneOf": [
|
|
816
|
+
{
|
|
817
|
+
"$ref": "#/$defs/httpNode"
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
"$ref": "#/$defs/codeNode"
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
"$ref": "#/$defs/knowledgeRetrievalNode"
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
"$ref": "#/$defs/llmNode"
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
"$ref": "#/$defs/templateTransformNode"
|
|
830
|
+
}
|
|
831
|
+
]
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
},
|
|
835
|
+
"join": {
|
|
836
|
+
"type": "string",
|
|
837
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
838
|
+
"maxLength": 50
|
|
839
|
+
}
|
|
840
|
+
},
|
|
841
|
+
"additionalProperties": false
|
|
842
|
+
}
|
|
843
|
+
},
|
|
844
|
+
"additionalProperties": false
|
|
845
|
+
},
|
|
846
|
+
"iterateStep": {
|
|
847
|
+
"type": "object",
|
|
848
|
+
"required": [
|
|
849
|
+
"id",
|
|
850
|
+
"iterate"
|
|
851
|
+
],
|
|
852
|
+
"properties": {
|
|
853
|
+
"id": {
|
|
854
|
+
"type": "string",
|
|
855
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
856
|
+
"maxLength": 50
|
|
857
|
+
},
|
|
858
|
+
"iterate": {
|
|
859
|
+
"type": "object",
|
|
860
|
+
"required": [
|
|
861
|
+
"over",
|
|
862
|
+
"output",
|
|
863
|
+
"steps"
|
|
864
|
+
],
|
|
865
|
+
"properties": {
|
|
866
|
+
"over": {
|
|
867
|
+
"type": "string",
|
|
868
|
+
"minLength": 1,
|
|
869
|
+
"description": "迭代数组来源,必须是单个模板引用,例如 {{ prep.chunks }}"
|
|
870
|
+
},
|
|
871
|
+
"output": {
|
|
872
|
+
"type": "string",
|
|
873
|
+
"minLength": 1,
|
|
874
|
+
"description": "每轮收集的输出,必须是 iterate.steps 内节点的单个模板引用"
|
|
875
|
+
},
|
|
876
|
+
"steps": {
|
|
877
|
+
"type": "array",
|
|
878
|
+
"minItems": 1,
|
|
879
|
+
"items": {
|
|
880
|
+
"oneOf": [
|
|
881
|
+
{
|
|
882
|
+
"$ref": "#/$defs/httpNode"
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
"$ref": "#/$defs/codeNode"
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
"$ref": "#/$defs/knowledgeRetrievalNode"
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
"$ref": "#/$defs/llmNode"
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
"$ref": "#/$defs/templateTransformNode"
|
|
895
|
+
}
|
|
896
|
+
]
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
},
|
|
900
|
+
"additionalProperties": false
|
|
901
|
+
}
|
|
902
|
+
},
|
|
903
|
+
"additionalProperties": false
|
|
904
|
+
},
|
|
905
|
+
"step": {
|
|
906
|
+
"oneOf": [
|
|
907
|
+
{
|
|
908
|
+
"$ref": "#/$defs/httpNode"
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
"$ref": "#/$defs/codeNode"
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
"$ref": "#/$defs/knowledgeRetrievalNode"
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
"$ref": "#/$defs/branchStep"
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
"$ref": "#/$defs/parallelStep"
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
"$ref": "#/$defs/iterateStep"
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
"$ref": "#/$defs/llmNode"
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
"$ref": "#/$defs/templateTransformNode"
|
|
930
|
+
}
|
|
931
|
+
]
|
|
932
|
+
},
|
|
933
|
+
"llmNode": {
|
|
934
|
+
"type": "object",
|
|
935
|
+
"required": [
|
|
936
|
+
"id",
|
|
937
|
+
"type",
|
|
938
|
+
"provider",
|
|
939
|
+
"model"
|
|
940
|
+
],
|
|
941
|
+
"properties": {
|
|
942
|
+
"id": {
|
|
943
|
+
"type": "string",
|
|
944
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
945
|
+
"maxLength": 50
|
|
946
|
+
},
|
|
947
|
+
"type": {
|
|
948
|
+
"const": "llm"
|
|
949
|
+
},
|
|
950
|
+
"provider": {
|
|
951
|
+
"type": "string",
|
|
952
|
+
"minLength": 1,
|
|
953
|
+
"maxLength": 200
|
|
954
|
+
},
|
|
955
|
+
"model": {
|
|
956
|
+
"type": "string",
|
|
957
|
+
"minLength": 1,
|
|
958
|
+
"maxLength": 200
|
|
959
|
+
},
|
|
960
|
+
"mode": {
|
|
961
|
+
"enum": [
|
|
962
|
+
"chat",
|
|
963
|
+
"completion"
|
|
964
|
+
]
|
|
965
|
+
},
|
|
966
|
+
"completion_params": {
|
|
967
|
+
"type": "object",
|
|
968
|
+
"additionalProperties": true
|
|
969
|
+
},
|
|
970
|
+
"prompt": {
|
|
971
|
+
"type": "string",
|
|
972
|
+
"minLength": 1
|
|
973
|
+
},
|
|
974
|
+
"prompt_template": {
|
|
975
|
+
"type": "array",
|
|
976
|
+
"minItems": 1,
|
|
977
|
+
"items": {
|
|
978
|
+
"type": "object",
|
|
979
|
+
"required": [
|
|
980
|
+
"role",
|
|
981
|
+
"text"
|
|
982
|
+
],
|
|
983
|
+
"properties": {
|
|
984
|
+
"role": {
|
|
985
|
+
"enum": [
|
|
986
|
+
"system",
|
|
987
|
+
"user",
|
|
988
|
+
"assistant"
|
|
989
|
+
]
|
|
990
|
+
},
|
|
991
|
+
"text": {
|
|
992
|
+
"type": "string",
|
|
993
|
+
"minLength": 1
|
|
994
|
+
}
|
|
995
|
+
},
|
|
996
|
+
"additionalProperties": false
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
},
|
|
1000
|
+
"additionalProperties": false,
|
|
1001
|
+
"anyOf": [
|
|
1002
|
+
{
|
|
1003
|
+
"required": [
|
|
1004
|
+
"prompt"
|
|
1005
|
+
]
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
"required": [
|
|
1009
|
+
"prompt_template"
|
|
1010
|
+
]
|
|
1011
|
+
}
|
|
1012
|
+
]
|
|
1013
|
+
},
|
|
1014
|
+
"templateTransformNode": {
|
|
1015
|
+
"type": "object",
|
|
1016
|
+
"required": [
|
|
1017
|
+
"id",
|
|
1018
|
+
"type",
|
|
1019
|
+
"template",
|
|
1020
|
+
"variables"
|
|
1021
|
+
],
|
|
1022
|
+
"properties": {
|
|
1023
|
+
"id": {
|
|
1024
|
+
"type": "string",
|
|
1025
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
1026
|
+
"maxLength": 50
|
|
1027
|
+
},
|
|
1028
|
+
"type": {
|
|
1029
|
+
"const": "template-transform"
|
|
1030
|
+
},
|
|
1031
|
+
"template": {
|
|
1032
|
+
"type": "string",
|
|
1033
|
+
"minLength": 1
|
|
1034
|
+
},
|
|
1035
|
+
"variables": {
|
|
1036
|
+
"type": "object",
|
|
1037
|
+
"minProperties": 1,
|
|
1038
|
+
"propertyNames": {
|
|
1039
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
|
|
1040
|
+
"maxLength": 30
|
|
1041
|
+
},
|
|
1042
|
+
"additionalProperties": {
|
|
1043
|
+
"type": "string",
|
|
1044
|
+
"minLength": 1
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
},
|
|
1048
|
+
"additionalProperties": false
|
|
1049
|
+
}
|
|
1050
|
+
},
|
|
1051
|
+
"additionalProperties": false
|
|
1052
|
+
}
|