1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! Leviathan: deep memory for agents over large datasets.
//!
//! Index JSONL, JSON, CSV or SQLite records into a single SQLite/FTS5 file,
//! then answer questions with a few ranked, cited cards instead of the raw
//! data. A small field mapping (`leviathan.toml`, CLI flags, or inference)
//! says which fields are the id, title, searchable text, group, date and
//! filters. Use it from the CLI, as an MCP server, or as a library:
//!
//! ```no_run
//! use leviathan::{card::CardOptions, query::{SearchRequest, Store}};
//!
//! let store = Store::open("leviathan.db".as_ref(), CardOptions::default())?;
//! let hits = store.search(&SearchRequest {
//! group: Some("acme".into()),
//! query: "login loops after password reset".into(),
//! filters: vec![("status".into(), "closed".into())],
//! limit: 5,
//! fallback: true,
//! ..Default::default()
//! })?;
//! println!("{}", leviathan::render::search(&hits));
//! # anyhow::Ok(())
//! ```
/// Current UTC time as RFC 3339, without a date-time dependency.