Skip to content

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:

  1. create the app runtime definition with createManifesto(schema, effects)
  2. add history with withLineage(...)
  3. add approval with withGovernance(...)
  4. call activate()
  5. 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 ​

  1. Activate the decorated runtime.
  2. Submit a typed action with governed.action.<name>.submit(...).
  3. Observe the returned pending proposal.
  4. Observe the pending proposal, then wait for auto-approved or human-resolved settlement.
  5. Read durable history through Lineage queries such as getLatestHead() and restore().

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/lineage
  • createInMemoryGovernanceStore() from @manifesto-ai/governance

The retired facade adapter story was removed. Use package-owned stores until a current Lineage or Governance adapter lands.

See Also ​