Skip to content

feat(docreader): add XMind outline parsing - #2713

Draft
guiyangyuan wants to merge 3 commits into
Tencent:mainfrom
guiyangyuan:agent/xmind-docreader-support
Draft

feat(docreader): add XMind outline parsing#2713
guiyangyuan wants to merge 3 commits into
Tencent:mainfrom
guiyangyuan:agent/xmind-docreader-support

Conversation

@guiyangyuan

Copy link
Copy Markdown

Description

Add native .xmind support to the built-in DocReader so mind maps can be uploaded and indexed without a manual Markdown or image export.

  • Parse modern XMind archives from content.json and classic XMind 8 archives from content.xml using only the Python standard library.
  • Preserve sheet and topic hierarchy as Markdown outlines, including plain-text node notes.
  • Prefer modern JSON when both formats are present and reject malformed, encrypted, empty, or oversized content entries with clear errors.
  • Advertise xmind through both the Python parser registry and Go engine registry so existing clients can discover support.
  • Add parser, validation, routing, and engine-registry regression tests.

User impact: teams can directly add structured XMind knowledge to WeKnora for RAG, search, and summarization workflows.

Breaking changes: none.

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📚 Documentation update
  • 🎨 Refactor
  • ⚡ Performance improvement
  • 🧪 Test
  • 🔧 Configuration / Build / CI

Related Issue

Closes #2705

Testing

uv run --project docreader --no-sync python -m unittest discover -s docreader/tests -p "test_*.py" -v
uv run --project docreader --no-sync python -m compileall -q docreader
go test ./internal/infrastructure/docparser -count=1

Results: 157 Python tests passed with 12 environment-dependent fixture tests skipped; Python compilation and Go document-parser tests passed.

Checklist

  • git diff --check upstream/main...HEAD passes
  • Changed source files are formatted
  • Targeted tests for the changed packages/components pass
  • Diff-scoped lint passes where applicable (for Go: golangci-lint run --new-from-rev=origin/main ./...)
  • Full DocReader Python tests and scoped Go tests were run
  • Self-reviewed the code
  • Added/updated tests covering the change
  • Updated related documentation (README, docs/, Swagger annotations, etc.)
  • Breaking changes are clearly called out in the description above

Screenshots / Recordings

Not applicable; this change adds backend document parsing and engine discovery without UI changes.

Out of Scope

Images, labels, markers, priorities, relationships, and graphical rendering are intentionally left for follow-up work.

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.

[Feature]: 期望内置 DocReader 支持 xmind 格式解析

1 participant