Start
Use the engine
Call createGozWire from @gozwire/core. Identities, conversations, send, mentions, aliases, blocks, and start.
@gozwire/core is the only npm package required to use the engine. The demo and moderation sidecar are repository applications.
import { createGozWire, defaultConfig } from "@gozwire/core";
const gozwire = await createGozWire({ config: defaultConfig() });
await gozwire.start();
await gozwire.identities.upsert({ id: "user-a", displayName: "Ada" });
await gozwire.identities.upsert({ id: "user-b", displayName: "Bob" });
const conversation = await gozwire.conversations.createDirect({
creatorId: "user-a",
userIds: ["user-a", "user-b"],
});
await gozwire.messages.send({
conversationId: conversation.id,
senderId: "user-a",
clientMessageId: crypto.randomUUID(),
type: "text",
body: "Hello",
metadata: { mentions: ["user-b"] },
});
start() runs migrations (including 003_push.sql, 008_identity_aliases.sql, and 009_user_blocks.sql) and workers. stop() drains workers, including the push adapter so APNs HTTP/2 sessions close.
push.enabled defaults to false. push.policy.mentionOverridesMute defaults to false. Text moderation defaults to the lenient preset.
What you call
Typical surfaces on the engine object:
identities: upsert referenced users, profile-picture upload,aliases,blocksconversations:createDirect,createGroup,createChannel,createForum, list, get, participants,membersForMention, retention policymessages: send, history, thread, sync, edit, delete, receiptsreactions: add, remove, listmedia: create upload sessions and download URLsmoderation: list, get, preview, resolve (when enabled)configuration: public moderation DTO, presets, receipts, suggested reactionspush: installations, preferences, mutes (when you opt in)health/metrics/config
Authorization is against participant records and block pairs. Rate limits are engine primitives (per user, per conversation, per window, plus alias, block, mention lookup, and push register and heartbeat). They are not pricing tiers.
Hosting
Your process loads config from the environment, constructs the engine, and maps HTTP or RPC however you like. The demo uses Express only as a sample host. You can call the engine from any Node.js 20+ process.
For a UI walkthrough of the same APIs, run the local demo.