inspector/clients/web/src/hooks
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
..
useConnectionLifecycle.test.tsx fix: usable IPv6 spelling, and drop a SEP label that means something else here (round 2) 2026-09-07 09:54:17 -04:00
useConnectionLifecycle.ts refactor: one shared reporter for the terminal refusal (review round 4) 2026-09-07 10:59:56 -04:00
useExportActions.test.tsx feat(web): use the Ace JSON editor everywhere, and restore the raw-JSON toggle 2026-08-27 02:24:22 -04:00
useExportActions.ts feat(web): use the Ace JSON editor everywhere, and restore the raw-JSON toggle 2026-08-27 02:24:22 -04:00
useImportClientConfig.test.tsx fix(web): stop the remaining consumers calling a landed write a failure 2026-08-23 10:14:22 -04:00
useImportClientConfig.ts fix(web): stop the remaining consumers calling a landed write a failure 2026-08-23 10:14:22 -04:00
useInspectorStores.test.tsx fix: address Copilot review round 13 on #2251 2026-09-05 01:40:28 -04:00
useInspectorStores.ts fix: address Copilot review round 13 on #2251 2026-09-05 01:40:28 -04:00
useLastPersistedSettings.test.tsx chore: address Copilot review round 3 (#2192) 2026-08-30 00:38:41 -04:00
useLastPersistedSettings.ts chore: address Copilot review round 3 (#2192) 2026-08-30 00:38:41 -04:00
useMcpApps.test.tsx chore(web): extract App.tsx's MCP Apps wiring into useMcpApps 2026-08-26 23:53:12 -04:00
useMcpApps.ts chore(web): resolve the react-hooks findings the decomposition unmasked (#2161) 2026-08-29 01:43:20 -04:00
useOAuthRecovery.test.tsx fix: usable IPv6 spelling, and drop a SEP label that means something else here (round 2) 2026-09-07 09:54:17 -04:00
useOAuthRecovery.ts refactor: one shared reporter for the terminal refusal (review round 4) 2026-09-07 10:59:56 -04:00
usePaginatedList.test.tsx fix: surface list-fetch failures in paginated mode (#1998) 2026-08-17 20:40:23 -04:00
usePaginatedList.ts fix: surface list-fetch failures in paginated mode (#1998) 2026-08-17 20:40:23 -04:00
usePaginatedListsOverride.test.tsx fix: keep the pagination toggle on the last write across a server switch (#2095) 2026-08-25 20:20:57 -04:00
usePaginatedListsOverride.ts fix: resolve the servers list outside the override's state updater (#2095) 2026-08-25 20:33:14 -04:00
useProgressToasts.test.tsx fix: swap the toast ref Set on teardown instead of clearing it (#2219) 2026-09-05 23:33:07 -04:00
useProgressToasts.ts fix: swap the toast ref Set on teardown instead of clearing it (#2219) 2026-09-05 23:33:07 -04:00
useSchemaFindingsExpanded.test.tsx feat(web): collapse the schema-portability section by default (#2205) 2026-09-06 23:52:34 -04:00
useSchemaFindingsExpanded.ts feat(web): collapse the schema-portability section by default (#2205) 2026-09-06 23:52:34 -04:00
useScrollMemory.test.tsx feat(web): tool progress toasts + persist all per-screen state across navigation (#1414, #1417) (#1420) 2026-06-03 12:46:37 -04:00
useScrollMemory.ts feat(web): tool progress toasts + persist all per-screen state across navigation (#1414, #1417) (#1420) 2026-06-03 12:46:37 -04:00
useServerCommands.test.tsx feat: Skills extension phase 3 — CLI, TUI, directory reads, frontmatter check 2026-09-07 18:10:37 -04:00
useServerCommands.tsx feat: Skills extension phase 3 — CLI, TUI, directory reads, frontmatter check 2026-09-07 18:10:37 -04:00
useServerJsonImport.test.tsx chore: close a batch of quality-gate & tidy gaps (#1785 #1787 #1789 #1790 #1767) (#1792) 2026-07-26 10:43:11 -04:00
useServerJsonImport.ts chore: close a batch of quality-gate & tidy gaps (#1785 #1787 #1789 #1790 #1767) (#1792) 2026-07-26 10:43:11 -04:00
useSessionRef.test.tsx chore(web): extract App.tsx's OAuth recovery cluster into useOAuthRecovery (#2153) 2026-08-26 23:00:12 -04:00
useSessionRef.ts chore(web): extract App.tsx's OAuth recovery cluster into useOAuthRecovery (#2153) 2026-08-26 23:00:12 -04:00
useTabUiState.test.tsx chore(web): address Copilot review on #2128 2026-08-26 19:58:02 -04:00
useTabUiState.ts feat: support the Skills extension (SEP-2640) with digest verification 2026-09-04 20:45:15 -04:00
useTaskToasts.test.tsx fix: swap the toast ref Set on teardown instead of clearing it (#2219) 2026-09-05 23:33:07 -04:00
useTaskToasts.ts fix: swap the toast ref Set on teardown instead of clearing it (#2219) 2026-09-05 23:33:07 -04:00
useThemeToggle.test.tsx chore(web): extract App.tsx's leaf hooks (#2128) 2026-08-26 19:42:16 -04:00
useThemeToggle.ts chore(web): extract App.tsx's leaf hooks (#2128) 2026-08-26 19:42:16 -04:00
useValueChange.test.tsx chore(deps): migrate to eslint 10 to clear the brace-expansion DoS advisory (#1900) 2026-08-01 20:13:30 -04:00
useValueChange.ts chore(deps): migrate to eslint 10 to clear the brace-expansion DoS advisory (#1900) 2026-08-01 20:13:30 -04:00