Skip to main content

6 posts tagged with "data-runtime"

View All Tags

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.

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.

We Deserve Better Than JSON as a DSL

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

It always starts simply. You need a config, and you want to keep it simple this time. What's simpler than JSON? Some keys, some nesting, done.

Six months later the file looks like this:

{
"timeout": "5m",
"memory": "2GB",
"retries": "{{ env.CI ? 5 : 2 }}",
"url": "${PROTOCOL}://${HOST}:${PORT}"
}

Four values, three of which are secretly something else. "5m" is a duration someone has to parse. "2GB" is a size someone has to parse, and whether that's 2000 MB or 2048 MiB depends on which library parses it. The other two are expressions in a template language you invented, which a new hire has to be told about because nothing in the file says so.