repo_description: The repo is finally unlocked. enjoy the party! The fastest repo in history to surpass 100K stars ⭐. Join Discord: https://discord.gg/5TUQKqFWd Built in Rust using oh-my-codex.
code: from __future__ import annotations
  
  from .query_engine import QueryEnginePort
  from .runtime import PortRuntime
  
  
  class QueryEngineRuntime(QueryEnginePort):
      def route(self, prompt: str, limit: int = 5) -> str:
          matches = PortRuntime().route_prompt(prompt, limit=limit)
          lines = ['# Query Engine Route', '', f'Prompt: {prompt}', '']
          if not matches:
              lines.append('No mirrored command/tool matches found.')
              return '\n'.join(lines)
          lines.append('Matches:')
          lines.extend(f'- [{match.kind}] {match.name} ({match.score}) — {match.source_hint}' for match in matches)
          return '\n'.join(lines)
  
  
  __all__ = ['QueryEnginePort', 'QueryEngineRuntime']
  