fix(coding): preserve runtime model and failure contracts

This commit is contained in:
2026-08-23 21:21:02 +08:00
parent 52b2467d5d
commit 195979d30f
11 changed files with 427 additions and 112 deletions

View File

@@ -0,0 +1,14 @@
import type {
CodingRuntimeErrorCode,
CodingRuntimePublicError,
} from './contracts';
export class CodingRuntimeContractError extends Error {
readonly publicError: CodingRuntimePublicError;
constructor(code: CodingRuntimeErrorCode, message: string, recoverable: boolean) {
super(message);
this.name = 'CodingRuntimeContractError';
this.publicError = { code, message, recoverable };
}
}