feat(ghidra): add private headless provider session

This commit is contained in:
N0zoM1z0
2026-07-16 01:27:54 +09:00
committed by N0zoM1z0
parent ed17e76473
commit f0e625d7ee
234 changed files with 8968 additions and 513 deletions
+36
View File
@@ -0,0 +1,36 @@
import type { Logger } from "../logger.js";
import type { Result } from "../domain/result.js";
import type { GhidraLauncher } from "./GhidraLauncher.js";
import type { GhidraSessionError } from "./GhidraSessionError.js";
import type { GhidraSessionInfo } from "./GhidraSessionValues.js";
/** Result of opening and authenticating one headless Ghidra session. */
export type GhidraStartResult = Result<GhidraSessionInfo, GhidraSessionError>;
/** Safe lifecycle telemetry for one isolated Ghidra headless process. */
export type GhidraDiagnostic =
| {
readonly type: "launcher-output";
readonly stream: "stdout" | "stderr";
readonly bytes: number;
readonly totalBytes: number;
readonly truncated: boolean;
}
| {
readonly type: "launcher-exit";
readonly code: number | null;
readonly signal: NodeJS.Signals | null;
}
| { readonly type: "cleanup-incomplete"; readonly reason: string };
/** Dependencies and exact profile commitment for one headless import. */
export interface GhidraClientOptions {
readonly launcher: GhidraLauncher;
readonly targetPath: string;
readonly providerVersion: string;
readonly profileDigest: string;
readonly requestTimeoutMs?: number;
readonly startupTimeoutMs?: number;
readonly onDiagnostic?: (event: GhidraDiagnostic) => void;
readonly logger?: Logger;
}