@nylorun/admin 0.12.0-beta → 0.13.0-beta
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/CHANGELOG.md +36 -0
- package/README.md +29 -3
- package/dist/index.d.ts +2 -2
- package/dist/management.d.ts +13 -3
- package/dist/management.js +5 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.13.0-beta
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 50e2f7e: **Protocol 10: MCP credentials come from a session's vaults only.** Nylorun no longer signs the installation in to MCP servers with OAuth and no longer asks a credential resolver. Upgrade every package together; MIGRATION.md has the details.
|
|
8
|
+
|
|
9
|
+
- **Breaking (`@nylorun/runtime`): the MCP OAuth connect is gone.** `POST /v1/tenant/vaults/{vaultId}/oauth/start` and `GET /v1/oauth/callback` answer `404`. The vault credential type `oauth` and its refresh are gone: a credential is a `bearer` token or a `headers` map bound to a URL. Migration `0016_mcp_oauth_removed` drops the table of pending connects and deletes every `oauth` credential, writing one audit row each (actor `migration`); the Runtime logs `oauth_credential_removed` once for each, naming its vault, id and URL.
|
|
10
|
+
- **Breaking (`@nylorun/runtime`): the credential resolver is gone.** The gateway no longer asks the operator's resolver for a person's credential when the session's vaults hold none. A process that still sets a `NYLORUN_RESOLVER_*` variable logs `resolver_removed` and ignores it. Keep a person's own keys in their user vault and attach it to their sessions (`vaultIds`). `TenantConfig.resolver`, `TenantConfig.publicUrl`, `TenantConfig.vaultFetch`, `startEphemeralRuntime({ resolver })`, the `ResolverConfig` export and `VaultService`'s `fetch` option are removed; `NYLORUN_PUBLIC_URL` still sets the protected resource metadata's `resource`.
|
|
11
|
+
- **Breaking (`@nylorun/core`):** `PROTOCOL_VERSION` is 10 and `HOST_PROTOCOL` 4–10. `StartOAuthRequest`, `StartOAuthResponse`, the `oauth` variants of `CreateCredentialRequest` and `RotateCredentialRequest`, `oauth` in `CredentialInfo.type` and `CredentialInfo.expiresAt` are removed, and `ERROR_CODES` drops `oauth_client_required`, `oauth_state_invalid` and `oauth_failed`. `@nylorun/agents` and `@nylorun/cli` send protocol 10.
|
|
12
|
+
- **Breaking (`@nylorun/admin`):** `admin.vaults` loses its OAuth start method.
|
|
13
|
+
- **Breaking (`nylorun`):** the `connect` subcommand of `nylorun mcp` is removed (`nylorun mcp inspect` lists a server's tools instead), and the gateway's Compose service no longer passes the `NYLORUN_RESOLVER_*` variables.
|
|
14
|
+
- `@nylorun/studio`: the Credentials page loses the OAuth type, the Expires column and the OAuth connect hint.
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- da93711: **Preview an MCP server's tools** (R2b C12). MIGRATION.md (protocol 10, "Previewing a server's tools") has the details.
|
|
19
|
+
|
|
20
|
+
- `@nylorun/core`: `McpPreviewRequestSchema` and `McpPreviewSchema` (`McpPreviewTool`), and the error code `mcp_preview_failed`.
|
|
21
|
+
- `@nylorun/runtime`: `POST /v1/tenant/mcp/preview` (the Management API) connects to a remote MCP server with the installation vault's credential for its URL (headers and `via`, no identity header), under the Host's address policy and within 15 s, and answers its server info, instructions, tools (model names, annotations, schema sizes) and renames; a `401` is `authRequired`, with the server's RFC 9728 protected-resource metadata. It runs in the keys service (`Keys.previewMcp`), which holds the plaintext, and calls no tool. Both OpenAPI documents list it.
|
|
22
|
+
- `@nylorun/admin`: `admin.mcp.preview({ url, type?, name?, vaultId? })`.
|
|
23
|
+
- `nylorun`: `nylorun mcp inspect <url> [--server <name>] [--vault <id>] [--sse] [--json]` prints the running Tenant's preview: a table of tools, the renames, or that the server needs a person's sign-in. Its `connect` subcommand still says it was removed, and now points to `inspect`.
|
|
24
|
+
- `@nylorun/studio`: **Preview tools** on each credential of the Credentials page lists the tools behind its URL.
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- fed5e58: **Docs: reaching a person's accounts** (R2b C5). The READMEs describe MCP credentials as protocol 10 has them (a `bearer` token or a `headers` map per URL, with `via` and an identity header for an MCP gateway), and point to "MCP servers and HTTP tools" in DEPLOYMENT.md: the operator's flow from credential to preview, tool settings, deferral, stored results and the error codes a model sees, with gateway recipes for Arcade, ToolHive, Obot and Nylorun Cloud and the proxy pattern for gateways that mint per person. `HttpToolTarget.credential`'s doc (`@nylorun/core`) no longer names the removed credential resolver.
|
|
29
|
+
- Pin core to the tested release.
|
|
30
|
+
- Updated dependencies [50e2f7e]
|
|
31
|
+
- Updated dependencies [e0e39ff]
|
|
32
|
+
- Updated dependencies [fed5e58]
|
|
33
|
+
- Updated dependencies [18f9a2f]
|
|
34
|
+
- Updated dependencies [da93711]
|
|
35
|
+
- Updated dependencies [90a817d]
|
|
36
|
+
- Updated dependencies [b8d10cb]
|
|
37
|
+
- @nylorun/core@0.17.0-beta
|
|
38
|
+
|
|
3
39
|
## 0.12.0-beta
|
|
4
40
|
|
|
5
41
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @nylorun/admin
|
|
2
2
|
|
|
3
3
|
The Management API client (protocol 8): the Tenant's status, seed and reset, its
|
|
4
|
-
models, vaults, signing keys, settings and application keys, through
|
|
4
|
+
models, vaults, MCP server previews, signing keys, settings and application keys, through
|
|
5
5
|
`/v1/tenant/*` with a **management key**. It also holds the two helpers over the
|
|
6
6
|
admin key that Studio needs. Depends only on `@nylorun/core`.
|
|
7
7
|
Requires Node 24+. Vocabulary: [runtime/src/CONTEXT.md](../runtime/src/CONTEXT.md).
|
|
@@ -58,7 +58,8 @@ Management keys are issued on the Tenant's machine only:
|
|
|
58
58
|
| `admin.tenant` | `status()`, `seed(request)`, `reset(request)` | `GET /v1/tenant`, `PUT /v1/tenant/config/seed`, `POST /v1/tenant/reset` |
|
|
59
59
|
| `admin.keys` | `list()`, `put(id)`, `delete(id)` | `/v1/tenant/keys…` |
|
|
60
60
|
| `admin.models` | `catalog()`, `providers()`, `get()`, `put(request)`, `select(request)`, `usage(query)`, `budgets.get()`, `budgets.put(request)` | `/v1/tenant/models`, `/providers`, `/model`, `/model/selection`, `/usage`, `/budgets` |
|
|
61
|
-
| `admin.vaults` | `create`, `list(ownerUserId?)`, `get`, `delete`, `credentials.create`, `.list`, `.get`, `.rotate`, `.delete
|
|
61
|
+
| `admin.vaults` | `create`, `list(ownerUserId?)`, `get`, `delete`, `credentials.create`, `.list`, `.get`, `.rotate`, `.delete` | `/v1/tenant/vaults…` |
|
|
62
|
+
| `admin.mcp` | `preview({ url, type?, name?, vaultId? })` | `POST /v1/tenant/mcp/preview` |
|
|
62
63
|
| `admin.signingKeys` | `list()`, `rotate({ force? })`, `revoke(kid)` | `/v1/tenant/signing-keys…` |
|
|
63
64
|
| `admin.settings` | `sandbox.get()`, `sandbox.put(request)`, `artifacts.get()`, `artifacts.put(request)` | `/v1/tenant/sandbox`, `/v1/tenant/artifacts` |
|
|
64
65
|
|
|
@@ -89,12 +90,37 @@ await admin.vaults.credentials.create(vault.id, {
|
|
|
89
90
|
});
|
|
90
91
|
```
|
|
91
92
|
|
|
93
|
+
A credential is bound to the URL an agent names: a `bearer` token, or a
|
|
94
|
+
`headers` map (`{ type: "headers", url, headers: { "x-api-key": … } }`). Either
|
|
95
|
+
may add `via`, where the requests go instead (an MCP gateway), and
|
|
96
|
+
`identity: { header }`, which carries the session owner's subject. A person's
|
|
97
|
+
own keys go in their vault (`admin.vaults.create({ name, ownerUserId })`).
|
|
98
|
+
Listing and getting a credential return its header names, `via` and identity
|
|
99
|
+
header, never a value; `credentials.rotate` replaces the token or the map. See
|
|
100
|
+
"MCP servers and HTTP tools" in
|
|
101
|
+
[DEPLOYMENT.md](../DEPLOYMENT.md#mcp-servers-and-http-tools), with gateway
|
|
102
|
+
recipes.
|
|
103
|
+
|
|
104
|
+
`admin.mcp.preview` shows what that server offers with that credential, before
|
|
105
|
+
an agent names it: the Runtime connects, lists the tools within 15 s and calls
|
|
106
|
+
none. Each tool has the name the model would call it (made with `name`,
|
|
107
|
+
default from the URL's host), its annotations and its input schema's size. A
|
|
108
|
+
server that answers `401` comes back with `authRequired` and its RFC 9728
|
|
109
|
+
protected-resource metadata; one that cannot be listed rejects with
|
|
110
|
+
`mcp_preview_failed` (`details.failure`).
|
|
111
|
+
|
|
112
|
+
```ts
|
|
113
|
+
const preview = await admin.mcp.preview({ url: "https://mcp.linear.app/mcp", name: "linear", vaultId: vault.id });
|
|
114
|
+
for (const tool of preview.tools) console.log(tool.modelName, tool.schemaBytes);
|
|
115
|
+
if (preview.authRequired) console.log("needs a sign-in:", preview.authRequired.resourceMetadata);
|
|
116
|
+
```
|
|
117
|
+
|
|
92
118
|
## In a browser
|
|
93
119
|
|
|
94
120
|
`@nylorun/admin/client` exports `createManagementClient({ url, key?, fetch?,
|
|
95
121
|
headers? })` and `ManagementClient`, with the same groups and no Node module.
|
|
96
122
|
It is for a browser app behind its own server that adds the management key, as
|
|
97
|
-
Studio's
|
|
123
|
+
Studio's Credentials page is: omit `key`, and point `url` at that server. Never
|
|
98
124
|
send a management key from a browser: the Runtime refuses any key sent with an
|
|
99
125
|
`Origin` (`403 origin_rejected`).
|
|
100
126
|
|
package/dist/index.d.ts
CHANGED
|
@@ -8,10 +8,10 @@ export type { ErrorCode };
|
|
|
8
8
|
export { AdminError };
|
|
9
9
|
export { deriveStudioToken, tenantHostRoot };
|
|
10
10
|
export { mintStudioLoginToken } from "./studio-login.js";
|
|
11
|
-
export { ManagementClient, createManagementClient, type ManagementClientOptions, type ManagementKeys, type ManagementModels, type ManagementSettings, type ManagementSigningKeys, type ManagementTenant, type ManagementVaults, } from "./management.js";
|
|
11
|
+
export { ManagementClient, createManagementClient, type ManagementClientOptions, type ManagementKeys, type ManagementMcp, type ManagementModels, type ManagementSettings, type ManagementSigningKeys, type ManagementTenant, type ManagementVaults, } from "./management.js";
|
|
12
12
|
/**
|
|
13
13
|
* The Management API client for the installation (`/v1/tenant/*`): `tenant`, `keys`
|
|
14
|
-
* (application keys), `models`, `vaults`, `signingKeys` and `settings`, with a management key.
|
|
14
|
+
* (application keys), `models`, `vaults`, `mcp`, `signingKeys` and `settings`, with a management key.
|
|
15
15
|
* `source` says where the connection came from.
|
|
16
16
|
*/
|
|
17
17
|
export type Admin = AdminClient;
|
package/dist/management.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CreateCredentialRequest, type CreateVaultRequest, type CredentialInfo, type HostModelCatalog, type HostModelView, type ListProvidersResponse, type ModelCallExportPage, type ModelBudgets, type ModelUsageQuery, type ModelUsageTotals, type OperatorKey, type PutHostModelRequest, type PutModelBudgetsRequest, type PutOperatorKeyResponse, type PutTenantArtifactsRequest, type PutTenantSandboxRequest, type ResetTenantRequest, type ResetTenantResponse, type RotateCredentialRequest, type SeedTenantConfigRequest, type SeedTenantConfigResponse, type SelectHostModelRequest, type SigningKeyView, type
|
|
1
|
+
import { type CreateCredentialRequest, type CreateVaultRequest, type CredentialInfo, type HostModelCatalog, type HostModelView, type ListProvidersResponse, type McpPreview, type McpPreviewRequest, type ModelCallExportPage, type ModelBudgets, type ModelUsageQuery, type ModelUsageTotals, type OperatorKey, type PutHostModelRequest, type PutModelBudgetsRequest, type PutOperatorKeyResponse, type PutTenantArtifactsRequest, type PutTenantSandboxRequest, type ResetTenantRequest, type ResetTenantResponse, type RotateCredentialRequest, type SeedTenantConfigRequest, type SeedTenantConfigResponse, type SelectHostModelRequest, type SigningKeyView, type TenantArtifactsView, type TenantSandboxView, type TenantStatus, type VaultInfo } from "@nylorun/core/contracts";
|
|
2
2
|
export interface ManagementClientOptions {
|
|
3
3
|
/** The Tenant's URL, or a proxy in front of it. */
|
|
4
4
|
url: string;
|
|
@@ -76,8 +76,17 @@ export interface ManagementVaults {
|
|
|
76
76
|
id: string;
|
|
77
77
|
}>;
|
|
78
78
|
};
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
}
|
|
80
|
+
export interface ManagementMcp {
|
|
81
|
+
/**
|
|
82
|
+
* A remote MCP server's tools before an agent names it (R2b C12): the Runtime connects with
|
|
83
|
+
* the installation vault's credential for `url`, lists the tools and closes; it never calls
|
|
84
|
+
* one. Each tool has the name the model would call it, made with `name` (default: from the
|
|
85
|
+
* URL's host). A server that needs a person's sign-in answers `authRequired`, with its
|
|
86
|
+
* protected-resource metadata. A server that cannot be listed rejects with
|
|
87
|
+
* `mcp_preview_failed` (`details.failure`).
|
|
88
|
+
*/
|
|
89
|
+
preview(request: McpPreviewRequest): Promise<McpPreview>;
|
|
81
90
|
}
|
|
82
91
|
export interface ManagementSigningKeys {
|
|
83
92
|
list(): Promise<SigningKeyView[]>;
|
|
@@ -109,6 +118,7 @@ export declare class ManagementClient {
|
|
|
109
118
|
readonly keys: ManagementKeys;
|
|
110
119
|
readonly models: ManagementModels;
|
|
111
120
|
readonly vaults: ManagementVaults;
|
|
121
|
+
readonly mcp: ManagementMcp;
|
|
112
122
|
readonly signingKeys: ManagementSigningKeys;
|
|
113
123
|
readonly settings: ManagementSettings;
|
|
114
124
|
constructor(options: ManagementClientOptions);
|
package/dist/management.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The Management API client (`/v1/tenant/*`, protocol 8): the Tenant's settings, models,
|
|
3
|
-
* vaults, signing keys and application keys, with a management key. It imports nothing from
|
|
3
|
+
* vaults, MCP server previews, signing keys and application keys, with a management key. It imports nothing from
|
|
4
4
|
* Node, so a browser app that reaches the Runtime through its own proxy (Studio) uses it too:
|
|
5
5
|
* `@nylorun/admin/client`. `createAdmin()` in the package's main entry finds the URL and key.
|
|
6
6
|
*/
|
|
@@ -19,6 +19,7 @@ export class ManagementClient {
|
|
|
19
19
|
keys;
|
|
20
20
|
models;
|
|
21
21
|
vaults;
|
|
22
|
+
mcp;
|
|
22
23
|
signingKeys;
|
|
23
24
|
settings;
|
|
24
25
|
#key;
|
|
@@ -83,7 +84,9 @@ export class ManagementClient {
|
|
|
83
84
|
rotate: (vaultId, credentialId, request) => call("POST", credential(vaultId, credentialId), withId(request)),
|
|
84
85
|
delete: (vaultId, credentialId) => call("DELETE", credential(vaultId, credentialId)),
|
|
85
86
|
},
|
|
86
|
-
|
|
87
|
+
};
|
|
88
|
+
this.mcp = {
|
|
89
|
+
preview: (request) => call("POST", "/v1/tenant/mcp/preview", request),
|
|
87
90
|
};
|
|
88
91
|
this.signingKeys = {
|
|
89
92
|
list: async () => (await call("GET", "/v1/tenant/signing-keys")).keys,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nylorun/admin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0-beta",
|
|
4
4
|
"description": "Nylorun Management API client: the Tenant's models, vaults, signing keys, settings and application keys",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"clean": "node -e \"import('node:fs').then(({rmSync})=>rmSync('dist',{recursive:true,force:true}))\""
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@nylorun/core": "0.
|
|
31
|
+
"@nylorun/core": "0.17.0-beta"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"zod": "^4.6.5"
|