Skip to content

Type Alias: AutoConfigureMode

AutoConfigureMode = "env" | "provision"

What auto-configuration does before AppKit boots.

  • "provision": resolve the Lakebase connection into process.env, then grant the AppKit cache schema to the connecting role.
  • "env": resolve the Lakebase connection into process.env only.

Omit it to get "provision" gated on a lakebase plugin being registered; set it explicitly to run regardless of the plugin list, or pass false to skip auto-configuration entirely.

Set it EXPLICITLY on an app that has no lakebase() plugin but still wants AppKit’s PERSISTENT cache. AppKit picks Lakebase for CacheManager only when createLakebasePool() can build a pool, and that reads LAKEBASE_ENDPOINT / PGHOST / PGDATABASE straight from process.env - so without this step the cache silently falls back to in-memory, and anything it holds (a session signing key, a one-time code) is lost on restart. "env" is the right mode there: the app SP cannot grant on the cache schema anyway.