Surface ToolRouter slug warnings
loading diff…
Adds session warnings for alias and historical/deleted tool slug usage during ToolRouter create/patch.
New warning codes:
TOOL_SLUG_ALIAS_USEDTOOL_SLUG_HISTORICALExisting warning behavior is preserved:
PRELOAD_TOOLS_HIGH_CONTEXT_USAGEWhen a submitted slug resolves as a current alias, create/patch succeeds and the response includes a warning telling the user the tool was renamed to the canonical slug. The alias continues to work; the warning is advisory.
When a submitted slug resolves as historical, create/patch succeeds and the response includes a warning telling the user the tool is no longer available in the latest toolkit version. The tool remains in config but is not exposed or executable by the behavior PR below this one.
Ran targeted Apollo lint on the edited files:
cd apps/apollo && pnpm lint src/lib/toolRouterV2/utils/session_warning_facts.ts src/lib/toolRouterV2/features/session/util/sessionResponse.ts src/lib/toolRouterV2/features/session/helpers/validateSessionConfigFields.ts src/lib/toolRouterV2/utils/preload.ts src/lib/toolRouterV2/features/session/create.ts src/lib/toolRouterV2/features/session/patch.ts src/pages/api/v3/tool_router/session.ts 'src/pages/api/v3/tool_router/session/[session_id]/index.ts' 'src/pages/api/v3.1/tool_router/session/[session_id]/index.ts' src/lib/toolRouterV2/schema/api.ts