Resolves two gaps found in a project-state review:
1. Python build was broken: PyO3/numpy 0.23 caps at Python 3.13 but the
environment has 3.14. Bumped to 0.28 and updated the two breaking APIs
(PyObject -> Py<PyAny>, allow_threads -> detach). The extension module now
imports and round-trips under Python 3.14, unblocking cargo build --workspace.
2. The "HNSW vector search over agent memories" headline was unwired:
clawhdf5-ann had zero dependents and the agent used a linear cosine+BM25 scan.
- clawhdf5-ann is now a live index: insert, mark_deleted (soft delete with a
deleted bitset, traversed but never returned), compact, and a format
version tag (v2) with backward-compatible load of v1 files.
- clawhdf5-agent wires HNSW behind the `hnsw` feature (ON by default). The
index mirrors the cache (node id == cache index) and self-heals: it rebuilds
whenever hnsw_synced_len drifts from cache.len(), so unhooked pushes can't
desync it. Non-indexable stores (no/zero-dim/mixed embeddings) and queries
whose dim doesn't match fall back to the exact linear scan.
- hybrid.rs gains merge_vector_keyword, shared by the linear and HNSW paths.
- tests/hnsw_integration.rs validates recall vs a brute-force oracle plus
insert/delete/batch behaviour.
Disable HNSW for exact search with `--no-default-features --features float16`.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
29 lines
746 B
TOML
29 lines
746 B
TOML
[package]
|
|
name = "clawhdf5-py"
|
|
version = "2.0.0"
|
|
edition = "2024"
|
|
description = "Python bindings for rustyhdf5 — a pure-Rust HDF5 library"
|
|
license = "MIT"
|
|
repository = "https://github.com/redclawsystems/clawhdf5"
|
|
readme = "README.md"
|
|
keywords = ["hdf5", "python", "bindings", "science"]
|
|
categories = ["api-bindings", "science"]
|
|
|
|
[lib]
|
|
name = "clawhdf5"
|
|
crate-type = ["cdylib", "rlib"]
|
|
|
|
[dependencies]
|
|
clawhdf5_rs = { path = "../clawhdf5", version = "2.0.0", package = "clawhdf5" }
|
|
clawhdf5-format = { path = "../clawhdf5-format", version = "2.0.0" }
|
|
pyo3 = "0.28"
|
|
numpy = "0.28"
|
|
|
|
[features]
|
|
extension-module = ["pyo3/extension-module"]
|
|
|
|
[package.metadata.docs.rs]
|
|
features = []
|
|
no-default-features = true
|
|
targets = ["x86_64-unknown-linux-gnu"]
|