/** * Team config auto-import (F6) — when `slaminar setup` runs inside a directory * that already has a team-committed `.slaminar/config.json`, offer to copy * the catalog URL/mode into the user's personal `defaults.json` so the same * catalog source is used everywhere (not just in this one project). * * This is strictly opt-in (interactive confirm) and only triggers when the * project's `catalogUrl` is non-empty AND differs from the user's current * default. */ import type { TeamConfig } from '../types/index.js'; export interface TeamImportCandidate { projectRoot: string; teamConfig: TeamConfig; reason: 'different-url' | 'first-import'; } /** * Detect whether the given cwd has a team-committed `.slaminar/config.json` * with a non-trivial custom catalog that differs from the user's defaults. * Returns null when there's nothing worth prompting about. */ export declare function detectTeamConfig(cwd: string): TeamImportCandidate | null; export interface ImportResult { imported: boolean; previousUrl: string; newUrl: string; summary: string; } /** * Apply the team config's catalog into the user's defaults.json. Callers * should gate this behind a confirmation prompt — no confirmation is done * here so `--yes` / CI flows can drive it deterministically. */ export declare function importTeamCatalog(candidate: TeamImportCandidate): ImportResult;