web-access-cli 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +54 -55
  2. package/README_CN.md +55 -54
  3. package/THIRD_PARTY_NOTICES.md +15 -0
  4. package/dist/cli-output.js +18 -0
  5. package/dist/cli-output.js.map +1 -0
  6. package/dist/cli.js +44 -6
  7. package/dist/cli.js.map +1 -1
  8. package/dist/config/config.js +76 -15
  9. package/dist/config/config.js.map +1 -1
  10. package/dist/config/edit.js +5 -94
  11. package/dist/config/edit.js.map +1 -1
  12. package/dist/config/file.js +97 -0
  13. package/dist/config/file.js.map +1 -0
  14. package/dist/config/provider-order.js +55 -0
  15. package/dist/config/provider-order.js.map +1 -0
  16. package/dist/core/diagnostics.js +7 -6
  17. package/dist/core/diagnostics.js.map +1 -1
  18. package/dist/core/errors.js.map +1 -1
  19. package/dist/core/provider-order.js +9 -0
  20. package/dist/core/provider-order.js.map +1 -0
  21. package/dist/core/router.js +157 -41
  22. package/dist/core/router.js.map +1 -1
  23. package/dist/core/schema.js +86 -10
  24. package/dist/core/schema.js.map +1 -1
  25. package/dist/core/types.js +6 -0
  26. package/dist/core/types.js.map +1 -1
  27. package/dist/providers/anysearch.js +15 -26
  28. package/dist/providers/anysearch.js.map +1 -1
  29. package/dist/providers/bocha.js +177 -0
  30. package/dist/providers/bocha.js.map +1 -0
  31. package/dist/providers/common.js.map +1 -1
  32. package/dist/providers/deepseek.js +140 -0
  33. package/dist/providers/deepseek.js.map +1 -0
  34. package/dist/providers/registry.js +4 -0
  35. package/dist/providers/registry.js.map +1 -1
  36. package/dist/transport/http.js +1 -0
  37. package/dist/transport/http.js.map +1 -1
  38. package/dist/version.js +1 -1
  39. package/package.json +66 -60
  40. package/schemas/config.schema.json +10 -0
  41. package/schemas/output.schema.json +1350 -331
@@ -1,435 +1,1454 @@
1
1
  {
2
- "type": "object",
3
- "required": [
4
- "schemaVersion",
5
- "ok",
6
- "command",
7
- "durationMs"
8
- ],
9
- "properties": {
10
- "schemaVersion": {
11
- "type": "number",
12
- "const": 1
13
- },
14
- "ok": {
15
- "type": "boolean"
16
- },
17
- "command": {
18
- "anyOf": [
19
- {
20
- "anyOf": [
21
- {
22
- "type": "string",
23
- "const": "search"
24
- },
25
- {
26
- "type": "string",
27
- "const": "extract"
28
- },
29
- {
30
- "type": "string",
31
- "const": "providers"
32
- },
33
- {
34
- "type": "string",
35
- "const": "doctor"
36
- },
37
- {
38
- "type": "string",
39
- "const": "config.edit"
40
- }
41
- ]
42
- },
43
- {
44
- "type": "null"
45
- }
46
- ]
47
- },
48
- "durationMs": {
49
- "type": "integer",
50
- "minimum": 0
51
- },
52
- "request": {},
53
- "provider": {
2
+ "anyOf": [
3
+ {
54
4
  "type": "object",
55
5
  "required": [
56
- "id",
57
- "type"
6
+ "schemaVersion",
7
+ "ok",
8
+ "provider",
9
+ "data"
58
10
  ],
59
11
  "properties": {
60
- "id": {
12
+ "schemaVersion": {
13
+ "type": "number",
14
+ "const": 2
15
+ },
16
+ "ok": {
17
+ "type": "boolean",
18
+ "const": true
19
+ },
20
+ "provider": {
61
21
  "type": "string"
62
22
  },
63
- "type": {
64
- "anyOf": [
65
- {
66
- "type": "string",
67
- "const": "tavily"
68
- },
69
- {
70
- "type": "string",
71
- "const": "exa"
72
- },
73
- {
74
- "type": "string",
75
- "const": "brave"
76
- },
77
- {
78
- "type": "string",
79
- "const": "searxng"
80
- },
81
- {
82
- "type": "string",
83
- "const": "firecrawl"
84
- },
85
- {
86
- "type": "string",
87
- "const": "jina"
88
- },
89
- {
90
- "type": "string",
91
- "const": "http"
92
- },
93
- {
94
- "type": "string",
95
- "const": "anysearch"
96
- },
97
- {
98
- "type": "string",
99
- "const": "xcrawl"
100
- }
101
- ]
102
- }
103
- }
104
- },
105
- "attempts": {
106
- "type": "array",
107
- "items": {
108
- "type": "object",
109
- "required": [
110
- "provider",
111
- "status",
112
- "durationMs"
113
- ],
114
- "properties": {
115
- "provider": {
116
- "type": "object",
117
- "required": [
118
- "id",
119
- "type"
120
- ],
121
- "properties": {
122
- "id": {
123
- "type": "string"
124
- },
125
- "type": {
126
- "anyOf": [
127
- {
128
- "type": "string",
129
- "const": "tavily"
130
- },
131
- {
132
- "type": "string",
133
- "const": "exa"
134
- },
135
- {
136
- "type": "string",
137
- "const": "brave"
138
- },
139
- {
140
- "type": "string",
141
- "const": "searxng"
142
- },
143
- {
144
- "type": "string",
145
- "const": "firecrawl"
146
- },
147
- {
148
- "type": "string",
149
- "const": "jina"
23
+ "data": {
24
+ "type": "object",
25
+ "required": [
26
+ "results"
27
+ ],
28
+ "properties": {
29
+ "results": {
30
+ "type": "array",
31
+ "items": {
32
+ "type": "object",
33
+ "required": [
34
+ "rank",
35
+ "title",
36
+ "url",
37
+ "snippet"
38
+ ],
39
+ "properties": {
40
+ "rank": {
41
+ "type": "integer",
42
+ "minimum": 1
150
43
  },
151
- {
152
- "type": "string",
153
- "const": "http"
44
+ "title": {
45
+ "type": "string"
154
46
  },
155
- {
47
+ "url": {
156
48
  "type": "string",
157
- "const": "anysearch"
49
+ "format": "uri"
158
50
  },
159
- {
160
- "type": "string",
161
- "const": "xcrawl"
51
+ "snippet": {
52
+ "type": "string"
162
53
  }
163
- ]
54
+ }
164
55
  }
165
56
  }
166
- },
167
- "status": {
168
- "anyOf": [
169
- {
170
- "type": "string",
171
- "const": "success"
172
- },
173
- {
174
- "type": "string",
175
- "const": "failed"
176
- }
177
- ]
178
- },
179
- "durationMs": {
180
- "type": "integer",
181
- "minimum": 0
182
- },
183
- "error": {
57
+ }
58
+ },
59
+ "warnings": {
60
+ "type": "array",
61
+ "items": {
184
62
  "type": "object",
185
63
  "required": [
186
64
  "code",
187
- "message",
188
- "retryable"
65
+ "message"
189
66
  ],
190
67
  "properties": {
191
68
  "code": {
192
- "type": "string"
69
+ "anyOf": [
70
+ {
71
+ "type": "string",
72
+ "const": "provider_order_update_failed"
73
+ }
74
+ ]
193
75
  },
194
76
  "message": {
195
77
  "type": "string"
196
- },
197
- "retryable": {
198
- "type": "boolean"
199
- },
200
- "provider": {
78
+ }
79
+ }
80
+ }
81
+ },
82
+ "debug": {
83
+ "type": "object",
84
+ "required": [
85
+ "request",
86
+ "durationMs",
87
+ "attempts"
88
+ ],
89
+ "properties": {
90
+ "request": {},
91
+ "durationMs": {
92
+ "type": "integer",
93
+ "minimum": 0
94
+ },
95
+ "provider": {
96
+ "type": "object",
97
+ "required": [
98
+ "id",
99
+ "type"
100
+ ],
101
+ "properties": {
102
+ "id": {
103
+ "type": "string"
104
+ },
105
+ "type": {
106
+ "anyOf": [
107
+ {
108
+ "type": "string",
109
+ "const": "tavily"
110
+ },
111
+ {
112
+ "type": "string",
113
+ "const": "exa"
114
+ },
115
+ {
116
+ "type": "string",
117
+ "const": "bocha"
118
+ },
119
+ {
120
+ "type": "string",
121
+ "const": "brave"
122
+ },
123
+ {
124
+ "type": "string",
125
+ "const": "searxng"
126
+ },
127
+ {
128
+ "type": "string",
129
+ "const": "firecrawl"
130
+ },
131
+ {
132
+ "type": "string",
133
+ "const": "jina"
134
+ },
135
+ {
136
+ "type": "string",
137
+ "const": "http"
138
+ },
139
+ {
140
+ "type": "string",
141
+ "const": "anysearch"
142
+ },
143
+ {
144
+ "type": "string",
145
+ "const": "xcrawl"
146
+ },
147
+ {
148
+ "type": "string",
149
+ "const": "deepseek"
150
+ }
151
+ ]
152
+ }
153
+ }
154
+ },
155
+ "attempts": {
156
+ "type": "array",
157
+ "items": {
201
158
  "type": "object",
202
159
  "required": [
203
- "id",
204
- "type"
160
+ "provider",
161
+ "status",
162
+ "durationMs"
205
163
  ],
206
164
  "properties": {
207
- "id": {
208
- "type": "string"
165
+ "provider": {
166
+ "type": "object",
167
+ "required": [
168
+ "id",
169
+ "type"
170
+ ],
171
+ "properties": {
172
+ "id": {
173
+ "type": "string"
174
+ },
175
+ "type": {
176
+ "anyOf": [
177
+ {
178
+ "type": "string",
179
+ "const": "tavily"
180
+ },
181
+ {
182
+ "type": "string",
183
+ "const": "exa"
184
+ },
185
+ {
186
+ "type": "string",
187
+ "const": "bocha"
188
+ },
189
+ {
190
+ "type": "string",
191
+ "const": "brave"
192
+ },
193
+ {
194
+ "type": "string",
195
+ "const": "searxng"
196
+ },
197
+ {
198
+ "type": "string",
199
+ "const": "firecrawl"
200
+ },
201
+ {
202
+ "type": "string",
203
+ "const": "jina"
204
+ },
205
+ {
206
+ "type": "string",
207
+ "const": "http"
208
+ },
209
+ {
210
+ "type": "string",
211
+ "const": "anysearch"
212
+ },
213
+ {
214
+ "type": "string",
215
+ "const": "xcrawl"
216
+ },
217
+ {
218
+ "type": "string",
219
+ "const": "deepseek"
220
+ }
221
+ ]
222
+ }
223
+ }
209
224
  },
210
- "type": {
225
+ "status": {
211
226
  "anyOf": [
212
227
  {
213
228
  "type": "string",
214
- "const": "tavily"
229
+ "const": "success"
215
230
  },
216
231
  {
217
232
  "type": "string",
218
- "const": "exa"
233
+ "const": "failed"
234
+ }
235
+ ]
236
+ },
237
+ "durationMs": {
238
+ "type": "integer",
239
+ "minimum": 0
240
+ },
241
+ "error": {
242
+ "type": "object",
243
+ "required": [
244
+ "code",
245
+ "message",
246
+ "retryable"
247
+ ],
248
+ "properties": {
249
+ "code": {
250
+ "type": "string"
219
251
  },
220
- {
221
- "type": "string",
222
- "const": "brave"
252
+ "message": {
253
+ "type": "string"
223
254
  },
224
- {
225
- "type": "string",
226
- "const": "searxng"
255
+ "retryable": {
256
+ "type": "boolean"
227
257
  },
228
- {
229
- "type": "string",
230
- "const": "firecrawl"
258
+ "provider": {
259
+ "type": "object",
260
+ "required": [
261
+ "id",
262
+ "type"
263
+ ],
264
+ "properties": {
265
+ "id": {
266
+ "type": "string"
267
+ },
268
+ "type": {
269
+ "anyOf": [
270
+ {
271
+ "type": "string",
272
+ "const": "tavily"
273
+ },
274
+ {
275
+ "type": "string",
276
+ "const": "exa"
277
+ },
278
+ {
279
+ "type": "string",
280
+ "const": "bocha"
281
+ },
282
+ {
283
+ "type": "string",
284
+ "const": "brave"
285
+ },
286
+ {
287
+ "type": "string",
288
+ "const": "searxng"
289
+ },
290
+ {
291
+ "type": "string",
292
+ "const": "firecrawl"
293
+ },
294
+ {
295
+ "type": "string",
296
+ "const": "jina"
297
+ },
298
+ {
299
+ "type": "string",
300
+ "const": "http"
301
+ },
302
+ {
303
+ "type": "string",
304
+ "const": "anysearch"
305
+ },
306
+ {
307
+ "type": "string",
308
+ "const": "xcrawl"
309
+ },
310
+ {
311
+ "type": "string",
312
+ "const": "deepseek"
313
+ }
314
+ ]
315
+ }
316
+ }
231
317
  },
232
- {
233
- "type": "string",
234
- "const": "jina"
318
+ "httpStatus": {
319
+ "type": "integer"
235
320
  },
236
- {
237
- "type": "string",
238
- "const": "http"
321
+ "details": {}
322
+ }
323
+ }
324
+ }
325
+ }
326
+ },
327
+ "raw": {},
328
+ "partial": {
329
+ "type": "object",
330
+ "required": [
331
+ "provider",
332
+ "raw"
333
+ ],
334
+ "properties": {
335
+ "provider": {
336
+ "type": "object",
337
+ "required": [
338
+ "id",
339
+ "type"
340
+ ],
341
+ "properties": {
342
+ "id": {
343
+ "type": "string"
344
+ },
345
+ "type": {
346
+ "anyOf": [
347
+ {
348
+ "type": "string",
349
+ "const": "tavily"
350
+ },
351
+ {
352
+ "type": "string",
353
+ "const": "exa"
354
+ },
355
+ {
356
+ "type": "string",
357
+ "const": "bocha"
358
+ },
359
+ {
360
+ "type": "string",
361
+ "const": "brave"
362
+ },
363
+ {
364
+ "type": "string",
365
+ "const": "searxng"
366
+ },
367
+ {
368
+ "type": "string",
369
+ "const": "firecrawl"
370
+ },
371
+ {
372
+ "type": "string",
373
+ "const": "jina"
374
+ },
375
+ {
376
+ "type": "string",
377
+ "const": "http"
378
+ },
379
+ {
380
+ "type": "string",
381
+ "const": "anysearch"
382
+ },
383
+ {
384
+ "type": "string",
385
+ "const": "xcrawl"
386
+ },
387
+ {
388
+ "type": "string",
389
+ "const": "deepseek"
390
+ }
391
+ ]
392
+ }
393
+ }
394
+ },
395
+ "raw": {}
396
+ }
397
+ }
398
+ }
399
+ }
400
+ }
401
+ },
402
+ {
403
+ "type": "object",
404
+ "required": [
405
+ "schemaVersion",
406
+ "ok",
407
+ "provider",
408
+ "data"
409
+ ],
410
+ "properties": {
411
+ "schemaVersion": {
412
+ "type": "number",
413
+ "const": 2
414
+ },
415
+ "ok": {
416
+ "type": "boolean",
417
+ "const": true
418
+ },
419
+ "provider": {
420
+ "type": "string"
421
+ },
422
+ "data": {
423
+ "type": "object",
424
+ "required": [
425
+ "document"
426
+ ],
427
+ "properties": {
428
+ "document": {
429
+ "type": "object",
430
+ "required": [
431
+ "sourceUrl",
432
+ "title",
433
+ "content",
434
+ "contentType"
435
+ ],
436
+ "properties": {
437
+ "sourceUrl": {
438
+ "type": "string",
439
+ "format": "uri"
440
+ },
441
+ "title": {
442
+ "type": "string"
443
+ },
444
+ "content": {
445
+ "type": "string"
446
+ },
447
+ "contentType": {
448
+ "type": "string",
449
+ "const": "text/markdown"
450
+ }
451
+ }
452
+ }
453
+ }
454
+ },
455
+ "warnings": {
456
+ "type": "array",
457
+ "items": {
458
+ "type": "object",
459
+ "required": [
460
+ "code",
461
+ "message"
462
+ ],
463
+ "properties": {
464
+ "code": {
465
+ "anyOf": [
466
+ {
467
+ "type": "string",
468
+ "const": "provider_order_update_failed"
469
+ }
470
+ ]
471
+ },
472
+ "message": {
473
+ "type": "string"
474
+ }
475
+ }
476
+ }
477
+ },
478
+ "debug": {
479
+ "type": "object",
480
+ "required": [
481
+ "request",
482
+ "durationMs",
483
+ "attempts"
484
+ ],
485
+ "properties": {
486
+ "request": {},
487
+ "durationMs": {
488
+ "type": "integer",
489
+ "minimum": 0
490
+ },
491
+ "provider": {
492
+ "type": "object",
493
+ "required": [
494
+ "id",
495
+ "type"
496
+ ],
497
+ "properties": {
498
+ "id": {
499
+ "type": "string"
500
+ },
501
+ "type": {
502
+ "anyOf": [
503
+ {
504
+ "type": "string",
505
+ "const": "tavily"
506
+ },
507
+ {
508
+ "type": "string",
509
+ "const": "exa"
510
+ },
511
+ {
512
+ "type": "string",
513
+ "const": "bocha"
514
+ },
515
+ {
516
+ "type": "string",
517
+ "const": "brave"
518
+ },
519
+ {
520
+ "type": "string",
521
+ "const": "searxng"
522
+ },
523
+ {
524
+ "type": "string",
525
+ "const": "firecrawl"
526
+ },
527
+ {
528
+ "type": "string",
529
+ "const": "jina"
530
+ },
531
+ {
532
+ "type": "string",
533
+ "const": "http"
534
+ },
535
+ {
536
+ "type": "string",
537
+ "const": "anysearch"
538
+ },
539
+ {
540
+ "type": "string",
541
+ "const": "xcrawl"
542
+ },
543
+ {
544
+ "type": "string",
545
+ "const": "deepseek"
546
+ }
547
+ ]
548
+ }
549
+ }
550
+ },
551
+ "attempts": {
552
+ "type": "array",
553
+ "items": {
554
+ "type": "object",
555
+ "required": [
556
+ "provider",
557
+ "status",
558
+ "durationMs"
559
+ ],
560
+ "properties": {
561
+ "provider": {
562
+ "type": "object",
563
+ "required": [
564
+ "id",
565
+ "type"
566
+ ],
567
+ "properties": {
568
+ "id": {
569
+ "type": "string"
239
570
  },
571
+ "type": {
572
+ "anyOf": [
573
+ {
574
+ "type": "string",
575
+ "const": "tavily"
576
+ },
577
+ {
578
+ "type": "string",
579
+ "const": "exa"
580
+ },
581
+ {
582
+ "type": "string",
583
+ "const": "bocha"
584
+ },
585
+ {
586
+ "type": "string",
587
+ "const": "brave"
588
+ },
589
+ {
590
+ "type": "string",
591
+ "const": "searxng"
592
+ },
593
+ {
594
+ "type": "string",
595
+ "const": "firecrawl"
596
+ },
597
+ {
598
+ "type": "string",
599
+ "const": "jina"
600
+ },
601
+ {
602
+ "type": "string",
603
+ "const": "http"
604
+ },
605
+ {
606
+ "type": "string",
607
+ "const": "anysearch"
608
+ },
609
+ {
610
+ "type": "string",
611
+ "const": "xcrawl"
612
+ },
613
+ {
614
+ "type": "string",
615
+ "const": "deepseek"
616
+ }
617
+ ]
618
+ }
619
+ }
620
+ },
621
+ "status": {
622
+ "anyOf": [
240
623
  {
241
624
  "type": "string",
242
- "const": "anysearch"
625
+ "const": "success"
243
626
  },
244
627
  {
245
628
  "type": "string",
246
- "const": "xcrawl"
629
+ "const": "failed"
247
630
  }
248
631
  ]
632
+ },
633
+ "durationMs": {
634
+ "type": "integer",
635
+ "minimum": 0
636
+ },
637
+ "error": {
638
+ "type": "object",
639
+ "required": [
640
+ "code",
641
+ "message",
642
+ "retryable"
643
+ ],
644
+ "properties": {
645
+ "code": {
646
+ "type": "string"
647
+ },
648
+ "message": {
649
+ "type": "string"
650
+ },
651
+ "retryable": {
652
+ "type": "boolean"
653
+ },
654
+ "provider": {
655
+ "type": "object",
656
+ "required": [
657
+ "id",
658
+ "type"
659
+ ],
660
+ "properties": {
661
+ "id": {
662
+ "type": "string"
663
+ },
664
+ "type": {
665
+ "anyOf": [
666
+ {
667
+ "type": "string",
668
+ "const": "tavily"
669
+ },
670
+ {
671
+ "type": "string",
672
+ "const": "exa"
673
+ },
674
+ {
675
+ "type": "string",
676
+ "const": "bocha"
677
+ },
678
+ {
679
+ "type": "string",
680
+ "const": "brave"
681
+ },
682
+ {
683
+ "type": "string",
684
+ "const": "searxng"
685
+ },
686
+ {
687
+ "type": "string",
688
+ "const": "firecrawl"
689
+ },
690
+ {
691
+ "type": "string",
692
+ "const": "jina"
693
+ },
694
+ {
695
+ "type": "string",
696
+ "const": "http"
697
+ },
698
+ {
699
+ "type": "string",
700
+ "const": "anysearch"
701
+ },
702
+ {
703
+ "type": "string",
704
+ "const": "xcrawl"
705
+ },
706
+ {
707
+ "type": "string",
708
+ "const": "deepseek"
709
+ }
710
+ ]
711
+ }
712
+ }
713
+ },
714
+ "httpStatus": {
715
+ "type": "integer"
716
+ },
717
+ "details": {}
718
+ }
249
719
  }
250
720
  }
251
- },
252
- "httpStatus": {
253
- "type": "integer"
254
- },
255
- "details": {}
721
+ }
722
+ },
723
+ "raw": {},
724
+ "partial": {
725
+ "type": "object",
726
+ "required": [
727
+ "provider",
728
+ "raw"
729
+ ],
730
+ "properties": {
731
+ "provider": {
732
+ "type": "object",
733
+ "required": [
734
+ "id",
735
+ "type"
736
+ ],
737
+ "properties": {
738
+ "id": {
739
+ "type": "string"
740
+ },
741
+ "type": {
742
+ "anyOf": [
743
+ {
744
+ "type": "string",
745
+ "const": "tavily"
746
+ },
747
+ {
748
+ "type": "string",
749
+ "const": "exa"
750
+ },
751
+ {
752
+ "type": "string",
753
+ "const": "bocha"
754
+ },
755
+ {
756
+ "type": "string",
757
+ "const": "brave"
758
+ },
759
+ {
760
+ "type": "string",
761
+ "const": "searxng"
762
+ },
763
+ {
764
+ "type": "string",
765
+ "const": "firecrawl"
766
+ },
767
+ {
768
+ "type": "string",
769
+ "const": "jina"
770
+ },
771
+ {
772
+ "type": "string",
773
+ "const": "http"
774
+ },
775
+ {
776
+ "type": "string",
777
+ "const": "anysearch"
778
+ },
779
+ {
780
+ "type": "string",
781
+ "const": "xcrawl"
782
+ },
783
+ {
784
+ "type": "string",
785
+ "const": "deepseek"
786
+ }
787
+ ]
788
+ }
789
+ }
790
+ },
791
+ "raw": {}
792
+ }
256
793
  }
257
794
  }
258
795
  }
259
796
  }
260
797
  },
261
- "data": {},
262
- "raw": {},
263
- "error": {
798
+ {
264
799
  "type": "object",
265
800
  "required": [
266
- "code",
267
- "message",
268
- "retryable"
801
+ "schemaVersion",
802
+ "ok",
803
+ "error"
269
804
  ],
270
805
  "properties": {
271
- "code": {
272
- "type": "string"
806
+ "schemaVersion": {
807
+ "type": "number",
808
+ "const": 2
273
809
  },
274
- "message": {
275
- "type": "string"
810
+ "ok": {
811
+ "type": "boolean",
812
+ "const": false
276
813
  },
277
- "retryable": {
278
- "type": "boolean"
814
+ "error": {
815
+ "type": "object",
816
+ "required": [
817
+ "code",
818
+ "message",
819
+ "retryable"
820
+ ],
821
+ "properties": {
822
+ "code": {
823
+ "type": "string"
824
+ },
825
+ "message": {
826
+ "type": "string"
827
+ },
828
+ "retryable": {
829
+ "type": "boolean"
830
+ }
831
+ }
279
832
  },
280
- "provider": {
833
+ "attempts": {
834
+ "type": "array",
835
+ "items": {
836
+ "type": "object",
837
+ "required": [
838
+ "provider",
839
+ "code"
840
+ ],
841
+ "properties": {
842
+ "provider": {
843
+ "type": "string"
844
+ },
845
+ "code": {
846
+ "type": "string"
847
+ },
848
+ "httpStatus": {
849
+ "type": "integer"
850
+ }
851
+ }
852
+ }
853
+ },
854
+ "partial": {
281
855
  "type": "object",
282
856
  "required": [
283
- "id",
284
- "type"
857
+ "provider",
858
+ "data"
285
859
  ],
286
860
  "properties": {
287
- "id": {
861
+ "provider": {
288
862
  "type": "string"
289
863
  },
290
- "type": {
291
- "anyOf": [
292
- {
293
- "type": "string",
294
- "const": "tavily"
295
- },
296
- {
297
- "type": "string",
298
- "const": "exa"
299
- },
300
- {
301
- "type": "string",
302
- "const": "brave"
303
- },
304
- {
305
- "type": "string",
306
- "const": "searxng"
307
- },
308
- {
309
- "type": "string",
310
- "const": "firecrawl"
311
- },
312
- {
313
- "type": "string",
314
- "const": "jina"
315
- },
316
- {
317
- "type": "string",
318
- "const": "http"
319
- },
320
- {
321
- "type": "string",
322
- "const": "anysearch"
864
+ "data": {
865
+ "type": "object",
866
+ "required": [
867
+ "document"
868
+ ],
869
+ "properties": {
870
+ "document": {
871
+ "type": "object",
872
+ "required": [
873
+ "sourceUrl",
874
+ "title",
875
+ "content",
876
+ "contentType"
877
+ ],
878
+ "properties": {
879
+ "sourceUrl": {
880
+ "type": "string",
881
+ "format": "uri"
882
+ },
883
+ "title": {
884
+ "type": "string"
885
+ },
886
+ "content": {
887
+ "type": "string"
888
+ },
889
+ "contentType": {
890
+ "type": "string",
891
+ "const": "text/markdown"
892
+ }
893
+ }
894
+ }
895
+ }
896
+ }
897
+ }
898
+ },
899
+ "warnings": {
900
+ "type": "array",
901
+ "items": {
902
+ "type": "object",
903
+ "required": [
904
+ "code",
905
+ "message"
906
+ ],
907
+ "properties": {
908
+ "code": {
909
+ "anyOf": [
910
+ {
911
+ "type": "string",
912
+ "const": "provider_order_update_failed"
913
+ }
914
+ ]
915
+ },
916
+ "message": {
917
+ "type": "string"
918
+ }
919
+ }
920
+ }
921
+ },
922
+ "debug": {
923
+ "type": "object",
924
+ "required": [
925
+ "request",
926
+ "durationMs",
927
+ "attempts"
928
+ ],
929
+ "properties": {
930
+ "request": {},
931
+ "durationMs": {
932
+ "type": "integer",
933
+ "minimum": 0
934
+ },
935
+ "provider": {
936
+ "type": "object",
937
+ "required": [
938
+ "id",
939
+ "type"
940
+ ],
941
+ "properties": {
942
+ "id": {
943
+ "type": "string"
323
944
  },
324
- {
325
- "type": "string",
326
- "const": "xcrawl"
945
+ "type": {
946
+ "anyOf": [
947
+ {
948
+ "type": "string",
949
+ "const": "tavily"
950
+ },
951
+ {
952
+ "type": "string",
953
+ "const": "exa"
954
+ },
955
+ {
956
+ "type": "string",
957
+ "const": "bocha"
958
+ },
959
+ {
960
+ "type": "string",
961
+ "const": "brave"
962
+ },
963
+ {
964
+ "type": "string",
965
+ "const": "searxng"
966
+ },
967
+ {
968
+ "type": "string",
969
+ "const": "firecrawl"
970
+ },
971
+ {
972
+ "type": "string",
973
+ "const": "jina"
974
+ },
975
+ {
976
+ "type": "string",
977
+ "const": "http"
978
+ },
979
+ {
980
+ "type": "string",
981
+ "const": "anysearch"
982
+ },
983
+ {
984
+ "type": "string",
985
+ "const": "xcrawl"
986
+ },
987
+ {
988
+ "type": "string",
989
+ "const": "deepseek"
990
+ }
991
+ ]
327
992
  }
328
- ]
993
+ }
994
+ },
995
+ "attempts": {
996
+ "type": "array",
997
+ "items": {
998
+ "type": "object",
999
+ "required": [
1000
+ "provider",
1001
+ "status",
1002
+ "durationMs"
1003
+ ],
1004
+ "properties": {
1005
+ "provider": {
1006
+ "type": "object",
1007
+ "required": [
1008
+ "id",
1009
+ "type"
1010
+ ],
1011
+ "properties": {
1012
+ "id": {
1013
+ "type": "string"
1014
+ },
1015
+ "type": {
1016
+ "anyOf": [
1017
+ {
1018
+ "type": "string",
1019
+ "const": "tavily"
1020
+ },
1021
+ {
1022
+ "type": "string",
1023
+ "const": "exa"
1024
+ },
1025
+ {
1026
+ "type": "string",
1027
+ "const": "bocha"
1028
+ },
1029
+ {
1030
+ "type": "string",
1031
+ "const": "brave"
1032
+ },
1033
+ {
1034
+ "type": "string",
1035
+ "const": "searxng"
1036
+ },
1037
+ {
1038
+ "type": "string",
1039
+ "const": "firecrawl"
1040
+ },
1041
+ {
1042
+ "type": "string",
1043
+ "const": "jina"
1044
+ },
1045
+ {
1046
+ "type": "string",
1047
+ "const": "http"
1048
+ },
1049
+ {
1050
+ "type": "string",
1051
+ "const": "anysearch"
1052
+ },
1053
+ {
1054
+ "type": "string",
1055
+ "const": "xcrawl"
1056
+ },
1057
+ {
1058
+ "type": "string",
1059
+ "const": "deepseek"
1060
+ }
1061
+ ]
1062
+ }
1063
+ }
1064
+ },
1065
+ "status": {
1066
+ "anyOf": [
1067
+ {
1068
+ "type": "string",
1069
+ "const": "success"
1070
+ },
1071
+ {
1072
+ "type": "string",
1073
+ "const": "failed"
1074
+ }
1075
+ ]
1076
+ },
1077
+ "durationMs": {
1078
+ "type": "integer",
1079
+ "minimum": 0
1080
+ },
1081
+ "error": {
1082
+ "type": "object",
1083
+ "required": [
1084
+ "code",
1085
+ "message",
1086
+ "retryable"
1087
+ ],
1088
+ "properties": {
1089
+ "code": {
1090
+ "type": "string"
1091
+ },
1092
+ "message": {
1093
+ "type": "string"
1094
+ },
1095
+ "retryable": {
1096
+ "type": "boolean"
1097
+ },
1098
+ "provider": {
1099
+ "type": "object",
1100
+ "required": [
1101
+ "id",
1102
+ "type"
1103
+ ],
1104
+ "properties": {
1105
+ "id": {
1106
+ "type": "string"
1107
+ },
1108
+ "type": {
1109
+ "anyOf": [
1110
+ {
1111
+ "type": "string",
1112
+ "const": "tavily"
1113
+ },
1114
+ {
1115
+ "type": "string",
1116
+ "const": "exa"
1117
+ },
1118
+ {
1119
+ "type": "string",
1120
+ "const": "bocha"
1121
+ },
1122
+ {
1123
+ "type": "string",
1124
+ "const": "brave"
1125
+ },
1126
+ {
1127
+ "type": "string",
1128
+ "const": "searxng"
1129
+ },
1130
+ {
1131
+ "type": "string",
1132
+ "const": "firecrawl"
1133
+ },
1134
+ {
1135
+ "type": "string",
1136
+ "const": "jina"
1137
+ },
1138
+ {
1139
+ "type": "string",
1140
+ "const": "http"
1141
+ },
1142
+ {
1143
+ "type": "string",
1144
+ "const": "anysearch"
1145
+ },
1146
+ {
1147
+ "type": "string",
1148
+ "const": "xcrawl"
1149
+ },
1150
+ {
1151
+ "type": "string",
1152
+ "const": "deepseek"
1153
+ }
1154
+ ]
1155
+ }
1156
+ }
1157
+ },
1158
+ "httpStatus": {
1159
+ "type": "integer"
1160
+ },
1161
+ "details": {}
1162
+ }
1163
+ }
1164
+ }
1165
+ }
1166
+ },
1167
+ "raw": {},
1168
+ "partial": {
1169
+ "type": "object",
1170
+ "required": [
1171
+ "provider",
1172
+ "raw"
1173
+ ],
1174
+ "properties": {
1175
+ "provider": {
1176
+ "type": "object",
1177
+ "required": [
1178
+ "id",
1179
+ "type"
1180
+ ],
1181
+ "properties": {
1182
+ "id": {
1183
+ "type": "string"
1184
+ },
1185
+ "type": {
1186
+ "anyOf": [
1187
+ {
1188
+ "type": "string",
1189
+ "const": "tavily"
1190
+ },
1191
+ {
1192
+ "type": "string",
1193
+ "const": "exa"
1194
+ },
1195
+ {
1196
+ "type": "string",
1197
+ "const": "bocha"
1198
+ },
1199
+ {
1200
+ "type": "string",
1201
+ "const": "brave"
1202
+ },
1203
+ {
1204
+ "type": "string",
1205
+ "const": "searxng"
1206
+ },
1207
+ {
1208
+ "type": "string",
1209
+ "const": "firecrawl"
1210
+ },
1211
+ {
1212
+ "type": "string",
1213
+ "const": "jina"
1214
+ },
1215
+ {
1216
+ "type": "string",
1217
+ "const": "http"
1218
+ },
1219
+ {
1220
+ "type": "string",
1221
+ "const": "anysearch"
1222
+ },
1223
+ {
1224
+ "type": "string",
1225
+ "const": "xcrawl"
1226
+ },
1227
+ {
1228
+ "type": "string",
1229
+ "const": "deepseek"
1230
+ }
1231
+ ]
1232
+ }
1233
+ }
1234
+ },
1235
+ "raw": {}
1236
+ }
329
1237
  }
330
1238
  }
1239
+ }
1240
+ }
1241
+ },
1242
+ {
1243
+ "type": "object",
1244
+ "required": [
1245
+ "schemaVersion",
1246
+ "ok",
1247
+ "command",
1248
+ "durationMs",
1249
+ "data"
1250
+ ],
1251
+ "properties": {
1252
+ "schemaVersion": {
1253
+ "type": "number",
1254
+ "const": 2
331
1255
  },
332
- "httpStatus": {
333
- "type": "integer"
1256
+ "ok": {
1257
+ "type": "boolean",
1258
+ "const": true
334
1259
  },
335
- "details": {}
1260
+ "command": {
1261
+ "anyOf": [
1262
+ {
1263
+ "type": "string",
1264
+ "const": "providers"
1265
+ },
1266
+ {
1267
+ "type": "string",
1268
+ "const": "doctor"
1269
+ }
1270
+ ]
1271
+ },
1272
+ "durationMs": {
1273
+ "type": "integer",
1274
+ "minimum": 0
1275
+ },
1276
+ "data": {}
336
1277
  }
337
1278
  },
338
- "partial": {
1279
+ {
339
1280
  "type": "object",
340
1281
  "required": [
341
- "provider",
342
- "data",
343
- "raw"
1282
+ "schemaVersion",
1283
+ "ok",
1284
+ "command",
1285
+ "durationMs",
1286
+ "data"
344
1287
  ],
345
1288
  "properties": {
346
- "provider": {
1289
+ "schemaVersion": {
1290
+ "type": "number",
1291
+ "const": 2
1292
+ },
1293
+ "ok": {
1294
+ "type": "boolean",
1295
+ "const": true
1296
+ },
1297
+ "command": {
1298
+ "type": "string",
1299
+ "const": "config.edit"
1300
+ },
1301
+ "durationMs": {
1302
+ "type": "integer",
1303
+ "minimum": 0
1304
+ },
1305
+ "data": {
347
1306
  "type": "object",
348
1307
  "required": [
349
- "id",
350
- "type"
1308
+ "path",
1309
+ "created",
1310
+ "opened"
351
1311
  ],
352
1312
  "properties": {
353
- "id": {
1313
+ "path": {
354
1314
  "type": "string"
355
1315
  },
356
- "type": {
357
- "anyOf": [
358
- {
359
- "type": "string",
360
- "const": "tavily"
361
- },
362
- {
363
- "type": "string",
364
- "const": "exa"
365
- },
366
- {
367
- "type": "string",
368
- "const": "brave"
369
- },
370
- {
371
- "type": "string",
372
- "const": "searxng"
373
- },
374
- {
375
- "type": "string",
376
- "const": "firecrawl"
377
- },
378
- {
379
- "type": "string",
380
- "const": "jina"
381
- },
382
- {
383
- "type": "string",
384
- "const": "http"
385
- },
386
- {
387
- "type": "string",
388
- "const": "anysearch"
389
- },
390
- {
391
- "type": "string",
392
- "const": "xcrawl"
393
- }
394
- ]
1316
+ "created": {
1317
+ "type": "boolean"
1318
+ },
1319
+ "opened": {
1320
+ "type": "boolean",
1321
+ "const": true
395
1322
  }
396
1323
  }
1324
+ }
1325
+ }
1326
+ },
1327
+ {
1328
+ "type": "object",
1329
+ "required": [
1330
+ "schemaVersion",
1331
+ "ok",
1332
+ "command",
1333
+ "durationMs",
1334
+ "error"
1335
+ ],
1336
+ "properties": {
1337
+ "schemaVersion": {
1338
+ "type": "number",
1339
+ "const": 2
397
1340
  },
398
- "data": {
1341
+ "ok": {
1342
+ "type": "boolean",
1343
+ "const": false
1344
+ },
1345
+ "command": {
1346
+ "anyOf": [
1347
+ {
1348
+ "type": "string",
1349
+ "const": "providers"
1350
+ },
1351
+ {
1352
+ "type": "string",
1353
+ "const": "doctor"
1354
+ },
1355
+ {
1356
+ "type": "string",
1357
+ "const": "config.edit"
1358
+ },
1359
+ {
1360
+ "type": "null"
1361
+ }
1362
+ ]
1363
+ },
1364
+ "durationMs": {
1365
+ "type": "integer",
1366
+ "minimum": 0
1367
+ },
1368
+ "error": {
399
1369
  "type": "object",
400
1370
  "required": [
401
- "document"
1371
+ "code",
1372
+ "message",
1373
+ "retryable"
402
1374
  ],
403
1375
  "properties": {
404
- "document": {
1376
+ "code": {
1377
+ "type": "string"
1378
+ },
1379
+ "message": {
1380
+ "type": "string"
1381
+ },
1382
+ "retryable": {
1383
+ "type": "boolean"
1384
+ },
1385
+ "provider": {
405
1386
  "type": "object",
406
1387
  "required": [
407
- "sourceUrl",
408
- "title",
409
- "content",
410
- "contentType"
1388
+ "id",
1389
+ "type"
411
1390
  ],
412
1391
  "properties": {
413
- "sourceUrl": {
414
- "type": "string",
415
- "format": "uri"
416
- },
417
- "title": {
1392
+ "id": {
418
1393
  "type": "string"
419
1394
  },
420
- "content": {
421
- "type": "string"
422
- },
423
- "contentType": {
424
- "type": "string",
425
- "const": "text/markdown"
1395
+ "type": {
1396
+ "anyOf": [
1397
+ {
1398
+ "type": "string",
1399
+ "const": "tavily"
1400
+ },
1401
+ {
1402
+ "type": "string",
1403
+ "const": "exa"
1404
+ },
1405
+ {
1406
+ "type": "string",
1407
+ "const": "bocha"
1408
+ },
1409
+ {
1410
+ "type": "string",
1411
+ "const": "brave"
1412
+ },
1413
+ {
1414
+ "type": "string",
1415
+ "const": "searxng"
1416
+ },
1417
+ {
1418
+ "type": "string",
1419
+ "const": "firecrawl"
1420
+ },
1421
+ {
1422
+ "type": "string",
1423
+ "const": "jina"
1424
+ },
1425
+ {
1426
+ "type": "string",
1427
+ "const": "http"
1428
+ },
1429
+ {
1430
+ "type": "string",
1431
+ "const": "anysearch"
1432
+ },
1433
+ {
1434
+ "type": "string",
1435
+ "const": "xcrawl"
1436
+ },
1437
+ {
1438
+ "type": "string",
1439
+ "const": "deepseek"
1440
+ }
1441
+ ]
426
1442
  }
427
1443
  }
428
- }
1444
+ },
1445
+ "httpStatus": {
1446
+ "type": "integer"
1447
+ },
1448
+ "details": {}
429
1449
  }
430
- },
431
- "raw": {}
1450
+ }
432
1451
  }
433
1452
  }
434
- }
1453
+ ]
435
1454
  }