import type { Config } from './types.js'; import { migrateNativeAgentToggle } from './config-migrate.js'; /** Canonical Agim Agent registry id (was `native`). */ export declare const AGIM_AGENT_ID = "agim"; /** Legacy registry id kept as a routing alias. */ export declare const LEGACY_NATIVE_AGENT_ID = "native"; export declare function normalizeAgentId(name: string | undefined | null): string; export declare function isAgimAgentId(name: string | undefined | null): boolean; /** * Rewrite config agent ids `native` → `agim` (defaultAgent, agents[], * tenants/workspaces agent whitelists). Idempotent via `agimAgentIdMigrated`. */ export declare function migrateAgentIdNativeToAgim(config: Config): { config: Config; changed: boolean; }; /** * Promote `config.workspaces` → `config.tenants` (keep workspaces as a * read-alias until operators save again). Flag: `tenantsFieldMigrated`. */ export declare function migrateWorkspacesToTenants(config: Config): { config: Config; changed: boolean; }; /** Read tenant rows from config (tenants preferred, workspaces fallback). */ export declare function getTenantsFromConfig(config: Config | Record): Array>; /** * Rename `~/.agim/pi-sessions` → `~/.agim/agim-sessions` when needed. * Returns the canonical sessions root path. */ export declare function migratePiSessionsDir(home?: string): string; /** * Best-effort rewrite of session meta `agent: "native"` → `"agim"`. * Skips corrupt files; never throws. */ export declare function migrateSessionAgentIds(home?: string): number; /** * Rename `~/.agim-workspaces/native` → `…/agim` when the target is absent. */ export declare function migrateAgentWorkspaceDir(): void; /** * Run all config-level naming migrations in order. Returns the updated * config and whether anything changed (caller should persist). */ export declare function migrateNamingV2(config: Config): { config: Config; changed: boolean; }; /** Re-export for callers that still import the toggle migrator alone. */ export { migrateNativeAgentToggle }; //# sourceMappingURL=naming-migrate.d.ts.map