@klex/agent-admin-api 0.1.0 → 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 +2188 -1763
- package/package.json +16 -10
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.
|