Teams

One shared record. Private until you share.

A datahub is one Postgres database that you run, holding the record for every machine you use or every person on your team. Everyone's agents capture into it and recall from it. Every row has an owner, and nobody else sees it until that owner shares it.

People, listed once

The datahub's users file names each person. A person is identified by a bearer token; the file holds only the SHA-256 digest of each token, never a token itself. Every captured row records its owner.

the file gateway.users_file points to
{
  "ownerUserId": "maya",
  "users": {
    "maya": { "tokens": ["<sha256 hex>"], "admin": true },
    "theo": { "tokens": ["<sha256 hex>"] },
    "priya": { "tokens": ["<sha256 hex>"] }
  },
  "spaces": {
    "fleet": { "kind": "team", "name": "Fleet", "members": ["maya", "theo", "priya"] }
  }
}

Without a spaces section, the node creates one default household space containing every listed user.

Spaces: share with the right people

  • Household

    Everyone at home: shared projects and shared infrastructure, without reading each other's sessions by default.

  • Team

    The people on a project. A topic shared to the team gives every member's agents the same decisions and wiki.

  • Compartment

    A narrower circle inside a team: one client, one incident, anything only some people should see.

Who sees a session

A session's visibility is decided in this order, and only its owner can change it:

  1. its own visibility setting, private or a space;
  2. otherwise its topic's visibility, so sharing a topic shares the work filed under it;
  3. otherwise its owner's default, for sessions started after they chose one;
  4. otherwise private.

Summaries and wiki notes follow their session. Each person and each space has its own wiki scope, so a private session's notes never reach a shared page.

Enforced by the database, not the interface

Row-level security
On Postgres every owned table is under forced row-level security, so even the role that owns the tables is filtered. Each connection carries the person it acts for.
Person logins
Give someone their own Postgres role, pinned to them in the store. Whatever that login sets, it reads only its own rows and its spaces', and writes only its own.
Workers
The memory workers run under a separate maintenance role, and the job queue is out of a person login's reach, so nobody can have the workers rewrite another person's rows.
TLS off loopback
The gateway refuses to start on a network address without TLS, and refuses a token it does not know.

A standalone node is for one person. SQLite stores visibility settings but does not filter reads by them. Use Postgres when more than one person is involved.

Capturing from another machine

A laptop does not need its own node or a database password. Point its capture hook at the datahub's gateway, over HTTPS, with that person's token. The gateway files each batch under the person the token belongs to.

~/.rivethub/config.yaml on the laptop
memory:
  capture:
    gateway:
      url: https://memory.example:5174
      ca: ~/.rivethub/ca.crt
      token: ${RIVETHUB_CAPTURE_TOKEN}

ca is the certificate the laptop trusts for that gateway, and nothing else is trusted.

Started on your own? Bring it with you.

Moving from a standalone SQLite node (or handing chosen sessions to someone on another RivetHub): rh memory bundle packages the sessions, rh memory sanitize scrubs secrets and reports every change before the bundle leaves your machine, and rh memory ingest-bundle imports it into the datahub.

Already running a separate Postgres store? Fold it into the datahub in one transaction. Its rows arrive private to their owner, and a rerun adds only what the source has gained since.

on the datahub; drop --dry-run when the plan looks right
$ rh memory merge-store --from postgres://…/theo-old --owner theo --dry-run

Start with one machine.

Get a standalone node capturing first. Moving to a datahub later keeps everything you have.