never executed always true always false
    1 module PureClaw.Agent.Env
    2   ( -- * Agent environment
    3     AgentEnv (..)
    4   ) where
    5 
    6 import Data.Text (Text)
    7 
    8 import PureClaw.Core.Types
    9 import PureClaw.Handles.Channel
   10 import PureClaw.Handles.Log
   11 import PureClaw.Providers.Class
   12 import PureClaw.Security.Vault
   13 import PureClaw.Tools.Registry
   14 
   15 -- | All runtime dependencies for the agent loop, gathered into a single record.
   16 -- This replaces the multi-parameter signature of 'runAgentLoop' and
   17 -- 'executeSlashCommand', making it easy to add new capabilities (e.g.
   18 -- 'VaultHandle') in later work units without touching call sites.
   19 data AgentEnv = AgentEnv
   20   { _env_provider     :: SomeProvider
   21     -- ^ The LLM provider (wrapped existential, erases the concrete type).
   22   , _env_model        :: ModelId
   23     -- ^ The model to use for completions.
   24   , _env_channel      :: ChannelHandle
   25     -- ^ The channel to read messages from and write responses to.
   26   , _env_logger       :: LogHandle
   27     -- ^ Structured logger for diagnostic output.
   28   , _env_systemPrompt :: Maybe Text
   29     -- ^ Optional system prompt prepended to every conversation.
   30   , _env_registry     :: ToolRegistry
   31     -- ^ All registered tools available for the agent to call.
   32   , _env_vault        :: Maybe VaultHandle
   33     -- ^ Optional secrets vault. 'Nothing' if no vault is configured.
   34   }