cabal-version: 3.0
name: dhscanner-kbapi
category: api
synopsis: query language api for dhscanner knowledge base
description:
This package defines the API for the knowledge base used by [dhscanner](https://dhscanner.org/docs/).
The documentation is intended for both humans 🚶and LLM agents 🤖.
In this context, a knowledge base is a structured collection of /code facts/.
For a detailed explanation of code facts and how they are generated,
see [dhscanner-kbgen](https://hackage.haskell.org/package/dhscanner-kbgen)
on [Hackage](https://hackage.haskell.org/).
Code facts form an abstraction layer over the underlying data representation,
which can be a graph database, a relational database (like Postgres),
a logic program etc.
The design aims to separate, as much as possible, the following entities:
* the underlying data storage
* the code facts abstraction layer
* the exposed knowledge base API
For instance, migrating from a graph database to a logic program
representation should conceptually be straightforward.
As another example, changes to the API should ideally not require
fundamental modifications to the structure or specification
of code facts.
version: 1.0.2
license: GPL-3.0-only
license-file: LICENSE
author: OrenGitHub
maintainer: Oren Ish Shalom
copyright: (c) 2026 Oren Ish Shalom
homepage: https://github.com/OrenGitHub/dhscanner
stability: experimental
build-type: Simple
common ghc_options
ghc-options: -Wall -Werror=incomplete-patterns -O2
library
import:
ghc_options
exposed-modules:
Kbapi,
Content
build-depends:
aeson,
base < 4.21,
containers < 0.7,
dhscanner-ast >= 1.1.5
hs-source-dirs:
src
default-language:
Haskell2010
executable json-schema-creator
import:
ghc_options
main-is:
Main.hs
build-depends:
aeson,
aeson-pretty,
base < 4.21,
bytestring,
openapi3,
dhscanner-kbapi,
dhscanner-ast >= 1.1.5
hs-source-dirs:
json-schema-creator
default-language:
Haskell2010