Keep failed stable-read handles and WABT runtime roots under retryable resource scopes. Preserve cancellation causes and primary errors, close the same service instances bound to MCP tools, and consolidate CLI operation/cleanup projection. Validation: fast typecheck and lint, cached runtime build, docs checks, SDK schema validation, focused service and real-file cleanup tests, CLI cleanup regressions, and MCP lifecycle/shutdown workflows. Provider process fixtures simulate engine output; real WABT and Linux EVM execution are not established by this pass.
18 lines
674 B
TypeScript
18 lines
674 B
TypeScript
import type { ExecutionOptions } from "./AnalysisProvider.js";
|
|
import type { AnalysisError } from "../domain/analysisErrorBase.js";
|
|
import type { Result } from "../domain/result.js";
|
|
import type {
|
|
InspectWebNetworkCaptureInput,
|
|
WebNetworkCapture,
|
|
} from "../domain/webNetworkCapture.js";
|
|
|
|
/** Replaceable offline capture port; producer protocols remain in format adapters. */
|
|
export interface WebNetworkCapturePort {
|
|
inspect(
|
|
input: InspectWebNetworkCaptureInput,
|
|
options?: ExecutionOptions,
|
|
): Promise<Result<WebNetworkCapture, AnalysisError>>;
|
|
/** Retry retained reader/runtime cleanup when the owning service shuts down. */
|
|
close?(): Promise<void>;
|
|
}
|