packages feed

A-gent 0.11.0.9 → 0.11.0.10

raw patch · 8 files changed

+87/−76 lines, 8 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Agent.Data.ANSI.EscapeCode: data Frecuency
- Agent.JSON: DiffSchema :: DecodeError
- Agent.JSON: InvalidJSON :: DecodeError
- Agent.JSON: class Typeable a => Data a
- Agent.JSON: data DecodeError
- Agent.JSON: decode :: Data a => String -> Either DecodeError a
- Agent.JSON: encode :: Data a => a -> String
+ Agent.Data.ANSI.EscapeCode: data Frequency
+ Agent.Data.JSON: DiffSchema :: DecodeError
+ Agent.Data.JSON: InvalidJSON :: DecodeError
+ Agent.Data.JSON: class Typeable a => Data a
+ Agent.Data.JSON: data DecodeError
+ Agent.Data.JSON: decode :: Data a => String -> Either DecodeError a
+ Agent.Data.JSON: encode :: Data a => a -> String
- Agent.Data.ANSI.EscapeCode: Fast :: Frecuency
+ Agent.Data.ANSI.EscapeCode: Fast :: Frequency
- Agent.Data.ANSI.EscapeCode: Slow :: Frecuency
+ Agent.Data.ANSI.EscapeCode: Slow :: Frequency
- Agent.Data.ANSI.EscapeCode: blink :: Frecuency -> SelectGraphicRendition -> SelectGraphicRendition
+ Agent.Data.ANSI.EscapeCode: blink :: Frequency -> SelectGraphicRendition -> SelectGraphicRendition

Files

A-gent.cabal view
@@ -9,7 +9,7 @@ build-type: Simple                                                name: A-gent-version: 0.11.0.9+version: 0.11.0.10  synopsis: Polite & well educated LLM agent with excellent manners that always behaves well description: Polite and well educated LLM agent with excellent manners that always behaves well@@ -151,20 +151,21 @@       --       Internal.GlasgowUniversity.Data.Generics.Aliases       ---      Internal.LLM       Internal.RIO+      --+      Internal.LLM   exposed-modules:       Agent.Control.Concurrent       Agent.Control.IFC       Agent.Control.MAC+      --       Agent.Data.ANSI.EscapeCode+      Agent.Data.JSON       --       Agent.IO.Effects       Agent.IO.Restricted       --       Agent.Utils.Common-      ---      Agent.JSON       --       Agent.LLM 
CHANGELOG.md view
@@ -1,5 +1,11 @@ # Revision history for Λ-gent +## 0.11.0.10 -- 2026-04-17++* Minor bug fixes and misspells.++* Moved Agent/JSON.hs to Agent/Data/JSON.hs+ ## 0.11.0.9 -- 2026-04-16  * Minor bug fixes.
src/Agent/Data/ANSI/EscapeCode.hs view
@@ -24,7 +24,7 @@     , Cyan     , White     )-  , Frecuency+  , Frequency     ( Slow     , Fast     )@@ -79,11 +79,11 @@ data Background = BG !Bool Bright Colour data Foreground = FG !Bool Bright Colour -data Frecuency+data Frequency   = Slow   | Fast -data Blink = B !Bool Frecuency+data Blink = B !Bool Frequency  data SelectGraphicRendition   = SGR !Background !Foreground !Bool !Bool !Bool !Bool !Blink String@@ -156,7 +156,7 @@   -> SelectGraphicRendition  blink-  :: Frecuency+  :: Frequency   -> SelectGraphicRendition   -> SelectGraphicRendition 
+ src/Agent/Data/JSON.hs view
@@ -0,0 +1,64 @@+{-# OPTIONS_GHC -Wall -Werror #-}++{-# LANGUAGE NoGeneralizedNewtypeDeriving #-}+{-# LANGUAGE Safe                         #-}++--------------------------------------------------------------------------------++-- |+-- Copyright  : (c) 2026 SPISE MISU ApS+-- License    : SSPL-1.0 OR AGPL-3.0-only+-- Maintainer : SPISE MISU <mail+hackage@spisemisu.com>+-- Stability  : experimental++--------------------------------------------------------------------------------++module Agent.Data.JSON+  ( -- * Infer JSON from Data+    Data+    -- * JSON Encoder/Decoder+  , DecodeError(InvalidJSON, DiffSchema)+  , encode+  , decode+  )+where++--------------------------------------------------------------------------------++import           Data.Data                            ( Data )++import           Internal.GaloisInc.Text.JSON.Generic+  ( Result (Error, Ok)+  , encodeJSON+  , fromJSON+  )+import           Internal.GaloisInc.Text.JSON.String+  ( readJSValue+  , runGetJSON+  )++--------------------------------------------------------------------------------++data DecodeError+  = InvalidJSON+  | DiffSchema++--------------------------------------------------------------------------------++encode+  :: Data a+  => a+  -> String+encode = encodeJSON++decode+  :: Data a+  => String+  -> Either DecodeError a+decode json =+  case runGetJSON readJSValue json of+    Left  _ -> Left InvalidJSON+    Right v ->+      case fromJSON v of+        Error _ -> Left  DiffSchema+        Ok    a -> Right a
− src/Agent/JSON.hs
@@ -1,64 +0,0 @@-{-# OPTIONS_GHC -Wall -Werror #-}--{-# LANGUAGE NoGeneralizedNewtypeDeriving #-}-{-# LANGUAGE Safe                         #-}-------------------------------------------------------------------------------------- |--- Copyright  : (c) 2026 SPISE MISU ApS--- License    : SSPL-1.0 OR AGPL-3.0-only--- Maintainer : SPISE MISU <mail+hackage@spisemisu.com>--- Stability  : experimental------------------------------------------------------------------------------------module Agent.JSON-  ( -- * Infer JSON from Data-    Data-    -- * JSON Encoder/Decoder-  , DecodeError(InvalidJSON, DiffSchema)-  , encode-  , decode-  )-where------------------------------------------------------------------------------------import           Data.Data                            ( Data )--import           Internal.GaloisInc.Text.JSON.Generic-  ( Result (Error, Ok)-  , encodeJSON-  , fromJSON-  )-import           Internal.GaloisInc.Text.JSON.String-  ( readJSValue-  , runGetJSON-  )------------------------------------------------------------------------------------data DecodeError-  = InvalidJSON-  | DiffSchema------------------------------------------------------------------------------------encode-  :: Data a-  => a-  -> String-encode = encodeJSON--decode-  :: Data a-  => String-  -> Either DecodeError a-decode json =-  case runGetJSON readJSValue json of-    Left  _ -> Left InvalidJSON-    Right v ->-      case fromJSON v of-        Error _ -> Left  DiffSchema-        Ok    a -> Right a
src/Agent/LLM.hs view
@@ -81,7 +81,7 @@   )  import qualified Agent.Data.ANSI.EscapeCode           as AEC-import qualified Agent.JSON                           as JSON+import qualified Agent.Data.JSON                      as JSON import qualified Agent.Utils.Common                   as COM  --------------------------------------------------------------------------------@@ -364,6 +364,7 @@         caseFile txt midx nums =           ( case idx of               Just i ->+                -- TODO: Test with empty list/pile                 if 0 <= i && i < length pfs then                   let                     cwd =@@ -455,8 +456,7 @@         (show . AEC.bold . AEC.sgr)         ("Λ-" ++ (map toLower . show . mode) ctx ++ "> ")       read      = input-      -- print     = output . show . AEC.faint . AEC.sgr-      print     = output+      print     = output . show . AEC.faint . AEC.sgr       printLn x = print $ x ++ "\n"  head :: String
src/Internal/LLM.hs view
@@ -143,7 +143,7 @@         else           ". Output MUST match provided `examples`"       ) ++-      ( if ees then+      ( if eds then           []         else           ". List of provided `documents`"
src/Internal/RIO.hs view
@@ -1024,6 +1024,10 @@         [ path         , "-path"         , mask+          -- NOTE: Exclude dot files and tmp Emacs files (.*#)+        , "-not"+        , "-name"+        , ".*"         ]  getEnvVar