/** * Projection Engine for Jules Query Language * * Supports: * - Dot notation field paths: "plan.steps.title" * - Wildcard inclusion: "*" * - Exclusion prefix: "-artifacts.data" * - Implicit array traversal: "artifacts.type" works on arrays */ /** * Parsed select expression */ export interface SelectExpression { path: string[]; exclude: boolean; wildcard: boolean; } /** * Parse a select expression string into structured form * * Examples: * - "id" → { path: ["id"], exclude: false, wildcard: false } * - "plan.steps.title" → { path: ["plan", "steps", "title"], exclude: false, wildcard: false } * - "-artifacts.data" → { path: ["artifacts", "data"], exclude: true, wildcard: false } * - "*" → { path: [], exclude: false, wildcard: true } */ export declare function parseSelectExpression(expr: string): SelectExpression; /** * Get a value at a nested path, handling arrays transparently * * For paths that traverse arrays, returns an array of values from each element. * * Examples: * - getPath({a: {b: 1}}, ["a", "b"]) → 1 * - getPath({items: [{x: 1}, {x: 2}]}, ["items", "x"]) → [1, 2] */ export declare function getPath(obj: unknown, path: string[]): unknown; /** * Set a value at a nested path, creating intermediate objects as needed * * For array paths, preserves array structure. */ export declare function setPath(obj: Record, path: string[], value: unknown): void; /** * Delete a value at a nested path * * For paths ending in array elements, removes the field from each element. */ export declare function deletePath(obj: unknown, path: string[]): void; /** * Deep clone an object */ export declare function deepClone(obj: T): T; /** * Project a document according to select expressions * * @param doc The source document * @param selects Array of select expression strings * @returns Projected document with only selected fields */ export declare function projectDocument(doc: Record, selects: string[]): Record; /** * Check if a path is a prefix of another path */ export declare function isPathPrefix(prefix: string[], path: string[]): boolean;