@nightowlsdev/storage-local
Adapter/StorageMastraA local LibSQL-backed Mastra snapshot store for the CLI bootstrap runtime, run a swarm on just a model key, before Supabase.
What it does
Exposes `createMastraLibsqlStore({ url, id? })`, which constructs a `@mastra/libsql` `LibSQLStore` for the CLI 'builder' bootstrap runtime, letting you run a Night Owls swarm with only a model key, before the project has Supabase/runners wired. You pass the returned store to `defineSwarm({ mastraStore })` in `@nightowlsdev/core`. This is the engine-wall (Option B) seam: the `@mastra/libsql` import lives here as a peripheral peer so `@nightowlsdev/cli` imports only this factory and stays Mastra-free; the return type is `unknown` so no `@mastra/*` type crosses the public API. `url` is `:memory:` for a single session or an absolute `file:` path for resume/replay across processes (it throws on a relative file: url).
Install
pnpm add @nightowlsdev/storage-localKey exports
- createMastraLibsqlStore
Usage
import { defineSwarm } from "@nightowlsdev/core";
import { createMastraLibsqlStore } from "@nightowlsdev/storage-local";
// :memory: for a single session, or an absolute file: url to resume across processes.
const mastraStore = createMastraLibsqlStore({ url: "file:/abs/path/owl.db" });
const swarm = defineSwarm({ agents, mastraStore });