You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Engineering baseline aligned with TianshangCAD: src/utils/ helpers,
pytest filterwarnings=error, ruff expanded rule set, mypy strict for
new modules, coverage configuration, and shared tests/conftest.py fixtures.
Standard governance documents: CHANGELOG.md, SECURITY.md, CODE_OF_CONDUCT.md, THIRD_PARTY_LICENSES.md, MIGRATION.md.
MCP server migrated to the official mcp>=2.0 SDK under src/mcp/
(stdio + Streamable HTTP + SSE), removing the package-name collision with
the SDK and aligning with TianshangCAD's src/<pkg>/mcp/ layout.
src/mcp/tools/_registry.py: central tool registry; 7 tools now served
(create, edit, fill_template, convert, extract, validate, compare). Tool inputSchemas are derived from Annotated signatures.
Tool descriptions rewritten to a three-sentence template that discloses
side effects (writes, output_path defaults, in-place overwrite, PDF engine
dependency) and read-only guarantees, consistent with the readOnlyHint / destructiveHint annotations; server instructions now disclose bearer-token
auth and rate limits. Guarded by tests/test_mcp_descriptions.py.
validate_template / compare_documents promoted to first-class tools.
fill_template writes its data payload to a unique temp file instead of a
shared mcp_template_data.json, removing a cross-session race.
--extract full modes: text / tables / images / structure / metadata across Word, Excel and PPT (extract_text, extract_tables, extract_images, extract_structure on each engine).
--add-table: add Word tables from inline "H1,H2|a1,a2" or @file.csv
(WordEngine.add_table_data).
Reverse conversions: .md/.html inputs auto-convert to Word and .json
to Excel (src/transform/reverse.py, ExcelEngine.import_json); new
dependencies htmldocx + markdown.
Batch processing: --batch flag and --files "reports/*.docx" glob;
per-file execution continues on failure with a summary. Click/Typer's
Windows argv glob expansion is disabled so patterns reach the CLI literally.
--compress-media (PPT): recompress/resize images via Pillow
(PptEngine.compress_media); pillow declared as a direct dependency.
Interactive file session: tianshang-scribe open <file> enters a REPL
(src/cli/repl.pyInteractiveSession) that holds the document in memory
and supports add/heading/table/math/replace/delete/style/ extract/info/path/save/help/quit. Explicit save persists;
quitting with unsaved changes prompts first.
Changed
Local MCP package relocated from top-level mcp/ to src/mcp/.
Entry point: python -m src.mcp.server; CLI alias scribe-mcp.
src/utils/file_utils.py introduced; check_overwrite now delegates to it.
CLI restructured from a single Typer callback group into a one-shot plain
command plus an open subcommand app, dispatched in main_cli by the first
argument. Options may now appear before or after the positional input_file (e.g. tianshang-scribe file.docx --add "hi").
Shared CLI options (--latex-style, -w/-e/-p) are defined once as
constants and reused by both apps so the parameters stay in sync.
parse_table_input moved to src/cli/global_opts.py and shared by the
one-shot --add-table, the REPL table command, and batch mode.
Removed
Top-level mcp/ namespace package (conflicted with the official mcp SDK).
Legacy src/mcp/transport_sse.py (superseded by transport.py).