Skip to main content

Module gen_dispatch

Module gen_dispatch 

Source
Expand description

Dispatch for the generated service tree.

The tree itself (src/commands/generated.rs) is pure clap structure — generated from the Discovery index, no runtime logic. This module is the runtime half: walk the matched subcommand chain to the leaf, resolve the method id against the Discovery index, turn the typed flags back into a parameter map under their ORIGINAL camelCase names, and hand everything to the one shared call path (api::call_method) that grr api call also uses.

Functions§

dispatch
Entry point for every generated service subcommand under the permissive safety profile. matches is the ROOT ArgMatches (the one whose current subcommand is the service), so the full chain is walkable from here.
dispatch_with_profile
dispatch with a safety profile — the seam for cli.rs. The same gate the grr api call flags and the grr mcp server honor.