import { InterruptStore, RedisClientLike } from "../contracts/interrupt-store.contract.mjs"; //#region ../ai/src/human/stores/redis.d.ts /** * Options for the Redis {@link InterruptStore}. * * Two mutually-supportive ways to supply the connection: * - **`client`** — pass an already-connected `redis` client (anything * satisfying {@link RedisClientLike}). The store only calls * `get` / `set` / `del` and never connects or quits it. * - **`url`** — let the store lazily `import("redis")`, build a client * from the url, and connect it. `@warlock.js/ai` takes **no** hard * dependency on `redis` (it is an optional peer); when it is absent the * store throws a curated install string at first use, never a raw * module-resolution stack trace at import. * * Exactly one of the two must be present. */ interface RedisInterruptOptions { /** An already-connected `redis` client — anything matching {@link RedisClientLike}. */ client?: RedisClientLike; /** Connection url the store passes to a lazily-imported `createClient`. */ url?: string; /** * Key prefix prepended to every key this store writes. Lets one Redis * database back multiple stores without collision. Defaults to * `warlock:ai-human:interrupt:`. */ prefix?: string; } /** * Create a Redis-backed {@link InterruptStore}. Either pass a connected * `redis` client (`{ client }`) — `@warlock.js/ai` never imports * `redis` in that case — or a `{ url }` and let the store lazily * `import("redis")`, build, and connect a client. When `redis` is not * installed, the curated install string surfaces on first use, never at * import. {@link InterruptStore.schema} returns an empty string; Redis * needs no migration. * * @example * import { createClient } from "redis"; * import { ai } from "@warlock.js/ai"; * * const client = createClient({ url: process.env.REDIS_URL }); * await client.connect(); * * const store = ai.human.interrupt.redis({ client }); * * @example * // Let the store build + connect its own client from a url: * const store = ai.human.interrupt.redis({ url: process.env.REDIS_URL }); */ declare function redis(options: RedisInterruptOptions): InterruptStore; //#endregion export { RedisInterruptOptions, redis }; //# sourceMappingURL=redis.d.mts.map