Skip to content

Releases

margin 0.1.5

Choose a tag to compare

@github-actions github-actions released this 27 Nov 00:55

Windows desktop installer, Commit Graph on PyPI, Power BI .pbip export for Data Storyteller, an in-app auto-updater, and deep black dark mode.

pip install -U margin-core margin-cli margin-api margin-ai-code-detector margin-commit-graph margin-data-storyteller

Windows desktop app. Download margin-setup-0.1.5.exe below (with .sha256 checksum) to run margin in a native Edge WebView2 window with Python, the web UI, and all agents bundled -- no Python install needed.

  • Repository agents use your system git and show a clear banner if git is missing, leaving Data Storyteller usable.
  • Built-in auto-updater (GET /updates, POST /updates/install): a quiet Update button appears in the top bar when a newer release is out, showing release notes on hover and verifying the installer checksum before installing.

Data Storyteller (0.1.3). In story mode, output_dir now also includes <name>.pbip.zip: a Power BI project with the cleaned table (personal-data columns left out), a semantic model with measures for the main facts, and a report page for each story page.

Commit Graph (0.1.0). First published release on PyPI: draws a repository's history as an ink-lane SVG tree with narrative chapters, commit margin notes, and hotspots.

Web UI (margin-api 0.1.5). Deep #000000 dark mode, GitMissingBanner, and the top-bar Update button.

Versions: margin-core 0.1.5, margin-cli 0.1.3, margin-api 0.1.5, margin-ai-code-detector 0.2.3, margin-commit-graph 0.1.0, and margin-data-storyteller 0.1.3.

margin 0.1.4

Choose a tag to compare

@Waddah0-0 Waddah0-0 released this 23 Nov 01:39

A redesigned web UI, a security fix for SQLite table names in Data Storyteller, and small fixes across all five packages.

pip install -U margin-core margin-cli margin-api margin-ai-code-detector margin-data-storyteller

Security fix (Data Storyteller). A table name in a SQLite file could lead the cleaned CSV and the report out of the output folder. Table names are now cleaned of folders and special characters before they're used. Table names containing / no longer break runs on Linux and macOS, and paths to devices or pipes are refused with a clear error.

Redesigned web UI (margin-api). The bundled web UI is redesigned around a ruled margin: notes on the left, content on the right, red for what was flagged and blue for what was checked. Also added:

  • "Run again" via RunView.input (the input as sent, without the run's own output folder).
  • Browser tabs named after the current page, showing a run's progress or when it needs an answer.
  • Lazy-loaded result views, plus a view for the upcoming Commit Graph agent (tree with margin notes, replay slider, chapters and file/finding highlights).
  • Uploads named after Windows devices (such as NUL or con.csv) are prefixed with _ so Windows saves them as files.

Other fixes:

  • CLI: on Windows, margin run writes UTF-8 to stdout instead of crashing with UnicodeEncodeError when a report with characters like → is piped or redirected.
  • Core: multi-choice answers format cleanly as one list (stripping trailing full stops and using semicolons when choices contain commas), and "Not confirmed" warnings no longer end with two full stops.
  • AI Code Detector: confidence reasons read in plain words ("only 1 file could be analysed", "1 kind of signal", "no kind of signal gave any evidence").

Versions: margin-core 0.1.4, margin-cli 0.1.3, margin-api 0.1.3, margin-ai-code-detector 0.2.2 and margin-data-storyteller 0.1.2.

margin 0.1.3

Choose a tag to compare

@Waddah0-0 Waddah0-0 released this 23 Nov 01:39

File uploads and downloads in the web UI, plus a round of security fixes across the core, CLI, API and Data Storyteller.

pip install -U margin-core margin-cli margin-api margin-data-storyteller

File uploads and run downloads. In the web UI, you can now drop or choose a data file instead of typing a local path (POST /uploads), and download a run's output files (such as Data Storyteller's cleaned table and report) next to the JSON and Markdown exports (GET /runs/{run_id}/files/{name}). Uploads have a 200 MB limit (MARGIN_API_MAX_UPLOAD_BYTES) and expire with the run; MARGIN_API_FILES_DIR sets where files are kept.

Security fixes:

  • Breaking change for .env users: margin no longer reads a .env file in the current folder automatically, because an untrusted repository could use one to change settings or open the server to the network. Only a file named by MARGIN_ENV_FILE is read now. If you keep settings in .env, set MARGIN_ENV_FILE=.env.
  • Git history reading is further locked down: commit signatures aren't checked (log.showSignature=false) and reading history never fetches over the network.
  • Reports, CLI warnings, errors and progress messages no longer carry control characters or Rich markup that could rewrite what a terminal shows.
  • In margin-api, requests that change state are refused with 403 when they come from another web page (requires FastAPI 0.132+), MARGIN_API_CORS_ORIGINS is empty by default (add http://localhost:3000 for the UI dev server), and output folders can no longer be chosen over HTTP (422).
  • In margin-data-storyteller, CSV cells that a spreadsheet would run as formulas get a leading ' (plain negatives and phone numbers are left alone), Excel and Parquet files unpacking past 2 GB are refused, SQLite schemas can't call functions with side effects (and #/? in paths are read literally), verification SQL can't touch files or the network, and column/table names are fenced as data in model prompts.

Also fixed: Data Storyteller's description of stop_after no longer says the story isn't built yet.

Versions: margin-core 0.1.3, margin-cli 0.1.2, margin-api 0.1.2 and margin-data-storyteller 0.1.1. margin-ai-code-detector is unchanged at 0.2.1.

margin 0.1.2

Choose a tag to compare

@Waddah0-0 Waddah0-0 released this 31 Oct 01:10

A new agent, and agents can now stop to ask you questions.

pip install margin-cli margin-data-storyteller
margin run data-storyteller sales.csv --set stop_after=story

Data Storyteller (new, experimental). Give it a spreadsheet or data file and it gives back a clean table, a report of every change and why, and a short story about what's in the data, with charts. When the file can be read two ways (is 1.234 a thousand or one point two? is 01/02 January or February?), it asks instead of guessing. Every number in the story is computed twice, once in pandas and once in DuckDB from separate SQL, and the run fails if they disagree. A model writes the words but never types a number, and without a model the story is written from a template. In the web UI, click any number in the story to see how it was computed. More in its README.

Agents can ask questions. An agent can now pause and ask the person running it. margin run asks in the terminal. In the web UI the run waits, shows a form, and gives up its place in the queue until you answer. You can also give the answers up front, or take every suggested answer with assume_defaults; those are marked as not confirmed in the result.

Also fixed: opening a run page directly from a link, or reloading it, showed "Can't reach the API" when the web UI was served by margin-api (the Docker image).

For anyone building on margin: there's a new waiting run status in the API, so a client that handles every status needs to handle this one too.

Versions: margin-core 0.1.2, margin-cli 0.1.1, margin-api 0.1.1 and margin-data-storyteller 0.1.0. margin-ai-code-detector is unchanged at 0.2.1.

margin 0.1.1

Choose a tag to compare

@Waddah0-0 Waddah0-0 released this 21 Oct 00:51

A security fix release. If you installed 0.1.0, please upgrade:

pip install -U margin-core margin-ai-code-detector

What changed:

  • A repository's own git config could make git run a program while margin read its history, for example through core.fsmonitor. Every git command now overrides the repository's config, turns hooks off and skips Git LFS downloads. This mattered most in Docker, where git's ownership check is off for the shared folder.
  • Cancelling a run while a repository was being cloned could leave a half-written clone in the temp folder. git is now stopped before the folder is deleted.
  • The AI Code Detector put the name of the file being judged into the prompt outside the protective markers. It's now quoted and escaped, so a file can't be named to look like an instruction.

Versions: margin-core 0.1.1 and margin-ai-code-detector 0.2.1. margin-cli and margin-api are unchanged at 0.1.0.

There's a new page on what margin protects against and where the limits are: docs/security.md.

margin 0.1.0

Choose a tag to compare

@Waddah0-0 Waddah0-0 released this 21 Oct 00:19

First release on PyPI.

margin is a small collection of AI agents that answer with evidence. This release has the core library, the margin command, a web UI with an HTTP API, and the first real agent, the AI Code Detector.

pip install margin-cli margin-ai-code-detector
margin run ai-code-detector https://github.com/psf/requests

Or pip install margin-api and run margin-api for the web UI.

The detector is experimental. It ranks repositories reasonably well but isn't calibrated, so treat its numbers as a starting point for a conversation, never as proof. docs/methodology.md explains how it scores and how it did in testing.

Packages: margin-core 0.1.0, margin-cli 0.1.0, margin-api 0.1.0, margin-ai-code-detector 0.2.0.