Class: TalkToYourApp::Current

Inherits:
ActiveSupport::CurrentAttributes
  • Object
show all
Defined in:
lib/talk_to_your_app/current.rb

Overview

Per-request context, set by the auth middleware and read by tool contexts and the audit logger. The MCP SDK does not thread the Rack env through to tool invocations, so we carry the principal and session id here. ActiveSupport::CurrentAttributes is request-isolated and reset by the Rails executor between requests.