feat(ghidra): add atomic function annotation edits (#709)
* feat(ghidra): edit function annotations atomically Return annotation readback and refreshed function analysis through CLI and MCP. Own each database transaction, invalidate caches and immutable snapshots, preserve executable bytes, and retain the Windows mutation boundary. Assisted-by: Nitori (gensokyo-skills:nitori-reverse-engineering) * fix(ghidra): preserve qualified function annotation identity Preserve namespaces during local name writes and match qualified readback to the refreshed dossier. Add a producer-shaped regression and verify a real namespaced C++ function through the CLI. Assisted-by: Nitori (gensokyo-skills:nitori-reverse-engineering) * test(ghidra): align verification with annotation authority Keep strict capability and profile checks while admitting the explicit session metadata operation. Verify packaged transport authority and atomic transaction commitments and preserve a read-only Windows expectation. Assisted-by: Nitori (gensokyo-skills:nitori-reverse-engineering)
This commit is contained in:
@@ -59,7 +59,7 @@ export type GhidraOperation =
|
||||
| GhidraInventoryOperation
|
||||
| GhidraFunctionOperation;
|
||||
|
||||
/** Owns one authenticated, private, read-only Ghidra headless session. */
|
||||
/** Owns an authenticated private Ghidra session with transport-bound mutation authority. */
|
||||
export class GhidraClient {
|
||||
readonly #options: Required<
|
||||
Pick<GhidraClientOptions, "startupTimeoutMs" | "transport" | "platform">
|
||||
@@ -406,6 +406,8 @@ export class GhidraClient {
|
||||
return err(this.#failure("protocol", "Ghidra run identity is missing"));
|
||||
const parsed = parseGhidraSessionInfo(value, {
|
||||
runId,
|
||||
expectedReadOnly:
|
||||
this.#options.transport === "authenticated-loopback-tcp",
|
||||
providerVersion: this.#options.providerVersion,
|
||||
profileDigest: this.#options.profileDigest,
|
||||
targetSha256: this.#options.targetSha256,
|
||||
|
||||
Reference in New Issue
Block a user