import type { Scope } from "memax-sdk"; /** * Normalize a git remote URL to a canonical form for use as a project identifier. * * All of these produce the same result: `github.com/acme/project` * - https://github.com/acme/project.git * - git@github.com:acme/project.git * - ssh://git@github.com/acme/project */ export declare function normalizeRepoUrl(url: string): string; export interface MemaxYmlConfig { hub?: string; project_id?: string; } export type ProjectScope = Scope | "project"; export interface ProjectScopeResolution { scope: ProjectScope; source: "memax_yml" | "git_remote" | "fallback"; warning?: string; } export declare function isCanonicalProjectScope(scope: ProjectScope): scope is Scope; export declare function findNearestMemaxYmlPath(dir?: string): string | null; export declare function readMemaxYmlConfig(dir?: string): MemaxYmlConfig | undefined; /** * Get a canonical project scope string for the given directory. * * Returns: * "project:" — .memax.yml project_id or git remote available * "project" — no canonical cross-device project identity */ export declare function getProjectScope(dir?: string): ProjectScope; export declare function resolveProjectScope(dir?: string): ProjectScopeResolution; export declare function resolveProjectRootPath(dir?: string): string | null; /** * Resolve a Claude Code mangled project folder name to a normalized repo URL. * * Claude Code names project folders by replacing "/" with "-" in the absolute path: * "-workspaces-project" → /workspaces/project * "-Users-ziyang-code-memax" → /Users/ziyang/code/memax * * Returns the normalized repo URL if the path exists and is a git repo, null otherwise. */ export declare function resolveClaudeProjectFolder(mangledName: string): string | null; export declare function resolveClaudeProjectPath(mangledName: string): string | null; /** * Normalize a file path for cross-platform consistency. * - Forward slashes only * - No leading "./" * - No double slashes */ export declare function normalizeFilePath(p: string): string; /** Detect git project context (repo URL, project name, branch). */ export declare function detectProjectContext(dir?: string): Record; /** Walk up from cwd looking for .memax.yml with a hub field. */ export declare function readMemaxYmlHub(): string | undefined; //# sourceMappingURL=project-context.d.ts.map