Skip to content

armgit / rea

Public Imported from GitHub
0

Reverse engineer anything with agents, from app behavior down to native binaries.

refactor(server): use canonical elicitation type

morlutobb6a58c2a7ee
diff --git a/src/server/createServer.ts b/src/server/createServer.ts
index fce31b84f..4d5f9178b 100644
--- a/src/server/createServer.ts
+++ b/src/server/createServer.ts
@@ -5,7 +5,6 @@ import {
createRequestStateCodec,
McpServer,
PROTOCOL_VERSION_META_KEY,
- type ServerContext,
} from "@modelcontextprotocol/server";
import type { AnalysisOperationPort } from "../application/AnalysisProvider.js";
@@ -31,6 +30,7 @@ import { SystemJavaScriptReplayHost } from "../replay/SystemJavaScriptReplayHost
import { mcpEnvelopeValue } from "./mcpClientMetadata.js";
import {
PROCESS_CAPTURE_ELICITATION_POLICY,
+ type ProcessCaptureElicitation,
type ProcessCaptureElicitationState,
} from "./ProcessCaptureElicitation.js";
import { registerApplicationTools } from "./registerApplicationTools.js";
@@ -101,17 +101,6 @@ const installSessionToolAvailability = (
};
};
-type ProcessCaptureElicitation = {
- readonly stateCodec: ReturnType<
- typeof createRequestStateCodec<ProcessCaptureElicitationState>
- >;
- readonly supported: (context: {
- readonly mcpReq: Pick<ServerContext["mcpReq"], "envelope">;
- }) => boolean;
- readonly now: typeof Date.now;
- readonly consumedNonces: Map<string, number>;
-};
-
const createProcessCaptureElicitation = (
stateCodec: ProcessCaptureElicitation["stateCodec"],
): ProcessCaptureElicitation => ({