v0.4.1 — resolve a file back to its item
Adds get_bitstream_item: given a bitstream UUID, return the item it belongs to.
Reported from use. Only list_bitstreams(item) existed, so an assistant holding a file UUID — from a download URL, a search result or an earlier listing — had no way to ask which record it came from, and walked the REST chain /core/bitstreams/{uuid} → /bundle → /item outside the server, losing every guarantee the server provides.
Two things came out of measuring against live repositories rather than assuming:
- One request, not three.
?embed=itemon the bundle returns the whole answer at once. For a tool called in a loop over a file listing, that is a threefold difference. - A restricted file answers 401, not 404. Without telling those apart the assistant would report "no such file" about a file that exists and is merely closed. The message now says the bundle is not public, which is the actual situation.
Returns the usual compact record — title, handle, authors, year, state flags — plus which bundle the file sits in. Honours as_anonymous like every other read tool.