/** * Prefix on every entry this CLI writes into a file outside the project it was run in. * * A global config is shared by every project on the machine. Without a per-project name, * two projects that both define a server called `fetch` overwrite each other's entry, and * `agents reset` in one of them deletes the entry belonging to the other. */ export declare const MANAGED_GLOBAL_NAME_PREFIX = "agents__"; /** Stable prefix for one project's entries, derived from its path. */ export declare function getProjectScopePrefix(projectRoot: string): string; /** Name a server takes inside a global config when this project writes it. */ export declare function toProjectScopedName(projectRoot: string, serverName: string): string; /** Whether an entry in a global config belongs to this project. */ export declare function isProjectScopedName(projectRoot: string, serverName: string): boolean; /** The source server name behind a scoped entry, or the name unchanged. */ export declare function fromProjectScopedName(projectRoot: string, serverName: string): string; /** * Rename the keys of a generated map into this project's scope. * * `renameValue` lets a format that repeats the name inside the entry keep the two in * step; Goose stores the extension name in both the key and a `name` field. */ export declare function scopeManagedEntries(projectRoot: string, entries: Record, renameValue?: (value: T, scopedName: string) => T): Record; /** * Bare-named entries in a shared config that this project wrote before names carried the * project. * * The state file is the usual record of what to remove, but it lives in * `.agents/generated`, which is gitignored: a fresh clone or `git clean` leaves the old * entries with nobody claiming them, and they would sit next to the new ones forever. * Content settles it. An entry under the bare name whose value matches what this project * is about to write is this project's own leftover. Anything else stays, because it * belongs to the user or to another project. */ export declare function findLegacyManagedNames(existingEntries: Record, generatedEntries: Record): { migrated: string[]; foreign: string[]; }; /** One warning per bare entry left alone because its content is not this project's. */ export declare function formatForeignLegacyWarnings(label: string, names: string[]): string[];