pms-infra-cmdrun 0.1.0.0 → 0.1.1.0
raw patch · 5 files changed
+20/−2 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- pms-infra-cmdrun.cabal +1/−1
- src/PMS/Infra/CmdRun/DS/Core.hs +5/−0
- src/PMS/Infra/CmdRun/DS/Utility.hs +8/−1
- test/PMS/Infra/CmdRun/App/ControlSpec.hs +2/−0
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for pms-infra-cmdrun +## 0.1.1.0 -- 2026-07-05++* Changed the method for retrieving command execution results.+ ## 0.1.0.0 -- 2026-06-15 * Added pms-infra-agent-server: TCP server listen/accept functionality for AI agents.
pms-infra-cmdrun.cabal view
@@ -20,7 +20,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.1.0.0+version: 0.1.1.0 -- A short (one-line) description of the package. synopsis: pms-infra-cmdrun
src/PMS/Infra/CmdRun/DS/Core.hs view
@@ -154,6 +154,11 @@ -- | -- +-- On Windows, .bat scripts call "chcp 65001" at their start to switch the+-- active code page to UTF-8. This ensures that both built-in commands+-- (echo, move, copy, etc.) and external commands (tree.com, xcopy.exe, etc.)+-- emit UTF-8 output. The raw ByteString received from the process is therefore+-- UTF-8 on all platforms, and decodeUtf8With lenientDecode is used uniformly. cmdRunTask :: STM.TQueue DM.McpResponse -> DM.DefaultCmdRunCommandData -> String -> Int -> IO () cmdRunTask resQ cmdDat cmd tout = flip E.catchAny errHdl $ do hPutStrLn stderr $ "[INFO] PMS.Infra.CmdRun.DS.Core.work.cmdRunTask.run cmd: " ++ cmd
src/PMS/Infra/CmdRun/DS/Utility.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} module PMS.Infra.CmdRun.DS.Utility where@@ -145,9 +146,15 @@ return (hout, herr, ph) +-- | Create a shell process for the given command string.+-- On Windows, the .bat scripts are expected to call "chcp 65001" at their+-- start to switch the code page to UTF-8, so that both built-in commands+-- (echo, move, copy, etc.) and external commands (tree.com, xcopy.exe, etc.)+-- emit UTF-8 output that can be decoded uniformly with decodeUtf8With. createShellProcess :: String -> IO (Handle, Handle, Handle, ProcessHandle) createShellProcess cmd = do- (mHin, mHout, mHerr, ph) <- createProcess (shell cmd) {+ let procSpec = shell cmd+ (mHin, mHout, mHerr, ph) <- createProcess procSpec { std_in = CreatePipe , std_out = CreatePipe , std_err = CreatePipe
test/PMS/Infra/CmdRun/App/ControlSpec.hs view
@@ -224,3 +224,5 @@ isError res `shouldBe` True secondText res `shouldContain` "timeout occurred."++