packages feed

agentic-jev 0.2.0.3 → 0.2.0.4

raw patch · 5 files changed

+12/−8 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Changelog for agentic-jev +## 0.2.0.4 - 2026-10-06++* Follows agentic's record field changes; no API change.+ ## 0.2.0.3 - 2026-10-06  * `MissingToken` is `MissingKey`, like the other providers.
agentic-jev.cabal view
@@ -1,6 +1,6 @@ cabal-version:      3.0 name:               agentic-jev-version:            0.2.0.3+version:            0.2.0.4 synopsis:           Jev (TypeSafe) as the System One provider for agentic description:   Answers agentic's judgements (yes/no, choice and score questions) with Jev, TypeSafe's System One model, which returns calibrated probabilities.
src/Agentic/Jev.hs view
@@ -101,8 +101,8 @@ requestBody cfg request =   A.Object     [ ("model", A.String cfg.model)-    , ("state", requestInput request)-    , ("questions", A.Object [(qid, question q) | (qid, q) <- ided (requestQuestions request)])+    , ("state", request.input)+    , ("questions", A.Object [(qid, question q) | (qid, q) <- ided request.questions])     ]   where     question = \case@@ -126,7 +126,7 @@   where     parse = J.withObject "response" $ \response -> do       answers <- response .: "answers"-      traverse (\(qid, q) -> answers .: Key.fromText qid >>= answer q) (ided (requestQuestions request))+      traverse (\(qid, q) -> answers .: Key.fromText qid >>= answer q) (ided request.questions)     answer q = J.withObject "answer" $ \a -> case q of       AskYesNo _ -> YesNoAnswer . toProbability <$> a .: "noul"       AskChoice _ opts -> do
test-live/Live.hs view
@@ -45,9 +45,9 @@                   <*> score @Groan "How much will the audience groan?"             )             joke-        probability (yes funny) `shouldSatisfy` (\p -> p >= 0 && p <= 1)-        map fst (choiceProbabilities reaction) `shouldBe` [Mild, Solid, Unbearable]-        position groan `shouldSatisfy` (\p -> p >= 0 && p <= 2)+        probability funny.yes `shouldSatisfy` (\p -> p >= 0 && p <= 1)+        map fst reaction.probabilities `shouldBe` [Mild, Solid, Unbearable]+        groan.position `shouldSatisfy` (\p -> p >= 0 && p <= 2)        it "filters with keep" $ do         rt <- pure runtime >>= withSystemOne jev
test/Spec.hs view
@@ -19,7 +19,7 @@ request =   JudgeRequest     (Object [("joke", String "Why was the scarecrow promoted?")])-    (specs ((,,) <$> yesNo "Is it funny?" <*> choice @Groan "Which reaction?" <*> score @Groan "How much groaning?"))+    (((,,) <$> yesNo "Is it funny?" <*> choice @Groan "Which reaction?" <*> score @Groan "How much groaning?").specs)   main :: IO ()