Skip to main content

run_hook

Function run_hook 

Source
pub fn run_hook(subcommand: Option<&HookSubcommand>) -> Result<()>
Expand description

Entry point called by main.rs for symforge hook [subcommand].

When subcommand is None, reads stdin JSON to determine the tool_name and routes to the correct sidecar endpoint (Phase 6 stdin-routing mode).

When subcommand is Some, uses the subcommand directly (backward-compat for manual testing: symforge hook read, symforge hook edit, etc.).

Never returns an error — failures produce the fail-open empty JSON.