/**
 * Workspace management for Studiograph
 *
 * A workspace is a directory with .studiograph/ folder
 * Similar to how Git works with .git/
 */
import { WorkspaceConfig, RepoConfig, RepoConfigInput } from './types.js';
/**
 * Team member definition from team/members.json
 */
export interface TeamMember {
    id: string;
    name: string;
    email: string;
    github_username?: string;
    joined_at?: string;
    active?: boolean;
}
export declare class Workspace {
    private workspacePath;
    private jsonConfigPath;
    private membersPath;
    private aboutPath;
    private config;
    /** Suppress migration output (used during init where the caller owns the spinner) */
    quietMigrations: boolean;
    constructor(workspacePath?: string);
    /**
     * Check if current directory is a Studiograph workspace
     */
    isWorkspace(): boolean;
    /**
     * Initialize new workspace in current directory
     */
    init(teamName: string): void;
    /**
     * Load workspace config from workspace.json
     */
    loadConfig(): Promise<WorkspaceConfig>;
    /**
     * Write workspace config as workspace.json.
     *
     * Phase 5 dual-write: the R2 credential fields
     * (`r2_config.access_key_id`, `r2_config.secret_access_key`) and the
     * search api_key are mirrored into the encrypted store (when the
     * store has been initialized). Failures never block the file write.
     *
     * Phase 9c: every write goes through `enforceWorkspaceConfig`, which
     * throws `SchemaViolationError` when `STUDIOGRAPH_SCHEMA_STRICT` is on
     * (default) and the validator finds a secret-shaped field, or falls
     * back to warn-mode logging when the env is `'0'`. The throw blocks
     * the write — workspace.json is committed and must never carry
     * literals.
     */
    writeConfig(config: WorkspaceConfig): void;
    /**
     * Lazy import of the dual-write helper. Best-effort — `mirrorWorkspaceConfig`
     * itself short-circuits when the store hasn't been initialized
     * (e.g. very early boot, tests without a store). Failures log + swallow.
     */
    private _dualWrite;
    /**
     * Commit workspace.json and push to the config repo remote (if one exists).
     * Mirrors the same pattern used by AuthService.pushSeed() for auth-seed.json.
     * Non-fatal — logs warnings but never throws.
     */
    pushWorkspaceConfig(message: string): void;
    /**
     * Load team members from team/members.json
     */
    loadMembers(): TeamMember[];
    /**
     * Write team members to team/members.json
     */
    writeMembers(members: TeamMember[]): void;
    /**
     * Load ABOUT.md content. Returns null if file doesn't exist.
     */
    loadAbout(): string | null;
    /**
     * Write ABOUT.md content.
     */
    writeAbout(content: string): void;
    /**
     * Update model configuration.
     *
     * Provider and model ID are written to user config (~/.studiograph/user.json)
     * so they are personal and never committed to the shared workspace repo.
     * The API key is also written only to user config — it is never stored in
     * workspace.json.
     */
    setModelConfig(provider: string, modelId: string, apiKey?: string): void;
    /**
     * Register a new repo in the workspace
     */
    registerRepo(repo: RepoConfigInput): Promise<RepoConfig>;
    /**
     * Get all registered repos
     */
    getRepos(): Promise<RepoConfig[]>;
    /**
     * Get repo by name
     */
    getRepo(name: string): Promise<RepoConfig | undefined>;
    /**
     * Get absolute path to repo
     */
    getRepoPath(repoName: string): Promise<string>;
    /**
     * Reconcile workspace.json with the filesystem.
     * Adds repos that exist on disk but aren't registered, removes entries
     * for repos whose directories are gone. Writes workspace.json only if
     * something changed.
     */
    reconcileRepos(): Promise<{
        added: string[];
        removed: string[];
    }>;
    /**
     * Get workspace root path
     */
    getWorkspacePath(): string;
    /**
     * Find workspace root by walking up directory tree
     * (like git does with .git/)
     */
    static findWorkspaceRoot(startPath?: string): string | null;
}
