@cybernetyx1/atlasflow-postgres
v0.1.8
Published
PostgreSQL persistence adapter for AtlasFlow sessions, runs, journals, and streams.
Readme
@cybernetyx1/atlasflow-postgres
PostgreSQL persistence adapter for AtlasFlow sessions, runs, and durable streams — durable state that survives restarts.
Install
npm install @cybernetyx1/atlasflow-postgresPart of the AtlasFlow monorepo. Proprietary.
Usage
postgres(connectionString, options) connects via the postgres driver and returns a persistence adapter. Call migrate() once on startup to create the schema, then pass the adapter into the runtime.
import { postgres } from "@cybernetyx1/atlasflow-postgres";
const persistence = postgres(process.env.POSTGRES_URL!);
await persistence.migrate(); // idempotent — creates tables if missing
// pass `persistence` into the generated server / runtime as the durable storeTo use a different client (for example PGlite in tests), build the adapter directly:
import { postgresAdapter } from "@cybernetyx1/atlasflow-postgres";
const persistence = postgresAdapter(mySqlClient);
await persistence.migrate();Exports: postgres, postgresAdapter, and the SqlClient / PostgresPersistence types. The returned adapter also exposes migrate() and close().
License
Proprietary. © 2026 Cybernetyx. See LICENSE.
