evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Create a helper that writes streaming content into a cache directory and reports the resulting integrity hash and byte size.
/**
* Writes streaming content to a cache directory under a key.
* @param {string} cachePath - Filesystem path to the cache root.
* @param {string} key - Logical key identifying the entry.
* @param {NodeJS.ReadableStream} source - Stream emitting Buffer or string chunks.
* @param {object} [options]
* @param {number} [options.expectedSize] - Fail if streamed bytes differ from this value.
* @param {object} [options.metadata] - Optional JSON-serializable metadata to persist with the entry.
* @returns {Promise<{ integrity: string, size: number }>} Resolves with integrity and byte length when the stream finishes successfully.
*/
export async function writeStream(cachePath, key, source, options);Provides streaming, content-addressable cache writes that emit integrity and size information.