inspector/core/mcp/state
Repository files (latest commit first)
Filename Latest commit message Latest commit date
cliffhall 9a8488681e feat: Skills extension phase 3 — CLI, TUI, directory reads, frontmatter check
Closes #2248.

Completes SEP-2640 support across all three clients, and closes the one
obligation #2234 deliberately left open.

- `checkSkillFrontmatterMatch` compares a served SKILL.md's own YAML
  frontmatter against the entry the listing advertised, field by field. No
  digest can cover this: a digest is taken over the bytes the server served,
  so it proves the file was not altered in transit and says nothing about
  whether the listing described it honestly. Needs a real YAML parser; `yaml`
  was already a root dependency, so this adds no package — but it does newly
  put it on core/'s import graph, hence the three bundler `external` lists.

- `resources/directory/read`: result schemas defined against the normative
  text, `InspectorClient.readResourceDirectory`, a Directory section on the
  Skills screen, and `--method resources/directory/read` in the CLI. The
  client refuses the call locally when the server did not declare
  `directoryRead`, which is the SEP's MUST NOT. A child the directory lists
  but the entry does not is marked `not listed` rather than merged into the
  manifest — the SEP calls a directory result a live observation and forbids
  treating it as extending the manifest.

- CLI: `skills/list`, `skills/get` and `resources/directory/read`, plus
  `--verify` — one NDJSON report per skill, a summary on stderr, exit 7 on a
  violation. Reads are sequential; a conforming manifest may declare 512
  entries.

- TUI: a Skills pane, shown only when the server declares the extension. Each
  row carries its conformance verdict as a glyph as well as a colour, since
  the pane is read over ssh and through script(1). Enter verifies.

- `verifySkills` re-throws `AuthRecoveryRequiredError` rather than recording
  it per file: it says the session's authorization expired, so absorbing it
  would report N identical read failures and swallow the error the TUI and
  the web commands key off to reauthorize.

Two open questions settled, both in code comments where they will be found:
`skills/get` carries no caching attributes because SEP-2640 leaves the
question open in as many words, so requiring them would fail a conforming
server; and there is no `PagedSkillsState` because every consumer of this
list is a whole-catalog verdict — computed over page one of three, "this
server's skills conform" is not merely partial but wrong.

The fixture grows two skills, both for checks that were otherwise
undemonstrable: `lying-listing` (listing and file disagree, digest still
verifies) and `stale-manifest` (serves a file its manifest does not declare).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ND46Ci64DC3tzBy9aG81Nc
Signed-off-by: cliffhall <cliff@futurescale.com>
2026-09-07 18:10:37 -04:00
..
fetchRequestLogState.ts Thread cacheMode through managed list refresh via SDK cache-aware verbs (#1721) (#1723) 2026-07-19 01:06:31 -04:00
index.ts feat: support the Skills extension (SEP-2640) with digest verification 2026-09-04 20:45:15 -04:00
managedListState.ts feat: allow complex JSON values in request _meta 2026-08-23 12:23:40 -04:00
managedPromptsState.ts fix: surface list-fetch failures instead of swallowing them 2026-08-08 16:48:48 -04:00
managedRequestorTasksState.ts fix: walk past an empty-string cursor in the legacy task refresh (#2220) 2026-09-06 13:59:51 -04:00
managedResourcesState.ts fix: surface list-fetch failures instead of swallowing them 2026-08-08 16:48:48 -04:00
managedResourceTemplatesState.ts fix: surface list-fetch failures instead of swallowing them 2026-08-08 16:48:48 -04:00
managedSkillsState.ts feat: Skills extension phase 3 — CLI, TUI, directory reads, frontmatter check 2026-09-07 18:10:37 -04:00
managedToolsState.ts fix: surface list-fetch failures instead of swallowing them 2026-08-08 16:48:48 -04:00
mergeTaskIntoList.ts SDK v2 migration (behavior-neutral, versionNegotiation: 'legacy') (#1624) 2026-07-15 10:44:24 -04:00
messageLogState.ts fix: surface list-fetch failures instead of swallowing them 2026-08-08 16:48:48 -04:00
pagedPromptsState.ts feat: allow complex JSON values in request _meta 2026-08-23 12:23:40 -04:00
pagedRequestorTasksState.ts SDK v2 migration (behavior-neutral, versionNegotiation: 'legacy') (#1624) 2026-07-15 10:44:24 -04:00
pagedResourcesState.ts feat: allow complex JSON values in request _meta 2026-08-23 12:23:40 -04:00
pagedResourceTemplatesState.ts feat: allow complex JSON values in request _meta 2026-08-23 12:23:40 -04:00
pagedToolsState.ts fix: surface list-fetch failures in paginated mode (#1998) 2026-08-17 20:40:23 -04:00
resourceSubscriptionsState.ts chore: close quality-gate coverage gaps (#1689) (#1766) 2026-07-24 17:20:12 -04:00
stderrLogState.ts feat(core): port v1.5 hook layer (#1243) (#1300) 2026-05-13 17:43:07 -04:00