/**
 * Shared folder creation for network callers (web route + MCP tool).
 *
 * Wraps Workspace.registerRepo() with the concerns that are common to every
 * network-facing creation path: kebab-case name validation, reserved-prefix
 * guards, duplicate detection, folder-admin membership grant for the creator,
 * and a folder_created WS broadcast.
 *
 * The CLI (`studiograph folder add`) deliberately does NOT use this helper —
 * it runs locally with filesystem privileges, has no user identity to grant
 * membership to, and no WS hub to broadcast on. It calls registerRepo()
 * directly (see src/cli/commands/folder.ts).
 *
 * The private-folder auto-provision path (`ensurePrivateFolder` in
 * src/server/routes/auth-api.ts) also calls registerRepo() directly because
 * it has different semantics: private=true, no folder-admin grant, one per
 * user. Not a fit for this helper.
 */
import type { WorkspaceManager } from '../core/workspace-manager.js';
import type { AuthService, AuthUser } from './auth-service.js';
import type { WsHub } from '../server/ws-hub.js';
import type { RepoConfig } from '../core/types.js';
export type FolderCreationErrorCode = 'invalid_name' | 'duplicate' | 'internal';
export declare class FolderCreationError extends Error {
    readonly code: FolderCreationErrorCode;
    constructor(code: FolderCreationErrorCode, message: string);
}
export interface CreateSharedFolderInput {
    name: string;
    display_name?: string;
    description?: string;
}
export declare function createSharedFolder(workspaceManager: WorkspaceManager, authService: AuthService, input: CreateSharedFolderInput, user: AuthUser | undefined, wsHub?: WsHub): Promise<RepoConfig>;
