refactor!: enforce canonical evidence and provider boundaries
Deliver complete Evidence directly through MCP with required nullable analysis profiles and immutable per-server delivery settings. Bind selected environments at construction and require typed cleanup outcomes with retained retry ownership. Remove test-only routing, duplicate session and snapshot metadata, producer-field repairs, and ambiguous provider arguments. Separate artifact byte identity from occurrence classification and retain typed source-map and partial native facts across CLI, MCP, and verifier consumers. BREAKING CHANGE: obsolete Evidence envelopes, session aliases, incomplete snapshots, and missing normalized producer facts are no longer accepted.
This commit is contained in:
@@ -105,12 +105,17 @@ const configureAttachedEnvironment = async (
|
||||
}
|
||||
};
|
||||
|
||||
/** Launch or attach using the caller-selected environment and browser engine. */
|
||||
export const openPlaywrightScenarioBrowser = async (
|
||||
scenario: BrowserScenario,
|
||||
environment: Readonly<Record<string, string | undefined>>,
|
||||
launcher: Pick<
|
||||
typeof chromium,
|
||||
"connectOverCDP" | "launchPersistentContext"
|
||||
> = chromium,
|
||||
): Promise<OpenedScenarioBrowser> => {
|
||||
if (scenario.browser.mode === "connect") {
|
||||
const browser = await chromium.connectOverCDP(
|
||||
const browser = await launcher.connectOverCDP(
|
||||
scenario.browser.cdp_endpoint,
|
||||
{ timeout: 0 },
|
||||
);
|
||||
@@ -130,7 +135,7 @@ export const openPlaywrightScenarioBrowser = async (
|
||||
const profilePath = await mkdtemp(join(tmpdir(), "rea-browser-scenario-"));
|
||||
await chmod(profilePath, 0o700);
|
||||
try {
|
||||
const context = await chromium.launchPersistentContext(profilePath, {
|
||||
const context = await launcher.launchPersistentContext(profilePath, {
|
||||
executablePath: resolve(scenario.browser.executable_path),
|
||||
headless: scenario.browser.headless,
|
||||
acceptDownloads: false,
|
||||
|
||||
Reference in New Issue
Block a user