@vantageos/mcp-doctor 0.16.0 → 0.17.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/CHANGELOG.md CHANGED
@@ -4,6 +4,30 @@ All notable changes to `@vantageos/mcp-doctor` are documented here.
4
4
  This project adheres to [Semantic Versioning](https://semver.org/).
5
5
  Unreleased changes live as one fragment per pull request in `changelog.d/`, folded in here at release time.
6
6
 
7
+ ## 0.17.0 — 2026-11-02
8
+
9
+ ### Added
10
+ - **C-34: every plugin family is generated from one source.** For each Agent Plugins, Claude or Cursor plugin file the repository ships: a script that names and writes it, a drift check (a test importing that script, or a `--check` run in package.json or CI), and no credential (the C-31 shapes). The boilerplate: present (its four plugin files written by `scripts/sync-plugin-version.mjs`, drift-checked by `tests/pluginManifests.test.ts`). VantagePeers and Lojii ship no plugin files: absent. (README: #c-34-reports-a-plugin-family-that-is-not-generated-from-one-source)
11
+ - **C-35: a directory listing kit is derived from the server, never typed.** `listing/listing.json` (pinned by mcp-standard v2.10) is checked field by field: the description equals a generated plugin manifest's; tools[] lists every registered tool, with titles and hints equal to the registration's literals or, in the served half, to the served `tools/list`; test prompts link to `evals/evals.json` with at least 5 positive and 3 negative existing ids; the reviewer note is `howToObtain` only. A plugin family without a kit is red. The runtime now records each served tool's title and its two hints. The boilerplate's kit (boilerplate #42): present in the served half. (README: #c-35-reports-a-directory-listing-kit-that-is-typed-rather-than-derived-from-the-server)
12
+ - **S-45: a distributed server is served from an origin we own, over Streamable HTTP, with each declared host's verification path from configuration.** Scope: the hosts declared in `mcp-server.json` `distribution.targets` (none = absent, said so). Red: a platform default host as the public origin, no Streamable HTTP route, a literal verification token, or a declared host's path not served. Measured: Lojii and the boilerplate declare no targets yet (absent); Lojii with `chatgpt` declared reads non-conforming (no `/.well-known/openai-apps-challenge`). (README: #s-45-reports-a-distributed-server-on-a-platform-host-with-no-streamable-http-route-or-without-a-declared-hosts-verification-path)
13
+ - **S-46: a server that authenticates people offers both CIMD and DCR, and each declared host's redirect is named.** Scope: the declared targets (shared reader with S-45) and an authorization server in the tree or installed (the installed reader now also reads `registration_endpoint` / `/register`). A missing method is red. Redirect acceptance per declared host is could-not-judge until the served half exists; a host with no stated callback is could-not-judge, named. Measured on the boilerplate with `claude` and `vscode` declared: CIMD (authorizationServer.ts:439) and DCR (:407) found; both redirects left to the served half. (README: #s-46-reports-a-server-that-offers-only-one-client-registration-method-and-names-each-declared-hosts-redirect)
14
+ - **S-46 served half: the served authorization server is read, and a sign-in is started as each known client.** Over `--url` (with `--source` for the declared targets), S-46 reads both registration methods from the served metadata and, for VS Code (whose client document is public), starts one sign-in per redirect URI that document lists: 2xx and a 3xx onward to sign-in (or back to the redirect URI) accepted; a 4xx, or a 3xx to an error page carrying `error=`, refused and quoted. No credential is sent and the answer is never followed. The metadata and sign-in reads are public, so they run even when the MCP endpoint answers 401 without a token, and the verdict names the refused handshake. Measured: Lojii accepts both VS Code redirects (302 to sign-in); VantagePeers Cloud answers 400 `invalid_client` / `unknown-client` and announces no CIMD. (README: #s-46-reports-a-server-that-offers-only-one-client-registration-method-and-names-each-declared-hosts-redirect)
15
+ - **S-47: a server that serves events delivers them by signed webhook, never by polling or streaming alone.** Read in the tree: an outbound call to the subscriber's callback URL, the three Standard Webhooks headers (`webhook-id`, `webhook-timestamp`, `webhook-signature`) set on that delivery, and a `verification` envelope with a challenge sent to the subscriber before the first delivery. Each missing property is red and named; an outbound call with no recognised callback, or an imported events package, is could-not-judge. VantagePeers, Lojii and the boilerplate serve no events: absent. (README: #s-47-reports-a-server-whose-events-are-not-delivered-by-signed-webhook)
16
+ - **S-48: a server force-installed for a member serves that member as themself.** Read in the product source: no shared credential used as a fallback in any form (`??`, `||`, `??=`, `||=`, a ternary, a destructuring or parameter default, a guarded assignment), keyed on the credential-named value, and a 401 with a `WWW-Authenticate` challenge for a member who arrives with none. Each match counts only where its operator is code. VantagePeers, Lojii and the boilerplate: present (no fallback; a 401 challenge at server-http.ts:1022, src/app.ts:279, src/httpApp.ts:171). (README: #s-48-reports-a-server-that-serves-a-member-without-their-own-sign-in)
17
+
18
+ ### Changed
19
+ - **C-29 (amended): every plugin package ships the served skills.** When the Skills extension is declared, each plugin package (`.claude-plugin/`, `.cursor-plugin/`, or an Agent Plugins `plugin.json`) must carry `skills/<name>/SKILL.md` for every skill, byte-equal to the served copy; a missing or differing copy is red, named. A root package whose `skills/` is the served folder satisfies it. (README: #c-29-reports-a-plugin-package-that-does-not-ship-the-served-skills)
20
+
21
+ ### Fixed
22
+ - **C-29 compares a plugin package's skill copy folder to folder.** Only `SKILL.md` was compared, so a package copy missing the skill's `references/` or `scripts/` stayed green. Every file of the served skill folder must now be present and byte-equal in each package copy, and a file the served skill does not carry is red too. (README: #c-29-reports-a-plugin-package-that-does-not-ship-the-served-skills)
23
+ - **C-34 follows a path held in a `const`.** `const pluginPath = ".claude-plugin/plugin.json"; writeFileSync(pluginPath, …)`, the common real generator, read could-not-judge. A write's path now resolves each identifier bound by `const` to a string literal or a join / resolve, one level; a `let`, or a const bound to any other call, is not followed. (README: #c-34-reports-a-plugin-family-that-is-not-generated-from-one-source)
24
+ - **Authorization-server metadata is read only where it is declared, never from a string that quotes it.** S-5 (g)/(l), S-46 and the installed-server reader took `client_id_metadata_document_supported: true`, `authorization_response_iss_parameter_supported: true`, `token_endpoint_auth_methods_supported`, `registration_endpoint` and the `resource:` member wherever the words appeared — including inside a refusal message — so a string could hide a real red. A match now counts only where its separator (the property's `:`, the route call's `(`) is code. A "/register" literal outside a route call (a loop over proxied prefixes) is no longer DCR: S-46 names it and does not decide DCR on it. Where a CORS `.use` and a `.post` handler both sit on `/register`, the handler is the cited site. (README: #s-46-reports-a-server-that-offers-only-one-client-registration-method-and-names-each-declared-hosts-redirect)
25
+ - **S-17 reads dynamic registration and CIMD only where they are declared.** The class closed for S-5, S-46 and the installed reader in the previous release also reached S-17: `registration_endpoint` and `client_id_metadata_document_supported: true` were matched anywhere, so a message string quoting the CIMD flag hid the "registration without CIMD" red, and a "/register" literal in an array counted as registration. Both are now read at a code separator with the shared forms; a "/register" literal outside a route call, with no CIMD, is could-not-judge naming it, never absent. (README: #s-46-reports-a-server-that-offers-only-one-client-registration-method-and-names-each-declared-hosts-redirect)
26
+ - **S-45 no longer reads an environment-variable name as a token.** The "literal token" pattern matched any 12-character string of letters, digits and underscores, so `process.env["OPENAI_APPS_CHALLENGE"]`, or a handler naming the variable in its message, was red although it reads configuration. An UPPER_SNAKE name (at least one underscore) is now a name; a real token stays red, beside a configuration read too. (README: #s-45-reports-a-distributed-server-on-a-platform-host-with-no-streamable-http-route-or-without-a-declared-hosts-verification-path)
27
+ - **S-45 no longer counts a localhost default as an owned origin.** A tree whose only declared origin was `PUBLIC_BASE_URL ?? "http://localhost:8787"` read "owned origin (localhost)". A loopback host (localhost, 127.0.0.0/8, ::1, 0.0.0.0) is now a development address: alone, the public origin is undeclared (could-not-judge, naming it); beside a public URL, the public URL decides. (README: #s-45-reports-a-distributed-server-on-a-platform-host-with-no-streamable-http-route-or-without-a-declared-hosts-verification-path)
28
+ - **S-46 served half: a sign-in is accepted only on evidence.** A 200 page, a same-origin redirect whose path names no sign-in step, or a redirect with only `error_description` was graded accepted, though an authorization server may show its refusal that way. Accepted now means back to the redirect URI, or onward to a sign-in step (sign-in, login, consent, authorize, sso in the path); anything else is could-not-judge, naming the status and Location. Lojii live stays present (both VS Code redirects 302 to accounts.vantagepeers.com/sign-in). (README: #s-46-reports-a-server-that-offers-only-one-client-registration-method-and-names-each-declared-hosts-redirect)
29
+ - **S-47 reads the signature on the callback call itself.** Headers set on another call in the same function (an audit log request) certified an unsigned callback POST. The delivery is now each outbound call whose target is the subscriber callback, and its headers are read from that call's options or the object it is passed; the least-signed callback call is judged. The options are read in source order, last write wins (a `headers` key after a signed spread replaces it), and a spread is followed up to three levels; a spread or headers value the reader cannot follow is could-not-judge, named. (README: #s-47-reports-a-server-whose-events-are-not-delivered-by-signed-webhook)
30
+
7
31
  ## 0.16.0 — 2026-11-01
8
32
 
9
33
  ### Added
package/README.md CHANGED
@@ -224,6 +224,162 @@ an error message) it counts only as code or as a quoted property key.
224
224
  | **A4** wcag-axe-gate | A-4 | an axe dependency and a script, workflow or test that runs it | absent / non-conforming / could-not-judge (0 blocking violations is the owed gate) |
225
225
  | **A5** performance-budgets | A-5 | gzipped size of the UI bundle files (`dist/` and `build/` read for size only): one file or one directory over 250 KB | absent / non-conforming / could-not-judge (render, roundtrip, memory probes owed) |
226
226
 
227
+ ### Added in 0.17.0 — the host distribution rules (mission k578mxdd9e3zx89hbn8njf0rfs8hcxf4)
228
+
229
+ | ID | Rule | The static run reads | Verdicts |
230
+ |----|------|----------------------|----------|
231
+ | **S45** origin-targets | S-45 | `mcp-server.json` `distribution.targets`, the public origin (manifest URL or `PUBLIC_BASE_URL`), the Streamable HTTP route, each declared host's verification path and where its value comes from | absent (no target declared) / present / non-conforming / could-not-judge (a development default alone) |
232
+ | **S46** registration-redirects | S-46 | CIMD and DCR offered together, each declared host's redirect in the allow-list; served half: the registration and authorize endpoints | absent / present / non-conforming / could-not-judge |
233
+ | **S47** webhook-delivery | S-47 | events served, the outbound call whose target is the subscriber callback, its Standard Webhooks signature headers, the callback verification | absent (no events) / present / non-conforming / could-not-judge |
234
+ | **S48** per-member | S-48 | the request path of a force-installed member: no shared-credential fallback, a 401 challenge for a member without a credential | absent (no person signs in) / present / non-conforming / could-not-judge |
235
+ | **C34** plugin-families | C-34 | each Agent Plugins, Claude or Cursor plugin file, the script that writes it, and its `--check` drift refusal | absent (no plugin family) / present / non-conforming / could-not-judge |
236
+ | **C35** listing-kit | C-35 | `listing/listing.json`: description, tools, test prompts and reviewer note against their sources; served half: titles and hints against the served `tools/list` | absent (not listed) / present / non-conforming / could-not-judge |
237
+
238
+ ### Changes in 0.17.0 — S-47 (standard `1c66e11c` = mcp-server-standard v2.11, PR #311)
239
+
240
+ #### S-47 reports a server whose events are not delivered by signed webhook
241
+
242
+ S-47 applies to a server that serves events (the same reading as S-29). Every host that documents MCP events takes
243
+ webhook delivery only, so S-47 checks three things in the tree:
244
+
245
+ - **Delivery:** an outbound call (`fetch`, `request`, `.post`, `http(s).request`) in a file that reads the
246
+ subscriber's callback URL (`callbackUrl`, `callback_url`, `webhookUrl`, `webhook_url`, or a `url` / `uri` / `href` /
247
+ `endpoint` member of a subscription, subscriber, delivery, callback, webhook or target object). None at all means
248
+ events are reachable only by polling or streaming: red.
249
+ - **Signature:** the three Standard Webhooks headers `webhook-id`, `webhook-timestamp`, `webhook-signature`, read on
250
+ each call whose target is the subscriber callback (directly, or a variable assigned from it): an object key in the
251
+ call's options, or an options / headers object it is passed (by name, `headers: h`, or `{ headers }`) that holds the
252
+ key or receives `.set` / `.append`, or an options object it spreads (`{ ...opts, method: "POST" }`, followed up to
253
+ three levels). The options are read in source order and the last write wins: a `headers` key after a signed spread
254
+ replaces it. Headers on another call, a docs constant or another function sign nothing; a spread or headers value
255
+ the reader cannot follow is could-not-judge, named; the least-signed callback call is the one judged. Each missing one is named, red. (S-33 checks the
256
+ full delivery contract.)
257
+ - **Verification:** the callback is verified before the first delivery: an envelope `type: "verification"` carrying
258
+ a `challenge`, in a function that sends it to the subscriber. Missing: red.
259
+
260
+ An outbound call in a file where no callback URL is recognised is could-not-judge, naming the call. An imported events
261
+ package may deliver from outside the tree: could-not-judge, naming it.
262
+ ### Changes in 0.17.0 — S-48 (standard `1c66e11c` = mcp-server-standard v2.11, PR #311)
263
+
264
+ #### S-48 reports a server that serves a member without their own sign-in
265
+
266
+ S-48 applies to a server that authenticates people (an authorization server in its tree or installed). An
267
+ administrator may install it for every member (Claude Required, Cursor Required, a ChatGPT workspace), so a member can
268
+ arrive without ever having connected. S-48 checks two things in the product source:
269
+
270
+ - **No shared fallback:** a shared credential (an environment value, a config field or a constant whose name carries
271
+ token, key, secret, bearer, credential or password) used as a fallback in any form — `a ?? S`, `a || S`, `??=`,
272
+ `||=`, a ternary, a destructuring default `{ token = S } = …`, a parameter default, `if (!a) a = …S…` — is red,
273
+ naming the line, whatever the left side is called. `port ?? process.env.PORT` is not (PORT is no credential), nor a
274
+ credential-named value that is called (`TOKEN_RE.test(x)`). The words in a string or a comment count for nothing.
275
+ - **A coded refusal:** a member who arrives with no credential receives a 401 with a `WWW-Authenticate` challenge,
276
+ set in code. Missing: red; missing while the authorization server comes from a dependency (which may send it):
277
+ could-not-judge, naming the package.
278
+
279
+ Whether every read then stays scoped to the member is S-5, S-35 and S-28.
280
+
281
+ ### Changes in 0.17.0 — C-29 amended (standard `1c66e11c` = mcp-standard v2.8, PR #311)
282
+
283
+ #### C-29 reports a plugin package that does not ship the served skills
284
+
285
+ No host loads skills served over MCP; every host receives them inside a plugin package. So when an object declares
286
+ the `io.modelcontextprotocol/skills` extension and publishes plugin packages (a folder holding
287
+ `.claude-plugin/plugin.json`, `.cursor-plugin/plugin.json`, or an Agent Plugins `plugin.json`), each package must
288
+ carry `skills/<name>/` for every skill in the tree, the whole folder byte-equal to the served copy: `SKILL.md` and
289
+ every file beside it (`references/`, `scripts/`, assets). A missing skill, or a file missing, differing or extra in
290
+ the copy, is red and named; a file that cannot be read is could-not-judge. A package at the repository root whose `skills/` is the
291
+ served folder satisfies it as is.
292
+ ### Changes in 0.17.0 — C-34 (standard `1c66e11c` = mcp-standard v2.8, PR #311)
293
+
294
+ #### C-34 reports a plugin family that is not generated from one source
295
+
296
+ C-34 applies when the repository ships plugin files: the Agent Plugins shape (`plugin.json` + `mcp.json`), the
297
+ Claude plugin (`.claude-plugin/plugin.json` + `.mcp.json`) or the Cursor plugin (`.cursor-plugin/plugin.json`). For
298
+ each file present it checks:
299
+
300
+ - **Generated:** a repository script WRITES the file: a `writeFile` whose path names it (its literal, or the join form
301
+ `".claude-plugin", "plugin.json"`), directly or through a `const` bound to that literal or to a join naming it, or
302
+ a write of each key of an object holding the file paths. A script that only
303
+ reads the file (a linter writing a report) is no generator. A file no script writes is hand-edited, and red; a write
304
+ of a path the reader cannot tie to the file is could-not-judge.
305
+ - **Drift-checked:** a test imports that generator (in `tests/`, `test/` or a colocated `*.test.*`), or a
306
+ `package.json` script or CI workflow runs it with `--check`. None: red.
307
+ - **No credential:** the C-31 credential shapes over each file. Any hit is red.
308
+
309
+ A root `mcp.json` alone is the object's own manifest (C-18) and is not a plugin file; it joins the Agent Plugins
310
+ family only beside a `plugin.json`. A family file that cannot be read, or a `package.json` that cannot be parsed while
311
+ the drift check is looked for, is could-not-judge, naming it. Whether a family is missing for a declared target host
312
+ is not decided here.
313
+
314
+ ### Changes in 0.17.0 — C-35 (standard `65e1ac7e` = mcp-standard v2.10, PRs #315 / #318)
315
+
316
+ #### C-35 reports a directory listing kit that is typed rather than derived from the server
317
+
318
+ C-35 applies when the object is listed in a directory: a `listing/listing.json`, or a plugin family (C-34). A plugin
319
+ family with no kit is red. The kit's fields are each compared to their source:
320
+
321
+ - **description:** equal to the `description` of a generated plugin manifest (the source the manifests come from).
322
+ - **tools[]:** one entry per registered tool, no more, no fewer. Each entry's `title`, `readOnlyHint` and
323
+ `destructiveHint` are compared to the literals written at the registration; a value held in a constant is decided
324
+ by the served half (`--mode=both`, or `--url` with `--source`), which compares every entry to the served
325
+ `tools/list`.
326
+ - **testPrompts:** `source` is `evals/evals.json`, at least 5 positive and 3 negative ids, each an eval id of the suite.
327
+ - **reviewerAccount:** `howToObtain` only; a credential shape or any other key is red.
328
+
329
+ A kit that cannot be read, or a source that cannot be resolved, is could-not-judge, naming it.
330
+
331
+ ### Changes in 0.17.0 — S-46 (standard `1c66e11c` = mcp-server-standard v2.11, PR #311)
332
+
333
+ #### S-46 reports a server that offers only one client registration method, and names each declared host's redirect
334
+
335
+ S-46 applies to a server that declares target hosts (`distribution.targets`, read by the same reader as S-45) and runs
336
+ an authorization server, either in its tree or installed from a dependency.
337
+
338
+ - **Registration:** both methods are required. CIMD needs `client_id_metadata_document_supported: true`; DCR needs a
339
+ `registration_endpoint` or a `/register` route. Each is read in the tree or in the installed authorization server,
340
+ and a missing one is red, named. A setting counts only where it is declared: the property's `:` or the route call's
341
+ `(` must be code, so the same words inside a string (an error message quoting the flag) or a comment do not count.
342
+ A `/register` literal outside a route call (a loop over proxied prefixes) is named, and DCR is not decided on it.
343
+ - **Redirects:** acceptance of each declared host's stated callback is checked (claude:
344
+ `https://claude.ai/api/mcp/auth_callback`; vscode: `http://127.0.0.1:33418` and `https://vscode.dev/redirect`;
345
+ claude-code: a loopback redirect on any port). Whether the authorization server accepts them, a loopback on any port
346
+ in particular, is decided by the served server, so this static half reads could-not-judge for those hosts and says
347
+ so. A host whose callback the standard does not state (chatgpt, cursor, openclaw, hermes, gemini,
348
+ google-connected-apps) is could-not-judge, named.
349
+ - **Served half (`--url URL --source DIR`):** the doctor reads the served authorization-server metadata (both
350
+ methods must be announced there) and, for a declared host whose client document is known (today: VS Code's,
351
+ `https://vscode.dev/oauth/client-metadata.json`), starts one sign-in per redirect URI that document lists. A
352
+ redirect back to the redirect URI (even with `error=`, which an authorization server only sends to a URI it
353
+ accepted), or onward to a sign-in step (a path naming sign-in, login, consent, authorize, sso), is accepted; a 4xx,
354
+ or a redirect elsewhere carrying `error=`, is refused and quoted. A 200 page, or any other redirect, is no evidence
355
+ either way (an authorization server may show its refusal as a page): could-not-judge, naming it. No credential is sent, only the
356
+ endpoint's own origin is requested, and the answer is never followed. These reads are public, so they are made
357
+ even when the MCP endpoint refuses the handshake without a token (401), and the verdict says so. Claude and
358
+ Claude Code publish no client document the doctor can sign in as: could-not-judge, named. The declared targets
359
+ come from `--source`; without it, could-not-judge.
360
+
361
+ ### Changes in 0.17.0 — S-45 (standard `1c66e11c` = mcp-server-standard v2.11, PR #311, the declared target hosts)
362
+
363
+ #### S-45 reports a distributed server on a platform host, with no Streamable HTTP route, or without a declared host's verification path
364
+
365
+ S-45 applies to a server that declares the hosts it targets, in `mcp-server.json` `distribution.targets` (a closed set:
366
+ `chatgpt`, `google-connected-apps`, `gemini`, `claude`, `claude-code`, `cursor`, `vscode`, `openclaw`, `hermes`).
367
+ A server that declares none reads absent, and the verdict says so.
368
+
369
+ - **Origin:** every declared public URL is read: the manifest's `remotes[].url`, `url` and
370
+ `transport.streamableHttp.url`, a literal default of `PUBLIC_BASE_URL` in source, and `PUBLIC_BASE_URL=` in
371
+ `.env.example`. A host under a platform default domain is red: the 3449 rules of the Public Suffix List's private
372
+ section (Railway, Vercel, ngrok, Cloudflare tunnels, GitHub Pages, App Engine...), generated into the package by
373
+ `scripts/regen-psl-private.ts`, wildcards included. A default built by an
374
+ expression, or no URL declared at all, is could-not-judge. A loopback default (`localhost`, `127.0.0.0/8`, `::1`,
375
+ `0.0.0.0`) is a development address, not a public origin: alone it is could-not-judge ("only a development
376
+ default"), beside a public URL the public URL decides.
377
+ - **Transport:** a Streamable HTTP server transport (the S-22 forms, or the boilerplate's `buildHttpApp(`), or the
378
+ manifest's `transport.streamableHttp`. None is red.
379
+ - **Verification paths:** `chatgpt` needs `/.well-known/openai-apps-challenge` and `google-connected-apps` needs
380
+ `/.well-known/google-connected-apps`. The route must read its token from configuration. A literal token in source is
381
+ red, even as the fallback of a configuration read (`settings.x ?? "tok_..."`), and so is a missing route. An unknown host id is could-not-judge, named.
382
+
227
383
  ### Changes in 0.16.0 — S-28 follows resource read handlers and injected fetchers (standard `6870b775` = mcp-server-standard v2.10, PR #310)
228
384
 
229
385
  #### S-28 follows a fetcher handed to other code to where its door is named
@@ -269,6 +425,10 @@ the table each door writes and reads. It names each write that lacks a claim for
269
425
 
270
426
  ### Changes in 0.16.0 — distribution rules (standard `4ec4826b` = mcp-server-standard v2.9, mcp-standard v2.8)
271
427
 
428
+ | ID | Rule | The static run reads | Verdicts |
429
+ |----|------|----------------------|----------|
430
+ | **C36** readme-npm-limit | C-36 | the size of every root `readme*` file a published package ships, against the npm truncation point | absent (not published) / present / non-conforming / could-not-judge (package.json, the package root or a README that cannot be read) |
431
+
272
432
  #### C-36 reports a README past the npm truncation point
273
433
 
274
434
  npm truncates a package README at 65 536 bytes, so everything past that point is missing from the package page.
package/dist/doctor.d.ts CHANGED
@@ -133,6 +133,13 @@ interface DetectorResult {
133
133
  interface RuntimeTool {
134
134
  /** The tool name the server actually advertises at runtime (post-startup). */
135
135
  name: string;
136
+ /** The display title served (`title`, else `annotations.title`); C-35 compares a listing kit to it. */
137
+ title?: string;
138
+ /** The two behaviour hints a directory reads, as served (C-35). Unset when the tool serves no annotations. */
139
+ annotations?: {
140
+ readOnlyHint?: boolean;
141
+ destructiveHint?: boolean;
142
+ };
136
143
  /**
137
144
  * The description the server actually SERVES over `tools/list`, post-
138
145
  * startup — the surface C-19 measures (never the source-declared string,
@@ -239,6 +246,39 @@ type ServedAuthServer = {
239
246
  url: string;
240
247
  reason: string;
241
248
  };
249
+ /**
250
+ * One sign-in started at the served `authorization_endpoint` as a known CIMD client (S-46 served half): the
251
+ * redirect URI sent (read from the client's own metadata document) and the raw answer, never followed. The
252
+ * detector classifies it; the probe only records.
253
+ */
254
+ interface ServedAuthorizeAttempt {
255
+ redirect: string;
256
+ /** HTTP status; unset when no answer came (then `detail` says why). */
257
+ status?: number;
258
+ /** The Location answered, reduced to origin + path + its `error` parameter (no state, no code). */
259
+ location?: string;
260
+ /** The first 300 characters of a 4xx/5xx body. */
261
+ body?: string;
262
+ detail?: string;
263
+ }
264
+ type ServedAuthorizeClient = {
265
+ host: string;
266
+ clientId: string;
267
+ kind: "probed";
268
+ attempts: ServedAuthorizeAttempt[];
269
+ } | {
270
+ host: string;
271
+ clientId: string;
272
+ kind: "unavailable";
273
+ reason: string;
274
+ };
275
+ type ServedAuthorize = {
276
+ kind: "not-run";
277
+ reason: string;
278
+ } | {
279
+ kind: "probed";
280
+ clients: ServedAuthorizeClient[];
281
+ };
242
282
  /** What the running server SERVES that a source-tree read can only guess at. */
243
283
  interface ServedFacts {
244
284
  /** `capabilities` of the `initialize` response, as served. */
@@ -253,6 +293,8 @@ interface ServedFacts {
253
293
  calls: ServedList[];
254
294
  versionProbe: VersionProbe;
255
295
  authServer: ServedAuthServer;
296
+ /** S-46 served half: sign-ins started as each known CIMD client. Absent on records written before it existed. */
297
+ authorize?: ServedAuthorize;
256
298
  }
257
299
  /**
258
300
  * What the RUNNING target server exposes, gathered by launching it and speaking
@@ -321,6 +363,15 @@ interface RuntimeContext {
321
363
  * recorded none: a rule reading it says could-not-judge, naming that, never a pass.
322
364
  */
323
365
  served?: ServedFacts;
366
+ /**
367
+ * Over HTTP, when the MCP handshake itself failed (a 401 before any credential): the PUBLIC authorization reads
368
+ * the runtime still made — the authorization-server metadata and the S-46 sign-in attempts. Set only beside a
369
+ * `launchError`; a detector that reads it says the handshake was refused.
370
+ */
371
+ publicAuth?: {
372
+ authServer: ServedAuthServer;
373
+ authorize?: ServedAuthorize;
374
+ };
324
375
  }
325
376
  interface Detector {
326
377
  id: string;
@@ -437,6 +488,14 @@ interface HttpEndpoint {
437
488
  source?: string;
438
489
  /** The full 40-hex commit the server is expected to serve; wins over one derived from `source`. */
439
490
  expectedCommit?: string;
491
+ /**
492
+ * The CIMD clients the S-46 served half signs in as. Default: the known ones (targets.ts `CIMD_CLIENTS`). A
493
+ * caller (a test) may name others, e.g. a client document served on a loopback host.
494
+ */
495
+ clients?: ReadonlyArray<{
496
+ host: string;
497
+ clientId: string;
498
+ }>;
440
499
  }
441
500
  /**
442
501
  * Every secret value an `HttpEndpoint` carries: header values (and the token of an `Authorization: