export type CompiledPattern = { regExp: RegExp; patternVariables: string[]; }; export declare class OpenAiSqliteBucketPatternHelper { /** * Compile a pattern like: * "tracker_bucket/{userId}/{skillId}/{sessionId}" * * Into: * - a RegExp for matching * - a list of keys to extract */ static compilePatternDef(patternDef: string): CompiledPattern; /** * Extract structured data from a bucketId using a compiled pattern. * * Example: * extract("tracker_bucket/A/B/C", compiledPattern) * → { userId: "A", skillId: "B", sessionId: "C" } */ static extract(bucketId: string, compiledPattern: CompiledPattern): Record | null; /** * Convert bucketIds into glob strings by replacing specified pattern variables with '*'. * * Example: * bucketIds: "ns/userA/skillX/s1", "ns/userA/skillY/s2" * patternDef: "{namespace}/{userId}/{skillId}/{sessionId}" * patternVariables: "namespace", "userId" * result: "ns/userA/star/star" */ static toGlobs(bucketIds: string[], compiledPattern: CompiledPattern, patternVariables: string[]): string[]; /** * Get the segment indices that correspond to pattern variables. */ private static getVariableSegmentIndices; }