@agent-inspect/mcp-server 6.10.0 → 6.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -22,6 +22,27 @@ declare function createMcpServerContext(options?: {
22
22
  redactionProfile?: "local" | "share" | "strict";
23
23
  }): McpServerContext;
24
24
 
25
+ /** MCP protocol version advertised by this server (stdio flagship path). */
26
+ declare const MCP_PROTOCOL_VERSION = "2024-11-05";
27
+ /** Reject single-line JSON-RPC frames larger than this (bytes, UTF-8). */
28
+ declare const MCP_MAX_REQUEST_BYTES = 1048576;
29
+ type ProtocolWrite = (line: string) => void;
30
+ interface ProtocolSession {
31
+ context: McpServerContext;
32
+ serverName: string;
33
+ serverVersion: string;
34
+ write: ProtocolWrite;
35
+ /** In-flight tool calls keyed by JSON-RPC request id. */
36
+ inflight: Map<string, AbortController>;
37
+ }
38
+ /**
39
+ * Handle one JSON-RPC line for the read-only MCP server.
40
+ *
41
+ * Uses a hardened hand-written protocol layer (not the full HTTP-capable MCP SDK)
42
+ * so the package stays dependency-light for local stdio. See docs/CODING-AGENT-LOOP.md.
43
+ */
44
+ declare function handleMcpProtocolLine(session: ProtocolSession, line: string): Promise<void>;
45
+
25
46
  interface RunReadOnlyMcpServerOptions {
26
47
  traceDir?: string;
27
48
  maxEvents?: number;
@@ -31,4 +52,4 @@ interface RunReadOnlyMcpServerOptions {
31
52
  }
32
53
  declare function runReadOnlyMcpServer(options?: RunReadOnlyMcpServerOptions): Promise<void>;
33
54
 
34
- export { READ_ONLY_TOOLS, type RunReadOnlyMcpServerOptions, callReadOnlyTool, createMcpServerContext, runReadOnlyMcpServer };
55
+ export { MCP_MAX_REQUEST_BYTES, MCP_PROTOCOL_VERSION, READ_ONLY_TOOLS, type RunReadOnlyMcpServerOptions, callReadOnlyTool, createMcpServerContext, handleMcpProtocolLine, runReadOnlyMcpServer };
package/dist/index.d.ts CHANGED
@@ -22,6 +22,27 @@ declare function createMcpServerContext(options?: {
22
22
  redactionProfile?: "local" | "share" | "strict";
23
23
  }): McpServerContext;
24
24
 
25
+ /** MCP protocol version advertised by this server (stdio flagship path). */
26
+ declare const MCP_PROTOCOL_VERSION = "2024-11-05";
27
+ /** Reject single-line JSON-RPC frames larger than this (bytes, UTF-8). */
28
+ declare const MCP_MAX_REQUEST_BYTES = 1048576;
29
+ type ProtocolWrite = (line: string) => void;
30
+ interface ProtocolSession {
31
+ context: McpServerContext;
32
+ serverName: string;
33
+ serverVersion: string;
34
+ write: ProtocolWrite;
35
+ /** In-flight tool calls keyed by JSON-RPC request id. */
36
+ inflight: Map<string, AbortController>;
37
+ }
38
+ /**
39
+ * Handle one JSON-RPC line for the read-only MCP server.
40
+ *
41
+ * Uses a hardened hand-written protocol layer (not the full HTTP-capable MCP SDK)
42
+ * so the package stays dependency-light for local stdio. See docs/CODING-AGENT-LOOP.md.
43
+ */
44
+ declare function handleMcpProtocolLine(session: ProtocolSession, line: string): Promise<void>;
45
+
25
46
  interface RunReadOnlyMcpServerOptions {
26
47
  traceDir?: string;
27
48
  maxEvents?: number;
@@ -31,4 +52,4 @@ interface RunReadOnlyMcpServerOptions {
31
52
  }
32
53
  declare function runReadOnlyMcpServer(options?: RunReadOnlyMcpServerOptions): Promise<void>;
33
54
 
34
- export { READ_ONLY_TOOLS, type RunReadOnlyMcpServerOptions, callReadOnlyTool, createMcpServerContext, runReadOnlyMcpServer };
55
+ export { MCP_MAX_REQUEST_BYTES, MCP_PROTOCOL_VERSION, READ_ONLY_TOOLS, type RunReadOnlyMcpServerOptions, callReadOnlyTool, createMcpServerContext, handleMcpProtocolLine, runReadOnlyMcpServer };