Metadata-Version: 2.4
Name: muzaiten-features-clap
Version: 2026.7.11
Summary: Optional CLAP capability provider for muzaiten features
License-Expression: Unlicense
Requires-Dist: numpy>=1.23.5
Requires-Dist: laion-clap==1.1.7 ; extra == 'model'
Requires-Dist: numpy<2.5 ; extra == 'model'
Requires-Dist: torch>=2.3 ; extra == 'model'
Requires-Dist: torchvision>=0.18 ; extra == 'model'
Requires-Python: >=3.11
Project-URL: Homepage, https://codeberg.org/11xx/muzaiten
Project-URL: Documentation, https://codeberg.org/11xx/muzaiten/src/branch/master/docs/semantic-analysis.md
Project-URL: Issues, https://codeberg.org/11xx/muzaiten/issues
Provides-Extra: model
Description-Content-Type: text/markdown

# muzaiten-features-clap

`muzaiten-features-clap` is the optional CLAP capability provider used by the
native `muzaiten-features` orchestrator. It is a small Python package by
default; NumPy/PyTorch/torchvision and LAION-CLAP are confined to the `model`
extra.

Install it in user space with a backend selected by uv:

```sh
uv tool install 'muzaiten-features-clap[model]' --torch-backend auto
```

The provider is not a human-facing command. One process handles one versioned
JSON request on stdin and emits JSONL events on stdout. Supported operations are
`capabilities`, `status`, `model-download`, `scan`, `neighbors`, and `query`.
Diagnostics go to stderr. `muzaiten-features` owns provider discovery,
orchestration, locking, progress presentation, and cancellation.

Model download is always explicit. `scan` and `query` never fetch weights; they
return `model_missing` until `muzaiten-features model download` has installed
and SHA-256-verified the checkpoint atomically. `status` reports the source,
license, approximate size, cache path, checksum, device availability, and
current presence without loading LAION-CLAP.

`FEATURE_REVISION` describes the input, preprocessing, and output semantics of
the stored vectors. It deliberately does not follow package or protocol
versions, so routine provider releases do not invalidate a large embedding
corpus.

Tests use fake inference and fake downloads; they do not download model weights:

```sh
uv sync --group dev
uv run python -m pytest
uv run ruff check .
```
