mirror of
https://github.com/morluto/rea
synced 2026-10-28 06:46:47 -04:00
63bf91405c
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.
32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
import type { JsonValue } from "./jsonValue.js";
|
|
import {
|
|
AnalysisError,
|
|
type AnalysisErrorOptions,
|
|
} from "./analysisErrorBase.js";
|
|
|
|
/** A provider adapter failed outside its more precise typed variants. */
|
|
export interface ProviderAdapterErrorOptions extends AnalysisErrorOptions {
|
|
readonly userMessage?: string;
|
|
readonly diagnostics?: Readonly<Record<string, JsonValue>>;
|
|
}
|
|
|
|
/** A provider adapter failed outside its more precise typed variants. */
|
|
export class ProviderAdapterError extends AnalysisError {
|
|
readonly _tag = "ProviderAdapterError";
|
|
override readonly userMessage: string | undefined;
|
|
readonly diagnostics: Readonly<Record<string, JsonValue>> | undefined;
|
|
|
|
constructor(
|
|
readonly providerId: string,
|
|
readonly operation: string,
|
|
options: ProviderAdapterErrorOptions = {},
|
|
) {
|
|
super(`Provider ${providerId} adapter failed during ${operation}`, options);
|
|
this.userMessage = options.userMessage;
|
|
this.diagnostics =
|
|
options.diagnostics === undefined
|
|
? undefined
|
|
: structuredClone(options.diagnostics);
|
|
}
|
|
}
|