@numa-tech/numa 1.24.0 → 1.26.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.
- package/README.md +4 -0
- package/dist/business-issuer.js +5 -5
- package/dist/business-issuer.js.map +1 -1
- package/dist/cli.js +3 -0
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +2 -2
- package/dist/config.js.map +1 -1
- package/dist/kb/catalog.js +33 -2
- package/dist/kb/catalog.js.map +1 -1
- package/dist/kb/chat-stream.d.ts +5 -0
- package/dist/kb/chat-stream.js +61 -0
- package/dist/kb/chat-stream.js.map +1 -0
- package/dist/kb/client.d.ts +75 -6
- package/dist/kb/client.js +114 -12
- package/dist/kb/client.js.map +1 -1
- package/dist/kb/commands.js +93 -8
- package/dist/kb/commands.js.map +1 -1
- package/dist/kb/config.d.ts +15 -3
- package/dist/kb/config.js +40 -21
- package/dist/kb/config.js.map +1 -1
- package/dist/kb/management-commands.d.ts +7 -0
- package/dist/kb/management-commands.js +86 -0
- package/dist/kb/management-commands.js.map +1 -0
- package/dist/kb/management-schemas.d.ts +106 -0
- package/dist/kb/management-schemas.js +33 -0
- package/dist/kb/management-schemas.js.map +1 -0
- package/dist/kb/transfers.d.ts +4 -0
- package/dist/kb/transfers.js +11 -4
- package/dist/kb/transfers.js.map +1 -1
- package/dist/kb/upload-decisions.d.ts +28 -0
- package/dist/kb/upload-decisions.js +23 -0
- package/dist/kb/upload-decisions.js.map +1 -0
- package/dist/kb/upload-state.d.ts +1 -0
- package/dist/kb/upload-state.js +1 -0
- package/dist/kb/upload-state.js.map +1 -1
- package/dist/kb/web-login.d.ts +10 -0
- package/dist/kb/web-login.js +25 -0
- package/dist/kb/web-login.js.map +1 -0
- package/dist/kb/web-page.d.ts +3 -0
- package/dist/kb/web-page.js +114 -0
- package/dist/kb/web-page.js.map +1 -0
- package/dist/kb/web-queue.d.ts +61 -0
- package/dist/kb/web-queue.js +101 -0
- package/dist/kb/web-queue.js.map +1 -0
- package/dist/kb/web.d.ts +26 -0
- package/dist/kb/web.js +234 -0
- package/dist/kb/web.js.map +1 -0
- package/dist/local-web/context-menu.d.ts +2 -0
- package/dist/local-web/context-menu.js +53 -0
- package/dist/local-web/context-menu.js.map +1 -0
- package/dist/local-web/file-workspace-style.d.ts +2 -0
- package/dist/local-web/file-workspace-style.js +58 -0
- package/dist/local-web/file-workspace-style.js.map +1 -0
- package/dist/local-web/file-workspace.d.ts +2 -0
- package/dist/local-web/file-workspace.js +39 -0
- package/dist/local-web/file-workspace.js.map +1 -0
- package/dist/local-web/security.d.ts +6 -0
- package/dist/local-web/security.js +51 -0
- package/dist/local-web/security.js.map +1 -0
- package/dist/login-recovery.js +8 -3
- package/dist/login-recovery.js.map +1 -1
- package/dist/mcp-gateway/profile.d.ts +4 -0
- package/dist/mcp-gateway/profile.js +6 -3
- package/dist/mcp-gateway/profile.js.map +1 -1
- package/dist/mcp-gateway/runtime.js +14 -0
- package/dist/mcp-gateway/runtime.js.map +1 -1
- package/dist/oss/transfer-queue.d.ts +7 -51
- package/dist/oss/transfer-queue.js +15 -308
- package/dist/oss/transfer-queue.js.map +1 -1
- package/dist/oss/web-page.js +21 -103
- package/dist/oss/web-page.js.map +1 -1
- package/dist/oss/web.js +4 -45
- package/dist/oss/web.js.map +1 -1
- package/dist/platform-profile.d.ts +25 -1
- package/dist/platform-profile.js +44 -1
- package/dist/platform-profile.js.map +1 -1
- package/dist/transfers/persistent-queue.d.ts +65 -0
- package/dist/transfers/persistent-queue.js +312 -0
- package/dist/transfers/persistent-queue.js.map +1 -0
- package/docs/design/kb-capability-upgrade.md +36 -0
- package/docs/design/kb-cli.md +4 -4
- package/docs/design/kb-web-workspace.md +97 -0
- package/docs/kb-access.md +86 -7
- package/examples/jev/README.md +65 -0
- package/examples/jev/platform-client.test.ts +136 -0
- package/examples/jev/platform-client.ts +122 -0
- package/package.json +9 -7
- package/scripts/export-kb-contract.py +25 -6
- package/skills/numa-jev/LICENSE +21 -0
- package/skills/numa-jev/SKILL.md +54 -0
- package/skills/numa-jev/assets/decision.json +37 -0
- package/skills/numa-jev/numa-skill.json +8 -0
- package/skills/numa-jev/references/application-integration.md +36 -0
- package/skills/numa-jev/references/mcp-usage.md +53 -0
- package/skills/numa-jev/references/upstream.md +13 -0
- package/src/kb/openapi-contract.json +2297 -566
|
@@ -1,106 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"components": {
|
|
3
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
4
|
"Body_begin_direct_upload": {
|
|
101
5
|
"properties": {
|
|
102
6
|
"collection_id": {
|
|
103
|
-
"default": "default",
|
|
104
7
|
"title": "Collection Id",
|
|
105
8
|
"type": "string"
|
|
106
9
|
},
|
|
@@ -130,7 +33,8 @@
|
|
|
130
33
|
},
|
|
131
34
|
"required": [
|
|
132
35
|
"files",
|
|
133
|
-
"request_id"
|
|
36
|
+
"request_id",
|
|
37
|
+
"collection_id"
|
|
134
38
|
],
|
|
135
39
|
"title": "Body_begin_direct_upload",
|
|
136
40
|
"type": "object"
|
|
@@ -359,89 +263,117 @@
|
|
|
359
263
|
"title": "Body_search_knowledge_base",
|
|
360
264
|
"type": "object"
|
|
361
265
|
},
|
|
362
|
-
"
|
|
266
|
+
"ChatRequest": {
|
|
267
|
+
"description": "Request body for the streaming RAG chat endpoint.",
|
|
363
268
|
"properties": {
|
|
364
|
-
"
|
|
365
|
-
"default": "default",
|
|
366
|
-
"title": "Collection Id",
|
|
367
|
-
"type": "string"
|
|
368
|
-
},
|
|
369
|
-
"files": {
|
|
269
|
+
"collection_ids": {
|
|
370
270
|
"items": {
|
|
371
|
-
"
|
|
271
|
+
"type": "string"
|
|
372
272
|
},
|
|
373
|
-
"
|
|
273
|
+
"maxItems": 20,
|
|
274
|
+
"minItems": 1,
|
|
275
|
+
"title": "Collection Ids",
|
|
374
276
|
"type": "array"
|
|
375
277
|
},
|
|
376
|
-
"
|
|
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": {
|
|
278
|
+
"history": {
|
|
406
279
|
"anyOf": [
|
|
407
280
|
{
|
|
408
|
-
"
|
|
281
|
+
"items": {
|
|
282
|
+
"additionalProperties": {
|
|
283
|
+
"type": "string"
|
|
284
|
+
},
|
|
285
|
+
"type": "object"
|
|
286
|
+
},
|
|
287
|
+
"maxItems": 50,
|
|
288
|
+
"type": "array"
|
|
409
289
|
},
|
|
410
290
|
{
|
|
411
291
|
"type": "null"
|
|
412
292
|
}
|
|
413
293
|
],
|
|
414
|
-
"title": "
|
|
294
|
+
"title": "History"
|
|
415
295
|
},
|
|
416
|
-
"
|
|
417
|
-
"
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
"title": "Files",
|
|
422
|
-
"type": "array"
|
|
296
|
+
"message": {
|
|
297
|
+
"maxLength": 8000,
|
|
298
|
+
"minLength": 1,
|
|
299
|
+
"title": "Message",
|
|
300
|
+
"type": "string"
|
|
423
301
|
},
|
|
424
|
-
"
|
|
302
|
+
"session_id": {
|
|
425
303
|
"anyOf": [
|
|
426
304
|
{
|
|
305
|
+
"maxLength": 80,
|
|
427
306
|
"type": "string"
|
|
428
307
|
},
|
|
429
308
|
{
|
|
430
309
|
"type": "null"
|
|
431
310
|
}
|
|
432
311
|
],
|
|
433
|
-
"title": "
|
|
312
|
+
"title": "Session Id"
|
|
434
313
|
},
|
|
435
|
-
"
|
|
436
|
-
"
|
|
314
|
+
"top_k": {
|
|
315
|
+
"default": 5,
|
|
316
|
+
"maximum": 30.0,
|
|
317
|
+
"minimum": 1.0,
|
|
318
|
+
"title": "Top K",
|
|
319
|
+
"type": "integer"
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"required": [
|
|
323
|
+
"message",
|
|
324
|
+
"collection_ids"
|
|
325
|
+
],
|
|
326
|
+
"title": "ChatRequest",
|
|
327
|
+
"type": "object"
|
|
328
|
+
},
|
|
329
|
+
"ChatSessionCreateBody": {
|
|
330
|
+
"description": "Create a persistent RAG chat session.",
|
|
331
|
+
"properties": {
|
|
332
|
+
"collection_ids": {
|
|
333
|
+
"items": {
|
|
334
|
+
"type": "string"
|
|
335
|
+
},
|
|
336
|
+
"maxItems": 20,
|
|
337
|
+
"minItems": 1,
|
|
338
|
+
"title": "Collection Ids",
|
|
339
|
+
"type": "array"
|
|
340
|
+
},
|
|
341
|
+
"title": {
|
|
342
|
+
"default": "新对话",
|
|
343
|
+
"maxLength": 80,
|
|
344
|
+
"title": "Title",
|
|
437
345
|
"type": "string"
|
|
438
346
|
}
|
|
439
347
|
},
|
|
440
348
|
"required": [
|
|
441
|
-
"
|
|
442
|
-
|
|
349
|
+
"collection_ids"
|
|
350
|
+
],
|
|
351
|
+
"title": "ChatSessionCreateBody",
|
|
352
|
+
"type": "object"
|
|
353
|
+
},
|
|
354
|
+
"CollectionMemberBody": {
|
|
355
|
+
"properties": {
|
|
356
|
+
"global_uid": {
|
|
357
|
+
"maxLength": 200,
|
|
358
|
+
"minLength": 1,
|
|
359
|
+
"title": "Global Uid",
|
|
360
|
+
"type": "string"
|
|
361
|
+
},
|
|
362
|
+
"role": {
|
|
363
|
+
"enum": [
|
|
364
|
+
"viewer",
|
|
365
|
+
"contributor",
|
|
366
|
+
"manager"
|
|
367
|
+
],
|
|
368
|
+
"title": "Role",
|
|
369
|
+
"type": "string"
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
"required": [
|
|
373
|
+
"global_uid",
|
|
374
|
+
"role"
|
|
443
375
|
],
|
|
444
|
-
"title": "
|
|
376
|
+
"title": "CollectionMemberBody",
|
|
445
377
|
"type": "object"
|
|
446
378
|
},
|
|
447
379
|
"ExternalBatchResolutionBody": {
|
|
@@ -529,147 +461,1703 @@
|
|
|
529
461
|
"title": "HTTPValidationError",
|
|
530
462
|
"type": "object"
|
|
531
463
|
},
|
|
532
|
-
"
|
|
533
|
-
"additionalProperties": false,
|
|
464
|
+
"ResolveConflictBody": {
|
|
534
465
|
"properties": {
|
|
535
|
-
"
|
|
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": "",
|
|
466
|
+
"action": {
|
|
547
467
|
"enum": [
|
|
548
|
-
"",
|
|
549
|
-
"
|
|
550
|
-
"
|
|
468
|
+
"keep_both",
|
|
469
|
+
"supersede_existing",
|
|
470
|
+
"archive_existing",
|
|
471
|
+
"mark_superseded",
|
|
472
|
+
"mark_coexisting_scope",
|
|
473
|
+
"ingest_without_relation"
|
|
551
474
|
],
|
|
552
|
-
"title": "
|
|
475
|
+
"title": "Action",
|
|
553
476
|
"type": "string"
|
|
554
477
|
},
|
|
555
|
-
"
|
|
478
|
+
"scope": {
|
|
556
479
|
"anyOf": [
|
|
557
480
|
{
|
|
558
|
-
"
|
|
481
|
+
"additionalProperties": true,
|
|
482
|
+
"type": "object"
|
|
559
483
|
},
|
|
560
484
|
{
|
|
561
485
|
"type": "null"
|
|
562
486
|
}
|
|
563
487
|
],
|
|
564
|
-
"title": "
|
|
488
|
+
"title": "Scope"
|
|
489
|
+
}
|
|
490
|
+
},
|
|
491
|
+
"required": [
|
|
492
|
+
"action"
|
|
493
|
+
],
|
|
494
|
+
"title": "ResolveConflictBody",
|
|
495
|
+
"type": "object"
|
|
496
|
+
},
|
|
497
|
+
"SwitchDocumentVersionBody": {
|
|
498
|
+
"properties": {
|
|
499
|
+
"confirmation": {
|
|
500
|
+
"const": "SWITCH_CURRENT_VERSION",
|
|
501
|
+
"title": "Confirmation",
|
|
502
|
+
"type": "string"
|
|
565
503
|
},
|
|
566
|
-
"
|
|
567
|
-
"maxLength":
|
|
504
|
+
"expected_current_version_id": {
|
|
505
|
+
"maxLength": 200,
|
|
568
506
|
"minLength": 1,
|
|
569
|
-
"title": "
|
|
507
|
+
"title": "Expected Current Version Id",
|
|
570
508
|
"type": "string"
|
|
571
509
|
},
|
|
572
|
-
"
|
|
573
|
-
"
|
|
574
|
-
"
|
|
510
|
+
"reason": {
|
|
511
|
+
"maxLength": 500,
|
|
512
|
+
"minLength": 1,
|
|
513
|
+
"title": "Reason",
|
|
575
514
|
"type": "string"
|
|
576
515
|
},
|
|
577
|
-
"
|
|
578
|
-
"
|
|
579
|
-
"
|
|
580
|
-
"title": "
|
|
581
|
-
"type": "
|
|
582
|
-
}
|
|
583
|
-
|
|
516
|
+
"target_version_id": {
|
|
517
|
+
"maxLength": 200,
|
|
518
|
+
"minLength": 1,
|
|
519
|
+
"title": "Target Version Id",
|
|
520
|
+
"type": "string"
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
"required": [
|
|
524
|
+
"target_version_id",
|
|
525
|
+
"expected_current_version_id",
|
|
526
|
+
"reason",
|
|
527
|
+
"confirmation"
|
|
528
|
+
],
|
|
529
|
+
"title": "SwitchDocumentVersionBody",
|
|
530
|
+
"type": "object"
|
|
531
|
+
},
|
|
532
|
+
"TransferCollectionBody": {
|
|
533
|
+
"properties": {
|
|
534
|
+
"target_owner_id": {
|
|
535
|
+
"maxLength": 200,
|
|
536
|
+
"minLength": 1,
|
|
537
|
+
"title": "Target Owner Id",
|
|
538
|
+
"type": "string"
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
"required": [
|
|
542
|
+
"target_owner_id"
|
|
543
|
+
],
|
|
544
|
+
"title": "TransferCollectionBody",
|
|
545
|
+
"type": "object"
|
|
546
|
+
},
|
|
547
|
+
"UpdateCollectionBody": {
|
|
548
|
+
"additionalProperties": false,
|
|
549
|
+
"properties": {
|
|
550
|
+
"description": {
|
|
584
551
|
"anyOf": [
|
|
585
552
|
{
|
|
586
|
-
"
|
|
553
|
+
"maxLength": 200,
|
|
587
554
|
"type": "string"
|
|
588
555
|
},
|
|
589
556
|
{
|
|
590
557
|
"type": "null"
|
|
591
558
|
}
|
|
592
559
|
],
|
|
593
|
-
"title": "
|
|
560
|
+
"title": "Description"
|
|
594
561
|
},
|
|
595
|
-
"
|
|
562
|
+
"name": {
|
|
596
563
|
"anyOf": [
|
|
597
564
|
{
|
|
565
|
+
"maxLength": 50,
|
|
566
|
+
"minLength": 1,
|
|
598
567
|
"type": "string"
|
|
599
568
|
},
|
|
600
569
|
{
|
|
601
570
|
"type": "null"
|
|
602
571
|
}
|
|
603
572
|
],
|
|
604
|
-
"title": "
|
|
573
|
+
"title": "Name"
|
|
605
574
|
}
|
|
606
575
|
},
|
|
607
|
-
"
|
|
608
|
-
"filename",
|
|
609
|
-
"size_bytes",
|
|
610
|
-
"sha256",
|
|
611
|
-
"content_md5"
|
|
612
|
-
],
|
|
613
|
-
"title": "UploadFileMetadata",
|
|
576
|
+
"title": "UpdateCollectionBody",
|
|
614
577
|
"type": "object"
|
|
615
578
|
},
|
|
616
|
-
"
|
|
579
|
+
"UpdateDocumentBody": {
|
|
617
580
|
"properties": {
|
|
618
|
-
"
|
|
619
|
-
"
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
581
|
+
"doc_version": {
|
|
582
|
+
"anyOf": [
|
|
583
|
+
{
|
|
584
|
+
"type": "string"
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
"type": "null"
|
|
588
|
+
}
|
|
589
|
+
],
|
|
590
|
+
"title": "Doc Version"
|
|
591
|
+
},
|
|
592
|
+
"document_key": {
|
|
593
|
+
"anyOf": [
|
|
594
|
+
{
|
|
595
|
+
"type": "string"
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
"type": "null"
|
|
599
|
+
}
|
|
600
|
+
],
|
|
601
|
+
"title": "Document Key"
|
|
602
|
+
},
|
|
603
|
+
"effective_date": {
|
|
604
|
+
"anyOf": [
|
|
605
|
+
{
|
|
606
|
+
"type": "string"
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"type": "null"
|
|
610
|
+
}
|
|
611
|
+
],
|
|
612
|
+
"title": "Effective Date"
|
|
613
|
+
},
|
|
614
|
+
"expiry_date": {
|
|
615
|
+
"anyOf": [
|
|
616
|
+
{
|
|
617
|
+
"type": "string"
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
"type": "null"
|
|
621
|
+
}
|
|
622
|
+
],
|
|
623
|
+
"title": "Expiry Date"
|
|
624
|
+
},
|
|
625
|
+
"lifecycle_status": {
|
|
626
|
+
"anyOf": [
|
|
627
|
+
{
|
|
628
|
+
"enum": [
|
|
629
|
+
"active",
|
|
630
|
+
"superseded",
|
|
631
|
+
"draft",
|
|
632
|
+
"archived"
|
|
633
|
+
],
|
|
634
|
+
"type": "string"
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
"type": "null"
|
|
638
|
+
}
|
|
639
|
+
],
|
|
640
|
+
"title": "Lifecycle Status"
|
|
641
|
+
},
|
|
642
|
+
"metadata": {
|
|
643
|
+
"anyOf": [
|
|
644
|
+
{
|
|
645
|
+
"additionalProperties": true,
|
|
646
|
+
"type": "object"
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
"type": "null"
|
|
650
|
+
}
|
|
651
|
+
],
|
|
652
|
+
"title": "Metadata"
|
|
653
|
+
},
|
|
654
|
+
"permission_scope": {
|
|
655
|
+
"anyOf": [
|
|
656
|
+
{
|
|
657
|
+
"items": {
|
|
629
658
|
"type": "string"
|
|
630
659
|
},
|
|
631
|
-
|
|
632
|
-
|
|
660
|
+
"type": "array"
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
"type": "null"
|
|
664
|
+
}
|
|
665
|
+
],
|
|
666
|
+
"title": "Permission Scope"
|
|
667
|
+
},
|
|
668
|
+
"published_date": {
|
|
669
|
+
"anyOf": [
|
|
670
|
+
{
|
|
671
|
+
"type": "string"
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
"type": "null"
|
|
675
|
+
}
|
|
676
|
+
],
|
|
677
|
+
"title": "Published Date"
|
|
678
|
+
},
|
|
679
|
+
"scope": {
|
|
680
|
+
"anyOf": [
|
|
681
|
+
{
|
|
682
|
+
"additionalProperties": true,
|
|
683
|
+
"type": "object"
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
"type": "null"
|
|
687
|
+
}
|
|
688
|
+
],
|
|
689
|
+
"title": "Scope"
|
|
690
|
+
},
|
|
691
|
+
"source_type": {
|
|
692
|
+
"anyOf": [
|
|
693
|
+
{
|
|
694
|
+
"enum": [
|
|
695
|
+
"official_policy",
|
|
696
|
+
"department_rule",
|
|
697
|
+
"contract",
|
|
698
|
+
"faq",
|
|
699
|
+
"note",
|
|
700
|
+
"unknown"
|
|
701
|
+
],
|
|
702
|
+
"type": "string"
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
"type": "null"
|
|
706
|
+
}
|
|
707
|
+
],
|
|
708
|
+
"title": "Source Type"
|
|
709
|
+
},
|
|
710
|
+
"title": {
|
|
711
|
+
"anyOf": [
|
|
712
|
+
{
|
|
713
|
+
"type": "string"
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
"type": "null"
|
|
717
|
+
}
|
|
718
|
+
],
|
|
719
|
+
"title": "Title"
|
|
720
|
+
},
|
|
721
|
+
"version_sequence": {
|
|
722
|
+
"anyOf": [
|
|
723
|
+
{
|
|
724
|
+
"type": "integer"
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
"type": "null"
|
|
728
|
+
}
|
|
729
|
+
],
|
|
730
|
+
"title": "Version Sequence"
|
|
731
|
+
}
|
|
732
|
+
},
|
|
733
|
+
"title": "UpdateDocumentBody",
|
|
734
|
+
"type": "object"
|
|
735
|
+
},
|
|
736
|
+
"UploadFileMetadata": {
|
|
737
|
+
"additionalProperties": false,
|
|
738
|
+
"properties": {
|
|
739
|
+
"archive_category": {
|
|
740
|
+
"anyOf": [
|
|
741
|
+
{
|
|
742
|
+
"enum": [
|
|
743
|
+
"final",
|
|
744
|
+
"intermediate",
|
|
745
|
+
"task_memory"
|
|
746
|
+
],
|
|
747
|
+
"type": "string"
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
"type": "null"
|
|
751
|
+
}
|
|
752
|
+
],
|
|
753
|
+
"title": "Archive Category"
|
|
754
|
+
},
|
|
755
|
+
"content_md5": {
|
|
756
|
+
"title": "Content Md5",
|
|
757
|
+
"type": "string"
|
|
758
|
+
},
|
|
759
|
+
"content_type": {
|
|
760
|
+
"default": "application/octet-stream",
|
|
761
|
+
"maxLength": 200,
|
|
762
|
+
"title": "Content Type",
|
|
763
|
+
"type": "string"
|
|
764
|
+
},
|
|
765
|
+
"duplicate_action": {
|
|
766
|
+
"default": "",
|
|
767
|
+
"enum": [
|
|
768
|
+
"",
|
|
769
|
+
"upload",
|
|
770
|
+
"new_version"
|
|
771
|
+
],
|
|
772
|
+
"title": "Duplicate Action",
|
|
773
|
+
"type": "string"
|
|
774
|
+
},
|
|
775
|
+
"existing_document_id": {
|
|
776
|
+
"anyOf": [
|
|
777
|
+
{
|
|
778
|
+
"type": "string"
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
"type": "null"
|
|
782
|
+
}
|
|
783
|
+
],
|
|
784
|
+
"title": "Existing Document Id"
|
|
785
|
+
},
|
|
786
|
+
"filename": {
|
|
787
|
+
"maxLength": 255,
|
|
788
|
+
"minLength": 1,
|
|
789
|
+
"title": "Filename",
|
|
790
|
+
"type": "string"
|
|
791
|
+
},
|
|
792
|
+
"relative_path": {
|
|
793
|
+
"anyOf": [
|
|
794
|
+
{
|
|
795
|
+
"maxLength": 1500,
|
|
796
|
+
"type": "string"
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
"type": "null"
|
|
800
|
+
}
|
|
801
|
+
],
|
|
802
|
+
"title": "Relative Path"
|
|
803
|
+
},
|
|
804
|
+
"sha256": {
|
|
805
|
+
"pattern": "^[0-9a-f]{64}$",
|
|
806
|
+
"title": "Sha256",
|
|
807
|
+
"type": "string"
|
|
808
|
+
},
|
|
809
|
+
"size_bytes": {
|
|
810
|
+
"exclusiveMinimum": 0.0,
|
|
811
|
+
"maximum": 104857600.0,
|
|
812
|
+
"title": "Size Bytes",
|
|
813
|
+
"type": "integer"
|
|
814
|
+
},
|
|
815
|
+
"task_id": {
|
|
816
|
+
"anyOf": [
|
|
817
|
+
{
|
|
818
|
+
"maxLength": 200,
|
|
819
|
+
"type": "string"
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
"type": "null"
|
|
823
|
+
}
|
|
824
|
+
],
|
|
825
|
+
"title": "Task Id"
|
|
826
|
+
},
|
|
827
|
+
"title": {
|
|
828
|
+
"anyOf": [
|
|
829
|
+
{
|
|
830
|
+
"maxLength": 500,
|
|
831
|
+
"type": "string"
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
"type": "null"
|
|
835
|
+
}
|
|
836
|
+
],
|
|
837
|
+
"title": "Title"
|
|
838
|
+
},
|
|
839
|
+
"version_confirmation": {
|
|
840
|
+
"anyOf": [
|
|
841
|
+
{
|
|
842
|
+
"const": "SWITCH_CURRENT_VERSION",
|
|
843
|
+
"type": "string"
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
"type": "null"
|
|
847
|
+
}
|
|
848
|
+
],
|
|
849
|
+
"title": "Version Confirmation"
|
|
850
|
+
},
|
|
851
|
+
"version_reason": {
|
|
852
|
+
"anyOf": [
|
|
853
|
+
{
|
|
854
|
+
"type": "string"
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
"type": "null"
|
|
858
|
+
}
|
|
859
|
+
],
|
|
860
|
+
"title": "Version Reason"
|
|
861
|
+
}
|
|
862
|
+
},
|
|
863
|
+
"required": [
|
|
864
|
+
"filename",
|
|
865
|
+
"size_bytes",
|
|
866
|
+
"sha256",
|
|
867
|
+
"content_md5"
|
|
868
|
+
],
|
|
869
|
+
"title": "UploadFileMetadata",
|
|
870
|
+
"type": "object"
|
|
871
|
+
},
|
|
872
|
+
"UploadPreflightBody": {
|
|
873
|
+
"additionalProperties": false,
|
|
874
|
+
"properties": {
|
|
875
|
+
"collection_id": {
|
|
876
|
+
"maxLength": 200,
|
|
877
|
+
"minLength": 1,
|
|
878
|
+
"title": "Collection Id",
|
|
879
|
+
"type": "string"
|
|
880
|
+
},
|
|
881
|
+
"files": {
|
|
882
|
+
"items": {
|
|
883
|
+
"$ref": "#/components/schemas/UploadFileMetadata"
|
|
884
|
+
},
|
|
885
|
+
"maxItems": 50,
|
|
886
|
+
"minItems": 1,
|
|
887
|
+
"title": "Files",
|
|
888
|
+
"type": "array"
|
|
889
|
+
}
|
|
890
|
+
},
|
|
891
|
+
"required": [
|
|
892
|
+
"collection_id",
|
|
893
|
+
"files"
|
|
894
|
+
],
|
|
895
|
+
"title": "UploadPreflightBody",
|
|
896
|
+
"type": "object"
|
|
897
|
+
},
|
|
898
|
+
"ValidationError": {
|
|
899
|
+
"properties": {
|
|
900
|
+
"ctx": {
|
|
901
|
+
"title": "Context",
|
|
902
|
+
"type": "object"
|
|
903
|
+
},
|
|
904
|
+
"input": {
|
|
905
|
+
"title": "Input"
|
|
906
|
+
},
|
|
907
|
+
"loc": {
|
|
908
|
+
"items": {
|
|
909
|
+
"anyOf": [
|
|
910
|
+
{
|
|
911
|
+
"type": "string"
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
"type": "integer"
|
|
915
|
+
}
|
|
916
|
+
]
|
|
917
|
+
},
|
|
918
|
+
"title": "Location",
|
|
919
|
+
"type": "array"
|
|
920
|
+
},
|
|
921
|
+
"msg": {
|
|
922
|
+
"title": "Message",
|
|
923
|
+
"type": "string"
|
|
924
|
+
},
|
|
925
|
+
"type": {
|
|
926
|
+
"title": "Error Type",
|
|
927
|
+
"type": "string"
|
|
928
|
+
}
|
|
929
|
+
},
|
|
930
|
+
"required": [
|
|
931
|
+
"loc",
|
|
932
|
+
"msg",
|
|
933
|
+
"type"
|
|
934
|
+
],
|
|
935
|
+
"title": "ValidationError",
|
|
936
|
+
"type": "object"
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
},
|
|
940
|
+
"info": {
|
|
941
|
+
"title": "Knowledge Base Agent API",
|
|
942
|
+
"version": "0.1.0"
|
|
943
|
+
},
|
|
944
|
+
"openapi": "3.1.0",
|
|
945
|
+
"paths": {
|
|
946
|
+
"/api/v1/external/agent/archives/{archive_id}": {
|
|
947
|
+
"get": {
|
|
948
|
+
"description": "查询异步归档进度及完整归档回执。",
|
|
949
|
+
"operationId": "get_archive_status",
|
|
950
|
+
"parameters": [
|
|
951
|
+
{
|
|
952
|
+
"in": "path",
|
|
953
|
+
"name": "archive_id",
|
|
954
|
+
"required": true,
|
|
955
|
+
"schema": {
|
|
956
|
+
"title": "Archive Id",
|
|
957
|
+
"type": "string"
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
],
|
|
961
|
+
"responses": {
|
|
962
|
+
"200": {
|
|
963
|
+
"content": {
|
|
964
|
+
"application/json": {
|
|
965
|
+
"schema": {
|
|
966
|
+
"additionalProperties": true,
|
|
967
|
+
"title": "Response Get Archive Status",
|
|
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": "Get Archive Status",
|
|
986
|
+
"tags": [
|
|
987
|
+
"agent-tools"
|
|
988
|
+
],
|
|
989
|
+
"x-mcp-annotations": {
|
|
990
|
+
"destructiveHint": false,
|
|
991
|
+
"idempotentHint": true,
|
|
992
|
+
"openWorldHint": true,
|
|
993
|
+
"readOnlyHint": true
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
},
|
|
997
|
+
"/api/v1/external/agent/archives/{archive_id}/retry": {
|
|
998
|
+
"post": {
|
|
999
|
+
"description": "重试异步归档任务中保留了源文件的失败项。",
|
|
1000
|
+
"operationId": "retry_archive",
|
|
1001
|
+
"parameters": [
|
|
1002
|
+
{
|
|
1003
|
+
"in": "path",
|
|
1004
|
+
"name": "archive_id",
|
|
1005
|
+
"required": true,
|
|
1006
|
+
"schema": {
|
|
1007
|
+
"title": "Archive Id",
|
|
1008
|
+
"type": "string"
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
],
|
|
1012
|
+
"responses": {
|
|
1013
|
+
"200": {
|
|
1014
|
+
"content": {
|
|
1015
|
+
"application/json": {
|
|
1016
|
+
"schema": {
|
|
1017
|
+
"additionalProperties": true,
|
|
1018
|
+
"title": "Response Retry Archive",
|
|
1019
|
+
"type": "object"
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
},
|
|
1023
|
+
"description": "Successful Response"
|
|
1024
|
+
},
|
|
1025
|
+
"422": {
|
|
1026
|
+
"content": {
|
|
1027
|
+
"application/json": {
|
|
1028
|
+
"schema": {
|
|
1029
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
},
|
|
1033
|
+
"description": "Validation Error"
|
|
1034
|
+
}
|
|
1035
|
+
},
|
|
1036
|
+
"summary": "Retry Archive",
|
|
1037
|
+
"tags": [
|
|
1038
|
+
"agent-tools"
|
|
1039
|
+
],
|
|
1040
|
+
"x-mcp-annotations": {
|
|
1041
|
+
"destructiveHint": true,
|
|
1042
|
+
"idempotentHint": false,
|
|
1043
|
+
"openWorldHint": true,
|
|
1044
|
+
"readOnlyHint": false
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
},
|
|
1048
|
+
"/api/v1/external/agent/collections": {
|
|
1049
|
+
"get": {
|
|
1050
|
+
"description": "列出当前平台可用的知识库。\n\n返回知识库列表,包含 collection_id、名称、描述、文档数量等信息。\n建议在首次检索前先调用此工具,了解有哪些知识库可用。\n权限按知识库所有者、指定成员和“全体成员”授权实时计算。\n\nReturns:\n JSON 对象,包含 collections 列表和 total 总数",
|
|
1051
|
+
"operationId": "list_knowledge_bases",
|
|
1052
|
+
"responses": {
|
|
1053
|
+
"200": {
|
|
1054
|
+
"content": {
|
|
1055
|
+
"application/json": {
|
|
1056
|
+
"schema": {
|
|
1057
|
+
"additionalProperties": true,
|
|
1058
|
+
"title": "Response List Knowledge Bases",
|
|
1059
|
+
"type": "object"
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
},
|
|
1063
|
+
"description": "Successful Response"
|
|
1064
|
+
}
|
|
1065
|
+
},
|
|
1066
|
+
"summary": "List Knowledge Bases",
|
|
1067
|
+
"tags": [
|
|
1068
|
+
"agent-tools"
|
|
1069
|
+
],
|
|
1070
|
+
"x-mcp-annotations": {
|
|
1071
|
+
"destructiveHint": false,
|
|
1072
|
+
"idempotentHint": true,
|
|
1073
|
+
"openWorldHint": true,
|
|
1074
|
+
"readOnlyHint": true
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
},
|
|
1078
|
+
"/api/v1/external/agent/documents/{document_id}/download-ticket": {
|
|
1079
|
+
"get": {
|
|
1080
|
+
"description": "获取当前有权读取原件的短期下载链接。直连 OSS 时不要附加 KB 登录头。\n\nURL 是短期能力凭证,不应写入日志或长期保存;过期后重新调用本工具。",
|
|
1081
|
+
"operationId": "get_document_download",
|
|
1082
|
+
"parameters": [
|
|
1083
|
+
{
|
|
1084
|
+
"in": "path",
|
|
1085
|
+
"name": "document_id",
|
|
1086
|
+
"required": true,
|
|
1087
|
+
"schema": {
|
|
1088
|
+
"title": "Document Id",
|
|
1089
|
+
"type": "string"
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
],
|
|
1093
|
+
"responses": {
|
|
1094
|
+
"200": {
|
|
1095
|
+
"content": {
|
|
1096
|
+
"application/json": {
|
|
1097
|
+
"schema": {
|
|
1098
|
+
"additionalProperties": true,
|
|
1099
|
+
"title": "Response Get Document Download",
|
|
1100
|
+
"type": "object"
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
},
|
|
1104
|
+
"description": "Successful Response"
|
|
1105
|
+
},
|
|
1106
|
+
"422": {
|
|
1107
|
+
"content": {
|
|
1108
|
+
"application/json": {
|
|
1109
|
+
"schema": {
|
|
1110
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
},
|
|
1114
|
+
"description": "Validation Error"
|
|
1115
|
+
}
|
|
1116
|
+
},
|
|
1117
|
+
"summary": "Get Document Download",
|
|
1118
|
+
"tags": [
|
|
1119
|
+
"agent-tools"
|
|
1120
|
+
],
|
|
1121
|
+
"x-mcp-annotations": {
|
|
1122
|
+
"destructiveHint": false,
|
|
1123
|
+
"idempotentHint": true,
|
|
1124
|
+
"openWorldHint": true,
|
|
1125
|
+
"readOnlyHint": true
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
},
|
|
1129
|
+
"/api/v1/external/agent/search": {
|
|
1130
|
+
"post": {
|
|
1131
|
+
"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",
|
|
1132
|
+
"operationId": "search_knowledge_base",
|
|
1133
|
+
"requestBody": {
|
|
1134
|
+
"content": {
|
|
1135
|
+
"application/json": {
|
|
1136
|
+
"schema": {
|
|
1137
|
+
"$ref": "#/components/schemas/Body_search_knowledge_base"
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
},
|
|
1141
|
+
"required": true
|
|
1142
|
+
},
|
|
1143
|
+
"responses": {
|
|
1144
|
+
"200": {
|
|
1145
|
+
"content": {
|
|
1146
|
+
"application/json": {
|
|
1147
|
+
"schema": {
|
|
1148
|
+
"additionalProperties": true,
|
|
1149
|
+
"title": "Response Search Knowledge Base",
|
|
1150
|
+
"type": "object"
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
},
|
|
1154
|
+
"description": "Successful Response"
|
|
1155
|
+
},
|
|
1156
|
+
"422": {
|
|
1157
|
+
"content": {
|
|
1158
|
+
"application/json": {
|
|
1159
|
+
"schema": {
|
|
1160
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
},
|
|
1164
|
+
"description": "Validation Error"
|
|
1165
|
+
}
|
|
1166
|
+
},
|
|
1167
|
+
"summary": "Search Knowledge Base",
|
|
1168
|
+
"tags": [
|
|
1169
|
+
"agent-tools"
|
|
1170
|
+
],
|
|
1171
|
+
"x-mcp-annotations": {
|
|
1172
|
+
"destructiveHint": false,
|
|
1173
|
+
"idempotentHint": true,
|
|
1174
|
+
"openWorldHint": true,
|
|
1175
|
+
"readOnlyHint": true
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
},
|
|
1179
|
+
"/api/v1/external/agent/task-collections": {
|
|
1180
|
+
"post": {
|
|
1181
|
+
"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、名称、可见性和任务归档信息。",
|
|
1182
|
+
"operationId": "create_task_knowledge_base",
|
|
1183
|
+
"requestBody": {
|
|
1184
|
+
"content": {
|
|
1185
|
+
"application/json": {
|
|
1186
|
+
"schema": {
|
|
1187
|
+
"$ref": "#/components/schemas/Body_create_task_knowledge_base"
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
},
|
|
1191
|
+
"required": true
|
|
1192
|
+
},
|
|
1193
|
+
"responses": {
|
|
1194
|
+
"200": {
|
|
1195
|
+
"content": {
|
|
1196
|
+
"application/json": {
|
|
1197
|
+
"schema": {
|
|
1198
|
+
"additionalProperties": true,
|
|
1199
|
+
"title": "Response Create Task Knowledge Base",
|
|
1200
|
+
"type": "object"
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
},
|
|
1204
|
+
"description": "Successful Response"
|
|
1205
|
+
},
|
|
1206
|
+
"422": {
|
|
1207
|
+
"content": {
|
|
1208
|
+
"application/json": {
|
|
1209
|
+
"schema": {
|
|
1210
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
},
|
|
1214
|
+
"description": "Validation Error"
|
|
1215
|
+
}
|
|
1216
|
+
},
|
|
1217
|
+
"summary": "Create Task Knowledge Base",
|
|
1218
|
+
"tags": [
|
|
1219
|
+
"agent-tools"
|
|
1220
|
+
],
|
|
1221
|
+
"x-mcp-annotations": {
|
|
1222
|
+
"destructiveHint": false,
|
|
1223
|
+
"idempotentHint": false,
|
|
1224
|
+
"openWorldHint": true,
|
|
1225
|
+
"readOnlyHint": false
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
},
|
|
1229
|
+
"/api/v1/external/agent/upload-sessions": {
|
|
1230
|
+
"post": {
|
|
1231
|
+
"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 必须对应相同文件内容及选项。链接不得日志输出或长期保存。",
|
|
1232
|
+
"operationId": "begin_direct_upload",
|
|
1233
|
+
"requestBody": {
|
|
1234
|
+
"content": {
|
|
1235
|
+
"application/json": {
|
|
1236
|
+
"schema": {
|
|
1237
|
+
"$ref": "#/components/schemas/Body_begin_direct_upload"
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
},
|
|
1241
|
+
"required": true
|
|
1242
|
+
},
|
|
1243
|
+
"responses": {
|
|
1244
|
+
"200": {
|
|
1245
|
+
"content": {
|
|
1246
|
+
"application/json": {
|
|
1247
|
+
"schema": {
|
|
1248
|
+
"additionalProperties": true,
|
|
1249
|
+
"title": "Response Begin Direct Upload",
|
|
1250
|
+
"type": "object"
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
},
|
|
1254
|
+
"description": "Successful Response"
|
|
1255
|
+
},
|
|
1256
|
+
"422": {
|
|
1257
|
+
"content": {
|
|
1258
|
+
"application/json": {
|
|
1259
|
+
"schema": {
|
|
1260
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
},
|
|
1264
|
+
"description": "Validation Error"
|
|
1265
|
+
}
|
|
1266
|
+
},
|
|
1267
|
+
"summary": "Begin Direct Upload",
|
|
1268
|
+
"tags": [
|
|
1269
|
+
"agent-tools"
|
|
1270
|
+
],
|
|
1271
|
+
"x-mcp-annotations": {
|
|
1272
|
+
"destructiveHint": false,
|
|
1273
|
+
"idempotentHint": true,
|
|
1274
|
+
"openWorldHint": true,
|
|
1275
|
+
"readOnlyHint": false
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
},
|
|
1279
|
+
"/api/v1/external/agent/upload-sessions/{session_id}": {
|
|
1280
|
+
"delete": {
|
|
1281
|
+
"description": "取消尚未提交的直传会话,服务端保留状态并安排无引用对象清理。",
|
|
1282
|
+
"operationId": "cancel_direct_upload",
|
|
1283
|
+
"parameters": [
|
|
1284
|
+
{
|
|
1285
|
+
"in": "path",
|
|
1286
|
+
"name": "session_id",
|
|
1287
|
+
"required": true,
|
|
1288
|
+
"schema": {
|
|
1289
|
+
"title": "Session Id",
|
|
1290
|
+
"type": "string"
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
],
|
|
1294
|
+
"responses": {
|
|
1295
|
+
"200": {
|
|
1296
|
+
"content": {
|
|
1297
|
+
"application/json": {
|
|
1298
|
+
"schema": {
|
|
1299
|
+
"additionalProperties": true,
|
|
1300
|
+
"title": "Response Cancel Direct Upload",
|
|
1301
|
+
"type": "object"
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
},
|
|
1305
|
+
"description": "Successful Response"
|
|
1306
|
+
},
|
|
1307
|
+
"422": {
|
|
1308
|
+
"content": {
|
|
1309
|
+
"application/json": {
|
|
1310
|
+
"schema": {
|
|
1311
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
},
|
|
1315
|
+
"description": "Validation Error"
|
|
1316
|
+
}
|
|
1317
|
+
},
|
|
1318
|
+
"summary": "Cancel Direct Upload",
|
|
1319
|
+
"tags": [
|
|
1320
|
+
"agent-tools"
|
|
1321
|
+
],
|
|
1322
|
+
"x-mcp-annotations": {
|
|
1323
|
+
"destructiveHint": true,
|
|
1324
|
+
"idempotentHint": true,
|
|
1325
|
+
"openWorldHint": true,
|
|
1326
|
+
"readOnlyHint": false
|
|
1327
|
+
}
|
|
1328
|
+
},
|
|
1329
|
+
"get": {
|
|
1330
|
+
"description": "查询服务端保存的直传进度;renew=true 为尚未上传的对象重新签发短期链接。",
|
|
1331
|
+
"operationId": "get_direct_upload",
|
|
1332
|
+
"parameters": [
|
|
1333
|
+
{
|
|
1334
|
+
"in": "path",
|
|
1335
|
+
"name": "session_id",
|
|
1336
|
+
"required": true,
|
|
1337
|
+
"schema": {
|
|
1338
|
+
"title": "Session Id",
|
|
1339
|
+
"type": "string"
|
|
1340
|
+
}
|
|
1341
|
+
},
|
|
1342
|
+
{
|
|
1343
|
+
"in": "query",
|
|
1344
|
+
"name": "renew",
|
|
1345
|
+
"required": false,
|
|
1346
|
+
"schema": {
|
|
1347
|
+
"default": false,
|
|
1348
|
+
"title": "Renew",
|
|
1349
|
+
"type": "boolean"
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
],
|
|
1353
|
+
"responses": {
|
|
1354
|
+
"200": {
|
|
1355
|
+
"content": {
|
|
1356
|
+
"application/json": {
|
|
1357
|
+
"schema": {
|
|
1358
|
+
"additionalProperties": true,
|
|
1359
|
+
"title": "Response Get Direct Upload",
|
|
1360
|
+
"type": "object"
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
},
|
|
1364
|
+
"description": "Successful Response"
|
|
1365
|
+
},
|
|
1366
|
+
"422": {
|
|
1367
|
+
"content": {
|
|
1368
|
+
"application/json": {
|
|
1369
|
+
"schema": {
|
|
1370
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
},
|
|
1374
|
+
"description": "Validation Error"
|
|
1375
|
+
}
|
|
1376
|
+
},
|
|
1377
|
+
"summary": "Get Direct Upload",
|
|
1378
|
+
"tags": [
|
|
1379
|
+
"agent-tools"
|
|
1380
|
+
],
|
|
1381
|
+
"x-mcp-annotations": {
|
|
1382
|
+
"destructiveHint": false,
|
|
1383
|
+
"idempotentHint": false,
|
|
1384
|
+
"openWorldHint": true,
|
|
1385
|
+
"readOnlyHint": false
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
},
|
|
1389
|
+
"/api/v1/external/agent/upload-sessions/{session_id}/complete": {
|
|
1390
|
+
"post": {
|
|
1391
|
+
"description": "让服务端核对 OSS 对象并提交持久解析任务。可幂等重试,后台仍将核验完整 SHA256。",
|
|
1392
|
+
"operationId": "complete_direct_upload",
|
|
1393
|
+
"parameters": [
|
|
1394
|
+
{
|
|
1395
|
+
"in": "path",
|
|
1396
|
+
"name": "session_id",
|
|
1397
|
+
"required": true,
|
|
1398
|
+
"schema": {
|
|
1399
|
+
"title": "Session Id",
|
|
1400
|
+
"type": "string"
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
],
|
|
1404
|
+
"responses": {
|
|
1405
|
+
"200": {
|
|
1406
|
+
"content": {
|
|
1407
|
+
"application/json": {
|
|
1408
|
+
"schema": {
|
|
1409
|
+
"additionalProperties": true,
|
|
1410
|
+
"title": "Response Complete Direct Upload",
|
|
1411
|
+
"type": "object"
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
},
|
|
1415
|
+
"description": "Successful Response"
|
|
1416
|
+
},
|
|
1417
|
+
"422": {
|
|
1418
|
+
"content": {
|
|
1419
|
+
"application/json": {
|
|
1420
|
+
"schema": {
|
|
1421
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
},
|
|
1425
|
+
"description": "Validation Error"
|
|
1426
|
+
}
|
|
1427
|
+
},
|
|
1428
|
+
"summary": "Complete Direct Upload",
|
|
1429
|
+
"tags": [
|
|
1430
|
+
"agent-tools"
|
|
1431
|
+
],
|
|
1432
|
+
"x-mcp-annotations": {
|
|
1433
|
+
"destructiveHint": true,
|
|
1434
|
+
"idempotentHint": true,
|
|
1435
|
+
"openWorldHint": true,
|
|
1436
|
+
"readOnlyHint": false
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
},
|
|
1440
|
+
"/api/v1/external/batches/{batch_id}": {
|
|
1441
|
+
"get": {
|
|
1442
|
+
"operationId": "get_external_batch_api_v1_external_batches__batch_id__get",
|
|
1443
|
+
"parameters": [
|
|
1444
|
+
{
|
|
1445
|
+
"in": "path",
|
|
1446
|
+
"name": "batch_id",
|
|
1447
|
+
"required": true,
|
|
1448
|
+
"schema": {
|
|
1449
|
+
"title": "Batch Id",
|
|
1450
|
+
"type": "string"
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
],
|
|
1454
|
+
"responses": {
|
|
1455
|
+
"200": {
|
|
1456
|
+
"content": {
|
|
1457
|
+
"application/json": {
|
|
1458
|
+
"schema": {
|
|
1459
|
+
"additionalProperties": true,
|
|
1460
|
+
"title": "Response Get External Batch Api V1 External Batches Batch Id Get",
|
|
1461
|
+
"type": "object"
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
},
|
|
1465
|
+
"description": "Successful Response"
|
|
1466
|
+
},
|
|
1467
|
+
"422": {
|
|
1468
|
+
"content": {
|
|
1469
|
+
"application/json": {
|
|
1470
|
+
"schema": {
|
|
1471
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
},
|
|
1475
|
+
"description": "Validation Error"
|
|
1476
|
+
}
|
|
1477
|
+
},
|
|
1478
|
+
"summary": "Get External Batch",
|
|
1479
|
+
"tags": [
|
|
1480
|
+
"external-interfaces"
|
|
1481
|
+
]
|
|
1482
|
+
}
|
|
1483
|
+
},
|
|
1484
|
+
"/api/v1/external/batches/{batch_id}/resolve": {
|
|
1485
|
+
"post": {
|
|
1486
|
+
"description": "Resolve selected per-file conflicts and resume ready files.",
|
|
1487
|
+
"operationId": "resolve_external_batch_conflicts_api_v1_external_batches__batch_id__resolve_post",
|
|
1488
|
+
"parameters": [
|
|
1489
|
+
{
|
|
1490
|
+
"in": "path",
|
|
1491
|
+
"name": "batch_id",
|
|
1492
|
+
"required": true,
|
|
1493
|
+
"schema": {
|
|
1494
|
+
"title": "Batch Id",
|
|
1495
|
+
"type": "string"
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
],
|
|
1499
|
+
"requestBody": {
|
|
1500
|
+
"content": {
|
|
1501
|
+
"application/json": {
|
|
1502
|
+
"schema": {
|
|
1503
|
+
"$ref": "#/components/schemas/ExternalBatchResolutionBody"
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
},
|
|
1507
|
+
"required": true
|
|
1508
|
+
},
|
|
1509
|
+
"responses": {
|
|
1510
|
+
"202": {
|
|
1511
|
+
"content": {
|
|
1512
|
+
"application/json": {
|
|
1513
|
+
"schema": {
|
|
1514
|
+
"additionalProperties": true,
|
|
1515
|
+
"title": "Response Resolve External Batch Conflicts Api V1 External Batches Batch Id Resolve Post",
|
|
1516
|
+
"type": "object"
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
},
|
|
1520
|
+
"description": "Successful Response"
|
|
1521
|
+
},
|
|
1522
|
+
"422": {
|
|
1523
|
+
"content": {
|
|
1524
|
+
"application/json": {
|
|
1525
|
+
"schema": {
|
|
1526
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
},
|
|
1530
|
+
"description": "Validation Error"
|
|
1531
|
+
}
|
|
1532
|
+
},
|
|
1533
|
+
"summary": "Resolve External Batch Conflicts",
|
|
1534
|
+
"tags": [
|
|
1535
|
+
"external-interfaces"
|
|
1536
|
+
]
|
|
1537
|
+
}
|
|
1538
|
+
},
|
|
1539
|
+
"/api/v1/external/batches/{batch_id}/retry": {
|
|
1540
|
+
"post": {
|
|
1541
|
+
"operationId": "retry_external_batch_api_v1_external_batches__batch_id__retry_post",
|
|
1542
|
+
"parameters": [
|
|
1543
|
+
{
|
|
1544
|
+
"in": "path",
|
|
1545
|
+
"name": "batch_id",
|
|
1546
|
+
"required": true,
|
|
1547
|
+
"schema": {
|
|
1548
|
+
"title": "Batch Id",
|
|
1549
|
+
"type": "string"
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
],
|
|
1553
|
+
"responses": {
|
|
1554
|
+
"202": {
|
|
1555
|
+
"content": {
|
|
1556
|
+
"application/json": {
|
|
1557
|
+
"schema": {
|
|
1558
|
+
"additionalProperties": true,
|
|
1559
|
+
"title": "Response Retry External Batch Api V1 External Batches Batch Id Retry Post",
|
|
1560
|
+
"type": "object"
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
},
|
|
1564
|
+
"description": "Successful Response"
|
|
1565
|
+
},
|
|
1566
|
+
"422": {
|
|
1567
|
+
"content": {
|
|
1568
|
+
"application/json": {
|
|
1569
|
+
"schema": {
|
|
1570
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
},
|
|
1574
|
+
"description": "Validation Error"
|
|
1575
|
+
}
|
|
1576
|
+
},
|
|
1577
|
+
"summary": "Retry External Batch",
|
|
1578
|
+
"tags": [
|
|
1579
|
+
"external-interfaces"
|
|
1580
|
+
]
|
|
1581
|
+
}
|
|
1582
|
+
},
|
|
1583
|
+
"/api/v1/kb/batch/{batch_id}/cancel": {
|
|
1584
|
+
"post": {
|
|
1585
|
+
"operationId": "cancel_batch_api_v1_kb_batch__batch_id__cancel_post",
|
|
1586
|
+
"parameters": [
|
|
1587
|
+
{
|
|
1588
|
+
"in": "path",
|
|
1589
|
+
"name": "batch_id",
|
|
1590
|
+
"required": true,
|
|
1591
|
+
"schema": {
|
|
1592
|
+
"title": "Batch Id",
|
|
1593
|
+
"type": "string"
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
],
|
|
1597
|
+
"responses": {
|
|
1598
|
+
"200": {
|
|
1599
|
+
"content": {
|
|
1600
|
+
"application/json": {
|
|
1601
|
+
"schema": {}
|
|
1602
|
+
}
|
|
1603
|
+
},
|
|
1604
|
+
"description": "Successful Response"
|
|
1605
|
+
},
|
|
1606
|
+
"422": {
|
|
1607
|
+
"content": {
|
|
1608
|
+
"application/json": {
|
|
1609
|
+
"schema": {
|
|
1610
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
},
|
|
1614
|
+
"description": "Validation Error"
|
|
1615
|
+
}
|
|
1616
|
+
},
|
|
1617
|
+
"summary": "Cancel Batch",
|
|
1618
|
+
"tags": [
|
|
1619
|
+
"knowledge-base"
|
|
1620
|
+
]
|
|
1621
|
+
}
|
|
1622
|
+
},
|
|
1623
|
+
"/api/v1/kb/batches": {
|
|
1624
|
+
"get": {
|
|
1625
|
+
"description": "列出最近的批量上传任务。",
|
|
1626
|
+
"operationId": "list_batches_api_v1_kb_batches_get",
|
|
1627
|
+
"parameters": [
|
|
1628
|
+
{
|
|
1629
|
+
"in": "query",
|
|
1630
|
+
"name": "limit",
|
|
1631
|
+
"required": false,
|
|
1632
|
+
"schema": {
|
|
1633
|
+
"default": 20,
|
|
1634
|
+
"maximum": 100,
|
|
1635
|
+
"minimum": 1,
|
|
1636
|
+
"title": "Limit",
|
|
1637
|
+
"type": "integer"
|
|
1638
|
+
}
|
|
1639
|
+
},
|
|
1640
|
+
{
|
|
1641
|
+
"in": "query",
|
|
1642
|
+
"name": "offset",
|
|
1643
|
+
"required": false,
|
|
1644
|
+
"schema": {
|
|
1645
|
+
"default": 0,
|
|
1646
|
+
"minimum": 0,
|
|
1647
|
+
"title": "Offset",
|
|
1648
|
+
"type": "integer"
|
|
1649
|
+
}
|
|
1650
|
+
},
|
|
1651
|
+
{
|
|
1652
|
+
"in": "query",
|
|
1653
|
+
"name": "collection_id",
|
|
1654
|
+
"required": false,
|
|
1655
|
+
"schema": {
|
|
1656
|
+
"anyOf": [
|
|
1657
|
+
{
|
|
1658
|
+
"type": "string"
|
|
1659
|
+
},
|
|
1660
|
+
{
|
|
1661
|
+
"type": "null"
|
|
1662
|
+
}
|
|
1663
|
+
],
|
|
1664
|
+
"title": "Collection Id"
|
|
1665
|
+
}
|
|
1666
|
+
},
|
|
1667
|
+
{
|
|
1668
|
+
"in": "query",
|
|
1669
|
+
"name": "status",
|
|
1670
|
+
"required": false,
|
|
1671
|
+
"schema": {
|
|
1672
|
+
"anyOf": [
|
|
1673
|
+
{
|
|
1674
|
+
"type": "string"
|
|
1675
|
+
},
|
|
1676
|
+
{
|
|
1677
|
+
"type": "null"
|
|
1678
|
+
}
|
|
1679
|
+
],
|
|
1680
|
+
"title": "Status"
|
|
1681
|
+
}
|
|
1682
|
+
},
|
|
1683
|
+
{
|
|
1684
|
+
"in": "query",
|
|
1685
|
+
"name": "include_files",
|
|
1686
|
+
"required": false,
|
|
1687
|
+
"schema": {
|
|
1688
|
+
"default": true,
|
|
1689
|
+
"title": "Include Files",
|
|
1690
|
+
"type": "boolean"
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
],
|
|
1694
|
+
"responses": {
|
|
1695
|
+
"200": {
|
|
1696
|
+
"content": {
|
|
1697
|
+
"application/json": {
|
|
1698
|
+
"schema": {}
|
|
1699
|
+
}
|
|
1700
|
+
},
|
|
1701
|
+
"description": "Successful Response"
|
|
1702
|
+
},
|
|
1703
|
+
"422": {
|
|
1704
|
+
"content": {
|
|
1705
|
+
"application/json": {
|
|
1706
|
+
"schema": {
|
|
1707
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
},
|
|
1711
|
+
"description": "Validation Error"
|
|
1712
|
+
}
|
|
1713
|
+
},
|
|
1714
|
+
"summary": "List Batches",
|
|
1715
|
+
"tags": [
|
|
1716
|
+
"knowledge-base"
|
|
1717
|
+
]
|
|
1718
|
+
}
|
|
1719
|
+
},
|
|
1720
|
+
"/api/v1/kb/chat/sessions": {
|
|
1721
|
+
"get": {
|
|
1722
|
+
"operationId": "get_chat_sessions_api_v1_kb_chat_sessions_get",
|
|
1723
|
+
"responses": {
|
|
1724
|
+
"200": {
|
|
1725
|
+
"content": {
|
|
1726
|
+
"application/json": {
|
|
1727
|
+
"schema": {}
|
|
1728
|
+
}
|
|
1729
|
+
},
|
|
1730
|
+
"description": "Successful Response"
|
|
1731
|
+
}
|
|
1732
|
+
},
|
|
1733
|
+
"summary": "Get Chat Sessions",
|
|
1734
|
+
"tags": [
|
|
1735
|
+
"knowledge-base"
|
|
1736
|
+
]
|
|
1737
|
+
},
|
|
1738
|
+
"post": {
|
|
1739
|
+
"operationId": "create_rag_chat_session_api_v1_kb_chat_sessions_post",
|
|
1740
|
+
"requestBody": {
|
|
1741
|
+
"content": {
|
|
1742
|
+
"application/json": {
|
|
1743
|
+
"schema": {
|
|
1744
|
+
"$ref": "#/components/schemas/ChatSessionCreateBody"
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
},
|
|
1748
|
+
"required": true
|
|
1749
|
+
},
|
|
1750
|
+
"responses": {
|
|
1751
|
+
"201": {
|
|
1752
|
+
"content": {
|
|
1753
|
+
"application/json": {
|
|
1754
|
+
"schema": {}
|
|
1755
|
+
}
|
|
1756
|
+
},
|
|
1757
|
+
"description": "Successful Response"
|
|
1758
|
+
},
|
|
1759
|
+
"422": {
|
|
1760
|
+
"content": {
|
|
1761
|
+
"application/json": {
|
|
1762
|
+
"schema": {
|
|
1763
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
},
|
|
1767
|
+
"description": "Validation Error"
|
|
1768
|
+
}
|
|
1769
|
+
},
|
|
1770
|
+
"summary": "Create Rag Chat Session",
|
|
1771
|
+
"tags": [
|
|
1772
|
+
"knowledge-base"
|
|
1773
|
+
]
|
|
1774
|
+
}
|
|
1775
|
+
},
|
|
1776
|
+
"/api/v1/kb/chat/sessions/{session_id}": {
|
|
1777
|
+
"delete": {
|
|
1778
|
+
"operationId": "delete_rag_chat_session_api_v1_kb_chat_sessions__session_id__delete",
|
|
1779
|
+
"parameters": [
|
|
1780
|
+
{
|
|
1781
|
+
"in": "path",
|
|
1782
|
+
"name": "session_id",
|
|
1783
|
+
"required": true,
|
|
1784
|
+
"schema": {
|
|
1785
|
+
"title": "Session Id",
|
|
1786
|
+
"type": "string"
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
],
|
|
1790
|
+
"responses": {
|
|
1791
|
+
"204": {
|
|
1792
|
+
"description": "Successful Response"
|
|
1793
|
+
},
|
|
1794
|
+
"422": {
|
|
1795
|
+
"content": {
|
|
1796
|
+
"application/json": {
|
|
1797
|
+
"schema": {
|
|
1798
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
},
|
|
1802
|
+
"description": "Validation Error"
|
|
1803
|
+
}
|
|
1804
|
+
},
|
|
1805
|
+
"summary": "Delete Rag Chat Session",
|
|
1806
|
+
"tags": [
|
|
1807
|
+
"knowledge-base"
|
|
1808
|
+
]
|
|
1809
|
+
},
|
|
1810
|
+
"get": {
|
|
1811
|
+
"operationId": "get_rag_chat_session_api_v1_kb_chat_sessions__session_id__get",
|
|
1812
|
+
"parameters": [
|
|
1813
|
+
{
|
|
1814
|
+
"in": "path",
|
|
1815
|
+
"name": "session_id",
|
|
1816
|
+
"required": true,
|
|
1817
|
+
"schema": {
|
|
1818
|
+
"title": "Session Id",
|
|
1819
|
+
"type": "string"
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
],
|
|
1823
|
+
"responses": {
|
|
1824
|
+
"200": {
|
|
1825
|
+
"content": {
|
|
1826
|
+
"application/json": {
|
|
1827
|
+
"schema": {}
|
|
1828
|
+
}
|
|
1829
|
+
},
|
|
1830
|
+
"description": "Successful Response"
|
|
1831
|
+
},
|
|
1832
|
+
"422": {
|
|
1833
|
+
"content": {
|
|
1834
|
+
"application/json": {
|
|
1835
|
+
"schema": {
|
|
1836
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
},
|
|
1840
|
+
"description": "Validation Error"
|
|
1841
|
+
}
|
|
1842
|
+
},
|
|
1843
|
+
"summary": "Get Rag Chat Session",
|
|
1844
|
+
"tags": [
|
|
1845
|
+
"knowledge-base"
|
|
1846
|
+
]
|
|
1847
|
+
}
|
|
1848
|
+
},
|
|
1849
|
+
"/api/v1/kb/chat/stream": {
|
|
1850
|
+
"post": {
|
|
1851
|
+
"description": "RAG 知识库对话(流式 SSE)。\n\n The first SSE event is: ``data: [META] <json with chunks & sources>\n\n``\n Subsequent events are plain text chunks: ``data: <text>\n\n``",
|
|
1852
|
+
"operationId": "chat_rag_stream_api_v1_kb_chat_stream_post",
|
|
1853
|
+
"requestBody": {
|
|
1854
|
+
"content": {
|
|
1855
|
+
"application/json": {
|
|
1856
|
+
"schema": {
|
|
1857
|
+
"$ref": "#/components/schemas/ChatRequest"
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
},
|
|
1861
|
+
"required": true
|
|
1862
|
+
},
|
|
1863
|
+
"responses": {
|
|
1864
|
+
"200": {
|
|
1865
|
+
"content": {
|
|
1866
|
+
"application/json": {
|
|
1867
|
+
"schema": {}
|
|
1868
|
+
}
|
|
1869
|
+
},
|
|
1870
|
+
"description": "Successful Response"
|
|
1871
|
+
},
|
|
1872
|
+
"422": {
|
|
1873
|
+
"content": {
|
|
1874
|
+
"application/json": {
|
|
1875
|
+
"schema": {
|
|
1876
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
},
|
|
1880
|
+
"description": "Validation Error"
|
|
1881
|
+
}
|
|
1882
|
+
},
|
|
1883
|
+
"summary": "Chat Rag Stream",
|
|
1884
|
+
"tags": [
|
|
1885
|
+
"knowledge-base"
|
|
1886
|
+
]
|
|
1887
|
+
}
|
|
1888
|
+
},
|
|
1889
|
+
"/api/v1/kb/collections/{collection_id}": {
|
|
1890
|
+
"delete": {
|
|
1891
|
+
"operationId": "delete_collection_api_v1_kb_collections__collection_id__delete",
|
|
1892
|
+
"parameters": [
|
|
1893
|
+
{
|
|
1894
|
+
"in": "path",
|
|
1895
|
+
"name": "collection_id",
|
|
1896
|
+
"required": true,
|
|
1897
|
+
"schema": {
|
|
1898
|
+
"title": "Collection Id",
|
|
1899
|
+
"type": "string"
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
],
|
|
1903
|
+
"responses": {
|
|
1904
|
+
"204": {
|
|
1905
|
+
"description": "Successful Response"
|
|
1906
|
+
},
|
|
1907
|
+
"422": {
|
|
1908
|
+
"content": {
|
|
1909
|
+
"application/json": {
|
|
1910
|
+
"schema": {
|
|
1911
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
},
|
|
1915
|
+
"description": "Validation Error"
|
|
1916
|
+
}
|
|
1917
|
+
},
|
|
1918
|
+
"summary": "Delete Collection",
|
|
1919
|
+
"tags": [
|
|
1920
|
+
"knowledge-base"
|
|
1921
|
+
]
|
|
1922
|
+
},
|
|
1923
|
+
"get": {
|
|
1924
|
+
"operationId": "get_collection_api_v1_kb_collections__collection_id__get",
|
|
1925
|
+
"parameters": [
|
|
1926
|
+
{
|
|
1927
|
+
"in": "path",
|
|
1928
|
+
"name": "collection_id",
|
|
1929
|
+
"required": true,
|
|
1930
|
+
"schema": {
|
|
1931
|
+
"title": "Collection Id",
|
|
1932
|
+
"type": "string"
|
|
1933
|
+
}
|
|
1934
|
+
}
|
|
1935
|
+
],
|
|
1936
|
+
"responses": {
|
|
1937
|
+
"200": {
|
|
1938
|
+
"content": {
|
|
1939
|
+
"application/json": {
|
|
1940
|
+
"schema": {}
|
|
1941
|
+
}
|
|
1942
|
+
},
|
|
1943
|
+
"description": "Successful Response"
|
|
1944
|
+
},
|
|
1945
|
+
"422": {
|
|
1946
|
+
"content": {
|
|
1947
|
+
"application/json": {
|
|
1948
|
+
"schema": {
|
|
1949
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
},
|
|
1953
|
+
"description": "Validation Error"
|
|
1954
|
+
}
|
|
1955
|
+
},
|
|
1956
|
+
"summary": "Get Collection",
|
|
1957
|
+
"tags": [
|
|
1958
|
+
"knowledge-base"
|
|
1959
|
+
]
|
|
1960
|
+
},
|
|
1961
|
+
"put": {
|
|
1962
|
+
"operationId": "update_collection_api_v1_kb_collections__collection_id__put",
|
|
1963
|
+
"parameters": [
|
|
1964
|
+
{
|
|
1965
|
+
"in": "path",
|
|
1966
|
+
"name": "collection_id",
|
|
1967
|
+
"required": true,
|
|
1968
|
+
"schema": {
|
|
1969
|
+
"title": "Collection Id",
|
|
1970
|
+
"type": "string"
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
],
|
|
1974
|
+
"requestBody": {
|
|
1975
|
+
"content": {
|
|
1976
|
+
"application/json": {
|
|
1977
|
+
"schema": {
|
|
1978
|
+
"$ref": "#/components/schemas/UpdateCollectionBody"
|
|
1979
|
+
}
|
|
1980
|
+
}
|
|
1981
|
+
},
|
|
1982
|
+
"required": true
|
|
1983
|
+
},
|
|
1984
|
+
"responses": {
|
|
1985
|
+
"200": {
|
|
1986
|
+
"content": {
|
|
1987
|
+
"application/json": {
|
|
1988
|
+
"schema": {}
|
|
1989
|
+
}
|
|
1990
|
+
},
|
|
1991
|
+
"description": "Successful Response"
|
|
1992
|
+
},
|
|
1993
|
+
"422": {
|
|
1994
|
+
"content": {
|
|
1995
|
+
"application/json": {
|
|
1996
|
+
"schema": {
|
|
1997
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
2000
|
+
},
|
|
2001
|
+
"description": "Validation Error"
|
|
2002
|
+
}
|
|
2003
|
+
},
|
|
2004
|
+
"summary": "Update Collection",
|
|
2005
|
+
"tags": [
|
|
2006
|
+
"knowledge-base"
|
|
2007
|
+
]
|
|
2008
|
+
}
|
|
2009
|
+
},
|
|
2010
|
+
"/api/v1/kb/collections/{collection_id}/members": {
|
|
2011
|
+
"get": {
|
|
2012
|
+
"operationId": "get_collection_members_api_v1_kb_collections__collection_id__members_get",
|
|
2013
|
+
"parameters": [
|
|
2014
|
+
{
|
|
2015
|
+
"in": "path",
|
|
2016
|
+
"name": "collection_id",
|
|
2017
|
+
"required": true,
|
|
2018
|
+
"schema": {
|
|
2019
|
+
"title": "Collection Id",
|
|
2020
|
+
"type": "string"
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
],
|
|
2024
|
+
"responses": {
|
|
2025
|
+
"200": {
|
|
2026
|
+
"content": {
|
|
2027
|
+
"application/json": {
|
|
2028
|
+
"schema": {}
|
|
2029
|
+
}
|
|
2030
|
+
},
|
|
2031
|
+
"description": "Successful Response"
|
|
2032
|
+
},
|
|
2033
|
+
"422": {
|
|
2034
|
+
"content": {
|
|
2035
|
+
"application/json": {
|
|
2036
|
+
"schema": {
|
|
2037
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
2038
|
+
}
|
|
2039
|
+
}
|
|
2040
|
+
},
|
|
2041
|
+
"description": "Validation Error"
|
|
2042
|
+
}
|
|
2043
|
+
},
|
|
2044
|
+
"summary": "Get Collection Members",
|
|
2045
|
+
"tags": [
|
|
2046
|
+
"knowledge-base"
|
|
2047
|
+
]
|
|
2048
|
+
},
|
|
2049
|
+
"put": {
|
|
2050
|
+
"operationId": "save_collection_member_api_v1_kb_collections__collection_id__members_put",
|
|
2051
|
+
"parameters": [
|
|
2052
|
+
{
|
|
2053
|
+
"in": "path",
|
|
2054
|
+
"name": "collection_id",
|
|
2055
|
+
"required": true,
|
|
2056
|
+
"schema": {
|
|
2057
|
+
"title": "Collection Id",
|
|
2058
|
+
"type": "string"
|
|
2059
|
+
}
|
|
2060
|
+
}
|
|
2061
|
+
],
|
|
2062
|
+
"requestBody": {
|
|
2063
|
+
"content": {
|
|
2064
|
+
"application/json": {
|
|
2065
|
+
"schema": {
|
|
2066
|
+
"$ref": "#/components/schemas/CollectionMemberBody"
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2069
|
+
},
|
|
2070
|
+
"required": true
|
|
2071
|
+
},
|
|
2072
|
+
"responses": {
|
|
2073
|
+
"200": {
|
|
2074
|
+
"content": {
|
|
2075
|
+
"application/json": {
|
|
2076
|
+
"schema": {}
|
|
2077
|
+
}
|
|
2078
|
+
},
|
|
2079
|
+
"description": "Successful Response"
|
|
2080
|
+
},
|
|
2081
|
+
"422": {
|
|
2082
|
+
"content": {
|
|
2083
|
+
"application/json": {
|
|
2084
|
+
"schema": {
|
|
2085
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
633
2086
|
}
|
|
634
|
-
|
|
2087
|
+
}
|
|
635
2088
|
},
|
|
636
|
-
"
|
|
637
|
-
|
|
2089
|
+
"description": "Validation Error"
|
|
2090
|
+
}
|
|
2091
|
+
},
|
|
2092
|
+
"summary": "Save Collection Member",
|
|
2093
|
+
"tags": [
|
|
2094
|
+
"knowledge-base"
|
|
2095
|
+
]
|
|
2096
|
+
}
|
|
2097
|
+
},
|
|
2098
|
+
"/api/v1/kb/collections/{collection_id}/members/{global_uid}": {
|
|
2099
|
+
"delete": {
|
|
2100
|
+
"operationId": "revoke_collection_member_api_v1_kb_collections__collection_id__members__global_uid__delete",
|
|
2101
|
+
"parameters": [
|
|
2102
|
+
{
|
|
2103
|
+
"in": "path",
|
|
2104
|
+
"name": "collection_id",
|
|
2105
|
+
"required": true,
|
|
2106
|
+
"schema": {
|
|
2107
|
+
"title": "Collection Id",
|
|
2108
|
+
"type": "string"
|
|
2109
|
+
}
|
|
638
2110
|
},
|
|
639
|
-
|
|
640
|
-
"
|
|
641
|
-
"
|
|
2111
|
+
{
|
|
2112
|
+
"in": "path",
|
|
2113
|
+
"name": "global_uid",
|
|
2114
|
+
"required": true,
|
|
2115
|
+
"schema": {
|
|
2116
|
+
"title": "Global Uid",
|
|
2117
|
+
"type": "string"
|
|
2118
|
+
}
|
|
2119
|
+
}
|
|
2120
|
+
],
|
|
2121
|
+
"responses": {
|
|
2122
|
+
"204": {
|
|
2123
|
+
"description": "Successful Response"
|
|
642
2124
|
},
|
|
643
|
-
"
|
|
644
|
-
"
|
|
645
|
-
|
|
2125
|
+
"422": {
|
|
2126
|
+
"content": {
|
|
2127
|
+
"application/json": {
|
|
2128
|
+
"schema": {
|
|
2129
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
},
|
|
2133
|
+
"description": "Validation Error"
|
|
646
2134
|
}
|
|
647
2135
|
},
|
|
648
|
-
"
|
|
649
|
-
|
|
650
|
-
"
|
|
651
|
-
|
|
652
|
-
],
|
|
653
|
-
"title": "ValidationError",
|
|
654
|
-
"type": "object"
|
|
2136
|
+
"summary": "Revoke Collection Member",
|
|
2137
|
+
"tags": [
|
|
2138
|
+
"knowledge-base"
|
|
2139
|
+
]
|
|
655
2140
|
}
|
|
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": {
|
|
2141
|
+
},
|
|
2142
|
+
"/api/v1/kb/collections/{collection_id}/transfer": {
|
|
665
2143
|
"post": {
|
|
666
|
-
"
|
|
667
|
-
"
|
|
2144
|
+
"operationId": "transfer_collection_api_v1_kb_collections__collection_id__transfer_post",
|
|
2145
|
+
"parameters": [
|
|
2146
|
+
{
|
|
2147
|
+
"in": "path",
|
|
2148
|
+
"name": "collection_id",
|
|
2149
|
+
"required": true,
|
|
2150
|
+
"schema": {
|
|
2151
|
+
"title": "Collection Id",
|
|
2152
|
+
"type": "string"
|
|
2153
|
+
}
|
|
2154
|
+
}
|
|
2155
|
+
],
|
|
668
2156
|
"requestBody": {
|
|
669
2157
|
"content": {
|
|
670
2158
|
"application/json": {
|
|
671
2159
|
"schema": {
|
|
672
|
-
"$ref": "#/components/schemas/
|
|
2160
|
+
"$ref": "#/components/schemas/TransferCollectionBody"
|
|
673
2161
|
}
|
|
674
2162
|
}
|
|
675
2163
|
},
|
|
@@ -677,13 +2165,72 @@
|
|
|
677
2165
|
},
|
|
678
2166
|
"responses": {
|
|
679
2167
|
"200": {
|
|
2168
|
+
"content": {
|
|
2169
|
+
"application/json": {
|
|
2170
|
+
"schema": {}
|
|
2171
|
+
}
|
|
2172
|
+
},
|
|
2173
|
+
"description": "Successful Response"
|
|
2174
|
+
},
|
|
2175
|
+
"422": {
|
|
680
2176
|
"content": {
|
|
681
2177
|
"application/json": {
|
|
682
2178
|
"schema": {
|
|
683
|
-
"
|
|
684
|
-
|
|
685
|
-
|
|
2179
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
2180
|
+
}
|
|
2181
|
+
}
|
|
2182
|
+
},
|
|
2183
|
+
"description": "Validation Error"
|
|
2184
|
+
}
|
|
2185
|
+
},
|
|
2186
|
+
"summary": "Transfer Collection",
|
|
2187
|
+
"tags": [
|
|
2188
|
+
"knowledge-base"
|
|
2189
|
+
]
|
|
2190
|
+
}
|
|
2191
|
+
},
|
|
2192
|
+
"/api/v1/kb/conflict-reviews": {
|
|
2193
|
+
"get": {
|
|
2194
|
+
"operationId": "list_conflict_reviews_api_v1_kb_conflict_reviews_get",
|
|
2195
|
+
"parameters": [
|
|
2196
|
+
{
|
|
2197
|
+
"in": "query",
|
|
2198
|
+
"name": "collection_id",
|
|
2199
|
+
"required": false,
|
|
2200
|
+
"schema": {
|
|
2201
|
+
"anyOf": [
|
|
2202
|
+
{
|
|
2203
|
+
"type": "string"
|
|
2204
|
+
},
|
|
2205
|
+
{
|
|
2206
|
+
"type": "null"
|
|
2207
|
+
}
|
|
2208
|
+
],
|
|
2209
|
+
"title": "Collection Id"
|
|
2210
|
+
}
|
|
2211
|
+
},
|
|
2212
|
+
{
|
|
2213
|
+
"in": "query",
|
|
2214
|
+
"name": "status",
|
|
2215
|
+
"required": false,
|
|
2216
|
+
"schema": {
|
|
2217
|
+
"anyOf": [
|
|
2218
|
+
{
|
|
2219
|
+
"type": "string"
|
|
2220
|
+
},
|
|
2221
|
+
{
|
|
2222
|
+
"type": "null"
|
|
686
2223
|
}
|
|
2224
|
+
],
|
|
2225
|
+
"title": "Status"
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2228
|
+
],
|
|
2229
|
+
"responses": {
|
|
2230
|
+
"200": {
|
|
2231
|
+
"content": {
|
|
2232
|
+
"application/json": {
|
|
2233
|
+
"schema": {}
|
|
687
2234
|
}
|
|
688
2235
|
},
|
|
689
2236
|
"description": "Successful Response"
|
|
@@ -699,42 +2246,159 @@
|
|
|
699
2246
|
"description": "Validation Error"
|
|
700
2247
|
}
|
|
701
2248
|
},
|
|
702
|
-
"summary": "
|
|
2249
|
+
"summary": "List Conflict Reviews",
|
|
703
2250
|
"tags": [
|
|
704
|
-
"
|
|
705
|
-
]
|
|
706
|
-
"x-mcp-annotations": {
|
|
707
|
-
"destructiveHint": true,
|
|
708
|
-
"idempotentHint": true,
|
|
709
|
-
"openWorldHint": true,
|
|
710
|
-
"readOnlyHint": false
|
|
711
|
-
}
|
|
2251
|
+
"knowledge-base"
|
|
2252
|
+
]
|
|
712
2253
|
}
|
|
713
2254
|
},
|
|
714
|
-
"/api/v1/
|
|
715
|
-
"
|
|
716
|
-
"
|
|
717
|
-
"operationId": "get_archive_status",
|
|
2255
|
+
"/api/v1/kb/conflict-reviews/{conflict_id}/resolve": {
|
|
2256
|
+
"post": {
|
|
2257
|
+
"operationId": "resolve_conflict_api_v1_kb_conflict_reviews__conflict_id__resolve_post",
|
|
718
2258
|
"parameters": [
|
|
719
2259
|
{
|
|
720
2260
|
"in": "path",
|
|
721
|
-
"name": "
|
|
2261
|
+
"name": "conflict_id",
|
|
722
2262
|
"required": true,
|
|
723
2263
|
"schema": {
|
|
724
|
-
"title": "
|
|
2264
|
+
"title": "Conflict Id",
|
|
725
2265
|
"type": "string"
|
|
726
2266
|
}
|
|
727
2267
|
}
|
|
728
2268
|
],
|
|
2269
|
+
"requestBody": {
|
|
2270
|
+
"content": {
|
|
2271
|
+
"application/json": {
|
|
2272
|
+
"schema": {
|
|
2273
|
+
"$ref": "#/components/schemas/ResolveConflictBody"
|
|
2274
|
+
}
|
|
2275
|
+
}
|
|
2276
|
+
},
|
|
2277
|
+
"required": true
|
|
2278
|
+
},
|
|
2279
|
+
"responses": {
|
|
2280
|
+
"200": {
|
|
2281
|
+
"content": {
|
|
2282
|
+
"application/json": {
|
|
2283
|
+
"schema": {}
|
|
2284
|
+
}
|
|
2285
|
+
},
|
|
2286
|
+
"description": "Successful Response"
|
|
2287
|
+
},
|
|
2288
|
+
"422": {
|
|
2289
|
+
"content": {
|
|
2290
|
+
"application/json": {
|
|
2291
|
+
"schema": {
|
|
2292
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
2293
|
+
}
|
|
2294
|
+
}
|
|
2295
|
+
},
|
|
2296
|
+
"description": "Validation Error"
|
|
2297
|
+
}
|
|
2298
|
+
},
|
|
2299
|
+
"summary": "Resolve Conflict",
|
|
2300
|
+
"tags": [
|
|
2301
|
+
"knowledge-base"
|
|
2302
|
+
]
|
|
2303
|
+
}
|
|
2304
|
+
},
|
|
2305
|
+
"/api/v1/kb/documents": {
|
|
2306
|
+
"get": {
|
|
2307
|
+
"operationId": "list_documents_api_v1_kb_documents_get",
|
|
2308
|
+
"parameters": [
|
|
2309
|
+
{
|
|
2310
|
+
"in": "query",
|
|
2311
|
+
"name": "collection_id",
|
|
2312
|
+
"required": false,
|
|
2313
|
+
"schema": {
|
|
2314
|
+
"anyOf": [
|
|
2315
|
+
{
|
|
2316
|
+
"type": "string"
|
|
2317
|
+
},
|
|
2318
|
+
{
|
|
2319
|
+
"type": "null"
|
|
2320
|
+
}
|
|
2321
|
+
],
|
|
2322
|
+
"title": "Collection Id"
|
|
2323
|
+
}
|
|
2324
|
+
},
|
|
2325
|
+
{
|
|
2326
|
+
"in": "query",
|
|
2327
|
+
"name": "q",
|
|
2328
|
+
"required": false,
|
|
2329
|
+
"schema": {
|
|
2330
|
+
"anyOf": [
|
|
2331
|
+
{
|
|
2332
|
+
"type": "string"
|
|
2333
|
+
},
|
|
2334
|
+
{
|
|
2335
|
+
"type": "null"
|
|
2336
|
+
}
|
|
2337
|
+
],
|
|
2338
|
+
"title": "Q"
|
|
2339
|
+
}
|
|
2340
|
+
},
|
|
2341
|
+
{
|
|
2342
|
+
"in": "query",
|
|
2343
|
+
"name": "status",
|
|
2344
|
+
"required": false,
|
|
2345
|
+
"schema": {
|
|
2346
|
+
"anyOf": [
|
|
2347
|
+
{
|
|
2348
|
+
"type": "string"
|
|
2349
|
+
},
|
|
2350
|
+
{
|
|
2351
|
+
"type": "null"
|
|
2352
|
+
}
|
|
2353
|
+
],
|
|
2354
|
+
"title": "Status"
|
|
2355
|
+
}
|
|
2356
|
+
},
|
|
2357
|
+
{
|
|
2358
|
+
"in": "query",
|
|
2359
|
+
"name": "lifecycle_status",
|
|
2360
|
+
"required": false,
|
|
2361
|
+
"schema": {
|
|
2362
|
+
"anyOf": [
|
|
2363
|
+
{
|
|
2364
|
+
"type": "string"
|
|
2365
|
+
},
|
|
2366
|
+
{
|
|
2367
|
+
"type": "null"
|
|
2368
|
+
}
|
|
2369
|
+
],
|
|
2370
|
+
"title": "Lifecycle Status"
|
|
2371
|
+
}
|
|
2372
|
+
},
|
|
2373
|
+
{
|
|
2374
|
+
"in": "query",
|
|
2375
|
+
"name": "offset",
|
|
2376
|
+
"required": false,
|
|
2377
|
+
"schema": {
|
|
2378
|
+
"default": 0,
|
|
2379
|
+
"minimum": 0,
|
|
2380
|
+
"title": "Offset",
|
|
2381
|
+
"type": "integer"
|
|
2382
|
+
}
|
|
2383
|
+
},
|
|
2384
|
+
{
|
|
2385
|
+
"in": "query",
|
|
2386
|
+
"name": "limit",
|
|
2387
|
+
"required": false,
|
|
2388
|
+
"schema": {
|
|
2389
|
+
"default": 100,
|
|
2390
|
+
"maximum": 500,
|
|
2391
|
+
"minimum": 1,
|
|
2392
|
+
"title": "Limit",
|
|
2393
|
+
"type": "integer"
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2396
|
+
],
|
|
729
2397
|
"responses": {
|
|
730
2398
|
"200": {
|
|
731
2399
|
"content": {
|
|
732
2400
|
"application/json": {
|
|
733
|
-
"schema": {
|
|
734
|
-
"additionalProperties": true,
|
|
735
|
-
"title": "Response Get Archive Status",
|
|
736
|
-
"type": "object"
|
|
737
|
-
}
|
|
2401
|
+
"schema": {}
|
|
738
2402
|
}
|
|
739
2403
|
},
|
|
740
2404
|
"description": "Successful Response"
|
|
@@ -750,44 +2414,28 @@
|
|
|
750
2414
|
"description": "Validation Error"
|
|
751
2415
|
}
|
|
752
2416
|
},
|
|
753
|
-
"summary": "
|
|
2417
|
+
"summary": "List Documents",
|
|
754
2418
|
"tags": [
|
|
755
|
-
"
|
|
756
|
-
]
|
|
757
|
-
"x-mcp-annotations": {
|
|
758
|
-
"destructiveHint": false,
|
|
759
|
-
"idempotentHint": true,
|
|
760
|
-
"openWorldHint": true,
|
|
761
|
-
"readOnlyHint": true
|
|
762
|
-
}
|
|
2419
|
+
"knowledge-base"
|
|
2420
|
+
]
|
|
763
2421
|
}
|
|
764
2422
|
},
|
|
765
|
-
"/api/v1/
|
|
766
|
-
"
|
|
767
|
-
"
|
|
768
|
-
"operationId": "retry_archive",
|
|
2423
|
+
"/api/v1/kb/documents/{document_id}": {
|
|
2424
|
+
"delete": {
|
|
2425
|
+
"operationId": "delete_document_api_v1_kb_documents__document_id__delete",
|
|
769
2426
|
"parameters": [
|
|
770
2427
|
{
|
|
771
2428
|
"in": "path",
|
|
772
|
-
"name": "
|
|
2429
|
+
"name": "document_id",
|
|
773
2430
|
"required": true,
|
|
774
2431
|
"schema": {
|
|
775
|
-
"title": "
|
|
2432
|
+
"title": "Document Id",
|
|
776
2433
|
"type": "string"
|
|
777
2434
|
}
|
|
778
2435
|
}
|
|
779
2436
|
],
|
|
780
2437
|
"responses": {
|
|
781
|
-
"
|
|
782
|
-
"content": {
|
|
783
|
-
"application/json": {
|
|
784
|
-
"schema": {
|
|
785
|
-
"additionalProperties": true,
|
|
786
|
-
"title": "Response Retry Archive",
|
|
787
|
-
"type": "object"
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
},
|
|
2438
|
+
"204": {
|
|
791
2439
|
"description": "Successful Response"
|
|
792
2440
|
},
|
|
793
2441
|
"422": {
|
|
@@ -801,52 +2449,13 @@
|
|
|
801
2449
|
"description": "Validation Error"
|
|
802
2450
|
}
|
|
803
2451
|
},
|
|
804
|
-
"summary": "
|
|
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",
|
|
2452
|
+
"summary": "Delete Document",
|
|
835
2453
|
"tags": [
|
|
836
|
-
"
|
|
837
|
-
]
|
|
838
|
-
|
|
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": {
|
|
2454
|
+
"knowledge-base"
|
|
2455
|
+
]
|
|
2456
|
+
},
|
|
847
2457
|
"get": {
|
|
848
|
-
"
|
|
849
|
-
"operationId": "get_document_download",
|
|
2458
|
+
"operationId": "get_document_api_v1_kb_documents__document_id__get",
|
|
850
2459
|
"parameters": [
|
|
851
2460
|
{
|
|
852
2461
|
"in": "path",
|
|
@@ -856,17 +2465,89 @@
|
|
|
856
2465
|
"title": "Document Id",
|
|
857
2466
|
"type": "string"
|
|
858
2467
|
}
|
|
2468
|
+
},
|
|
2469
|
+
{
|
|
2470
|
+
"in": "query",
|
|
2471
|
+
"name": "include_content",
|
|
2472
|
+
"required": false,
|
|
2473
|
+
"schema": {
|
|
2474
|
+
"default": true,
|
|
2475
|
+
"title": "Include Content",
|
|
2476
|
+
"type": "boolean"
|
|
2477
|
+
}
|
|
2478
|
+
},
|
|
2479
|
+
{
|
|
2480
|
+
"in": "query",
|
|
2481
|
+
"name": "include_chunks",
|
|
2482
|
+
"required": false,
|
|
2483
|
+
"schema": {
|
|
2484
|
+
"default": true,
|
|
2485
|
+
"title": "Include Chunks",
|
|
2486
|
+
"type": "boolean"
|
|
2487
|
+
}
|
|
2488
|
+
},
|
|
2489
|
+
{
|
|
2490
|
+
"in": "query",
|
|
2491
|
+
"name": "include_assets",
|
|
2492
|
+
"required": false,
|
|
2493
|
+
"schema": {
|
|
2494
|
+
"default": true,
|
|
2495
|
+
"title": "Include Assets",
|
|
2496
|
+
"type": "boolean"
|
|
2497
|
+
}
|
|
2498
|
+
},
|
|
2499
|
+
{
|
|
2500
|
+
"in": "query",
|
|
2501
|
+
"name": "chunk_offset",
|
|
2502
|
+
"required": false,
|
|
2503
|
+
"schema": {
|
|
2504
|
+
"default": 0,
|
|
2505
|
+
"minimum": 0,
|
|
2506
|
+
"title": "Chunk Offset",
|
|
2507
|
+
"type": "integer"
|
|
2508
|
+
}
|
|
2509
|
+
},
|
|
2510
|
+
{
|
|
2511
|
+
"in": "query",
|
|
2512
|
+
"name": "chunk_limit",
|
|
2513
|
+
"required": false,
|
|
2514
|
+
"schema": {
|
|
2515
|
+
"default": 100,
|
|
2516
|
+
"maximum": 500,
|
|
2517
|
+
"minimum": 1,
|
|
2518
|
+
"title": "Chunk Limit",
|
|
2519
|
+
"type": "integer"
|
|
2520
|
+
}
|
|
2521
|
+
},
|
|
2522
|
+
{
|
|
2523
|
+
"in": "query",
|
|
2524
|
+
"name": "asset_offset",
|
|
2525
|
+
"required": false,
|
|
2526
|
+
"schema": {
|
|
2527
|
+
"default": 0,
|
|
2528
|
+
"minimum": 0,
|
|
2529
|
+
"title": "Asset Offset",
|
|
2530
|
+
"type": "integer"
|
|
2531
|
+
}
|
|
2532
|
+
},
|
|
2533
|
+
{
|
|
2534
|
+
"in": "query",
|
|
2535
|
+
"name": "asset_limit",
|
|
2536
|
+
"required": false,
|
|
2537
|
+
"schema": {
|
|
2538
|
+
"default": 100,
|
|
2539
|
+
"maximum": 500,
|
|
2540
|
+
"minimum": 1,
|
|
2541
|
+
"title": "Asset Limit",
|
|
2542
|
+
"type": "integer"
|
|
2543
|
+
}
|
|
859
2544
|
}
|
|
860
2545
|
],
|
|
861
2546
|
"responses": {
|
|
862
2547
|
"200": {
|
|
863
2548
|
"content": {
|
|
864
2549
|
"application/json": {
|
|
865
|
-
"schema": {
|
|
866
|
-
"additionalProperties": true,
|
|
867
|
-
"title": "Response Get Document Download",
|
|
868
|
-
"type": "object"
|
|
869
|
-
}
|
|
2550
|
+
"schema": {}
|
|
870
2551
|
}
|
|
871
2552
|
},
|
|
872
2553
|
"description": "Successful Response"
|
|
@@ -882,27 +2563,29 @@
|
|
|
882
2563
|
"description": "Validation Error"
|
|
883
2564
|
}
|
|
884
2565
|
},
|
|
885
|
-
"summary": "Get Document
|
|
2566
|
+
"summary": "Get Document",
|
|
886
2567
|
"tags": [
|
|
887
|
-
"
|
|
2568
|
+
"knowledge-base"
|
|
2569
|
+
]
|
|
2570
|
+
},
|
|
2571
|
+
"put": {
|
|
2572
|
+
"operationId": "update_document_api_v1_kb_documents__document_id__put",
|
|
2573
|
+
"parameters": [
|
|
2574
|
+
{
|
|
2575
|
+
"in": "path",
|
|
2576
|
+
"name": "document_id",
|
|
2577
|
+
"required": true,
|
|
2578
|
+
"schema": {
|
|
2579
|
+
"title": "Document Id",
|
|
2580
|
+
"type": "string"
|
|
2581
|
+
}
|
|
2582
|
+
}
|
|
888
2583
|
],
|
|
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
2584
|
"requestBody": {
|
|
902
2585
|
"content": {
|
|
903
2586
|
"application/json": {
|
|
904
2587
|
"schema": {
|
|
905
|
-
"$ref": "#/components/schemas/
|
|
2588
|
+
"$ref": "#/components/schemas/UpdateDocumentBody"
|
|
906
2589
|
}
|
|
907
2590
|
}
|
|
908
2591
|
},
|
|
@@ -912,11 +2595,7 @@
|
|
|
912
2595
|
"200": {
|
|
913
2596
|
"content": {
|
|
914
2597
|
"application/json": {
|
|
915
|
-
"schema": {
|
|
916
|
-
"additionalProperties": true,
|
|
917
|
-
"title": "Response Search Knowledge Base",
|
|
918
|
-
"type": "object"
|
|
919
|
-
}
|
|
2598
|
+
"schema": {}
|
|
920
2599
|
}
|
|
921
2600
|
},
|
|
922
2601
|
"description": "Successful Response"
|
|
@@ -932,91 +2611,54 @@
|
|
|
932
2611
|
"description": "Validation Error"
|
|
933
2612
|
}
|
|
934
2613
|
},
|
|
935
|
-
"summary": "
|
|
2614
|
+
"summary": "Update Document",
|
|
936
2615
|
"tags": [
|
|
937
|
-
"
|
|
938
|
-
]
|
|
939
|
-
"x-mcp-annotations": {
|
|
940
|
-
"destructiveHint": false,
|
|
941
|
-
"idempotentHint": true,
|
|
942
|
-
"openWorldHint": true,
|
|
943
|
-
"readOnlyHint": true
|
|
944
|
-
}
|
|
2616
|
+
"knowledge-base"
|
|
2617
|
+
]
|
|
945
2618
|
}
|
|
946
2619
|
},
|
|
947
|
-
"/api/v1/
|
|
948
|
-
"
|
|
949
|
-
"
|
|
950
|
-
"
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
"
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
2620
|
+
"/api/v1/kb/documents/{document_id}/assets": {
|
|
2621
|
+
"get": {
|
|
2622
|
+
"operationId": "list_document_assets_api_v1_kb_documents__document_id__assets_get",
|
|
2623
|
+
"parameters": [
|
|
2624
|
+
{
|
|
2625
|
+
"in": "path",
|
|
2626
|
+
"name": "document_id",
|
|
2627
|
+
"required": true,
|
|
2628
|
+
"schema": {
|
|
2629
|
+
"title": "Document Id",
|
|
2630
|
+
"type": "string"
|
|
957
2631
|
}
|
|
958
2632
|
},
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
"
|
|
964
|
-
"
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
}
|
|
970
|
-
}
|
|
971
|
-
},
|
|
972
|
-
"description": "Successful Response"
|
|
2633
|
+
{
|
|
2634
|
+
"in": "query",
|
|
2635
|
+
"name": "offset",
|
|
2636
|
+
"required": false,
|
|
2637
|
+
"schema": {
|
|
2638
|
+
"default": 0,
|
|
2639
|
+
"minimum": 0,
|
|
2640
|
+
"title": "Offset",
|
|
2641
|
+
"type": "integer"
|
|
2642
|
+
}
|
|
973
2643
|
},
|
|
974
|
-
|
|
975
|
-
"
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
2644
|
+
{
|
|
2645
|
+
"in": "query",
|
|
2646
|
+
"name": "limit",
|
|
2647
|
+
"required": false,
|
|
2648
|
+
"schema": {
|
|
2649
|
+
"default": 24,
|
|
2650
|
+
"maximum": 200,
|
|
2651
|
+
"minimum": 1,
|
|
2652
|
+
"title": "Limit",
|
|
2653
|
+
"type": "integer"
|
|
2654
|
+
}
|
|
983
2655
|
}
|
|
984
|
-
},
|
|
985
|
-
"summary": "Create Task Knowledge Base",
|
|
986
|
-
"tags": [
|
|
987
|
-
"agent-tools"
|
|
988
2656
|
],
|
|
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
2657
|
"responses": {
|
|
1012
2658
|
"200": {
|
|
1013
2659
|
"content": {
|
|
1014
2660
|
"application/json": {
|
|
1015
|
-
"schema": {
|
|
1016
|
-
"additionalProperties": true,
|
|
1017
|
-
"title": "Response Begin Direct Upload",
|
|
1018
|
-
"type": "object"
|
|
1019
|
-
}
|
|
2661
|
+
"schema": {}
|
|
1020
2662
|
}
|
|
1021
2663
|
},
|
|
1022
2664
|
"description": "Successful Response"
|
|
@@ -1032,29 +2674,22 @@
|
|
|
1032
2674
|
"description": "Validation Error"
|
|
1033
2675
|
}
|
|
1034
2676
|
},
|
|
1035
|
-
"summary": "
|
|
2677
|
+
"summary": "List Document Assets",
|
|
1036
2678
|
"tags": [
|
|
1037
|
-
"
|
|
1038
|
-
]
|
|
1039
|
-
"x-mcp-annotations": {
|
|
1040
|
-
"destructiveHint": false,
|
|
1041
|
-
"idempotentHint": true,
|
|
1042
|
-
"openWorldHint": true,
|
|
1043
|
-
"readOnlyHint": false
|
|
1044
|
-
}
|
|
2679
|
+
"knowledge-base"
|
|
2680
|
+
]
|
|
1045
2681
|
}
|
|
1046
2682
|
},
|
|
1047
|
-
"/api/v1/
|
|
1048
|
-
"
|
|
1049
|
-
"
|
|
1050
|
-
"operationId": "cancel_direct_upload",
|
|
2683
|
+
"/api/v1/kb/documents/{document_id}/change-history": {
|
|
2684
|
+
"get": {
|
|
2685
|
+
"operationId": "get_document_change_history_api_v1_kb_documents__document_id__change_history_get",
|
|
1051
2686
|
"parameters": [
|
|
1052
2687
|
{
|
|
1053
2688
|
"in": "path",
|
|
1054
|
-
"name": "
|
|
2689
|
+
"name": "document_id",
|
|
1055
2690
|
"required": true,
|
|
1056
2691
|
"schema": {
|
|
1057
|
-
"title": "
|
|
2692
|
+
"title": "Document Id",
|
|
1058
2693
|
"type": "string"
|
|
1059
2694
|
}
|
|
1060
2695
|
}
|
|
@@ -1063,11 +2698,7 @@
|
|
|
1063
2698
|
"200": {
|
|
1064
2699
|
"content": {
|
|
1065
2700
|
"application/json": {
|
|
1066
|
-
"schema": {
|
|
1067
|
-
"additionalProperties": true,
|
|
1068
|
-
"title": "Response Cancel Direct Upload",
|
|
1069
|
-
"type": "object"
|
|
1070
|
-
}
|
|
2701
|
+
"schema": {}
|
|
1071
2702
|
}
|
|
1072
2703
|
},
|
|
1073
2704
|
"description": "Successful Response"
|
|
@@ -1083,38 +2714,46 @@
|
|
|
1083
2714
|
"description": "Validation Error"
|
|
1084
2715
|
}
|
|
1085
2716
|
},
|
|
1086
|
-
"summary": "
|
|
2717
|
+
"summary": "Get Document Change History",
|
|
1087
2718
|
"tags": [
|
|
1088
|
-
"
|
|
1089
|
-
]
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
"openWorldHint": true,
|
|
1094
|
-
"readOnlyHint": false
|
|
1095
|
-
}
|
|
1096
|
-
},
|
|
2719
|
+
"knowledge-base"
|
|
2720
|
+
]
|
|
2721
|
+
}
|
|
2722
|
+
},
|
|
2723
|
+
"/api/v1/kb/documents/{document_id}/chunks": {
|
|
1097
2724
|
"get": {
|
|
1098
|
-
"
|
|
1099
|
-
"operationId": "get_direct_upload",
|
|
2725
|
+
"operationId": "list_document_chunks_api_v1_kb_documents__document_id__chunks_get",
|
|
1100
2726
|
"parameters": [
|
|
1101
2727
|
{
|
|
1102
2728
|
"in": "path",
|
|
1103
|
-
"name": "
|
|
2729
|
+
"name": "document_id",
|
|
1104
2730
|
"required": true,
|
|
1105
2731
|
"schema": {
|
|
1106
|
-
"title": "
|
|
2732
|
+
"title": "Document Id",
|
|
1107
2733
|
"type": "string"
|
|
1108
2734
|
}
|
|
1109
2735
|
},
|
|
1110
2736
|
{
|
|
1111
2737
|
"in": "query",
|
|
1112
|
-
"name": "
|
|
2738
|
+
"name": "offset",
|
|
1113
2739
|
"required": false,
|
|
1114
2740
|
"schema": {
|
|
1115
|
-
"default":
|
|
1116
|
-
"
|
|
1117
|
-
"
|
|
2741
|
+
"default": 0,
|
|
2742
|
+
"minimum": 0,
|
|
2743
|
+
"title": "Offset",
|
|
2744
|
+
"type": "integer"
|
|
2745
|
+
}
|
|
2746
|
+
},
|
|
2747
|
+
{
|
|
2748
|
+
"in": "query",
|
|
2749
|
+
"name": "limit",
|
|
2750
|
+
"required": false,
|
|
2751
|
+
"schema": {
|
|
2752
|
+
"default": 50,
|
|
2753
|
+
"maximum": 500,
|
|
2754
|
+
"minimum": 1,
|
|
2755
|
+
"title": "Limit",
|
|
2756
|
+
"type": "integer"
|
|
1118
2757
|
}
|
|
1119
2758
|
}
|
|
1120
2759
|
],
|
|
@@ -1122,11 +2761,7 @@
|
|
|
1122
2761
|
"200": {
|
|
1123
2762
|
"content": {
|
|
1124
2763
|
"application/json": {
|
|
1125
|
-
"schema": {
|
|
1126
|
-
"additionalProperties": true,
|
|
1127
|
-
"title": "Response Get Direct Upload",
|
|
1128
|
-
"type": "object"
|
|
1129
|
-
}
|
|
2764
|
+
"schema": {}
|
|
1130
2765
|
}
|
|
1131
2766
|
},
|
|
1132
2767
|
"description": "Successful Response"
|
|
@@ -1142,29 +2777,22 @@
|
|
|
1142
2777
|
"description": "Validation Error"
|
|
1143
2778
|
}
|
|
1144
2779
|
},
|
|
1145
|
-
"summary": "
|
|
2780
|
+
"summary": "List Document Chunks",
|
|
1146
2781
|
"tags": [
|
|
1147
|
-
"
|
|
1148
|
-
]
|
|
1149
|
-
"x-mcp-annotations": {
|
|
1150
|
-
"destructiveHint": false,
|
|
1151
|
-
"idempotentHint": false,
|
|
1152
|
-
"openWorldHint": true,
|
|
1153
|
-
"readOnlyHint": false
|
|
1154
|
-
}
|
|
2782
|
+
"knowledge-base"
|
|
2783
|
+
]
|
|
1155
2784
|
}
|
|
1156
2785
|
},
|
|
1157
|
-
"/api/v1/
|
|
2786
|
+
"/api/v1/kb/documents/{document_id}/reindex": {
|
|
1158
2787
|
"post": {
|
|
1159
|
-
"
|
|
1160
|
-
"operationId": "complete_direct_upload",
|
|
2788
|
+
"operationId": "reindex_document_api_v1_kb_documents__document_id__reindex_post",
|
|
1161
2789
|
"parameters": [
|
|
1162
2790
|
{
|
|
1163
2791
|
"in": "path",
|
|
1164
|
-
"name": "
|
|
2792
|
+
"name": "document_id",
|
|
1165
2793
|
"required": true,
|
|
1166
2794
|
"schema": {
|
|
1167
|
-
"title": "
|
|
2795
|
+
"title": "Document Id",
|
|
1168
2796
|
"type": "string"
|
|
1169
2797
|
}
|
|
1170
2798
|
}
|
|
@@ -1173,11 +2801,7 @@
|
|
|
1173
2801
|
"200": {
|
|
1174
2802
|
"content": {
|
|
1175
2803
|
"application/json": {
|
|
1176
|
-
"schema": {
|
|
1177
|
-
"additionalProperties": true,
|
|
1178
|
-
"title": "Response Complete Direct Upload",
|
|
1179
|
-
"type": "object"
|
|
1180
|
-
}
|
|
2804
|
+
"schema": {}
|
|
1181
2805
|
}
|
|
1182
2806
|
},
|
|
1183
2807
|
"description": "Successful Response"
|
|
@@ -1193,41 +2817,41 @@
|
|
|
1193
2817
|
"description": "Validation Error"
|
|
1194
2818
|
}
|
|
1195
2819
|
},
|
|
1196
|
-
"summary": "
|
|
2820
|
+
"summary": "Reindex Document",
|
|
1197
2821
|
"tags": [
|
|
1198
|
-
"
|
|
1199
|
-
]
|
|
1200
|
-
"x-mcp-annotations": {
|
|
1201
|
-
"destructiveHint": true,
|
|
1202
|
-
"idempotentHint": true,
|
|
1203
|
-
"openWorldHint": true,
|
|
1204
|
-
"readOnlyHint": false
|
|
1205
|
-
}
|
|
2822
|
+
"knowledge-base"
|
|
2823
|
+
]
|
|
1206
2824
|
}
|
|
1207
2825
|
},
|
|
1208
|
-
"/api/v1/
|
|
1209
|
-
"
|
|
1210
|
-
"operationId": "
|
|
2826
|
+
"/api/v1/kb/documents/{document_id}/switch-version": {
|
|
2827
|
+
"post": {
|
|
2828
|
+
"operationId": "switch_document_version_api_v1_kb_documents__document_id__switch_version_post",
|
|
1211
2829
|
"parameters": [
|
|
1212
2830
|
{
|
|
1213
2831
|
"in": "path",
|
|
1214
|
-
"name": "
|
|
2832
|
+
"name": "document_id",
|
|
1215
2833
|
"required": true,
|
|
1216
2834
|
"schema": {
|
|
1217
|
-
"title": "
|
|
2835
|
+
"title": "Document Id",
|
|
1218
2836
|
"type": "string"
|
|
1219
2837
|
}
|
|
1220
2838
|
}
|
|
1221
2839
|
],
|
|
2840
|
+
"requestBody": {
|
|
2841
|
+
"content": {
|
|
2842
|
+
"application/json": {
|
|
2843
|
+
"schema": {
|
|
2844
|
+
"$ref": "#/components/schemas/SwitchDocumentVersionBody"
|
|
2845
|
+
}
|
|
2846
|
+
}
|
|
2847
|
+
},
|
|
2848
|
+
"required": true
|
|
2849
|
+
},
|
|
1222
2850
|
"responses": {
|
|
1223
2851
|
"200": {
|
|
1224
2852
|
"content": {
|
|
1225
2853
|
"application/json": {
|
|
1226
|
-
"schema": {
|
|
1227
|
-
"additionalProperties": true,
|
|
1228
|
-
"title": "Response Get External Batch Api V1 External Batches Batch Id Get",
|
|
1229
|
-
"type": "object"
|
|
1230
|
-
}
|
|
2854
|
+
"schema": {}
|
|
1231
2855
|
}
|
|
1232
2856
|
},
|
|
1233
2857
|
"description": "Successful Response"
|
|
@@ -1243,46 +2867,31 @@
|
|
|
1243
2867
|
"description": "Validation Error"
|
|
1244
2868
|
}
|
|
1245
2869
|
},
|
|
1246
|
-
"summary": "
|
|
2870
|
+
"summary": "Switch Document Version",
|
|
1247
2871
|
"tags": [
|
|
1248
|
-
"
|
|
2872
|
+
"knowledge-base"
|
|
1249
2873
|
]
|
|
1250
2874
|
}
|
|
1251
2875
|
},
|
|
1252
|
-
"/api/v1/
|
|
1253
|
-
"
|
|
1254
|
-
"
|
|
1255
|
-
"operationId": "resolve_external_batch_conflicts_api_v1_external_batches__batch_id__resolve_post",
|
|
2876
|
+
"/api/v1/kb/documents/{document_id}/versions": {
|
|
2877
|
+
"get": {
|
|
2878
|
+
"operationId": "get_document_versions_api_v1_kb_documents__document_id__versions_get",
|
|
1256
2879
|
"parameters": [
|
|
1257
2880
|
{
|
|
1258
2881
|
"in": "path",
|
|
1259
|
-
"name": "
|
|
2882
|
+
"name": "document_id",
|
|
1260
2883
|
"required": true,
|
|
1261
2884
|
"schema": {
|
|
1262
|
-
"title": "
|
|
2885
|
+
"title": "Document Id",
|
|
1263
2886
|
"type": "string"
|
|
1264
2887
|
}
|
|
1265
2888
|
}
|
|
1266
2889
|
],
|
|
1267
|
-
"requestBody": {
|
|
1268
|
-
"content": {
|
|
1269
|
-
"application/json": {
|
|
1270
|
-
"schema": {
|
|
1271
|
-
"$ref": "#/components/schemas/ExternalBatchResolutionBody"
|
|
1272
|
-
}
|
|
1273
|
-
}
|
|
1274
|
-
},
|
|
1275
|
-
"required": true
|
|
1276
|
-
},
|
|
1277
2890
|
"responses": {
|
|
1278
|
-
"
|
|
2891
|
+
"200": {
|
|
1279
2892
|
"content": {
|
|
1280
2893
|
"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
|
-
}
|
|
2894
|
+
"schema": {}
|
|
1286
2895
|
}
|
|
1287
2896
|
},
|
|
1288
2897
|
"description": "Successful Response"
|
|
@@ -1298,35 +2907,76 @@
|
|
|
1298
2907
|
"description": "Validation Error"
|
|
1299
2908
|
}
|
|
1300
2909
|
},
|
|
1301
|
-
"summary": "
|
|
2910
|
+
"summary": "Get Document Versions",
|
|
1302
2911
|
"tags": [
|
|
1303
|
-
"
|
|
2912
|
+
"knowledge-base"
|
|
1304
2913
|
]
|
|
1305
2914
|
}
|
|
1306
2915
|
},
|
|
1307
|
-
"/api/v1/
|
|
1308
|
-
"
|
|
1309
|
-
"operationId": "
|
|
2916
|
+
"/api/v1/kb/ingest-jobs": {
|
|
2917
|
+
"get": {
|
|
2918
|
+
"operationId": "list_ingest_jobs_api_v1_kb_ingest_jobs_get",
|
|
1310
2919
|
"parameters": [
|
|
1311
2920
|
{
|
|
1312
|
-
"in": "
|
|
1313
|
-
"name": "
|
|
1314
|
-
"required":
|
|
2921
|
+
"in": "query",
|
|
2922
|
+
"name": "document_id",
|
|
2923
|
+
"required": false,
|
|
1315
2924
|
"schema": {
|
|
1316
|
-
"
|
|
1317
|
-
|
|
2925
|
+
"anyOf": [
|
|
2926
|
+
{
|
|
2927
|
+
"type": "string"
|
|
2928
|
+
},
|
|
2929
|
+
{
|
|
2930
|
+
"type": "null"
|
|
2931
|
+
}
|
|
2932
|
+
],
|
|
2933
|
+
"title": "Document Id"
|
|
2934
|
+
}
|
|
2935
|
+
},
|
|
2936
|
+
{
|
|
2937
|
+
"in": "query",
|
|
2938
|
+
"name": "collection_id",
|
|
2939
|
+
"required": false,
|
|
2940
|
+
"schema": {
|
|
2941
|
+
"anyOf": [
|
|
2942
|
+
{
|
|
2943
|
+
"type": "string"
|
|
2944
|
+
},
|
|
2945
|
+
{
|
|
2946
|
+
"type": "null"
|
|
2947
|
+
}
|
|
2948
|
+
],
|
|
2949
|
+
"title": "Collection Id"
|
|
2950
|
+
}
|
|
2951
|
+
},
|
|
2952
|
+
{
|
|
2953
|
+
"in": "query",
|
|
2954
|
+
"name": "include_completed",
|
|
2955
|
+
"required": false,
|
|
2956
|
+
"schema": {
|
|
2957
|
+
"default": false,
|
|
2958
|
+
"title": "Include Completed",
|
|
2959
|
+
"type": "boolean"
|
|
2960
|
+
}
|
|
2961
|
+
},
|
|
2962
|
+
{
|
|
2963
|
+
"in": "query",
|
|
2964
|
+
"name": "limit",
|
|
2965
|
+
"required": false,
|
|
2966
|
+
"schema": {
|
|
2967
|
+
"default": 20,
|
|
2968
|
+
"maximum": 200,
|
|
2969
|
+
"minimum": 1,
|
|
2970
|
+
"title": "Limit",
|
|
2971
|
+
"type": "integer"
|
|
1318
2972
|
}
|
|
1319
2973
|
}
|
|
1320
2974
|
],
|
|
1321
2975
|
"responses": {
|
|
1322
|
-
"
|
|
2976
|
+
"200": {
|
|
1323
2977
|
"content": {
|
|
1324
2978
|
"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
|
-
}
|
|
2979
|
+
"schema": {}
|
|
1330
2980
|
}
|
|
1331
2981
|
},
|
|
1332
2982
|
"description": "Successful Response"
|
|
@@ -1342,35 +2992,114 @@
|
|
|
1342
2992
|
"description": "Validation Error"
|
|
1343
2993
|
}
|
|
1344
2994
|
},
|
|
1345
|
-
"summary": "
|
|
2995
|
+
"summary": "List Ingest Jobs",
|
|
1346
2996
|
"tags": [
|
|
1347
|
-
"
|
|
2997
|
+
"knowledge-base"
|
|
1348
2998
|
]
|
|
1349
2999
|
}
|
|
1350
3000
|
},
|
|
1351
|
-
"/api/v1/
|
|
3001
|
+
"/api/v1/kb/upload-sessions/preflight": {
|
|
1352
3002
|
"post": {
|
|
1353
|
-
"
|
|
1354
|
-
"operationId": "upload_external_documents_api_v1_external_documents_batch_upload_post",
|
|
3003
|
+
"operationId": "upload_preflight_api_v1_kb_upload_sessions_preflight_post",
|
|
1355
3004
|
"requestBody": {
|
|
1356
3005
|
"content": {
|
|
1357
|
-
"
|
|
3006
|
+
"application/json": {
|
|
1358
3007
|
"schema": {
|
|
1359
|
-
"$ref": "#/components/schemas/
|
|
3008
|
+
"$ref": "#/components/schemas/UploadPreflightBody"
|
|
1360
3009
|
}
|
|
1361
3010
|
}
|
|
1362
3011
|
},
|
|
1363
3012
|
"required": true
|
|
1364
3013
|
},
|
|
1365
3014
|
"responses": {
|
|
1366
|
-
"
|
|
3015
|
+
"200": {
|
|
3016
|
+
"content": {
|
|
3017
|
+
"application/json": {
|
|
3018
|
+
"schema": {}
|
|
3019
|
+
}
|
|
3020
|
+
},
|
|
3021
|
+
"description": "Successful Response"
|
|
3022
|
+
},
|
|
3023
|
+
"422": {
|
|
1367
3024
|
"content": {
|
|
1368
3025
|
"application/json": {
|
|
1369
3026
|
"schema": {
|
|
1370
|
-
"
|
|
1371
|
-
|
|
1372
|
-
|
|
3027
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
3028
|
+
}
|
|
3029
|
+
}
|
|
3030
|
+
},
|
|
3031
|
+
"description": "Validation Error"
|
|
3032
|
+
}
|
|
3033
|
+
},
|
|
3034
|
+
"summary": "Upload Preflight",
|
|
3035
|
+
"tags": [
|
|
3036
|
+
"file-transfers"
|
|
3037
|
+
]
|
|
3038
|
+
}
|
|
3039
|
+
},
|
|
3040
|
+
"/api/v1/kb/users/search": {
|
|
3041
|
+
"get": {
|
|
3042
|
+
"description": "Search the upstream directory without exposing its full PII payload.",
|
|
3043
|
+
"operationId": "search_permission_users_api_v1_kb_users_search_get",
|
|
3044
|
+
"parameters": [
|
|
3045
|
+
{
|
|
3046
|
+
"in": "query",
|
|
3047
|
+
"name": "collection_id",
|
|
3048
|
+
"required": false,
|
|
3049
|
+
"schema": {
|
|
3050
|
+
"anyOf": [
|
|
3051
|
+
{
|
|
3052
|
+
"maxLength": 200,
|
|
3053
|
+
"minLength": 1,
|
|
3054
|
+
"type": "string"
|
|
3055
|
+
},
|
|
3056
|
+
{
|
|
3057
|
+
"type": "null"
|
|
1373
3058
|
}
|
|
3059
|
+
],
|
|
3060
|
+
"title": "Collection Id"
|
|
3061
|
+
}
|
|
3062
|
+
},
|
|
3063
|
+
{
|
|
3064
|
+
"in": "query",
|
|
3065
|
+
"name": "q",
|
|
3066
|
+
"required": false,
|
|
3067
|
+
"schema": {
|
|
3068
|
+
"default": "",
|
|
3069
|
+
"maxLength": 100,
|
|
3070
|
+
"title": "Q",
|
|
3071
|
+
"type": "string"
|
|
3072
|
+
}
|
|
3073
|
+
},
|
|
3074
|
+
{
|
|
3075
|
+
"in": "query",
|
|
3076
|
+
"name": "offset",
|
|
3077
|
+
"required": false,
|
|
3078
|
+
"schema": {
|
|
3079
|
+
"default": 0,
|
|
3080
|
+
"minimum": 0,
|
|
3081
|
+
"title": "Offset",
|
|
3082
|
+
"type": "integer"
|
|
3083
|
+
}
|
|
3084
|
+
},
|
|
3085
|
+
{
|
|
3086
|
+
"in": "query",
|
|
3087
|
+
"name": "limit",
|
|
3088
|
+
"required": false,
|
|
3089
|
+
"schema": {
|
|
3090
|
+
"default": 20,
|
|
3091
|
+
"maximum": 50,
|
|
3092
|
+
"minimum": 1,
|
|
3093
|
+
"title": "Limit",
|
|
3094
|
+
"type": "integer"
|
|
3095
|
+
}
|
|
3096
|
+
}
|
|
3097
|
+
],
|
|
3098
|
+
"responses": {
|
|
3099
|
+
"200": {
|
|
3100
|
+
"content": {
|
|
3101
|
+
"application/json": {
|
|
3102
|
+
"schema": {}
|
|
1374
3103
|
}
|
|
1375
3104
|
},
|
|
1376
3105
|
"description": "Successful Response"
|
|
@@ -1386,15 +3115,15 @@
|
|
|
1386
3115
|
"description": "Validation Error"
|
|
1387
3116
|
}
|
|
1388
3117
|
},
|
|
1389
|
-
"summary": "
|
|
3118
|
+
"summary": "Search Permission Users",
|
|
1390
3119
|
"tags": [
|
|
1391
|
-
"
|
|
3120
|
+
"knowledge-base"
|
|
1392
3121
|
]
|
|
1393
3122
|
}
|
|
1394
3123
|
}
|
|
1395
3124
|
},
|
|
1396
3125
|
"x-numa-contract": {
|
|
1397
|
-
"authentication": "
|
|
3126
|
+
"authentication": "Keycloak Bearer JWT for native KB routes; legacy Agent API deployments may also support X-Api-Key.",
|
|
1398
3127
|
"default_upload_limits": {
|
|
1399
3128
|
"max_external_files_per_batch": 100,
|
|
1400
3129
|
"max_files_per_batch": 50,
|
|
@@ -1426,7 +3155,9 @@
|
|
|
1426
3155
|
"response_validation": "Responses are free-form upstream; validate consumed fields at runtime.",
|
|
1427
3156
|
"sources": [
|
|
1428
3157
|
"backend/external/agent_routes.py",
|
|
1429
|
-
"backend/external/routes.py"
|
|
3158
|
+
"backend/external/routes.py",
|
|
3159
|
+
"backend/routes/knowledge_base.py",
|
|
3160
|
+
"backend/routes/direct_uploads.py"
|
|
1430
3161
|
]
|
|
1431
3162
|
}
|
|
1432
3163
|
}
|