refactor(tools): remove artificial analysis ceilings

This commit is contained in:
morluto
2026-09-29 16:29:23 +08:00
parent 36aeec9586
commit 2f08c7c932
202 changed files with 2314 additions and 3072 deletions
+17 -14
View File
@@ -20,7 +20,6 @@ export interface GhidraWireOptions {
number,
Result<JsonValue, GhidraSessionError>
>;
readonly requestTimeoutMs: number;
readonly logger: Logger;
readonly failure: (
kind: GhidraSessionFailureKind,
@@ -55,28 +54,32 @@ export class GhidraWire {
this.#options.failure("cancelled", "Ghidra request was cancelled"),
);
const id = this.#options.nextId();
const timeoutMs = options.timeoutMs ?? this.#options.requestTimeoutMs;
if (timeoutMs <= 0)
if (options.timeoutMs !== undefined && options.timeoutMs <= 0)
return err(
this.#options.failure(
"timeout",
"Ghidra request deadline elapsed",
undefined,
{ timeoutMs },
{ timeoutMs: options.timeoutMs },
),
);
const timeoutMs = options.timeoutMs;
const response = this.#options.pending.wait(id, {
timeoutMs,
...(timeoutMs === undefined
? {}
: {
timeoutMs,
timeoutValue: () =>
err(
this.#options.failure(
"timeout",
"Ghidra bridge request timed out",
undefined,
{ timeoutMs },
),
),
}),
...(options.signal === undefined ? {} : { signal: options.signal }),
timeoutValue: () =>
err(
this.#options.failure(
"timeout",
"Ghidra bridge request timed out",
undefined,
{ timeoutMs },
),
),
cancelledValue: () =>
err(this.#options.failure("cancelled", "Ghidra request was cancelled")),
});