* refactor(domain): consolidate canonical ordering and digest helpers (#624) * refactor(domain): consolidate canonical ordering and digest helpers Single owner for code-point ordering (domain/canonicalOrdering.ts) and canonical JSON digests (domain/comparisonSemantics.ts). Delete all local compareCodePoints/compareText/digestCanonical duplicates and migrate every importer. No re-export shims. * fix(ci): allow slower real browser startup * chore(config): remove dead eslint, dedupe scripts, cacheable turbo tasks Delete eslint.config.js (oxlint is the linter), drop lint:dead alias, pin smol-toml, fold jscpd/scan:todos into check:pr, make test:run cacheable, align oxlint ignores. * fix(config): hash all test inputs for cached runs * docs: fix architecture diagram and pretty-print tool catalog Drop dangling REPLAY edges, add dotnet/reference/error/evaluation nodes. Emit 2-space JSON from the catalog generator and regenerate. * test: extract shared fixtures, drop knip carve-outs Dedupe android/apple session tests, bundler adapter headers, and reconstruction helpers into tests/support fixtures. Delete unused type aliases and the knip ignoreIssues block. Lower jscpd threshold 2.7 to 2.5. * refactor(app): split Setup and ProcessOwnership modules Extract SetupTypes/SetupHost from Setup.ts and move observation helpers into ProcessOwnershipObservation/ProcessTree. Migrate all importers including CLI commands. No re-export shims. * refactor(runtime): centralize safe JSON parsing and preserve error causes Add domain/safeJson.safeParseJson and migrate all raw JSON.parse call sites. Name catch causes and preserve failure reasons instead of swallowing; annotate genuine best-effort cleanup. * fix(runtime): retain JSON parse error causes
554 lines
19 KiB
TypeScript
554 lines
19 KiB
TypeScript
import { randomBytes, randomUUID } from "node:crypto";
|
|
import type { Socket } from "node:net";
|
|
import { tmpdir } from "node:os";
|
|
import { join } from "node:path";
|
|
|
|
import type { JsonValue } from "../domain/jsonValue.js";
|
|
import { err, ok, type Result } from "../domain/result.js";
|
|
import { silentLogger, type Logger } from "../logger.js";
|
|
import { PendingOperations } from "../process/PendingOperations.js";
|
|
import { PrivateRuntimeRoot } from "../process/PrivateRuntimeRoot.js";
|
|
import { ProviderStartupDeadline } from "../process/ProviderDeadline.js";
|
|
import { ProviderRunLineage } from "../process/ProviderRunLineage.js";
|
|
import {
|
|
type ProviderProcessDiagnostic,
|
|
type ProviderProcessSnapshot,
|
|
ProviderProcessSupervisor,
|
|
} from "../process/ProviderProcess.js";
|
|
import { GHIDRA_STARTUP_TIMEOUT_MS } from "./GhidraDefaults.js";
|
|
import type {
|
|
GhidraClientOptions,
|
|
GhidraRequestOptions,
|
|
GhidraStartResult,
|
|
} from "./GhidraClientTypes.js";
|
|
import type { GhidraInventoryOperation } from "./GhidraInventoryValues.js";
|
|
import type { GhidraFunctionOperation } from "./GhidraFunctionValues.js";
|
|
import { createGhidraDiagnostics } from "./GhidraDiagnostics.js";
|
|
import type { GhidraLaunch } from "./GhidraLauncher.js";
|
|
import { GhidraResponseBuffer } from "./GhidraResponseBuffer.js";
|
|
import { GhidraResponseRouter } from "./GhidraResponseRouter.js";
|
|
import { GhidraRequestQueue } from "./GhidraRequestQueue.js";
|
|
import {
|
|
bindGhidraSessionFailure,
|
|
GhidraSessionError,
|
|
} from "./GhidraSessionError.js";
|
|
import {
|
|
isGhidraShutdownAcknowledgement,
|
|
parseGhidraSessionInfo,
|
|
type GhidraSessionInfo,
|
|
} from "./GhidraSessionValues.js";
|
|
import { createGhidraTargetSnapshot } from "./GhidraTargetSnapshot.js";
|
|
import { connectGhidraSocket } from "./GhidraSocketConnection.js";
|
|
import type { GhidraEndpoint } from "./GhidraTransport.js";
|
|
import { GhidraWire } from "./GhidraClientWire.js";
|
|
import { completeGhidraStartupHandshake } from "./GhidraClientStartup.js";
|
|
|
|
const SHUTDOWN_TIMEOUT_MS = 10_000;
|
|
const SESSION_ROOT = tmpdir();
|
|
|
|
export type {
|
|
GhidraClientOptions,
|
|
GhidraDiagnostic,
|
|
GhidraRequestOptions,
|
|
GhidraStartResult,
|
|
} from "./GhidraClientTypes.js";
|
|
|
|
/** Closed Java-bridge operation union callable after the exact handshake. */
|
|
export type GhidraOperation =
|
|
| GhidraInventoryOperation
|
|
| GhidraFunctionOperation;
|
|
|
|
/** Owns one authenticated, private, read-only Ghidra headless session. */
|
|
export class GhidraClient {
|
|
readonly #options: Required<
|
|
Pick<GhidraClientOptions, "startupTimeoutMs" | "transport">
|
|
> &
|
|
GhidraClientOptions;
|
|
readonly #logger: Logger;
|
|
readonly #pending = new PendingOperations<
|
|
number,
|
|
Result<JsonValue, GhidraSessionError>
|
|
>();
|
|
#socket: Socket | undefined;
|
|
#detachSocket: (() => void) | undefined;
|
|
#launch: GhidraLaunch | undefined;
|
|
#process: ProviderProcessSupervisor | undefined;
|
|
#runtimeRoot: PrivateRuntimeRoot | undefined;
|
|
#snapshotPath: string | undefined;
|
|
#token: string | undefined;
|
|
#runId: string | undefined;
|
|
readonly #lineage = new ProviderRunLineage();
|
|
#nextId = 1;
|
|
#closing = false;
|
|
#processSnapshot: ProviderProcessSnapshot | undefined;
|
|
#lastDiagnostics: Readonly<Record<string, JsonValue>> = {};
|
|
#startupController: AbortController | undefined;
|
|
#startPromise: Promise<GhidraStartResult> | undefined;
|
|
#closePromise: Promise<void> | undefined;
|
|
readonly #failure = bindGhidraSessionFailure(() => this.#diagnostics());
|
|
readonly #wire: GhidraWire;
|
|
readonly #requestQueue: GhidraRequestQueue;
|
|
readonly #responseRouter = new GhidraResponseRouter({
|
|
pending: this.#pending,
|
|
nextId: () => this.#nextId,
|
|
remoteFailure: (failure) =>
|
|
this.#failure("remote", failure.message, failure, {
|
|
remoteCode: failure.code,
|
|
}),
|
|
protocolFailure: (message, cause) => this.#abortProtocol(message, cause),
|
|
});
|
|
readonly #responseBuffer = new GhidraResponseBuffer({
|
|
onLine: (line) => this.#responseRouter.route(line),
|
|
});
|
|
readonly #onSocketData = (chunk: string): void =>
|
|
this.#responseBuffer.push(chunk);
|
|
readonly #onSocketError = (): void => {
|
|
this.#failAll(this.#failure("process", "Ghidra bridge socket failed"));
|
|
};
|
|
readonly #onSocketClose = (): void => {
|
|
if (!this.#closing)
|
|
this.#failAll(this.#failure("process", "Ghidra bridge socket closed"));
|
|
};
|
|
|
|
constructor(options: GhidraClientOptions) {
|
|
this.#options = {
|
|
...options,
|
|
startupTimeoutMs: options.startupTimeoutMs ?? GHIDRA_STARTUP_TIMEOUT_MS,
|
|
transport: options.transport ?? "unix-socket",
|
|
};
|
|
this.#logger = options.logger ?? silentLogger;
|
|
this.#wire = new GhidraWire({
|
|
getSocket: () => this.#socket,
|
|
getToken: () => this.#token,
|
|
nextId: () => this.#nextId++,
|
|
pending: this.#pending,
|
|
logger: this.#logger,
|
|
failure: this.#failure,
|
|
});
|
|
this.#requestQueue = new GhidraRequestQueue(
|
|
(method, parameters, requestOptions) =>
|
|
this.#wire.request(method, parameters, requestOptions),
|
|
(kind, message, cause) => this.#failure(kind, message, cause),
|
|
() => this.#stopAfterActiveCancellation(),
|
|
);
|
|
}
|
|
|
|
/** Launch Ghidra once and require its exact post-analysis handshake. */
|
|
start(signal?: AbortSignal): Promise<GhidraStartResult> {
|
|
if (this.#closePromise !== undefined)
|
|
return this.#closePromise.then(() => this.start(signal));
|
|
if (this.#startPromise !== undefined) return this.#startPromise;
|
|
const controller = new AbortController();
|
|
const onAbort = (): void => controller.abort(signal?.reason);
|
|
if (signal?.aborted === true) onAbort();
|
|
else signal?.addEventListener("abort", onAbort, { once: true });
|
|
const started = this.#start(controller.signal);
|
|
this.#startupController = controller;
|
|
this.#startPromise = started;
|
|
const reset = (): void => {
|
|
signal?.removeEventListener("abort", onAbort);
|
|
if (this.#startPromise === started) {
|
|
this.#startPromise = undefined;
|
|
if (this.#startupController === controller)
|
|
this.#startupController = undefined;
|
|
}
|
|
};
|
|
void started.then(
|
|
(result) => {
|
|
signal?.removeEventListener("abort", onAbort);
|
|
if (!result.ok) reset();
|
|
},
|
|
(cause: unknown) => {
|
|
this.#logger.debug(
|
|
{ error: cause instanceof Error ? cause.message : String(cause) },
|
|
"Ghidra startup promise rejected during bookkeeping",
|
|
);
|
|
reset();
|
|
},
|
|
);
|
|
return started;
|
|
}
|
|
|
|
/** Revalidate live bridge, provider, run, and profile metadata. */
|
|
async ping(
|
|
options: GhidraRequestOptions = {},
|
|
): Promise<Result<GhidraSessionInfo, GhidraSessionError>> {
|
|
const started = await this.start(options.signal);
|
|
if (!started.ok) return started;
|
|
const result = await this.#wire.request("ping", {}, options);
|
|
if (!result.ok) return result;
|
|
return this.#parseSessionInfo(result.value);
|
|
}
|
|
|
|
/** Execute one admitted operation through the serial per-Program queue. */
|
|
async callTool(
|
|
operation: GhidraOperation,
|
|
parameters: Readonly<Record<string, JsonValue>>,
|
|
options: { readonly signal?: AbortSignal } = {},
|
|
): Promise<Result<JsonValue, GhidraSessionError>> {
|
|
const started = await this.start(options.signal);
|
|
if (!started.ok) return started;
|
|
return this.#requestQueue.run(
|
|
operation,
|
|
parameters,
|
|
options.signal === undefined ? {} : { signal: options.signal },
|
|
);
|
|
}
|
|
|
|
/** Stop the owned process group and remove all project/runtime artifacts. */
|
|
close(): Promise<void> {
|
|
return this.#requestClose(false);
|
|
}
|
|
|
|
#requestClose(forceStop: boolean): Promise<void> {
|
|
const starting = this.#startPromise;
|
|
const controller = this.#startupController;
|
|
controller?.abort();
|
|
this.#closePromise ??= Promise.resolve().then(() =>
|
|
this.#close(starting, controller, forceStop),
|
|
);
|
|
return this.#closePromise;
|
|
}
|
|
|
|
#stopAfterActiveCancellation(): Promise<void> {
|
|
return this.#requestClose(true).catch((cause: unknown) => {
|
|
this.#logger.error(
|
|
{ error: cause instanceof Error ? cause.message : String(cause) },
|
|
"Ghidra cleanup after active request cancellation failed",
|
|
);
|
|
throw cause;
|
|
});
|
|
}
|
|
|
|
/** Latest bounded local diagnostics, with bearer material redacted. */
|
|
diagnostics(): Readonly<Record<string, JsonValue>> {
|
|
return structuredClone(this.#diagnostics());
|
|
}
|
|
|
|
/** Latest token-verified launcher lineage for the active run. */
|
|
runtimeLineage() {
|
|
return this.#lineage.snapshot();
|
|
}
|
|
|
|
async #start(signal: AbortSignal): Promise<GhidraStartResult> {
|
|
if (signal.aborted)
|
|
return err(this.#failure("cancelled", "Ghidra startup was cancelled"));
|
|
if (this.#socket !== undefined || this.#runtimeRoot !== undefined)
|
|
return err(this.#failure("protocol", "Ghidra client is already started"));
|
|
const deadline = new ProviderStartupDeadline(
|
|
this.#options.startupTimeoutMs,
|
|
signal,
|
|
);
|
|
try {
|
|
return await this.#startWithin(deadline);
|
|
} finally {
|
|
deadline.dispose();
|
|
}
|
|
}
|
|
|
|
async #startWithin(
|
|
deadline: ProviderStartupDeadline,
|
|
): Promise<GhidraStartResult> {
|
|
try {
|
|
this.#runtimeRoot = await PrivateRuntimeRoot.create({
|
|
parent: SESSION_ROOT,
|
|
prefix: "rea-ghidra-",
|
|
});
|
|
} catch (cause: unknown) {
|
|
return err(
|
|
this.#failure("start", "Ghidra runtime root creation failed", cause),
|
|
);
|
|
}
|
|
if (deadline.signal.aborted) return this.#startupInterrupted(deadline);
|
|
const endpoint: GhidraEndpoint = {
|
|
transport: this.#options.transport,
|
|
path: join(
|
|
this.#runtimeRoot.path,
|
|
this.#options.transport === "unix-socket"
|
|
? "bridge.sock"
|
|
: "bridge-endpoint.json",
|
|
),
|
|
};
|
|
try {
|
|
const snapshot = await createGhidraTargetSnapshot(
|
|
this.#options.targetPath,
|
|
this.#runtimeRoot.path,
|
|
this.#options.targetSha256,
|
|
);
|
|
this.#snapshotPath = snapshot.path;
|
|
} catch (cause: unknown) {
|
|
const failure = this.#failure(
|
|
"start",
|
|
"Ghidra target snapshot failed admission",
|
|
cause,
|
|
);
|
|
await this.#cleanup();
|
|
return err(failure);
|
|
}
|
|
if (deadline.signal.aborted) return this.#startupInterrupted(deadline);
|
|
this.#token = randomBytes(32).toString("hex");
|
|
this.#lineage.reset();
|
|
this.#runId = this.#options.runId ?? randomUUID();
|
|
const launched = await this.#options.launcher
|
|
.launch(
|
|
{
|
|
runtimeRoot: this.#runtimeRoot.path,
|
|
transport: endpoint.transport,
|
|
endpointPath: endpoint.path,
|
|
token: this.#token,
|
|
runId: this.#runId,
|
|
targetPath: this.#snapshotPath,
|
|
targetSha256: this.#options.targetSha256,
|
|
providerVersion: this.#options.providerVersion,
|
|
profileDigest: this.#options.profileDigest,
|
|
},
|
|
{ signal: deadline.signal },
|
|
)
|
|
.catch((cause: unknown) =>
|
|
err(this.#failure("start", "Ghidra launcher failed", cause)),
|
|
);
|
|
if (!launched.ok) {
|
|
const failure = deadline.signal.aborted
|
|
? this.#interruptionFailure(deadline)
|
|
: launched.error instanceof GhidraSessionError
|
|
? launched.error
|
|
: this.#failure("start", launched.error.message, launched.error);
|
|
await this.#cleanup();
|
|
return err(failure);
|
|
}
|
|
this.#launch = launched.value;
|
|
this.#process = new ProviderProcessSupervisor(launched.value, {
|
|
onDiagnostic: (event) => this.#onProcessDiagnostic(event),
|
|
});
|
|
const connected = await this.#connect(endpoint, deadline);
|
|
if (!connected.ok) {
|
|
const failure = connected.error;
|
|
await this.#cleanup();
|
|
return err(failure);
|
|
}
|
|
const completed = await completeGhidraStartupHandshake({
|
|
deadline,
|
|
request: (method, params, requestOptions) =>
|
|
this.#wire.request(method, params, requestOptions),
|
|
parseSessionInfo: (value) => this.#parseSessionInfo(value),
|
|
cleanup: () => this.#cleanup(),
|
|
failure: this.#failure,
|
|
startupTimeoutMs: this.#options.startupTimeoutMs,
|
|
});
|
|
if (completed.ok) {
|
|
await this.#lineage.observe(this.#launch);
|
|
this.#requestQueue.reopen();
|
|
}
|
|
return completed;
|
|
}
|
|
|
|
async #connect(
|
|
endpoint: GhidraEndpoint,
|
|
deadline: ProviderStartupDeadline,
|
|
): Promise<Result<undefined, GhidraSessionError>> {
|
|
const connected = await connectGhidraSocket({
|
|
endpoint,
|
|
deadline,
|
|
failure: this.#failure,
|
|
isClosed: () => this.#closing,
|
|
processExited: () => this.#processSnapshot?.exitCode !== undefined,
|
|
startupTimeoutMs: this.#options.startupTimeoutMs,
|
|
handlers: {
|
|
data: this.#onSocketData,
|
|
error: this.#onSocketError,
|
|
close: this.#onSocketClose,
|
|
},
|
|
});
|
|
if (!connected.ok) return connected;
|
|
this.#socket = connected.value.socket;
|
|
this.#detachSocket = connected.value.detach;
|
|
return ok(undefined);
|
|
}
|
|
|
|
#parseSessionInfo(value: JsonValue) {
|
|
const runId = this.#runId;
|
|
if (runId === undefined)
|
|
return err(this.#failure("protocol", "Ghidra run identity is missing"));
|
|
const parsed = parseGhidraSessionInfo(value, {
|
|
runId,
|
|
providerVersion: this.#options.providerVersion,
|
|
profileDigest: this.#options.profileDigest,
|
|
targetSha256: this.#options.targetSha256,
|
|
...(this.#options.expectedLanguageId === undefined
|
|
? {}
|
|
: { expectedLanguageId: this.#options.expectedLanguageId }),
|
|
...(this.#options.expectedCompilerSpecId === undefined
|
|
? {}
|
|
: { expectedCompilerSpecId: this.#options.expectedCompilerSpecId }),
|
|
});
|
|
if (parsed.ok) return parsed;
|
|
return err(
|
|
this.#failure(
|
|
"protocol",
|
|
"Ghidra bridge handshake is invalid",
|
|
parsed.error,
|
|
),
|
|
);
|
|
}
|
|
|
|
async #close(
|
|
starting: Promise<GhidraStartResult> | undefined,
|
|
controller: AbortController | undefined,
|
|
forceStop: boolean,
|
|
): Promise<void> {
|
|
try {
|
|
// best-effort cleanup: a rejected startup must not mask close/cleanup.
|
|
await starting?.catch(() => undefined);
|
|
await this.#cleanup(forceStop);
|
|
} finally {
|
|
if (this.#startPromise === starting) this.#startPromise = undefined;
|
|
if (this.#startupController === controller)
|
|
this.#startupController = undefined;
|
|
this.#closePromise = undefined;
|
|
}
|
|
}
|
|
|
|
async #cleanup(forceStop = false): Promise<void> {
|
|
this.#closing = true;
|
|
let forcedStopFailure: GhidraSessionError | undefined;
|
|
try {
|
|
this.#requestQueue.failQueued(
|
|
this.#failure("process", "Ghidra session closed"),
|
|
);
|
|
const socket = this.#socket;
|
|
if (!forceStop && socket !== undefined && !socket.destroyed) {
|
|
const shutdown = await this.#wire
|
|
.request("shutdown", {}, { timeoutMs: SHUTDOWN_TIMEOUT_MS })
|
|
.catch(() =>
|
|
err(this.#failure("process", "Ghidra shutdown request failed")),
|
|
);
|
|
if (!shutdown.ok || !isGhidraShutdownAcknowledgement(shutdown.value))
|
|
this.#logger.warn(
|
|
{ status: shutdown.ok ? "invalid-acknowledgement" : "failed" },
|
|
"Ghidra bridge shutdown was not confirmed",
|
|
);
|
|
}
|
|
this.#failAll(this.#failure("process", "Ghidra session closed"));
|
|
this.#detachSocket?.();
|
|
this.#detachSocket = undefined;
|
|
socket?.destroy();
|
|
this.#socket = undefined;
|
|
if (this.#process !== undefined) {
|
|
await this.#process.waitForExit(500);
|
|
this.#processSnapshot = this.#process.snapshot();
|
|
const stopped = await this.#process.stop();
|
|
this.#processSnapshot = this.#process.snapshot();
|
|
if (stopped.status === "incomplete") {
|
|
this.#options.onDiagnostic?.({
|
|
type: "cleanup-incomplete",
|
|
reason: stopped.reason,
|
|
});
|
|
this.#logger.warn(
|
|
{ reason: stopped.reason },
|
|
"Ghidra process cleanup failed closed",
|
|
);
|
|
if (forceStop)
|
|
forcedStopFailure = this.#failure(
|
|
"process",
|
|
`Ghidra process cleanup after cancellation was incomplete: ${stopped.reason}`,
|
|
);
|
|
}
|
|
}
|
|
this.#lastDiagnostics = this.#diagnostics();
|
|
this.#process = undefined;
|
|
this.#launch = undefined;
|
|
const runtimeRoot = this.#runtimeRoot;
|
|
this.#runtimeRoot = undefined;
|
|
try {
|
|
await runtimeRoot?.close();
|
|
} catch (cause: unknown) {
|
|
if (forceStop)
|
|
forcedStopFailure ??= this.#failure(
|
|
"process",
|
|
"Ghidra runtime cleanup after cancellation failed",
|
|
cause,
|
|
);
|
|
else throw cause;
|
|
}
|
|
this.#snapshotPath = undefined;
|
|
this.#token = undefined;
|
|
this.#runId = undefined;
|
|
this.#responseBuffer.reset();
|
|
if (forcedStopFailure !== undefined) throw forcedStopFailure;
|
|
} finally {
|
|
this.#closing = false;
|
|
}
|
|
}
|
|
|
|
#onProcessDiagnostic(event: ProviderProcessDiagnostic): void {
|
|
if (event.type === "output") {
|
|
this.#options.onDiagnostic?.({
|
|
type: "launcher-output",
|
|
stream: event.stream,
|
|
bytes: event.bytes,
|
|
totalBytes: event.totalBytes,
|
|
});
|
|
return;
|
|
}
|
|
if (event.type === "error") {
|
|
this.#logger.warn(
|
|
{ message: event.message },
|
|
"Ghidra process emitted an error",
|
|
);
|
|
return;
|
|
}
|
|
this.#processSnapshot = event.snapshot;
|
|
this.#options.onDiagnostic?.({
|
|
type: "launcher-exit",
|
|
code: event.code,
|
|
signal: event.signal,
|
|
});
|
|
if (!this.#closing)
|
|
this.#failAll(this.#failure("process", "Ghidra process exited"));
|
|
}
|
|
|
|
#abortProtocol(message: string, cause?: Error): void {
|
|
this.#failAll(this.#failure("protocol", message, cause));
|
|
this.#socket?.destroy();
|
|
}
|
|
|
|
#failAll(error: GhidraSessionError): void {
|
|
this.#pending.failAll(() => err(error));
|
|
}
|
|
|
|
async #startupInterrupted(
|
|
deadline: ProviderStartupDeadline,
|
|
): Promise<GhidraStartResult> {
|
|
const failure = this.#interruptionFailure(deadline);
|
|
await this.#cleanup();
|
|
return err(failure);
|
|
}
|
|
|
|
#interruptionFailure(deadline: ProviderStartupDeadline): GhidraSessionError {
|
|
return deadline.interruption === "cancelled"
|
|
? this.#failure("cancelled", "Ghidra startup was cancelled")
|
|
: this.#failure("timeout", "Ghidra startup deadline elapsed", undefined, {
|
|
timeoutMs: deadline.timeoutMs,
|
|
});
|
|
}
|
|
|
|
#diagnostics(): Readonly<Record<string, JsonValue>> {
|
|
const snapshot = this.#process?.snapshot() ?? this.#processSnapshot;
|
|
return createGhidraDiagnostics({
|
|
targetPath: this.#options.targetPath,
|
|
targetSha256: this.#options.targetSha256,
|
|
transport: this.#options.transport,
|
|
providerVersion: this.#options.providerVersion,
|
|
profileDigest: this.#options.profileDigest,
|
|
...(this.#runId === undefined ? {} : { runId: this.#runId }),
|
|
...(this.#runtimeRoot === undefined
|
|
? {}
|
|
: { runtimeRoot: this.#runtimeRoot.path }),
|
|
...(this.#launch === undefined ? {} : { launch: this.#launch }),
|
|
...(snapshot === undefined ? {} : { snapshot }),
|
|
...(this.#token === undefined ? {} : { token: this.#token }),
|
|
previous: this.#lastDiagnostics,
|
|
});
|
|
}
|
|
}
|