Skip to content

feat: add v1.3-aligned MCP and pdf2vqa workflows - #12

Merged
LeoMY1 merged 31 commits into
mainfrom
feat/lmy/pr22-align-v1.3
Aug 4, 2026
Merged

LeoMY1 merged 31 commits into
mainfrom
feat/lmy/pr22-align-v1.3

Conversation

@LeoMY1

@LeoMY1 LeoMY1 commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

This PR carries forward the work from dptech-corp#22 and aligns it with the UniParser v1.3 API and data model introduced by dptech-corp#23.

It adds two user-facing workflows: a simplified UniParser MCP server and a pdf2vqa extraction pipeline.

Changes

MCP server

  • Refactor the MCP server to expose a single uniparser_parse tool.
  • Support local PDFs, local images, and public PDF URLs.
  • Align task submission, TOS upload, polling, and result retrieval with UniParser v1.3.
  • Persist Markdown and pages_tree.json results locally.
  • Return structured output paths and a content preview.
  • Remove the legacy config.yaml-based configuration.
  • Update Cursor and Claude Code setup documentation.

pdf2vqa

  • Add the uniparser-agent package with parse and vqa CLI workflows.
  • Extract questions, short answers, solutions, and related images from exercise and answer PDFs.
  • Support:
    • Single PDF or image input
    • Public PDF URLs
    • Separate question and answer PDFs
    • Reusing an existing pages_tree.json
  • Generate JSONL, Markdown, ShareGPT, run metadata, and raw LLM response files.
  • Preserve LaTeX expressions in extracted answers.
  • Keep intermediate results for debugging and repeated extraction.

Output safety

  • Remove the overwrite option from the CLI, MCP, and Agent interfaces.
  • Never reuse, delete, or overwrite an existing output directory.
  • Automatically create a suffixed sibling directory such as results_1 or results_2 when the preferred directory already exists.
  • Reject root, HOME, the current working directory, and Git metadata directories as output targets.

Tests and documentation

  • Add unit tests for MCP input validation, parsing options, output persistence, and response schemas.
  • Add Agent tests covering v1.3 API compatibility, VQA extraction, image export, PDF merging, LLM configuration, and output safety.
  • Extend CI to run the main package, MCP, and Agent test suites.
  • Update the main README, MCP documentation, Agent documentation, and Skill references.

LeoMY1 and others added 30 commits July 9, 2026 16:45
feat: add uniparser CLI and migrate Agent Skill from bundled scripts
- Added new error message for broken PDF page trees.
- Introduced unsupported formatter error message.
- Added new third-party formatter type.
- Expanded language support in PPOCR_LANG with Arabic, Greek, Hindi, Tamil, Telugu, and Thai.
refactor: replace deps for PDF rendering and sync to upstream constants
Remove the overwrite parameter from the CLI, MCP, and Agent interfaces. When the preferred output path already exists, create an available suffixed sibling and preserve all existing contents.
@LeoMY1
LeoMY1 merged commit c353b7c into main Aug 4, 2026
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.

3 participants