• Folds an accumulate declaration into the escalation's storage shape: queryable facets in metadata (accumulate_count: 0, accumulate_max, accumulate_keys: []) and the item store plus stored options in envelope (accumulate_items: {}, accumulate_config). Pure and deterministic, so it is safe on the replayed condition() path. Throws synchronously on an invalid declaration so a bad accumulator never reaches a durable write.

    Type Parameters

    • T extends {
          accumulate?: AccumulateConfig;
          batch?: string[];
          envelope?: Record<string, unknown>;
          metadata?: Record<string, unknown>;
          partialOnTimeout?: boolean;
      }

    Parameters

    • config: T

    Returns Omit<T, "accumulate" | "partialOnTimeout">