Repository navigation
Proposal: HWP/HWPX upload support for Korean users, through a document-converter extension hook #8291
hyeonsang010716
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi @WillemJiang and DeerFlow maintainers,
I'd like to ask whether support for HWP and HWPX uploads would be welcome. I also want to suggest a way to add it that keeps core unchanged.
Why this matters in Korea
HWP and HWPX (Hancom Office's formats) are the default document formats in Korea. Government agencies, public institutions, schools and many companies write and exchange their documents in them. Public notices, application forms, reports and official letters are usually published as
.hwpor.hwpxfirst, and often only in those formats. HWPX is also a Korean national standard (KS X 6101).DeerFlow converts uploaded PDF and Office files to Markdown so the agent can read them, but it can't read HWP or HWPX today.
CONVERTIBLE_EXTENSIONScovers PDF, Word, Excel and PowerPoint, and MarkItDown has no HWP reader. So when a Korean user uploads the most common document they have, the agent can't see its contents. The usual workaround is to open the file in Hancom Office and re-export it as PDF or DOCX. That step is easy to forget, and it often breaks tables, which are the most important part of Korean form-style documents.What I can offer
I've been building OpenDocKit. To be transparent, it's my own project, and it's still young (0.3.x on PyPI), which is one more reason I'd keep it behind an opt-in extension. It's an MIT-licensed Python library that converts documents to LLM-ready Markdown. Its HWP 5.x parser is written from scratch and it also reads HWPX. It was built for the documents Korean offices actually produce:
IsolatedConverterruns each file in a worker process with time and memory limits;It has known limits, and I'd document them: password- or DRM-protected HWP files can't be read, and WMF/EMF pictures stay as placeholders on Linux and macOS.
How I'd add it
Following the "extension first" rule in
AGENTS.md, I'd keep HWP-specific code out of core.A small, generic hook in the extension contract. An extension could register a document converter for a set of file extensions, for example:
Core would use the registered converters for those extensions and keep the existing MarkItDown and pymupdf4llm paths for everything else. Uploads, project documents and the embedded client all go through
CONVERTIBLE_EXTENSIONSandconvert_file_to_markdown, so the change stays in one place. It would also run off the event loop, like today. Built-in formats, defaults and dependencies would stay exactly as they are.An installable example extension,
examples/deerflow-extension-hwp/, that registers.hwpand.hwpxwith OpenDocKit. Operators who need it add it underplugins:inconfig.yaml, and nobody else installs anything.Tests and docs in the same change. That means unit tests for the hook, fixture-based tests for the extension, an end-to-end test that uploads an HWP file and reads the generated Markdown, and a short guide page.
This keeps the scope narrow on purpose. I'm not proposing to replace MarkItDown or change how any existing format is converted. The same hook would also let others add regional formats later, such as China's OFD (GB/T 33190), without touching core.
If you'd rather not change the extension contract, a smaller option is an opt-in extra in core,
deerflow-harness[hwp]. I'm happy to go either way.Questions before I start
I'd be glad to own this end to end and to keep the extension up to date. Thank you for your time, and for maintaining DeerFlow!
All reactions