返回 DeepSeek-Reasonix
server_status.go
根目录 / internal / plugin / server_status.go
1 package plugin
2
3 import "reasonix/internal/tool"
4
5 // ToolInfo is the human-facing metadata returned by MCP tools/list for one tool.
6 type ToolInfo struct {
7 Name string
8 Description string
9 ReadOnlyHint bool
10 DestructiveHint bool
11 SchemaError string
12 }
13
14 // ServerStatus summarises one connected server for the /mcp command.
15 type ServerStatus struct {
16 Name string
17 Transport string
18 // ConfigSource is the config plane that registered this server
19 // (user_config, project_config, workspace, built-in, …). Empty when unknown.
20 // Surfaced in /mcp status so operators can tell where a tool came from (#6578).
21 ConfigSource string
22 Tools int
23 Prompts int
24 Resources int
25 HasTools bool
26 ToolList []ToolInfo
27 ToolBindings []tool.MCPBinding `json:"-"`
28 ProtocolVersion string
29 SessionState SessionState
30 SessionIDPresent bool
31 ReconnectAttempts int
32 LastErrorKind SessionErrorKind
33 LastError string
34 // HostProfile is the client-capability profile this host declares
35 // ("core-v1", "interactive-v1", "desktop-apps-2026-01-26-v1").
36 HostProfile string
37 // ElicitationNegotiated reports that the client declared elicitation and
38 // the session runs a protocol revision where the server can use it.
39 ElicitationNegotiated bool
40 // AppsNegotiated reports two-way MCP Apps agreement: the client declared
41 // io.modelcontextprotocol/ui and the server answered with the extension.
42 AppsNegotiated bool
43 }
44
44 lines GO