UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

22 lines • 1.23 kB
import { type IndexConfig } from './config.ts'; import type { IndexCacheStore } from './store.ts'; import type { Clock } from '../../utils/clock.ts'; import type { IdSource } from '../../utils/ids.ts'; /** * The index store a mount runs its driver under. * * A mount builds one when it is placed, from the workspace or mount * `index` config when there is one and from the driver's own `indexTtl` * otherwise. Mirrors Python `cache/index/factory.py`. * * @param config the configured store, or undefined for a RAM store at the driver's TTL * @param ttl the driver's `indexTtl`, read when `config` is undefined * @param clock the clock the store's listings expire on; undefined means the real one * @param workspaceId scopes a redis store whose config names no prefix, so * two workspaces on one server never read each other's listings; undefined * keeps the shared default * @param ids the workspace's id source, which a redis store draws its * generation and lease tokens from; undefined means the system source */ export declare function buildIndex(config: IndexConfig | undefined, ttl: number, clock?: Clock, workspaceId?: string, ids?: IdSource): IndexCacheStore; //# sourceMappingURL=factory.d.ts.map