fix(state): preserve doctor import TTL

This commit is contained in:
Benjamin Badejo
2026-07-23 03:42:28 +03:00
committed by Josh Avant
parent d25e89d1ee
commit 505d7b9f52
5 changed files with 53 additions and 5 deletions
+2 -2
View File
@@ -59,10 +59,10 @@ export type PluginDoctorStateMigrationDetection = {
export type PluginDoctorStateMigrationContext = {
openPluginStateKeyedStore: <T>(options: OpenKeyedStoreOptions) => PluginStateKeyedStore<T>;
/** Doctor-only batch import preserving source age for retention ordering. */
/** Doctor-only batch import preserving source age and remaining retention. */
importPluginStateEntries?: (
options: OpenKeyedStoreOptions,
entries: readonly { key: string; value: unknown; createdAt: number }[],
entries: readonly { key: string; value: unknown; createdAt: number; ttlMs?: number }[],
) => void;
/** Plugin-wide live-row capacity for import preflight. Older test hosts may omit it. */
getPluginStateCapacity?: () => { liveEntries: number; maxEntries: number };