@klex/agent-admin-api 0.1.1 → 0.2.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 +24 -1
- package/dist/index.d.ts +407 -43
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @klex/agent-admin-api
|
|
2
2
|
|
|
3
|
-
Shared types for the Klex
|
|
3
|
+
Shared types for the Klex Bot Admin API.
|
|
4
4
|
|
|
5
5
|
The package exports the routed Hono application type through `AdminApi` and
|
|
6
6
|
`AdminApiServer`, plus the `OpenAPIHono` type used to build RPC clients.
|
|
@@ -13,4 +13,27 @@ const client = hc<AdminApi>('https://agent.example');
|
|
|
13
13
|
const health = await client.v1.health.$get();
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
+
## MCP OAuth authorization
|
|
17
|
+
|
|
18
|
+
Version 0.2 adds the consolidated MCP authorization contract. Authorization is
|
|
19
|
+
managed through the MCP server resource:
|
|
20
|
+
|
|
21
|
+
- `PUT /v1/mcp-servers/:name/authorization` starts an interactive OAuth flow or
|
|
22
|
+
returns the existing pending flow.
|
|
23
|
+
- `DELETE /v1/mcp-servers/:name/authorization` cancels a pending flow.
|
|
24
|
+
- `POST /v1/mcp-oauth/callback` delivers the provider result using its OAuth
|
|
25
|
+
`state` value.
|
|
26
|
+
- `GET /v1/mcp-servers` and `GET /v1/mcp-servers/:name` expose authorization
|
|
27
|
+
status, pending authorization metadata, connection errors, and retry timing.
|
|
28
|
+
|
|
29
|
+
The start response contains the provider authorization URL and its associated
|
|
30
|
+
state. Treat both as secrets: do not log them or expose them beyond the client
|
|
31
|
+
that opens the authorization flow. Callback state is single-use and expires at
|
|
32
|
+
the response's `expiresAt` timestamp.
|
|
33
|
+
|
|
34
|
+
Error responses include a machine-readable `code` alongside the human-readable
|
|
35
|
+
`error` message so clients can distinguish unsupported transports, manually
|
|
36
|
+
configured credentials, connected servers, unavailable Cloud authorization,
|
|
37
|
+
and authorization timeouts.
|
|
38
|
+
|
|
16
39
|
Install `hono` and `@hono/zod-openapi` as peer dependencies.
|
package/dist/index.d.ts
CHANGED
|
@@ -15,13 +15,6 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
15
15
|
} & {
|
|
16
16
|
"/v1/cloud/status": {
|
|
17
17
|
$get: {
|
|
18
|
-
output: {
|
|
19
|
-
error: string;
|
|
20
|
-
};
|
|
21
|
-
outputFormat: "json";
|
|
22
|
-
status: 500;
|
|
23
|
-
input: {};
|
|
24
|
-
} | {
|
|
25
18
|
output: {
|
|
26
19
|
cloudEnabled: boolean;
|
|
27
20
|
enrolled: boolean;
|
|
@@ -33,6 +26,14 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
33
26
|
outputFormat: "json";
|
|
34
27
|
status: 200;
|
|
35
28
|
input: {};
|
|
29
|
+
} | {
|
|
30
|
+
output: {
|
|
31
|
+
error: string;
|
|
32
|
+
code: string;
|
|
33
|
+
};
|
|
34
|
+
outputFormat: "json";
|
|
35
|
+
status: 500;
|
|
36
|
+
input: {};
|
|
36
37
|
};
|
|
37
38
|
};
|
|
38
39
|
} & {
|
|
@@ -40,6 +41,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
40
41
|
$post: {
|
|
41
42
|
output: {
|
|
42
43
|
error: string;
|
|
44
|
+
code: string;
|
|
43
45
|
};
|
|
44
46
|
outputFormat: "json";
|
|
45
47
|
status: 400;
|
|
@@ -51,6 +53,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
51
53
|
} | {
|
|
52
54
|
output: {
|
|
53
55
|
error: string;
|
|
56
|
+
code: string;
|
|
54
57
|
};
|
|
55
58
|
outputFormat: "json";
|
|
56
59
|
status: 500;
|
|
@@ -73,11 +76,62 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
73
76
|
};
|
|
74
77
|
};
|
|
75
78
|
};
|
|
79
|
+
} & {
|
|
80
|
+
"/v1/settings/agent": {
|
|
81
|
+
$get: {
|
|
82
|
+
output: {
|
|
83
|
+
officialName: string;
|
|
84
|
+
};
|
|
85
|
+
outputFormat: "json";
|
|
86
|
+
status: 200;
|
|
87
|
+
input: {};
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
} & {
|
|
91
|
+
"/v1/settings/agent": {
|
|
92
|
+
$patch: {
|
|
93
|
+
output: {
|
|
94
|
+
error: string;
|
|
95
|
+
code: string;
|
|
96
|
+
};
|
|
97
|
+
outputFormat: "json";
|
|
98
|
+
status: 400;
|
|
99
|
+
input: {
|
|
100
|
+
json: {
|
|
101
|
+
officialName: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
} | {
|
|
105
|
+
output: {
|
|
106
|
+
error: string;
|
|
107
|
+
code: string;
|
|
108
|
+
};
|
|
109
|
+
outputFormat: "json";
|
|
110
|
+
status: 500;
|
|
111
|
+
input: {
|
|
112
|
+
json: {
|
|
113
|
+
officialName: string;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
} | {
|
|
117
|
+
output: {
|
|
118
|
+
officialName: string;
|
|
119
|
+
};
|
|
120
|
+
outputFormat: "json";
|
|
121
|
+
status: 200;
|
|
122
|
+
input: {
|
|
123
|
+
json: {
|
|
124
|
+
officialName: string;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
};
|
|
76
129
|
} & {
|
|
77
130
|
"/v1/settings/model-selection": {
|
|
78
131
|
$get: {
|
|
79
132
|
output: {
|
|
80
133
|
error: string;
|
|
134
|
+
code: string;
|
|
81
135
|
};
|
|
82
136
|
outputFormat: "json";
|
|
83
137
|
status: 500;
|
|
@@ -130,6 +184,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
130
184
|
$patch: {
|
|
131
185
|
output: {
|
|
132
186
|
error: string;
|
|
187
|
+
code: string;
|
|
133
188
|
};
|
|
134
189
|
outputFormat: "json";
|
|
135
190
|
status: 400;
|
|
@@ -150,6 +205,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
150
205
|
} | {
|
|
151
206
|
output: {
|
|
152
207
|
error: string;
|
|
208
|
+
code: string;
|
|
153
209
|
};
|
|
154
210
|
outputFormat: "json";
|
|
155
211
|
status: 500;
|
|
@@ -232,6 +288,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
232
288
|
$get: {
|
|
233
289
|
output: {
|
|
234
290
|
error: string;
|
|
291
|
+
code: string;
|
|
235
292
|
};
|
|
236
293
|
outputFormat: "json";
|
|
237
294
|
status: 500;
|
|
@@ -250,6 +307,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
250
307
|
$patch: {
|
|
251
308
|
output: {
|
|
252
309
|
error: string;
|
|
310
|
+
code: string;
|
|
253
311
|
};
|
|
254
312
|
outputFormat: "json";
|
|
255
313
|
status: 400;
|
|
@@ -261,6 +319,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
261
319
|
} | {
|
|
262
320
|
output: {
|
|
263
321
|
error: string;
|
|
322
|
+
code: string;
|
|
264
323
|
};
|
|
265
324
|
outputFormat: "json";
|
|
266
325
|
status: 500;
|
|
@@ -287,6 +346,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
287
346
|
$get: {
|
|
288
347
|
output: {
|
|
289
348
|
error: string;
|
|
349
|
+
code: string;
|
|
290
350
|
};
|
|
291
351
|
outputFormat: "json";
|
|
292
352
|
status: 500;
|
|
@@ -311,41 +371,108 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
311
371
|
} & {
|
|
312
372
|
"/v1/mcp-servers": {
|
|
313
373
|
$get: {
|
|
374
|
+
output: {
|
|
375
|
+
error: string;
|
|
376
|
+
code: string;
|
|
377
|
+
};
|
|
378
|
+
outputFormat: "json";
|
|
379
|
+
status: 500;
|
|
380
|
+
input: {};
|
|
381
|
+
} | {
|
|
314
382
|
output: {
|
|
315
383
|
servers: {
|
|
316
384
|
name: string;
|
|
317
385
|
status: "authorization_required" | "authorizing" | "connected" | "connecting" | "disconnected" | "error";
|
|
318
386
|
toolCount: number;
|
|
319
387
|
supportsPushNotifications: boolean;
|
|
388
|
+
supportsRealtimeMedia: boolean;
|
|
320
389
|
transport: "http" | "stdio";
|
|
390
|
+
usesInteractiveOAuth: boolean;
|
|
391
|
+
authorization: {
|
|
392
|
+
id: string;
|
|
393
|
+
createdAt: string;
|
|
394
|
+
expiresAt: string;
|
|
395
|
+
} | null;
|
|
396
|
+
lastError: {
|
|
397
|
+
name: string;
|
|
398
|
+
message: string;
|
|
399
|
+
at: string;
|
|
400
|
+
} | null;
|
|
401
|
+
nextRetryAt: string | null;
|
|
321
402
|
}[];
|
|
322
403
|
};
|
|
323
404
|
outputFormat: "json";
|
|
324
405
|
status: 200;
|
|
325
406
|
input: {};
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
} & {
|
|
410
|
+
"/v1/mcp-servers/:name": {
|
|
411
|
+
$get: {
|
|
412
|
+
output: {
|
|
413
|
+
error: string;
|
|
414
|
+
code: string;
|
|
415
|
+
};
|
|
416
|
+
outputFormat: "json";
|
|
417
|
+
status: 404;
|
|
418
|
+
input: {
|
|
419
|
+
param: {
|
|
420
|
+
name: string;
|
|
421
|
+
};
|
|
422
|
+
};
|
|
326
423
|
} | {
|
|
327
424
|
output: {
|
|
328
425
|
error: string;
|
|
426
|
+
code: string;
|
|
329
427
|
};
|
|
330
428
|
outputFormat: "json";
|
|
331
429
|
status: 500;
|
|
332
|
-
input: {
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
|
|
430
|
+
input: {
|
|
431
|
+
param: {
|
|
432
|
+
name: string;
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
} | {
|
|
338
436
|
output: {
|
|
339
|
-
|
|
437
|
+
server: {
|
|
340
438
|
name: string;
|
|
341
439
|
status: "authorization_required" | "authorizing" | "connected" | "connecting" | "disconnected" | "error";
|
|
342
440
|
toolCount: number;
|
|
343
441
|
supportsPushNotifications: boolean;
|
|
442
|
+
supportsRealtimeMedia: boolean;
|
|
344
443
|
transport: "http" | "stdio";
|
|
345
|
-
|
|
444
|
+
usesInteractiveOAuth: boolean;
|
|
445
|
+
authorization: {
|
|
446
|
+
id: string;
|
|
447
|
+
createdAt: string;
|
|
448
|
+
expiresAt: string;
|
|
449
|
+
} | null;
|
|
450
|
+
lastError: {
|
|
451
|
+
name: string;
|
|
452
|
+
message: string;
|
|
453
|
+
at: string;
|
|
454
|
+
} | null;
|
|
455
|
+
nextRetryAt: string | null;
|
|
456
|
+
};
|
|
346
457
|
};
|
|
347
458
|
outputFormat: "json";
|
|
348
|
-
status:
|
|
459
|
+
status: 200;
|
|
460
|
+
input: {
|
|
461
|
+
param: {
|
|
462
|
+
name: string;
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
};
|
|
466
|
+
};
|
|
467
|
+
} & {
|
|
468
|
+
"/v1/mcp-servers": {
|
|
469
|
+
$post: {
|
|
470
|
+
output: {
|
|
471
|
+
error: string;
|
|
472
|
+
code: string;
|
|
473
|
+
};
|
|
474
|
+
outputFormat: "json";
|
|
475
|
+
status: 400;
|
|
349
476
|
input: {
|
|
350
477
|
json: {
|
|
351
478
|
name: string;
|
|
@@ -369,9 +496,10 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
369
496
|
} | {
|
|
370
497
|
output: {
|
|
371
498
|
error: string;
|
|
499
|
+
code: string;
|
|
372
500
|
};
|
|
373
501
|
outputFormat: "json";
|
|
374
|
-
status:
|
|
502
|
+
status: 409;
|
|
375
503
|
input: {
|
|
376
504
|
json: {
|
|
377
505
|
name: string;
|
|
@@ -395,9 +523,10 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
395
523
|
} | {
|
|
396
524
|
output: {
|
|
397
525
|
error: string;
|
|
526
|
+
code: string;
|
|
398
527
|
};
|
|
399
528
|
outputFormat: "json";
|
|
400
|
-
status:
|
|
529
|
+
status: 500;
|
|
401
530
|
input: {
|
|
402
531
|
json: {
|
|
403
532
|
name: string;
|
|
@@ -420,10 +549,29 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
420
549
|
};
|
|
421
550
|
} | {
|
|
422
551
|
output: {
|
|
423
|
-
|
|
552
|
+
servers: {
|
|
553
|
+
name: string;
|
|
554
|
+
status: "authorization_required" | "authorizing" | "connected" | "connecting" | "disconnected" | "error";
|
|
555
|
+
toolCount: number;
|
|
556
|
+
supportsPushNotifications: boolean;
|
|
557
|
+
supportsRealtimeMedia: boolean;
|
|
558
|
+
transport: "http" | "stdio";
|
|
559
|
+
usesInteractiveOAuth: boolean;
|
|
560
|
+
authorization: {
|
|
561
|
+
id: string;
|
|
562
|
+
createdAt: string;
|
|
563
|
+
expiresAt: string;
|
|
564
|
+
} | null;
|
|
565
|
+
lastError: {
|
|
566
|
+
name: string;
|
|
567
|
+
message: string;
|
|
568
|
+
at: string;
|
|
569
|
+
} | null;
|
|
570
|
+
nextRetryAt: string | null;
|
|
571
|
+
}[];
|
|
424
572
|
};
|
|
425
573
|
outputFormat: "json";
|
|
426
|
-
status:
|
|
574
|
+
status: 201;
|
|
427
575
|
input: {
|
|
428
576
|
json: {
|
|
429
577
|
name: string;
|
|
@@ -450,16 +598,11 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
450
598
|
"/v1/mcp-servers/:name": {
|
|
451
599
|
$patch: {
|
|
452
600
|
output: {
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
status: "authorization_required" | "authorizing" | "connected" | "connecting" | "disconnected" | "error";
|
|
456
|
-
toolCount: number;
|
|
457
|
-
supportsPushNotifications: boolean;
|
|
458
|
-
transport: "http" | "stdio";
|
|
459
|
-
}[];
|
|
601
|
+
error: string;
|
|
602
|
+
code: string;
|
|
460
603
|
};
|
|
461
604
|
outputFormat: "json";
|
|
462
|
-
status:
|
|
605
|
+
status: 400;
|
|
463
606
|
input: {
|
|
464
607
|
param: {
|
|
465
608
|
name: string;
|
|
@@ -485,9 +628,10 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
485
628
|
} | {
|
|
486
629
|
output: {
|
|
487
630
|
error: string;
|
|
631
|
+
code: string;
|
|
488
632
|
};
|
|
489
633
|
outputFormat: "json";
|
|
490
|
-
status:
|
|
634
|
+
status: 404;
|
|
491
635
|
input: {
|
|
492
636
|
param: {
|
|
493
637
|
name: string;
|
|
@@ -513,9 +657,10 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
513
657
|
} | {
|
|
514
658
|
output: {
|
|
515
659
|
error: string;
|
|
660
|
+
code: string;
|
|
516
661
|
};
|
|
517
662
|
outputFormat: "json";
|
|
518
|
-
status:
|
|
663
|
+
status: 500;
|
|
519
664
|
input: {
|
|
520
665
|
param: {
|
|
521
666
|
name: string;
|
|
@@ -540,10 +685,29 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
540
685
|
};
|
|
541
686
|
} | {
|
|
542
687
|
output: {
|
|
543
|
-
|
|
688
|
+
servers: {
|
|
689
|
+
name: string;
|
|
690
|
+
status: "authorization_required" | "authorizing" | "connected" | "connecting" | "disconnected" | "error";
|
|
691
|
+
toolCount: number;
|
|
692
|
+
supportsPushNotifications: boolean;
|
|
693
|
+
supportsRealtimeMedia: boolean;
|
|
694
|
+
transport: "http" | "stdio";
|
|
695
|
+
usesInteractiveOAuth: boolean;
|
|
696
|
+
authorization: {
|
|
697
|
+
id: string;
|
|
698
|
+
createdAt: string;
|
|
699
|
+
expiresAt: string;
|
|
700
|
+
} | null;
|
|
701
|
+
lastError: {
|
|
702
|
+
name: string;
|
|
703
|
+
message: string;
|
|
704
|
+
at: string;
|
|
705
|
+
} | null;
|
|
706
|
+
nextRetryAt: string | null;
|
|
707
|
+
}[];
|
|
544
708
|
};
|
|
545
709
|
outputFormat: "json";
|
|
546
|
-
status:
|
|
710
|
+
status: 200;
|
|
547
711
|
input: {
|
|
548
712
|
param: {
|
|
549
713
|
name: string;
|
|
@@ -572,16 +736,11 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
572
736
|
"/v1/mcp-servers/:name": {
|
|
573
737
|
$delete: {
|
|
574
738
|
output: {
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
status: "authorization_required" | "authorizing" | "connected" | "connecting" | "disconnected" | "error";
|
|
578
|
-
toolCount: number;
|
|
579
|
-
supportsPushNotifications: boolean;
|
|
580
|
-
transport: "http" | "stdio";
|
|
581
|
-
}[];
|
|
739
|
+
error: string;
|
|
740
|
+
code: string;
|
|
582
741
|
};
|
|
583
742
|
outputFormat: "json";
|
|
584
|
-
status:
|
|
743
|
+
status: 404;
|
|
585
744
|
input: {
|
|
586
745
|
param: {
|
|
587
746
|
name: string;
|
|
@@ -590,9 +749,10 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
590
749
|
} | {
|
|
591
750
|
output: {
|
|
592
751
|
error: string;
|
|
752
|
+
code: string;
|
|
593
753
|
};
|
|
594
754
|
outputFormat: "json";
|
|
595
|
-
status:
|
|
755
|
+
status: 500;
|
|
596
756
|
input: {
|
|
597
757
|
param: {
|
|
598
758
|
name: string;
|
|
@@ -600,10 +760,29 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
600
760
|
};
|
|
601
761
|
} | {
|
|
602
762
|
output: {
|
|
603
|
-
|
|
763
|
+
servers: {
|
|
764
|
+
name: string;
|
|
765
|
+
status: "authorization_required" | "authorizing" | "connected" | "connecting" | "disconnected" | "error";
|
|
766
|
+
toolCount: number;
|
|
767
|
+
supportsPushNotifications: boolean;
|
|
768
|
+
supportsRealtimeMedia: boolean;
|
|
769
|
+
transport: "http" | "stdio";
|
|
770
|
+
usesInteractiveOAuth: boolean;
|
|
771
|
+
authorization: {
|
|
772
|
+
id: string;
|
|
773
|
+
createdAt: string;
|
|
774
|
+
expiresAt: string;
|
|
775
|
+
} | null;
|
|
776
|
+
lastError: {
|
|
777
|
+
name: string;
|
|
778
|
+
message: string;
|
|
779
|
+
at: string;
|
|
780
|
+
} | null;
|
|
781
|
+
nextRetryAt: string | null;
|
|
782
|
+
}[];
|
|
604
783
|
};
|
|
605
784
|
outputFormat: "json";
|
|
606
|
-
status:
|
|
785
|
+
status: 200;
|
|
607
786
|
input: {
|
|
608
787
|
param: {
|
|
609
788
|
name: string;
|
|
@@ -616,6 +795,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
616
795
|
$get: {
|
|
617
796
|
output: {
|
|
618
797
|
error: string;
|
|
798
|
+
code: string;
|
|
619
799
|
};
|
|
620
800
|
outputFormat: "json";
|
|
621
801
|
status: 500;
|
|
@@ -649,11 +829,153 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
649
829
|
};
|
|
650
830
|
};
|
|
651
831
|
};
|
|
832
|
+
} & {
|
|
833
|
+
"/v1/mcp-servers/:name/authorization": {
|
|
834
|
+
$put: {
|
|
835
|
+
output: {
|
|
836
|
+
error: string;
|
|
837
|
+
code: string;
|
|
838
|
+
};
|
|
839
|
+
outputFormat: "json";
|
|
840
|
+
status: 404;
|
|
841
|
+
input: {
|
|
842
|
+
param: {
|
|
843
|
+
name: string;
|
|
844
|
+
};
|
|
845
|
+
};
|
|
846
|
+
} | {
|
|
847
|
+
output: {
|
|
848
|
+
error: string;
|
|
849
|
+
code: string;
|
|
850
|
+
};
|
|
851
|
+
outputFormat: "json";
|
|
852
|
+
status: 409;
|
|
853
|
+
input: {
|
|
854
|
+
param: {
|
|
855
|
+
name: string;
|
|
856
|
+
};
|
|
857
|
+
};
|
|
858
|
+
} | {
|
|
859
|
+
output: {
|
|
860
|
+
error: string;
|
|
861
|
+
code: string;
|
|
862
|
+
};
|
|
863
|
+
outputFormat: "json";
|
|
864
|
+
status: 503;
|
|
865
|
+
input: {
|
|
866
|
+
param: {
|
|
867
|
+
name: string;
|
|
868
|
+
};
|
|
869
|
+
};
|
|
870
|
+
} | {
|
|
871
|
+
output: {
|
|
872
|
+
error: string;
|
|
873
|
+
code: string;
|
|
874
|
+
};
|
|
875
|
+
outputFormat: "json";
|
|
876
|
+
status: 504;
|
|
877
|
+
input: {
|
|
878
|
+
param: {
|
|
879
|
+
name: string;
|
|
880
|
+
};
|
|
881
|
+
};
|
|
882
|
+
} | {
|
|
883
|
+
output: {
|
|
884
|
+
id: string;
|
|
885
|
+
serverName: string;
|
|
886
|
+
serverUrl: string;
|
|
887
|
+
authorizationUrl: string;
|
|
888
|
+
state: string;
|
|
889
|
+
expiresAt: string;
|
|
890
|
+
};
|
|
891
|
+
outputFormat: "json";
|
|
892
|
+
status: 200;
|
|
893
|
+
input: {
|
|
894
|
+
param: {
|
|
895
|
+
name: string;
|
|
896
|
+
};
|
|
897
|
+
};
|
|
898
|
+
};
|
|
899
|
+
};
|
|
900
|
+
} & {
|
|
901
|
+
"/v1/mcp-servers/:name/authorization": {
|
|
902
|
+
$delete: {
|
|
903
|
+
output: {
|
|
904
|
+
error: string;
|
|
905
|
+
code: string;
|
|
906
|
+
};
|
|
907
|
+
outputFormat: "json";
|
|
908
|
+
status: 404;
|
|
909
|
+
input: {
|
|
910
|
+
param: {
|
|
911
|
+
name: string;
|
|
912
|
+
};
|
|
913
|
+
};
|
|
914
|
+
} | {
|
|
915
|
+
output: {};
|
|
916
|
+
outputFormat: string;
|
|
917
|
+
status: 204;
|
|
918
|
+
input: {
|
|
919
|
+
param: {
|
|
920
|
+
name: string;
|
|
921
|
+
};
|
|
922
|
+
};
|
|
923
|
+
};
|
|
924
|
+
};
|
|
925
|
+
} & {
|
|
926
|
+
"/v1/mcp-oauth/callback": {
|
|
927
|
+
$post: {
|
|
928
|
+
output: {
|
|
929
|
+
error: string;
|
|
930
|
+
code: string;
|
|
931
|
+
};
|
|
932
|
+
outputFormat: "json";
|
|
933
|
+
status: 400;
|
|
934
|
+
input: {
|
|
935
|
+
json: {
|
|
936
|
+
state: string;
|
|
937
|
+
code?: string | undefined;
|
|
938
|
+
error?: string | undefined;
|
|
939
|
+
error_description?: string | undefined;
|
|
940
|
+
};
|
|
941
|
+
};
|
|
942
|
+
} | {
|
|
943
|
+
output: {
|
|
944
|
+
error: string;
|
|
945
|
+
code: string;
|
|
946
|
+
};
|
|
947
|
+
outputFormat: "json";
|
|
948
|
+
status: 404;
|
|
949
|
+
input: {
|
|
950
|
+
json: {
|
|
951
|
+
state: string;
|
|
952
|
+
code?: string | undefined;
|
|
953
|
+
error?: string | undefined;
|
|
954
|
+
error_description?: string | undefined;
|
|
955
|
+
};
|
|
956
|
+
};
|
|
957
|
+
} | {
|
|
958
|
+
output: {
|
|
959
|
+
accepted: true;
|
|
960
|
+
};
|
|
961
|
+
outputFormat: "json";
|
|
962
|
+
status: 202;
|
|
963
|
+
input: {
|
|
964
|
+
json: {
|
|
965
|
+
state: string;
|
|
966
|
+
code?: string | undefined;
|
|
967
|
+
error?: string | undefined;
|
|
968
|
+
error_description?: string | undefined;
|
|
969
|
+
};
|
|
970
|
+
};
|
|
971
|
+
};
|
|
972
|
+
};
|
|
652
973
|
} & {
|
|
653
974
|
"/v1/usage": {
|
|
654
975
|
$get: {
|
|
655
976
|
output: {
|
|
656
977
|
error: string;
|
|
978
|
+
code: string;
|
|
657
979
|
};
|
|
658
980
|
outputFormat: "json";
|
|
659
981
|
status: 400;
|
|
@@ -669,6 +991,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
669
991
|
} | {
|
|
670
992
|
output: {
|
|
671
993
|
error: string;
|
|
994
|
+
code: string;
|
|
672
995
|
};
|
|
673
996
|
outputFormat: "json";
|
|
674
997
|
status: 500;
|
|
@@ -725,6 +1048,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
725
1048
|
$get: {
|
|
726
1049
|
output: {
|
|
727
1050
|
error: string;
|
|
1051
|
+
code: string;
|
|
728
1052
|
};
|
|
729
1053
|
outputFormat: "json";
|
|
730
1054
|
status: 500;
|
|
@@ -766,6 +1090,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
766
1090
|
$post: {
|
|
767
1091
|
output: {
|
|
768
1092
|
error: string;
|
|
1093
|
+
code: string;
|
|
769
1094
|
};
|
|
770
1095
|
outputFormat: "json";
|
|
771
1096
|
status: 400;
|
|
@@ -792,6 +1117,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
792
1117
|
} | {
|
|
793
1118
|
output: {
|
|
794
1119
|
error: string;
|
|
1120
|
+
code: string;
|
|
795
1121
|
};
|
|
796
1122
|
outputFormat: "json";
|
|
797
1123
|
status: 409;
|
|
@@ -818,6 +1144,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
818
1144
|
} | {
|
|
819
1145
|
output: {
|
|
820
1146
|
error: string;
|
|
1147
|
+
code: string;
|
|
821
1148
|
};
|
|
822
1149
|
outputFormat: "json";
|
|
823
1150
|
status: 500;
|
|
@@ -897,6 +1224,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
897
1224
|
$patch: {
|
|
898
1225
|
output: {
|
|
899
1226
|
error: string;
|
|
1227
|
+
code: string;
|
|
900
1228
|
};
|
|
901
1229
|
outputFormat: "json";
|
|
902
1230
|
status: 400;
|
|
@@ -924,6 +1252,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
924
1252
|
} | {
|
|
925
1253
|
output: {
|
|
926
1254
|
error: string;
|
|
1255
|
+
code: string;
|
|
927
1256
|
};
|
|
928
1257
|
outputFormat: "json";
|
|
929
1258
|
status: 404;
|
|
@@ -951,6 +1280,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
951
1280
|
} | {
|
|
952
1281
|
output: {
|
|
953
1282
|
error: string;
|
|
1283
|
+
code: string;
|
|
954
1284
|
};
|
|
955
1285
|
outputFormat: "json";
|
|
956
1286
|
status: 500;
|
|
@@ -1032,6 +1362,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1032
1362
|
$delete: {
|
|
1033
1363
|
output: {
|
|
1034
1364
|
error: string;
|
|
1365
|
+
code: string;
|
|
1035
1366
|
};
|
|
1036
1367
|
outputFormat: "json";
|
|
1037
1368
|
status: 400;
|
|
@@ -1043,6 +1374,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1043
1374
|
} | {
|
|
1044
1375
|
output: {
|
|
1045
1376
|
error: string;
|
|
1377
|
+
code: string;
|
|
1046
1378
|
};
|
|
1047
1379
|
outputFormat: "json";
|
|
1048
1380
|
status: 404;
|
|
@@ -1054,6 +1386,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1054
1386
|
} | {
|
|
1055
1387
|
output: {
|
|
1056
1388
|
error: string;
|
|
1389
|
+
code: string;
|
|
1057
1390
|
};
|
|
1058
1391
|
outputFormat: "json";
|
|
1059
1392
|
status: 409;
|
|
@@ -1065,6 +1398,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1065
1398
|
} | {
|
|
1066
1399
|
output: {
|
|
1067
1400
|
error: string;
|
|
1401
|
+
code: string;
|
|
1068
1402
|
};
|
|
1069
1403
|
outputFormat: "json";
|
|
1070
1404
|
status: 500;
|
|
@@ -1114,6 +1448,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1114
1448
|
$get: {
|
|
1115
1449
|
output: {
|
|
1116
1450
|
error: string;
|
|
1451
|
+
code: string;
|
|
1117
1452
|
};
|
|
1118
1453
|
outputFormat: "json";
|
|
1119
1454
|
status: 400;
|
|
@@ -1125,6 +1460,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1125
1460
|
} | {
|
|
1126
1461
|
output: {
|
|
1127
1462
|
error: string;
|
|
1463
|
+
code: string;
|
|
1128
1464
|
};
|
|
1129
1465
|
outputFormat: "json";
|
|
1130
1466
|
status: 404;
|
|
@@ -1136,6 +1472,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1136
1472
|
} | {
|
|
1137
1473
|
output: {
|
|
1138
1474
|
error: string;
|
|
1475
|
+
code: string;
|
|
1139
1476
|
};
|
|
1140
1477
|
outputFormat: "json";
|
|
1141
1478
|
status: 500;
|
|
@@ -1172,6 +1509,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1172
1509
|
$post: {
|
|
1173
1510
|
output: {
|
|
1174
1511
|
error: string;
|
|
1512
|
+
code: string;
|
|
1175
1513
|
};
|
|
1176
1514
|
outputFormat: "json";
|
|
1177
1515
|
status: 400;
|
|
@@ -1193,6 +1531,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1193
1531
|
} | {
|
|
1194
1532
|
output: {
|
|
1195
1533
|
error: string;
|
|
1534
|
+
code: string;
|
|
1196
1535
|
};
|
|
1197
1536
|
outputFormat: "json";
|
|
1198
1537
|
status: 404;
|
|
@@ -1214,6 +1553,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1214
1553
|
} | {
|
|
1215
1554
|
output: {
|
|
1216
1555
|
error: string;
|
|
1556
|
+
code: string;
|
|
1217
1557
|
};
|
|
1218
1558
|
outputFormat: "json";
|
|
1219
1559
|
status: 409;
|
|
@@ -1235,6 +1575,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1235
1575
|
} | {
|
|
1236
1576
|
output: {
|
|
1237
1577
|
error: string;
|
|
1578
|
+
code: string;
|
|
1238
1579
|
};
|
|
1239
1580
|
outputFormat: "json";
|
|
1240
1581
|
status: 500;
|
|
@@ -1291,6 +1632,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1291
1632
|
$patch: {
|
|
1292
1633
|
output: {
|
|
1293
1634
|
error: string;
|
|
1635
|
+
code: string;
|
|
1294
1636
|
};
|
|
1295
1637
|
outputFormat: "json";
|
|
1296
1638
|
status: 400;
|
|
@@ -1312,6 +1654,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1312
1654
|
} | {
|
|
1313
1655
|
output: {
|
|
1314
1656
|
error: string;
|
|
1657
|
+
code: string;
|
|
1315
1658
|
};
|
|
1316
1659
|
outputFormat: "json";
|
|
1317
1660
|
status: 404;
|
|
@@ -1333,6 +1676,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1333
1676
|
} | {
|
|
1334
1677
|
output: {
|
|
1335
1678
|
error: string;
|
|
1679
|
+
code: string;
|
|
1336
1680
|
};
|
|
1337
1681
|
outputFormat: "json";
|
|
1338
1682
|
status: 500;
|
|
@@ -1389,6 +1733,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1389
1733
|
$delete: {
|
|
1390
1734
|
output: {
|
|
1391
1735
|
error: string;
|
|
1736
|
+
code: string;
|
|
1392
1737
|
};
|
|
1393
1738
|
outputFormat: "json";
|
|
1394
1739
|
status: 400;
|
|
@@ -1401,6 +1746,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1401
1746
|
} | {
|
|
1402
1747
|
output: {
|
|
1403
1748
|
error: string;
|
|
1749
|
+
code: string;
|
|
1404
1750
|
};
|
|
1405
1751
|
outputFormat: "json";
|
|
1406
1752
|
status: 404;
|
|
@@ -1413,6 +1759,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1413
1759
|
} | {
|
|
1414
1760
|
output: {
|
|
1415
1761
|
error: string;
|
|
1762
|
+
code: string;
|
|
1416
1763
|
};
|
|
1417
1764
|
outputFormat: "json";
|
|
1418
1765
|
status: 409;
|
|
@@ -1425,6 +1772,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1425
1772
|
} | {
|
|
1426
1773
|
output: {
|
|
1427
1774
|
error: string;
|
|
1775
|
+
code: string;
|
|
1428
1776
|
};
|
|
1429
1777
|
outputFormat: "json";
|
|
1430
1778
|
status: 500;
|
|
@@ -1463,6 +1811,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1463
1811
|
$get: {
|
|
1464
1812
|
output: {
|
|
1465
1813
|
error: string;
|
|
1814
|
+
code: string;
|
|
1466
1815
|
};
|
|
1467
1816
|
outputFormat: "json";
|
|
1468
1817
|
status: 400;
|
|
@@ -1478,6 +1827,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1478
1827
|
} | {
|
|
1479
1828
|
output: {
|
|
1480
1829
|
error: string;
|
|
1830
|
+
code: string;
|
|
1481
1831
|
};
|
|
1482
1832
|
outputFormat: "json";
|
|
1483
1833
|
status: 404;
|
|
@@ -1493,6 +1843,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1493
1843
|
} | {
|
|
1494
1844
|
output: {
|
|
1495
1845
|
error: string;
|
|
1846
|
+
code: string;
|
|
1496
1847
|
};
|
|
1497
1848
|
outputFormat: "json";
|
|
1498
1849
|
status: 500;
|
|
@@ -1549,6 +1900,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1549
1900
|
$post: {
|
|
1550
1901
|
output: {
|
|
1551
1902
|
error: string;
|
|
1903
|
+
code: string;
|
|
1552
1904
|
};
|
|
1553
1905
|
outputFormat: "json";
|
|
1554
1906
|
status: 400;
|
|
@@ -1584,6 +1936,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1584
1936
|
} | {
|
|
1585
1937
|
output: {
|
|
1586
1938
|
error: string;
|
|
1939
|
+
code: string;
|
|
1587
1940
|
};
|
|
1588
1941
|
outputFormat: "json";
|
|
1589
1942
|
status: 404;
|
|
@@ -1619,6 +1972,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1619
1972
|
} | {
|
|
1620
1973
|
output: {
|
|
1621
1974
|
error: string;
|
|
1975
|
+
code: string;
|
|
1622
1976
|
};
|
|
1623
1977
|
outputFormat: "json";
|
|
1624
1978
|
status: 409;
|
|
@@ -1654,6 +2008,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1654
2008
|
} | {
|
|
1655
2009
|
output: {
|
|
1656
2010
|
error: string;
|
|
2011
|
+
code: string;
|
|
1657
2012
|
};
|
|
1658
2013
|
outputFormat: "json";
|
|
1659
2014
|
status: 500;
|
|
@@ -1750,6 +2105,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1750
2105
|
$patch: {
|
|
1751
2106
|
output: {
|
|
1752
2107
|
error: string;
|
|
2108
|
+
code: string;
|
|
1753
2109
|
};
|
|
1754
2110
|
outputFormat: "json";
|
|
1755
2111
|
status: 400;
|
|
@@ -1788,6 +2144,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1788
2144
|
} | {
|
|
1789
2145
|
output: {
|
|
1790
2146
|
error: string;
|
|
2147
|
+
code: string;
|
|
1791
2148
|
};
|
|
1792
2149
|
outputFormat: "json";
|
|
1793
2150
|
status: 404;
|
|
@@ -1826,6 +2183,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1826
2183
|
} | {
|
|
1827
2184
|
output: {
|
|
1828
2185
|
error: string;
|
|
2186
|
+
code: string;
|
|
1829
2187
|
};
|
|
1830
2188
|
outputFormat: "json";
|
|
1831
2189
|
status: 500;
|
|
@@ -1928,6 +2286,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1928
2286
|
$delete: {
|
|
1929
2287
|
output: {
|
|
1930
2288
|
error: string;
|
|
2289
|
+
code: string;
|
|
1931
2290
|
};
|
|
1932
2291
|
outputFormat: "json";
|
|
1933
2292
|
status: 400;
|
|
@@ -1944,6 +2303,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1944
2303
|
} | {
|
|
1945
2304
|
output: {
|
|
1946
2305
|
error: string;
|
|
2306
|
+
code: string;
|
|
1947
2307
|
};
|
|
1948
2308
|
outputFormat: "json";
|
|
1949
2309
|
status: 404;
|
|
@@ -1960,6 +2320,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
1960
2320
|
} | {
|
|
1961
2321
|
output: {
|
|
1962
2322
|
error: string;
|
|
2323
|
+
code: string;
|
|
1963
2324
|
};
|
|
1964
2325
|
outputFormat: "json";
|
|
1965
2326
|
status: 500;
|
|
@@ -2018,6 +2379,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
2018
2379
|
$get: {
|
|
2019
2380
|
output: {
|
|
2020
2381
|
error: string;
|
|
2382
|
+
code: string;
|
|
2021
2383
|
};
|
|
2022
2384
|
outputFormat: "json";
|
|
2023
2385
|
status: 400;
|
|
@@ -2029,6 +2391,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
2029
2391
|
} | {
|
|
2030
2392
|
output: {
|
|
2031
2393
|
error: string;
|
|
2394
|
+
code: string;
|
|
2032
2395
|
};
|
|
2033
2396
|
outputFormat: "json";
|
|
2034
2397
|
status: 404;
|
|
@@ -2040,6 +2403,7 @@ export type AdminApi = import("hono/hono-base").HonoBase<any, {
|
|
|
2040
2403
|
} | {
|
|
2041
2404
|
output: {
|
|
2042
2405
|
error: string;
|
|
2406
|
+
code: string;
|
|
2043
2407
|
};
|
|
2044
2408
|
outputFormat: "json";
|
|
2045
2409
|
status: 500;
|
package/package.json
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@klex/agent-admin-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
|
-
"description": "Shared types for the Klex
|
|
6
|
+
"description": "Shared types for the Klex Bot Admin API",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/stagewise-io/klex.git",
|
|
11
|
+
"directory": "packages/agent-admin-api"
|
|
12
|
+
},
|
|
8
13
|
"exports": {
|
|
9
14
|
".": {
|
|
10
15
|
"types": "./dist/index.d.ts"
|