mirror of
https://github.com/morluto/rea.git
synced 2026-10-31 03:45:39 +00:00
Move each error family out of domain/errors.ts into its own module (base, core, provider selection/adapter, browser observation, artifact, evidence, unknown registry, hopper, configuration) and relocate AnalysisErrorProjection to analysisErrorProjection. Migrate all 162 importers to the owning modules and delete errors.ts. No re-export shims; behavior is unchanged.
15 lines
625 B
TypeScript
15 lines
625 B
TypeScript
import { CdpBrowserProvider } from "./browser/CdpBrowserProvider.js";
|
|
import { projectAnalysisError } from "./domain/analysisErrorProjection.js";
|
|
import type { JsonValue } from "./domain/jsonValue.js";
|
|
|
|
/** Build the passive browser provider; scope is supplied on each request. */
|
|
export const browserContext = () => ({ provider: new CdpBrowserProvider() });
|
|
|
|
/** Project a browser operation failure consistently across CLI command groups. */
|
|
export const browserCliError = (
|
|
error: Parameters<typeof projectAnalysisError>[0],
|
|
): JsonValue => ({
|
|
error: "Browser observation failed",
|
|
...projectAnalysisError(error),
|
|
});
|