6 releases
| 0.1.5 | Dec 22, 2025 |
|---|---|
| 0.1.4 | Dec 22, 2025 |
#398 in Filesystem
180KB
4.5K
SLoC
dwbase-node
Minimal HTTP node for DWBase, intended for local development.
Running
From the workspace root:
cp config.example.toml config.toml
cargo run -p dwbase-node -- --config ./config.toml
Metrics/tracing are enabled by default via the metrics feature; disable with
--no-default-features if you want a minimal build. To collect metrics, install a recorder
compatible with the metrics crate (e.g., a Prometheus exporter) before running.
Example config.toml:
[node]
listen = "127.0.0.1:8080"
data_dir = "./data"
embedder = "dummy"
[node.security]
read_worlds = []
write_worlds = []
importance_cap = 1.0
remember_per_sec = 10
ask_per_min = 60
Empty read_worlds / write_worlds allow all worlds; populate with world keys to restrict access.
API
POST /remember— body:NewAtom(dwbase-engine JSON). ReturnsAtomId.POST /ask— body:Question. ReturnsAnswer.POST /replay— body:{ "world": "...", "filter": { ... } }. Returns list ofAtom.GET /atoms/{id}— returnsAtomif found (searches across worlds).GET /worlds— returns known worlds observed since the node started.
Dependencies
~19–55MB
~778K SLoC