import { type Database } from "../data/database.js"; export declare function originalWorkspace(memberId: string): OriginalWorkspace; export declare function readWorkspaces(memberId: string): WorkspaceRegistry; export declare function getActiveWorkspace(memberId: string): WorkspaceEntry; export declare function getWorkspace(memberId: string, id: string): WorkspaceEntry | null; export interface CreateWorkspaceArgs { id: string; kind: "ssh"; description?: string; host: string; port?: number; user: string; keyPath?: string; root?: string; } export type CreateWorkspaceResult = { ok: true; workspace: SshWorkspace; } | { ok: false; error: string; }; export declare function createWorkspace(memberId: string, args: CreateWorkspaceArgs): CreateWorkspaceResult; export type RemoveWorkspaceResult = { ok: true; } | { ok: false; error: string; }; export declare function removeWorkspace(memberId: string, id: string): RemoveWorkspaceResult; export declare function useWorkspace(memberId: string, id: string): { ok: true; active: string; workspace: WorkspaceEntry; } | { ok: false; error: string; }; /** Where a relative path resolves for a member right now (active workspace root). */ export declare function activeWorkspaceRoot(memberId: string): string; /** Default workspace root for fresh members is the member's own folder. */ export declare function ensureDefaultRegistry(memberId: string): void; export interface SshCredentialMaterial { privateKey: string; publicKey: string; config?: string; } export declare function readWorkspaceRegistry(memberId: string, db?: Database): WorkspaceRegistry | null; export declare function importWorkspaceRegistry(memberId: string, registry: WorkspaceRegistry, db?: Database): void; export declare function readSshCredential(memberId: string, db?: Database): SshCredentialMaterial | null; export declare function importSshCredential(memberId: string, material: SshCredentialMaterial, db?: Database): void; export declare function prepareMemberSshCredential(memberId: string): SshCredentialMaterial; export declare function prepareMemberSshCredential(memberId: string, optional: true): SshCredentialMaterial | null; export declare function memberSshKeyPath(memberId: string): string; export declare function readMemberSshPublicKey(memberId: string): string | null; export interface OriginalWorkspace { id: string; kind: "original"; description: string; root: string; builtin: true; } export interface SshWorkspace { id: string; kind: "ssh"; description: string; host: string; port: number; user: string; keyPath: string; root: string; builtin?: false; } export type WorkspaceEntry = OriginalWorkspace | SshWorkspace; export interface WorkspaceRegistry { active: string; workspaces: WorkspaceEntry[]; } //# sourceMappingURL=workspaces.d.ts.map