Files
reverse-engineering-anything/src/config/types.ts
T
morluto 960a387731 refactor(contracts): own CLI command names, catalog identity and schema presentation in contracts (#11425)
* refactor(contracts): move the CLI command name owner into src/contracts

* refactor(contracts): own catalog identity in contracts and server identity in process (#11435)

* refactor(contracts): move catalog identity into contracts and server identity into process

* refactor(contracts): own the advertised MCP schema presentation in contracts

* test(mcp): import the advertised presentation from contracts in toolSchemaValidity

* test(release): expect the catalog identity at its contracts path in the canary

* test(mcp): import the catalog identity from contracts in syntheticContractSurfaces

* refactor(contracts): import CLI command names from contracts in the capability conformance test
2026-11-16 05:31:37 +08:00

76 lines
3.9 KiB
TypeScript

import type { GhidraProjectSelection } from "./ghidraExistingProject.js";
import type { McpToolFamilies } from "./mcpToolFamilies.js";
import type { LogLevel } from "./processStart.js";
import type { ReferenceSourcePolicy } from "../domain/referenceSourcePolicy.js";
import type { AnalysisProviderSelector } from "../domain/providerSelection.js";
import type { GhidraLanguageOverride } from "./ghidraLanguageOverride.js";
import type { McpToolCatalogProfile } from "./mcpToolCatalogProfile.js";
import type { BridgeMaxRequestBytes } from "./bridgeMaxRequestBytes.js";
import type { BridgeMaxReplyBytes } from "./bridgeMaxReplyBytes.js";
import type { RegexMatchingDeadline } from "./regexMatchingDeadline.js";
import type { RegexWorkerHeapRequest } from "./regexWorkerHeapRequest.js";
import type { HopperCallerScanBudget } from "./hopperCallerScanBudget.js";
import type { ConfigurationError } from "../domain/configurationErrors.js";
import type { AnalysisSettingId } from "../domain/analysisSettings.js";
import type { McpOutputSchemaProfile } from "../contracts/mcpSchemaPresentation.js";
export interface AppConfig {
readonly mcpToolFamilies?: readonly McpToolFamilies[number][];
readonly mcpMaxResponseBytes?: number;
readonly mcpMaxInputElements?: number;
readonly mcpOutputSchemaProfile?: McpOutputSchemaProfile;
readonly mcpToolCatalogProfile?: McpToolCatalogProfile;
readonly analysisProvider: AnalysisProviderSelector;
readonly idaMcpConfigPath?: string;
readonly ghidraInstallDir: string | undefined;
readonly ghidraJavaHome: string | undefined;
readonly ghidraStartupTimeoutMs: number;
/** Per-function native decompiler limit; absent leaves decompiles unbounded. */
readonly ghidraDecompileTimeoutSeconds?: number | undefined;
readonly ghidraDecompileMaxPayloadMiB?: number | undefined;
readonly ghidraValueFlowMaxOperations?: number;
readonly ghidraValueFlowMaxInputsPerOperation?: number;
readonly ghidraValueFlowMaxEdges?: number;
readonly ghidraLanguageOverride?: GhidraLanguageOverride;
readonly ghidraDisabledAnalyzers?: readonly string[];
readonly ghidraSeedFile?: string;
readonly ghidraExistingProject?: GhidraProjectSelection;
/** Opt-in storage for checkpoints of REA-owned Ghidra Programs. */
readonly ghidraCheckpointDirectory?: string;
readonly ghidraNativeAotJar?: string;
readonly ilspyCmdPath: string | undefined;
/**
* The caller's `HOPPER_LAUNCHER_PATH`, unchanged. Undefined selects
* automatic discovery, which the Hopper provider performs
* (src/hopperPaths/HopperLauncherDiscovery.ts).
*/
readonly hopperLauncherPath: string | undefined;
readonly hopperStartupTimeoutMs: number;
/** Whether `hopperStartupTimeoutMs` came from the launch environment. */
readonly hopperStartupTimeoutSource: "default" | "setting" | "runtime";
/** Cooperative per-operation budget for forward caller reconciliation. */
readonly hopperCallerScanBudget: HopperCallerScanBudget;
readonly hopperTargetPath: string | undefined;
readonly hopperTargetKind: "executable" | "database";
readonly hopperLoaderArgs: readonly string[];
readonly logLevel: LogLevel;
readonly referenceSourcePolicy: ReferenceSourcePolicy;
/** Hopper and Cutter request payload ceiling resolved at startup. */
readonly bridgeMaxRequestBytes: BridgeMaxRequestBytes;
/** Hopper and Ghidra reply line ceiling resolved at startup. */
readonly bridgeMaxReplyBytes: BridgeMaxReplyBytes;
/** Supervised ECMAScript matching deadline resolved at startup. */
readonly regexMatchingDeadline: RegexMatchingDeadline;
/** Regex worker old-generation request resolved at startup. */
readonly regexWorkerHeapRequest: RegexWorkerHeapRequest;
/**
* Malformed runtime launch seeds. The numeric fields keep a placeholder so
* startup can spread this object; the operation view rejects the seed unless
* a snapshot override is active.
*/
readonly invalidRuntimeSeeds?: Readonly<
Partial<Record<AnalysisSettingId, ConfigurationError>>
>;
}