feat(ghidra): add private headless provider session
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user