packages feed

baikai-mcp-0.1.0.1: baikai-mcp.cabal

cabal-version: 3.4
name: baikai-mcp
version: 0.1.0.1
synopsis: Model Context Protocol client for Baikai
description:
  A bounded Model Context Protocol (MCP) client. Targets MCP 2026-07-28 over
  stateless Streamable HTTP, detects handshake-era servers, and supports the
  deprecated HTTP+SSE transport when configured explicitly. A host-supplied
  hook approves every transmission and can add credentials; interim results
  that carry only opaque state are continued under a round limit.

homepage: https://github.com/shinzui/baikai
bug-reports: https://github.com/shinzui/baikai/issues
license: BSD-3-Clause
license-file: LICENSE
author: Nadeem Bitar
maintainer: nadeem@gmail.com
category: AI, Network
build-type: Simple
tested-with: ghc ==9.12.4
extra-doc-files:
  CHANGELOG.md
  README.md

-- crypton 1.1 moved its byte-array classes from memory to ram. Both packages
-- provide Data.ByteArray, so the source is the same; the solver picks the
-- pair that matches the rest of the build plan.
flag crypton-ram
  description: Build with crypton 1.1 and ram instead of crypton 1.0 and memory.
  default: True
  manual: False

common common-options
  ghc-options:
    -Wall
    -Wcompat
    -Widentities
    -Wincomplete-uni-patterns
    -Wincomplete-record-updates
    -Wredundant-constraints
    -fhide-source-paths
    -Wmissing-export-lists
    -Wpartial-fields
    -Wmissing-deriving-strategies

  -- Exhaustiveness is an error, not a warning; see baikai.cabal.
  ghc-options:
    -Werror=incomplete-patterns
    -Werror=incomplete-uni-patterns
    -Werror=incomplete-record-updates

  default-language: GHC2024
  default-extensions:
    DuplicateRecordFields
    MultiWayIf
    OverloadedRecordDot
    OverloadedStrings

library
  import: common-options
  hs-source-dirs: src
  exposed-modules:
    Baikai.Mcp.Auth
    Baikai.Mcp.Client
    Baikai.Mcp.Content
    Baikai.Mcp.Error
    Baikai.Mcp.Internal.Binding
    Baikai.Mcp.Internal.Http
    Baikai.Mcp.Internal.Mux
    Baikai.Mcp.Internal.Sse
    Baikai.Mcp.JsonSchema
    Baikai.Mcp.Prompt
    Baikai.Mcp.Protocol
    Baikai.Mcp.Resource
    Baikai.Mcp.Tool
    Baikai.Mcp.Transport
    Baikai.Mcp.Transport.HttpSse
    Baikai.Mcp.Transport.Stream

  other-modules: Paths_baikai_mcp
  autogen-modules: Paths_baikai_mcp
  build-depends:
    aeson ^>=2.2,
    async ^>=2.2,
    baikai ^>=0.11.0.0,
    base >=4.20 && <5,
    base64-bytestring ^>=1.2,
    bytestring ^>=0.12,
    case-insensitive ^>=1.2,
    containers ^>=0.7,
    http-client ^>=0.7,
    http-client-tls >=0.3 && <0.5,
    http-types ^>=0.12,
    network ^>=3.2,
    network-uri ^>=2.6,
    regex-tdfa ^>=1.3.2,
    scientific ^>=0.3,
    stm ^>=2.5,
    text ^>=2.1,
    time ^>=1.14,
    vector ^>=0.13,

  if flag(crypton-ram)
    build-depends:
      crypton >=1.1 && <1.2,
      ram >=0.20.1 && <0.23,
  else
    build-depends:
      crypton >=1.0 && <1.1,
      memory ^>=0.18,

test-suite baikai-mcp-test
  import: common-options
  ghc-options: -threaded
  type: exitcode-stdio-1.0
  hs-source-dirs: test
  main-is: Main.hs
  other-modules:
    AuthSpec
    ClientSpec
    JsonSchemaSpec
    LegacySpec
    McpStub
    ModernHttpSpec
    ProtocolSpec
    ResourcePromptSpec
    StreamSpec
    ToolSpec

  build-depends:
    aeson,
    async,
    baikai,
    baikai-mcp,
    base,
    bytestring,
    case-insensitive,
    containers,
    http-client,
    http-client-tls,
    http-types,
    network,
    process,
    stm,
    tasty,
    tasty-hunit,
    text,
    time,
    vector,
    wai ^>=3.2,
    warp ^>=3.4,