PageIndex/pageindex/backend
Ray e94f6d45c8 fix: use doc_name in agent tools, matching the cloud agent contract
The server's chat/completions agent identifies documents by doc_name
(api.py:3108-3112), not doc_id. The local agent tools used UUID-based
doc_id, forcing the LLM to copy opaque strings and making same-name
documents indistinguishable.

- Agent tools now take doc_name (doc_id accepted as fallback)
- _resolve: name→id within scope, ambiguity returns candidates
- _sanitize_doc_name: mirrors server sanitize_filename (NFKC,
  whitespace collapse, 180-byte truncation with md5 suffix)
- _dedupe_doc_name: a.pdf → a_1.pdf on collision, matching the
  server's _find_unique_key suffix scheme
- _defang_delimiters: also collapses whitespace to block newline
  injection in the <docs> prompt block
- System prompts and wrap_with_doc_context updated to name-first
2026-07-24 00:31:11 +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: store status in SQLite, derive cloud doc_type from filename 2026-07-23 16:51:59 +08:00
local.py fix: use doc_name in agent tools, matching the cloud agent contract 2026-07-24 00:31:11 +08:00
protocol.py fix: enforce collection membership on cloud doc-scoped operations 2026-07-16 06:20:24 +08:00