PageIndex/pageindex
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
..
backend fix: use doc_name in agent tools, matching the cloud agent contract 2026-07-24 00:31:11 +08:00
index chore: trim fix-rationale comments 2026-07-22 12:33:30 +08:00
parser fix: keep the file extension in SDK doc_name, matching legacy and cloud 2026-07-21 18:46:15 +08:00
storage fix: store status in SQLite, derive cloud doc_type from filename 2026-07-23 16:51:59 +08:00
__init__.py chore: drop PAGEINDEX_API_KEY from the .env comment — the library never reads it 2026-07-21 17:10:31 +08:00
_validation.py fix: track pageindex/_validation.py 2026-07-23 23:59:55 +08:00
agent.py fix: use doc_name in agent tools, matching the cloud agent contract 2026-07-24 00:31:11 +08:00
client.py fix: resolve api_key at request time to restore 0.2.x override semantics 2026-07-22 12:28:54 +08:00
cloud_api.py chore: trim fix-rationale comments 2026-07-22 12:33:30 +08:00
collection.py fix: use doc_name in agent tools, matching the cloud agent contract 2026-07-24 00:31:11 +08:00
config.py chore: trim fix-rationale comments 2026-07-22 12:33:30 +08:00
config.yaml fix: default SDK retrieve_model to gpt-5.4 instead of following model 2026-07-16 16:09:07 +08:00
errors.py fix: address max-effort review findings 2026-07-13 18:49:09 +08:00
events.py fix: enforce collection membership on cloud query doc_ids 2026-07-16 14:40:19 +08:00
page_index.py Merge commit from fork 2026-07-17 13:57:21 +08:00
page_index_md.py fix(markdown): skip empty bold headings 2026-07-16 19:36:52 +08:00
retrieve.py chore: trim fix-rationale comments, restore --model help, drop stale gitignore entry 2026-07-19 16:16:09 +08:00
tokens.py refactor(sdk): typed returns, protocol contract, parser layering 2026-07-07 12:15:34 +08:00
types.py feat: restore status and page/line counts in local get_document 2026-07-19 15:25:25 +08:00
utils.py fix: address xhigh review findings for PR #272 2026-07-16 01:31:57 +08:00