Skip to content

📄 feat: Keep Hancom HWP and HWPX Output Files - #389

Open
psi59 wants to merge 1 commit into
LibreChat-AI:mainfrom
psi59:feat/hancom-output-extensions
Open

psi59 wants to merge 1 commit into
LibreChat-AI:mainfrom
psi59:feat/hancom-output-extensions

Conversation

@psi59

@psi59 psi59 commented Nov 12, 2026

Copy link
Copy Markdown

Summary

Add the Hancom Office word processor formats (.hwp, .hwpx) to the output extension allowlist, so files written to /mnt/data with these extensions are returned to the caller.

 const SUPPORTED_EXTENSIONS = new Set([
   ...
   '.doc', '.docx', '.pdf', '.ppt', '.pptx', '.xls', '.xlsx',
-  '.odt', '.ods', '.odp', '.rtf',
+  '.odt', '.ods', '.odp', '.rtf', '.hwp', '.hwpx',
   ...
 ]);

HWP/HWPX is the standard document format for Korean government and many Korean organizations. Code can already create these files in the sandbox (for example with @rhwp/core), but isSupportedOutputFilename drops them, so the user never receives the document.

Evidence

New test in api/src/walker.test.ts:

it('keeps Hancom word processor documents')
  write report.hwp, report.hwpx, UPPER.HWP
  walkDir()
  expect generatedFiles == [UPPER.HWP, report.hwp, report.hwpx]
  • Before: fails — Expected [UPPER.HWP, report.hwp, report.hwpx], Received []
  • After: passes. bun test src/walker.test.ts → 70 pass, 0 fail.

Full bun test in api/ (bun 1.4.4, Linux container without the sandbox runtime) has the same 22 failures on main and on this branch (checkpoint, process pipe and warmup tests that need the runtime). No new failures.

Merge Danger

Door: two-way

Revert the two lines to restore the previous behavior.

Blast Radius: small

Only .hwp/.hwpx files that code writes to /mnt/data are now uploaded as outputs. Output size and count caps still apply. MIME type falls back to application/octet-stream as for other unmapped extensions.

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.

1 participant