@plurnk/plurnk-mcp 1.6.1 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.defaults +31 -4
- package/README.md +161 -42
- package/SPEC.md +486 -28
- package/dist/McpExecutor.d.ts +28 -5
- package/dist/McpExecutor.d.ts.map +1 -1
- package/dist/McpExecutor.js +144 -32
- package/dist/McpExecutor.js.map +1 -1
- package/dist/McpResources.d.ts +2 -2
- package/dist/McpResources.d.ts.map +1 -1
- package/dist/McpResources.js +114 -24
- package/dist/McpResources.js.map +1 -1
- package/dist/Module.d.ts +30 -5
- package/dist/Module.d.ts.map +1 -1
- package/dist/Module.js +857 -36
- package/dist/Module.js.map +1 -1
- package/dist/ToolPresentation.d.ts +7 -0
- package/dist/ToolPresentation.d.ts.map +1 -0
- package/dist/ToolPresentation.js +224 -0
- package/dist/ToolPresentation.js.map +1 -0
- package/dist/capabilityMatrix.d.ts +23 -0
- package/dist/capabilityMatrix.d.ts.map +1 -0
- package/dist/capabilityMatrix.js +403 -0
- package/dist/capabilityMatrix.js.map +1 -0
- package/dist/client.d.ts +27 -8
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +537 -91
- package/dist/client.js.map +1 -1
- package/dist/config.d.ts +14 -13
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +257 -51
- package/dist/config.js.map +1 -1
- package/dist/extensionChannel.d.ts +25 -0
- package/dist/extensionChannel.d.ts.map +1 -0
- package/dist/extensionChannel.js +195 -0
- package/dist/extensionChannel.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/inputRequired.d.ts +36 -0
- package/dist/inputRequired.d.ts.map +1 -0
- package/dist/inputRequired.js +171 -0
- package/dist/inputRequired.js.map +1 -0
- package/dist/mcp-watchdog.mjs +106 -0
- package/dist/oauth.d.ts +28 -0
- package/dist/oauth.d.ts.map +1 -0
- package/dist/oauth.js +149 -0
- package/dist/oauth.js.map +1 -0
- package/dist/protocol.d.ts +8 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +8 -0
- package/dist/protocol.js.map +1 -0
- package/dist/protocolHeaders.d.ts +4 -0
- package/dist/protocolHeaders.d.ts.map +1 -0
- package/dist/protocolHeaders.js +87 -0
- package/dist/protocolHeaders.js.map +1 -0
- package/dist/subscriptions.d.ts +15 -0
- package/dist/subscriptions.d.ts.map +1 -0
- package/dist/subscriptions.js +188 -0
- package/dist/subscriptions.js.map +1 -0
- package/dist/tasks.d.ts +19 -0
- package/dist/tasks.d.ts.map +1 -0
- package/dist/tasks.js +334 -0
- package/dist/tasks.js.map +1 -0
- package/package.json +12 -7
package/SPEC.md
CHANGED
|
@@ -1,18 +1,186 @@
|
|
|
1
1
|
# Plurnk MCP host specification
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## §mcp-role Host boundary
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Shell command parsing is not part of the contract.
|
|
10
|
-
- HTTP uses Streamable HTTP. There is no legacy SSE fallback.
|
|
11
|
-
- A connection or discovery failure leaves no registered runtime.
|
|
12
|
-
- Shutdown waits for every connection attempt to settle, then closes every
|
|
13
|
-
acquired connection and reports all close failures.
|
|
5
|
+
`@plurnk/plurnk-mcp` is an MCP **host/client** that projects trusted remote
|
|
6
|
+
servers into Plurnk. It does not implement an MCP server or authorization
|
|
7
|
+
server. Protocol mechanics remain inside this package; core sees ordinary
|
|
8
|
+
executor, resource, proposal, entry, Problem, and lifecycle contracts.
|
|
14
9
|
|
|
15
|
-
##
|
|
10
|
+
## §mcp-authority Protocol authority
|
|
11
|
+
|
|
12
|
+
The host's own wire authority is revision `2026-07-28`, specification commit
|
|
13
|
+
`5f5440bb26a62e2cf3440b92da5a667efa03b267`. The implementation exact-pins
|
|
14
|
+
`@modelcontextprotocol/client@2.0.0`. SDK exports are not protocol authority:
|
|
15
|
+
that package deliberately retains legacy and deprecated API shapes. It owns
|
|
16
|
+
core negotiation and transport; this package owns only exact-pinned extension
|
|
17
|
+
wire that the SDK does not yet implement.
|
|
18
|
+
|
|
19
|
+
Connection setup negotiates-and-degrades. A server that negotiates the pinned
|
|
20
|
+
revision and offers `server/discover` is a **modern** peer: it gets the complete
|
|
21
|
+
extension wire (the `_meta` envelope, `resultType`, the Tasks extension) and its
|
|
22
|
+
discover result is the identity and capability source. A server the SDK
|
|
23
|
+
negotiated below the pin is an ordinary MCP peer: it serves the standard
|
|
24
|
+
tool/resource/prompt surface from its `initialize` result at its negotiated
|
|
25
|
+
revision, and the host applies no envelope, discover, or Tasks requirements to
|
|
26
|
+
it. There is no rejection for offering an older supported revision and no
|
|
27
|
+
protocol downgrade of the host's own extension wire: modern peers and legacy
|
|
28
|
+
peers simply carry different surfaces.
|
|
29
|
+
|
|
30
|
+
The optional Tasks authority is the official `experimental-ext-tasks` contract
|
|
31
|
+
at commit `2c1425d9a288b9b1f489430fe1e00bb392b47e48`. It is negotiated
|
|
32
|
+
per-connection and absent from a legacy peer.
|
|
33
|
+
|
|
34
|
+
## §mcp-core-matrix Core capability matrix
|
|
35
|
+
|
|
36
|
+
The accountable capability matrix lives in `capabilityMatrix.ts`
|
|
37
|
+
({§mcp-capability-matrix}); this section states the core surface contract the
|
|
38
|
+
matrix rows cite.
|
|
39
|
+
|
|
40
|
+
| Surface | Upstream contract | Plurnk host disposition |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| Base | JSON-RPC 2.0; per-request protocol, identity, and capability metadata; every result has `resultType` | Require the modern envelope and preserve protocol results and errors without reconstructing them |
|
|
43
|
+
| Discovery | Servers implement `server/discover` | Probe before registration; retain identity, instructions, capabilities, versions, and cache hints |
|
|
44
|
+
| Tools | Negotiated server capability: `tools/list`, `tools/call` | Build one operator-filtered exact Registry snapshot at setup; route only its enabled names without renaming them |
|
|
45
|
+
| Resources | Negotiated server capability: `resources/list`, `resources/templates/list`, `resources/read` | Publish catalogs, templates, and materialized contents through the server's resource authority |
|
|
46
|
+
| Prompts | Negotiated server capability: `prompts/list`, `prompts/get` | Publish prompt definitions and retrieve prompt messages through the same server authority |
|
|
47
|
+
| Completion | Negotiated server capability: `completion/complete` | Make prompt and resource-template completion available to the host interaction that owns the argument |
|
|
48
|
+
| Pagination | Opaque cursors on list methods | Drain every page with a finite non-convergence guard; never publish a partial catalog as complete |
|
|
49
|
+
| Caching | `server/discover`, list methods, and `resources/read` carry `ttlMs` and `cacheScope` | Honor freshness and notification invalidation; partition private entries by authorization context |
|
|
50
|
+
| Subscriptions | `subscriptions/listen` plus acknowledged filters and correlated notifications | Keep one current filter for list changes, resource URIs read into cache, and active Task IDs; overlap filter replacement, re-listen after loss, and never use the removed resource subscription methods |
|
|
51
|
+
| Progress | Request-scoped `notifications/progress` | Project progress onto the owning Plurnk operation without creating an independent protocol lifecycle |
|
|
52
|
+
| Cancellation | Per-request stream closure on HTTP; `notifications/cancelled` on stdio | Drive cancellation from the owning Plurnk abort signal and settle the same operation |
|
|
53
|
+
| MRTR | `input_required` on `tools/call`, `resources/read`, or `prompts/get` | Fulfill supported input requests, echo opaque `requestState` byte-for-byte, and retry only the originating request with a fresh JSON-RPC ID |
|
|
54
|
+
| Elicitation | Active client capability carried through MRTR | Advertise supported form/URL modes and route the request through Plurnk's client-owned interaction lifecycle |
|
|
55
|
+
| Authorization | OAuth profile for HTTP transports | Require validated protected-resource and authorization-server metadata; never infer endpoints; use PKCE, issuer validation, resource indicators, refresh, and bounded scope escalation; never apply OAuth to stdio |
|
|
56
|
+
|
|
57
|
+
## §mcp-tasks Tasks extension
|
|
58
|
+
|
|
59
|
+
Tasks is the optional `io.modelcontextprotocol/tasks` extension, never core
|
|
60
|
+
conformance. Plurnk advertises it only when its complete lifecycle is active.
|
|
61
|
+
The server may return an unsolicited `resultType: "task"` handle from
|
|
62
|
+
`tools/call`; the host then uses `tasks/get`, `tasks/update`, and
|
|
63
|
+
`tasks/cancel`. `tasks/get` carries status, outstanding input, and the terminal
|
|
64
|
+
result or protocol error. Task notifications, when selected, use the unified
|
|
65
|
+
subscription stream. `tasks/list`, `tasks/result`, and per-call task opt-in do
|
|
66
|
+
not exist in this revision.
|
|
67
|
+
|
|
68
|
+
Polling honors each current `pollIntervalMs` under the one owning operation
|
|
69
|
+
deadline. Task input keys are fulfilled at most once, in one atomic client
|
|
70
|
+
interaction per observed input set. A completed Task is validated as the
|
|
71
|
+
originating tool result; a failed Task preserves its JSON-RPC error.
|
|
72
|
+
Handle ownership and the restart journey are bounded in {§tasks-lifetime}.
|
|
73
|
+
|
|
74
|
+
## §tasks-lifetime Tasks lifetime and re-run
|
|
75
|
+
|
|
76
|
+
Task handles are owned in-process by the connection and operation that created
|
|
77
|
+
them; Plurnk deliberately declines durable task-handle recovery. A durable
|
|
78
|
+
handle would need a persisted scheduler and a home for a result whose owning
|
|
79
|
+
operation does not outlive the daemon; the ordinary Plurnk journey is that a
|
|
80
|
+
restart re-runs the operation, which drives a fresh task. The server's own
|
|
81
|
+
persistence of task state is respected only within one connection lifetime;
|
|
82
|
+
nothing task-shaped is written to SQLite and no MCP sidecar lifecycle exists.
|
|
83
|
+
|
|
84
|
+
| Boundary | Behaviour |
|
|
85
|
+
|---|---|
|
|
86
|
+
| Client disconnect | The daemon-owned operation and its task keep running; the client reattaches to the operation, not the task. |
|
|
87
|
+
| Daemon restart | The connection and every in-flight task handle die with it; the tool call fails like any interrupted operation, the loop re-runs, and the tool call creates a fresh task. |
|
|
88
|
+
| Workspace reattachment | The attachment reconstructs from its durable definition; in-flight tasks on the replaced connection are abandoned, not resumed. |
|
|
89
|
+
| Expiry | The owning operation deadline bounds polling; a non-converging task fails at the standard round bound and is cancelled. |
|
|
90
|
+
| Cancellation | Owner abort cancels the task before settling; the handle is then terminal. |
|
|
91
|
+
| Already terminal | Terminal results and errors are consumed by the drive loop; a completed or failed task is never re-polled or re-resumed. |
|
|
92
|
+
|
|
93
|
+
## §mcp-exclusions Removed, deprecated, and excluded surfaces
|
|
94
|
+
|
|
95
|
+
| Classification | Surfaces | Disposition |
|
|
96
|
+
|---|---|---|
|
|
97
|
+
| Deprecated | Roots, Sampling, Logging | Do not advertise or implement; use explicit resources/tool arguments, Plurnk's provider layer, and stderr/OpenTelemetry respectively |
|
|
98
|
+
| Deprecated | HTTP+SSE transport; Sampling `includeContext` values | Do not adopt; use Streamable HTTP and no Sampling |
|
|
99
|
+
| Deprecated fallback | OAuth Dynamic Client Registration | Prefer pre-registration, then CIMD when advertised; use DCR only when authorization-server metadata advertises `registration_endpoint`; otherwise fail without probing an inferred endpoint |
|
|
100
|
+
| Removed | `initialize`, `notifications/initialized`, `Mcp-Session-Id`, HTTP GET event stream | Reject the legacy lifecycle; every request is stateless and self-contained |
|
|
101
|
+
| Removed | `ping`, `logging/setLevel`, `notifications/roots/list_changed` | Do not send, handle, or teach |
|
|
102
|
+
| Removed | `resources/subscribe`, `resources/unsubscribe`, SSE resumption and `Last-Event-ID` | Use `subscriptions/listen`; reissue a lost request with a new ID |
|
|
103
|
+
| Removed | Legacy Tasks `tasks/list`, `tasks/result`, and task-augmentation request fields | Use only the negotiated final Tasks extension |
|
|
104
|
+
| Excluded | Other official, experimental, or private extensions | Require a separately owned contract before negotiation |
|
|
105
|
+
| Excluded | Dual-era operation | Modern peers and legacy peers carry different surfaces; the host never mixes the two on one connection |
|
|
106
|
+
| Excluded | MCP server and authorization-server roles | This package is the host/client only |
|
|
107
|
+
|
|
108
|
+
## §mcp-capability-matrix Accountable capability matrix
|
|
109
|
+
|
|
110
|
+
`capabilityMatrix.ts` is the one accountable support matrix: one row per core
|
|
111
|
+
surface, official extension, or explicitly selected experimental candidate,
|
|
112
|
+
carrying authority, disposition (supported, partial, excluded, deferred),
|
|
113
|
+
advertisement, interactivity, and evidence citations. Rows are "supported"
|
|
114
|
+
only when every layer their owning contract includes has real coverage; a row
|
|
115
|
+
cannot claim support merely because the direct SDK or conformance path passes.
|
|
116
|
+
Every evidence citation must resolve through a named specification tag or a
|
|
117
|
+
named composed test.
|
|
118
|
+
|
|
119
|
+
The static wire advertisement is derived from the matrix by construction
|
|
120
|
+
(`staticClientCapabilities`): an extension reaches the wire only because its
|
|
121
|
+
row says `always`, and a `conditional` extension is added only by its owning
|
|
122
|
+
connection logic ({§oauth-client-credentials}). The matrix unit tests enforce
|
|
123
|
+
unique identities, no excluded row advertising, supported rows citing evidence,
|
|
124
|
+
composed coverage for interactive advertised rows, and exact reconciliation
|
|
125
|
+
between the matrix and the derived advertisement. Official required
|
|
126
|
+
conformance stays a separate named gate, never folded into a matrix row.
|
|
127
|
+
|
|
128
|
+
## §mcp-transports Transport bindings
|
|
129
|
+
|
|
130
|
+
| Binding | Contract |
|
|
131
|
+
|---|---|
|
|
132
|
+
| stdio | Spawn one exact executable with an explicit argument array and no shell; newline-delimited JSON-RPC is the only stdout/stdin traffic; stderr is diagnostic; shutdown closes stdin, waits, then terminates if necessary |
|
|
133
|
+
| Streamable HTTP | Send one POST per request or notification; accept JSON or SSE responses; close the response stream to cancel; never open the removed general GET stream |
|
|
134
|
+
|
|
135
|
+
§mcp-stdio-process-ownership A stdio connection owns the complete process group
|
|
136
|
+
created for its server. Ordinary closure forwards stdin EOF and permits a
|
|
137
|
+
bounded graceful exit; an expired shutdown bound or disappearance of the host
|
|
138
|
+
process forcibly terminates the group, including descendants.
|
|
139
|
+
|
|
140
|
+
Every HTTP request carries matching `MCP-Protocol-Version` and `Mcp-Method`
|
|
141
|
+
headers. Named requests also carry `Mcp-Name`; declared primitive tool
|
|
142
|
+
parameters carry validated `Mcp-Param-*` headers. Header names compare
|
|
143
|
+
case-insensitively, and body/header disagreement fails instead of guessing.
|
|
144
|
+
For `tasks/get`, `tasks/update`, and `tasks/cancel`, `Mcp-Name` is the encoded
|
|
145
|
+
`taskId` required by the Tasks extension.
|
|
146
|
+
|
|
147
|
+
## §mcp-errors Error allocation
|
|
148
|
+
|
|
149
|
+
| Condition | Code and boundary |
|
|
150
|
+
|---|---|
|
|
151
|
+
| Standard JSON-RPC parse/request/method/params/internal failures | `-32700`, `-32600`, `-32601`, `-32602`, `-32603` |
|
|
152
|
+
| Missing resource or task handle | `-32602` |
|
|
153
|
+
| Tasks extension capability absent | `-32003` |
|
|
154
|
+
| Header/body mismatch | `-32020` `HeaderMismatch`; HTTP 400 |
|
|
155
|
+
| Required client capability absent | `-32021` `MissingRequiredClientCapability`; HTTP 400 where applicable |
|
|
156
|
+
| Protocol revision unsupported | `-32022` `UnsupportedProtocolVersion`; HTTP 400 |
|
|
157
|
+
| Server-private errors | `-32000` through `-32019` only |
|
|
158
|
+
| Future MCP-reserved errors | `-32020` through `-32099` only as assigned by the protocol |
|
|
159
|
+
|
|
160
|
+
A tool-level `isError: true` result is a completed tool result, not a JSON-RPC
|
|
161
|
+
failure. A failed Task carries its originating JSON-RPC error; a Task wrapping
|
|
162
|
+
a tool-level error completes with that tool result. Plurnk preserves the
|
|
163
|
+
originating distinction in its canonical Problem/result path.
|
|
164
|
+
|
|
165
|
+
## §mcp-configuration Configuration
|
|
166
|
+
|
|
167
|
+
Service configuration and workspace state produce one available set and one
|
|
168
|
+
enabled subset per workspace. Every `PLURNK_MCP_<server>` declares an available
|
|
169
|
+
service-owned definition. `PLURNK_MCP_ENABLED` names the exact subset enabled
|
|
170
|
+
when a workspace has no override. Workspace state may positively override a
|
|
171
|
+
service definition's enabledness or own an added definition and its enabledness.
|
|
172
|
+
Disabled definitions remain client-visible but contribute no connection,
|
|
173
|
+
Registry, documentation, or resource authority.
|
|
174
|
+
|
|
175
|
+
§mcp-hydration-isolation **Cold endpoint failure is capability-local.** Invalid
|
|
176
|
+
service configuration or durable state fails admission, but an enabled server
|
|
177
|
+
that cannot connect or complete discovery during workspace hydration remains
|
|
178
|
+
enabled and client-visible as `unavailable`. It publishes no runtime, tools,
|
|
179
|
+
resources, or documentation and cannot prevent other capabilities or the daemon
|
|
180
|
+
from starting. Enabling that already-enabled alias is an explicit reconnect
|
|
181
|
+
attempt; failure preserves the unavailable snapshot, while success atomically
|
|
182
|
+
replaces it. Interactive add and enable mutations continue to reject an
|
|
183
|
+
unavailable candidate without changing durable state.
|
|
16
184
|
|
|
17
185
|
| Variable | Contract |
|
|
18
186
|
|---|---|
|
|
@@ -20,29 +188,319 @@
|
|
|
20
188
|
| `PLURNK_MCP_<server>_ARGS` | JSON string array for stdio |
|
|
21
189
|
| `PLURNK_MCP_<server>_CWD` | Working directory for stdio |
|
|
22
190
|
| `PLURNK_MCP_<server>_ENV` | JSON string map for stdio |
|
|
23
|
-
| `PLURNK_MCP_<server>
|
|
191
|
+
| `PLURNK_MCP_<server>_BEARER` | HTTP bearer credential; use `${TOKEN}` expansion to retain the authoritative environment value |
|
|
192
|
+
| `PLURNK_MCP_<server>_HEADERS` | JSON string map for supplementary HTTP headers |
|
|
193
|
+
| `PLURNK_MCP_<server>_TOOLS` | Optional JSON array of exact enabled tool names; absent enables all listed server tools, while `[]` enables none |
|
|
194
|
+
| `PLURNK_MCP_<server>_READ` | JSON string array forming an exact subset of enabled tools that the operator classifies as read-only; every other enabled tool retains the conservative `host` effect |
|
|
195
|
+
| `PLURNK_MCP_<server>_SUMMARY` | Authored one-line server orientation ({§mcp-summary-derivation}) |
|
|
196
|
+
| `PLURNK_MCP_<server>_<tool>_SUMMARY` | Authored one-line tool orientation; tool names fold the same way and may contain underscores |
|
|
197
|
+
| `PLURNK_MCP_ENABLED` | JSON array of exact configured server aliases enabled by default; absent or `[]` enables none |
|
|
198
|
+
| `PLURNK_MCP_EXPANDED` | JSON array subset of enabled servers whose complete tool tree also expands into the turn-0 tools survey ({§tools-resource-materialization}); absent or `[]` expands none |
|
|
24
199
|
| `PLURNK_MCP_CONNECT_TIMEOUT` | Positive integer milliseconds |
|
|
25
200
|
| `PLURNK_MCP_REQUEST_TIMEOUT` | Positive integer milliseconds |
|
|
26
201
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
202
|
+
Configured server names match `[a-z][a-z0-9-]*` after case-folding and share
|
|
203
|
+
the executor and URI-authority namespace. Duplicate names, reserved-name
|
|
204
|
+
collisions, orphan companions, wrong-transport companions, missing environment
|
|
205
|
+
references, and invalid JSON fail startup. A stdio target is one exact
|
|
206
|
+
executable string even when its path contains whitespace; arguments never hide
|
|
207
|
+
inside it. Bearer authentication and a case-insensitive `Authorization` entry
|
|
208
|
+
in `_HEADERS` are mutually exclusive.
|
|
209
|
+
|
|
210
|
+
§mcp-summary-derivation **Every orientation line derives from authored
|
|
211
|
+
metadata — never a container template.** The runtime declaration's summary
|
|
212
|
+
resolves in order: the `_SUMMARY` companion, the server's own
|
|
213
|
+
`serverInfo.description`, its display `title` (both spec metadata — a title
|
|
214
|
+
like "Chrome DevTools MCP server" is already a one-liner), the first sentence
|
|
215
|
+
of its `instructions` essay, then a factual tool-name list. Each tool's one-liner
|
|
216
|
+
resolves: its `_<server>_<tool>_SUMMARY` companion, `annotations.title`, the
|
|
217
|
+
first sentence of its `description` (capped), then the tool name. The family
|
|
218
|
+
doc's Summary section and the survey row carry the server one-liner; the tool
|
|
219
|
+
doc's Summary section IS the invocation form
|
|
220
|
+
`EXEC [server] (tool) <!-- one-liner -->`, so the discovery row teaches the
|
|
221
|
+
call ({§tools-resource-materialization}). Summary companions expand `${NAME}`
|
|
222
|
+
references like every other companion.
|
|
223
|
+
|
|
224
|
+
§mcp-definition-wire The contracts-owned `McpServerDefinition` JSON Schema is
|
|
225
|
+
the normalized durable definition shape. It is a closed discriminated union:
|
|
226
|
+
|
|
227
|
+
| Transport / authorization | Required definition | Optional definition |
|
|
228
|
+
|---|---|---|
|
|
229
|
+
| `stdio` | `name`, `transport`, `command` | `args`, `cwd`, `env`, `tools`, `read` |
|
|
230
|
+
| `http` + none | `name`, `transport`, `url` | `headers`, `tools`, `read` |
|
|
231
|
+
| `http` + bearer | above plus `authorization: { type: "bearer", token: "${NAME}" }` | — |
|
|
232
|
+
| `http` + interactive OAuth / CIMD preferred | above plus `authorization: { type: "oauth", redirectUrl, clientMetadataUrl }` | `scope`; DCR remains the server-advertised fallback when CIMD is unavailable |
|
|
233
|
+
| `http` + interactive OAuth / pre-registered | above plus `authorization: { type: "oauth", redirectUrl, clientId, clientSecret: "${NAME}" }` | `scope` |
|
|
234
|
+
| `http` + interactive OAuth / DCR fallback only | above plus `authorization: { type: "oauth", redirectUrl }` | `scope` |
|
|
235
|
+
| `http` + client credentials | above plus `authorization: { type: "client-credentials", clientId, clientSecret: "${NAME}" }` | `scope`; `issuer` binds the credential to its authorization server ({§oauth-client-credentials}) |
|
|
236
|
+
|
|
237
|
+
`tools` absent enables the complete listed set; `[]` enables none. `read` is an
|
|
238
|
+
exact subset of the enabled set. A credential field is one complete symbolic
|
|
239
|
+
environment reference, not a copied token. Other string-valued `headers`,
|
|
240
|
+
`env`, `cwd`, and argument values may contain symbolic references and are
|
|
241
|
+
expanded only while preparing a connection. The unexpanded definition is the
|
|
242
|
+
only durable form. Interactive OAuth tokens, PKCE verifier, issuer-bound
|
|
243
|
+
discovery state, and authorization callback state remain process-memory
|
|
244
|
+
credentials; a restart reconstructs the attachment as authorization-required
|
|
245
|
+
instead of writing secrets into SQLite.
|
|
246
|
+
|
|
247
|
+
The contracts-owned `McpServerOptions` schema is the closed supplement accepted
|
|
248
|
+
by `workspace.mcp.add` and customized enable. It may contain `args`, `cwd`,
|
|
249
|
+
`env`, `headers`, `authorization`, `tools`, and `read`; it cannot repeat alias,
|
|
250
|
+
target, or transport. An absolute HTTP(S) target selects Streamable HTTP. Every
|
|
251
|
+
other target is one exact stdio executable. The normalized definition rejects
|
|
252
|
+
transport-inapplicable options before any connection work.
|
|
253
|
+
|
|
254
|
+
§mcp-configuration-cascade MCP server configuration has one field-wise
|
|
255
|
+
precedence order: service environment, durable workspace specialization,
|
|
256
|
+
client configuration overlay, then explicit action options. Arrays and maps
|
|
257
|
+
replace their lower value instead of appending or merging. A client-supplied
|
|
258
|
+
target replaces the complete lower definition before its companion variables
|
|
259
|
+
apply; a companion without a client target specializes the lower definition.
|
|
260
|
+
The contracts-owned `{§mcp-configuration-overlay}` is parsed by the same owner
|
|
261
|
+
and path as service environment declarations. It carries no service controls,
|
|
262
|
+
does not activate a server, and is never persisted as raw environment syntax.
|
|
263
|
+
A successful customized enable persists one complete, normalized, unexpanded
|
|
264
|
+
workspace definition. Thus later enablement needs neither the originating
|
|
265
|
+
client nor its configuration file, and symbolic credentials remain resolvable
|
|
266
|
+
only by the service at connection preparation.
|
|
267
|
+
|
|
268
|
+
### §mcp-management-actions Workspace management
|
|
30
269
|
|
|
31
|
-
|
|
270
|
+
Every action below declares `scope: "workspace"` under
|
|
271
|
+
{§module-action-registration}. AG-UI binds its workspace; none accepts a
|
|
272
|
+
workspace identifier in params.
|
|
273
|
+
|
|
274
|
+
| Action | Parameters | Result / effect |
|
|
275
|
+
|---|---|---|
|
|
276
|
+
| `workspace.mcp.list` | optional `overlay: McpConfigurationOverlay` | Sorted available server summaries: alias, source, target, transport, enabledness, connection/authorization/unavailable state, unavailable Problem, negotiated identity/capabilities, enabled tools, and read subset. A client-only definition is shown disabled with source `client`; carrying configuration neither connects nor persists it. No credential values. |
|
|
277
|
+
| `workspace.mcp.add` | `alias`, `target`; optional `options: McpServerOptions` | Adds and enables a workspace-owned alias absent from the available set. Preparation completes before publication. |
|
|
278
|
+
| `workspace.mcp.enable` | `alias`; optional `overlay: McpConfigurationOverlay`, `options: McpServerOptions` | Resolves the alias through {§mcp-configuration-cascade} and enables it for this workspace. A definition differing from the service baseline becomes the durable workspace specialization. Successful preparation precedes persistence and capability publication. Already connected with the same definition is a no-op; already enabled but unavailable retries preparation. |
|
|
279
|
+
| `workspace.mcp.disable` | `alias` | Disables an available alias, retaining it for client discovery while removing its connection and complete model-facing capability set. Already disabled is a no-op. |
|
|
280
|
+
| `workspace.mcp.remove` | `alias` | Removes a workspace specialization. A same-named service definition is revealed disabled; a workspace-only alias disappears. Service definitions without a specialization reject removal and direct the client to disable them. |
|
|
281
|
+
| `workspace.mcp.oauth.complete` | `alias`, `callbackUrl` | State- and issuer-validates one pending interactive callback through the SDK, completes connection preparation, then performs the originally requested add or enable. |
|
|
282
|
+
| `workspace.mcp.complete` | `server`, `ref`, `argument`; optional `context` | Requests negotiated prompt/resource-template argument completion for a client-owned interaction. |
|
|
283
|
+
|
|
284
|
+
Expected preparation failures cross the action boundary as MCP-management
|
|
285
|
+
Problems rather than generic AG-UI failures:
|
|
286
|
+
|
|
287
|
+
| Endpoint condition | Problem |
|
|
288
|
+
|---|---|
|
|
289
|
+
| Cannot connect or complete discovery/catalog preparation at the negotiated revision | `502 server-unavailable`, retryable; names the server and transport without exposing credentials |
|
|
290
|
+
| Client-credentials grant rejected by the authorization server | `502 oauth-client-credentials-failed`, non-retryable; names the server and client id, never the secret ({§oauth-client-credentials}) |
|
|
291
|
+
|
|
292
|
+
Interactive preparation returns a successful pending result shaped as
|
|
293
|
+
`{ status: 202, authorization: { url } }`; it publishes no candidate runtime.
|
|
294
|
+
The action owner retains one pending candidate per `(workspace, alias)` and a
|
|
295
|
+
new request cancels and replaces it ({§oauth-lifetime}). Unrelated workspace
|
|
296
|
+
changes remain authoritative while authorization is pending; drift of the same
|
|
297
|
+
server fails completion with a conflict instead of replaying a stale workspace
|
|
298
|
+
snapshot. `oauth.complete` accepts the complete
|
|
299
|
+
callback URL so state, `code`, and `iss` remain one parsing unit. A missing,
|
|
300
|
+
expired, mismatched, or replayed callback fails without exposing attacker-owned
|
|
301
|
+
OAuth error text. It completes either pending hydration or the originally
|
|
302
|
+
requested add or enable.
|
|
303
|
+
|
|
304
|
+
## §oauth-lifetime Interactive OAuth lifetime and reauthorization
|
|
305
|
+
|
|
306
|
+
Interactive OAuth state is deliberately ephemeral and process-memory: client
|
|
307
|
+
registration data, access and refresh tokens, the PKCE verifier, and pending
|
|
308
|
+
state live only in the owning connection or pending candidate. Nothing
|
|
309
|
+
OAuth-secret is written to SQLite; the durable workspace state holds only the
|
|
310
|
+
unexpanded definition ({§mcp-configuration}). There is no callback HTTP
|
|
311
|
+
listener, authority-root resource, or daemon-side browser side channel: the
|
|
312
|
+
client returns the complete callback URL through `workspace.mcp.oauth.complete`
|
|
313
|
+
so `state`, `code`, and `iss` remain one parsing unit. Reauthorization after a
|
|
314
|
+
daemon restart is the intended journey, documented here rather than presented
|
|
315
|
+
as an accidental failure.
|
|
316
|
+
|
|
317
|
+
| Journey point | Behaviour |
|
|
318
|
+
|---|---|
|
|
319
|
+
| Pending authorization | One pending candidate per `(workspace, alias)`; a new add or customized enable cancels and replaces it. A callback from a superseded attempt fails state validation instead of cross-completing. |
|
|
320
|
+
| Client disconnect | Does not touch the pending candidate; it can still be completed, or replaced by a fresh request. |
|
|
321
|
+
| Daemon restart during pending | The candidate is lost: nothing was durable, no attachment publishes, and `oauth.complete` answers `404 oauth-not-pending`. Start authorization again. |
|
|
322
|
+
| Daemon restart after authorization | The durable definition rehydrates but tokens are gone; the attachment publishes `authorization-required` and enable returns a fresh `{ status: 202, authorization: { url } }`. The operator reauthorizes. |
|
|
323
|
+
| Token expiry | An expired access token surfaces as one unauthorized response; the SDK re-acquires via `refresh_token` when one was issued, otherwise re-enters interactive authorization. |
|
|
324
|
+
| Refresh | Happens only against the issuer bound during the original authorization; the refreshed token replaces the in-memory token. |
|
|
325
|
+
| Workspace disable/remove | Closes the attachment and clears its pending candidate; no durable secret deletion is needed because nothing secret is durable. |
|
|
326
|
+
| Server replacement | Completion compares the pending candidate's expected definition with the current one; drift of the same server fails `409 oauth-target-conflict` instead of replaying a stale snapshot. |
|
|
327
|
+
| Cross-authorization protection | Candidates are keyed by `(workspace, alias)`; callback state, PKCE, and issuer are validated by the SDK against the attempt that created them, so no other workspace, alias, or attempt can complete this authorization. |
|
|
328
|
+
|
|
329
|
+
## §oauth-client-credentials Client-credentials grant adoption
|
|
330
|
+
|
|
331
|
+
The `client-credentials` arm of `McpServerDefinition.authorization` adopts the
|
|
332
|
+
official `io.modelcontextprotocol/oauth-client-credentials` extension's
|
|
333
|
+
client-secret form faithfully: an MCP connection whose definition holds a
|
|
334
|
+
client-credentials grant advertises the extension capability in
|
|
335
|
+
`clientCapabilities.extensions`; connections without one never claim it. The
|
|
336
|
+
grant uses `client_secret_basic` authentication with `grant_type
|
|
337
|
+
client_credentials`. Scope from the definition's optional `scope` is passed to
|
|
338
|
+
the token request. The credential itself is one complete symbolic environment
|
|
339
|
+
reference (`clientSecret: "${NAME}"`), expanded only while preparing the
|
|
340
|
+
connection; it is never stored in SQLite, logged, or echoed in Problems.
|
|
341
|
+
|
|
342
|
+
| Aspect | Behaviour |
|
|
343
|
+
|---|---|
|
|
344
|
+
| Issuer binding | The definition's optional `issuer` is passed as the SDK provider's `expectedIssuer`, stamping the credential with its authorization server so SEP-2352 issuer checks refuse to send it elsewhere. Absent, the SDK's legacy no-binding behaviour applies. |
|
|
345
|
+
| Token lifetime | Token refresh is 401-triggered by the SDK client: an expired access token surfaces as one unauthorized response, the provider re-fetches with the stored credential, and the request is retried. Proactive expiry scheduling is a client-internal optimization, not a wire requirement; Plurnk does not wrap the SDK with its own scheduler. |
|
|
346
|
+
| Rotation | `clientSecret` resolution happens per connection preparation, so rotating the operator environment value takes effect on the next preparation of the server. |
|
|
347
|
+
| Errors | A rejected grant crosses the action boundary as `502 oauth-client-credentials-failed`, non-retryable, naming the server and client id only; SDK OAuth error text is never echoed. Other connection failures keep the generic `server-unavailable` allocation. |
|
|
348
|
+
|
|
349
|
+
Static credentials authorize application principals (service attachments, CI,
|
|
350
|
+
daemons), not human users. Private-key JWT and static JWT assertions for
|
|
351
|
+
client authentication are a declared non-goal; the specification permits a
|
|
352
|
+
secret-only client and Plurnk declines the assertion arms. The interactive
|
|
353
|
+
OAuth arm is the human-principal path ({§mcp-management-actions}); bearer
|
|
354
|
+
remains the private-service/legacy transport credential.
|
|
355
|
+
|
|
356
|
+
## §mcp-ema-deferral Enterprise-managed authorization deferral
|
|
357
|
+
|
|
358
|
+
Plurnk does not advertise or implement
|
|
359
|
+
`io.modelcontextprotocol/enterprise-managed-authorization`. The SDK supplies
|
|
360
|
+
the wire steps (ID-JAG acquisition via RFC 8693 and the RFC 7523 JWT bearer
|
|
361
|
+
grant); the extension's remaining responsibilities are enterprise deployment
|
|
362
|
+
policy, not open-source host mechanics:
|
|
363
|
+
|
|
364
|
+
| Responsibility | Ownership |
|
|
365
|
+
|---|---|
|
|
366
|
+
| Capability advertisement, ID-JAG and access-token exchange, scope-error handling | Public protocol responsibilities the SDK host could own |
|
|
367
|
+
| SSO acquisition of the identity assertion (ID token or SAML) | Presumes a user session the headless daemon does not own |
|
|
368
|
+
| Saving the identity assertion for later use | Durable identity material; conflicts with the credential policy — secrets have one owner, the operator environment, and never a durable store |
|
|
369
|
+
| IdP endpoint and client registration configuration | Organization-owned; Plurnk has no org-level configuration seam |
|
|
370
|
+
|
|
371
|
+
The conformance client declines the enterprise scenarios, the capability
|
|
372
|
+
matrix keeps the extension non-advertised ({§mcp-capability-matrix}), and the
|
|
373
|
+
extension stays separate from core OAuth and client-credentials reporting.
|
|
374
|
+
Re-evaluate when an organization-owned configuration owner exists and a
|
|
375
|
+
decision on durable identity material is ratified.
|
|
376
|
+
|
|
377
|
+
## §mcp-setup Atomic lifecycle
|
|
378
|
+
|
|
379
|
+
For each workspace, hydration resolves service defaults and durable positive
|
|
380
|
+
workspace state, opens and discovers only enabled connections,
|
|
381
|
+
lists the negotiated catalogs, applies enabled/effect policy, builds each exact
|
|
382
|
+
tool Registry and resource facet, and submits one complete owner snapshot to
|
|
383
|
+
{§module-workspace-capabilities}. A configured tool absent from the server, a
|
|
384
|
+
duplicate remote name, an enabled name not representable as a Plurnk target,
|
|
385
|
+
or a `read` name outside the enabled set fails that workspace hydration. No
|
|
386
|
+
partial namespace is published and every acquired candidate closes.
|
|
387
|
+
|
|
388
|
+
Add and enable prepare the candidate while the old snapshot remains
|
|
389
|
+
authoritative, then commit only at {§module-workspace-quiescence}. Disable and
|
|
390
|
+
remove commit the complete reduced snapshot at the same boundary. The
|
|
391
|
+
old connection rejects replacement while it owns an active protocol request,
|
|
392
|
+
MRTR exchange, or Task. Cache/list-change watches are infrastructure and close
|
|
393
|
+
with the old connection after the new snapshot commits. A failed candidate or
|
|
394
|
+
commit leaves the durable definition, connection, Registry, docs, and resource
|
|
395
|
+
authority unchanged. Materialization and registration inspect the complete
|
|
396
|
+
owning operation result; a non-success preserves its original Problem.
|
|
397
|
+
|
|
398
|
+
Shutdown first prevents new work, cancels pending OAuth candidates and
|
|
399
|
+
infrastructure watches, settles every active request and Task, closes every
|
|
400
|
+
acquired connection, then reports all close failures. Whole-connection
|
|
401
|
+
shutdown retires subscription work before closing its transport; it does not
|
|
402
|
+
first issue a redundant per-listen cancellation.
|
|
403
|
+
|
|
404
|
+
## §mcp-host-composition Protocol-to-Plurnk composition
|
|
405
|
+
|
|
406
|
+
One `ServerConnection` owns negotiation, SDK caches, authorization partition,
|
|
407
|
+
subscriptions, active request controllers, MRTR rounds, and Tasks for one
|
|
408
|
+
workspace attachment. The host does not reproduce SDK protocol machinery.
|
|
409
|
+
|
|
410
|
+
| Protocol event | Plurnk composition |
|
|
411
|
+
|---|---|
|
|
412
|
+
| `tools/call` progress | Writes ordinary transient progress on the owning EXEC stream; it creates no log sibling or polling vocabulary. |
|
|
413
|
+
| Operation cancellation | The owning EXEC abort signal closes the HTTP request stream or sends the stdio cancellation notification. |
|
|
414
|
+
| `input_required` | Batches all embedded requests from one result into one atomic client interaction. Opaque `requestState` remains private to the connection and only the originating request is reissued after a complete response. |
|
|
415
|
+
| Elicitation form / URL | Validates the response against the requested form or URL action contract. Client cancellation becomes the standard `cancel` action; unsupported families or modes fail before any interaction or retry. |
|
|
416
|
+
| Task handle | Keeps the original EXEC stream active, follows `tasks/get` and selected Task notifications, and settles that same stream with the terminal result or error. |
|
|
417
|
+
| Task input | Routes through the operation's client interaction, then sends `tasks/update`; it never asks the model to manufacture protocol state. |
|
|
418
|
+
| Task cancellation | The owning EXEC cancellation invokes `tasks/cancel` before settling the ordinary stream cancellation. |
|
|
419
|
+
| List/resource invalidation | List changes invalidate SDK catalogs and atomically refresh the attachment snapshot. Updates to selected resource URIs invalidate their SDK cache entries; private entries remain authorization-partitioned. |
|
|
420
|
+
| Prompt get / completion | Serves ordinary resource-authority reads and host interactions from negotiated prompt/template definitions; no prompt becomes an executable tool. |
|
|
421
|
+
|
|
422
|
+
The general executor interaction contract, not this package, owns client
|
|
423
|
+
interrupt durability and AG-UI presentation. A disconnect re-surfaces its
|
|
424
|
+
pending client-owned interaction exactly as proposal review does. MRTR round
|
|
425
|
+
limits, request timeout, cancellation, and Task terminal state are one
|
|
426
|
+
operation lifecycle; none becomes a hidden retry loop.
|
|
427
|
+
|
|
428
|
+
## §mcp-result-content Passive result content
|
|
429
|
+
|
|
430
|
+
Every passive content variant the modern revision defines — text, image,
|
|
431
|
+
audio, resource links, and embedded text/blob resources — is preserved
|
|
432
|
+
losslessly into the EXEC channel as one JSON value
|
|
433
|
+
({§json-result-rendering}), the durable evidence path. Plurnk does not claim
|
|
434
|
+
first-class client rendering of non-text variants and adds no MCP-only media
|
|
435
|
+
envelopes: presentation is a client concern over ordinary typed
|
|
436
|
+
entries/resources, and a text-only client degrades by rendering the JSON. A
|
|
437
|
+
standalone `blob` content block is not a modern `tools/call` content member
|
|
438
|
+
(blobs ride inside embedded blob resources) and is rejected as
|
|
439
|
+
protocol-invalid. Size limits and MIME trust remain ordinary channel and
|
|
440
|
+
entry policy, not MCP-specific rules.
|
|
441
|
+
|
|
442
|
+
## §mcp-apps-exclusion MCP Apps exclusion
|
|
443
|
+
|
|
444
|
+
Plurnk does not advertise or implement MCP Apps. An Apps host must sandbox
|
|
445
|
+
render third-party HTML/JavaScript, enforce CSP and `_meta.ui` permissions,
|
|
446
|
+
mediate a `postMessage` JSON-RPC `ui/` dialect, proxy app-initiated tool
|
|
447
|
+
calls with consent, and own teardown. No Plurnk client can enforce that
|
|
448
|
+
sandbox today (terminal and Neovim cannot), the daemon is not a second
|
|
449
|
+
application platform, and AG-UI has no standard Apps projection — inventing
|
|
450
|
+
a private event stream to carry Apps is rejected. Tool descriptions carrying
|
|
451
|
+
`_meta.ui` metadata project into Plurnk without it: model-facing summaries
|
|
452
|
+
derive only from name, description, title, and input schema, and no UI
|
|
453
|
+
resource is fetched or preloaded. The capability matrix keeps the extension
|
|
454
|
+
non-advertised ({§mcp-capability-matrix}). Re-evaluate only when a
|
|
455
|
+
sandbox-capable client exists and a standard AG-UI projection is agreed;
|
|
456
|
+
even then the capability would be per-client-advertised, never daemon-wide.
|
|
457
|
+
|
|
458
|
+
## §mcp-model-projection Model-facing projection
|
|
32
459
|
|
|
33
460
|
| MCP surface | Plurnk surface |
|
|
34
461
|
|---|---|
|
|
35
|
-
| Server |
|
|
36
|
-
|
|
|
37
|
-
| Tool
|
|
38
|
-
| Resource catalog |
|
|
39
|
-
|
|
|
462
|
+
| Server | One registered executor family, `worker://plurnk/tools/<server>.md`, and matching resource scheme |
|
|
463
|
+
| Enabled tool | One annotated call in the compact family document plus one exact `worker://plurnk/tools/<server>/<encoded-tool>.md` input-contract document |
|
|
464
|
+
| Tool survey | Ordinary FIND summary metadata from the standard executable-tool resource tree |
|
|
465
|
+
| Resource catalog | `<server>:///` and `<server>:///resources` |
|
|
466
|
+
| Resources | `<server>:///resources` and encoded resource-URI descendants |
|
|
467
|
+
| Prompts | `<server>:///prompts` and encoded prompt-name descendants |
|
|
468
|
+
|
|
469
|
+
§mcp-tool-presentation One canonical enabled-tool snapshot owns every
|
|
470
|
+
model-facing and executable consequence. Each enabled remote tool becomes one
|
|
471
|
+
exact target in {§executor-tool-registry}. Its standard
|
|
472
|
+
{§executor-tool-document} carries the normalized remote description as Summary,
|
|
473
|
+
requiredness derived from the input schema, and a deterministic one-line
|
|
474
|
+
JSON-shaped invocation signature: quoted property names, `?` on optional
|
|
475
|
+
properties, primitive type words, and literal unions—never fabricated argument
|
|
476
|
+
data. The compact family document projects those same facts into annotated,
|
|
477
|
+
copyable EXEC headings; each exact child additionally projects property-level
|
|
478
|
+
input descriptions and standard constraints such as defaults, formats, ranges,
|
|
479
|
+
lengths, and patterns. A missing remote description receives a deterministic
|
|
480
|
+
server-and-tool summary rather than an invented capability claim. Output schemas
|
|
481
|
+
do not enter model teaching; the returned value remains ordinary evidence. Disabled names
|
|
482
|
+
appear in neither discovery nor admission, and there is no MCP-specific FIND,
|
|
483
|
+
READ, authority-root, or other model discovery mechanism for tools.
|
|
484
|
+
|
|
485
|
+
Core validates the exact target and the selected tool's invocation before
|
|
486
|
+
effect admission. `McpExecutor.run()` independently rejects a target outside
|
|
487
|
+
the same snapshot before issuing `tools/call`. The server's empty-authority
|
|
488
|
+
scheme is consequently resource-only: its root and `/resources` catalogs
|
|
489
|
+
contain resources and resource templates, never tools. Tool results become
|
|
490
|
+
ordinary Plurnk entries and channels, so slicing, tags, curation, notices, and
|
|
491
|
+
Problems need no MCP-specific parallel mechanism.
|
|
492
|
+
|
|
493
|
+
MCP tool annotations remain untrusted metadata, not admission authority. The
|
|
494
|
+
operator-owned `_READ` subset classifies enabled observations as the executor
|
|
495
|
+
`read` effect; every other enabled tool remains `host` and therefore uses the
|
|
496
|
+
ordinary proposal policy. Effect classification receiving an unregistered
|
|
497
|
+
target is an internal contract violation rather than a conservative guess.
|
|
40
498
|
|
|
41
|
-
|
|
42
|
-
MCP resource facet claims only `/`, `/resources`, and descendants. Every other
|
|
43
|
-
path uses the standard executor-output scheme.
|
|
499
|
+
## §mcp-conformance Conformance authority
|
|
44
500
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
501
|
+
Protocol conformance runs through official
|
|
502
|
+
`@modelcontextprotocol/conformance@0.2.0-alpha.11`, whose immutable
|
|
503
|
+
`2026-07-28` requirement manifest freezes the release-time alpha.10 scenario
|
|
504
|
+
set. The core client leg must pass; supported extension scenarios run and
|
|
505
|
+
report separately because Tasks cannot alter the core pass rate. Atlas and
|
|
506
|
+
third-party stdio/Streamable HTTP servers are composition evidence only.
|
package/dist/McpExecutor.d.ts
CHANGED
|
@@ -1,16 +1,39 @@
|
|
|
1
1
|
import { BaseExecutor } from "@plurnk/plurnk-execs";
|
|
2
|
-
import type { ChannelDecl, Effect, ExecArgs, ExecResult, RuntimeAvailability, RuntimeDecl } from "@plurnk/plurnk-execs";
|
|
3
|
-
import ServerConnection from "./client.ts";
|
|
4
|
-
|
|
2
|
+
import type { ChannelDecl, Effect, ExecArgs, ExecResult, RuntimeAvailability, RuntimeDecl, RuntimeToolRegistry } from "@plurnk/plurnk-execs";
|
|
3
|
+
import ServerConnection, { type ServerCatalog } from "./client.ts";
|
|
4
|
+
import type { ToolPolicy } from "./config.ts";
|
|
5
|
+
export declare const serverSummary: (name: string, catalog: ServerCatalog | undefined, override: string | undefined) => string;
|
|
6
|
+
export declare const runtimeDecl: (name: string, summary: string, expandTools: boolean) => RuntimeDecl;
|
|
5
7
|
export default class McpExecutor extends BaseExecutor {
|
|
6
8
|
#private;
|
|
7
9
|
constructor(metadata: {
|
|
8
10
|
runtime: string;
|
|
9
11
|
glyph: string;
|
|
10
|
-
}, connection: ServerConnection);
|
|
12
|
+
}, connection: ServerConnection, policy?: Partial<ToolPolicy>, toolSummaries?: ReadonlyMap<string, string>);
|
|
13
|
+
get manifest(): {
|
|
14
|
+
name: string;
|
|
15
|
+
channels: Record<string, string>;
|
|
16
|
+
defaultChannel: string;
|
|
17
|
+
category: "data" | "logging" | "control";
|
|
18
|
+
writableBy: ReadonlyArray<import("@plurnk/plurnk-schemes").WriterTier>;
|
|
19
|
+
volatile: boolean;
|
|
20
|
+
modelVisible: boolean;
|
|
21
|
+
folderScopes?: boolean;
|
|
22
|
+
textEditScopes?: boolean;
|
|
23
|
+
lineAnchors?: boolean;
|
|
24
|
+
foldedByDefault?: boolean;
|
|
25
|
+
flags?: import("@plurnk/plurnk-schemes").SchemeFlagAffinity;
|
|
26
|
+
documentation?: string;
|
|
27
|
+
glyph?: string;
|
|
28
|
+
storedScheme?: string;
|
|
29
|
+
example: string;
|
|
30
|
+
};
|
|
11
31
|
get channels(): Readonly<Record<string, ChannelDecl>>;
|
|
12
32
|
effect(target: string | null): Effect;
|
|
33
|
+
toolRegistry(): RuntimeToolRegistry;
|
|
34
|
+
get catalog(): ServerCatalog;
|
|
13
35
|
probe(signal?: AbortSignal): Promise<RuntimeAvailability>;
|
|
14
|
-
|
|
36
|
+
requireAvailable(signal?: AbortSignal): Promise<RuntimeAvailability>;
|
|
37
|
+
run({ runtime, body, target, signal, write, setState, emit, interact, }: ExecArgs): Promise<ExecResult>;
|
|
15
38
|
}
|
|
16
39
|
//# sourceMappingURL=McpExecutor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpExecutor.d.ts","sourceRoot":"","sources":["../src/McpExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,
|
|
1
|
+
{"version":3,"file":"McpExecutor.d.ts","sourceRoot":"","sources":["../src/McpExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EAMf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACR,WAAW,EACX,MAAM,EACN,QAAQ,EACR,UAAU,EAEV,mBAAmB,EACnB,WAAW,EACX,mBAAmB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,gBAAgB,EAAE,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAEnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAkB9C,eAAO,MAAM,aAAa,SAChB,MAAM,WACH,aAAa,GAAG,SAAS,YACxB,MAAM,GAAG,SAAS,KAC7B,MAYF,CAAC;AAEF,eAAO,MAAM,WAAW,SAAU,MAAM,WAAW,MAAM,eAAe,OAAO,KAAG,WAchF,CAAC;AAuBH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,YAAY;;IAQjD,YACI,QAAQ,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAC5C,UAAU,EAAE,gBAAgB,EAC5B,MAAM,GAAE,OAAO,CAAC,UAAU,CAAM,EAChC,aAAa,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAO9C;IAED,IAAa,QAAQ;;;;;;;;;;;;;;;;;MAKpB;IAED,IAAI,QAAQ,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAMpD;IAEQ,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAK7C;IAgCD,YAAY,IAAI,mBAAmB,CAKlC;IAED,IAAI,OAAO,IAAI,aAAa,CAK3B;IAEc,KAAK,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAgBvE;IAEK,gBAAgB,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAqBzE;IAEK,GAAG,CAAC,EACN,OAAO,EACP,IAAI,EACJ,MAAM,EACN,MAAM,EACN,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,QAAQ,GACX,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAiHhC;CACJ"}
|