import type { SuperagentRoute } from '../types'; /** * Stable identity string for a route, so effects can key on "did the route * actually change by value" instead of object reference. */ export function routeIdentityKey(route: SuperagentRoute): string { return route.name === 'agent' ? `agent:${route.agentId}` : route.name; } export function shouldNavigateHostBack( route: SuperagentRoute, hasHostBackHandler: boolean, ): boolean { return hasHostBackHandler && route.name === 'home'; }