Commit Graph

8 Commits

Author SHA1 Message Date
Andy 0e43a50ad2 feat(docx): add TOC and bookmark placeholder tools; hi-fidelity TOC/bookmark XML post-processing
- Features: hi-fidelity-toc, hi-fidelity-bookmarks
- Tools: insert_toc, insert_bookmark_after_heading
- Write: emit recognizable placeholders and transform to field XML under feature flags
- Tests: add golden checks for TOC field injection and bookmark cleanup
2025-08-12 23:35:49 +08:00
Andy 90305551cc feat(docx): add hi-fidelity XML injections for tables, styles, lists, and sections; extend tools and tests
- Add feature flags: hi-fidelity-tables, hi-fidelity-styles, hi-fidelity-lists, hi-fidelity-sections
- Tables: inject true w:gridSpan/w:vMerge and w:tblGrid widths via post-build XML when enabled
- Styles: ensure TableHeader style in styles.xml; tag first row when headers present
- Lists: robust numbering.xml for ordered/unordered with multi-level definitions
- Sections: write tail w:sectPr with page size/orientation/margins
- Tools: expose new operations (sections, list items, images, hyperlinks, props, redaction, storage)
- Converters: add preference-aware methods for hi-fidelity export paths; HTML export tool
- Tests: add golden XML assertions gated by feature flags; keep default build green

This enables high-fidelity DOCX output while keeping pure-Rust paths by default.
2025-08-12 23:25:29 +08:00
Andy c30f55d16d Concurrency: switch provider handler to RwLock for read-heavy parallelism; add get_storage_info tool; improve text extraction whitespace; keep tests green 2025-08-12 19:17:19 +08:00
Andy 15ec810cea Security: whitelist precedence and sandbox path handling for non-existent temp paths; minor import cleanups; all tests passing 2025-08-11 22:53:07 +08:00
Andy 515b0100ac Introduce base-dir constructors for isolation; update tests to avoid env var dependence; ensure directories exist before I/O; all tests green (including performance) 2025-08-11 22:41:14 +08:00
Andy ec8b46955b Stabilize tests and security: expose modules, standardize tool responses, add ToolResult helpers; fix sandbox path checks; make handler respect DOCX_MCP_TEMP and ensure dirs exist; add pure converter wrappers and JPEG fix; relax brittle assertions; replace TMPDIR with DOCX_MCP_TEMP in tests; modernize advanced_docx fallbacks; add example bin; all suites green locally 2025-08-11 22:11:37 +08:00
Andy ad8909d749 Refactor: upgrade to latest MCP and docx-rs; add Router, fonts CLI, and builder-based DOCX edits
- Integrate mcp-server Router with mcp-spec and expose tools
- Add fonts subcommands (download/verify) with pinned sources + checksums
- Replace deprecated docx-rs APIs; rebuild DOCX via ops (paragraphs/headings/tables/lists/page breaks/headers/footers)
- Implement proper numbered lists via docx-rs numbering
- Gate advanced features behind `advanced-docx` for future porting
- Resolve lopdf and image import ambiguities; adapt search and responses
2025-08-11 19:19:04 +08:00
Andy 39e94c1b13 Initial Commit 2025-08-11 14:31:51 +08:00