fabro/lib
Scott Werner e2021f3cb0 fix(server): return credential-omitting view; align display_name with spec
The mcp-servers handlers serialized the internal McpServerDefinition, which
diverged from the OpenAPI `McpServer` schema (and the generated TS client) two
ways: the field is `display_name` not `name`, and read responses use
`McpTransportView` (env/header *names* only) rather than the full transport with
values. So a spec-conformant client could neither create/replace (requests send
`display_name`, rejected by deny_unknown_fields) nor read the returned fields,
and stored env/header secret values were echoed back on GET/list.

- Rename `name` -> `display_name` across the domain and persistence types so the
  write bodies match `CreateMcpServerRequest`/`ReplaceMcpServerRequest`.
- Add `McpServerView`/`McpTransportView` read projections (sorted, value-omitting
  `env_keys`/`header_keys`) and return them from every read/write response.
- Map `McpServer` -> `McpServerView` and `McpTransportView` via with_replacement;
  `McpServerDefinition` is no longer a wire type.
- Rewrite the parity test to assert the spec JSON shape (display_name + view
  transport) instead of round-tripping the internal model, and assert the view
  omits values in the handler integration tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 13:04:01 -04:00
..
crates fix(server): return credential-omitting view; align display_name with spec 2026-06-30 13:04:01 -04:00
packages/fabro-api-client feat(server): mcp-servers HTTP API — handlers, type reuse, TS client 2026-06-30 13:04:01 -04:00