packages feed

baikai-agent 0.2.0.3 → 0.2.0.4

raw patch · 6 files changed

+159/−34 lines, 6 filesdep ~baikaidep ~baikai-claudedep ~baikai-openaiPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: baikai, baikai-claude, baikai-openai

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -7,6 +7,115 @@  ## [Unreleased] +## [baikai 0.10.0.0] - 2026-10-25++### Added++- `ThinkingNone` (`none`) explicitly requests reasoning off; `Nothing` still+  leaves provider defaults untouched. Anthropic compatibility records declare+  `supportsThinkingDisabled`; legacy records conservatively default to False.+- Endpoint-specific `NativeCachePolicy` records distinguish modern, legacy and+  unsupported native OpenAI cache controls. Policies survive legacy JSON and+  catalog refresh; Luna Responses Long has verified 12h base and tier rates.+- Evidence schema 2.8 includes the `none` preference and content-free native+  cache controls and input structure. Digest rules and the separation of+  requested, translated and observed reasoning are unchanged.++### Changed (breaking)++- `ThinkingLevel` gains `ThinkingNone` as its least constructor. Update exhaustive+  matches. Anthropic and OpenAI compatibility records gain fields; use the+  default records or update explicit record construction.+- All seven dependent packages now require `baikai ^>=0.10.0` and release+  independently below. The unchanged adapters take dependency-only patch bumps.++## [baikai-claude 0.7.3.0] - 2026-10-25++### Added++- Export `injectSystemCacheControl` for shared system-prefix cache markers.+- `ThinkingNone` sends catalog-gated `thinking: {"type": "disabled"}` without+  effort, display or a budget. Unsupported off requests remain visible+  adjustments and fail strict evidence before dispatch. A host with no thinking+  controls is not assumed to be a non-reasoning model.++### Fixed++- Short and long `cacheRetention` mark non-empty system prompts so fresh+  conversations with different first questions can reuse the tools-and-system+  prefix. System, last-tool and automatic markers share the effective TTL,+  including host downgrades, and use at most three breakpoints. Empty or absent+  system prompts and disabled caching keep their existing shape. Regression+  coverage includes tool compatibility and an isolated live shared-prefix case.+  Implements issue #2 and the approach in PR #3.++### Changed++- Require `baikai ^>=0.10.0`.++## [baikai-openai 0.7.3.0] - 2026-10-25++### Added++- Export `applyNativeCache` for validated native cache plans.+- OpenAI-compatible Chat (including Ollama) and Responses carry `none` where+  supported. Z.ai and Qwen emit `enable_thinking: false`; unsupported off+  requests remain visible adjustments and fail strict evidence before dispatch.++### Fixed++- Native OpenAI Short caching marks shared non-empty system prefixes on+  catalog-supported Responses and Chat bindings. Unsupported native requests+  fail locally. Effective duration reaches terminal pricing, partial usage+  and evidence.+- Funded live prefix checks pass for Luna Responses Short/Long and GPT-5.6 Chat+  Short. Luna Long uses verified 12h base and tier rates; unsupported Chat Long+  and unverified modern bindings remain locally refused.++### Changed++- Require `baikai ^>=0.10.0`. Catalog effort policies distinguish GPT-5/o-series+  models that cannot disable reasoning, Sol/Luna that accept none, and+  Astra/GPT-6.1 Sol that do not.++## [baikai-typesafe 0.1.0.1] - 2026-10-25++### Changed++- Require `baikai ^>=0.10.0`. Dependency-only update; no package API change.++## [baikai-trace-otel 0.4.1.1] - 2026-10-25++### Changed++- Require `baikai ^>=0.10.0`. Dependency-only update; no package API change.++## [baikai-effectful 0.4.0.5] - 2026-10-25++### Changed++- Require `baikai ^>=0.10.0`. Dependency-only update; no package API change.++## [baikai-kit 0.4.0.3] - 2026-10-25++### Changed++- Require `baikai ^>=0.10.0`. Dependency-only update; no package API change.++## [baikai-agent 0.2.0.4] - 2026-10-25++### Fixed++- Layered job configuration accepts `thinking "none"` through the shared+  canonical parser, keeping explicit off distinct from an absent preference.+- The UTF-8 stdin test runs in a child process under an ASCII locale, avoiding+  shared-stdin descriptor races with parallel subprocess tests in the tarball.++### Changed++- Require `baikai ^>=0.10.0`, `baikai-claude ^>=0.7.3` and+  `baikai-openai ^>=0.7.3` for explicit-off handling in both vendor renderers.+ ## [baikai 0.9.0.0] - 2026-10-25  ### Added
baikai-agent.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.4 name: baikai-agent-version: 0.2.0.3+version: 0.2.0.4 synopsis: Unattended coding-agent runs for the Baikai abstraction description:   Runs a local coding-agent command-line tool with no terminal and no@@ -66,9 +66,9 @@    build-depends:     aeson ^>=2.2,-    baikai ^>=0.9.0,-    baikai-claude ^>=0.7.1.1,-    baikai-openai ^>=0.7.1.1,+    baikai ^>=0.10.0,+    baikai-claude ^>=0.7.3,+    baikai-openai ^>=0.7.3,     base >=4.20 && <5,     bytestring ^>=0.12,     containers ^>=0.7,
src/Baikai/Agent/Config.hs view
@@ -431,7 +431,7 @@ effortDecoder :: Decoder ThinkingLevel effortDecoder =   parsedDecoder-    "one of: minimal, low, medium, high, xhigh, max"+    "one of: none, minimal, low, medium, high, xhigh, max"     (maybe (Left "unknown effort") Right . parseThinkingLevel)  pathDecoder :: Decoder FilePath
test/CliTests.hs view
@@ -38,7 +38,6 @@ import Data.Text qualified as Text import Data.Text.Encoding qualified as Text import Data.Text.IO qualified as TextIO-import GHC.IO.Handle (hDuplicate, hDuplicateTo) import Options.Applicative qualified as Options import Settei.Env (EnvSnapshot, envSnapshot) import Settei.Key (parseKey)@@ -52,10 +51,11 @@     setOwnerExecutable,     setPermissions,   )-import System.Environment (setEnv)+import System.Environment (getExecutablePath, setEnv)+import System.Exit (ExitCode (..)) import System.FilePath (takeDirectory, (</>))-import System.IO (IOMode (..), hClose, openFile, stdin) import System.IO.Temp (withSystemTempDirectory)+import System.Process qualified as P import Test.Tasty (TestTree, testGroup) import Test.Tasty.HUnit (assertBool, assertFailure, testCase, (@?=)) @@ -1223,21 +1223,19 @@  readsThePromptFromStandardInputTest :: TestTree readsThePromptFromStandardInputTest =-  testCase "the standard-input reader decodes UTF-8 explicitly" $-    -- The fixture above uses a file, because standard input cannot be-    -- piped in-process; this is the narrow test of the transport the-    -- motivating script actually uses. The real handle is duplicated-    -- and restored so no other test is affected.-    withWorkspace $ \dir -> do-      path <- writeDocument dir "prompt.txt" fixturePrompt-      saved <- hDuplicate stdin-      source <- openFile path ReadMode-      hDuplicateTo source stdin-      hClose source-      outcome <- readPromptSource PromptStdin-      hDuplicateTo saved stdin-      hClose saved-      outcome @?= Right fixturePrompt+  testCase "the standard-input reader decodes UTF-8 explicitly" $ do+    -- Reading stdin closes it. Replacing the suite's shared handle races+    -- with parallel subprocess fixtures, which can then reuse descriptor zero+    -- for a pipe. Exercise the real reader in a child instead, under an ASCII+    -- locale so locale-dependent decoding cannot accidentally pass.+    executable <- getExecutablePath+    let spec =+          (P.proc executable ["--fixture-read-prompt-stdin"])+            { P.env = Just [("LANG", "C"), ("LC_ALL", "C")]+            }+    (code, output, err) <- P.readCreateProcessWithExitCode spec (Text.unpack fixturePrompt)+    assertBool ("stdin reader failed: " <> show (code, err)) (code == ExitSuccess)+    output @?= Text.unpack fixturePrompt  readsThePromptFromAFileTest :: TestTree readsThePromptFromAFileTest =
test/ConfigTests.hs view
@@ -35,6 +35,7 @@     repositoryScopeViolations,     resolveAgentJob,   )+import Baikai.ThinkingLevel (ThinkingLevel (ThinkingNone)) import Control.Lens ((^.)) import Data.Generics.Labels () import Data.List (isPrefixOf, isSuffixOf)@@ -70,6 +71,10 @@           commandLineBeatsBothTest,           environmentLayerTest,           defaultsTest,+          testCase "none resolves as explicit off rather than an absent override" $+            withConfigs Nothing (Just (jobDocWith "read-only" ["effort \"none\""])) $ \paths -> do+              job <- resolveJob paths noEnvironment [] "demo"+              job ^. #effort @?= Just ThinkingNone,           singleArgumentListTest,           outputFormatTest,           missingFileTest@@ -255,6 +260,7 @@       job ^. #allowedTools @?= []       job ^. #providerArgs @?= []       job ^. #envRequires @?= []+      job ^. #effort @?= Nothing       job ^. #timeout @?= Nothing       job ^. #executable @?= Nothing       job ^. #outputFormat @?= TextFormat
test/Main.hs view
@@ -12,6 +12,7 @@     agentRunRequest,     capturedBytes,   )+import Baikai.Agent.Cli (PromptSource (..), readPromptSource) import Baikai.Agent.Run (runAgentCommand, timeoutMicros) import Baikai.Evidence (noThinkingRequested) import BinaryTests (binaryTests)@@ -33,7 +34,8 @@     setOwnerExecutable,     setPermissions,   )-import System.Exit (ExitCode (..))+import System.Environment (getArgs)+import System.Exit (ExitCode (..), die) import System.FilePath ((</>)) import System.IO.Temp (withSystemTempDirectory) import System.Process qualified as P@@ -41,16 +43,26 @@ import Test.Tasty.HUnit (assertBool, assertFailure, testCase, (@?=))  main :: IO ()-main =-  defaultMain $-    testGroup-      "baikai-agent"-      [ runTests,-        configTests,-        cliTests,-        binaryTests,-        PublicSurfaceSpec.tests-      ]+main = do+  args <- getArgs+  case args of+    ["--fixture-read-prompt-stdin"] -> do+      outcome <- readPromptSource PromptStdin+      case outcome of+        Left problem -> die (Text.unpack problem)+        Right prompt -> BS.putStr (Text.encodeUtf8 prompt)+    _ -> defaultMain tests++tests :: TestTree+tests =+  testGroup+    "baikai-agent"+    [ runTests,+      configTests,+      cliTests,+      binaryTests,+      PublicSurfaceSpec.tests+    ]  runTests :: TestTree runTests =