Skip to main content

Module resolver

Module resolver 

Source
Expand description

Routing resolver — dynamic agent resolution at spawn time. Slotted into the SpawnerStack as a SpawnerLayer. Treats Ctx.agent as a hint, rewrites it to the actual dispatch target, and hands the updated Ctx down to the inner spawner.

Examples:

  • Ctx.agent = "best-coder" — the resolver picks claude or gpt-4 or llama.
  • Ctx.agent = "router:by-prompt" — branch on prompt contents.
  • Ctx.agent = "ensemble" — fan out to multiple agents (delegated to a different layer or a fanout stage).

One of the axes that a plugin can drive (see handoff §Plugin).

Structs§

FnResolver
Wrapper that lets a closure act as an AgentResolver via a blanket impl.
ResolverMiddleware
SpawnerLayer implementation — inject into a SpawnerStack and use.

Traits§

AgentResolver
Routing resolver trait. Takes the Ctx.agent hint and returns a real agent name the inner spawner can resolve. Sync is enough — this is meant for light lookups. Push heavy resolvers into a separate spawner layer or a Lua plugin.