@nylorun/core 0.16.0-beta → 0.17.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 +52 -0
- package/dist/compatibility.d.ts +18 -11
- package/dist/compatibility.js +18 -11
- package/dist/contracts.d.ts +164 -48
- package/dist/contracts.js +245 -56
- package/dist/define.d.ts +6 -5
- package/dist/define.js +3 -2
- package/dist/definition/assemble.d.ts +3 -1
- package/dist/definition/assemble.js +3 -0
- package/dist/definition/code-tools.d.ts +4 -4
- package/dist/definition/code-tools.js +3 -2
- package/dist/definition/from.d.ts +5 -0
- package/dist/definition/from.js +16 -7
- package/dist/definition/manifest.d.ts +3 -1
- package/dist/definition/manifest.js +4 -1
- package/dist/definition/mcp.d.ts +45 -1
- package/dist/definition/mcp.js +85 -2
- package/dist/definition/removed.d.ts +4 -1
- package/dist/definition/removed.js +5 -2
- package/dist/definition/sandbox-capability.d.ts +21 -4
- package/dist/definition/sandbox-capability.js +56 -19
- package/dist/definition/tools-capability.d.ts +37 -0
- package/dist/definition/tools-capability.js +98 -0
- package/dist/definition/variant.d.ts +2 -1
- package/dist/definition/variant.js +40 -4
- package/dist/harness-api/transcript.d.ts +5 -1
- package/dist/harness-api/transcript.js +6 -2
- package/dist/types/manifest.d.ts +42 -14
- package/dist/types/tool.d.ts +22 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,57 @@
|
|
|
1
1
|
# @nylorun/core
|
|
2
2
|
|
|
3
|
+
## 0.17.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
|
+
- e0e39ff: **Header map, gateway and identity header credentials; `credential_rejected` on a `401`** (R2b C1, C2). For remote MCP servers and HTTP tools alike, in installation and user vaults. MIGRATION.md (protocol 10, "Header and gateway credentials" and "Tool errors the model sees") has the details.
|
|
19
|
+
|
|
20
|
+
- `@nylorun/core`: `CreateCredentialRequest` and `RotateCredentialRequest` gain `type: "headers"` with a `headers` map, and optional `via` (where requests go, such as a gateway: `https`, or `http` to a loopback host, with no userinfo, query string or fragment) and `identity: { header }` on both kinds; a rotation may change them, and `null` removes one. `CredentialInfo` gains `headers` in its type, `headerNames`, `via` and `identity`, never a value. `ERROR_CODES` gains `credential_rejected`, and `tool.completed`'s `error` documents `server` and `vault`. The admin client's vault methods take the new bodies through these types.
|
|
21
|
+
- `@nylorun/runtime`: a `headers` credential is sealed like a token and sends every header in its map; the transport's headers, `Idempotency-Key` and `Nylorun-*` are refused (`400`), and a credential header replaces a manifest header of the same name. A credential with `via` sends the server's requests there, while the manifest's URL still picks the credential and names the tools. An identity header carries the session owner's subject from the session record, and is left out for a session owned by `installation`. A `401` from an MCP server or HTTP tool is a failed tool call with code `credential_rejected` that the model sees, never retried and never `uncertain`. `via`, `identity` and the header names are stored unsealed in the credential's binding: no migration.
|
|
22
|
+
- `@nylorun/studio`: the Credentials page adds Bearer or Headers credentials (name and value rows), with an optional gateway URL and identity header, and shows them without values.
|
|
23
|
+
|
|
24
|
+
- 18f9a2f: **Model-safe MCP tool names, coded MCP tool errors and credential scrubbing** (R2b C6, C7, C8). MIGRATION.md (protocol 10, "Tool and MCP server names" and "Tool errors the model sees") has the details.
|
|
25
|
+
|
|
26
|
+
- `@nylorun/core`: a declared tool's name and an MCP server's name must match `^[A-Za-z0-9_-]{1,64}$` (`AgentManifestSchema`, so `PUT /v1/agents/{id}` refuses others). `mcp.discovered`'s server outcomes gain `renamed: [{ serverToolName, name }]`; `tool.completed` gains `redacted` and its `error` gains `retryable`. A failed `ToolOutcome` and `ToolResult` may carry `retryable`.
|
|
27
|
+
- `@nylorun/harness`: a failed tool result keeps the outcome's `retryable`, and the model sees it beside `code` and `message`.
|
|
28
|
+
- `@nylorun/runtime`: the model knows an MCP tool by `server__tool` with characters outside `[A-Za-z0-9_-]` replaced by `_`, shortened to 64 with an 8-hex SHA-256 suffix (also given to a renamed tool that collides); the server is still called by its own name. A failed MCP tool call is a failed tool result the model sees, with code `mcp.unreachable` (never sent; retryable), `credential_rejected` (`401`), `mcp.forbidden` (`403`), `mcp.error` (a JSON-RPC error) or `mcp.status` (another HTTP status); a call whose answer was lost after it was sent is `mcp.lost` for a `readOnlyHint` or `idempotentHint` tool and stays `uncertain` otherwise, as does a call lost with a gateway restart. A pooled connection whose server ended its session (`404` to its `Mcp-Session-Id`) or whose credential's `via` moved is dropped, opened again, and the call sent once more, since the tool never saw it. The credential values sent on a call (at least 8 characters, and a `Bearer` value's token) are replaced with `[redacted]` in MCP and HTTP tool results and errors before the gate records or returns them; no other field is touched.
|
|
29
|
+
|
|
30
|
+
- da93711: **Preview an MCP server's tools** (R2b C12). MIGRATION.md (protocol 10, "Previewing a server's tools") has the details.
|
|
31
|
+
|
|
32
|
+
- `@nylorun/core`: `McpPreviewRequestSchema` and `McpPreviewSchema` (`McpPreviewTool`), and the error code `mcp_preview_failed`.
|
|
33
|
+
- `@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.
|
|
34
|
+
- `@nylorun/admin`: `admin.mcp.preview({ url, type?, name?, vaultId? })`.
|
|
35
|
+
- `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`.
|
|
36
|
+
- `@nylorun/studio`: **Preview tools** on each credential of the Credentials page lists the tools behind its URL.
|
|
37
|
+
|
|
38
|
+
- 90a817d: **MCP and HTTP tool results that fit** (R2b C11). MIGRATION.md (protocol 10, "Tool results that fit") has the details.
|
|
39
|
+
|
|
40
|
+
- `@nylorun/core`: a completed `ToolOutcome` may carry `files` (`ToolResultFile`: a media type and the host's reference) and `truncated`; a completed `ToolResult` carries the `files`. `artifactsCapabilityManifest({ save, read })` adds the built-in `read_artifact` (`READ_ARTIFACT_TOOL`, `READ_ARTIFACT_MAX_BYTES`), and `codeToolsOf` leaves it alone. `SessionView` gains `definitionHash`, the definition the session was opened from. Transcript edits are split at 48 KiB, down from 256 KiB, so each `transcript.updated` event stays under 64 KiB when no entry is larger.
|
|
41
|
+
- `@nylorun/harness`: a tool result's files go to the model after its output, as media parts; an outcome marked `truncated` is not checked against the tool's output schema.
|
|
42
|
+
- `@nylorun/runtime`: an agent's remote MCP or HTTP tool result past 32 KiB is stored as a file artifact of the session, and the model gets `{ truncated: true, artifactId, size, preview }` (the first 4 KiB and the last 1 KiB). Image, audio and blob resource parts become artifacts too, an image also shown to a model that reads images (a note for one that does not); each part of a mixed result is shaped alone, and a `resource_link` stays a link. One step's results share a 256 KiB budget, so many parallel results never make an event near S2's 1 MiB record: past it, a result is a stub naming its artifact. When an artifact cannot be stored, the preview stays and `dropped` says why. An MCP answer past 8 MiB is `mcp.too-large`. `read_artifact { artifactId, offset?, length? }` reads 32 KiB of the session's own artifact a call, with or without a sandbox: a session gets it for each agent with an MCP server or an HTTP tool. The session view names its `definitionHash`.
|
|
43
|
+
- `@nylorun/studio`: a session is shown as running an older manifest only when the definition it was opened from is not the registered one, not because the Runtime pinned its own tools (a sandbox's, `save_artifact`, `read_artifact`) beside it.
|
|
44
|
+
|
|
45
|
+
- b8d10cb: **Per-tool MCP settings (manifest v6) and deferred tools** (R2b C9, C10). MIGRATION.md (protocol 10, "Per-tool settings and manifest v6" and "Deferred tools") has the details.
|
|
46
|
+
|
|
47
|
+
- `@nylorun/core`: an MCP server takes `tools` (`McpToolSettings` by the server's own tool name, `"*"` for the rest: `enabled`, `approval`, `deferred`) and `deferred`, in manifest v6. `mcp()` and `Agent.mcp()` accept them, and the builder writes v6 only for a manifest that uses them, so other manifests keep their hashes; `AgentManifestSchema` accepts v5 unchanged and refuses the fields in v5. `mcpToolSettings` resolves a tool's settings, `manifestVersionFor` says which version a definition needs. `isVariantOf` lets a turn variant disable an MCP tool or require its approval, and nothing else. `TOOLS_CAPABILITY_ID`, `TOOL_SEARCH_TOOL`, `TOOL_CALL_TOOL`, `deferredToolsTools` and `deferredToolsInstructions` describe `tool_search` and `tool_call`. A session tool may carry instructions, read with its capability's. `mcp.discovered` gains `deferred`, `disabled` and `unknownTools` per server.
|
|
48
|
+
- `@nylorun/harness`: a session tool marked `deferred` stays out of the model's tool list; `tool_call` runs it as its own call, after checking the arguments against its `inputSchema`, and asks for approval when it needs it.
|
|
49
|
+
- `@nylorun/runtime`: discovery leaves out the tools a server's settings disable and names keys that match no tool. A session of an agent with a remote MCP server pins an empty `nylorun.tools` capability; when the agent's MCP tools pass a tenth of the model's context window (or settings say so), they are deferred for the session's life, and the model gets `tool_search` (BM25 over the deferred tools' names and descriptions, served by core) and `tool_call`, with a note naming each server and its instructions. Approval resolves per tool, and a turn variant's tightening applies to its turn. The gate's `mcp/connect` answers the server's instructions.
|
|
50
|
+
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- 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.
|
|
54
|
+
|
|
3
55
|
## 0.16.0-beta
|
|
4
56
|
|
|
5
57
|
### Major Changes
|
package/dist/compatibility.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export { hashManifest } from "./utils/hash.js";
|
|
2
2
|
/**
|
|
3
|
+
* Protocol 10: MCP credential custody leaves OSS (D49). The vault credential type `oauth`, the
|
|
4
|
+
* MCP OAuth connect (`/v1/tenant/vaults/{vaultId}/oauth/start`, `/v1/oauth/callback`) and the
|
|
5
|
+
* credential resolver are gone: a session's MCP servers and HTTP tools reach their credentials
|
|
6
|
+
* through its attached vaults only.
|
|
3
7
|
* Protocol 9: the Runtime API is an OAuth 2.1 resource server (RFC 6750, RFC 9728). A missing
|
|
4
8
|
* or unknown credential is `401 credential_required` or `credential_invalid` with a
|
|
5
9
|
* `WWW-Authenticate: Bearer` challenge instead of the opaque 404, a token missing a scope gets
|
|
@@ -18,7 +22,7 @@ export { hashManifest } from "./utils/hash.js";
|
|
|
18
22
|
* it. The Host still accepts protocol 4 (and `Nylorun-Tenant`), 5 and 6 clients on every route
|
|
19
23
|
* that remains; a client that requires `action-endpoints` is refused by the feature check.
|
|
20
24
|
*/
|
|
21
|
-
export declare const PROTOCOL_VERSION =
|
|
25
|
+
export declare const PROTOCOL_VERSION = 10;
|
|
22
26
|
/** What a client of this protocol requires of a Host. */
|
|
23
27
|
export declare const PROTOCOL_FEATURES: readonly ["studio-principal", "artifacts",
|
|
24
28
|
/**
|
|
@@ -125,20 +129,23 @@ export declare const ERROR_CODES: readonly ["not_found",
|
|
|
125
129
|
* be fetched now (Host feature `trusted-issuers`): retry later. Keys already fetched keep working.
|
|
126
130
|
*/
|
|
127
131
|
"issuer_unavailable",
|
|
128
|
-
/**
|
|
129
|
-
* An MCP OAuth connect found no way to identify this installation to the authorization server:
|
|
130
|
-
* it offers no dynamic client registration and no client id was given (F9 C2).
|
|
131
|
-
*/
|
|
132
|
-
"oauth_client_required",
|
|
133
|
-
/** An OAuth callback's `state` is unknown, already used or expired: start the connect again. */
|
|
134
|
-
"oauth_state_invalid",
|
|
135
|
-
/** The authorization server (or its discovery) failed or refused an MCP OAuth connect step. */
|
|
136
|
-
"oauth_failed",
|
|
137
132
|
/**
|
|
138
133
|
* A definition names definition files the Runtime does not hold (track R2 M4): upload each
|
|
139
134
|
* with `PUT /v1/files/sha256:<hex>` first. `details.missing` lists their hashes.
|
|
140
135
|
*/
|
|
141
|
-
"definition_files_missing",
|
|
136
|
+
"definition_files_missing",
|
|
137
|
+
/**
|
|
138
|
+
* Not an HTTP answer: the code of a tool error the model sees when an MCP server or HTTP tool
|
|
139
|
+
* answered `401` (R2b C1). The vault's credential (or none) was rejected; the call is not retried.
|
|
140
|
+
*/
|
|
141
|
+
"credential_rejected",
|
|
142
|
+
/**
|
|
143
|
+
* `POST /v1/tenant/mcp/preview` could not list the server's tools (R2b C12): `502`, with
|
|
144
|
+
* `details.failure` the code a tool call would have failed with (`mcp.unreachable` for an
|
|
145
|
+
* address the Host refuses, a connection that failed or a server silent past 15 s;
|
|
146
|
+
* `mcp.forbidden`, `mcp.status`, `mcp.error`).
|
|
147
|
+
*/
|
|
148
|
+
"mcp_preview_failed", "internal_error"];
|
|
142
149
|
export type ErrorCode = (typeof ERROR_CODES)[number];
|
|
143
150
|
export declare const TENANT_ID_PATTERN: RegExp;
|
|
144
151
|
export declare const PRINCIPAL_ID_PATTERN: RegExp;
|
package/dist/compatibility.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export { hashManifest } from "./utils/hash.js";
|
|
2
2
|
/**
|
|
3
|
+
* Protocol 10: MCP credential custody leaves OSS (D49). The vault credential type `oauth`, the
|
|
4
|
+
* MCP OAuth connect (`/v1/tenant/vaults/{vaultId}/oauth/start`, `/v1/oauth/callback`) and the
|
|
5
|
+
* credential resolver are gone: a session's MCP servers and HTTP tools reach their credentials
|
|
6
|
+
* through its attached vaults only.
|
|
3
7
|
* Protocol 9: the Runtime API is an OAuth 2.1 resource server (RFC 6750, RFC 9728). A missing
|
|
4
8
|
* or unknown credential is `401 credential_required` or `credential_invalid` with a
|
|
5
9
|
* `WWW-Authenticate: Bearer` challenge instead of the opaque 404, a token missing a scope gets
|
|
@@ -18,7 +22,7 @@ export { hashManifest } from "./utils/hash.js";
|
|
|
18
22
|
* it. The Host still accepts protocol 4 (and `Nylorun-Tenant`), 5 and 6 clients on every route
|
|
19
23
|
* that remains; a client that requires `action-endpoints` is refused by the feature check.
|
|
20
24
|
*/
|
|
21
|
-
export const PROTOCOL_VERSION =
|
|
25
|
+
export const PROTOCOL_VERSION = 10;
|
|
22
26
|
/** What a client of this protocol requires of a Host. */
|
|
23
27
|
export const PROTOCOL_FEATURES = [
|
|
24
28
|
"studio-principal",
|
|
@@ -81,7 +85,7 @@ export const OPTIONAL_HOST_FEATURES = [
|
|
|
81
85
|
*/
|
|
82
86
|
export const HOST_PROTOCOL = {
|
|
83
87
|
min: 4,
|
|
84
|
-
max:
|
|
88
|
+
max: 10,
|
|
85
89
|
features: ["runtime-tenants", "admin-status", ...PROTOCOL_FEATURES, ...OPTIONAL_HOST_FEATURES],
|
|
86
90
|
};
|
|
87
91
|
export const DEFINITION_SCHEMA_VERSION = 2;
|
|
@@ -147,20 +151,23 @@ export const ERROR_CODES = [
|
|
|
147
151
|
* be fetched now (Host feature `trusted-issuers`): retry later. Keys already fetched keep working.
|
|
148
152
|
*/
|
|
149
153
|
"issuer_unavailable",
|
|
150
|
-
/**
|
|
151
|
-
* An MCP OAuth connect found no way to identify this installation to the authorization server:
|
|
152
|
-
* it offers no dynamic client registration and no client id was given (F9 C2).
|
|
153
|
-
*/
|
|
154
|
-
"oauth_client_required",
|
|
155
|
-
/** An OAuth callback's `state` is unknown, already used or expired: start the connect again. */
|
|
156
|
-
"oauth_state_invalid",
|
|
157
|
-
/** The authorization server (or its discovery) failed or refused an MCP OAuth connect step. */
|
|
158
|
-
"oauth_failed",
|
|
159
154
|
/**
|
|
160
155
|
* A definition names definition files the Runtime does not hold (track R2 M4): upload each
|
|
161
156
|
* with `PUT /v1/files/sha256:<hex>` first. `details.missing` lists their hashes.
|
|
162
157
|
*/
|
|
163
158
|
"definition_files_missing",
|
|
159
|
+
/**
|
|
160
|
+
* Not an HTTP answer: the code of a tool error the model sees when an MCP server or HTTP tool
|
|
161
|
+
* answered `401` (R2b C1). The vault's credential (or none) was rejected; the call is not retried.
|
|
162
|
+
*/
|
|
163
|
+
"credential_rejected",
|
|
164
|
+
/**
|
|
165
|
+
* `POST /v1/tenant/mcp/preview` could not list the server's tools (R2b C12): `502`, with
|
|
166
|
+
* `details.failure` the code a tool call would have failed with (`mcp.unreachable` for an
|
|
167
|
+
* address the Host refuses, a connection that failed or a server silent past 15 s;
|
|
168
|
+
* `mcp.forbidden`, `mcp.status`, `mcp.error`).
|
|
169
|
+
*/
|
|
170
|
+
"mcp_preview_failed",
|
|
164
171
|
"internal_error",
|
|
165
172
|
];
|
|
166
173
|
/** Crockford Base32 alphabet (lowercase); excludes i, l, o, u. */
|
package/dist/contracts.d.ts
CHANGED
|
@@ -470,46 +470,71 @@ export declare const CreateVaultRequestSchema: z.ZodObject<{
|
|
|
470
470
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
471
471
|
}, z.core.$strict>;
|
|
472
472
|
export type CreateVaultRequest = z.infer<typeof CreateVaultRequestSchema>;
|
|
473
|
+
/**
|
|
474
|
+
* `via` (R2b C2, Q11): where this installation reaches the credential's server, such as a
|
|
475
|
+
* gateway's endpoint for it. An absolute `https` URL (`http` only to a loopback host), with no
|
|
476
|
+
* userinfo, query string or fragment. Credentials are still matched by the URL the manifest
|
|
477
|
+
* names; `via` changes only where the request goes.
|
|
478
|
+
*/
|
|
479
|
+
export declare const CredentialViaSchema: z.ZodString;
|
|
480
|
+
/**
|
|
481
|
+
* The identity header (R2b C2, Q1–Q3): each request carries the session owner's subject in
|
|
482
|
+
* `header`, for a gateway that keeps each person's accounts. A session with no person as its
|
|
483
|
+
* owner (the reserved `installation`) sends none.
|
|
484
|
+
*/
|
|
485
|
+
export declare const CredentialIdentitySchema: z.ZodObject<{
|
|
486
|
+
header: z.ZodString;
|
|
487
|
+
}, z.core.$strict>;
|
|
488
|
+
export type CredentialIdentity = z.infer<typeof CredentialIdentitySchema>;
|
|
489
|
+
/**
|
|
490
|
+
* A credential for the server at `url` (the URL a manifest names): `bearer` sends
|
|
491
|
+
* `Authorization: Bearer <token>`, `headers` its header map (R2b C2). The header names may not be
|
|
492
|
+
* the MCP transport's headers or `Nylorun-*`.
|
|
493
|
+
*/
|
|
473
494
|
export declare const CreateCredentialRequestSchema: z.ZodObject<{
|
|
474
495
|
requestId: z.ZodString;
|
|
475
496
|
idempotencyKey: z.ZodString;
|
|
476
497
|
name: z.ZodString;
|
|
477
498
|
auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
499
|
+
via: z.ZodOptional<z.ZodString>;
|
|
500
|
+
identity: z.ZodOptional<z.ZodObject<{
|
|
501
|
+
header: z.ZodString;
|
|
502
|
+
}, z.core.$strict>>;
|
|
478
503
|
type: z.ZodLiteral<"bearer">;
|
|
479
504
|
url: z.ZodString;
|
|
480
505
|
token: z.ZodString;
|
|
481
506
|
}, z.core.$strict>, z.ZodObject<{
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
486
|
-
refresh: z.ZodOptional<z.ZodObject<{
|
|
487
|
-
tokenEndpoint: z.ZodString;
|
|
488
|
-
clientId: z.ZodString;
|
|
489
|
-
refreshToken: z.ZodString;
|
|
490
|
-
tokenEndpointAuth: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
491
|
-
type: z.ZodLiteral<"none">;
|
|
492
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
493
|
-
type: z.ZodLiteral<"client_secret_basic">;
|
|
494
|
-
clientSecret: z.ZodString;
|
|
495
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
496
|
-
type: z.ZodLiteral<"client_secret_post">;
|
|
497
|
-
clientSecret: z.ZodString;
|
|
498
|
-
}, z.core.$strict>], "type">;
|
|
507
|
+
via: z.ZodOptional<z.ZodString>;
|
|
508
|
+
identity: z.ZodOptional<z.ZodObject<{
|
|
509
|
+
header: z.ZodString;
|
|
499
510
|
}, z.core.$strict>>;
|
|
511
|
+
type: z.ZodLiteral<"headers">;
|
|
512
|
+
url: z.ZodString;
|
|
513
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
500
514
|
}, z.core.$strict>], "type">;
|
|
501
515
|
}, z.core.$strict>;
|
|
502
516
|
export type CreateCredentialRequest = z.infer<typeof CreateCredentialRequestSchema>;
|
|
517
|
+
/**
|
|
518
|
+
* Replaces a credential's secret; its type and URL stay. `via` and `identity` are kept unless
|
|
519
|
+
* given (`null` removes one).
|
|
520
|
+
*/
|
|
503
521
|
export declare const RotateCredentialRequestSchema: z.ZodObject<{
|
|
504
522
|
requestId: z.ZodString;
|
|
505
523
|
idempotencyKey: z.ZodString;
|
|
506
524
|
auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
525
|
+
via: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
526
|
+
identity: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
527
|
+
header: z.ZodString;
|
|
528
|
+
}, z.core.$strict>>>;
|
|
507
529
|
type: z.ZodLiteral<"bearer">;
|
|
508
530
|
token: z.ZodString;
|
|
509
531
|
}, z.core.$strict>, z.ZodObject<{
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
532
|
+
via: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
533
|
+
identity: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
534
|
+
header: z.ZodString;
|
|
535
|
+
}, z.core.$strict>>>;
|
|
536
|
+
type: z.ZodLiteral<"headers">;
|
|
537
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
513
538
|
}, z.core.$strict>], "type">;
|
|
514
539
|
}, z.core.$strict>;
|
|
515
540
|
export type RotateCredentialRequest = z.infer<typeof RotateCredentialRequestSchema>;
|
|
@@ -582,16 +607,80 @@ export declare const CredentialInfoSchema: z.ZodObject<{
|
|
|
582
607
|
name: z.ZodString;
|
|
583
608
|
type: z.ZodEnum<{
|
|
584
609
|
bearer: "bearer";
|
|
585
|
-
|
|
610
|
+
headers: "headers";
|
|
586
611
|
}>;
|
|
587
612
|
binding: z.ZodObject<{
|
|
588
613
|
url: z.ZodString;
|
|
589
614
|
}, z.core.$strict>;
|
|
590
|
-
|
|
615
|
+
headerNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
616
|
+
via: z.ZodOptional<z.ZodString>;
|
|
617
|
+
identity: z.ZodOptional<z.ZodObject<{
|
|
618
|
+
header: z.ZodString;
|
|
619
|
+
}, z.core.$strict>>;
|
|
591
620
|
createdAt: z.ZodString;
|
|
592
621
|
rotatedAt: z.ZodOptional<z.ZodString>;
|
|
593
622
|
}, z.core.$strict>;
|
|
594
623
|
export type CredentialInfo = z.infer<typeof CredentialInfoSchema>;
|
|
624
|
+
/** The MCP transports a preview speaks: a manifest's remote server types. */
|
|
625
|
+
export declare const MCP_PREVIEW_TYPES: readonly ["streamable-http", "sse"];
|
|
626
|
+
/**
|
|
627
|
+
* `POST /v1/tenant/mcp/preview` (R2b C12): what a remote MCP server offers, before an agent
|
|
628
|
+
* names it. The Runtime connects with the installation vault's credential for `url` (one
|
|
629
|
+
* credential across the installation vaults, or the one in `vaultId`), lists the tools and
|
|
630
|
+
* closes the connection; it never calls a tool.
|
|
631
|
+
*/
|
|
632
|
+
export declare const McpPreviewRequestSchema: z.ZodObject<{
|
|
633
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
634
|
+
url: z.ZodString;
|
|
635
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
636
|
+
sse: "sse";
|
|
637
|
+
"streamable-http": "streamable-http";
|
|
638
|
+
}>>;
|
|
639
|
+
name: z.ZodOptional<z.ZodString>;
|
|
640
|
+
vaultId: z.ZodOptional<z.ZodString>;
|
|
641
|
+
}, z.core.$strict>;
|
|
642
|
+
export type McpPreviewRequest = z.infer<typeof McpPreviewRequestSchema>;
|
|
643
|
+
/** One tool a preview found. */
|
|
644
|
+
export declare const McpPreviewToolSchema: z.ZodObject<{
|
|
645
|
+
serverToolName: z.ZodString;
|
|
646
|
+
modelName: z.ZodOptional<z.ZodString>;
|
|
647
|
+
description: z.ZodOptional<z.ZodString>;
|
|
648
|
+
annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
649
|
+
schemaBytes: z.ZodNumber;
|
|
650
|
+
}, z.core.$strict>;
|
|
651
|
+
export type McpPreviewTool = z.infer<typeof McpPreviewToolSchema>;
|
|
652
|
+
/**
|
|
653
|
+
* A preview (R2b C12). A server that answered `401` is `authRequired`, with its RFC 9728
|
|
654
|
+
* protected-resource metadata when it publishes any: it needs a person's sign-in or a key the
|
|
655
|
+
* installation vaults do not hold, so reach it with a key or through a gateway (`via`).
|
|
656
|
+
*/
|
|
657
|
+
export declare const McpPreviewSchema: z.ZodObject<{
|
|
658
|
+
name: z.ZodString;
|
|
659
|
+
url: z.ZodString;
|
|
660
|
+
type: z.ZodEnum<{
|
|
661
|
+
sse: "sse";
|
|
662
|
+
"streamable-http": "streamable-http";
|
|
663
|
+
}>;
|
|
664
|
+
credentialSent: z.ZodBoolean;
|
|
665
|
+
serverInfo: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
666
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
667
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
668
|
+
serverToolName: z.ZodString;
|
|
669
|
+
modelName: z.ZodOptional<z.ZodString>;
|
|
670
|
+
description: z.ZodOptional<z.ZodString>;
|
|
671
|
+
annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
672
|
+
schemaBytes: z.ZodNumber;
|
|
673
|
+
}, z.core.$strict>>;
|
|
674
|
+
renamed: z.ZodArray<z.ZodObject<{
|
|
675
|
+
serverToolName: z.ZodString;
|
|
676
|
+
name: z.ZodString;
|
|
677
|
+
}, z.core.$strict>>;
|
|
678
|
+
authRequired: z.ZodOptional<z.ZodObject<{
|
|
679
|
+
resourceMetadataUrl: z.ZodOptional<z.ZodString>;
|
|
680
|
+
resourceMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
681
|
+
}, z.core.$strict>>;
|
|
682
|
+
}, z.core.$strict>;
|
|
683
|
+
export type McpPreview = z.infer<typeof McpPreviewSchema>;
|
|
595
684
|
/** The most parts one message may carry (protocol 6). */
|
|
596
685
|
export declare const MAX_MESSAGE_PARTS = 32;
|
|
597
686
|
/**
|
|
@@ -901,6 +990,7 @@ export declare const RejectedResponseSchema: z.ZodObject<{
|
|
|
901
990
|
code: z.ZodEnum<{
|
|
902
991
|
connection_missing: "connection_missing";
|
|
903
992
|
credential_invalid: "credential_invalid";
|
|
993
|
+
credential_rejected: "credential_rejected";
|
|
904
994
|
credential_required: "credential_required";
|
|
905
995
|
definition_files_missing: "definition_files_missing";
|
|
906
996
|
host_rejected: "host_rejected";
|
|
@@ -910,10 +1000,8 @@ export declare const RejectedResponseSchema: z.ZodObject<{
|
|
|
910
1000
|
issuer_unavailable: "issuer_unavailable";
|
|
911
1001
|
key_role_mismatch: "key_role_mismatch";
|
|
912
1002
|
limit_exceeded: "limit_exceeded";
|
|
1003
|
+
mcp_preview_failed: "mcp_preview_failed";
|
|
913
1004
|
not_found: "not_found";
|
|
914
|
-
oauth_client_required: "oauth_client_required";
|
|
915
|
-
oauth_failed: "oauth_failed";
|
|
916
|
-
oauth_state_invalid: "oauth_state_invalid";
|
|
917
1005
|
origin_rejected: "origin_rejected";
|
|
918
1006
|
placement_refused: "placement_refused";
|
|
919
1007
|
protocol_unsupported: "protocol_unsupported";
|
|
@@ -1013,7 +1101,14 @@ export declare const ToolCompletedPayloadSchema: z.ZodObject<{
|
|
|
1013
1101
|
error: z.ZodOptional<z.ZodObject<{
|
|
1014
1102
|
code: z.ZodString;
|
|
1015
1103
|
message: z.ZodString;
|
|
1104
|
+
server: z.ZodOptional<z.ZodString>;
|
|
1105
|
+
vault: z.ZodOptional<z.ZodEnum<{
|
|
1106
|
+
installation: "installation";
|
|
1107
|
+
user: "user";
|
|
1108
|
+
}>>;
|
|
1109
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
1016
1110
|
}, z.core.$loose>>;
|
|
1111
|
+
redacted: z.ZodOptional<z.ZodNumber>;
|
|
1017
1112
|
}, z.core.$loose>;
|
|
1018
1113
|
export declare const EffectUncertainPayloadSchema: z.ZodObject<{
|
|
1019
1114
|
effectId: z.ZodString;
|
|
@@ -1113,7 +1208,14 @@ declare const TRANSCRIPT_PAYLOADS: {
|
|
|
1113
1208
|
error: z.ZodOptional<z.ZodObject<{
|
|
1114
1209
|
code: z.ZodString;
|
|
1115
1210
|
message: z.ZodString;
|
|
1211
|
+
server: z.ZodOptional<z.ZodString>;
|
|
1212
|
+
vault: z.ZodOptional<z.ZodEnum<{
|
|
1213
|
+
installation: "installation";
|
|
1214
|
+
user: "user";
|
|
1215
|
+
}>>;
|
|
1216
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
1116
1217
|
}, z.core.$loose>>;
|
|
1218
|
+
redacted: z.ZodOptional<z.ZodNumber>;
|
|
1117
1219
|
}, z.core.$loose>;
|
|
1118
1220
|
readonly "effect.uncertain": z.ZodObject<{
|
|
1119
1221
|
effectId: z.ZodString;
|
|
@@ -1363,7 +1465,14 @@ export declare const McpServerOutcomeSchema: z.ZodObject<{
|
|
|
1363
1465
|
}>;
|
|
1364
1466
|
message: z.ZodString;
|
|
1365
1467
|
tools: z.ZodNumber;
|
|
1468
|
+
deferred: z.ZodOptional<z.ZodNumber>;
|
|
1469
|
+
disabled: z.ZodOptional<z.ZodNumber>;
|
|
1470
|
+
unknownTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1366
1471
|
credentialIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1472
|
+
renamed: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1473
|
+
serverToolName: z.ZodString;
|
|
1474
|
+
name: z.ZodString;
|
|
1475
|
+
}, z.core.$loose>>>;
|
|
1367
1476
|
}, z.core.$loose>;
|
|
1368
1477
|
export type McpServerOutcome = z.infer<typeof McpServerOutcomeSchema>;
|
|
1369
1478
|
/**
|
|
@@ -1383,7 +1492,14 @@ export declare const McpDiscoveredPayloadSchema: z.ZodObject<{
|
|
|
1383
1492
|
}>;
|
|
1384
1493
|
message: z.ZodString;
|
|
1385
1494
|
tools: z.ZodNumber;
|
|
1495
|
+
deferred: z.ZodOptional<z.ZodNumber>;
|
|
1496
|
+
disabled: z.ZodOptional<z.ZodNumber>;
|
|
1497
|
+
unknownTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1386
1498
|
credentialIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1499
|
+
renamed: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1500
|
+
serverToolName: z.ZodString;
|
|
1501
|
+
name: z.ZodString;
|
|
1502
|
+
}, z.core.$loose>>>;
|
|
1387
1503
|
}, z.core.$loose>>;
|
|
1388
1504
|
}, z.core.$loose>;
|
|
1389
1505
|
/**
|
|
@@ -1551,7 +1667,14 @@ export declare const EVENT_CATALOG: {
|
|
|
1551
1667
|
error: z.ZodOptional<z.ZodObject<{
|
|
1552
1668
|
code: z.ZodString;
|
|
1553
1669
|
message: z.ZodString;
|
|
1670
|
+
server: z.ZodOptional<z.ZodString>;
|
|
1671
|
+
vault: z.ZodOptional<z.ZodEnum<{
|
|
1672
|
+
installation: "installation";
|
|
1673
|
+
user: "user";
|
|
1674
|
+
}>>;
|
|
1675
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
1554
1676
|
}, z.core.$loose>>;
|
|
1677
|
+
redacted: z.ZodOptional<z.ZodNumber>;
|
|
1555
1678
|
}, z.core.$loose>;
|
|
1556
1679
|
readonly source: "loop";
|
|
1557
1680
|
readonly version: 1;
|
|
@@ -1601,7 +1724,14 @@ export declare const EVENT_CATALOG: {
|
|
|
1601
1724
|
}>;
|
|
1602
1725
|
message: z.ZodString;
|
|
1603
1726
|
tools: z.ZodNumber;
|
|
1727
|
+
deferred: z.ZodOptional<z.ZodNumber>;
|
|
1728
|
+
disabled: z.ZodOptional<z.ZodNumber>;
|
|
1729
|
+
unknownTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1604
1730
|
credentialIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1731
|
+
renamed: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1732
|
+
serverToolName: z.ZodString;
|
|
1733
|
+
name: z.ZodString;
|
|
1734
|
+
}, z.core.$loose>>>;
|
|
1605
1735
|
}, z.core.$loose>>;
|
|
1606
1736
|
}, z.core.$loose>;
|
|
1607
1737
|
readonly source: "loop";
|
|
@@ -2449,6 +2579,7 @@ export declare const SessionViewSchema: z.ZodObject<{
|
|
|
2449
2579
|
agentId: z.ZodString;
|
|
2450
2580
|
ownerUserId: z.ZodString;
|
|
2451
2581
|
manifestHash: z.ZodString;
|
|
2582
|
+
definitionHash: z.ZodOptional<z.ZodString>;
|
|
2452
2583
|
implementationVersion: z.ZodString;
|
|
2453
2584
|
status: z.ZodEnum<{
|
|
2454
2585
|
cancelled: "cancelled";
|
|
@@ -2788,35 +2919,21 @@ export declare const ListCredentialsResponseSchema: z.ZodObject<{
|
|
|
2788
2919
|
name: z.ZodString;
|
|
2789
2920
|
type: z.ZodEnum<{
|
|
2790
2921
|
bearer: "bearer";
|
|
2791
|
-
|
|
2922
|
+
headers: "headers";
|
|
2792
2923
|
}>;
|
|
2793
2924
|
binding: z.ZodObject<{
|
|
2794
2925
|
url: z.ZodString;
|
|
2795
2926
|
}, z.core.$strict>;
|
|
2796
|
-
|
|
2927
|
+
headerNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2928
|
+
via: z.ZodOptional<z.ZodString>;
|
|
2929
|
+
identity: z.ZodOptional<z.ZodObject<{
|
|
2930
|
+
header: z.ZodString;
|
|
2931
|
+
}, z.core.$strict>>;
|
|
2797
2932
|
createdAt: z.ZodString;
|
|
2798
2933
|
rotatedAt: z.ZodOptional<z.ZodString>;
|
|
2799
2934
|
}, z.core.$strict>>;
|
|
2800
2935
|
}, z.core.$strict>;
|
|
2801
2936
|
export type ListCredentialsResponse = z.infer<typeof ListCredentialsResponseSchema>;
|
|
2802
|
-
/**
|
|
2803
|
-
* `POST /v1/vaults/{vaultId}/oauth/start` (F9 C2): sign the installation in to the remote MCP
|
|
2804
|
-
* server at `url`, declared as `server`, and store its OAuth credential in the installation vault.
|
|
2805
|
-
* `clientId` names a client registered with the authorization server; without one the Runtime
|
|
2806
|
-
* registers itself (RFC 7591) when the server allows it.
|
|
2807
|
-
*/
|
|
2808
|
-
export declare const StartOAuthRequestSchema: z.ZodObject<{
|
|
2809
|
-
url: z.ZodString;
|
|
2810
|
-
server: z.ZodString;
|
|
2811
|
-
clientId: z.ZodOptional<z.ZodString>;
|
|
2812
|
-
}, z.core.$strict>;
|
|
2813
|
-
export type StartOAuthRequest = z.infer<typeof StartOAuthRequestSchema>;
|
|
2814
|
-
/** Where to send the browser, and until when the sign-in can finish. */
|
|
2815
|
-
export declare const StartOAuthResponseSchema: z.ZodObject<{
|
|
2816
|
-
authorizeUrl: z.ZodString;
|
|
2817
|
-
expiresAt: z.ZodString;
|
|
2818
|
-
}, z.core.$strict>;
|
|
2819
|
-
export type StartOAuthResponse = z.infer<typeof StartOAuthResponseSchema>;
|
|
2820
2937
|
/** A deleted vault or credential. */
|
|
2821
2938
|
export declare const DeletedResponseSchema: z.ZodObject<{
|
|
2822
2939
|
id: z.ZodString;
|
|
@@ -2839,6 +2956,7 @@ export type StreamClosedFrame = z.infer<typeof StreamClosedFrameSchema>;
|
|
|
2839
2956
|
export declare const AgUiRunErrorCodeSchema: z.ZodEnum<{
|
|
2840
2957
|
connection_missing: "connection_missing";
|
|
2841
2958
|
credential_invalid: "credential_invalid";
|
|
2959
|
+
credential_rejected: "credential_rejected";
|
|
2842
2960
|
credential_required: "credential_required";
|
|
2843
2961
|
definition_files_missing: "definition_files_missing";
|
|
2844
2962
|
host_rejected: "host_rejected";
|
|
@@ -2848,10 +2966,8 @@ export declare const AgUiRunErrorCodeSchema: z.ZodEnum<{
|
|
|
2848
2966
|
issuer_unavailable: "issuer_unavailable";
|
|
2849
2967
|
key_role_mismatch: "key_role_mismatch";
|
|
2850
2968
|
limit_exceeded: "limit_exceeded";
|
|
2969
|
+
mcp_preview_failed: "mcp_preview_failed";
|
|
2851
2970
|
not_found: "not_found";
|
|
2852
|
-
oauth_client_required: "oauth_client_required";
|
|
2853
|
-
oauth_failed: "oauth_failed";
|
|
2854
|
-
oauth_state_invalid: "oauth_state_invalid";
|
|
2855
2971
|
origin_rejected: "origin_rejected";
|
|
2856
2972
|
placement_refused: "placement_refused";
|
|
2857
2973
|
protocol_unsupported: "protocol_unsupported";
|