pms-infra-socket 0.0.2.0 → 0.0.3.0
raw patch · 4 files changed
+12/−8 lines, 4 files
Files
- CHANGELOG.md +4/−0
- pms-infra-socket.cabal +1/−1
- src/PMS/Infra/Socket/DS/Core.hs +5/−4
- src/PMS/Infra/Socket/DS/Utility.hs +2/−3
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for pms-infra-socket +## 0.0.3.0 -- 2025-07-20++* Added proc tool.+ ## 0.0.2.0 -- 2025-07-13 * Added serial tool.
pms-infra-socket.cabal view
@@ -20,7 +20,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.0.2.0+version: 0.0.3.0 -- A short (one-line) description of the package. synopsis: pms-infra-socket
src/PMS/Infra/Socket/DS/Core.hs view
@@ -60,17 +60,18 @@ -- cmd2task :: ConduitT DM.SocketCommand (IOTask ()) AppContext () cmd2task = await >>= \case- Just cmd -> flip catchError errHdl $ do+ Just cmd -> flip catchError (errHdl cmd) $ do lift (go cmd) >>= yield >> cmd2task Nothing -> do $logWarnS DM._LOGTAG "cmd2task: await returns nothing. skip." cmd2task where- errHdl :: String -> ConduitT DM.SocketCommand (IOTask ()) AppContext ()- errHdl msg = do+ errHdl :: DM.SocketCommand -> String -> ConduitT DM.SocketCommand (IOTask ()) AppContext ()+ errHdl socketCmd msg = do+ let jsonrpc = DM.getJsonRpcSocketCommand socketCmd $logWarnS DM._LOGTAG $ T.pack $ "cmd2task: exception occurred. skip. " ++ msg- lift $ errorToolsCallResponse $ "cmd2task: exception occurred. skip. " ++ msg+ lift $ errorToolsCallResponse jsonrpc $ "cmd2task: exception occurred. skip. " ++ msg cmd2task go :: DM.SocketCommand -> AppContext (IOTask ())
src/PMS/Infra/Socket/DS/Utility.hs view
@@ -69,9 +69,8 @@ -- | ---errorToolsCallResponse :: String -> AppContext ()-errorToolsCallResponse errStr = do- jsonRpc <- view jsonrpcAppData <$> ask+errorToolsCallResponse :: DM.JsonRpcRequest -> String -> AppContext ()+errorToolsCallResponse jsonRpc errStr = do let content = [ DM.McpToolsCallResponseResultContent "text" errStr ] result = DM.McpToolsCallResponseResult { DM._contentMcpToolsCallResponseResult = content