packages feed

seihou-cli 0.16.0.0 → 0.16.0.1

raw patch · 12 files changed

+184/−34 lines, 12 filesdep ~seihou-corePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: seihou-core

API changes (from Hackage documentation)

Files

help/agent.md view
@@ -52,7 +52,7 @@   claude-cli       Starts an interactive Claude Code session. Requires the       `claude` binary on PATH and a working local login. With no-      explicit model, Seihou passes its pinned default, `claude-opus-4-8`.+      explicit model, Seihou passes its pinned default, `claude-opus-5-5`.    codex-cli       Starts an interactive Codex session. Requires the `codex`@@ -240,3 +240,17 @@ written for that edge. Inspect partial edits, repair the reported problem, and rerun the same command; completed edges are skipped. Receipts do not verify that the migrated project builds or passes tests.++BLUEPRINT INITIAL INSTRUCTION++With claude-cli or codex-cli, omitting PROMPT or supplying empty or+whitespace-only text starts the first turn automatically with+Follow the instructions in the system prompt. The terminal stays open for+follow-up input. A nonblank explicit instruction is passed exactly as supplied,+including whitespace. API providers (anthropic, openai) keep optional input+unchanged. Automatic startup preserves provider tool approvals.++seihou agent --debug run api-service shows the effective initial instruction+without contacting a provider. Blueprint debug still applies baseline modules+and records blueprint provenance; it is not a dry run. The manifest records+the original PROMPT, including omission or blank text.
seihou-cli.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: seihou-cli-version: 0.16.0.0+version: 0.16.0.1 synopsis: CLI for Seihou project scaffolding description:   Command-line interface for Seihou, a composable project scaffolding@@ -166,7 +166,7 @@     generic-lens >=2.2 && <3,     lens >=5.2 && <6,     process >=1.6 && <2,-    seihou-core ^>=0.16.0.0,+    seihou-core ^>=0.16.0.1,     shikumi ^>=0.5.1.0,     streamly-core >=0.3 && <0.5,     temporary >=1.3 && <2,@@ -261,7 +261,7 @@     optparse-applicative >=0.18 && <1,     process >=1.6 && <2,     seihou-cli-internal,-    seihou-core ^>=0.16.0.0,+    seihou-core ^>=0.16.0.1,     temporary >=1.3 && <2,     text >=2.0 && <3,     time >=1.12 && <2,@@ -373,7 +373,7 @@     lens >=5.2 && <6,     process >=1.6 && <2,     seihou-cli-internal,-    seihou-core ^>=0.16.0.0,+    seihou-core ^>=0.16.0.1,     shikumi ^>=0.5.1.0,     streamly-core >=0.3 && <0.5,     tasty >=1.4 && <2,
src-exe/Seihou/CLI/AgentLaunchExec.hs view
@@ -26,7 +26,7 @@ import Data.Generics.Labels () import Data.Text qualified as T import Data.Text.IO qualified as TIO-import Seihou.CLI.AgentCompletion (AgentModelConfig (..), AgentProvider (..))+import Seihou.CLI.AgentCompletion (AgentModelConfig (..), AgentProvider (..), resolveAgentInitialPrompt) import Seihou.CLI.Kit (seihouKitConfig) import Seihou.Prelude import System.Directory (findExecutable, getCurrentDirectory)@@ -69,7 +69,7 @@       launchExitCode         =<< launchClaudeInteractive           defaultClaudeInteractiveConfig-          ( interactiveLaunchRequest (promptOrEmpty initialPrompt)+          ( interactiveLaunchRequest (maybe "" id (resolveAgentInitialPrompt AgentProviderClaudeCli initialPrompt))               & #systemPrompt               .~ Just systemPrompt               & #modelId@@ -98,7 +98,7 @@       launchExitCode         =<< launchCodexInteractive           defaultCodexInteractiveConfig-          ( interactiveLaunchRequest (promptOrEmpty initialPrompt)+          ( interactiveLaunchRequest (maybe "" id (resolveAgentInitialPrompt AgentProviderCodexCli initialPrompt))               & #systemPrompt               .~ Just systemPrompt               & #modelId@@ -124,9 +124,6 @@   Left err -> do     TIO.putStrLn ("Error: " <> renderAgentRenderError err)     exitFailure--promptOrEmpty :: Maybe Text -> Text-promptOrEmpty = maybe "" id  unsupportedInteractiveProvider :: Text -> IO ExitCode unsupportedInteractiveProvider providerName = do
src-exe/Seihou/CLI/AgentRun.hs view
@@ -13,7 +13,7 @@ where  import Control.Exception (IOException, displayException, try)-import Control.Monad (unless, when)+import Control.Monad (forM_, unless, when) import Data.FileEmbed (embedFile) import Data.Generics.Labels () import Data.Map.Strict qualified as Map@@ -29,6 +29,7 @@   ( AgentModelConfig (..),     AgentProvider (..),     buildAgentCompletionRequestWith,+    resolveAgentInitialPrompt,     runAgentCompletionWithCliAccess,   ) import Seihou.CLI.AgentConfig@@ -233,6 +234,7 @@   -- (f) Launch.   launchSucceeded <-     runRenderedAgentPromptMode+      "blueprint"       debug       batch       modelConfig@@ -264,14 +266,21 @@               <> err  runRenderedAgentPrompt :: Bool -> AgentModelConfig -> [String] -> Maybe FilePath -> Text -> Maybe Text -> IO Bool-runRenderedAgentPrompt debug = runRenderedAgentPromptMode debug False+runRenderedAgentPrompt debug = runRenderedAgentPromptMode "agent" debug False -runRenderedAgentPromptMode :: Bool -> Bool -> AgentModelConfig -> [String] -> Maybe FilePath -> Text -> Maybe Text -> IO Bool-runRenderedAgentPromptMode debug batch modelConfig tools mFilesDir systemPrompt initialPrompt+runRenderedAgentPromptMode :: Text -> Bool -> Bool -> AgentModelConfig -> [String] -> Maybe FilePath -> Text -> Maybe Text -> IO Bool+runRenderedAgentPromptMode sessionName debug batch modelConfig tools mFilesDir systemPrompt initialPrompt   | debug = do       TIO.putStr systemPrompt+      forM_ (resolveAgentInitialPrompt (modelConfig ^. #provider) initialPrompt) $ \instruction -> do+        TIO.putStrLn "\n===== Initial user instruction ====="+        TIO.putStrLn instruction       pure True   | not batch && (modelConfig ^. #provider == AgentProviderClaudeCli || modelConfig ^. #provider == AgentProviderCodexCli) = do+      TIO.putStrLn $+        if resolveAgentInitialPrompt (modelConfig ^. #provider) initialPrompt /= initialPrompt+          then "Starting " <> sessionName <> " with the default initial instruction."+          else "Starting " <> sessionName <> " with your initial instruction."       exitCode <-         launchConfiguredAgentAddingDirs           (maybeToList mFilesDir)
src-exe/Seihou/CLI/Commands.hs view
@@ -2116,7 +2116,7 @@                 [ pretty ("Resolves the named blueprint, prompts for any required variables," :: String),                   pretty ("optionally applies the blueprint's baseModules as a starting scaffold," :: String),                   pretty ("renders the prompt template, and starts the configured" :: String),-                  pretty ("provider." :: String),+                  pretty ("provider. CLI sessions start their first turn automatically and stay open for follow-up input." :: String),                   pretty ("Baseline seeds are created once; edits and deletion survive --force." :: String),                   pretty ("Lifecycle changes require seihou update <recorded-target>." :: String),                   line,@@ -2149,7 +2149,7 @@   fmap AgentRun $     BlueprintRunOpts       <$> argument moduleNameReader (metavar "BLUEPRINT" <> help "Name of the blueprint to run")-      <*> optional (argument (T.pack <$> str) (metavar "PROMPT" <> help "Optional initial user prompt"))+      <*> optional (argument (T.pack <$> str) (metavar "PROMPT" <> help "Initial instruction (CLI: omitted or blank starts the blueprint automatically)"))       <*> many         ( option             varPair
src/Seihou/CLI/AgentCompletion.hs view
@@ -189,7 +189,7 @@ -- return 'Nothing' here; they already send an explicit model chosen in -- 'buildBaikaiModel', so they are deterministic without a pinned default. defaultModelForProvider :: AgentProvider -> Maybe Text-defaultModelForProvider AgentProviderClaudeCli = Just "claude-opus-4-8"+defaultModelForProvider AgentProviderClaudeCli = Just "claude-opus-5-5" defaultModelForProvider AgentProviderCodexCli = Just "gpt-5.6-terra" defaultModelForProvider AgentProviderAnthropic = Nothing defaultModelForProvider AgentProviderOpenAI = Nothing
src/Seihou/CLI/AgentConfigShow.hs view
@@ -113,7 +113,7 @@       "  7. global ~/.config/seihou/config.dhall  agent.<command>.{provider,model,effort,trace}",       "  8. global ~/.config/seihou/config.dhall  agent.{provider,model,effort,trace}",       "  9. built-in default: provider claude-cli; model pinned per provider",-      "     (claude-cli -> claude-opus-4-8, codex-cli -> gpt-5.6-terra); effort unset",+      "     (claude-cli -> claude-opus-5-5, codex-cli -> gpt-5.6-terra); effort unset",       "     (the CLI/provider chooses its own reasoning effort); trace off",       "",       "Tier 4 is per-artifact: it depends on which blueprint or prompt you run, so",
src/Seihou/CLI/AgentModels.hs view
@@ -25,6 +25,7 @@     Models.anthropic_claude_opus_4_6,     Models.anthropic_claude_opus_4_7,     Models.anthropic_claude_opus_4_8,+    Models.anthropic_claude_opus_5_5,     Models.anthropic_claude_sonnet_4_5,     Models.anthropic_claude_sonnet_4_6,     Models.anthropic_claude_sonnet_5,
test/Seihou/CLI/AgentCompletionSpec.hs view
@@ -1,16 +1,18 @@ module Seihou.CLI.AgentCompletionSpec (tests) where  import Baikai qualified+import Baikai.Context qualified as Context import Baikai.Model qualified as BaikaiModel import Baikai.Response qualified as BaikaiResponse import Baikai.Trace.Sink (TraceSink, silent) import Control.Exception (throwIO)-import Control.Lens ((^.))+import Control.Lens ((&), (.~), (^.)) import Data.Aeson qualified as Aeson import Data.Aeson.Key qualified as Key import Data.Aeson.KeyMap qualified as KeyMap import Data.ByteString.Lazy.Char8 qualified as BL8 import Data.Generics.Labels ()+import Data.IORef (newIORef, readIORef, writeIORef) import Data.Text qualified as Text import Data.Time (UTCTime) import Data.Vector qualified as V@@ -41,6 +43,31 @@             resolveAgentInitialPrompt provider (Just "  ") `shouldBe` Just "  "         )         [AgentProviderAnthropic, AgentProviderOpenAI]++  describe "completion context policy" $+    it "resolves execution input for all providers while keeping the request raw" $+      mapM_+        ( \provider ->+            mapM_+              ( \raw -> do+                  captured <- newIORef Nothing+                  let config = defaultAgentModelConfig & #provider .~ provider+                      request = buildAgentCompletionRequest config "unchanged system" raw+                      api = BaikaiModel.api (buildBaikaiModel config)+                      respond _ context _ = writeIORef captured (Just context) >> pure (okResponse "done")+                      register = Baikai.registerApiProvider (Baikai.apiProviderWith api (Baikai.liftCompleteToStream respond) respond)+                  runAgentCompletionWith register request `shouldReturn` Right "done"+                  request ^. #initialPrompt `shouldBe` raw+                  context <- readIORef captured+                  case context of+                    Nothing -> expectationFailure "provider did not receive context"+                    Just ctx -> do+                      Context.systemPrompt ctx `shouldBe` Just "unchanged system"+                      V.length (Context.messages ctx) `shouldBe` maybe 0 (const 1) (resolveAgentInitialPrompt provider raw)+              )+              [Nothing, Just "", Just " \t\n ", Just "  explicit\nmessage  "]+        )+        [AgentProviderClaudeCli, AgentProviderCodexCli, AgentProviderAnthropic, AgentProviderOpenAI]    describe "provider text helpers" $ do     it "parses known providers case-insensitively" $ do
test/Seihou/CLI/AgentConfigSpec.hs view
@@ -48,7 +48,7 @@      it "pins the deterministic claude-cli default model when nothing is set" $       resolveAgentModelConfig baseInputs-        `shouldBe` Right (cfg AgentProviderClaudeCli (Just "claude-opus-4-8"))+        `shouldBe` Right (cfg AgentProviderClaudeCli (Just "claude-opus-5-5"))      it "pins the deterministic codex-cli default model when only the provider is set" $       resolveAgentModelConfig (baseInputs & #cliProvider ?~ "codex-cli")@@ -119,12 +119,12 @@      it "falls back to the pinned CLI default model with built-in provenance" $ do       providerOf AgentCmdRun baseInputs `shouldBe` Right (AgentProviderClaudeCli, SourceBuiltinDefault)-      modelOf AgentCmdRun baseInputs `shouldBe` Right (Just "claude-opus-4-8", SourceBuiltinDefault)+      modelOf AgentCmdRun baseInputs `shouldBe` Right (Just "claude-opus-5-5", SourceBuiltinDefault)      it "keeps claude-cli and codex-cli deterministic: model is never Nothing" $ do       -- With nothing configured, every command resolves to a concrete model for       -- both local CLI providers, so seihou always passes an explicit --model.-      modelOf AgentCmdAssist baseInputs `shouldBe` Right (Just "claude-opus-4-8", SourceBuiltinDefault)+      modelOf AgentCmdAssist baseInputs `shouldBe` Right (Just "claude-opus-5-5", SourceBuiltinDefault)       modelOf         AgentCmdAssist         ( baseInputs@@ -450,7 +450,7 @@       let pending = PendingAgentConfig AgentCmdPromptRun baseInputs       fmap formatResolvedAgentProvenance (resolvePendingAgentConfig pending noAgentLaunchDeclaration)         `shouldBe` Right-          "provider claude-cli [built-in default], model claude-opus-4-8 [built-in default], effort <unset> [built-in default], trace off [built-in default]"+          "provider claude-cli [built-in default], model claude-opus-5-5 [built-in default], effort <unset> [built-in default], trace off [built-in default]"    describe "resolvePendingAgentConfig" $ do     it "projects down to the config the launch layer consumes" $ do
test/Seihou/CLI/AgentMigrateE2ESpec.hs view
@@ -11,7 +11,8 @@ import GHC.Generics (Generic) import Seihou.CLI.SeihouBinary (seihouBinary) import Seihou.Core.Types-  ( AppliedBlueprintMigration (..),+  ( AppliedBlueprint (..),+    AppliedBlueprintMigration (..),     Manifest (..),     MigrationOutcome (..),     ModuleName (..),@@ -39,8 +40,39 @@  tests :: IO TestTree tests = testSpec "Agent migrate end-to-end" $ do+  mapM_ (\provider -> mapM_ (interactiveBlueprintProof provider) [Nothing, Just "", Just " \t\n ", Just "  Do this\ncarefully.  "]) ["claude-cli", "codex-cli"]   mapM_ batchMigrationProof ["claude-cli", "codex-cli"] +  it "preserves optional API instructions in blueprint debug output" $+    withDeclaredLaunchBlueprint $ \_ _ run ->+      mapM_+        ( \provider ->+            mapM_+              ( \raw -> do+                  (code, output, errors, _) <- run (["--debug", "--provider", provider] <> maybe [] (: []) raw)+                  expectSuccess "API debug" code output errors+                  case raw of+                    Nothing -> output `shouldSatisfy` (not . T.isInfixOf "===== Initial user instruction =====")+                    Just text -> output `shouldSatisfy` T.isInfixOf ("===== Initial user instruction =====\n" <> T.pack text <> "\n")+              )+              [Nothing, Just "", Just " \t\n ", Just "  explicit\nmessage  "]+        )+        ["anthropic", "openai"]++  it "keeps raw batch blueprint input while supplying the CLI fallback" $+    withDeclaredLaunchBlueprint $ \root _ run ->+      mapM_+        ( \raw -> do+            (code, output, errors, argv) <- run (["--batch"] <> maybe [] (: []) raw)+            expectSuccess "batch instruction" code output errors+            argv `shouldSatisfy` any (T.isInfixOf "Follow the instructions in the system prompt.")+            bytes <- LBS.readFile (root </> ".seihou/manifest.json")+            case manifestFromJSON bytes of+              Left err -> expectationFailure err+              Right manifest -> ((^. #userPrompt) =<< manifest ^. #blueprint) `shouldBe` (T.pack <$> raw)+        )+        [Nothing, Just "", Just " \t\n "]+   it "exposes non-interactive blueprint runs in help" $ do     binary <- seihouBinary     (exitCode, output, _) <- runProcessText binary ["agent", "run", "--help"] Nothing Nothing@@ -1079,7 +1111,7 @@           (exitCode, output, errorOutput) <-             runProcessText               binary-              (["agent", "run", "declared-launch"] <> extraArgs)+              (["agent"] <> ["--debug" | "--debug" `elem` extraArgs] <> ["run", "declared-launch"] <> filter (/= "--debug") extraArgs)               (Just root)               (Just environment)           launchArgs <-@@ -1359,3 +1391,73 @@     (marker, mo, me) <- run command     expectSuccess "text-marker retry" marker mo me     readReceipts (root </> ".seihou/manifest.json") `shouldReturn` [("1.0.0", "2.0.0", MigrationNotApplicable "text-marker")]++-- Terminal stdin is essential: a piped invocation only exercises batch mode.+interactiveBlueprintProof :: String -> Maybe String -> Spec+interactiveBlueprintProof provider rawPrompt = it ("starts an interactive blueprint with " <> provider <> " and prompt " <> show rawPrompt) $+  withSystemTempDirectory "seihou-initial-turn" $ \root -> do+    binary <- seihouBinary+    let config = root </> "config"+        blueprintDir = config </> "seihou/installed/declared-launch"+        fakeBin = root </> "bin"+        script = fakeBin </> if provider == "claude-cli" then "claude" else "codex"+        logPath = root </> "argv"+    createDirectoryIfMissing True blueprintDir+    createDirectoryIfMissing True fakeBin+    TIO.writeFile (blueprintDir </> "blueprint.dhall") $+      T.replace "Think hard about this repository." "Think hard about this repository for {{service.name}}." $+        T.replace+          "vars = [] : List { name : Text, type : Text, default : Optional Text, description : Optional Text, required : Bool, validation : Optional Text }"+          "vars = [ { name = \"service.name\", type = \"text\", default = None Text, description = None Text, required = True, validation = None Text } ]"+          declaredLaunchBlueprintDhall+    TIO.writeFile script $+      T.unlines+        [ "#!/bin/sh",+          "[ -t 0 ] || exit 91",+          "printf '%s\\0' \"$@\" > \"$SEIHOU_FAKE_AGENT_LOG\""+        ]+    permissions <- getPermissions script+    setPermissions script (permissions {executable = True})+    inherited <- getEnvironment+    let environment =+          [ ("PATH", fakeBin <> [searchPathSeparator] <> fromMaybe "" (lookup "PATH" inherited)),+            ("XDG_CONFIG_HOME", config),+            ("XDG_CACHE_HOME", root </> "cache"),+            ("SEIHOU_FAKE_AGENT_LOG", logPath)+          ]+            <> filter (\(key, _) -> key `notElem` ["PATH", "XDG_CONFIG_HOME", "XDG_CACHE_HOME", "SEIHOU_CONTEXT", "SEIHOU_FAKE_AGENT_LOG"] && not ("SEIHOU_AGENT_" `T.isPrefixOf` T.pack key)) inherited+        ptyCode = "import os,pty,subprocess,sys; m,s=pty.openpty()\ntry:\n p=subprocess.run(sys.argv[1:],stdin=s,timeout=60)\nfinally:\n os.close(s); os.close(m)\nsys.exit(p.returncode)"++        command = [binary, "agent", "run", "declared-launch", "--provider", provider, "--var", "service.name=demo"] <> maybe [] (: []) rawPrompt+        run flags = runProcessText "python3" (["-c", ptyCode] <> command <> flags) (Just root) (Just environment)+        expected = case rawPrompt of+          Just value | not (T.null (T.strip (T.pack value))) -> T.pack value+          _ -> "Follow the instructions in the system prompt."+        readPrompt = do+          bytes <- LBS.readFile (root </> ".seihou/manifest.json")+          case manifestFromJSON bytes of+            Left err -> expectationFailure err >> fail "invalid manifest"+            Right manifest -> pure ((^. #userPrompt) =<< manifest ^. #blueprint)+    (code, out, err) <- run []+    expectSuccess "terminal blueprint" code out err+    out `shouldSatisfy` T.isInfixOf (if Just (T.unpack expected) == rawPrompt then "with your initial instruction" else "with the default initial instruction")+    argv <- T.splitOn "\0" <$> TIO.readFile logPath+    argv `shouldSatisfy` notElem (if provider == "claude-cli" then "-p" else "exec")+    argv `shouldSatisfy` any (T.isInfixOf "Think hard about this repository for demo.")+    -- Codex combines context and user request; test its user suffix separately.+    if provider == "claude-cli"+      then argv `shouldSatisfy` elem expected+      else argv `shouldSatisfy` any (T.isSuffixOf ("User request:\n" <> expected))+    readPrompt `shouldReturn` (T.pack <$> rawPrompt)+    (again, ao, ae) <- run []+    expectSuccess "repeat terminal blueprint" again ao ae+    readPrompt `shouldReturn` (T.pack <$> rawPrompt)+    (debugCode, debugOut, debugErr) <- runProcessText binary (["agent", "--debug", "run", "declared-launch", "--provider", provider, "--var", "service.name=demo"] <> maybe [] (: []) rawPrompt) (Just root) (Just environment)+    expectSuccess "debug blueprint" debugCode debugOut debugErr+    debugOut `shouldSatisfy` T.isInfixOf ("===== Initial user instruction =====\n" <> expected <> "\n")+    readPrompt `shouldReturn` (T.pack <$> rawPrompt)+    before <- LBS.readFile (root </> ".seihou/manifest.json")+    TIO.appendFile script "exit 17\n"+    (failed, _, _) <- run []+    failed `shouldBe` ExitFailure 17+    LBS.readFile (root </> ".seihou/manifest.json") `shouldReturn` before
test/Seihou/CLI/AgentModelsSpec.hs view
@@ -14,10 +14,10 @@ tests :: IO TestTree tests = testSpec "Seihou.CLI.AgentModels" $ do   describe "availableAgentModels" $ do-    it "contains 31 unique Anthropic and OpenAI model IDs" $ do+    it "contains 32 unique Anthropic and OpenAI model IDs" $ do       let ids = modelIds availableAgentModels-      length ids `shouldBe` 31-      Set.size (Set.fromList ids) `shouldBe` 31+      length ids `shouldBe` 32+      Set.size (Set.fromList ids) `shouldBe` 32       Set.fromList (map BaikaiModel.provider availableAgentModels)         `shouldBe` Set.fromList ["anthropic", "openai"] @@ -26,14 +26,14 @@         `shouldSatisfy` \ids ->           all             (`elem` ids)-            ["claude-sonnet-5", "gpt-5.6", "gpt-5.6-luna", "gpt-5.6-sol", "gpt-5.6-terra"]+            ["claude-opus-5-5", "claude-sonnet-5", "gpt-5.6", "gpt-5.6-luna", "gpt-5.6-sol", "gpt-5.6-terra"]    describe "filterAgentModels" $ do-    it "maps the Anthropic API and Claude CLI providers to the same 9 models" $ do+    it "maps the Anthropic API and Claude CLI providers to the same 10 models" $ do       let anthropicIds = filteredIds AgentProviderAnthropic           claudeCliIds = filteredIds AgentProviderClaudeCli       anthropicIds `shouldBe` claudeCliIds-      length anthropicIds `shouldBe` 9+      length anthropicIds `shouldBe` 10      it "maps the OpenAI API and Codex CLI providers to the same 22 models" $ do       let openAIIds = filteredIds AgentProviderOpenAI@@ -49,12 +49,12 @@       output `shouldSatisfy` Text.isInfixOf "anthropic, claude-cli"       output `shouldSatisfy` Text.isInfixOf "GPT-5.6 Terra"       output `shouldSatisfy` Text.isInfixOf "openai, codex-cli"-      output `shouldSatisfy` Text.isInfixOf "31 models found."+      output `shouldSatisfy` Text.isInfixOf "32 models found."       output `shouldSatisfy` Text.isInfixOf "aliases and custom model IDs remain accepted"      it "reports the filtered model count" $ do       formatAgentModels (Just AgentProviderAnthropic) availableAgentModels-        `shouldSatisfy` Text.isInfixOf "9 models found."+        `shouldSatisfy` Text.isInfixOf "10 models found."       formatAgentModels (Just AgentProviderCodexCli) availableAgentModels         `shouldSatisfy` Text.isInfixOf "22 models found."