import type { RedisArgument } from '../../RESP/types';
import type { KeySpec } from '../../commands/generic-transformers';
export type SubCommand = {
    args: Array<RedisArgument>;
    /**
     * 0-based ordinals of this sub-command's key groups in the original
     * command, for order-preserving reply reassembly (e.g. MGET).
     */
    groupIndices: Array<number>;
    /**
     * Absolute indices into `args` of this sub-command's keys (the first arg of
     * each group). Lets the caller build a sub-parser that marks keys, so core
     * `_execute` routes by the sub-command's own `firstKey`.
     */
    keyPositions: Array<number>;
};
/**
 * Splits a multi_shard command's arguments into one sub-command per hash
 * slot, using the command's COMMAND key specification as the reconstruction
 * recipe ("the command must be split even if all the slots are managed by
 * the same shard" — but same-*slot* commands pass through unsplit).
 *
 * Each key group is the key plus its `keyStep - 1` trailing siblings (e.g.
 * MSET's value). A sub-command is prefix + that slot's groups (in original
 * relative order) + suffix; for `keynum` specs the numkeys argument in the
 * prefix is rewritten to the sub-command's group count.
 *
 * Throws on anything it cannot split deterministically — a wrong split of a
 * write command means corrupted data, so refusal beats guessing. All current
 * multi_shard commands (DEL, UNLINK, EXISTS, TOUCH, MGET, MSET) declare
 * exactly one supported spec. MSETEX is curated OUT of multi_shard
 * (command-metadata-overrides.ts): its NX/XX condition is all-or-nothing
 * across all keys and cannot be evaluated per shard — it routes default-keyed
 * like MSETNX, so the keynum branch below currently has no live caller.
 */
export declare function splitMultiShardCommand(args: ReadonlyArray<RedisArgument>, keySpecs: ReadonlyArray<KeySpec> | undefined): Map<number, SubCommand>;
//# sourceMappingURL=multi-shard-splitter.d.ts.map