/** * #97 R11 收编:两个既有 session-keyed registry({@link import("./per-task-image.js").PerTaskImageRegistry} * 与 {@link import("./capabilities/select-environment-tool.js").SessionEnvironmentSelection})共享的同一形 * (delete-then-set + 容量闩逐最老 + get 吞 undefined)收编到一处——基准实现逐字取自 * `PerTaskImageRegistry`(唯一行为变化:泛型化 value 类型)。两消费类改为持有本类的组合薄壳,自己的 * 构造器/方法签名不变。 */ /** * KEYED BY sessionId, NON-removing `get`, bounded by oldest-first eviction on overflow. * * `set` re-inserts at the tail (Map iteration order = insertion order) via delete-then-set, so a re-set * of an EXISTING key becomes the newest entry — the eviction below always removes the map's current * first key, so a key that was just re-set is the LAST to be evicted, not the first. */ export declare class BoundedSessionMap { private readonly maxEntries; private readonly map; constructor(maxEntries?: number); /** A re-set (same key) overwrites and moves the entry to the newest position; on overflow the oldest * insertion is evicted. */ set(sessionId: string, value: V): void; /** `undefined` sessionId or an unregistered session both → `undefined` (non-removing read). */ get(sessionId: string | undefined): V | undefined; /** [ref]:显式逐出(会话删除级联要它 —— 会话没了,它的进程内缓存条目也必须跟着没)。 * 返回是否真删掉了一条(幂等:未登记的 session 返回 false)。 */ delete(sessionId: string): boolean; } //# sourceMappingURL=bounded-session-map.d.ts.map