Advanced Runtime Assembly
Assemble the optional approval-and-history runtime directly from SDK, Lineage, and Governance.
Only read this after When You Need Approval or History has already told you that the project needs these layers. If you only need direct action submission, stay on @manifesto-ai/sdk and createManifesto().
The Current Path
The current advanced-runtime path is:
- create the app runtime definition with
createManifesto(schema, effects) - add history with
withLineage(...) - add approval with
withGovernance(...) - call
activate() - submit reviewable work with
action.<name>.submit(...)
Minimal Assembly
typescript
import { createManifesto } from "@manifesto-ai/sdk";
import { createInMemoryLineageStore, withLineage } from "@manifesto-ai/lineage";
import { createInMemoryGovernanceStore, withGovernance } from "@manifesto-ai/governance";
const governed = withGovernance(
withLineage(createManifesto(schema, effects), {
store: createInMemoryLineageStore(),
}),
{
governanceStore: createInMemoryGovernanceStore(),
bindings: [
{
actorId: "actor:auto",
authorityId: "authority:auto",
policy: { mode: "auto_approve" },
},
],
execution: {
projectionId: "counter-ui",
deriveActor: () => ({ actorId: "actor:auto", kind: "agent" }),
deriveSource: () => ({ kind: "ui", eventId: crypto.randomUUID() }),
},
},
).activate();Extension Flow
- Activate the decorated runtime.
- Submit a typed action with
governed.action.<name>.submit(...). - Observe the returned pending proposal.
- Observe the pending proposal, then wait for auto-approved or human-resolved settlement.
- Read durable history through Lineage queries such as
getLatestHead()andrestore().
Use getWorldSnapshot(worldId) when you need the stored snapshot for a committed history record. Use restore(worldId) when you need the normalized runtime resume path.
Store Choices
Use the store surfaces from the owning packages directly:
createInMemoryLineageStore()from@manifesto-ai/lineagecreateInMemoryGovernanceStore()from@manifesto-ai/governance
The retired facade adapter story was removed. Use package-owned stores until a current Lineage or Governance adapter lands.