perf(flutter): add opt-in retained AOT summary and string pages
Add explicit MCP Dart AOT summary delivery and exact retained string-pool pages while preserving complete defaults, CLI behavior, ABI selection, original Evidence identity, partial coverage and lower bounds. Real LocalSend SDK replies shrink 92.05% with approximately unchanged SDK time. Two actual Codex pairs preserve all selected facts and reduce total input 48.75% / 42.38%, uncached input 33.63% / 42.52%, and task time 23.95% / 30.30%; all client errors/repeated calls remain counted. Preserve old portable Evidence and the real CLI complete result after rebasing onto SAZ/qlog main. Curated results keep measured and integration runtime pins separate; raw artifacts stay outside Git. Refs #2016. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
parent
bb154d1067
commit
23de4f77c7
@@ -444,6 +444,7 @@ export const createServer = (
|
||||
toolLogger,
|
||||
recordEvidence,
|
||||
analysisAdmission,
|
||||
evidenceById,
|
||||
);
|
||||
registerApktoolTools(
|
||||
server,
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
import type { EvidenceMcpServer } from "./EvidenceMcpServer.js";
|
||||
import type { EvidenceWriter } from "../application/investigation/InvestigationRecordPort.js";
|
||||
import { FlutterBuildAnalysisService } from "../application/flutter/FlutterBuildAnalysisService.js";
|
||||
import { inspectDartAot } from "../application/flutter/DartAotInspection.js";
|
||||
import type { EvidenceLookup } from "../application/EvidenceInputResolver.js";
|
||||
import { toolContract } from "../contracts/toolContracts.js";
|
||||
import type { WithAdmittedAnalysis } from "./analysisAdmission.js";
|
||||
import type { Logger } from "pino";
|
||||
import { createContractToolHandler } from "./contractToolHandler.js";
|
||||
import {
|
||||
createContractToolHandler,
|
||||
type ContractToolService,
|
||||
} from "./contractToolHandler.js";
|
||||
import { toolRegistrationOptions } from "./toolRegistrationOptions.js";
|
||||
|
||||
/** Bind Flutter handlers to their exact named contracts through admission. */
|
||||
@@ -14,6 +19,7 @@ export const registerFlutterTools = (
|
||||
logger: Logger,
|
||||
recordEvidence?: EvidenceWriter["recordEvidence"],
|
||||
withAdmittedAnalysis?: WithAdmittedAnalysis,
|
||||
evidenceById?: EvidenceLookup,
|
||||
): void => {
|
||||
const handler = createContractToolHandler(
|
||||
server,
|
||||
@@ -22,14 +28,23 @@ export const registerFlutterTools = (
|
||||
recordEvidence,
|
||||
withAdmittedAnalysis,
|
||||
);
|
||||
for (const contract of [
|
||||
toolContract("identify_flutter_build"),
|
||||
toolContract("inspect_dart_aot"),
|
||||
] as const) {
|
||||
server.registerTool(
|
||||
contract.name,
|
||||
toolRegistrationOptions(contract),
|
||||
handler(contract),
|
||||
);
|
||||
}
|
||||
const identify = toolContract("identify_flutter_build");
|
||||
server.registerTool(
|
||||
identify.name,
|
||||
toolRegistrationOptions(identify),
|
||||
handler(identify),
|
||||
);
|
||||
const aotService: ContractToolService<"inspect_dart_aot"> = {
|
||||
execute: (_operation, input, options) =>
|
||||
inspectDartAot(service, input, { recordEvidence, evidenceById }, options),
|
||||
};
|
||||
const aotHandler = createContractToolHandler(
|
||||
server,
|
||||
aotService,
|
||||
logger,
|
||||
recordEvidence,
|
||||
withAdmittedAnalysis,
|
||||
);
|
||||
const aot = toolContract("inspect_dart_aot");
|
||||
server.registerTool(aot.name, toolRegistrationOptions(aot), aotHandler(aot));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user