import { TranslatableMessage } from './i18nMessage'; /** * What this plugin needs from its host, named one by one. * * The plugin reaches into Tabby well past its public API — it subclasses * `SFTPPanelComponent`, narrows tabs with `instanceof SSHTabComponent`, opens * `EditProfileModalComponent` (which the typings do not export), and inserts * its own root node into a container found by CSS selector. None of that is * contractual, and a Tabby update can take any of it away. * * The point of this file is *not* to make the plugin survive that — it cannot. * It is to make the failure **say something**. Every one of these couplings * fails as a non-event today: a sidebar that never appears, a panel that stays * empty, an `instanceof` that is quietly false forever. Nothing is thrown, * nothing reaches the console, and the diagnosis starts from zero every time. * * Two deliberate non-goals: * * - **Not a Tabby version check.** A version number would cry wolf on a * perfectly compatible release and stay silent on a fork or a local build * that moved something. What is verified is the contact points themselves. * - **Not an all-or-nothing gate.** Each precondition names the feature it * carries, so a missing `SFTPPanelComponent` costs the SFTP view and nothing * else. Only `mount-container` is fatal, because without it there is no * sidebar to degrade. */ export interface HostPrecondition { id: string; /** * What the user loses when this one is not met — shown to them. A * `TranslatableMessage` rather than a string: this module has no injector * access, so the English key travels and `SidebarPlusMountService` * translates it at the point of display (see `src/i18nMessage.ts`). */ feature: TranslatableMessage; /** True when the host still provides what this plugin needs. */ check: () => boolean; /** Whether failing this one leaves nothing worth mounting. */ fatal?: boolean; } export declare const HOST_PRECONDITIONS: HostPrecondition[]; export interface HostCompatReport { failed: HostPrecondition[]; fatal: boolean; } export declare function checkHost(): HostCompatReport; /** * Whether the host still provides a given precondition. * * This is the junction between the two robustness mechanisms: a block switched * off by the user and a block the host can no longer carry both come down to * "do not show it, and do not feed it". The settings checkbox stays ticked in * the second case — the user did not untick it, and lying about their own * setting would be worse than a block that simply is not there. */ export declare function hostSupports(id: string): boolean; /** Records a name/identity mismatch. Returns true the first time a given class is seen failing, so callers can warn once. */ export declare function noteIdentityMismatch(className: string): boolean; export declare function hasIdentityMismatch(): boolean;