nirs4all.api.library_playground module
Closed-contract Playground callable for a Rust-owned Studio stdio host.
The caller owns path authorization, transport, cancellation and any request or response byte budget. This module only validates one closed JSON request and delegates scientific work to the library’s stateless Playground facade. It opens no listener, queue or store and imposes no content-size ceiling.
A warm host process keeps the last loaded dataset between requests. It is reused only for an identical dataset request whose input files still have the same path, size, modification time and inode; scientific steps work on copies extracted from it, so a reused dataset gives the same result as a fresh load.
Response contract additions (nirs4all.studio-playground-result.v1):
With
options.omit_unchanged_processed_spectraset totrue, anexecuteresult whose processed spectra are bitwise identical to its original spectra omitsprocessed.spectraand carriesprocessed_is_original: true; the caller readsoriginal.spectrafor both. Without the option, both matrices are always returned.