Skip to content

fix: improve long document ingestion and read - #85

Merged
giuseppelr-dev merged 8 commits into
mainfrom
improve-long-document-ingestion-and-read
Aug 31, 2026
Merged

fix: improve long document ingestion and read#85
giuseppelr-dev merged 8 commits into
mainfrom
improve-long-document-ingestion-and-read

Conversation

@giuseppelr-dev

@giuseppelr-dev giuseppelr-dev commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

Improved reading of long uploaded documents by integration content and tool offloading.
Introduced a new tool "snap" to take screenshots of documents.
Introduced a geocoding MCP tool to get coordinates of a place by searching it
Fixed support for Word 97, Excel 97 documents
Fixed general harness hallucination caused by truncated files

Type of change

  • Bug fix
  • Feature
  • Documentation
  • CI / tooling
  • Breaking change (describe in Notes)

Test plan

  • ./scripts/run_ci_tests.sh (or python -m pytest src/test/... for affected modules)
  • uv run ruff check --config ruff.toml src/ (lint — same as CI)
  • uv run ruff format --check --config ruff.toml src/ (formatting — CI fails if this is skipped)
  • Auto-fix formatting if needed: uv run ruff format --config ruff.toml src/
  • python scripts/check_data_git_tracking.py
  • Frontend build if UI touched (cd <package> && pnpm build)
  • Manual smoke test:

Security / OSS checklist

  • No secrets, .env, or internal IPs in the diff
  • No new tracked files under data/ (except whitelisted fixtures)

Notes

…cument ingestion

- Added `long_document_protocol` to multiple profiles including `aion_std.yaml`, `document_extractor.yaml`, `generic_assistant.yaml`, and `research_docs.yaml` to support efficient processing of lengthy documents.
- Updated the `ocr_file` and `doc_ingest` functions to improve handling of multi-page PDFs, ensuring better performance and error management during document extraction.
- Introduced a timeout message for document tools to provide clearer guidance on handling timeouts during extraction processes.
- Integrated a new upload session file handling mechanism with progress tracking in the ChatWorkspace component.
- Replaced the previous pending files state management with a more robust system using `usePendingSessionUploads` hook.
- Updated UI to reflect the status of file uploads, including progress indicators and error handling options.
- Added localized messages for upload status updates in English and Italian.
- Introduced geocoding support via OpenStreetMap Nominatim in the MCP registry and relevant profiles.
- Updated `.env.example` to include geocoding configuration options.
- Modified `dev-api.sh` and `setup_core.py` scripts to integrate the new geocoding service.
…nfigurations

- Added support for automatic conversion of legacy Word (.doc) files to .docx on upload via LibreOffice.
- Updated `.env.example` to include new configuration options for legacy Word conversion.
- Enhanced the `AttachmentRef` model to accommodate new fields for conversion status and paths.
- Modified file upload handling to apply legacy Word conversion during the upload process.
- Updated documentation to reflect changes in handling legacy Word files and conversion workflows.
…nversion

- Added a check in the backend entrypoint to merge new MCP slugs from `config_std` into `mcp_registry.yaml` during startup.
- Updated documentation to clarify the automatic conversion of legacy Word (.doc) files to .docx and the new configuration options related to this feature.
- Enhanced the MCP registry documentation to include details about the merging process for new slugs.
- Included references to the legacy Word conversion in various configuration and API documentation files.
- Introduced a new `pdf_evidence_crop` tool in the OCR server to crop PDF pages into PNG images for use in Word report deliverables.
- Updated configuration files to include new environment variables for PDF evidence cropping settings, such as DPI and maximum white ratio.
- Enhanced documentation across various files to provide guidance on using the new cropping tool and its integration into the Word report generation process.
- Updated skills and prompts documentation to reflect the new requirements for evidence images in multi-page PDF to Word workflows.
- Incremented version numbers for `docx` and `long_document_protocol` documentation to 4.
- Added detailed guidelines for creating professional reports, emphasizing the importance of structured deliverables over simple image galleries.
- Enhanced documentation on the required elements for client-ready reports, including metadata and formatting standards.
- Updated the `document-evidence.md` file to reflect changes in report generation scripts and their purposes.
@giuseppelr-dev
giuseppelr-dev requested a review from a team as a code owner August 31, 2026 13:20
@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
aion-agent Ready Ready Preview Aug 31, 2026 1:29pm

- Consolidated multi-line statements into single lines for better clarity in `agent_pipeline.py`, `scoring.py`, and other files.
- Enhanced readability by adjusting line breaks and indentation in various functions across the codebase.
- Updated test cases to maintain consistency with the new formatting standards, ensuring all assertions and function definitions are clear and concise.
Comment thread src/session_workspace.py Dismissed
Comment thread src/tools/doc_auto_ingest.py Dismissed
Comment thread src/tools/doc_auto_ingest.py Dismissed
Comment thread src/tools/office_auto_convert.py Dismissed
Comment thread src/tools/office_auto_convert.py Dismissed
Comment thread src/tools/office_convert.py Dismissed
Comment thread src/tools/office_convert.py Dismissed
Comment thread src/tools/office_convert.py Dismissed
Comment thread src/tools/office_convert.py Dismissed
Comment thread src/tools/office_convert.py Dismissed
@giuseppelr-dev
giuseppelr-dev merged commit 7f6386b into main Aug 31, 2026
24 checks passed
@giuseppelr-dev
giuseppelr-dev deleted the improve-long-document-ingestion-and-read branch August 31, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants