PageIndex/pageindex/backend
Ray 6f200927cb fix: enforce collection membership on cloud query doc_ids
Cloud query()/query_stream() now run the same _require_document membership
guard the four doc-scoped ops received in 929b3df, so a doc_id from another
collection raises DocumentNotFoundError (matching the local backend's
_scoped_docs) instead of silently answering from another collection's
document. The guard runs after doc_ids normalization and before the
completion request; query_stream runs it via asyncio.to_thread. Folders
unavailable on the plan -> guard skips, as with the sibling ops.

Also rename the streaming QueryEvent types answer_delta/answer_done ->
text_delta/text_done: text_done fires once per assistant text message, which
is honest for the local agent loop's multi-message stream (the last one
before the stream ends carries the final answer). Corrects the cloud
backend's now-inaccurate "single terminal contract" comment. reasoning
stays reserved for future model-reasoning tokens. QueryEvent is unreleased
API (0.3.0.dev1), so the rename is not a breaking change.
2026-07-16 14:40:19 +08:00
..
__init__.py feat: add PageIndex SDK with local/cloud dual-mode support (#207) 2026-04-08 20:21:58 +08:00
cloud.py fix: enforce collection membership on cloud query doc_ids 2026-07-16 14:40:19 +08:00
local.py fix: address xhigh review findings for PR #272 2026-07-16 01:31:57 +08:00
protocol.py fix: enforce collection membership on cloud doc-scoped operations 2026-07-16 06:20:24 +08:00