Phase 5: Lift ServerEntry into core/mcp/types.ts
ServerEntry was previously defined as `Pick<ServerCardProps, ...>` in ServerListScreen, inverting the natural dependency direction (data shape derived from a UI prop type). Phase 5's cleanup pass calls this out specifically. Move the canonical ServerEntry into core/mcp/types.ts and have ServerCardProps extend it. ServerListScreen, InspectorView, and their stories now import ServerEntry from core directly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
56abced72b
commit
c5d02456e0
1 changed files with 23 additions and 22 deletions
|
|
@ -70,6 +70,21 @@ export interface ConnectionState {
|
|||
error?: { message: string; details?: string };
|
||||
}
|
||||
|
||||
/**
|
||||
* One server entry as seen by the UI: identity, transport config, optional
|
||||
* `Implementation` info reported during `initialize`, and the current
|
||||
* connection snapshot. Cards/screens spread this onto presentational props.
|
||||
*/
|
||||
export interface ServerEntry {
|
||||
/** Stable unique identifier — the MCPConfig.mcpServers map key. */
|
||||
id: string;
|
||||
/** Display label shown in the card header. May or may not equal id. */
|
||||
name: string;
|
||||
config: MCPServerConfig;
|
||||
info?: Implementation;
|
||||
connection: ConnectionState;
|
||||
}
|
||||
|
||||
export interface StderrLogEntry {
|
||||
timestamp: Date;
|
||||
message: string;
|
||||
|
|
|
|||
Loading…
Reference in a new issue