/** * Failures the shared core raises to its callers. Each provider binding * supplies the constructors (`SubscriptionCoreProvider.errors`), so a * provider can keep the error classes its callers already match; a new * provider can use `subscriptionCoreDefaultErrors`. */ /** Why a workspace source change was refused. */ export type SubscriptionCoreSourceRefusal = "personal_workspace" | "forbidden"; export type SubscriptionCoreErrors = { /** The turn no longer holds its core lease; dispatch must stop. */ leaseLost(): Error; /** The connection, or the caller's authority over it, is no longer usable. */ accessLost(): Error; /** The source was disconnected before a physical request was admitted. */ sourceDisconnected(): Error; /** An earlier request has an unresolved outcome; automatic replay is unsafe. */ requestOutcomeUnknown(): Error; /** An operation lost its lease, its scope or the enabled cutover. */ operationUnavailable(): Error; /** A workspace source change was refused (personal workspace or no permission). */ sourceRefused(reason: SubscriptionCoreSourceRefusal, message: string): Error; /** A workspace route named an organization-managed connection. */ organizationManaged(): Error; }; export declare class SubscriptionCoreError extends Error { readonly code: string; constructor(code: string, message: string); } /** Provider-free errors with the core's stable codes, for providers without legacy classes. */ export declare function subscriptionCoreDefaultErrors(displayName: string): SubscriptionCoreErrors;