@nylorun/core 0.16.0-beta → 0.18.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 +72 -0
- package/README.md +10 -0
- package/dist/compatibility.d.ts +18 -11
- package/dist/compatibility.js +18 -11
- package/dist/contracts.d.ts +176 -50
- package/dist/contracts.js +289 -85
- 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 +31 -188
- 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 +8 -3
- package/dist/definition/removed.js +13 -4
- 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/messages.d.ts +30 -352
- package/dist/harness-api/messages.js +2 -6
- package/dist/harness-api/schema.d.ts +701 -13
- package/dist/harness-api/schema.js +129 -53
- package/dist/harness-api/transcript.d.ts +8 -6
- package/dist/harness-api/transcript.js +4 -5
- package/dist/project.d.ts +67 -0
- package/dist/project.js +210 -0
- package/dist/transport.d.ts +52 -0
- package/dist/transport.js +73 -0
- package/dist/types/manifest.d.ts +42 -14
- package/dist/types/tool.d.ts +22 -0
- package/package.json +9 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,77 @@
|
|
|
1
1
|
# @nylorun/core
|
|
2
2
|
|
|
3
|
+
## 0.18.0-beta
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 7780b2f: **One client and connection layer.** The Project link and credentials are read one way, and every Runtime client shares one `/health` probe.
|
|
8
|
+
|
|
9
|
+
- `@nylorun/core`: `@nylorun/core/project` (Node only, the one Core subpath that imports Node modules) reads the Nylorun home, a local Tenant's Host root (`tenantHostRoot`), the Project root (`findProjectRoot`) and the Project link and credentials (`findLinkedProject`, `readProjectLink`, `readCredentialsFile`), validated with `ProjectLinkFileSchema` and `ProjectCredentialsFileSchema`; a broken or newer file throws `ProjectFileError`. `@nylorun/core/transport` (browser-safe) holds the `/health` compatibility probe (`checkHealth`), `parseProtocolRange` (on `ProtocolRangeSchema`, ignoring fields a newer Host adds), `describeIncompatibility`, `requestHeaders` and `readBody`.
|
|
10
|
+
- `@nylorun/agents`: `resolveConnection` and `createClient()` find the Project as every reader does: the nearest directory with `.nylorun/` from `cwd` upwards, never the home directory or above it (they used to walk to the filesystem root, and past a `.nylorun/` without a link). A link without `credentials.json`, or a link or credentials file that does not validate, is now `connection_missing` naming the file and `npx nylorun start`, instead of a raw file-system or parse error. `@nylorun/agents/client` loads the link reader only when `createClient()` resolves a connection, so it imports no Node module. The root entry re-exports `checkHealth`, `describeIncompatibility` and `parseProtocolRange`.
|
|
11
|
+
- `@nylorun/admin`: `createAdmin` reads the Project link with the same reader. A link that does not validate is now refused like one from an older nylorun (when nothing else names the Host root), and a linked Project's `credentials.json` that does not validate is `connection_missing` instead of being skipped. `@nylorun/admin/project` re-exports `@nylorun/core/project` for tools that depend on this package. The `/health` check and request headers come from `@nylorun/core/transport`.
|
|
12
|
+
- `nylorun`: reads the Project link and credentials with `@nylorun/core/project`; a credentials file whose keys are not 64 hex characters is replaced by `start`, as an unreadable one was. No command changes.
|
|
13
|
+
- `@nylorun/cli`: `nylo` reads the Project root, link and credentials through `@nylorun/admin/project` instead of its own copies, with the same messages. No command changes.
|
|
14
|
+
- `@nylorun/studio`: the server's Runtime compatibility probe is `checkHealth` from `@nylorun/agents`.
|
|
15
|
+
|
|
16
|
+
- 070674d: **One source of truth for the manifest and Harness API schemas.**
|
|
17
|
+
|
|
18
|
+
- `@nylorun/core`: `Agent.from` (`agentFrom`) checks a manifest with `AgentManifestSchema`, the Runtime's own check, instead of a validator of its own, and refuses with `agent.build-failed` and the schema's messages (each prefixed with its path, such as `capabilities.0.tools.0.name: …`). It now refuses what the Runtime refuses at registration and it let through, such as unknown fields (it dropped them) or a tool or MCP server name that not every model provider accepts. The schema names a top-level `model` or `schemaVersion` and a capability's `model` as before, and the skill whose `files` are wrong (`Skill 'triage' files must include SKILL.md`). The rebuilt manifest is a frozen copy; the object passed in is no longer frozen. `AgentManifestSchema` and `WorkflowManifestSchema` are no longer force-cast to their types: the build checks that each accepts exactly `AgentManifest` and `WorkflowManifest`. `@nylorun/core/contracts` exports `McpServerManifestSchema`, `HEADER_NAME_PATTERN` and `LOOPBACK_HOSTS`. The Harness API's types (`@nylorun/core/harness-api`) are inferred from the schemas that validate its frames, so they match them: `TurnStart.manifest`, `TurnStart.checkpoint` and `RunRouting.rootManifest` are `object`, `WorkspaceCall.tool` is a sandbox tool name, `ABORT_REASONS` is a tuple, and properties are no longer `readonly` (arrays that were stay so).
|
|
19
|
+
- `@nylorun/harness`: `runDurable` checks the manifest once, when it rebuilds the agent, instead of twice. The unpublished, stale `schemas/manifest.schema.json` (manifest `schemaVersion` 2) is gone; `z.toJSONSchema(AgentManifestSchema)` is the manifest's JSON Schema.
|
|
20
|
+
- `@nylorun/agents`: a plugin's MCP servers are checked with core's `McpServerManifestSchema`, header-name pattern and loopback hosts. A server whose key is not a name every model provider accepts is skipped with a `plugin.mcp-server-skipped` warning, since the Runtime would refuse the manifest declaring it.
|
|
21
|
+
- `@nylorun/runtime`: the stack configuration reads its four listeners (`NYLORUN_LISTEN_*`, `NYLORUN_GATES_LISTEN_*`, `NYLORUN_HARNESS_LISTEN_*`, `NYLORUN_EGRESS_LISTEN_*`) with one parser; the variables and their errors are unchanged.
|
|
22
|
+
|
|
23
|
+
## 0.17.0-beta
|
|
24
|
+
|
|
25
|
+
### Major Changes
|
|
26
|
+
|
|
27
|
+
- 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.
|
|
28
|
+
|
|
29
|
+
- **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.
|
|
30
|
+
- **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`.
|
|
31
|
+
- **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.
|
|
32
|
+
- **Breaking (`@nylorun/admin`):** `admin.vaults` loses its OAuth start method.
|
|
33
|
+
- **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.
|
|
34
|
+
- `@nylorun/studio`: the Credentials page loses the OAuth type, the Expires column and the OAuth connect hint.
|
|
35
|
+
|
|
36
|
+
### Minor Changes
|
|
37
|
+
|
|
38
|
+
- 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.
|
|
39
|
+
|
|
40
|
+
- `@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.
|
|
41
|
+
- `@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.
|
|
42
|
+
- `@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.
|
|
43
|
+
|
|
44
|
+
- 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.
|
|
45
|
+
|
|
46
|
+
- `@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`.
|
|
47
|
+
- `@nylorun/harness`: a failed tool result keeps the outcome's `retryable`, and the model sees it beside `code` and `message`.
|
|
48
|
+
- `@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.
|
|
49
|
+
|
|
50
|
+
- da93711: **Preview an MCP server's tools** (R2b C12). MIGRATION.md (protocol 10, "Previewing a server's tools") has the details.
|
|
51
|
+
|
|
52
|
+
- `@nylorun/core`: `McpPreviewRequestSchema` and `McpPreviewSchema` (`McpPreviewTool`), and the error code `mcp_preview_failed`.
|
|
53
|
+
- `@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.
|
|
54
|
+
- `@nylorun/admin`: `admin.mcp.preview({ url, type?, name?, vaultId? })`.
|
|
55
|
+
- `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`.
|
|
56
|
+
- `@nylorun/studio`: **Preview tools** on each credential of the Credentials page lists the tools behind its URL.
|
|
57
|
+
|
|
58
|
+
- 90a817d: **MCP and HTTP tool results that fit** (R2b C11). MIGRATION.md (protocol 10, "Tool results that fit") has the details.
|
|
59
|
+
|
|
60
|
+
- `@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.
|
|
61
|
+
- `@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.
|
|
62
|
+
- `@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`.
|
|
63
|
+
- `@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.
|
|
64
|
+
|
|
65
|
+
- 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.
|
|
66
|
+
|
|
67
|
+
- `@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.
|
|
68
|
+
- `@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.
|
|
69
|
+
- `@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.
|
|
70
|
+
|
|
71
|
+
### Patch Changes
|
|
72
|
+
|
|
73
|
+
- 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.
|
|
74
|
+
|
|
3
75
|
## 0.16.0-beta
|
|
4
76
|
|
|
5
77
|
### Major Changes
|
package/README.md
CHANGED
|
@@ -6,6 +6,16 @@ HTTP client, Node host or SDK dependencies.
|
|
|
6
6
|
- `/define`: `Agent`, `tool`, capabilities, schemas and explicit local bindings.
|
|
7
7
|
- `/contracts`: runtime request, event, action and response schemas.
|
|
8
8
|
- `/compatibility`: protocol/definition versions and canonical manifest hashing.
|
|
9
|
+
- `/transport`: what every Runtime client does on the wire: the `/health`
|
|
10
|
+
compatibility probe (`checkHealth`), protocol ranges, request headers and
|
|
11
|
+
response bodies. Browser-safe; `@nylorun/agents` and `@nylorun/admin` build on it.
|
|
12
|
+
- `/project` (**Node only**, the one subpath that imports Node modules): the
|
|
13
|
+
Nylorun home, a local Tenant's Host root, the Project root, and the Project
|
|
14
|
+
link and credentials, validated with `ProjectLinkFileSchema` and
|
|
15
|
+
`ProjectCredentialsFileSchema`. Every reader of the link uses it (the SDK,
|
|
16
|
+
`@nylorun/admin`, `nylorun` and `nylo`): the Project is the nearest directory
|
|
17
|
+
with `.nylorun/`, from the working directory upwards, never the home
|
|
18
|
+
directory or above it; a broken file throws `ProjectFileError`.
|
|
9
19
|
- Root: shared contracts and types; no authoring or execution entry points.
|
|
10
20
|
|
|
11
21
|
Applications normally import `@nylorun/agents`. Hosts and the execution engine
|
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Public wire contracts only. Never import checkpoint or engine modules here. */
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import type { AgentManifest } from "./types/manifest.js";
|
|
3
|
+
import type { AgentManifest, McpServerManifest } from "./types/manifest.js";
|
|
4
4
|
import type { JsonValue } from "./types/shared.js";
|
|
5
5
|
import type { WorkflowManifest } from "./types/workflow.js";
|
|
6
6
|
export type { AgentManifest } from "./types/manifest.js";
|
|
@@ -10,9 +10,15 @@ export { DEFINITION_FILE_MAX_BYTES, SKILL_FILES_MAX, definitionFilesOf, isDefini
|
|
|
10
10
|
export type { ErrorCode } from "./compatibility.js";
|
|
11
11
|
export declare const RequestIdSchema: z.ZodString;
|
|
12
12
|
export declare const IdempotencyKeySchema: z.ZodString;
|
|
13
|
+
/** A remote MCP server as a manifest declares it (`streamable-http` or `sse`). */
|
|
14
|
+
export declare const McpServerManifestSchema: z.ZodType<McpServerManifest>;
|
|
15
|
+
/**
|
|
16
|
+
* An agent's manifest (manifest v5 and v6). Its output is checked against `AgentManifest` here and
|
|
17
|
+
* below (`ManifestDrift`): the hand-written type keeps its read-only fields and its docs.
|
|
18
|
+
*/
|
|
13
19
|
export declare const AgentManifestSchema: z.ZodType<AgentManifest>;
|
|
14
20
|
/** Workflow definition document. `kind: "workflow"`; a missing `kind` is never a workflow. */
|
|
15
|
-
export declare const WorkflowManifestSchema: z.ZodType<WorkflowManifest
|
|
21
|
+
export declare const WorkflowManifestSchema: z.ZodType<WorkflowManifest, unknown, z.core.$ZodTypeInternals<WorkflowManifest, unknown>>;
|
|
16
22
|
/** Registry document: agent (no `kind`, or legacy) or workflow (`kind: "workflow"`). */
|
|
17
23
|
export declare const DefinitionDocumentSchema: z.ZodUnion<readonly [z.ZodType<AgentManifest, unknown, z.core.$ZodTypeInternals<AgentManifest, unknown>>, z.ZodType<WorkflowManifest, unknown, z.core.$ZodTypeInternals<WorkflowManifest, unknown>>]>;
|
|
18
24
|
export type DefinitionDocument = AgentManifest | WorkflowManifest;
|
|
@@ -470,46 +476,75 @@ export declare const CreateVaultRequestSchema: z.ZodObject<{
|
|
|
470
476
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
471
477
|
}, z.core.$strict>;
|
|
472
478
|
export type CreateVaultRequest = z.infer<typeof CreateVaultRequestSchema>;
|
|
479
|
+
/** An RFC 9110 field name. */
|
|
480
|
+
export declare const HEADER_NAME_PATTERN: RegExp;
|
|
481
|
+
/** A loopback host as a URL's `hostname` names it: plain `http` reaches only these. */
|
|
482
|
+
export declare const LOOPBACK_HOSTS: RegExp;
|
|
483
|
+
/**
|
|
484
|
+
* `via` (R2b C2, Q11): where this installation reaches the credential's server, such as a
|
|
485
|
+
* gateway's endpoint for it. An absolute `https` URL (`http` only to a loopback host), with no
|
|
486
|
+
* userinfo, query string or fragment. Credentials are still matched by the URL the manifest
|
|
487
|
+
* names; `via` changes only where the request goes.
|
|
488
|
+
*/
|
|
489
|
+
export declare const CredentialViaSchema: z.ZodString;
|
|
490
|
+
/**
|
|
491
|
+
* The identity header (R2b C2, Q1–Q3): each request carries the session owner's subject in
|
|
492
|
+
* `header`, for a gateway that keeps each person's accounts. A session with no person as its
|
|
493
|
+
* owner (the reserved `installation`) sends none.
|
|
494
|
+
*/
|
|
495
|
+
export declare const CredentialIdentitySchema: z.ZodObject<{
|
|
496
|
+
header: z.ZodString;
|
|
497
|
+
}, z.core.$strict>;
|
|
498
|
+
export type CredentialIdentity = z.infer<typeof CredentialIdentitySchema>;
|
|
499
|
+
/**
|
|
500
|
+
* A credential for the server at `url` (the URL a manifest names): `bearer` sends
|
|
501
|
+
* `Authorization: Bearer <token>`, `headers` its header map (R2b C2). The header names may not be
|
|
502
|
+
* the MCP transport's headers or `Nylorun-*`.
|
|
503
|
+
*/
|
|
473
504
|
export declare const CreateCredentialRequestSchema: z.ZodObject<{
|
|
474
505
|
requestId: z.ZodString;
|
|
475
506
|
idempotencyKey: z.ZodString;
|
|
476
507
|
name: z.ZodString;
|
|
477
508
|
auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
509
|
+
via: z.ZodOptional<z.ZodString>;
|
|
510
|
+
identity: z.ZodOptional<z.ZodObject<{
|
|
511
|
+
header: z.ZodString;
|
|
512
|
+
}, z.core.$strict>>;
|
|
478
513
|
type: z.ZodLiteral<"bearer">;
|
|
479
514
|
url: z.ZodString;
|
|
480
515
|
token: z.ZodString;
|
|
481
516
|
}, 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">;
|
|
517
|
+
via: z.ZodOptional<z.ZodString>;
|
|
518
|
+
identity: z.ZodOptional<z.ZodObject<{
|
|
519
|
+
header: z.ZodString;
|
|
499
520
|
}, z.core.$strict>>;
|
|
521
|
+
type: z.ZodLiteral<"headers">;
|
|
522
|
+
url: z.ZodString;
|
|
523
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
500
524
|
}, z.core.$strict>], "type">;
|
|
501
525
|
}, z.core.$strict>;
|
|
502
526
|
export type CreateCredentialRequest = z.infer<typeof CreateCredentialRequestSchema>;
|
|
527
|
+
/**
|
|
528
|
+
* Replaces a credential's secret; its type and URL stay. `via` and `identity` are kept unless
|
|
529
|
+
* given (`null` removes one).
|
|
530
|
+
*/
|
|
503
531
|
export declare const RotateCredentialRequestSchema: z.ZodObject<{
|
|
504
532
|
requestId: z.ZodString;
|
|
505
533
|
idempotencyKey: z.ZodString;
|
|
506
534
|
auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
535
|
+
via: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
536
|
+
identity: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
537
|
+
header: z.ZodString;
|
|
538
|
+
}, z.core.$strict>>>;
|
|
507
539
|
type: z.ZodLiteral<"bearer">;
|
|
508
540
|
token: z.ZodString;
|
|
509
541
|
}, z.core.$strict>, z.ZodObject<{
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
542
|
+
via: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
543
|
+
identity: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
544
|
+
header: z.ZodString;
|
|
545
|
+
}, z.core.$strict>>>;
|
|
546
|
+
type: z.ZodLiteral<"headers">;
|
|
547
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
513
548
|
}, z.core.$strict>], "type">;
|
|
514
549
|
}, z.core.$strict>;
|
|
515
550
|
export type RotateCredentialRequest = z.infer<typeof RotateCredentialRequestSchema>;
|
|
@@ -582,16 +617,80 @@ export declare const CredentialInfoSchema: z.ZodObject<{
|
|
|
582
617
|
name: z.ZodString;
|
|
583
618
|
type: z.ZodEnum<{
|
|
584
619
|
bearer: "bearer";
|
|
585
|
-
|
|
620
|
+
headers: "headers";
|
|
586
621
|
}>;
|
|
587
622
|
binding: z.ZodObject<{
|
|
588
623
|
url: z.ZodString;
|
|
589
624
|
}, z.core.$strict>;
|
|
590
|
-
|
|
625
|
+
headerNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
626
|
+
via: z.ZodOptional<z.ZodString>;
|
|
627
|
+
identity: z.ZodOptional<z.ZodObject<{
|
|
628
|
+
header: z.ZodString;
|
|
629
|
+
}, z.core.$strict>>;
|
|
591
630
|
createdAt: z.ZodString;
|
|
592
631
|
rotatedAt: z.ZodOptional<z.ZodString>;
|
|
593
632
|
}, z.core.$strict>;
|
|
594
633
|
export type CredentialInfo = z.infer<typeof CredentialInfoSchema>;
|
|
634
|
+
/** The MCP transports a preview speaks: a manifest's remote server types. */
|
|
635
|
+
export declare const MCP_PREVIEW_TYPES: readonly ["streamable-http", "sse"];
|
|
636
|
+
/**
|
|
637
|
+
* `POST /v1/tenant/mcp/preview` (R2b C12): what a remote MCP server offers, before an agent
|
|
638
|
+
* names it. The Runtime connects with the installation vault's credential for `url` (one
|
|
639
|
+
* credential across the installation vaults, or the one in `vaultId`), lists the tools and
|
|
640
|
+
* closes the connection; it never calls a tool.
|
|
641
|
+
*/
|
|
642
|
+
export declare const McpPreviewRequestSchema: z.ZodObject<{
|
|
643
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
644
|
+
url: z.ZodString;
|
|
645
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
646
|
+
sse: "sse";
|
|
647
|
+
"streamable-http": "streamable-http";
|
|
648
|
+
}>>;
|
|
649
|
+
name: z.ZodOptional<z.ZodString>;
|
|
650
|
+
vaultId: z.ZodOptional<z.ZodString>;
|
|
651
|
+
}, z.core.$strict>;
|
|
652
|
+
export type McpPreviewRequest = z.infer<typeof McpPreviewRequestSchema>;
|
|
653
|
+
/** One tool a preview found. */
|
|
654
|
+
export declare const McpPreviewToolSchema: z.ZodObject<{
|
|
655
|
+
serverToolName: z.ZodString;
|
|
656
|
+
modelName: z.ZodOptional<z.ZodString>;
|
|
657
|
+
description: z.ZodOptional<z.ZodString>;
|
|
658
|
+
annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
659
|
+
schemaBytes: z.ZodNumber;
|
|
660
|
+
}, z.core.$strict>;
|
|
661
|
+
export type McpPreviewTool = z.infer<typeof McpPreviewToolSchema>;
|
|
662
|
+
/**
|
|
663
|
+
* A preview (R2b C12). A server that answered `401` is `authRequired`, with its RFC 9728
|
|
664
|
+
* protected-resource metadata when it publishes any: it needs a person's sign-in or a key the
|
|
665
|
+
* installation vaults do not hold, so reach it with a key or through a gateway (`via`).
|
|
666
|
+
*/
|
|
667
|
+
export declare const McpPreviewSchema: z.ZodObject<{
|
|
668
|
+
name: z.ZodString;
|
|
669
|
+
url: z.ZodString;
|
|
670
|
+
type: z.ZodEnum<{
|
|
671
|
+
sse: "sse";
|
|
672
|
+
"streamable-http": "streamable-http";
|
|
673
|
+
}>;
|
|
674
|
+
credentialSent: z.ZodBoolean;
|
|
675
|
+
serverInfo: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
676
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
677
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
678
|
+
serverToolName: z.ZodString;
|
|
679
|
+
modelName: z.ZodOptional<z.ZodString>;
|
|
680
|
+
description: z.ZodOptional<z.ZodString>;
|
|
681
|
+
annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
682
|
+
schemaBytes: z.ZodNumber;
|
|
683
|
+
}, z.core.$strict>>;
|
|
684
|
+
renamed: z.ZodArray<z.ZodObject<{
|
|
685
|
+
serverToolName: z.ZodString;
|
|
686
|
+
name: z.ZodString;
|
|
687
|
+
}, z.core.$strict>>;
|
|
688
|
+
authRequired: z.ZodOptional<z.ZodObject<{
|
|
689
|
+
resourceMetadataUrl: z.ZodOptional<z.ZodString>;
|
|
690
|
+
resourceMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
691
|
+
}, z.core.$strict>>;
|
|
692
|
+
}, z.core.$strict>;
|
|
693
|
+
export type McpPreview = z.infer<typeof McpPreviewSchema>;
|
|
595
694
|
/** The most parts one message may carry (protocol 6). */
|
|
596
695
|
export declare const MAX_MESSAGE_PARTS = 32;
|
|
597
696
|
/**
|
|
@@ -901,6 +1000,7 @@ export declare const RejectedResponseSchema: z.ZodObject<{
|
|
|
901
1000
|
code: z.ZodEnum<{
|
|
902
1001
|
connection_missing: "connection_missing";
|
|
903
1002
|
credential_invalid: "credential_invalid";
|
|
1003
|
+
credential_rejected: "credential_rejected";
|
|
904
1004
|
credential_required: "credential_required";
|
|
905
1005
|
definition_files_missing: "definition_files_missing";
|
|
906
1006
|
host_rejected: "host_rejected";
|
|
@@ -910,10 +1010,8 @@ export declare const RejectedResponseSchema: z.ZodObject<{
|
|
|
910
1010
|
issuer_unavailable: "issuer_unavailable";
|
|
911
1011
|
key_role_mismatch: "key_role_mismatch";
|
|
912
1012
|
limit_exceeded: "limit_exceeded";
|
|
1013
|
+
mcp_preview_failed: "mcp_preview_failed";
|
|
913
1014
|
not_found: "not_found";
|
|
914
|
-
oauth_client_required: "oauth_client_required";
|
|
915
|
-
oauth_failed: "oauth_failed";
|
|
916
|
-
oauth_state_invalid: "oauth_state_invalid";
|
|
917
1015
|
origin_rejected: "origin_rejected";
|
|
918
1016
|
placement_refused: "placement_refused";
|
|
919
1017
|
protocol_unsupported: "protocol_unsupported";
|
|
@@ -1013,7 +1111,14 @@ export declare const ToolCompletedPayloadSchema: z.ZodObject<{
|
|
|
1013
1111
|
error: z.ZodOptional<z.ZodObject<{
|
|
1014
1112
|
code: z.ZodString;
|
|
1015
1113
|
message: z.ZodString;
|
|
1114
|
+
server: z.ZodOptional<z.ZodString>;
|
|
1115
|
+
vault: z.ZodOptional<z.ZodEnum<{
|
|
1116
|
+
installation: "installation";
|
|
1117
|
+
user: "user";
|
|
1118
|
+
}>>;
|
|
1119
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
1016
1120
|
}, z.core.$loose>>;
|
|
1121
|
+
redacted: z.ZodOptional<z.ZodNumber>;
|
|
1017
1122
|
}, z.core.$loose>;
|
|
1018
1123
|
export declare const EffectUncertainPayloadSchema: z.ZodObject<{
|
|
1019
1124
|
effectId: z.ZodString;
|
|
@@ -1113,7 +1218,14 @@ declare const TRANSCRIPT_PAYLOADS: {
|
|
|
1113
1218
|
error: z.ZodOptional<z.ZodObject<{
|
|
1114
1219
|
code: z.ZodString;
|
|
1115
1220
|
message: z.ZodString;
|
|
1221
|
+
server: z.ZodOptional<z.ZodString>;
|
|
1222
|
+
vault: z.ZodOptional<z.ZodEnum<{
|
|
1223
|
+
installation: "installation";
|
|
1224
|
+
user: "user";
|
|
1225
|
+
}>>;
|
|
1226
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
1116
1227
|
}, z.core.$loose>>;
|
|
1228
|
+
redacted: z.ZodOptional<z.ZodNumber>;
|
|
1117
1229
|
}, z.core.$loose>;
|
|
1118
1230
|
readonly "effect.uncertain": z.ZodObject<{
|
|
1119
1231
|
effectId: z.ZodString;
|
|
@@ -1363,7 +1475,14 @@ export declare const McpServerOutcomeSchema: z.ZodObject<{
|
|
|
1363
1475
|
}>;
|
|
1364
1476
|
message: z.ZodString;
|
|
1365
1477
|
tools: z.ZodNumber;
|
|
1478
|
+
deferred: z.ZodOptional<z.ZodNumber>;
|
|
1479
|
+
disabled: z.ZodOptional<z.ZodNumber>;
|
|
1480
|
+
unknownTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1366
1481
|
credentialIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1482
|
+
renamed: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1483
|
+
serverToolName: z.ZodString;
|
|
1484
|
+
name: z.ZodString;
|
|
1485
|
+
}, z.core.$loose>>>;
|
|
1367
1486
|
}, z.core.$loose>;
|
|
1368
1487
|
export type McpServerOutcome = z.infer<typeof McpServerOutcomeSchema>;
|
|
1369
1488
|
/**
|
|
@@ -1383,7 +1502,14 @@ export declare const McpDiscoveredPayloadSchema: z.ZodObject<{
|
|
|
1383
1502
|
}>;
|
|
1384
1503
|
message: z.ZodString;
|
|
1385
1504
|
tools: z.ZodNumber;
|
|
1505
|
+
deferred: z.ZodOptional<z.ZodNumber>;
|
|
1506
|
+
disabled: z.ZodOptional<z.ZodNumber>;
|
|
1507
|
+
unknownTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1386
1508
|
credentialIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1509
|
+
renamed: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1510
|
+
serverToolName: z.ZodString;
|
|
1511
|
+
name: z.ZodString;
|
|
1512
|
+
}, z.core.$loose>>>;
|
|
1387
1513
|
}, z.core.$loose>>;
|
|
1388
1514
|
}, z.core.$loose>;
|
|
1389
1515
|
/**
|
|
@@ -1551,7 +1677,14 @@ export declare const EVENT_CATALOG: {
|
|
|
1551
1677
|
error: z.ZodOptional<z.ZodObject<{
|
|
1552
1678
|
code: z.ZodString;
|
|
1553
1679
|
message: z.ZodString;
|
|
1680
|
+
server: z.ZodOptional<z.ZodString>;
|
|
1681
|
+
vault: z.ZodOptional<z.ZodEnum<{
|
|
1682
|
+
installation: "installation";
|
|
1683
|
+
user: "user";
|
|
1684
|
+
}>>;
|
|
1685
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
1554
1686
|
}, z.core.$loose>>;
|
|
1687
|
+
redacted: z.ZodOptional<z.ZodNumber>;
|
|
1555
1688
|
}, z.core.$loose>;
|
|
1556
1689
|
readonly source: "loop";
|
|
1557
1690
|
readonly version: 1;
|
|
@@ -1601,7 +1734,14 @@ export declare const EVENT_CATALOG: {
|
|
|
1601
1734
|
}>;
|
|
1602
1735
|
message: z.ZodString;
|
|
1603
1736
|
tools: z.ZodNumber;
|
|
1737
|
+
deferred: z.ZodOptional<z.ZodNumber>;
|
|
1738
|
+
disabled: z.ZodOptional<z.ZodNumber>;
|
|
1739
|
+
unknownTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1604
1740
|
credentialIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1741
|
+
renamed: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1742
|
+
serverToolName: z.ZodString;
|
|
1743
|
+
name: z.ZodString;
|
|
1744
|
+
}, z.core.$loose>>>;
|
|
1605
1745
|
}, z.core.$loose>>;
|
|
1606
1746
|
}, z.core.$loose>;
|
|
1607
1747
|
readonly source: "loop";
|
|
@@ -2449,6 +2589,7 @@ export declare const SessionViewSchema: z.ZodObject<{
|
|
|
2449
2589
|
agentId: z.ZodString;
|
|
2450
2590
|
ownerUserId: z.ZodString;
|
|
2451
2591
|
manifestHash: z.ZodString;
|
|
2592
|
+
definitionHash: z.ZodOptional<z.ZodString>;
|
|
2452
2593
|
implementationVersion: z.ZodString;
|
|
2453
2594
|
status: z.ZodEnum<{
|
|
2454
2595
|
cancelled: "cancelled";
|
|
@@ -2788,35 +2929,21 @@ export declare const ListCredentialsResponseSchema: z.ZodObject<{
|
|
|
2788
2929
|
name: z.ZodString;
|
|
2789
2930
|
type: z.ZodEnum<{
|
|
2790
2931
|
bearer: "bearer";
|
|
2791
|
-
|
|
2932
|
+
headers: "headers";
|
|
2792
2933
|
}>;
|
|
2793
2934
|
binding: z.ZodObject<{
|
|
2794
2935
|
url: z.ZodString;
|
|
2795
2936
|
}, z.core.$strict>;
|
|
2796
|
-
|
|
2937
|
+
headerNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2938
|
+
via: z.ZodOptional<z.ZodString>;
|
|
2939
|
+
identity: z.ZodOptional<z.ZodObject<{
|
|
2940
|
+
header: z.ZodString;
|
|
2941
|
+
}, z.core.$strict>>;
|
|
2797
2942
|
createdAt: z.ZodString;
|
|
2798
2943
|
rotatedAt: z.ZodOptional<z.ZodString>;
|
|
2799
2944
|
}, z.core.$strict>>;
|
|
2800
2945
|
}, z.core.$strict>;
|
|
2801
2946
|
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
2947
|
/** A deleted vault or credential. */
|
|
2821
2948
|
export declare const DeletedResponseSchema: z.ZodObject<{
|
|
2822
2949
|
id: z.ZodString;
|
|
@@ -2839,6 +2966,7 @@ export type StreamClosedFrame = z.infer<typeof StreamClosedFrameSchema>;
|
|
|
2839
2966
|
export declare const AgUiRunErrorCodeSchema: z.ZodEnum<{
|
|
2840
2967
|
connection_missing: "connection_missing";
|
|
2841
2968
|
credential_invalid: "credential_invalid";
|
|
2969
|
+
credential_rejected: "credential_rejected";
|
|
2842
2970
|
credential_required: "credential_required";
|
|
2843
2971
|
definition_files_missing: "definition_files_missing";
|
|
2844
2972
|
host_rejected: "host_rejected";
|
|
@@ -2848,10 +2976,8 @@ export declare const AgUiRunErrorCodeSchema: z.ZodEnum<{
|
|
|
2848
2976
|
issuer_unavailable: "issuer_unavailable";
|
|
2849
2977
|
key_role_mismatch: "key_role_mismatch";
|
|
2850
2978
|
limit_exceeded: "limit_exceeded";
|
|
2979
|
+
mcp_preview_failed: "mcp_preview_failed";
|
|
2851
2980
|
not_found: "not_found";
|
|
2852
|
-
oauth_client_required: "oauth_client_required";
|
|
2853
|
-
oauth_failed: "oauth_failed";
|
|
2854
|
-
oauth_state_invalid: "oauth_state_invalid";
|
|
2855
2981
|
origin_rejected: "origin_rejected";
|
|
2856
2982
|
placement_refused: "placement_refused";
|
|
2857
2983
|
protocol_unsupported: "protocol_unsupported";
|