inspector/clients/tui/__tests__
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
..
helpers fix: strip ANSI from TUI test frames so FORCE_COLOR cannot break assertions (#2207) 2026-09-06 20:00:15 -04:00
App.test.tsx feat: Skills extension phase 3 — CLI, TUI, directory reads, frontmatter check 2026-09-07 18:10:37 -04:00
AuthTab.test.tsx fix: strip ANSI from TUI test frames so FORCE_COLOR cannot break assertions (#2207) 2026-09-06 20:00:15 -04:00
DetailsModal.test.tsx fix: strip ANSI from TUI test frames so FORCE_COLOR cannot break assertions (#2207) 2026-09-06 20:00:15 -04:00
HistoryTab.test.tsx fix: strip ANSI from TUI test frames so FORCE_COLOR cannot break assertions (#2207) 2026-09-06 20:00:15 -04:00
InfoTab.test.tsx fix: strip ANSI from TUI test frames so FORCE_COLOR cannot break assertions (#2207) 2026-09-06 20:00:15 -04:00
logger.test.ts test: raise per-file coverage gate to 90 across all clients (closes #1271) (#1532) 2026-06-27 15:26:03 -04:00
NotificationsTab.test.tsx fix: strip ANSI from TUI test frames so FORCE_COLOR cannot break assertions (#2207) 2026-09-06 20:00:15 -04:00
oauthDisplay.test.ts Guided-auth removal, OAuth smoke testing, and TUI/CLI support (#1531) 2026-06-29 15:35:51 -04:00
oauthMessageTone.test.ts fix(auth): read enumerated issuers exactly, and stop the TUI tone going stale (#2144) 2026-08-28 02:58:04 -04:00
openUrl.test.ts test(cli,tui): add in-process source coverage gates (#1484) (#1502) 2026-06-20 15:05:58 -04:00
promptArgsToForm.test.ts test(cli,tui): add in-process source coverage gates (#1484) (#1502) 2026-06-20 15:05:58 -04:00
PromptsTab.test.tsx fix: strip ANSI from TUI test frames so FORCE_COLOR cannot break assertions (#2207) 2026-09-06 20:00:15 -04:00
PromptTestModal.test.tsx fix: strip ANSI from TUI test frames so FORCE_COLOR cannot break assertions (#2207) 2026-09-06 20:00:15 -04:00
renderTui.test.tsx fix: strip ANSI from TUI test frames so FORCE_COLOR cannot break assertions (#2207) 2026-09-06 20:00:15 -04:00
RequestsTab.test.tsx fix: strip ANSI from TUI test frames so FORCE_COLOR cannot break assertions (#2207) 2026-09-06 20:00:15 -04:00
ResourcesTab.test.tsx fix: strip ANSI from TUI test frames so FORCE_COLOR cannot break assertions (#2207) 2026-09-06 20:00:15 -04:00
ResourceTestModal.test.tsx fix: strip ANSI from TUI test frames so FORCE_COLOR cannot break assertions (#2207) 2026-09-06 20:00:15 -04:00
schemaToForm.test.ts fix: decline a union branch requiring a name it never declares (#2224) 2026-09-06 12:59:52 -04:00
SelectableItem.test.tsx fix: strip ANSI from TUI test frames so FORCE_COLOR cannot break assertions (#2207) 2026-09-06 20:00:15 -04:00
setup.ts test(tui): extend coverage gate to Ink components + App.tsx (closes #1501) (#1538) 2026-06-29 08:19:12 -04:00
SkillsTab.test.tsx feat: Skills extension phase 3 — CLI, TUI, directory reads, frontmatter check 2026-09-07 18:10:37 -04:00
Tabs.test.tsx feat: Skills extension phase 3 — CLI, TUI, directory reads, frontmatter check 2026-09-07 18:10:37 -04:00
ToolsTab.test.tsx fix: strip ANSI from TUI test frames so FORCE_COLOR cannot break assertions (#2207) 2026-09-06 20:00:15 -04:00
ToolTestModal.test.tsx fix: strip ANSI from TUI test frames so FORCE_COLOR cannot break assertions (#2207) 2026-09-06 20:00:15 -04:00
tsupConfig.test.ts chore(lint): enable no-floating-promises in all five ESLint scopes 2026-08-16 20:57:32 -04:00
tui-servers.test.ts Guided-auth removal, OAuth smoke testing, and TUI/CLI support (#1531) 2026-06-29 15:35:51 -04:00
tui.test.ts Fixed tab naming to correspond to the web client. (#1780) 2026-07-25 20:11:52 -04:00
tuiOAuth.test.ts test(cli,tui): typecheck the __tests__ dirs (#1791) (#1799) 2026-07-27 12:05:35 -04:00
uriTemplateToForm.test.ts fix: dedupe a repeated name in a group, and name every unmet requirement 2026-08-17 00:33:52 -04:00
useSelectableList.test.tsx fix: strip ANSI from TUI test frames so FORCE_COLOR cannot break assertions (#2207) 2026-09-06 20:00:15 -04:00