import { a as GQPPlugin, m as GQPField, P as PluginContext } from '../../types-CqJN-Ev5.mjs'; /** * Temporal Reasoning Plugin for GQP * Enables natural language date parsing */ /** * Temporal plugin configuration */ interface TemporalPluginConfig { /** Timezone for date parsing */ timezone?: string; /** Custom date patterns */ patterns?: Record; /** Relative date anchors */ anchors?: Record; } /** * Temporal Reasoning Plugin * * Parses natural language date expressions into date ranges. * * @example * ```typescript * import { GQP } from '@mzhub/gqp'; * import { TemporalPlugin } from '@mzhub/gqp/temporal'; * * const graph = new GQP({ * sources: { db: fromPrisma(prisma) }, * plugins: [ * new TemporalPlugin({ * timezone: 'America/New_York', * patterns: { * 'Q1': { start: '01-01', end: '03-31' }, * 'Q2': { start: '04-01', end: '06-30' } * } * }) * ] * }); * * // Query with natural language date * await graph.handleToolCall({ * action: 'query', * node: 'Order', * filters: { createdAt: 'last week' } * }); * ``` */ declare class TemporalPlugin implements GQPPlugin { name: string; private config; private chronoParser; constructor(config?: TemporalPluginConfig); /** * Initialize plugin - try to load chrono-node */ onInit(): Promise; /** * Translate filter values for DateTime fields */ translateFilter(field: GQPField, value: unknown, _context: PluginContext): unknown | null; /** * Match custom patterns (Q1, Q2, fiscal year, etc.) */ private matchCustomPattern; /** * Parse with chrono-node */ private parseWithChrono; /** * Built-in natural language date parser */ private parseBuiltIn; /** * Get start of day */ private startOfDay; /** * Get end of day */ private endOfDay; } /** * Factory function */ declare function createTemporalPlugin(config?: TemporalPluginConfig): TemporalPlugin; export { TemporalPlugin, type TemporalPluginConfig, createTemporalPlugin };