Commit Graph

3 Commits

Author SHA1 Message Date
roboomp 65bc422e83 fix(coding-agent): handled inline image pdf delimiters
Skipped binary inline-image payload bytes after the PDF ID operator so tokenizer scanning resumes at post-image content.

Advanced past stray closing delimiters while recovering malformed content streams to avoid zero-width tokenizer iterations.

Fixes #4512
2026-07-04 12:18:06 +00:00
can1357 88aa88f605 fix(coding-agent): bundle mupdf into the compiled binary so PDF reads work
The vendored markit engine kept `mupdf` external, but a single-file
`bun --compile` binary has no node_modules to resolve it from, so the
standalone binary aborted at startup with `Cannot find package 'mupdf'`
— the otherwise-lazy import is resolved eagerly at boot. Bundle mupdf and
embed its WASM blob (scripts/embed-mupdf-wasm.ts, reset after the build);
npm and source installs still load mupdf from node_modules.

Import mupdf lazily inside the PDF converter so the bundled markit chunk's
init stays synchronous: mupdf's top-level await otherwise made the chunk
init async and bun's compiled bundler failed to await it through the
barrel, exposing the converters before their module-level const tables
initialized (undefined EXTENSIONS). Also keeps the ~10MB wasm off non-PDF
document conversions.
2026-06-18 20:44:58 +02:00
can1357 38d1d3a2f5 feat(coding-agent): vendor relevant parts of markit 2026-06-18 19:11:22 +02:00