import { ThreadStateStorage } from '@mastra/core/storage'; import type { PruneOptions, PruneResult, RetentionTablesDescriptor, TableRetentionPolicy } from '@mastra/core/storage'; import type { PgDomainConfig } from '../../db/index.js'; /** * PostgreSQL implementation of {@link ThreadStateStorage}. * * Stores per-thread, per-type state in `mastra_thread_state`, keyed by the * composite primary key `(threadId, type)`. The `value` column is `jsonb`, so * payloads (the task list for `type = 'task'`, the goal objective for * `type = 'goal'`) come back already parsed. */ export declare class ThreadStatePG extends ThreadStateStorage { #private; static readonly MANAGED_TABLES: readonly ["mastra_thread_state"]; /** * `thread_state` grows as a side effect of thread activity (one row per * thread per state type). It anchors on `updatedAtZ` (last activity), so * state for a thread that is still being written to is not pruned by * creation age. */ static readonly retentionTables: RetentionTablesDescriptor; constructor(config: PgDomainConfig); static getExportDDL(schemaName?: string): string[]; init(): Promise; /** Delete thread state older than the `threadState` policy's `maxAge`, batched. */ prune(policies: Record, options?: PruneOptions): Promise; dangerouslyClearAll(): Promise; getState({ threadId, type }: { threadId: string; type: string; }): Promise; setState({ threadId, type, value }: { threadId: string; type: string; value: T; }): Promise; deleteState({ threadId, type }: { threadId: string; type: string; }): Promise; } //# sourceMappingURL=index.d.ts.map