semvec/pypi-packages huggingface dataset:
lightbox-rec 0.1.0
Flight recorder for AI agents - append-only, tamper-evident tool execution logs
Requires Python: >=3.12
Keywords: agents, ai, langchain, logging, observability, tracing

# Lightbox

Flight recorder for AI agents. Append-only, tamper-evident tool execution logs.

## What it is / isn't

- Records **tool calls** (send_email, read_file, api_call) - not LLM prompts/responses
- **Append-only** JSONL with SHA-256 hash chaining
- **Offline verification** - no network needed
- **Local-first** - sessions are portable directories you can zip and share
- **Not** a debugger, profiler, or execution controller - recording only

## Quickstart

```bash
pip install lightbox-rec
```

### SDK Usage

```python
from lightbox import Session

session = Session()
session.emit("send_email", {"to": "user@example.com"}, {"success": True})
session.emit("read_file", {"path": "/data.txt"}, {"content": "Hello"})
```

### LangChain Integration

```python
from lightbox.integrations.langchain import wrap

agent = wrap(your_agent)  # Automatically records tool calls
agent.invoke({"input": "Do the thing"})
```

### CLI

```bash
lightbox list                    # Show all sessions
lightbox show <session>          # Display events
lightbox replay <session>        # Animated playback
lightbox verify <session>        # Check integrity
```

## Where logs live

```
~/.lightbox/sessions/<session_id>/
    events.jsonl     # Append-only event log
    meta.json        # Session metadata
```

Override with `LIGHTBOX_DIR` environment variable.

## Exit codes (verify)

| Code | Status | Meaning |
|------|--------|---------|
| 0 | VALID | All checks pass |
| 1 | TAMPERED | Hash mismatch or chain break |
| 2 | TRUNCATED | Incomplete last line (crash mid-write) |
| 3 | PARSE_ERROR | Invalid JSON in event file |
| 4 | NOT_FOUND | Session doesn't exist |

## Redaction

```python
from lightbox import Session, RedactionConfig

config = RedactionConfig(
    redact_keys=["api_key", "password"],  # Always redact
    max_inline_bytes=64 * 1024,           # Hash content over 64KB
)
session = Session(redaction_config=config)
```

## Documentation

- [Event Format](docs/FORMAT.md) - Event schema and canonicalization rules
- [Integrations](docs/INTEGRATIONS.md) - LangChain and framework usage
- [Security](SECURITY.md) - Threat model and verification
- [Changelog](CHANGELOG.md) - Version history

## License

MIT - see [LICENSE](LICENSE)
pysfizz 0.1.2
Python bindings for sfizz
Requires Python: >=3.9
Keywords: audio, synthesis, sfz, sampler, music, sfizz

# pysfizz
Python bindings for [sfizz](https://github.com/sfztools/sfizz), a sample-based synthesizer for the [SFZ](https://sfzformat.com) virtual instrument format.

## Installation
### From PyPI
Prebuilt wheels are available for Python 3.9–3.13 on Linux, macOS, and Windows.
```bash
pip install pysfizz
```
### From source (development only)

**Requires:** Git, CMake 3.15+, C++17 compatible compiler, Python 3.9+ with development headers
```bash
git clone https://github.com/tiianhk/pysfizz.git
cd pysfizz
git submodule update --init --recursive
pip install .
```

## Example
```python
import pysfizz
import soundfile as sf

# load an instrument
synth = pysfizz.Synth(sample_rate=48000, block_size=1024)
synth.load_sfz_file("path/to/your/sfz/file.sfz")

# print the list of MIDI notes that have SFZ regions
print(synth.playable_keys)

# single note offline systhesis
pitch = 60       # MIDI note number, integer in [0, 127]
vel = 127        # MIDI velocity, integer in [0, 127]
note_dur = 1     # seconds, key pressed at t=0 and released after this duration
render_dur = 2   # seconds, total rendered duration
audio = synth.render_note(pitch, vel, note_dur, render_dur) # np.ndarray of shape (2, num_samples)
sf.write("output.wav", audio.T, synth.get_sample_rate())
```

## Resources
[SFZ instruments](https://sfzinstruments.github.io)

## License and dependencies

`pysfizz` is under the [BSD 2-Clause License](./LICENSE).

It includes the following dependencies as Git submodules under the `external/` directory:
- [sfizz](https://github.com/sfztools/sfizz) — BSD 2-Clause License  
- [nanobind](https://github.com/wjakob/nanobind) — BSD 3-Clause License