//#region src/shared/create-error-normalizing-proxy.d.ts interface ErrorNormalizingProxyContext { readonly methodPath: string; } type ErrorNormalizer = (error: unknown, context: ErrorNormalizingProxyContext) => Error; declare function createErrorNormalizingProxy(target: T, normalizeError: ErrorNormalizer, path?: readonly string[]): T; //#endregion //#region src/errors/credential-revoked-error.d.ts /** * Thrown by integration client wrappers when a provider returns 401/403, * indicating the stored credentials have been revoked or expired. * * The worker detects this error via structural check (error.name + error.credentialDefinitionId), * NOT instanceof — instanceof fails across V8 context boundaries (worker subprocess vs bundle sandbox). * * The worker includes { credentialRevoked: true, credentialDefinitionId } in the step failure * callback payload. The control plane then sets connection_status = 'broken' on the affected row. */ declare class CredentialRevokedError extends Error { readonly credentialDefinitionId: string; constructor(credentialDefinitionId: string, message?: string); } declare function isCredentialRevokedError(error: unknown): error is CredentialRevokedError; //#endregion //#region src/errors/credential-schema-mismatch-error.d.ts /** * Thrown when a stored vault row's schema fingerprint does not match the * current manifest's fingerprint for the same credential set. * * Indicates the credential set's shape changed across deploys and the stored * values were not re-uploaded against the new shape. The platform-facing * renderers (CLI JSON output, web UI) use the `remediation` field to present * the operator with a ready-to-copy `keystroke credentials upload * --credential-set --keys ` command. * * Detection is structural (error.name) rather than instanceof so the error * can cross V8 context boundaries (executor worker subprocess, sandbox * isolates) without losing its identity. * * @example * ```ts * throw new CredentialSchemaMismatchError({ * manifestId: 'stripe', * storedFingerprint: 'abc123…', * currentFingerprint: 'def456…', * uploadedAt: row.createdAt, * runtimeKey: 'stripe', * currentKeys: ['STRIPE_SECRET_KEY'], * }); * ``` * * @see computeSchemaFingerprint */ declare class CredentialSchemaMismatchError extends Error { readonly manifestId: string; readonly storedFingerprint: string; readonly currentFingerprint: string; readonly uploadedAt: Date | null; readonly runtimeKey: string; readonly currentKeys: readonly string[]; readonly remediation: string; constructor(options: { manifestId: string; storedFingerprint: string; currentFingerprint: string; uploadedAt: Date | null; runtimeKey: string; currentKeys: readonly string[]; }); } /** * Structural detection for {@link CredentialSchemaMismatchError}. Use this * in any code path that crosses a V8 context boundary — `instanceof` fails * across worker subprocess and sandbox isolates. */ declare function isCredentialSchemaMismatchError(error: unknown): error is CredentialSchemaMismatchError; //#endregion export { CredentialRevokedError, CredentialSchemaMismatchError, type ErrorNormalizingProxyContext, createErrorNormalizingProxy, isCredentialRevokedError, isCredentialSchemaMismatchError };