cli-v0.21.0
What's New
Core preset for AI agents β Ships two statically validated tools (superdoc_inspect, superdoc_perform_action) with 40 LLM-safe actions: change text, rewrite blocks, add comments, move/delete tables, attach numbering, reply to comments, format text, and more.
Tracked paragraph-property changes β Agents and users can now track numbering and alignment changes (w:pPrChange). Full round-trip: track it, export to Word, import back, accept/reject in the review UI.
Comment threading β reply_to_comment action and proper parentId wiring in comments.create so threads survive import/export.
Citation hyperlinks with tracked changes β Hyperlinks now preserve w:ins/w:del marks through DOCX export and re-import (fixed structural insertion of tracked citations).
MCP core preset support β Serve the core preset tools over Model Context Protocol with MCP_PRESET=core.
Improvements
Large-document performance β 50s β 16s on headless 38-page redlines. Skips whole-doc linked-style CSS decorations when the editor runs view-only, and blocks.list now returns visible text (skips tracked-deleted runs) so re-editing resolves offsets correctly.
Tracked-change decision interface β Side-targeted reject: pass side: 'inserted' | 'deleted' to trackChanges.decide and resolve only half a replacement. Survives one-sided deletions correctly.
System prompt narrowing β excludeActions parameter shrinks both the tool enum and the prompt documentation (no phantom actions, no hallucination bait). getSystemPrompt and getTools stay coherent by construction.
createAgentToolkit β Single options object returns {tools, systemPrompt, dispatch} with preset + exclusions applied to all three. No more forgetting to pass excludeActions to every function.
Receipt token hygiene β Per-item lists (executedOperations, selectedTargets) capped at 8 entries; full counts in executedOperationCount / selectedTargetCount. Stops 200-paragraph font changes from costing thousands of prompt tokens.
Python SDK parity β Core preset, actions, dispatch with exclusion guards, create_agent_toolkit, full ActionArgs types.
Provider-native tool formats β getTools supports 'vercel' (flat {name, description, inputSchema}), 'openai' (Chat-Completions-nested), 'anthropic' ({name, description, input_schema} with cache_control).
Fixes
Cell shading on export β tables.setShading({ color: null }) now deletes background attr on both table-scoped and cell-scoped clear paths; cells stop rendering as shaded after a cleared shade is re-exported.
Tracked pPrChange edge cases β One-sided replacement survivors downgrade to plain insert/delete. pPrChange inside kept tracked tables resolves via id, not through mark-based child planner. Tracked numbering attach guards against blank authors. Synthetic tracked-change rows no longer leak as empty comments on export. pPrChange no longer positional in review graph (no comment detach, no text-range capture).
Border rendering β Thick borders paint at authored width (no 2x multiplier); test aligned with SD-3028 spec.
Native CLI binary prompt assets β Bun-compiled CLI binaries embed system-prompt.md and now serve get-system-prompt without TOOLS_ASSET_NOT_FOUND.
Hyperlink edge case β Final-doc export flattens tracked pPrChange so .docx carries only accepted numbering; accepting a tracked table by id cascades to resolve contained pPr changes.
Prompt asset errors β readPromptFile now distinguishes ENOENT (missing asset) from permission/IO failures (TOOLS_ASSET_UNREADABLE with underlying cause).
CLI tracked mode transport β attach_numbering, add_list_items, lists.setType in changeMode:'tracked' now pass the flag in both input and options dialects so tracked changes survive CLI transport.
move_range safety β Refuses ranges containing tables, lists, or images before mutating (teaches the model the constraint and prevents silent data loss).
reply_to_comment contract fix β Sends only {text, parentId, parentCommentId} with no target (threads inherit parent's anchor per spec); both SDK transport and in-process hosts now work.