@klex/agent-admin-api 0.2.0 → 0.4.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 +30 -0
- package/dist/index.d.ts +1101 -687
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,6 +13,27 @@ const client = hc<AdminApi>('https://agent.example');
|
|
|
13
13
|
const health = await client.v1.health.$get();
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
+
## Model providers
|
|
17
|
+
|
|
18
|
+
The provider contract is registry-driven. Clients do not need provider-specific
|
|
19
|
+
routes or hard-coded forms:
|
|
20
|
+
|
|
21
|
+
- `GET /v1/provider-types` returns each provider type's display metadata,
|
|
22
|
+
capabilities, and declarative setup fields.
|
|
23
|
+
- `POST /v1/provider-types/{type}/can-add` checks candidate settings and local
|
|
24
|
+
prerequisites without changing configuration.
|
|
25
|
+
- `/v1/providers` exposes instance CRUD. Every instance includes its stable ID
|
|
26
|
+
and provider type; multiple instances may use the same type.
|
|
27
|
+
- `POST /v1/providers/{id}/test` returns the standardized connectivity result.
|
|
28
|
+
- `/v1/providers/{id}/models` exposes merged discovery and manual-model data and
|
|
29
|
+
manages `knownModels` overrides.
|
|
30
|
+
|
|
31
|
+
Failures contain a stable `code`, a human-readable `error`, and optional
|
|
32
|
+
`remediation`. Branch on the code rather than parsing messages. Provider settings
|
|
33
|
+
returned by the API are redacted and must never contain resolved environment
|
|
34
|
+
secrets. Model selection uses separate `providerId` and opaque `modelId` fields;
|
|
35
|
+
clients must not split model IDs on colons.
|
|
36
|
+
|
|
16
37
|
## MCP OAuth authorization
|
|
17
38
|
|
|
18
39
|
Version 0.2 adds the consolidated MCP authorization contract. Authorization is
|
|
@@ -36,4 +57,13 @@ Error responses include a machine-readable `code` alongside the human-readable
|
|
|
36
57
|
configured credentials, connected servers, unavailable Cloud authorization,
|
|
37
58
|
and authorization timeouts.
|
|
38
59
|
|
|
60
|
+
## God session management
|
|
61
|
+
|
|
62
|
+
The Admin API contract includes the dedicated God Messages session:
|
|
63
|
+
|
|
64
|
+
- `POST /v1/god-messages` submits a trusted multipart directive.
|
|
65
|
+
- `GET /v1/god-messages/session` returns the current session state.
|
|
66
|
+
- `GET /v1/god-messages/messages` returns cursor-paginated session history.
|
|
67
|
+
- `POST /v1/god-messages/reset` replaces a resettable session.
|
|
68
|
+
|
|
39
69
|
Install `hono` and `@hono/zod-openapi` as peer dependencies.
|