Manifest format
A manifest is the contract between authoring tools and runtimes: plain, versioned JSON describing an app. The TypeScript SDK is one way to write one; another SDK, a code generator, or an AI agent can produce the same JSON.
{
"formatVersion": "0.2",
"app": { "name": "notes" },
"auth": { "roles": [], "apiKeyScopes": [] },
"entities": { "Note": { "key": ["ownerId", "noteId"], "fields": { "...": "..." }, "indexes": {} } },
"counters": {},
"routes": [
{
"id": "post_notes",
"method": "POST",
"path": "/notes",
"auth": { "kind": "signedIn" },
"input": { "params": {}, "query": {}, "body": { "text": { "type": { "kind": "string", "min": 1, "max": 500 } } } },
"errors": {},
"plan": {
"body": [{ "kind": "let", "var": 0, "op": { "op": "insert", "entity": "Note", "values": { "...": "..." } } }],
"output": { "kind": "var", "id": 0 }
}
}
]
}Structure
| Section | Contents |
|---|---|
entities | Keys, fields, indexes, invariants, and options |
counters | Maintained aggregates |
routes | HTTP routes with inputs, auth, errors, options, examples, and a plan |
events, queues, channels, integrations | Async declarations |
handlers | Plans run by triggers: events, entity changes, queues, schedules, and workflow steps |
workflows | Workflow declarations |
auth, cors | App-level settings |
sourceMap | Optional manifest paths to source locations |
A plan has a body of statements and an output expression:
- Statements:
let,ensure,fail,if,forEach,return, response control, and workflow transitions. - Operations: storage, effects, and integration calls.
- Expressions: pure, from a closed set.
Schema and types
The JSON Schema is schema/manifest.schema.json in the repository. TypeScript types are in @aleph-lang/manifest. Both are generated from the Rust types in aleph-core, which are the single source of truth.
Running a manifest
Any host that embeds aleph-core can run a manifest: validate it, then hand requests to the engine, which takes the tenant, a request, a store, and an environment. The WebAssembly build (@aleph-lang/core) runs it in Node, with validate, runExamples, compareManifests, and DevEngine. A conformance suite of golden manifests and request scenarios defines the expected behavior for every implementation.