Files
reverse-engineering-anything/scripts/lib/owned-mcp-stdio.mjs
T
morluto 80486e2d34 refactor(domain): charge seven remaining hand-written allowances through Budget (#11419)
* refactor(domain): charge seven remaining hand-written allowances through Budget

Projection work, Kuna run slots, HTTP dispatch slots, marshal object counts, kept deleted environment entities, MCP operation output and route-scan facts and work now charge Budget instead of adjusting a field and comparing it with a limit. The budget-arithmetic baseline drops from 11 to 4; the four left are a scan cursor, a token string and two output tallies that admit then trim, which are not allowances.

* fix(process): omit the verifier transport's operation byte limit instead of passing Infinity
2026-11-16 04:19:46 +08:00

25 lines
937 B
JavaScript

import { importVerifierSource } from "./verifier-source-loader.mjs";
let implementation;
/** Create an SDK-compatible transport which retains the exact process owner. */
export async function createOwnedMcpStdioTransport(options) {
implementation ??= importVerifierSource(
new URL("../../src/process/OwnedMcpStdioTransport.ts", import.meta.url)
.href,
import.meta.url,
);
const { OwnedMcpStdioTransport } = await implementation;
return new OwnedMcpStdioTransport(options, {
provider: "artifact-verifier",
label: "Artifact verifier",
// Match the SDK's default maximum buffered stdio message size.
maxFrameBytes: 10 * 1024 * 1024,
// Unlike the JADX adapter, artifact verifiers do not impose a cumulative
// per-connection output limit, so maxOperationBytes is omitted; the SDK
// bounds each buffered message.
gracefulInputCloseMs: 2000,
maxDiagnosticBytes: 64 * 1024,
});
}