pms-ui-notification 0.0.1.0 → 0.0.2.0
raw patch · 4 files changed
+22/−6 lines, 4 files
Files
- CHANGELOG.md +4/−0
- pms-ui-notification.cabal +1/−1
- src/PMS/UI/Notification/DS/Core.hs +15/−3
- test/PMS/UI/Notification/App/ControlSpec.hs +2/−2
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for pms-ui-notification +## 0.0.2.0 -- 2025-06-29++* Added prompts interface.+ ## 0.0.1.0 -- 2025-06-22 * First version.
pms-ui-notification.cabal view
@@ -20,7 +20,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.0.1.0+version: 0.0.2.0 -- A short (one-line) description of the package. synopsis: pms-ui-notification
src/PMS/UI/Notification/DS/Core.hs view
@@ -71,14 +71,26 @@ -- | -- mcp2json :: DM.McpNotification -> AppContext DM.JsonRpcNotification-mcp2json (DM.McpToolListChangedNotification dat) = do+mcp2json (DM.McpToolsListChangedNotification dat) = do $logDebugS DM._LOGTAG $ T.pack $ "mcp2json: " ++ show dat - let params = encode (dat^.DM.paramsMcpToolListChangedNotificationData)+ let params = encode (dat^.DM.paramsMcpToolsListChangedNotificationData) $logDebugS DM._LOGTAG $ T.pack $ "mcp2json: " ++ show params let json = def {- DM._methodJsonRpcNotification = dat^.DM.methodMcpToolListChangedNotificationData+ DM._methodJsonRpcNotification = dat^.DM.methodMcpToolsListChangedNotificationData+ , DM._paramsJsonRpcNotification = Just (DM.RawJsonByteString params)+ } + return json++mcp2json (DM.McpPromptsListChangedNotification dat) = do+ $logDebugS DM._LOGTAG $ T.pack $ "mcp2json: " ++ show dat++ let params = encode (dat^.DM.paramsMcpPromptsListChangedNotificationData)+ $logDebugS DM._LOGTAG $ T.pack $ "mcp2json: " ++ show params++ let json = def {+ DM._methodJsonRpcNotification = dat^.DM.methodMcpPromptsListChangedNotificationData , DM._paramsJsonRpcNotification = Just (DM.RawJsonByteString params) } return json
test/PMS/UI/Notification/App/ControlSpec.hs view
@@ -92,7 +92,7 @@ run :: SpecWith SpecContext run = do describe "runWithAppData" $ do- context "when McpToolListChangedNotification" $ do+ context "when McpToolsListChangedNotification" $ do it "should be JsonRpcNotification" $ \ctx -> do putStrLn "[INFO] EXECUTING THE FIRST TEST." @@ -100,7 +100,7 @@ domDat = ctx^.domainDataSpecContext appDat = ctx^.appDataSpecContext queue = domDat^.DM.notificationQueueDomainData- noti = DM.McpToolListChangedNotification def+ noti = DM.McpToolsListChangedNotification def expect = True thId <- async $ SUT.runWithAppData appDat domDat