Skip to main content

Software That's Different for Every Customer

CJ Cummings
Creator and maintainer of Stof, co-founder & CEO of Limitr

For as long as most of us have written software, it has meant one build for everyone. Customers could change settings, toggle features, and pick a plan, but the logic underneath was the same for all of them. If a customer needed something different, it became a feature flag, an if on their customer ID, or a ticket.

That made sense when code was expensive to write. It isn't anymore. A model can draft a rule, a filter, or a pricing term in seconds. So the interesting question isn't whether we can write a different version of the logic for each customer. It's whether we can trust running it.

Stof 0.11.4: Rust, JavaScript, and Python

CJ Cummings
Creator and maintainer of Stof, co-founder & CEO of Limitr

More and more of the logic in an app is written by someone other than the app's developers. A model drafts a pricing rule or an agent tool. A customer sets up their own scoring, routing, or approval rules. Your app has to run that logic on every request, inside the process, without giving it the keys to everything else.

That's the job Stof does. The logic arrives as a document: JSON with functions. Your app loads it, hands it the few functions it may call, sets a time and memory limit, and calls it. The document can't reach anything else.

Stof 0.11.4 makes that the same job in all three languages Stof runs in. Rust is where it's built, JavaScript runs it through WebAssembly, and with this release Python is first-class too: a prebuilt wheel for every platform, and the bugs that made Python hosts awkward are fixed.

Running Logic You Didn't Write: Stof's Security Model in 0.11

CJ Cummings
Creator and maintainer of Stof, co-founder & CEO of Limitr

Stof is JSON that runs, and the logic that runs is often logic you didn't write: a rule a model drafted, a customer's settings, a plugin another team shipped. Your app runs it in-process, with no deploy, and has to stay in charge of what it can do.

Stof 0.11 completes the security model that makes that safe to rely on. Start with nothing, limit every call, seal what you trust, confine what you don't, and sign what crosses a wire. This post walks through the whole model, and most of the examples run right here on the page. (Some of this first shipped in 0.10.10; 0.11 completes it.)

Stof 0.10: Safe by Default, Errors You Can Read, and a Language Server

CJ Cummings
Creator and maintainer of Stof, co-founder & CEO of Limitr

Stof 0.10 is out. It's the biggest release since Stof started, and almost all of it serves one goal: making it safe and easy to run logic you didn't write, whether it came from a model, a customer, or another team.

That meant tightening the sandbox, making every error something a person or a model can read and fix, closing off behaviors that quietly produced wrong answers, and giving you better tools to write Stof yourself. This post covers 0.10.0 through 0.10.9, along with stof-cli 0.13 and version 0.3 of the VS Code extension. It was updated on October 20 for 0.10.7 and 0.10.8, and on November 3 for 0.10.9.

The Heap Is Just a Document: How Stof Actually Works

CJ Cummings
Creator and maintainer of Stof, co-founder & CEO of Limitr

Every document on your computer is a pile of bytes. A photo, a spreadsheet, a JSON file: underneath, it's all bytes sitting next to other bytes.

Here's the idea behind Stof. What if some of those bytes were instructions? Small pieces that say "add one to that number over there" or "join those two words into a name." Not code stored somewhere else that reads the document, but instructions inside the document, right next to the data they're allowed to change.

That's a Stof document: data, and the instructions for changing it, in the same pile of bytes. JSON that runs.

The Part of Your App You Can Hand to Something You Don't Trust

CJ Cummings
Creator and maintainer of Stof, co-founder & CEO of Limitr

Sometime in the last year, "the agent will just edit the file" stopped being hypothetical and became a normal workflow. Point an agent at a config, a document, or a blob of state, and it reads, edits, and writes it back, with no UI in between.

That's useful. It's also a trust problem most formats were never built to handle.

How to Safely Give AI Agents New Tools at Runtime

CJ Cummings
Creator and maintainer of Stof, co-founder & CEO of Limitr

Most systems treat "let an agent gain new tools while it runs" and "stop an agent from doing damage" as two problems with two solutions: a tool registry plus an approval workflow, or a plugin marketplace plus a permission system bolted on afterward.

In Stof, they're the same mechanism. A tool is a function in a document, and a document can only reach what your app has handed it. So a tool that arrives at runtime is limited the same way everything else in the document already is. Not because a permission check ran, but because there's nothing else there to reach.

The Problem With JSON Schema (And What We Did Differently)

CJ Cummings
Creator and maintainer of Stof, co-founder & CEO of Limitr

JSON Schema's real limitation isn't its syntax. It's that a schema is always a second document describing a first one, and nothing keeps the two in agreement. Add a field to your data, forget the schema, and nothing tells you.

Stof takes a different approach: #[schema(...)] puts the rule on the field it protects, in the same document. There's no second file to fall out of sync.

What Is a Data Runtime?

CJ Cummings
Creator and maintainer of Stof, co-founder & CEO of Limitr

A data runtime runs data directly, the way a JavaScript runtime runs JavaScript. Its documents carry their own logic, so instead of a program loading some inert data and deciding what to do with it, the document has fields, types, and functions together, and the runtime runs them, sandboxed, the same on every platform.

Stof is a data runtime. The short version: JSON that runs.