packages feed

kioku-core-0.1.0.0: kioku-core.cabal

cabal-version:   3.0
name:            kioku-core
version:         0.1.0.0
synopsis:        Reusable agent memory runtime
description:
  Core runtime for kioku. M1 establishes the application effect stack; later
  milestones add the memory and session aggregates.

license:         BSD-3-Clause
license-file:    LICENSE
author:          Nadeem Bitar
maintainer:      nadeem@gmail.com
copyright:       2026 Nadeem Bitar
category:        Data
build-type:      Simple
tested-with:     GHC >=9.12 && <9.13
homepage:        https://github.com/shinzui/kioku
bug-reports:     https://github.com/shinzui/kioku/issues
extra-doc-files: CHANGELOG.md

source-repository head
  type:     git
  location: https://github.com/shinzui/kioku.git
  subdir:   kioku-core

common warnings
  ghc-options:
    -Wall -Wcompat -Widentities -Wincomplete-record-updates
    -Wincomplete-uni-patterns -Wpartial-fields -Wredundant-constraints

common shared
  default-language:   GHC2024
  default-extensions:
    BlockArguments
    DeriveAnyClass
    DuplicateRecordFields
    MultilineStrings
    OverloadedLabels
    OverloadedRecordDot
    OverloadedStrings
    QualifiedDo
    TemplateHaskell

library
  import:          warnings, shared
  hs-source-dirs:  src
  exposed-modules:
    Kioku.App
    Kioku.Distill.Consolidate
    Kioku.Distill.Extract
    Kioku.Distill.L1
    Kioku.Distill.L2
    Kioku.Distill.L3
    Kioku.Distill.Persona
    Kioku.Distill.Runtime
    Kioku.Distill.Scene
    Kioku.Distill.ScopeIdentity
    Kioku.Distill.Timer
    Kioku.Distill.Timer.Outcome
    Kioku.Distill.Timer.Worker
    Kioku.Memory
    Kioku.Memory.Domain
    Kioku.Memory.Embedding
    Kioku.Memory.Embedding.Worker
    Kioku.Memory.EventStream
    Kioku.Memory.ReadModel
    Kioku.ReadModel
    Kioku.Recall
    Kioku.Recall.Capability
    Kioku.Session
    Kioku.Session.Domain
    Kioku.Session.EventStream
    Kioku.Session.ReadModel
    Kioku.Worker.Failure

  build-depends:
    , aeson                   >=2.2       && <2.3
    , baikai                  ^>=0.3.0.0
    , baikai-claude           ^>=0.3.0.0
    , baikai-effectful        ^>=0.3.0.0
    , base                    >=4.21      && <5
    , bytestring              >=0.11      && <0.13
    , containers              >=0.6       && <0.8
    , contravariant           >=1.5       && <1.6
    , contravariant-extras    >=0.3       && <0.4
    , crypton                 ^>=1.1.4
    , directory               >=1.3       && <1.4
    , effectful               >=2.5       && <2.7
    , effectful-core          >=2.5       && <2.7
    , filepath                >=1.4       && <1.6
    , generic-lens            >=2.2       && <2.4
    , hasql                   >=1.6       && <1.11
    , hasql-pool              >=1.2       && <1.5
    , hasql-transaction       >=1.0       && <1.3
    , hs-opentelemetry-api    >=1.0       && <1.1
    , keiki                   ^>=0.2.0.0
    , keiro                   ^>=0.3.0.0
    , keiro-core              ^>=0.3.0.0
    , kioku-api               ^>=0.1.0.0
    , kiroku-store            ^>=0.3.0.1
    , lens                    >=5.2       && <5.4
    , mmzk-typeid             >=0.7       && <0.8
    , shibuya-core            >=0.8.0.1   && <0.9
    , shibuya-kiroku-adapter  ^>=0.4.0.0
    , shikumi                 ^>=0.3.0.0
    , shikumi-trace           ^>=0.2.0.0
    , text                    >=2.1       && <2.2
    , time                    >=1.12      && <1.15
    , uuid                    >=1.3       && <1.4
    , vector                  ^>=0.13.2.0

test-suite kioku-test
  import:         warnings, shared
  type:           exitcode-stdio-1.0
  main-is:        Main.hs
  other-modules:
    Kioku.AwaitingSpec
    Kioku.DistillSpec
    Kioku.EmbeddingWorkerSpec
    Kioku.IdempotencySpec
    Kioku.ReadModelReconcileSpec
    Kioku.RecallHarness
    Kioku.RecallSpec
    Kioku.RecallSqlSpec
    Kioku.ReiCompatSpec
    Kioku.SchemaSpec
    Kioku.ScopeIdentitySpec
    Kioku.SessionInvariantsSpec
    Kioku.SessionLineageSpec
    Kioku.TimerWorkerSpec

  hs-source-dirs: test
  ghc-options:    -threaded -rtsopts -with-rtsopts=-N
  build-depends:
    , aeson                          >=2.2
    , baikai                         ^>=0.3.0.0
    , base                           >=4.21     && <5
    , bytestring                     >=0.11
    , containers                     >=0.6
    , contravariant                  >=1.5
    , directory                      >=1.3
    , effectful                      >=2.5
    , effectful-core                 >=2.5
    , hasql                          >=1.6
    , hasql-transaction              >=1.0
    , keiro                          ^>=0.3.0.0
    , keiro-core                     ^>=0.3.0.0
    , kioku-api                      ^>=0.1.0.0
    , kioku-core                     ^>=0.1.0.0
    , kioku-migrations:test-support  ^>=0.1.0.0
    , kiroku-store                   ^>=0.3.0.1
    , lens                           >=5.2
    , shibuya-core                   >=0.8.0.1  && <0.9
    , shikumi                        ^>=0.3.0.0
    , shikumi-trace                  ^>=0.2.0.0
    , tasty                          >=1.5
    , tasty-expected-failure         >=0.12
    , tasty-hunit                    >=0.10
    , temporary                      >=1.3
    , text                           >=2.1
    , time                           >=1.12
    , unordered-containers           >=0.2
    , uuid                           >=1.3
    , vector