@numa-tech/numa 1.20.3 → 1.20.5
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/README.md +24 -1
- package/dist/application-onboarding/schemas.d.ts +24 -0
- package/dist/application-onboarding/schemas.js +4 -0
- package/dist/application-onboarding/schemas.js.map +1 -1
- package/dist/application-onboarding/tui-model.d.ts +1 -0
- package/dist/application-onboarding/tui-model.js +10 -0
- package/dist/application-onboarding/tui-model.js.map +1 -1
- package/dist/application-onboarding/tui.js +1 -1
- package/dist/application-onboarding/tui.js.map +1 -1
- package/dist/authorization/application-client.d.ts +36 -1
- package/dist/authorization/application-client.js +4 -2
- package/dist/authorization/application-client.js.map +1 -1
- package/dist/authorization/application-commands.js +4 -3
- package/dist/authorization/application-commands.js.map +1 -1
- package/dist/authorization/application-schemas.d.ts +42 -7
- package/dist/authorization/application-schemas.js +19 -3
- package/dist/authorization/application-schemas.js.map +1 -1
- package/dist/business-issuer.js +8 -0
- package/dist/business-issuer.js.map +1 -1
- package/dist/cli.js +49 -31
- package/dist/cli.js.map +1 -1
- package/dist/command-catalog.js +18 -1
- package/dist/command-catalog.js.map +1 -1
- package/dist/kb/catalog.d.ts +2 -0
- package/dist/kb/catalog.js +14 -0
- package/dist/kb/catalog.js.map +1 -0
- package/dist/kb/client.d.ts +46 -0
- package/dist/kb/client.js +272 -0
- package/dist/kb/client.js.map +1 -0
- package/dist/kb/commands.d.ts +14 -0
- package/dist/kb/commands.js +121 -0
- package/dist/kb/commands.js.map +1 -0
- package/dist/kb/config.d.ts +15 -0
- package/dist/kb/config.js +76 -0
- package/dist/kb/config.js.map +1 -0
- package/dist/kb/errors.d.ts +9 -0
- package/dist/kb/errors.js +31 -0
- package/dist/kb/errors.js.map +1 -0
- package/dist/kb/transfers.d.ts +67 -0
- package/dist/kb/transfers.js +257 -0
- package/dist/kb/transfers.js.map +1 -0
- package/dist/kb/types.d.ts +81 -0
- package/dist/kb/types.js +2 -0
- package/dist/kb/types.js.map +1 -0
- package/dist/kb/upload-state.d.ts +20 -0
- package/dist/kb/upload-state.js +135 -0
- package/dist/kb/upload-state.js.map +1 -0
- package/dist/login-recovery.js +15 -1
- package/dist/login-recovery.js.map +1 -1
- package/dist/maintenance/modules.js +1 -1
- package/dist/maintenance/modules.js.map +1 -1
- package/dist/mcp/catalog.js +9 -1
- package/dist/mcp/catalog.js.map +1 -1
- package/dist/oss/commands.js +20 -0
- package/dist/oss/commands.js.map +1 -1
- package/dist/oss/download-links.d.ts +28 -0
- package/dist/oss/download-links.js +124 -0
- package/dist/oss/download-links.js.map +1 -0
- package/dist/oss/errors.js +1 -1
- package/dist/oss/errors.js.map +1 -1
- package/dist/oss/schemas.d.ts +15 -0
- package/dist/oss/schemas.js +2 -0
- package/dist/oss/schemas.js.map +1 -1
- package/dist/oss/signed-url-transfers.d.ts +41 -0
- package/dist/oss/signed-url-transfers.js +207 -0
- package/dist/oss/signed-url-transfers.js.map +1 -0
- package/dist/oss/tools.js +18 -0
- package/dist/oss/tools.js.map +1 -1
- package/dist/oss/transfer-pool.d.ts +2 -0
- package/dist/oss/transfer-pool.js +27 -0
- package/dist/oss/transfer-pool.js.map +1 -0
- package/dist/oss/transfer-worker.js +8 -17
- package/dist/oss/transfer-worker.js.map +1 -1
- package/dist/oss/transfers.d.ts +2 -0
- package/dist/oss/transfers.js +27 -0
- package/dist/oss/transfers.js.map +1 -1
- package/dist/oss/web-page.js +60 -5
- package/dist/oss/web-page.js.map +1 -1
- package/dist/oss/web.js +26 -0
- package/dist/oss/web.js.map +1 -1
- package/dist/platform-profile.d.ts +1 -1
- package/dist/server.d.ts +2 -0
- package/dist/server.js +2 -0
- package/dist/server.js.map +1 -1
- package/dist/tasks/commands.d.ts +9 -0
- package/dist/tasks/commands.js +60 -0
- package/dist/tasks/commands.js.map +1 -0
- package/dist/tasks/oss-query.d.ts +56 -0
- package/dist/tasks/oss-query.js +176 -0
- package/dist/tasks/oss-query.js.map +1 -0
- package/dist/tasks/runtime.d.ts +151 -0
- package/dist/tasks/runtime.js +71 -0
- package/dist/tasks/runtime.js.map +1 -0
- package/dist/tasks/tools.d.ts +3 -0
- package/dist/tasks/tools.js +16 -0
- package/dist/tasks/tools.js.map +1 -0
- package/dist/tasks/types.d.ts +14 -0
- package/dist/tasks/types.js +4 -0
- package/dist/tasks/types.js.map +1 -0
- package/dist/tasks/wecom-notify.d.ts +26 -0
- package/dist/tasks/wecom-notify.js +150 -0
- package/dist/tasks/wecom-notify.js.map +1 -0
- package/docs/agent-tasks.md +103 -0
- package/docs/application-default-groups.md +10 -2
- package/docs/design/kb-cli.md +94 -0
- package/docs/kb-access.md +85 -0
- package/package.json +13 -7
- package/scripts/export-kb-contract.py +158 -0
- package/skills/numa-ai-registry/SKILL.md +2 -2
- package/skills/numa-cli/SKILL.md +24 -9
- package/skills/numa-cli/agents/openai.yaml +2 -2
- package/skills/numa-cli/evals/evals.json +13 -1
- package/skills/numa-cli/numa-skill.json +1 -1
- package/skills/numa-cli/references/cli-bootstrap.md +8 -8
- package/skills/numa-cli/references/cli-mcp.md +28 -20
- package/skills/numa-cli/references/pipeline-release.md +9 -9
- package/skills/numa-cli/references/skills-command-contract.md +40 -40
- package/skills/numa-cli/references/skills-updates.md +13 -13
- package/skills/numa-cli/references/skills-workflows.md +4 -4
- package/skills/numa-create-application/SKILL.md +1 -1
- package/skills/numa-create-application/numa-skill.json +2 -2
- package/skills/numa-create-application/references/cli-bootstrap.md +3 -3
- package/skills/numa-create-application/references/numa-cli.md +16 -16
- package/skills/numa-jenkins-deployment/SKILL.md +8 -8
- package/skills/numa-jenkins-deployment/numa-skill.json +2 -2
- package/skills/numa-jenkins-deployment/references/cli-bootstrap.md +3 -3
- package/skills/numa-jenkins-deployment/references/cli-contract.md +7 -7
- package/skills/numa-jenkins-deployment/references/diagnostics.md +2 -2
- package/skills/numa-local-flux-deploy/SKILL.md +1 -1
- package/skills/numa-local-flux-deploy/numa-skill.json +2 -2
- package/skills/numa-local-flux-deploy/references/cli-bootstrap.md +3 -3
- package/skills/numa-nacos/SKILL.md +4 -4
- package/skills/numa-nacos/numa-skill.json +2 -2
- package/skills/numa-nacos/references/cli-bootstrap.md +3 -3
- package/skills/numa-nacos/references/command-contract.md +17 -17
- package/skills/numa-notion/SKILL.md +4 -4
- package/skills/numa-notion/numa-skill.json +2 -2
- package/skills/numa-notion/references/agents-automation.md +2 -2
- package/skills/numa-notion/references/cli-bootstrap.md +3 -3
- package/skills/numa-notion/references/cli.md +17 -17
- package/skills/numa-oss-access/SKILL.md +35 -77
- package/skills/numa-oss-access/agents/openai.yaml +2 -2
- package/skills/numa-oss-access/evals/evals.json +48 -0
- package/skills/numa-oss-access/numa-skill.json +2 -2
- package/skills/numa-oss-access/references/cli-bootstrap.md +5 -5
- package/skills/numa-oss-access/references/download-links.md +42 -0
- package/skills/numa-oss-access/references/object-operations.md +95 -0
- package/skills/numa-oss-access/references/search-and-mcp.md +17 -11
- package/skills/numa-wecom/SKILL.md +27 -62
- package/skills/numa-wecom/agents/openai.yaml +2 -2
- package/skills/numa-wecom/evals/evals.json +25 -0
- package/skills/numa-wecom/numa-skill.json +2 -2
- package/skills/numa-wecom/references/cli-bootstrap.md +5 -5
- package/skills/numa-wecom/references/legacy-operations.md +71 -0
- package/skills/numa-wecom/references/machine-auth.md +7 -7
- package/skills/numa-wecom/references/mcp.md +9 -8
- package/src/kb/openapi-contract.json +1432 -0
|
@@ -0,0 +1,1432 @@
|
|
|
1
|
+
{
|
|
2
|
+
"components": {
|
|
3
|
+
"schemas": {
|
|
4
|
+
"ArchiveFile": {
|
|
5
|
+
"properties": {
|
|
6
|
+
"archive_category": {
|
|
7
|
+
"enum": [
|
|
8
|
+
"final",
|
|
9
|
+
"intermediate",
|
|
10
|
+
"task_memory"
|
|
11
|
+
],
|
|
12
|
+
"title": "Archive Category",
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"confirm_version_switch": {
|
|
16
|
+
"title": "Confirm Version Switch",
|
|
17
|
+
"type": "boolean"
|
|
18
|
+
},
|
|
19
|
+
"conflict_action": {
|
|
20
|
+
"enum": [
|
|
21
|
+
"reject",
|
|
22
|
+
"keep_both",
|
|
23
|
+
"new_version",
|
|
24
|
+
"skip"
|
|
25
|
+
],
|
|
26
|
+
"title": "Conflict Action",
|
|
27
|
+
"type": "string"
|
|
28
|
+
},
|
|
29
|
+
"content_base64": {
|
|
30
|
+
"title": "Content Base64",
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
"existing_document_id": {
|
|
34
|
+
"anyOf": [
|
|
35
|
+
{
|
|
36
|
+
"type": "string"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "null"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"title": "Existing Document Id"
|
|
43
|
+
},
|
|
44
|
+
"filename": {
|
|
45
|
+
"title": "Filename",
|
|
46
|
+
"type": "string"
|
|
47
|
+
},
|
|
48
|
+
"rename_to": {
|
|
49
|
+
"anyOf": [
|
|
50
|
+
{
|
|
51
|
+
"type": "string"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "null"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"title": "Rename To"
|
|
58
|
+
},
|
|
59
|
+
"task_id": {
|
|
60
|
+
"anyOf": [
|
|
61
|
+
{
|
|
62
|
+
"type": "string"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "null"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"title": "Task Id"
|
|
69
|
+
},
|
|
70
|
+
"title": {
|
|
71
|
+
"anyOf": [
|
|
72
|
+
{
|
|
73
|
+
"type": "string"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"type": "null"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"title": "Title"
|
|
80
|
+
},
|
|
81
|
+
"version_reason": {
|
|
82
|
+
"anyOf": [
|
|
83
|
+
{
|
|
84
|
+
"type": "string"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"type": "null"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"title": "Version Reason"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"required": [
|
|
94
|
+
"filename",
|
|
95
|
+
"content_base64"
|
|
96
|
+
],
|
|
97
|
+
"title": "ArchiveFile",
|
|
98
|
+
"type": "object"
|
|
99
|
+
},
|
|
100
|
+
"Body_begin_direct_upload": {
|
|
101
|
+
"properties": {
|
|
102
|
+
"collection_id": {
|
|
103
|
+
"default": "default",
|
|
104
|
+
"title": "Collection Id",
|
|
105
|
+
"type": "string"
|
|
106
|
+
},
|
|
107
|
+
"files": {
|
|
108
|
+
"items": {
|
|
109
|
+
"$ref": "#/components/schemas/UploadFileMetadata"
|
|
110
|
+
},
|
|
111
|
+
"title": "Files",
|
|
112
|
+
"type": "array"
|
|
113
|
+
},
|
|
114
|
+
"options": {
|
|
115
|
+
"anyOf": [
|
|
116
|
+
{
|
|
117
|
+
"additionalProperties": true,
|
|
118
|
+
"type": "object"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"type": "null"
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
"title": "Options"
|
|
125
|
+
},
|
|
126
|
+
"request_id": {
|
|
127
|
+
"title": "Request Id",
|
|
128
|
+
"type": "string"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"required": [
|
|
132
|
+
"files",
|
|
133
|
+
"request_id"
|
|
134
|
+
],
|
|
135
|
+
"title": "Body_begin_direct_upload",
|
|
136
|
+
"type": "object"
|
|
137
|
+
},
|
|
138
|
+
"Body_create_task_knowledge_base": {
|
|
139
|
+
"properties": {
|
|
140
|
+
"all_members_role": {
|
|
141
|
+
"anyOf": [
|
|
142
|
+
{
|
|
143
|
+
"enum": [
|
|
144
|
+
"viewer",
|
|
145
|
+
"contributor",
|
|
146
|
+
"manager"
|
|
147
|
+
],
|
|
148
|
+
"type": "string"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"type": "null"
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"title": "All Members Role"
|
|
155
|
+
},
|
|
156
|
+
"allow_contributor_uploads": {
|
|
157
|
+
"default": false,
|
|
158
|
+
"title": "Allow Contributor Uploads",
|
|
159
|
+
"type": "boolean"
|
|
160
|
+
},
|
|
161
|
+
"archive_date": {
|
|
162
|
+
"anyOf": [
|
|
163
|
+
{
|
|
164
|
+
"type": "string"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"type": "null"
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
"title": "Archive Date"
|
|
171
|
+
},
|
|
172
|
+
"collection_name": {
|
|
173
|
+
"anyOf": [
|
|
174
|
+
{
|
|
175
|
+
"type": "string"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"type": "null"
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"title": "Collection Name"
|
|
182
|
+
},
|
|
183
|
+
"description": {
|
|
184
|
+
"anyOf": [
|
|
185
|
+
{
|
|
186
|
+
"type": "string"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"type": "null"
|
|
190
|
+
}
|
|
191
|
+
],
|
|
192
|
+
"title": "Description"
|
|
193
|
+
},
|
|
194
|
+
"task_id": {
|
|
195
|
+
"anyOf": [
|
|
196
|
+
{
|
|
197
|
+
"type": "string"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"type": "null"
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
"title": "Task Id"
|
|
204
|
+
},
|
|
205
|
+
"task_name": {
|
|
206
|
+
"title": "Task Name",
|
|
207
|
+
"type": "string"
|
|
208
|
+
},
|
|
209
|
+
"visibility": {
|
|
210
|
+
"default": "private",
|
|
211
|
+
"enum": [
|
|
212
|
+
"private",
|
|
213
|
+
"shared"
|
|
214
|
+
],
|
|
215
|
+
"title": "Visibility",
|
|
216
|
+
"type": "string"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"required": [
|
|
220
|
+
"task_name"
|
|
221
|
+
],
|
|
222
|
+
"title": "Body_create_task_knowledge_base",
|
|
223
|
+
"type": "object"
|
|
224
|
+
},
|
|
225
|
+
"Body_search_knowledge_base": {
|
|
226
|
+
"properties": {
|
|
227
|
+
"agent_id": {
|
|
228
|
+
"anyOf": [
|
|
229
|
+
{
|
|
230
|
+
"type": "string"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"type": "null"
|
|
234
|
+
}
|
|
235
|
+
],
|
|
236
|
+
"title": "Agent Id"
|
|
237
|
+
},
|
|
238
|
+
"collection_id": {
|
|
239
|
+
"default": "default",
|
|
240
|
+
"title": "Collection Id",
|
|
241
|
+
"type": "string"
|
|
242
|
+
},
|
|
243
|
+
"collection_ids": {
|
|
244
|
+
"anyOf": [
|
|
245
|
+
{
|
|
246
|
+
"items": {
|
|
247
|
+
"type": "string"
|
|
248
|
+
},
|
|
249
|
+
"type": "array"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"type": "null"
|
|
253
|
+
}
|
|
254
|
+
],
|
|
255
|
+
"title": "Collection Ids"
|
|
256
|
+
},
|
|
257
|
+
"department": {
|
|
258
|
+
"anyOf": [
|
|
259
|
+
{
|
|
260
|
+
"type": "string"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"type": "null"
|
|
264
|
+
}
|
|
265
|
+
],
|
|
266
|
+
"title": "Department"
|
|
267
|
+
},
|
|
268
|
+
"document_ids": {
|
|
269
|
+
"anyOf": [
|
|
270
|
+
{
|
|
271
|
+
"items": {
|
|
272
|
+
"type": "string"
|
|
273
|
+
},
|
|
274
|
+
"type": "array"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"type": "null"
|
|
278
|
+
}
|
|
279
|
+
],
|
|
280
|
+
"title": "Document Ids"
|
|
281
|
+
},
|
|
282
|
+
"employee_id": {
|
|
283
|
+
"anyOf": [
|
|
284
|
+
{
|
|
285
|
+
"type": "string"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"type": "null"
|
|
289
|
+
}
|
|
290
|
+
],
|
|
291
|
+
"title": "Employee Id"
|
|
292
|
+
},
|
|
293
|
+
"min_score": {
|
|
294
|
+
"default": 0.0,
|
|
295
|
+
"maximum": 1.0,
|
|
296
|
+
"minimum": 0.0,
|
|
297
|
+
"title": "Min Score",
|
|
298
|
+
"type": "number"
|
|
299
|
+
},
|
|
300
|
+
"product": {
|
|
301
|
+
"anyOf": [
|
|
302
|
+
{
|
|
303
|
+
"type": "string"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"type": "null"
|
|
307
|
+
}
|
|
308
|
+
],
|
|
309
|
+
"title": "Product"
|
|
310
|
+
},
|
|
311
|
+
"query": {
|
|
312
|
+
"title": "Query",
|
|
313
|
+
"type": "string"
|
|
314
|
+
},
|
|
315
|
+
"region": {
|
|
316
|
+
"anyOf": [
|
|
317
|
+
{
|
|
318
|
+
"type": "string"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"type": "null"
|
|
322
|
+
}
|
|
323
|
+
],
|
|
324
|
+
"title": "Region"
|
|
325
|
+
},
|
|
326
|
+
"role": {
|
|
327
|
+
"anyOf": [
|
|
328
|
+
{
|
|
329
|
+
"type": "string"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"type": "null"
|
|
333
|
+
}
|
|
334
|
+
],
|
|
335
|
+
"title": "Role"
|
|
336
|
+
},
|
|
337
|
+
"top_k": {
|
|
338
|
+
"default": 5,
|
|
339
|
+
"maximum": 10.0,
|
|
340
|
+
"minimum": 1.0,
|
|
341
|
+
"title": "Top K",
|
|
342
|
+
"type": "integer"
|
|
343
|
+
},
|
|
344
|
+
"user_id": {
|
|
345
|
+
"anyOf": [
|
|
346
|
+
{
|
|
347
|
+
"type": "string"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"type": "null"
|
|
351
|
+
}
|
|
352
|
+
],
|
|
353
|
+
"title": "User Id"
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
"required": [
|
|
357
|
+
"query"
|
|
358
|
+
],
|
|
359
|
+
"title": "Body_search_knowledge_base",
|
|
360
|
+
"type": "object"
|
|
361
|
+
},
|
|
362
|
+
"Body_start_async_archive": {
|
|
363
|
+
"properties": {
|
|
364
|
+
"collection_id": {
|
|
365
|
+
"default": "default",
|
|
366
|
+
"title": "Collection Id",
|
|
367
|
+
"type": "string"
|
|
368
|
+
},
|
|
369
|
+
"files": {
|
|
370
|
+
"items": {
|
|
371
|
+
"$ref": "#/components/schemas/ArchiveFile"
|
|
372
|
+
},
|
|
373
|
+
"title": "Files",
|
|
374
|
+
"type": "array"
|
|
375
|
+
},
|
|
376
|
+
"request_id": {
|
|
377
|
+
"title": "Request Id",
|
|
378
|
+
"type": "string"
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
"required": [
|
|
382
|
+
"files",
|
|
383
|
+
"request_id"
|
|
384
|
+
],
|
|
385
|
+
"title": "Body_start_async_archive",
|
|
386
|
+
"type": "object"
|
|
387
|
+
},
|
|
388
|
+
"Body_upload_external_documents_api_v1_external_documents_batch_upload_post": {
|
|
389
|
+
"properties": {
|
|
390
|
+
"collection_id": {
|
|
391
|
+
"default": "default",
|
|
392
|
+
"title": "Collection Id",
|
|
393
|
+
"type": "string"
|
|
394
|
+
},
|
|
395
|
+
"conflict_policy": {
|
|
396
|
+
"default": "detect",
|
|
397
|
+
"enum": [
|
|
398
|
+
"detect",
|
|
399
|
+
"reject",
|
|
400
|
+
"force_upload"
|
|
401
|
+
],
|
|
402
|
+
"title": "Conflict Policy",
|
|
403
|
+
"type": "string"
|
|
404
|
+
},
|
|
405
|
+
"duplicate_resolutions_json": {
|
|
406
|
+
"anyOf": [
|
|
407
|
+
{
|
|
408
|
+
"type": "string"
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"type": "null"
|
|
412
|
+
}
|
|
413
|
+
],
|
|
414
|
+
"title": "Duplicate Resolutions Json"
|
|
415
|
+
},
|
|
416
|
+
"files": {
|
|
417
|
+
"items": {
|
|
418
|
+
"contentMediaType": "application/octet-stream",
|
|
419
|
+
"type": "string"
|
|
420
|
+
},
|
|
421
|
+
"title": "Files",
|
|
422
|
+
"type": "array"
|
|
423
|
+
},
|
|
424
|
+
"relative_paths_json": {
|
|
425
|
+
"anyOf": [
|
|
426
|
+
{
|
|
427
|
+
"type": "string"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"type": "null"
|
|
431
|
+
}
|
|
432
|
+
],
|
|
433
|
+
"title": "Relative Paths Json"
|
|
434
|
+
},
|
|
435
|
+
"request_id": {
|
|
436
|
+
"title": "Request Id",
|
|
437
|
+
"type": "string"
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
"required": [
|
|
441
|
+
"files",
|
|
442
|
+
"request_id"
|
|
443
|
+
],
|
|
444
|
+
"title": "Body_upload_external_documents_api_v1_external_documents_batch_upload_post",
|
|
445
|
+
"type": "object"
|
|
446
|
+
},
|
|
447
|
+
"ExternalBatchResolutionBody": {
|
|
448
|
+
"properties": {
|
|
449
|
+
"resolutions": {
|
|
450
|
+
"items": {
|
|
451
|
+
"$ref": "#/components/schemas/ExternalFileResolution"
|
|
452
|
+
},
|
|
453
|
+
"title": "Resolutions",
|
|
454
|
+
"type": "array"
|
|
455
|
+
}
|
|
456
|
+
},
|
|
457
|
+
"required": [
|
|
458
|
+
"resolutions"
|
|
459
|
+
],
|
|
460
|
+
"title": "ExternalBatchResolutionBody",
|
|
461
|
+
"type": "object"
|
|
462
|
+
},
|
|
463
|
+
"ExternalFileResolution": {
|
|
464
|
+
"properties": {
|
|
465
|
+
"action": {
|
|
466
|
+
"enum": [
|
|
467
|
+
"upload",
|
|
468
|
+
"new_version",
|
|
469
|
+
"skip"
|
|
470
|
+
],
|
|
471
|
+
"title": "Action",
|
|
472
|
+
"type": "string"
|
|
473
|
+
},
|
|
474
|
+
"confirmation": {
|
|
475
|
+
"anyOf": [
|
|
476
|
+
{
|
|
477
|
+
"type": "string"
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
"type": "null"
|
|
481
|
+
}
|
|
482
|
+
],
|
|
483
|
+
"title": "Confirmation"
|
|
484
|
+
},
|
|
485
|
+
"existing_document_id": {
|
|
486
|
+
"anyOf": [
|
|
487
|
+
{
|
|
488
|
+
"type": "string"
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
"type": "null"
|
|
492
|
+
}
|
|
493
|
+
],
|
|
494
|
+
"title": "Existing Document Id"
|
|
495
|
+
},
|
|
496
|
+
"file_id": {
|
|
497
|
+
"title": "File Id",
|
|
498
|
+
"type": "string"
|
|
499
|
+
},
|
|
500
|
+
"reason": {
|
|
501
|
+
"anyOf": [
|
|
502
|
+
{
|
|
503
|
+
"type": "string"
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
"type": "null"
|
|
507
|
+
}
|
|
508
|
+
],
|
|
509
|
+
"title": "Reason"
|
|
510
|
+
}
|
|
511
|
+
},
|
|
512
|
+
"required": [
|
|
513
|
+
"file_id",
|
|
514
|
+
"action"
|
|
515
|
+
],
|
|
516
|
+
"title": "ExternalFileResolution",
|
|
517
|
+
"type": "object"
|
|
518
|
+
},
|
|
519
|
+
"HTTPValidationError": {
|
|
520
|
+
"properties": {
|
|
521
|
+
"detail": {
|
|
522
|
+
"items": {
|
|
523
|
+
"$ref": "#/components/schemas/ValidationError"
|
|
524
|
+
},
|
|
525
|
+
"title": "Detail",
|
|
526
|
+
"type": "array"
|
|
527
|
+
}
|
|
528
|
+
},
|
|
529
|
+
"title": "HTTPValidationError",
|
|
530
|
+
"type": "object"
|
|
531
|
+
},
|
|
532
|
+
"UploadFileMetadata": {
|
|
533
|
+
"additionalProperties": false,
|
|
534
|
+
"properties": {
|
|
535
|
+
"content_md5": {
|
|
536
|
+
"title": "Content Md5",
|
|
537
|
+
"type": "string"
|
|
538
|
+
},
|
|
539
|
+
"content_type": {
|
|
540
|
+
"default": "application/octet-stream",
|
|
541
|
+
"maxLength": 200,
|
|
542
|
+
"title": "Content Type",
|
|
543
|
+
"type": "string"
|
|
544
|
+
},
|
|
545
|
+
"duplicate_action": {
|
|
546
|
+
"default": "",
|
|
547
|
+
"enum": [
|
|
548
|
+
"",
|
|
549
|
+
"upload",
|
|
550
|
+
"new_version"
|
|
551
|
+
],
|
|
552
|
+
"title": "Duplicate Action",
|
|
553
|
+
"type": "string"
|
|
554
|
+
},
|
|
555
|
+
"existing_document_id": {
|
|
556
|
+
"anyOf": [
|
|
557
|
+
{
|
|
558
|
+
"type": "string"
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
"type": "null"
|
|
562
|
+
}
|
|
563
|
+
],
|
|
564
|
+
"title": "Existing Document Id"
|
|
565
|
+
},
|
|
566
|
+
"filename": {
|
|
567
|
+
"maxLength": 255,
|
|
568
|
+
"minLength": 1,
|
|
569
|
+
"title": "Filename",
|
|
570
|
+
"type": "string"
|
|
571
|
+
},
|
|
572
|
+
"sha256": {
|
|
573
|
+
"pattern": "^[0-9a-f]{64}$",
|
|
574
|
+
"title": "Sha256",
|
|
575
|
+
"type": "string"
|
|
576
|
+
},
|
|
577
|
+
"size_bytes": {
|
|
578
|
+
"exclusiveMinimum": 0.0,
|
|
579
|
+
"maximum": 104857600.0,
|
|
580
|
+
"title": "Size Bytes",
|
|
581
|
+
"type": "integer"
|
|
582
|
+
},
|
|
583
|
+
"version_confirmation": {
|
|
584
|
+
"anyOf": [
|
|
585
|
+
{
|
|
586
|
+
"const": "SWITCH_CURRENT_VERSION",
|
|
587
|
+
"type": "string"
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
"type": "null"
|
|
591
|
+
}
|
|
592
|
+
],
|
|
593
|
+
"title": "Version Confirmation"
|
|
594
|
+
},
|
|
595
|
+
"version_reason": {
|
|
596
|
+
"anyOf": [
|
|
597
|
+
{
|
|
598
|
+
"type": "string"
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"type": "null"
|
|
602
|
+
}
|
|
603
|
+
],
|
|
604
|
+
"title": "Version Reason"
|
|
605
|
+
}
|
|
606
|
+
},
|
|
607
|
+
"required": [
|
|
608
|
+
"filename",
|
|
609
|
+
"size_bytes",
|
|
610
|
+
"sha256",
|
|
611
|
+
"content_md5"
|
|
612
|
+
],
|
|
613
|
+
"title": "UploadFileMetadata",
|
|
614
|
+
"type": "object"
|
|
615
|
+
},
|
|
616
|
+
"ValidationError": {
|
|
617
|
+
"properties": {
|
|
618
|
+
"ctx": {
|
|
619
|
+
"title": "Context",
|
|
620
|
+
"type": "object"
|
|
621
|
+
},
|
|
622
|
+
"input": {
|
|
623
|
+
"title": "Input"
|
|
624
|
+
},
|
|
625
|
+
"loc": {
|
|
626
|
+
"items": {
|
|
627
|
+
"anyOf": [
|
|
628
|
+
{
|
|
629
|
+
"type": "string"
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
"type": "integer"
|
|
633
|
+
}
|
|
634
|
+
]
|
|
635
|
+
},
|
|
636
|
+
"title": "Location",
|
|
637
|
+
"type": "array"
|
|
638
|
+
},
|
|
639
|
+
"msg": {
|
|
640
|
+
"title": "Message",
|
|
641
|
+
"type": "string"
|
|
642
|
+
},
|
|
643
|
+
"type": {
|
|
644
|
+
"title": "Error Type",
|
|
645
|
+
"type": "string"
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
"required": [
|
|
649
|
+
"loc",
|
|
650
|
+
"msg",
|
|
651
|
+
"type"
|
|
652
|
+
],
|
|
653
|
+
"title": "ValidationError",
|
|
654
|
+
"type": "object"
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
"info": {
|
|
659
|
+
"title": "Knowledge Base Agent API",
|
|
660
|
+
"version": "0.1.0"
|
|
661
|
+
},
|
|
662
|
+
"openapi": "3.1.0",
|
|
663
|
+
"paths": {
|
|
664
|
+
"/api/v1/external/agent/archives": {
|
|
665
|
+
"post": {
|
|
666
|
+
"description": "持久化提交异步归档任务,适用于大文件或较多文件。request_id 用于幂等。",
|
|
667
|
+
"operationId": "start_async_archive",
|
|
668
|
+
"requestBody": {
|
|
669
|
+
"content": {
|
|
670
|
+
"application/json": {
|
|
671
|
+
"schema": {
|
|
672
|
+
"$ref": "#/components/schemas/Body_start_async_archive"
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
},
|
|
676
|
+
"required": true
|
|
677
|
+
},
|
|
678
|
+
"responses": {
|
|
679
|
+
"200": {
|
|
680
|
+
"content": {
|
|
681
|
+
"application/json": {
|
|
682
|
+
"schema": {
|
|
683
|
+
"additionalProperties": true,
|
|
684
|
+
"title": "Response Start Async Archive",
|
|
685
|
+
"type": "object"
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
},
|
|
689
|
+
"description": "Successful Response"
|
|
690
|
+
},
|
|
691
|
+
"422": {
|
|
692
|
+
"content": {
|
|
693
|
+
"application/json": {
|
|
694
|
+
"schema": {
|
|
695
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
},
|
|
699
|
+
"description": "Validation Error"
|
|
700
|
+
}
|
|
701
|
+
},
|
|
702
|
+
"summary": "Start Async Archive",
|
|
703
|
+
"tags": [
|
|
704
|
+
"agent-tools"
|
|
705
|
+
],
|
|
706
|
+
"x-mcp-annotations": {
|
|
707
|
+
"destructiveHint": true,
|
|
708
|
+
"idempotentHint": true,
|
|
709
|
+
"openWorldHint": true,
|
|
710
|
+
"readOnlyHint": false
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
},
|
|
714
|
+
"/api/v1/external/agent/archives/{archive_id}": {
|
|
715
|
+
"get": {
|
|
716
|
+
"description": "查询异步归档进度及完整归档回执。",
|
|
717
|
+
"operationId": "get_archive_status",
|
|
718
|
+
"parameters": [
|
|
719
|
+
{
|
|
720
|
+
"in": "path",
|
|
721
|
+
"name": "archive_id",
|
|
722
|
+
"required": true,
|
|
723
|
+
"schema": {
|
|
724
|
+
"title": "Archive Id",
|
|
725
|
+
"type": "string"
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
],
|
|
729
|
+
"responses": {
|
|
730
|
+
"200": {
|
|
731
|
+
"content": {
|
|
732
|
+
"application/json": {
|
|
733
|
+
"schema": {
|
|
734
|
+
"additionalProperties": true,
|
|
735
|
+
"title": "Response Get Archive Status",
|
|
736
|
+
"type": "object"
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
},
|
|
740
|
+
"description": "Successful Response"
|
|
741
|
+
},
|
|
742
|
+
"422": {
|
|
743
|
+
"content": {
|
|
744
|
+
"application/json": {
|
|
745
|
+
"schema": {
|
|
746
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
},
|
|
750
|
+
"description": "Validation Error"
|
|
751
|
+
}
|
|
752
|
+
},
|
|
753
|
+
"summary": "Get Archive Status",
|
|
754
|
+
"tags": [
|
|
755
|
+
"agent-tools"
|
|
756
|
+
],
|
|
757
|
+
"x-mcp-annotations": {
|
|
758
|
+
"destructiveHint": false,
|
|
759
|
+
"idempotentHint": true,
|
|
760
|
+
"openWorldHint": true,
|
|
761
|
+
"readOnlyHint": true
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
},
|
|
765
|
+
"/api/v1/external/agent/archives/{archive_id}/retry": {
|
|
766
|
+
"post": {
|
|
767
|
+
"description": "重试异步归档任务中保留了源文件的失败项。",
|
|
768
|
+
"operationId": "retry_archive",
|
|
769
|
+
"parameters": [
|
|
770
|
+
{
|
|
771
|
+
"in": "path",
|
|
772
|
+
"name": "archive_id",
|
|
773
|
+
"required": true,
|
|
774
|
+
"schema": {
|
|
775
|
+
"title": "Archive Id",
|
|
776
|
+
"type": "string"
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
],
|
|
780
|
+
"responses": {
|
|
781
|
+
"200": {
|
|
782
|
+
"content": {
|
|
783
|
+
"application/json": {
|
|
784
|
+
"schema": {
|
|
785
|
+
"additionalProperties": true,
|
|
786
|
+
"title": "Response Retry Archive",
|
|
787
|
+
"type": "object"
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
},
|
|
791
|
+
"description": "Successful Response"
|
|
792
|
+
},
|
|
793
|
+
"422": {
|
|
794
|
+
"content": {
|
|
795
|
+
"application/json": {
|
|
796
|
+
"schema": {
|
|
797
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
},
|
|
801
|
+
"description": "Validation Error"
|
|
802
|
+
}
|
|
803
|
+
},
|
|
804
|
+
"summary": "Retry Archive",
|
|
805
|
+
"tags": [
|
|
806
|
+
"agent-tools"
|
|
807
|
+
],
|
|
808
|
+
"x-mcp-annotations": {
|
|
809
|
+
"destructiveHint": true,
|
|
810
|
+
"idempotentHint": false,
|
|
811
|
+
"openWorldHint": true,
|
|
812
|
+
"readOnlyHint": false
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
},
|
|
816
|
+
"/api/v1/external/agent/collections": {
|
|
817
|
+
"get": {
|
|
818
|
+
"description": "列出当前平台可用的知识库。\n\n返回知识库列表,包含 collection_id、名称、描述、文档数量等信息。\n建议在首次检索前先调用此工具,了解有哪些知识库可用。\n权限按知识库所有者、指定成员和“全体成员”授权实时计算。\n\nReturns:\n JSON 对象,包含 collections 列表和 total 总数",
|
|
819
|
+
"operationId": "list_knowledge_bases",
|
|
820
|
+
"responses": {
|
|
821
|
+
"200": {
|
|
822
|
+
"content": {
|
|
823
|
+
"application/json": {
|
|
824
|
+
"schema": {
|
|
825
|
+
"additionalProperties": true,
|
|
826
|
+
"title": "Response List Knowledge Bases",
|
|
827
|
+
"type": "object"
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
},
|
|
831
|
+
"description": "Successful Response"
|
|
832
|
+
}
|
|
833
|
+
},
|
|
834
|
+
"summary": "List Knowledge Bases",
|
|
835
|
+
"tags": [
|
|
836
|
+
"agent-tools"
|
|
837
|
+
],
|
|
838
|
+
"x-mcp-annotations": {
|
|
839
|
+
"destructiveHint": false,
|
|
840
|
+
"idempotentHint": true,
|
|
841
|
+
"openWorldHint": true,
|
|
842
|
+
"readOnlyHint": true
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
},
|
|
846
|
+
"/api/v1/external/agent/documents/{document_id}/download-ticket": {
|
|
847
|
+
"get": {
|
|
848
|
+
"description": "获取当前有权读取原件的短期下载链接。直连 OSS 时不要附加 KB 登录头。\n\nURL 是短期能力凭证,不应写入日志或长期保存;过期后重新调用本工具。",
|
|
849
|
+
"operationId": "get_document_download",
|
|
850
|
+
"parameters": [
|
|
851
|
+
{
|
|
852
|
+
"in": "path",
|
|
853
|
+
"name": "document_id",
|
|
854
|
+
"required": true,
|
|
855
|
+
"schema": {
|
|
856
|
+
"title": "Document Id",
|
|
857
|
+
"type": "string"
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
],
|
|
861
|
+
"responses": {
|
|
862
|
+
"200": {
|
|
863
|
+
"content": {
|
|
864
|
+
"application/json": {
|
|
865
|
+
"schema": {
|
|
866
|
+
"additionalProperties": true,
|
|
867
|
+
"title": "Response Get Document Download",
|
|
868
|
+
"type": "object"
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
},
|
|
872
|
+
"description": "Successful Response"
|
|
873
|
+
},
|
|
874
|
+
"422": {
|
|
875
|
+
"content": {
|
|
876
|
+
"application/json": {
|
|
877
|
+
"schema": {
|
|
878
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
},
|
|
882
|
+
"description": "Validation Error"
|
|
883
|
+
}
|
|
884
|
+
},
|
|
885
|
+
"summary": "Get Document Download",
|
|
886
|
+
"tags": [
|
|
887
|
+
"agent-tools"
|
|
888
|
+
],
|
|
889
|
+
"x-mcp-annotations": {
|
|
890
|
+
"destructiveHint": false,
|
|
891
|
+
"idempotentHint": true,
|
|
892
|
+
"openWorldHint": true,
|
|
893
|
+
"readOnlyHint": true
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
},
|
|
897
|
+
"/api/v1/external/agent/search": {
|
|
898
|
+
"post": {
|
|
899
|
+
"description": "在企业知识库中检索文档片段。\n\n返回压缩后的 snippets / context / sources,可直接作为 LLM 上下文。\n普通问题优先使用 effective_date 最新、status=active 的片段;\n历史/旧版问题会自动包含 superseded 文档。\n\nArgs:\n query: 检索关键词或自然语言问题(必填)\n collection_id: 知识库 ID,默认 default\n collection_ids: 多知识库检索列表(优先级高于 collection_id)\n document_ids: 限定检索的文档 ID 列表\n top_k: 返回片段数量,默认 5,最大 10\n min_score: 最低相似度阈值 0-1,默认 0\n role: 业务检索提示,不参与权限判断\n employee_id: 业务检索提示,不参与权限判断\n user_id: 业务检索提示,不参与权限判断\n agent_id: 调用 Agent 标识,不参与权限判断\n region: 业务范围 - 地区\n product: 业务范围 - 产品\n department: 业务范围 - 部门\n\nReturns:\n JSON 对象,包含 query / snippets / context / sources / total / retrieval_mode;\n sources 中包含可直接打开的短时 download_url",
|
|
900
|
+
"operationId": "search_knowledge_base",
|
|
901
|
+
"requestBody": {
|
|
902
|
+
"content": {
|
|
903
|
+
"application/json": {
|
|
904
|
+
"schema": {
|
|
905
|
+
"$ref": "#/components/schemas/Body_search_knowledge_base"
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
},
|
|
909
|
+
"required": true
|
|
910
|
+
},
|
|
911
|
+
"responses": {
|
|
912
|
+
"200": {
|
|
913
|
+
"content": {
|
|
914
|
+
"application/json": {
|
|
915
|
+
"schema": {
|
|
916
|
+
"additionalProperties": true,
|
|
917
|
+
"title": "Response Search Knowledge Base",
|
|
918
|
+
"type": "object"
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
},
|
|
922
|
+
"description": "Successful Response"
|
|
923
|
+
},
|
|
924
|
+
"422": {
|
|
925
|
+
"content": {
|
|
926
|
+
"application/json": {
|
|
927
|
+
"schema": {
|
|
928
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
},
|
|
932
|
+
"description": "Validation Error"
|
|
933
|
+
}
|
|
934
|
+
},
|
|
935
|
+
"summary": "Search Knowledge Base",
|
|
936
|
+
"tags": [
|
|
937
|
+
"agent-tools"
|
|
938
|
+
],
|
|
939
|
+
"x-mcp-annotations": {
|
|
940
|
+
"destructiveHint": false,
|
|
941
|
+
"idempotentHint": true,
|
|
942
|
+
"openWorldHint": true,
|
|
943
|
+
"readOnlyHint": true
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
"/api/v1/external/agent/task-collections": {
|
|
948
|
+
"post": {
|
|
949
|
+
"description": "为当前 WorkBuddy 任务创建一个独立知识空间。\n\n默认名称为“任务名-YYYYMMDD”,默认仅当前 API Key 所属用户可见。\n创建成功后,将返回的 collection_id 传给文件上传工具即可归档文件。\n\nArgs:\n task_name: 当前任务名称,用于默认命名和归档追踪\n visibility: 兼容旧客户端;private 或 shared,建议改用 all_members_role\n archive_date: 归档日期,支持 YYYYMMDD 或 YYYY-MM-DD,默认当天\n collection_name: 可选的自定义知识库名称,最长 50 字符\n description: 可选描述,最长 200 字符\n task_id: WorkBuddy 当前任务 ID,用于后续追踪和幂等治理\n allow_contributor_uploads: 兼容旧客户端;建议改用 all_members_role\n all_members_role: 全体成员角色,支持 viewer、contributor、manager;留空为私有\n\nReturns:\n JSON 对象,包含 collection_id、名称、可见性和任务归档信息。",
|
|
950
|
+
"operationId": "create_task_knowledge_base",
|
|
951
|
+
"requestBody": {
|
|
952
|
+
"content": {
|
|
953
|
+
"application/json": {
|
|
954
|
+
"schema": {
|
|
955
|
+
"$ref": "#/components/schemas/Body_create_task_knowledge_base"
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
},
|
|
959
|
+
"required": true
|
|
960
|
+
},
|
|
961
|
+
"responses": {
|
|
962
|
+
"200": {
|
|
963
|
+
"content": {
|
|
964
|
+
"application/json": {
|
|
965
|
+
"schema": {
|
|
966
|
+
"additionalProperties": true,
|
|
967
|
+
"title": "Response Create Task Knowledge Base",
|
|
968
|
+
"type": "object"
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
},
|
|
972
|
+
"description": "Successful Response"
|
|
973
|
+
},
|
|
974
|
+
"422": {
|
|
975
|
+
"content": {
|
|
976
|
+
"application/json": {
|
|
977
|
+
"schema": {
|
|
978
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
},
|
|
982
|
+
"description": "Validation Error"
|
|
983
|
+
}
|
|
984
|
+
},
|
|
985
|
+
"summary": "Create Task Knowledge Base",
|
|
986
|
+
"tags": [
|
|
987
|
+
"agent-tools"
|
|
988
|
+
],
|
|
989
|
+
"x-mcp-annotations": {
|
|
990
|
+
"destructiveHint": false,
|
|
991
|
+
"idempotentHint": false,
|
|
992
|
+
"openWorldHint": true,
|
|
993
|
+
"readOnlyHint": false
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
},
|
|
997
|
+
"/api/v1/external/agent/upload-sessions": {
|
|
998
|
+
"post": {
|
|
999
|
+
"description": "创建可恢复的 OSS 直传会话。files 仅含文件名、大小、SHA256、Base64 MD5 等元数据。\n\n客户端使用返回 files[].upload 链接直接 PUT 文件,严格使用 required headers;\n不传 KB API Key,不把文件正文或 Base64 内容放入 MCP。上传后 complete_direct_upload。\n同一 request_id 必须对应相同文件内容及选项。链接不得日志输出或长期保存。",
|
|
1000
|
+
"operationId": "begin_direct_upload",
|
|
1001
|
+
"requestBody": {
|
|
1002
|
+
"content": {
|
|
1003
|
+
"application/json": {
|
|
1004
|
+
"schema": {
|
|
1005
|
+
"$ref": "#/components/schemas/Body_begin_direct_upload"
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
},
|
|
1009
|
+
"required": true
|
|
1010
|
+
},
|
|
1011
|
+
"responses": {
|
|
1012
|
+
"200": {
|
|
1013
|
+
"content": {
|
|
1014
|
+
"application/json": {
|
|
1015
|
+
"schema": {
|
|
1016
|
+
"additionalProperties": true,
|
|
1017
|
+
"title": "Response Begin Direct Upload",
|
|
1018
|
+
"type": "object"
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
},
|
|
1022
|
+
"description": "Successful Response"
|
|
1023
|
+
},
|
|
1024
|
+
"422": {
|
|
1025
|
+
"content": {
|
|
1026
|
+
"application/json": {
|
|
1027
|
+
"schema": {
|
|
1028
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
},
|
|
1032
|
+
"description": "Validation Error"
|
|
1033
|
+
}
|
|
1034
|
+
},
|
|
1035
|
+
"summary": "Begin Direct Upload",
|
|
1036
|
+
"tags": [
|
|
1037
|
+
"agent-tools"
|
|
1038
|
+
],
|
|
1039
|
+
"x-mcp-annotations": {
|
|
1040
|
+
"destructiveHint": false,
|
|
1041
|
+
"idempotentHint": true,
|
|
1042
|
+
"openWorldHint": true,
|
|
1043
|
+
"readOnlyHint": false
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
},
|
|
1047
|
+
"/api/v1/external/agent/upload-sessions/{session_id}": {
|
|
1048
|
+
"delete": {
|
|
1049
|
+
"description": "取消尚未提交的直传会话,服务端保留状态并安排无引用对象清理。",
|
|
1050
|
+
"operationId": "cancel_direct_upload",
|
|
1051
|
+
"parameters": [
|
|
1052
|
+
{
|
|
1053
|
+
"in": "path",
|
|
1054
|
+
"name": "session_id",
|
|
1055
|
+
"required": true,
|
|
1056
|
+
"schema": {
|
|
1057
|
+
"title": "Session Id",
|
|
1058
|
+
"type": "string"
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
],
|
|
1062
|
+
"responses": {
|
|
1063
|
+
"200": {
|
|
1064
|
+
"content": {
|
|
1065
|
+
"application/json": {
|
|
1066
|
+
"schema": {
|
|
1067
|
+
"additionalProperties": true,
|
|
1068
|
+
"title": "Response Cancel Direct Upload",
|
|
1069
|
+
"type": "object"
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
},
|
|
1073
|
+
"description": "Successful Response"
|
|
1074
|
+
},
|
|
1075
|
+
"422": {
|
|
1076
|
+
"content": {
|
|
1077
|
+
"application/json": {
|
|
1078
|
+
"schema": {
|
|
1079
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
},
|
|
1083
|
+
"description": "Validation Error"
|
|
1084
|
+
}
|
|
1085
|
+
},
|
|
1086
|
+
"summary": "Cancel Direct Upload",
|
|
1087
|
+
"tags": [
|
|
1088
|
+
"agent-tools"
|
|
1089
|
+
],
|
|
1090
|
+
"x-mcp-annotations": {
|
|
1091
|
+
"destructiveHint": true,
|
|
1092
|
+
"idempotentHint": true,
|
|
1093
|
+
"openWorldHint": true,
|
|
1094
|
+
"readOnlyHint": false
|
|
1095
|
+
}
|
|
1096
|
+
},
|
|
1097
|
+
"get": {
|
|
1098
|
+
"description": "查询服务端保存的直传进度;renew=true 为尚未上传的对象重新签发短期链接。",
|
|
1099
|
+
"operationId": "get_direct_upload",
|
|
1100
|
+
"parameters": [
|
|
1101
|
+
{
|
|
1102
|
+
"in": "path",
|
|
1103
|
+
"name": "session_id",
|
|
1104
|
+
"required": true,
|
|
1105
|
+
"schema": {
|
|
1106
|
+
"title": "Session Id",
|
|
1107
|
+
"type": "string"
|
|
1108
|
+
}
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
"in": "query",
|
|
1112
|
+
"name": "renew",
|
|
1113
|
+
"required": false,
|
|
1114
|
+
"schema": {
|
|
1115
|
+
"default": false,
|
|
1116
|
+
"title": "Renew",
|
|
1117
|
+
"type": "boolean"
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
],
|
|
1121
|
+
"responses": {
|
|
1122
|
+
"200": {
|
|
1123
|
+
"content": {
|
|
1124
|
+
"application/json": {
|
|
1125
|
+
"schema": {
|
|
1126
|
+
"additionalProperties": true,
|
|
1127
|
+
"title": "Response Get Direct Upload",
|
|
1128
|
+
"type": "object"
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
},
|
|
1132
|
+
"description": "Successful Response"
|
|
1133
|
+
},
|
|
1134
|
+
"422": {
|
|
1135
|
+
"content": {
|
|
1136
|
+
"application/json": {
|
|
1137
|
+
"schema": {
|
|
1138
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
},
|
|
1142
|
+
"description": "Validation Error"
|
|
1143
|
+
}
|
|
1144
|
+
},
|
|
1145
|
+
"summary": "Get Direct Upload",
|
|
1146
|
+
"tags": [
|
|
1147
|
+
"agent-tools"
|
|
1148
|
+
],
|
|
1149
|
+
"x-mcp-annotations": {
|
|
1150
|
+
"destructiveHint": false,
|
|
1151
|
+
"idempotentHint": false,
|
|
1152
|
+
"openWorldHint": true,
|
|
1153
|
+
"readOnlyHint": false
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
},
|
|
1157
|
+
"/api/v1/external/agent/upload-sessions/{session_id}/complete": {
|
|
1158
|
+
"post": {
|
|
1159
|
+
"description": "让服务端核对 OSS 对象并提交持久解析任务。可幂等重试,后台仍将核验完整 SHA256。",
|
|
1160
|
+
"operationId": "complete_direct_upload",
|
|
1161
|
+
"parameters": [
|
|
1162
|
+
{
|
|
1163
|
+
"in": "path",
|
|
1164
|
+
"name": "session_id",
|
|
1165
|
+
"required": true,
|
|
1166
|
+
"schema": {
|
|
1167
|
+
"title": "Session Id",
|
|
1168
|
+
"type": "string"
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
],
|
|
1172
|
+
"responses": {
|
|
1173
|
+
"200": {
|
|
1174
|
+
"content": {
|
|
1175
|
+
"application/json": {
|
|
1176
|
+
"schema": {
|
|
1177
|
+
"additionalProperties": true,
|
|
1178
|
+
"title": "Response Complete Direct Upload",
|
|
1179
|
+
"type": "object"
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
},
|
|
1183
|
+
"description": "Successful Response"
|
|
1184
|
+
},
|
|
1185
|
+
"422": {
|
|
1186
|
+
"content": {
|
|
1187
|
+
"application/json": {
|
|
1188
|
+
"schema": {
|
|
1189
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
},
|
|
1193
|
+
"description": "Validation Error"
|
|
1194
|
+
}
|
|
1195
|
+
},
|
|
1196
|
+
"summary": "Complete Direct Upload",
|
|
1197
|
+
"tags": [
|
|
1198
|
+
"agent-tools"
|
|
1199
|
+
],
|
|
1200
|
+
"x-mcp-annotations": {
|
|
1201
|
+
"destructiveHint": true,
|
|
1202
|
+
"idempotentHint": true,
|
|
1203
|
+
"openWorldHint": true,
|
|
1204
|
+
"readOnlyHint": false
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
},
|
|
1208
|
+
"/api/v1/external/batches/{batch_id}": {
|
|
1209
|
+
"get": {
|
|
1210
|
+
"operationId": "get_external_batch_api_v1_external_batches__batch_id__get",
|
|
1211
|
+
"parameters": [
|
|
1212
|
+
{
|
|
1213
|
+
"in": "path",
|
|
1214
|
+
"name": "batch_id",
|
|
1215
|
+
"required": true,
|
|
1216
|
+
"schema": {
|
|
1217
|
+
"title": "Batch Id",
|
|
1218
|
+
"type": "string"
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
],
|
|
1222
|
+
"responses": {
|
|
1223
|
+
"200": {
|
|
1224
|
+
"content": {
|
|
1225
|
+
"application/json": {
|
|
1226
|
+
"schema": {
|
|
1227
|
+
"additionalProperties": true,
|
|
1228
|
+
"title": "Response Get External Batch Api V1 External Batches Batch Id Get",
|
|
1229
|
+
"type": "object"
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
},
|
|
1233
|
+
"description": "Successful Response"
|
|
1234
|
+
},
|
|
1235
|
+
"422": {
|
|
1236
|
+
"content": {
|
|
1237
|
+
"application/json": {
|
|
1238
|
+
"schema": {
|
|
1239
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
},
|
|
1243
|
+
"description": "Validation Error"
|
|
1244
|
+
}
|
|
1245
|
+
},
|
|
1246
|
+
"summary": "Get External Batch",
|
|
1247
|
+
"tags": [
|
|
1248
|
+
"external-interfaces"
|
|
1249
|
+
]
|
|
1250
|
+
}
|
|
1251
|
+
},
|
|
1252
|
+
"/api/v1/external/batches/{batch_id}/resolve": {
|
|
1253
|
+
"post": {
|
|
1254
|
+
"description": "Resolve selected per-file conflicts and resume ready files.",
|
|
1255
|
+
"operationId": "resolve_external_batch_conflicts_api_v1_external_batches__batch_id__resolve_post",
|
|
1256
|
+
"parameters": [
|
|
1257
|
+
{
|
|
1258
|
+
"in": "path",
|
|
1259
|
+
"name": "batch_id",
|
|
1260
|
+
"required": true,
|
|
1261
|
+
"schema": {
|
|
1262
|
+
"title": "Batch Id",
|
|
1263
|
+
"type": "string"
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
],
|
|
1267
|
+
"requestBody": {
|
|
1268
|
+
"content": {
|
|
1269
|
+
"application/json": {
|
|
1270
|
+
"schema": {
|
|
1271
|
+
"$ref": "#/components/schemas/ExternalBatchResolutionBody"
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
},
|
|
1275
|
+
"required": true
|
|
1276
|
+
},
|
|
1277
|
+
"responses": {
|
|
1278
|
+
"202": {
|
|
1279
|
+
"content": {
|
|
1280
|
+
"application/json": {
|
|
1281
|
+
"schema": {
|
|
1282
|
+
"additionalProperties": true,
|
|
1283
|
+
"title": "Response Resolve External Batch Conflicts Api V1 External Batches Batch Id Resolve Post",
|
|
1284
|
+
"type": "object"
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
},
|
|
1288
|
+
"description": "Successful Response"
|
|
1289
|
+
},
|
|
1290
|
+
"422": {
|
|
1291
|
+
"content": {
|
|
1292
|
+
"application/json": {
|
|
1293
|
+
"schema": {
|
|
1294
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
},
|
|
1298
|
+
"description": "Validation Error"
|
|
1299
|
+
}
|
|
1300
|
+
},
|
|
1301
|
+
"summary": "Resolve External Batch Conflicts",
|
|
1302
|
+
"tags": [
|
|
1303
|
+
"external-interfaces"
|
|
1304
|
+
]
|
|
1305
|
+
}
|
|
1306
|
+
},
|
|
1307
|
+
"/api/v1/external/batches/{batch_id}/retry": {
|
|
1308
|
+
"post": {
|
|
1309
|
+
"operationId": "retry_external_batch_api_v1_external_batches__batch_id__retry_post",
|
|
1310
|
+
"parameters": [
|
|
1311
|
+
{
|
|
1312
|
+
"in": "path",
|
|
1313
|
+
"name": "batch_id",
|
|
1314
|
+
"required": true,
|
|
1315
|
+
"schema": {
|
|
1316
|
+
"title": "Batch Id",
|
|
1317
|
+
"type": "string"
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
],
|
|
1321
|
+
"responses": {
|
|
1322
|
+
"202": {
|
|
1323
|
+
"content": {
|
|
1324
|
+
"application/json": {
|
|
1325
|
+
"schema": {
|
|
1326
|
+
"additionalProperties": true,
|
|
1327
|
+
"title": "Response Retry External Batch Api V1 External Batches Batch Id Retry Post",
|
|
1328
|
+
"type": "object"
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
},
|
|
1332
|
+
"description": "Successful Response"
|
|
1333
|
+
},
|
|
1334
|
+
"422": {
|
|
1335
|
+
"content": {
|
|
1336
|
+
"application/json": {
|
|
1337
|
+
"schema": {
|
|
1338
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
},
|
|
1342
|
+
"description": "Validation Error"
|
|
1343
|
+
}
|
|
1344
|
+
},
|
|
1345
|
+
"summary": "Retry External Batch",
|
|
1346
|
+
"tags": [
|
|
1347
|
+
"external-interfaces"
|
|
1348
|
+
]
|
|
1349
|
+
}
|
|
1350
|
+
},
|
|
1351
|
+
"/api/v1/external/documents/batch-upload": {
|
|
1352
|
+
"post": {
|
|
1353
|
+
"description": "Submit binary files for asynchronous ingestion using API-Key auth.\n\n``detect`` resolves exact duplicate content as reuse, treats an exact\nfilename with changed content as a new version when safe, and holds only\nambiguous files for per-file resolution. ``reject`` refuses the entire batch\nwhen filename preflight requires confirmation, without reusing or replacing\nexisting documents; it is the conservative direct-upload fallback policy.\n``force_upload`` deliberately\nskips those checks and is restricted to a collection owner/manager.\nRequest IDs are scoped to the API-Key owner and make retries idempotent.",
|
|
1354
|
+
"operationId": "upload_external_documents_api_v1_external_documents_batch_upload_post",
|
|
1355
|
+
"requestBody": {
|
|
1356
|
+
"content": {
|
|
1357
|
+
"multipart/form-data": {
|
|
1358
|
+
"schema": {
|
|
1359
|
+
"$ref": "#/components/schemas/Body_upload_external_documents_api_v1_external_documents_batch_upload_post"
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
},
|
|
1363
|
+
"required": true
|
|
1364
|
+
},
|
|
1365
|
+
"responses": {
|
|
1366
|
+
"202": {
|
|
1367
|
+
"content": {
|
|
1368
|
+
"application/json": {
|
|
1369
|
+
"schema": {
|
|
1370
|
+
"additionalProperties": true,
|
|
1371
|
+
"title": "Response Upload External Documents Api V1 External Documents Batch Upload Post",
|
|
1372
|
+
"type": "object"
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
},
|
|
1376
|
+
"description": "Successful Response"
|
|
1377
|
+
},
|
|
1378
|
+
"422": {
|
|
1379
|
+
"content": {
|
|
1380
|
+
"application/json": {
|
|
1381
|
+
"schema": {
|
|
1382
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
},
|
|
1386
|
+
"description": "Validation Error"
|
|
1387
|
+
}
|
|
1388
|
+
},
|
|
1389
|
+
"summary": "Upload External Documents",
|
|
1390
|
+
"tags": [
|
|
1391
|
+
"external-interfaces"
|
|
1392
|
+
]
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
},
|
|
1396
|
+
"x-numa-contract": {
|
|
1397
|
+
"authentication": "X-Api-Key; deployments may additionally require Bearer application authorization.",
|
|
1398
|
+
"default_upload_limits": {
|
|
1399
|
+
"max_external_files_per_batch": 100,
|
|
1400
|
+
"max_files_per_batch": 50,
|
|
1401
|
+
"max_files_per_batch_environment_override": "KB_MAX_FILES_PER_BATCH",
|
|
1402
|
+
"max_single_file_size_bytes": 104857600,
|
|
1403
|
+
"max_total_batch_size_bytes": 1073741824
|
|
1404
|
+
},
|
|
1405
|
+
"generator": "scripts/export-kb-contract.py",
|
|
1406
|
+
"parse_supported_extensions": [
|
|
1407
|
+
".bmp",
|
|
1408
|
+
".csv",
|
|
1409
|
+
".docx",
|
|
1410
|
+
".gif",
|
|
1411
|
+
".jpeg",
|
|
1412
|
+
".jpg",
|
|
1413
|
+
".json",
|
|
1414
|
+
".log",
|
|
1415
|
+
".md",
|
|
1416
|
+
".pdf",
|
|
1417
|
+
".png",
|
|
1418
|
+
".txt",
|
|
1419
|
+
".webp",
|
|
1420
|
+
".xls",
|
|
1421
|
+
".xlsm",
|
|
1422
|
+
".xlsx",
|
|
1423
|
+
".yaml",
|
|
1424
|
+
".yml"
|
|
1425
|
+
],
|
|
1426
|
+
"response_validation": "Responses are free-form upstream; validate consumed fields at runtime.",
|
|
1427
|
+
"sources": [
|
|
1428
|
+
"backend/external/agent_routes.py",
|
|
1429
|
+
"backend/external/routes.py"
|
|
1430
|
+
]
|
|
1431
|
+
}
|
|
1432
|
+
}
|