Skip to main content

Crate kb

Crate kb 

Source
Expand description

Personal knowledge base — typed AST with org-mode as projection, SQLite-backed.

The crate provides:

  • ast — canonical document model (closed-world ADT)
  • generator — AST → org-mode text
  • parser — org-mode text → AST
  • storage — SQLite persistence with FTS5 search

Modules§

api
HTTP API type definition and handlers.
ast
Personal knowledge base — typed AST as the canonical document model.
auth
Bearer-token authentication middleware (T06-03).
canonical
Canonical-form mapping over Document.
cli_main
CLI entrypoint for the kb knowledge base tool.
embedding
OpenAI-compatible embedding generation.
error
Error types for the kb crate.
generator
AST → org-mode String projection.
markdown
Markdown ingestion: convert GitHub-flavored markdown to the kb AST.
mcp
MCP (Model Context Protocol) JSON-RPC server over stdio.
org_meta
Document-level kb metadata as an org property-drawer envelope.
parser
Org-mode text → AST parser using hand-written recursive descent.
prompt
kb prompt — MiniJinja template runner over the local kb corpus.
sexp
S-expression encoding for Document matching Haskell KB/AST/Sexp.hs.
storage
SQLite-backed persistence for kb.
survey
Diagnostic walker for .org corpora.