import type { Logger } from "@skaile/workspaces/types"; import type { ConnectContext, Connector, ConnectorChangeEvent, ConnectorDeclaration, ConnectorHandle } from "./connector-types.js"; import type { WatchHandle, WatchOptions } from "./shared-types.js"; /** * Base class for unified connectors. Subclasses set `filesystem` and/or `tools` * face objects and implement `connect`/`disconnect`. The manager replaces * `this.log` via `setLogger()` after construction — do not initialise your own. */ export declare abstract class AbstractConnector implements Connector { abstract readonly name: string; protected log: Logger; setLogger(logger: Logger): void; /** Set by the default `watch()`; call after mutations to emit change events. */ protected emitChange?: (event: ConnectorChangeEvent) => void; abstract connect(declaration: ConnectorDeclaration, ctx: ConnectContext): Promise; abstract disconnect(handle: ConnectorHandle): Promise; watch(_handle: ConnectorHandle, callback: (e: ConnectorChangeEvent) => void, _options?: WatchOptions): WatchHandle; onHibernate(_handle: ConnectorHandle): Promise; onSessionClose(_handle: ConnectorHandle): Promise; /** Build a handle. Pass `mountPath` only for mountable connectors. */ protected makeHandle(declaration: ConnectorDeclaration, state: unknown, mountPath?: string): ConnectorHandle; } //# sourceMappingURL=connector-base.d.ts.map