@dxos/echo
    Preparing search index...

    Type Alias Spec

    Spec:
        | { kind: "group"; properties: readonly [string, ...string[]] }
        | { kind: "max"; property: string }
        | { kind: "min"; property: string }
        | { kind: "items"; limit?: number; order?: readonly QueryAST.Order[] }
        | { kind: "count" }
        | { kind: "type" }
        | { field: "createdAt" | "updatedAt"; kind: "timestamp"; unit: TimeUnit }
        | { kind: "time"; property: string; unit: TimeUnit }
        | { kind: "sum"; property: string }

    The aggregate spec sans name; the name is supplied by the Query.aggregate record key. A tagged union per kind so property/limit/order are present exactly when the kind uses them (no unused optional fields to guard against at read sites).