ó
    À‘´jÀ  ã                  ó|   • % S r SSKJr  SSKJr  SSKJrJrJr  SSK	J
r
  \" SSS9rS	\S'   SqS
\S'   SS jrSS jrg)aZ  The LangSmith tracer the playground's agents share.

The extraction agents are classes and each holds its own `LangSmithTracer`.
The playground's agents are module-level functions with no instance to hold
one, so this module owns the single tracer they all open runs on. Most call
sites wrap one pydantic-ai `Agent.run` or `Agent.run_stream` the way the
extraction agents do: open the run with the prompt as messages, set the
assistant message and usage on exit. The ranker in `ranking.py` opens one run
per pass around many TypeSafe calls and records their combined outputs.

Document identity is not an argument the answer functions take, so the route
that knows it sets `document_key` for the request and each run copies it into
its metadata. Same no-op contract as the extraction tracer: with
`TRACE_TO_LANGSMITH` unset nothing here reaches the network.
é    )Úannotations)Ú
ContextVar)ÚAnyÚDictÚOptional)ÚLangSmithTracerÚdocument_keyN)ÚdefaultzContextVar[Optional[str]]zOptional[LangSmithTracer]Ú_tracerc                 ó.   • [         c	  [        SS9q [         $ )zBThe process-wide tracer, built on first use so settings are final.zquber-playground)Úrun_name)r   r   © ó    Ú6/home/mande/repo/quber/src/quber/playground/tracing.pyÚtracerr      s   € ô �Ü!Ð+=Ñ>ˆÜ€Nr   c                 óD   • [         R                  5       n U (       a  SU 0$ 0 $ )z6The document key of the request in flight, or nothing.Údoc_key)r	   Úget)Údocs    r   Úrun_metadatar   '   s"   € ä
×
Ñ
Ó
€CÞ"ˆI�sÐÐ*¨Ð*r   )Úreturnr   )r   zDict[str, Any])Ú__doc__Ú
__future__r   Úcontextvarsr   Útypingr   r   r   Úquber.agents.langsmith_tracerr   r	   Ú__annotations__r   r   r   r   r   r   Ú<module>r      sD   ðòõ  #å "ß &Ñ &å 9ñ +5°^ÈTÑ*R€Ð'Ó Rà%)€Ð	"Ó )ôõ+r   