/** * Git remote URL parsing and provider detection. * Automatically detects issue provider from git remote URL. */ interface HostedGitContext { provider: 'github' | 'gitlab'; host: string; org: string; repo: string; fullRepo: string; } interface AzureDevOpsGitContext { provider: 'azure-devops'; host: string; azureOrg: string; azureProject: string; repo: string; } type GitContext = HostedGitContext | AzureDevOpsGitContext; type GitContextWithRemote = GitContext & { remote: string; }; /** * Normalize a Git remote name using the same ref-format rules Git applies to * refs/remotes/. Keeping this next to detection prevents a discovered * remote from being rejected later by a narrower consumer-specific allowlist. */ declare function normalizeGitRemoteName(value: unknown): string | null; /** Quote one argument for the POSIX shell snippets embedded in agent prompts. */ declare function quoteShellArgument(value: string): string; /** * Parse git remote URL into structured provider context. * Supports GitHub, GitLab, and Azure DevOps (cloud + self-hosted). * Handles both HTTPS and SSH URL formats. */ declare function parseGitRemoteUrl(remoteUrl: unknown): GitContext | null; /** * Detect git repository context from current working directory. * Returns provider context extracted from git remote URL. */ declare function detectGitContext(cwd?: string): GitContextWithRemote | null; declare const _default: { normalizeGitRemoteName: typeof normalizeGitRemoteName; quoteShellArgument: typeof quoteShellArgument; parseGitRemoteUrl: typeof parseGitRemoteUrl; detectGitContext: typeof detectGitContext; }; export = _default;