Module: KairosMcp::Daemon::ExecutionContext

Defined in:
lib/kairos_mcp/daemon/execution_context.rb

Overview

ExecutionContext — Fiber-local-ready abstraction for daemon execution state.

Design (P3.2 v0.2 §5.2):

Single indirection point for Thread/Fiber-local state. If the daemon
moves to Fiber-based async, only this module needs to change.
Currently delegates to Thread.current (which is Fiber-local in Ruby).

Class Method Summary collapse

Class Method Details

.current_elevation_tokenObject



12
13
14
# File 'lib/kairos_mcp/daemon/execution_context.rb', line 12

def self.current_elevation_token
  Thread.current[:kairos_elevation_token]
end

.current_elevation_token=(token) ⇒ Object



16
17
18
# File 'lib/kairos_mcp/daemon/execution_context.rb', line 16

def self.current_elevation_token=(token)
  Thread.current[:kairos_elevation_token] = token
end