import type { ScriptingConfig } from './config.ts'; import type { CommandContext, CommandReply, Engine, RespValue } from '../types.ts'; /** Bridge behind `redis.call`: runs one command and returns its reply or `{ error }`. */ export type LuaCall = (argv: Buffer[]) => CommandReply | undefined; /** Runs or only compiles one script in a fresh Lua state. `call` is null only when compiling. */ export type ScriptRunner = (source: Buffer, keys: Buffer[], args: Buffer[], call: LuaCall | null, compileOnly: boolean, onCompiled?: () => void) => RespValue; export declare function createScriptingPlugin(run: ScriptRunner, config: Readonly): { attach(instance: object): void; execute(command: string, engine: Engine, args: Buffer[], context: CommandContext): CommandReply; close(): void; }; export type ScriptingPlugin = ReturnType;