Repository navigation
Releases: Attentionform/astra
Releases · Attentionform/astra
Release list
ASTra 0.1.0
First public release of ASTra, the agent-first toolkit for Word documents. Let AI agents read, edit and build .docx files, with every change validated and every save kept in a git history.
Install
| What you want | Package |
|---|---|
| Let an AI assistant (Claude Desktop, Claude Code, Cursor, Windsurf, any MCP client) edit Word files | @attentionform/astra-mcp-server: npx -y @attentionform/astra-mcp-server --allowed-dir "$PWD" |
| Scripts and pipelines | @attentionform/astra (command line): npx -y @attentionform/astra --help |
| Your own TypeScript or Node code | @attentionform/astra-engine: npm install @attentionform/astra-engine |
| The schema validator on its own | @attentionform/ooxml-validator, with one prebuilt binary package for each of Linux, macOS and Windows on x64 and arm64 |
All packages are version 0.1.0 and are published from GitHub Actions with provenance. Documentation: https://attentionform.com and the README.
What is in 0.1.0
Added
- Engine (
@attentionform/astra-engine): reads a.docxinto a structured document with stable node ids; 27 typed operations (insert, replace, delete, style, tables, sections and page setup, headers and footers, fields, equations, lists, charts, images, callouts, footnotes and endnotes, watermarks, page borders, cover pages, hyperlinks, bookmarks, comments, tracked changes, metadata); batches that apply all or nothing; revision history. - Validation on every write. A file is checked against the Office Open XML schema before it is written. An invalid result is refused with
E_VALIDATION, an explanation and a suggested fix, and the file on disk is left as it was. This coverssave,sanitizeand PDF export. - Schema validator (
@attentionform/ooxml-validator): the .NET 10 Open XML validator behind the check above, with a persistent worker process, in-memory validation without temporary files, and prebuilt binaries for Linux, macOS and Windows on x64 and arm64. - MCP server (
@attentionform/astra-mcp-server): 19 tools over stdio, including open, inspect, search, execute a batch, save, compose from Markdown, import, export (HTML, Markdown, PDF), visual inspection, history, preview and revert, validate, statistics, sanitize and normalize. Every call is confined to the folder given with--allowed-dir. - Command line (
@attentionform/astra): 15 commands for scripts and pipelines, with a machine-readable--jsonoutput and documented exit codes. - Equations. LaTeX in documents becomes native Word equations, including accents (
\dot,\ddot,\hat,\bar,\vec,\tilde), and round-trips back to LaTeX. In Markdown,\( \)and$$ $$are always math;$ $is math only when you turn it on, so prices such as "$5 and $10" stay text. - License and contributions. ASTra is source-available under the Business Source License 1.1 (
BUSL-1.1). Free production use covers individuals (including freelancers and consultants), schools and academic research, non-profits, public bodies and small businesses; other production use needs a commercial license. Each version becomes Apache-2.0 four years after it is first made public. Outside contributions require a one-time contributor license agreement, signed by adding a signature file to the first pull request and checked by theclaworkflow (seeCONTRIBUTING.md). - Privacy tools.
sanitizeremoves document metadata by default;--redact-piiand--client-safealso redact personal data in the body text. Footnotes and endnotes are preserved. - Numbers count from 1. Every number you type or read starts at 1: table rows and columns (
rowIndex,colIndex,index,afterIndex, merge ranges), chart series (trendline.series), sections (sectionIndex), list levels (level, shown as[L1]ininspect) and pages.inspectprints the same numbers it accepts.0is refused with the valid range; for listchangeLevel,0takes a paragraph out of its list.offset(how many items to skip) and the raw file values stay 0-based. - Cell addresses. A table cell is addressed as
<tableId>:r<row>c<col>(for examplet_001:r2c3), or…:p<n>for one paragraph inside it.replace,style,namedStyle,clearFormat,hyperlink,bookmarkandcommentaccept it astarget; any other action refuses it and names the fix.search_contentcan return cells, andcompose_documentreturns apersistentIdsmap from its temporarymd_*ids to the ids the saved file carries. - Unknown settings are refused. An operation that carries a setting it does not read (for example
boldinsideparamsof a tableupdateCell) fails withE_VALIDATIONbefore anything is applied, naming the setting and the ones that are accepted. - Real dates and your own author. Output carries real timestamps by default. For byte-identical output pass
--reproducible(or setASTRA_REPRODUCIBLE=1orSOURCE_DATE_EPOCH);ASTRA_NO_REPRODUCIBLE=1wins over both.--author <name>sets the default author for tracked changes and comments that do not name one. - Better defaults when composing Markdown. Composed tables get a navy, bold header row and striped body rows (a row added later keeps the stripes, and deleting a row re-alternates them); a subtitle under the title is kept. The old plain look is still available as the
legacystyle.headerBold(default on) turns the bold header off, flat or inparams, or with- Header Bold: falseunder## Tablesin a style guide. Spacing and indents accept twips or a point string such as"12pt". - Complete new files and a safe history location. New documents carry the full package (document properties, settings, font table and theme) and pass the Open XML SDK validator.
ASTRA_HISTORY_DIRkeeps revision history out of the document's folder. - Visual output.
visual_inspecttakesoutputDirto choose where page images are written (a symlink at the image name is refused). The text wireframe shows table columns, the header and first rows, list markers and[CALLOUT]blocks in about 380 tokens. - Lists have nine levels. A new list definition carries all nine levels, so an item at any level has its marker and indent: bullets cycle
•◦▪, numbers cycle1.a.i.. Before, only level 1 was defined and a deeper item had no marker or indent of its own. A list is reused only when its top level is the requested kind (a Word list that is numbered at level 1 and bulleted at level 2 used to be handed out for a bullet list), never when it is heading numbering or a style link, and a list that stops short of the level an item is placed at gets the missing levels in place. pageSetupturns the page.orientation: "landscape"(or"portrait") now swaps the section's width and height, so the page really turns in Word and LibreOffice; before, only the orientation flag changed unless apaperSizewas given too. Margins are written as given, never rotated. ApaperSizegiven alone keeps the section's orientation.validatelists the repairs a save would make.astra validateandvalidate_documentreportpendingNormalizations(for example property children that would be put back in schema order) next to the verdict, so a file that is valid only once ASTra has saved it no longer reads as plainly valid.- Sections are read from the file. A document opens with the sections it has: one per section break, with its own page setup, ids
sec_root,sec_2,sec_3, … by position, andinspectreports the real count (it always said 1 before). Section operations, headers, footers, page borders and columns work on a file you opened, not only on sections made in the same session. A header kept only for a later section's first page is no longer typed as the document header. - New content goes where the file puts it. With no anchor, an insert, table, callout, table of contents, field or chart goes to the end of the document (it went into the first section before, and a callout or table of contents with no anchor crashed on a document with several sections). Content placed right after a section break paragraph starts the next section.
equationandmovefollow the same rule. - A failed batch changes nothing you can see. The ids and versions returned by earlier batches (
_bk_new_…,md_…, section ids) still resolve after a failed batch, a dry run or a failed single operation, and anexpectedVersiontaken before the failure is still valid. If the document cannot be matched block for block, the error says the ids were re-read. - Sections follow the section breaks. After every batch, if a section break was deleted, moved or added, the sections are rebuilt from the document and the result carries a warning. Deleting a break merges the section into the next, as in Word; the text takes the page setup of the section after it. The header and footer of a deleted section are removed from the file too, with any picture only they used, so their text does not stay inside the saved document; nothing is removed while anything still refers to it, and if the package would be left with a broken reference the removal is skipped.
- Headers, footers, page borders and columns fail loudly. When a section has no section properties to hold the change, the batch fails and rolls back; before, it did nothing and a header or footer part could be left behind. A header or footer can now be set on an empty trailing section.
- One Node version for every package. The validator wrapper needs Node 22.19 or newer, like the engine, the command-line tool and the MCP server (it said 20 before).
- **Validator binaries keep ...