Merge pull request 'fix: word-boundary routing + debug route command (#31)' (#102) from fix/routing-patterns into main

This commit is contained in:
2026-03-14 19:24:16 -04:00
4 changed files with 215 additions and 2 deletions

View File

@@ -326,5 +326,19 @@ def voice(
loop.run()
@app.command()
def route(
message: str = typer.Argument(..., help="Message to route"),
):
"""Show which agent would handle a message (debug routing)."""
from timmy.agents.loader import route_request_with_match
agent_id, matched_pattern = route_request_with_match(message)
if agent_id:
typer.echo(f"{agent_id} (matched: {matched_pattern})")
else:
typer.echo("→ orchestrator (no pattern match)")
def main():
app()