Releases.
What changed in each version of Trestle, newest first.
No version has been published yet. Trestle is not on npm, and nothing below promises what the first version holds or when it comes.
Unreleased
What is built so far, ahead of the first version.
Writing a process
- Write a process as a plain async TypeScript function. Each step is saved as it happens, so a run picks up where it was after a crash.
- Steps retry under a policy and a time limit you declare. A step whose outcome is unknown can run again, or wait for a person to settle it.
- Run branches side by side, race them, or take the first to finish. The others are stopped, and can undo what they did.
- Loop over items with a limit on how many run at once, poll until something is ready, and set deadlines on a run or a part of it.
- Call another process as a run of its own, start work in the background without waiting for it, and handle a run’s failure in code.
- Send messages into running processes, matched to what each is waiting for. Feed runs from a queue, with recipes for SQS, Kafka and NATS, or start them on a schedule.
- Hand a wait to a person or a team, notify them, and see which tasks are late. A person or an AI agent can choose between the options a process offers.
- Hand a step to an outside program to carry out and answer, and cap how many run at once or in a period.
- Declare the value a process ends with by a schema, and get it back typed. A validation error never quotes the value it refused.
- Write processes with Effect or RxJS, as well as with plain async code.
- Declare business rules, such as “never pay before approval”, over the actions your process declares. They are checked against the diagram, and enforced while runs run.
- Pause work with named locks, on a step, a process or the whole deployment, and resume it with the reason recorded.
- Hand steps the clients and databases your host provides. A credential handed over this way reaches only the steps that declare the work it is for.
- Deploy new code safely: declare what you renamed, and running cases move to the new code or wait for code that explains them.
- Retry, restart from a step, cancel or supply a result, one case at a time or over a selection you preview first.
- Find cases by label, filter, sort and count them, read a case as it stood earlier, and delete finished ones after a retention period.
The diagram
- Each process is drawn from its code as a diagram of the paths it declares, with a warning wherever the drawing finds a condition the diagram cannot show.
- The diagram is laid out the same way every time, on any runtime, with no browser needed.
Storage and workers
- Keep runs in memory, or in a SQLite file through Node’s built-in driver. A run kept in SQLite survives its process being killed outright, and a fresh process carries it on from the file.
- Several workers share one store. When one stops, another takes up the runs it can run, under each run’s recovery rules: a step interrupted mid-attempt runs again, or waits for a person where its policy says so.
Server, client and agents
- Serve your processes over an HTTP API, as a standard
fetchhandler, with API keys, access by process, an audit log and an OpenAPI description. - A typed client starts, reads, follows, answers and messages runs, its types generated from your processes.
- AI agents get tools to read and operate runs, over standard input and output or from the server. They only read unless you allow changes.
Command line
trestle serveandtrestle workerrun a project. Other commands start, read and answer runs, list what is waiting, and move cases.trestle deploy-checkpreviews what a deploy would do to running cases. Other commands print a diagram as text, JSON or Mermaid, and create API keys.
Testing
- Test a process on an engine of its own, with a clock you move by hand, stand-in results for its steps, and every guarantee checked after each step.