* fix(browser): capture selected events in popup pages Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com> * fix(browser): capture popup network and report early event gaps * fix(browser): deduplicate owned popup discovery * test(browser): group popup selection coverage with the scenario event suite Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com> * test(browser): verify popup evidence through CLI and MCP * fix(browser): expose shared-context event coverage limits --------- Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com> Co-authored-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com> Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
48 lines
1.5 KiB
TypeScript
48 lines
1.5 KiB
TypeScript
import type {
|
|
BrowserScenario,
|
|
BrowserScenarioAction,
|
|
} from "../domain/browserScenario.js";
|
|
import type {
|
|
BrowserScenarioEvent,
|
|
BrowserStepArtifacts,
|
|
} from "../domain/browserScenarioCapture.js";
|
|
import type { SanitizedBrowserUrl } from "../domain/browserObservation.js";
|
|
|
|
type SnapshotKind = BrowserScenario["capture"]["after_each_step"][number];
|
|
|
|
export interface BrowserScenarioSessionPort {
|
|
readonly mode: "launch" | "connect";
|
|
readonly processOwnership: "provider-owned" | "external";
|
|
readonly product: string;
|
|
readonly version: string;
|
|
readonly initialUrl: string;
|
|
currentUrl(): string;
|
|
sanitizeUrl(value: string): SanitizedBrowserUrl;
|
|
setStep(index: number): void;
|
|
nextEventSequence(): number;
|
|
lastEventSequence(): number;
|
|
events(): {
|
|
readonly retained: number;
|
|
readonly dropped: number;
|
|
readonly items: readonly BrowserScenarioEvent[];
|
|
};
|
|
/** Gaps in selected event families that prevent complete capture claims. */
|
|
eventLimitations?(): readonly string[];
|
|
perform(action: BrowserScenarioAction, signal?: AbortSignal): Promise<void>;
|
|
capture(
|
|
requested: ReadonlySet<SnapshotKind>,
|
|
signal?: AbortSignal,
|
|
): Promise<BrowserStepArtifacts>;
|
|
close(): Promise<"terminated-owned-process" | "disconnected-external">;
|
|
redactError(error: unknown): string;
|
|
}
|
|
|
|
export interface BrowserScenarioSessionFactory {
|
|
open(
|
|
scenario: BrowserScenario,
|
|
options?: {
|
|
readonly signal?: AbortSignal;
|
|
},
|
|
): Promise<BrowserScenarioSessionPort>;
|
|
}
|