UNPKG

@sema-agent/core

Version:

Stateless, task-oriented AI agent core

24 lines (23 loc) • 1.01 kB
/** Each store's compaction threshold when none is given. */ export declare const LEDGER_COMPACT_EVERY_DEFAULTS: Readonly<{ FileCheckpointStore: 1000; FileMailboxStore: 500; FileBackgroundAgentStore: 1000; FileWorkflowRunStore: 1000; }>; /** A store that takes ledger tuning. */ export type LedgerTunedStore = keyof typeof LEDGER_COMPACT_EVERY_DEFAULTS; /** A store's ledger tuning, read: every member present. */ export interface LedgerTuning { readonly fsync: boolean; readonly compactEvery: number; } /** * Read a store's ledger tuning off an options record already received (the store door's copy, or a backend's nested record's): * the values judged, the absent ones the store's defaults. `subject` names the record in a refusal (`FileMailboxStore options`, * `FileStorageBackendOptions.checkpoint`). */ export declare function readLedgerTuning(given: { readonly fsync?: unknown; readonly compactEvery?: unknown; }, store: LedgerTunedStore, subject: string): LedgerTuning;