runtime.runProject() creates the authoritative run consumed by snapshots, Constraints, and rendering.
Signature
TypeScript
runtime.runProject(
documentValue,
changesSource?,
generatorSource?,
options?
): WorkSpecRunParameters
| Parameter | Type | Required | Default | Purpose |
|---|---|---|---|---|
documentValue |
unknown |
Yes | None | Starting State document |
changesSource |
string |
No | "" |
Changes source text |
generatorSource |
string |
No | "" |
Generator source text |
options.seed |
number |
No | 1 |
Generator seed |
options.until |
number |
No | Natural end | Requested horizon in minutes |
options.maxEvents |
number |
No | 10000 |
Work-unit budget |
JavaScript
const { runtime } = require("workspec");
const run = runtime.runProject(startingState, changesSource, generatorSource, {
seed: 17,
until: 600,
maxEvents: 20000
});
console.log(run.resolvedThrough);The return value contains Problems, history, resolved boundaries, seed, budget accounting, and runtime state.
The call executes trusted source in-process. See trusted code and execution security.
The execution model owns event ordering and language behavior. This page owns only the embedding contract.