loveops-world-model
v0.1.0
Published
Canonical event log and world views for conscious dating
Downloads
10
Maintainers
Readme
loveops-world-model
Canonical event log and world views for conscious dating.
Overview
This package defines:
- FactEvent schema and event taxonomy for dating domain
- Pure world view functions (profile, interaction history, emotional load, trust/safety, compatibility)
- Rhizome node launcher with collections, indexes, views, and networking
Installation
Install from npm:
npm install loveops-world-model
# or
pnpm add loveops-world-model
# or
yarn add loveops-world-modelOr use directly with npx:
npx loveops-world-model init-nodeQuick Start
Initialize a node:
npx loveops-world-model init-nodeRun a node:
npx loveops-world-model run-nodeUsage
import {
createLoveopsNode,
UserProfileState,
MatchCompatibilityState,
DatingFactEvent,
DatingEventType,
createDatingEvent,
} from "loveops-world-model";
// Create and start a node
const node = await createLoveopsNode({
dbPath: "./my-loveops.db",
nodeId: "my-node",
});
// Create events
const event = createDatingEvent({
domain: "profile",
type: DatingEventType.PROFILE_CREATED,
source: "user:123",
actorId: "user:123",
payload: { name: "Alice" },
});
// Query views
const profile = await node.queryView("UserProfileStateView", {
userId: "user:123",
});Docker
Build
docker build -t loveops-world-model .Run
docker run -d \
--name loveops-node \
-p 7000:7000 \
-p 8080:8080 \
-v loveops-data:/data \
-e RHIZOME_NODE_ID=my-node \
loveops-world-modelDocker Compose
# Start node
docker-compose up -d
# View logs
docker-compose logs -f
# Stop node
docker-compose down
# Stop and remove volumes
docker-compose down -vThe database is persisted in a Docker volume (loveops-data) mounted at /data.
Architecture
- Events: Immutable fact log (
DatingFactEvent) - Views: Pure functions that derive state from events
- Node: Rhizome instance with collections, indexes, and networking
License
MIT
