packages feed

pms-domain-model 0.1.8.0 → 0.1.9.0

raw patch · 4 files changed

+199/−1 lines, 4 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ PMS.Domain.Model.DM.Type: AgentServerCloseCommand :: AgentServerCloseCommandData -> AgentServerCommand
+ PMS.Domain.Model.DM.Type: AgentServerCloseCommandData :: JsonRpcRequest -> AgentServerCloseCommandData
+ PMS.Domain.Model.DM.Type: AgentServerEventsCommand :: AgentServerEventsCommandData -> AgentServerCommand
+ PMS.Domain.Model.DM.Type: AgentServerEventsCommandData :: JsonRpcRequest -> RawJsonByteString -> AgentServerEventsCommandData
+ PMS.Domain.Model.DM.Type: AgentServerInternalClientConnectedCommand :: AgentServerInternalClientConnectedCommandData -> AgentServerCommand
+ PMS.Domain.Model.DM.Type: AgentServerInternalClientConnectedCommandData :: String -> String -> AgentServerInternalClientConnectedCommandData
+ PMS.Domain.Model.DM.Type: AgentServerInternalClientDisconnectedCommand :: AgentServerInternalClientDisconnectedCommandData -> AgentServerCommand
+ PMS.Domain.Model.DM.Type: AgentServerInternalClientDisconnectedCommandData :: String -> AgentServerInternalClientDisconnectedCommandData
+ PMS.Domain.Model.DM.Type: AgentServerListenCommand :: AgentServerListenCommandData -> AgentServerCommand
+ PMS.Domain.Model.DM.Type: AgentServerListenCommandData :: JsonRpcRequest -> RawJsonByteString -> AgentServerListenCommandData
+ PMS.Domain.Model.DM.Type: AgentServerReadByteCommand :: AgentServerReadByteCommandData -> AgentServerCommand
+ PMS.Domain.Model.DM.Type: AgentServerReadByteCommandData :: JsonRpcRequest -> RawJsonByteString -> AgentServerReadByteCommandData
+ PMS.Domain.Model.DM.Type: AgentServerReadCommand :: AgentServerReadCommandData -> AgentServerCommand
+ PMS.Domain.Model.DM.Type: AgentServerReadCommandData :: JsonRpcRequest -> RawJsonByteString -> AgentServerReadCommandData
+ PMS.Domain.Model.DM.Type: AgentServerStatusCommand :: AgentServerStatusCommandData -> AgentServerCommand
+ PMS.Domain.Model.DM.Type: AgentServerStatusCommandData :: JsonRpcRequest -> AgentServerStatusCommandData
+ PMS.Domain.Model.DM.Type: AgentServerWriteByteCommand :: AgentServerWriteByteCommandData -> AgentServerCommand
+ PMS.Domain.Model.DM.Type: AgentServerWriteByteCommandData :: JsonRpcRequest -> RawJsonByteString -> AgentServerWriteByteCommandData
+ PMS.Domain.Model.DM.Type: AgentServerWriteCommand :: AgentServerWriteCommandData -> AgentServerCommand
+ PMS.Domain.Model.DM.Type: AgentServerWriteCommandData :: JsonRpcRequest -> RawJsonByteString -> AgentServerWriteCommandData
+ PMS.Domain.Model.DM.Type: [_agentServerQueueDomainData] :: DomainData -> TQueue AgentServerCommand
+ PMS.Domain.Model.DM.Type: [_argumentsAgentServerEventsCommandData] :: AgentServerEventsCommandData -> RawJsonByteString
+ PMS.Domain.Model.DM.Type: [_argumentsAgentServerListenCommandData] :: AgentServerListenCommandData -> RawJsonByteString
+ PMS.Domain.Model.DM.Type: [_argumentsAgentServerReadByteCommandData] :: AgentServerReadByteCommandData -> RawJsonByteString
+ PMS.Domain.Model.DM.Type: [_argumentsAgentServerReadCommandData] :: AgentServerReadCommandData -> RawJsonByteString
+ PMS.Domain.Model.DM.Type: [_argumentsAgentServerWriteByteCommandData] :: AgentServerWriteByteCommandData -> RawJsonByteString
+ PMS.Domain.Model.DM.Type: [_argumentsAgentServerWriteCommandData] :: AgentServerWriteCommandData -> RawJsonByteString
+ PMS.Domain.Model.DM.Type: [_handleNameAgentServerInternalClientConnectedCommandData] :: AgentServerInternalClientConnectedCommandData -> String
+ PMS.Domain.Model.DM.Type: [_handleNameAgentServerInternalClientDisconnectedCommandData] :: AgentServerInternalClientDisconnectedCommandData -> String
+ PMS.Domain.Model.DM.Type: [_jsonrpcAgentServerCloseCommandData] :: AgentServerCloseCommandData -> JsonRpcRequest
+ PMS.Domain.Model.DM.Type: [_jsonrpcAgentServerEventsCommandData] :: AgentServerEventsCommandData -> JsonRpcRequest
+ PMS.Domain.Model.DM.Type: [_jsonrpcAgentServerListenCommandData] :: AgentServerListenCommandData -> JsonRpcRequest
+ PMS.Domain.Model.DM.Type: [_jsonrpcAgentServerReadByteCommandData] :: AgentServerReadByteCommandData -> JsonRpcRequest
+ PMS.Domain.Model.DM.Type: [_jsonrpcAgentServerReadCommandData] :: AgentServerReadCommandData -> JsonRpcRequest
+ PMS.Domain.Model.DM.Type: [_jsonrpcAgentServerStatusCommandData] :: AgentServerStatusCommandData -> JsonRpcRequest
+ PMS.Domain.Model.DM.Type: [_jsonrpcAgentServerWriteByteCommandData] :: AgentServerWriteByteCommandData -> JsonRpcRequest
+ PMS.Domain.Model.DM.Type: [_jsonrpcAgentServerWriteCommandData] :: AgentServerWriteCommandData -> JsonRpcRequest
+ PMS.Domain.Model.DM.Type: [_remoteAddrAgentServerInternalClientConnectedCommandData] :: AgentServerInternalClientConnectedCommandData -> String
+ PMS.Domain.Model.DM.Type: agentServerQueueDomainData :: Lens' DomainData (TQueue AgentServerCommand)
+ PMS.Domain.Model.DM.Type: argumentsAgentServerEventsCommandData :: Lens' AgentServerEventsCommandData RawJsonByteString
+ PMS.Domain.Model.DM.Type: argumentsAgentServerListenCommandData :: Lens' AgentServerListenCommandData RawJsonByteString
+ PMS.Domain.Model.DM.Type: argumentsAgentServerReadByteCommandData :: Lens' AgentServerReadByteCommandData RawJsonByteString
+ PMS.Domain.Model.DM.Type: argumentsAgentServerReadCommandData :: Lens' AgentServerReadCommandData RawJsonByteString
+ PMS.Domain.Model.DM.Type: argumentsAgentServerWriteByteCommandData :: Lens' AgentServerWriteByteCommandData RawJsonByteString
+ PMS.Domain.Model.DM.Type: argumentsAgentServerWriteCommandData :: Lens' AgentServerWriteCommandData RawJsonByteString
+ PMS.Domain.Model.DM.Type: data AgentServerCloseCommandData
+ PMS.Domain.Model.DM.Type: data AgentServerCommand
+ PMS.Domain.Model.DM.Type: data AgentServerEventsCommandData
+ PMS.Domain.Model.DM.Type: data AgentServerInternalClientConnectedCommandData
+ PMS.Domain.Model.DM.Type: data AgentServerInternalClientDisconnectedCommandData
+ PMS.Domain.Model.DM.Type: data AgentServerListenCommandData
+ PMS.Domain.Model.DM.Type: data AgentServerReadByteCommandData
+ PMS.Domain.Model.DM.Type: data AgentServerReadCommandData
+ PMS.Domain.Model.DM.Type: data AgentServerStatusCommandData
+ PMS.Domain.Model.DM.Type: data AgentServerWriteByteCommandData
+ PMS.Domain.Model.DM.Type: data AgentServerWriteCommandData
+ PMS.Domain.Model.DM.Type: getJsonRpcAgentServerCommand :: AgentServerCommand -> JsonRpcRequest
+ PMS.Domain.Model.DM.Type: handleNameAgentServerInternalClientConnectedCommandData :: Lens' AgentServerInternalClientConnectedCommandData String
+ PMS.Domain.Model.DM.Type: handleNameAgentServerInternalClientDisconnectedCommandData :: Iso' AgentServerInternalClientDisconnectedCommandData String
+ PMS.Domain.Model.DM.Type: instance Data.Aeson.Types.FromJSON.FromJSON PMS.Domain.Model.DM.Type.AgentServerCloseCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Aeson.Types.FromJSON.FromJSON PMS.Domain.Model.DM.Type.AgentServerEventsCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Aeson.Types.FromJSON.FromJSON PMS.Domain.Model.DM.Type.AgentServerListenCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Aeson.Types.FromJSON.FromJSON PMS.Domain.Model.DM.Type.AgentServerReadByteCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Aeson.Types.FromJSON.FromJSON PMS.Domain.Model.DM.Type.AgentServerReadCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Aeson.Types.FromJSON.FromJSON PMS.Domain.Model.DM.Type.AgentServerStatusCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Aeson.Types.FromJSON.FromJSON PMS.Domain.Model.DM.Type.AgentServerWriteByteCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Aeson.Types.FromJSON.FromJSON PMS.Domain.Model.DM.Type.AgentServerWriteCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Aeson.Types.ToJSON.ToJSON PMS.Domain.Model.DM.Type.AgentServerCloseCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Aeson.Types.ToJSON.ToJSON PMS.Domain.Model.DM.Type.AgentServerEventsCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Aeson.Types.ToJSON.ToJSON PMS.Domain.Model.DM.Type.AgentServerListenCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Aeson.Types.ToJSON.ToJSON PMS.Domain.Model.DM.Type.AgentServerReadByteCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Aeson.Types.ToJSON.ToJSON PMS.Domain.Model.DM.Type.AgentServerReadCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Aeson.Types.ToJSON.ToJSON PMS.Domain.Model.DM.Type.AgentServerStatusCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Aeson.Types.ToJSON.ToJSON PMS.Domain.Model.DM.Type.AgentServerWriteByteCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Aeson.Types.ToJSON.ToJSON PMS.Domain.Model.DM.Type.AgentServerWriteCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Default.Internal.Default PMS.Domain.Model.DM.Type.AgentServerCloseCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Default.Internal.Default PMS.Domain.Model.DM.Type.AgentServerEventsCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Default.Internal.Default PMS.Domain.Model.DM.Type.AgentServerListenCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Default.Internal.Default PMS.Domain.Model.DM.Type.AgentServerReadByteCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Default.Internal.Default PMS.Domain.Model.DM.Type.AgentServerReadCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Default.Internal.Default PMS.Domain.Model.DM.Type.AgentServerStatusCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Default.Internal.Default PMS.Domain.Model.DM.Type.AgentServerWriteByteCommandData
+ PMS.Domain.Model.DM.Type: instance Data.Default.Internal.Default PMS.Domain.Model.DM.Type.AgentServerWriteCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Classes.Eq PMS.Domain.Model.DM.Type.AgentServerCloseCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Classes.Eq PMS.Domain.Model.DM.Type.AgentServerCommand
+ PMS.Domain.Model.DM.Type: instance GHC.Classes.Eq PMS.Domain.Model.DM.Type.AgentServerEventsCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Classes.Eq PMS.Domain.Model.DM.Type.AgentServerInternalClientConnectedCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Classes.Eq PMS.Domain.Model.DM.Type.AgentServerInternalClientDisconnectedCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Classes.Eq PMS.Domain.Model.DM.Type.AgentServerListenCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Classes.Eq PMS.Domain.Model.DM.Type.AgentServerReadByteCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Classes.Eq PMS.Domain.Model.DM.Type.AgentServerReadCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Classes.Eq PMS.Domain.Model.DM.Type.AgentServerStatusCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Classes.Eq PMS.Domain.Model.DM.Type.AgentServerWriteByteCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Classes.Eq PMS.Domain.Model.DM.Type.AgentServerWriteCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Read.Read PMS.Domain.Model.DM.Type.AgentServerCloseCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Read.Read PMS.Domain.Model.DM.Type.AgentServerCommand
+ PMS.Domain.Model.DM.Type: instance GHC.Read.Read PMS.Domain.Model.DM.Type.AgentServerEventsCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Read.Read PMS.Domain.Model.DM.Type.AgentServerInternalClientConnectedCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Read.Read PMS.Domain.Model.DM.Type.AgentServerInternalClientDisconnectedCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Read.Read PMS.Domain.Model.DM.Type.AgentServerListenCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Read.Read PMS.Domain.Model.DM.Type.AgentServerReadByteCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Read.Read PMS.Domain.Model.DM.Type.AgentServerReadCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Read.Read PMS.Domain.Model.DM.Type.AgentServerStatusCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Read.Read PMS.Domain.Model.DM.Type.AgentServerWriteByteCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Read.Read PMS.Domain.Model.DM.Type.AgentServerWriteCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Show.Show PMS.Domain.Model.DM.Type.AgentServerCloseCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Show.Show PMS.Domain.Model.DM.Type.AgentServerCommand
+ PMS.Domain.Model.DM.Type: instance GHC.Show.Show PMS.Domain.Model.DM.Type.AgentServerEventsCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Show.Show PMS.Domain.Model.DM.Type.AgentServerInternalClientConnectedCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Show.Show PMS.Domain.Model.DM.Type.AgentServerInternalClientDisconnectedCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Show.Show PMS.Domain.Model.DM.Type.AgentServerListenCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Show.Show PMS.Domain.Model.DM.Type.AgentServerReadByteCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Show.Show PMS.Domain.Model.DM.Type.AgentServerReadCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Show.Show PMS.Domain.Model.DM.Type.AgentServerStatusCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Show.Show PMS.Domain.Model.DM.Type.AgentServerWriteByteCommandData
+ PMS.Domain.Model.DM.Type: instance GHC.Show.Show PMS.Domain.Model.DM.Type.AgentServerWriteCommandData
+ PMS.Domain.Model.DM.Type: jsonrpcAgentServerCloseCommandData :: Iso' AgentServerCloseCommandData JsonRpcRequest
+ PMS.Domain.Model.DM.Type: jsonrpcAgentServerEventsCommandData :: Lens' AgentServerEventsCommandData JsonRpcRequest
+ PMS.Domain.Model.DM.Type: jsonrpcAgentServerListenCommandData :: Lens' AgentServerListenCommandData JsonRpcRequest
+ PMS.Domain.Model.DM.Type: jsonrpcAgentServerReadByteCommandData :: Lens' AgentServerReadByteCommandData JsonRpcRequest
+ PMS.Domain.Model.DM.Type: jsonrpcAgentServerReadCommandData :: Lens' AgentServerReadCommandData JsonRpcRequest
+ PMS.Domain.Model.DM.Type: jsonrpcAgentServerStatusCommandData :: Iso' AgentServerStatusCommandData JsonRpcRequest
+ PMS.Domain.Model.DM.Type: jsonrpcAgentServerWriteByteCommandData :: Lens' AgentServerWriteByteCommandData JsonRpcRequest
+ PMS.Domain.Model.DM.Type: jsonrpcAgentServerWriteCommandData :: Lens' AgentServerWriteCommandData JsonRpcRequest
+ PMS.Domain.Model.DM.Type: remoteAddrAgentServerInternalClientConnectedCommandData :: Lens' AgentServerInternalClientConnectedCommandData String
+ PMS.Domain.Model.DS.Utility: hexToBytes :: String -> Either String ByteString
- PMS.Domain.Model.DM.Type: DomainData :: Maybe String -> LogLevel -> String -> String -> String -> Maybe String -> TQueue McpRequest -> TQueue McpResponse -> TQueue McpNotification -> TQueue Command -> TQueue CmdRunCommand -> TQueue FileSystemCommand -> TQueue WatchCommand -> TQueue ProcSpawnCommand -> TQueue AgentProcessCommand -> TQueue AgentSocketCommand -> TQueue AgentSerialCommand -> TQueue SocketCommand -> TQueue SerialCommand -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> Int -> DomainData
+ PMS.Domain.Model.DM.Type: DomainData :: Maybe String -> LogLevel -> String -> String -> String -> Maybe String -> TQueue McpRequest -> TQueue McpResponse -> TQueue McpNotification -> TQueue Command -> TQueue CmdRunCommand -> TQueue FileSystemCommand -> TQueue WatchCommand -> TQueue ProcSpawnCommand -> TQueue AgentProcessCommand -> TQueue AgentSocketCommand -> TQueue AgentSerialCommand -> TQueue AgentServerCommand -> TQueue SocketCommand -> TQueue SerialCommand -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> Int -> DomainData

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for pms-domain-model +## 0.1.9.0 -- 2026-06-15++* Added pms-infra-agent-server: TCP server listen/accept functionality for AI agents.+ ## 0.1.8.0 -- 2026-05-31  * Added pms-infra-agent-socket, pms-infra-agent-serial.
pms-domain-model.cabal view
@@ -20,7 +20,7 @@ -- PVP summary:     +-+------- breaking API changes --                  | | +----- non-breaking API additions --                  | | | +--- code changes with no API change-version:            0.1.8.0+version:            0.1.9.0  -- A short (one-line) description of the package. synopsis:           pms-domain-model
src/PMS/Domain/Model/DM/Type.hs view
@@ -1789,6 +1789,190 @@ -------------------------------------------------------------------------------- -- | --+data AgentServerListenCommandData =+  AgentServerListenCommandData {+    _jsonrpcAgentServerListenCommandData   :: JsonRpcRequest+  , _argumentsAgentServerListenCommandData :: RawJsonByteString+  } deriving (Show, Read, Eq)++$(deriveJSON defaultOptions {fieldLabelModifier = dropDataName "AgentServerListenCommandData", omitNothingFields = True} ''AgentServerListenCommandData)+makeLenses ''AgentServerListenCommandData++instance Default AgentServerListenCommandData where+  def = AgentServerListenCommandData {+        _jsonrpcAgentServerListenCommandData   = def+      , _argumentsAgentServerListenCommandData = def+      }++-- |+--+data AgentServerCloseCommandData =+  AgentServerCloseCommandData {+    _jsonrpcAgentServerCloseCommandData :: JsonRpcRequest+  } deriving (Show, Read, Eq)++$(deriveJSON defaultOptions {fieldLabelModifier = dropDataName "AgentServerCloseCommandData", omitNothingFields = True} ''AgentServerCloseCommandData)+makeLenses ''AgentServerCloseCommandData++instance Default AgentServerCloseCommandData where+  def = AgentServerCloseCommandData {+        _jsonrpcAgentServerCloseCommandData = def+      }++-- |+--+data AgentServerStatusCommandData =+  AgentServerStatusCommandData {+    _jsonrpcAgentServerStatusCommandData :: JsonRpcRequest+  } deriving (Show, Read, Eq)++$(deriveJSON defaultOptions {fieldLabelModifier = dropDataName "AgentServerStatusCommandData", omitNothingFields = True} ''AgentServerStatusCommandData)+makeLenses ''AgentServerStatusCommandData++instance Default AgentServerStatusCommandData where+  def = AgentServerStatusCommandData {+        _jsonrpcAgentServerStatusCommandData = def+      }++-- |+--+data AgentServerEventsCommandData =+  AgentServerEventsCommandData {+    _jsonrpcAgentServerEventsCommandData   :: JsonRpcRequest+  , _argumentsAgentServerEventsCommandData :: RawJsonByteString+  } deriving (Show, Read, Eq)++$(deriveJSON defaultOptions {fieldLabelModifier = dropDataName "AgentServerEventsCommandData", omitNothingFields = True} ''AgentServerEventsCommandData)+makeLenses ''AgentServerEventsCommandData++instance Default AgentServerEventsCommandData where+  def = AgentServerEventsCommandData {+        _jsonrpcAgentServerEventsCommandData   = def+      , _argumentsAgentServerEventsCommandData = def+      }++-- |+--+data AgentServerReadCommandData =+  AgentServerReadCommandData {+    _jsonrpcAgentServerReadCommandData   :: JsonRpcRequest+  , _argumentsAgentServerReadCommandData :: RawJsonByteString+  } deriving (Show, Read, Eq)++$(deriveJSON defaultOptions {fieldLabelModifier = dropDataName "AgentServerReadCommandData", omitNothingFields = True} ''AgentServerReadCommandData)+makeLenses ''AgentServerReadCommandData++instance Default AgentServerReadCommandData where+  def = AgentServerReadCommandData {+        _jsonrpcAgentServerReadCommandData   = def+      , _argumentsAgentServerReadCommandData = def+      }++-- |+--+data AgentServerWriteCommandData =+  AgentServerWriteCommandData {+    _jsonrpcAgentServerWriteCommandData   :: JsonRpcRequest+  , _argumentsAgentServerWriteCommandData :: RawJsonByteString+  } deriving (Show, Read, Eq)++$(deriveJSON defaultOptions {fieldLabelModifier = dropDataName "AgentServerWriteCommandData", omitNothingFields = True} ''AgentServerWriteCommandData)+makeLenses ''AgentServerWriteCommandData++instance Default AgentServerWriteCommandData where+  def = AgentServerWriteCommandData {+        _jsonrpcAgentServerWriteCommandData   = def+      , _argumentsAgentServerWriteCommandData = def+      }++-- |+--+data AgentServerReadByteCommandData =+  AgentServerReadByteCommandData {+    _jsonrpcAgentServerReadByteCommandData   :: JsonRpcRequest+  , _argumentsAgentServerReadByteCommandData :: RawJsonByteString+  } deriving (Show, Read, Eq)++$(deriveJSON defaultOptions {fieldLabelModifier = dropDataName "AgentServerReadByteCommandData", omitNothingFields = True} ''AgentServerReadByteCommandData)+makeLenses ''AgentServerReadByteCommandData++instance Default AgentServerReadByteCommandData where+  def = AgentServerReadByteCommandData {+        _jsonrpcAgentServerReadByteCommandData   = def+      , _argumentsAgentServerReadByteCommandData = def+      }++-- |+--+data AgentServerWriteByteCommandData =+  AgentServerWriteByteCommandData {+    _jsonrpcAgentServerWriteByteCommandData   :: JsonRpcRequest+  , _argumentsAgentServerWriteByteCommandData :: RawJsonByteString+  } deriving (Show, Read, Eq)++$(deriveJSON defaultOptions {fieldLabelModifier = dropDataName "AgentServerWriteByteCommandData", omitNothingFields = True} ''AgentServerWriteByteCommandData)+makeLenses ''AgentServerWriteByteCommandData++instance Default AgentServerWriteByteCommandData where+  def = AgentServerWriteByteCommandData {+        _jsonrpcAgentServerWriteByteCommandData   = def+      , _argumentsAgentServerWriteByteCommandData = def+      }++-- |+--+-- |+-- Internal event command data: client connected notification from acceptLoop.+data AgentServerInternalClientConnectedCommandData =+  AgentServerInternalClientConnectedCommandData+    { _handleNameAgentServerInternalClientConnectedCommandData :: String+    , _remoteAddrAgentServerInternalClientConnectedCommandData :: String+    } deriving (Show, Read, Eq)++makeLenses ''AgentServerInternalClientConnectedCommandData++-- |+-- Internal event command data: client disconnected notification from recvLoop.+data AgentServerInternalClientDisconnectedCommandData =+  AgentServerInternalClientDisconnectedCommandData+    { _handleNameAgentServerInternalClientDisconnectedCommandData :: String+    } deriving (Show, Read, Eq)++makeLenses ''AgentServerInternalClientDisconnectedCommandData++-- |+--+data AgentServerCommand =+    AgentServerListenCommand                    AgentServerListenCommandData+  | AgentServerCloseCommand                     AgentServerCloseCommandData+  | AgentServerStatusCommand                    AgentServerStatusCommandData+  | AgentServerEventsCommand                    AgentServerEventsCommandData+  | AgentServerReadCommand                      AgentServerReadCommandData+  | AgentServerWriteCommand                     AgentServerWriteCommandData+  | AgentServerReadByteCommand                  AgentServerReadByteCommandData+  | AgentServerWriteByteCommand                 AgentServerWriteByteCommandData+  | AgentServerInternalClientConnectedCommand   AgentServerInternalClientConnectedCommandData+  | AgentServerInternalClientDisconnectedCommand AgentServerInternalClientDisconnectedCommandData+  deriving (Show, Read, Eq)++-- |+--+getJsonRpcAgentServerCommand :: AgentServerCommand -> JsonRpcRequest+getJsonRpcAgentServerCommand (AgentServerListenCommand    d) = d^.jsonrpcAgentServerListenCommandData+getJsonRpcAgentServerCommand (AgentServerCloseCommand     d) = d^.jsonrpcAgentServerCloseCommandData+getJsonRpcAgentServerCommand (AgentServerStatusCommand    d) = d^.jsonrpcAgentServerStatusCommandData+getJsonRpcAgentServerCommand (AgentServerEventsCommand    d) = d^.jsonrpcAgentServerEventsCommandData+getJsonRpcAgentServerCommand (AgentServerReadCommand      d) = d^.jsonrpcAgentServerReadCommandData+getJsonRpcAgentServerCommand (AgentServerWriteCommand     d) = d^.jsonrpcAgentServerWriteCommandData+getJsonRpcAgentServerCommand (AgentServerReadByteCommand  d) = d^.jsonrpcAgentServerReadByteCommandData+getJsonRpcAgentServerCommand (AgentServerWriteByteCommand d) = d^.jsonrpcAgentServerWriteByteCommandData+getJsonRpcAgentServerCommand (AgentServerInternalClientConnectedCommand   _) = def+getJsonRpcAgentServerCommand (AgentServerInternalClientDisconnectedCommand _) = def+++--------------------------------------------------------------------------------+-- |+-- data SocketEchoCommandData =   SocketEchoCommandData {     _jsonrpcSocketEchoCommandData :: JsonRpcRequest@@ -1990,6 +2174,7 @@   , _agentProcessQueueDomainData   :: TQueue AgentProcessCommand   , _agentSocketQueueDomainData    :: TQueue AgentSocketCommand   , _agentSerialQueueDomainData    :: TQueue AgentSerialCommand+  , _agentServerQueueDomainData    :: TQueue AgentServerCommand   , _socketQueueDomainData         :: TQueue SocketCommand   , _serialQueueDomainData         :: TQueue SerialCommand   , _promptsDomainData             :: [String]@@ -2025,6 +2210,7 @@   agentProcQ   <- newTQueueIO   agentSocketQ <- newTQueueIO   agentSerialQ <- newTQueueIO+  agentServerQ <- newTQueueIO   socketQ      <- newTQueueIO   serialQ      <- newTQueueIO   return DomainData {@@ -2045,6 +2231,7 @@          , _agentProcessQueueDomainData = agentProcQ          , _agentSocketQueueDomainData  = agentSocketQ          , _agentSerialQueueDomainData  = agentSerialQ+         , _agentServerQueueDomainData  = agentServerQ          , _socketQueueDomainData       = socketQ          , _serialQueueDomainData       = serialQ          , _promptsDomainData           = def
src/PMS/Domain/Model/DS/Utility.hs view
@@ -260,6 +260,13 @@ bytesToHex :: BSS.ByteString -> String bytesToHex = map toUpper . BS.unpack . B16.encode +-- | Decode an uppercase/lowercase hex string to a ByteString.+hexToBytes :: String -> Either String BSS.ByteString+hexToBytes hex =+  case B16.decode (BS.pack (map toUpper hex)) of+    Right bs  -> Right bs+    Left  err -> Left $ "hexToBytes: invalid hex string: " ++ err+ -- | Encode a String to a UTF-8 encoded ByteString. str2bsUTF8 :: String -> BSS.ByteString str2bsUTF8 = TE.encodeUtf8 . T.pack