Module context_helpers
Module context_helpers
Module context_helpers
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.
Context helpers for reading scope metadata on the intercept hot path.
These functions read from the NeMo Relay scope stack (via current_scope_stack) to extract information needed by the LLM request intercept:
extract_scope_path: collects function names from the scope stack for trie lookupread_manual_latency_sensitivity: walks all scopes for manual latency_sensitive annotationsresolve_agent_id: returns the first Agent scope name from the scope stackAll functions are safe to call from sync contexts (intercepts are sync closures). They acquire a read lock on the scope stack, which is always fast.
Manual latency sensitivity is stored in scope metadata under the JSON path /nemo_relay_adaptive/latency_sensitivity as a positive integer.