WOLBΛRG

Wolbarg

Lifecycle methods for the Wolbarg class — constructor, ready, close, and init shim.

Constructor

new Wolbarg(options)  // preferred
new Wolbarg()         // then init() for v0.1 compat

When llm is present, the instance type allows compress. Without it, calling compress is a compile-time error.

ready()

await ctx.ready();

Opens storage and probes embedding dimensions. Called automatically by other methods; use explicitly to fail fast at startup.

close()

await ctx.close();

Idempotent. Releases the database connection.

init() shim

const ctx = new Wolbarg();
await ctx.init({
  organization: "my-org",
  database: { provider: "sqlite", connectionString: "./memory.db" },
  embedding: { baseUrl, apiKey, model },
  llm: { baseUrl, apiKey, model }, // optional in v0.2
});

Prefer constructor options. See init() Compatibility.