Files
rea/src/server/registerNativeTools.ts
T
N0zoM1z0 61b6408bb7 feat(windows): capture selected windows with bounded owned helpers
Follow up #2199 and #2183. Replace invalid cross-process WM_PRINT DC delivery with PrintWindow in one owned, deadline- and memory-bounded helper. Return metadata summaries by default through MCP with explicit retained image reads.

Verified actual pixels through CLI and MCP on Windows x64, including a non-elevated desktop, live redraws, PNG capacity refusal and retry, and target identity rejection. Final expanded acceptance and CI results are recorded in the pull request.
2026-10-15 22:15:15 +08:00

29 lines
960 B
TypeScript

import type { EvidenceMcpServer } from "./EvidenceMcpServer.js";
import { NATIVE_TOOL_CONTRACTS } from "../contracts/native/nativeToolContracts.js";
import { registerEvidenceTools } from "./registerEvidenceTools.js";
import {
retainedSummaryDelivery,
withoutDeliveryDetail,
type EvidenceToolFamilyOptions,
} from "./retainedSummaryDelivery.js";
const SUMMARY_DELIVERY: ReadonlySet<string> = new Set([
"inspect_macho",
"capture_windows_window_screenshot",
]);
/** Register native contracts with caller-selected retained summaries. */
export const registerNativeTools = (
server: EvidenceMcpServer,
options: EvidenceToolFamilyOptions,
): void => {
const withoutDelivery = withoutDeliveryDetail(SUMMARY_DELIVERY);
registerEvidenceTools(server, NATIVE_TOOL_CONTRACTS, {
...options,
...retainedSummaryDelivery(SUMMARY_DELIVERY, options),
parametersForExecution: withoutDelivery,
parametersForEvidence: withoutDelivery,
});
};