/** * Config generator for `ao start ` — auto-detects project settings * from a repo URL and generates a valid agent-orchestrator.yaml. * * SCM-agnostic: parses GitHub, GitLab, Bitbucket URLs and infers plugins. */ /** Parsed repo URL components */ export interface ParsedRepoUrl { /** Full owner/repo string, e.g. "ComposioHQ/DevOS" */ ownerRepo: string; /** Owner/org, e.g. "ComposioHQ" */ owner: string; /** Repo name, e.g. "DevOS" */ repo: string; /** SCM host, e.g. "github.com" */ host: string; /** Git clone URL (HTTPS) */ cloneUrl: string; } /** Detect which SCM platform a host belongs to */ export type ScmPlatform = "github" | "gitlab" | "bitbucket" | "unknown"; /** * Check if a string looks like a repo URL (HTTP(S) or SSH git URL). */ export declare function isRepoUrl(arg: string): boolean; /** * Parse a repo URL into components. * Supports: * - https://github.com/owner/repo * - https://github.com/owner/repo.git * - git@github.com:owner/repo.git * - Same patterns for GitLab, Bitbucket, etc. */ export declare function parseRepoUrl(url: string): ParsedRepoUrl; /** * Detect SCM platform from hostname. */ export declare function detectScmPlatform(host: string): ScmPlatform; /** Detect the default branch from a local repo directory. */ export declare function detectDefaultBranchFromDir(repoDir: string): string; /** Minimal project type detection for config generation (language + package manager). */ export interface DetectedProjectInfo { language: string | null; packageManager: string | null; } export declare function detectProjectInfo(repoDir: string): DetectedProjectInfo; /** * Sanitize a repo name for use as a YAML project key. * Lowercases, replaces dots/special chars with hyphens, strips leading/trailing hyphens. */ export declare function sanitizeProjectId(repoName: string): string; export interface GenerateConfigOptions { /** Parsed repo URL */ parsed: ParsedRepoUrl; /** Local path to the cloned repo */ repoPath: string; /** Dashboard port (default: 3000) */ port?: number; } /** * Generate a complete agent-orchestrator.yaml config object from a repo URL. * Returns the raw object ready for YAML serialization. */ export declare function generateConfigFromUrl(options: GenerateConfigOptions): Record; /** * Serialize a config object to YAML string. */ export declare function configToYaml(config: Record): string; /** * Check if a directory already has the repo cloned by comparing remote URLs. * Returns true if the directory is a git repo with a matching origin remote. */ export declare function isRepoAlreadyCloned(dir: string, expectedCloneUrl: string): boolean; /** * Determine the target directory for cloning a repo. * If CWD matches the repo, return CWD. Otherwise return CWD/repo-name. */ export declare function resolveCloneTarget(parsed: ParsedRepoUrl, cwd: string): string; //# sourceMappingURL=config-generator.d.ts.map