Updates Apollo ToolRouter to use the Thermos slug resolver facts introduced in the parent PR.
This preserves the agreed invariants:
config.tools.{toolkit}.enabled/disabled now validates slugs against scoped resolver facts instead of only current enum strings.
Accepted states:
current_canonicalcurrent_aliashistoricalRejected state under strict validation:
unknownThe validation remains scoped to the configured toolkit relationship.
Explicit preload.tools now resolves requested slugs before fetching schemas:
For current aliases, the visible/preloaded slug remains the user-requested alias, so existing sessions and hardcoded callers keep seeing the same callable name.
For explicit preload sessions, GET recomputes only the current explicit preload slugs and filters historical preloads out of tool_router_tools. This is not warning recomputation; it only keeps visible tools executable.
Direct app-tool execution now checks resolver currentness before fetching/executing the tool. This prevents Thermos retrieve's latest-existing-row fallback from executing a historical/deleted slug.
Current aliases continue through execution with the requested alias slug.
Session-aware search filtering uses resolver facts instead of full schema fetches. Historical and unknown slugs are absent from the enabled map; aliases remain comparable through canonicalization.
If Apollo sees a 404 from /api/tools_/resolve, it treats that as the resolver endpoint being unavailable in an older Thermos deployment and falls back to the previous behavior for that path. The resolver itself returns unknown items with 200, so a 404 is a route-availability signal rather than an unknown-slug signal.
Ran targeted Apollo lint on the edited files:
cd apps/apollo && pnpm lint src/lib/tools/resolve_tool_slugs.ts src/lib/tools/canonicalize_slugs.ts src/lib/toolRouterV2/utils/preload.ts src/lib/toolRouterV2/features/session/create.ts src/lib/toolRouterV2/features/session/helpers/validateSessionConfigFields.ts src/lib/toolRouterV2/features/tools/check_enabled_tools_for_session.ts src/lib/toolRouterV2/features/execution/executeForSessionRPC.ts src/common/lib/external/thermos.ts
Also ran pnpm check-types; it still fails on existing unrelated repo issues in scenario/RBAC tests and a local ignored generated Thermos client mismatch, not on the edited source files.