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 resolve database environment when a native lakebase or database plugin is registered. Implicit cache-schema grants remain gated on lakebase; database owns its own pool and does not broaden grants. Set the mode 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.