Midwess

Worldant exposes a running world through one contract with multiple surfaces.

npm package -> typed app/client calls
MCP server  -> external agent tools and subscriptions
HTTP        -> direct protocol and integration surface

All surfaces call the same daemon and reach the same PgPaw/Postgres truth.

Generated package

The daemon serves generated package metadata from the active snapshot.

GET /__worldant/v1/registry
GET /__worldant/v1/registry.d.ts
GET /__worldant/v1/contract/:etag.tgz
GET /__worldant/v1/npm/:package

Clients install a typed package and call the world as functions:

import { chessBoard, move, previewMove } from "@world/chess";

const preview = await previewMove({ gameId, from: "e2", to: "e4" });
await move({ gameId, from: "e2", to: "e4" }, { key: "move:e2:e4" });

for await (const board of chessBoard({ gameId })) {
  console.log(board);
}

Calls, runs, and subscriptions

The protocol separates fast calls, durable runs, and reactive subscriptions.

POST /__worldant/v1/calls
GET  /__worldant/v1/calls/:callId
GET  /__worldant/v1/calls/:callId/stream

POST /__worldant/v1/runs
GET  /__worldant/v1/runs/:runId
GET  /__worldant/v1/runs/:runId/stream

POST /__worldant/v1/subscriptions
GET  /__worldant/v1/subscriptions/:subId/stream

Agent access

External AI systems do not have to live inside Worldant. They can connect through MCP/HTTP, read schema and generated contracts, call functions, subscribe to reactive streams, and edit files through the host environment.

In-app AI features can use the same package and protocol as the UI.