never executed always true always false
    1 module PureClaw.Session.Handle
    2   ( -- * Session handle (WU1 stub)
    3     SessionHandle (..)
    4   , mkNoOpSessionHandle
    5   , noOpSessionHandle
    6   ) where
    7 
    8 import PureClaw.Handles.Transcript (TranscriptHandle, mkNoOpTranscriptHandle)
    9 
   10 -- | Handle for the current conversation session. WU1 only provides a no-op
   11 -- placeholder so the agent loop can compile with the field added to
   12 -- 'PureClaw.Agent.Env.AgentEnv'. WU2 will extend this with metadata
   13 -- persistence, resume, and transcript directory management.
   14 data SessionHandle = SessionHandle
   15   { _sh_transcript :: TranscriptHandle
   16     -- ^ Transcript handle owned by the session. In WU1 this is always the
   17     -- no-op transcript; WU2 replaces it with a per-session file handle.
   18   , _sh_dir        :: FilePath
   19     -- ^ On-disk session directory. Empty in WU1.
   20   }
   21 
   22 -- | A no-op session handle for tests and for WU1 (pre-session integration).
   23 mkNoOpSessionHandle :: IO SessionHandle
   24 mkNoOpSessionHandle = pure noOpSessionHandle
   25 
   26 -- | Pure no-op session handle. Useful for tests that build 'AgentEnv'
   27 -- records inside pure @let@-bindings without threading 'IO'.
   28 noOpSessionHandle :: SessionHandle
   29 noOpSessionHandle = SessionHandle
   30   { _sh_transcript = mkNoOpTranscriptHandle
   31   , _sh_dir        = ""
   32   }