Files
reverse-engineering-anything/src/domain/analysisSettings.ts
T
Kaoru0822andClaude Opus 5.5 87d3d6022c feat(native): make the function-matching allowance a runtime setting
match_native_functions refused inventories above its fixed 96 MiB
representation allowance with "This release has no runtime override", so
ordinary 20k-50k function builds could not be matched at all.

Add native.matching_representation_bytes (1 byte to 1 GiB, default 96 MiB,
next operation) with the REA_NATIVE_MATCHING_REPRESENTATION_BYTES launch seed,
copied by rea setup. MCP resolves the accepted operation's override over the
launch value on each call; the CLI uses its launch environment. A refusal
binds details.limit with the effective value, source and bounds, and its
recovery names the setting and the seed. An invalid seed is refused by
matching alone, so MCP stays available and a runtime value repairs it.

Fixes #6406

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 09:48:25 +00:00

39 lines
1.7 KiB
TypeScript

/** Runtime policy overrides, separate from target state and launch environment. */
export interface AnalysisSettingValues {
readonly "asar.max_header_bytes": number;
readonly "ghidra.startup_timeout_ms": number;
readonly "hopper.startup_timeout_ms": number;
readonly "ghidra.decompile_timeout_seconds": number | null;
readonly "jadx.operation_timeout_ms": number;
readonly "regex.matching_deadline_ms": number;
readonly "regex.worker_heap_request_mib": number;
readonly "capture.decoder_old_generation_mib": number;
readonly "javascript.analysis_timeout_ms": number;
readonly "javascript.max_heap_mb": number;
readonly "wasm.command_timeout_ms": number;
readonly "native.matching_representation_bytes": number;
}
export type AnalysisSettingId = keyof AnalysisSettingValues;
export interface AnalysisSettingsSnapshot {
readonly revision: number;
readonly overrides: Readonly<Partial<AnalysisSettingValues>>;
}
/** Injected by the runtime owner; reads the accepted operation's immutable snapshot. */
export type AnalysisSettingsReader = () => AnalysisSettingsSnapshot;
/** Limit facts supplied by the failing owner, never inferred from error prose. */
export interface AnalysisSettingLimit {
readonly setting: AnalysisSettingId;
readonly effective_value: number | null;
readonly unit: "bytes" | "ms" | "seconds" | "MiB";
readonly minimum: number;
readonly maximum: number;
readonly source?: "default" | "setting" | "runtime" | "request";
readonly applies_at: "next_operation" | "next_worker" | "next_startup";
readonly agent_editable: true;
readonly scope: "rea-runtime";
readonly rea_restart_required: false;
readonly required_value?: number;
readonly parameter?: string;
}