Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 12 Aug 09:10
· 97 commits to main since this release

[0.3.0] - 2026-08-11

Added

  • 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.
  • MCP hardening modules: schemas.py (pydantic models + as_dict
    normalization), auth.py (Bearer tokens), rate_limit.py (token bucket),
    metrics.py (Prometheus-style counters/histograms), security.py
    (read-only / destructive classification used in tool annotations).
  • src/mcp/transport.py: stdio / SSE / Streamable HTTP wiring plus ASGI
    middleware (auth, CORS, rate limiting, metrics) for the HTTP transports.
  • src/mcp/prompts.py: 5 prompt workflows (summarize, batch fill, convert,
    latex polish, compare) exposed via prompts/list.
  • 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.
  • MCP tests: tests/mcp/test_sse.py (SDK SSE protocol: initialize +
    tools/list + tools/call), tests/mcp/mcp_stdio_smoke.py (9 steps),
    tests/mcp/mcp_agent_sim.py (11 end-to-end scenarios) via the shared
    tests/mcp/_mcp_client.py stdio client.
  • --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.py InteractiveSession) 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).