CatalogOptions
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/providers/modelCatalog.ts:124
Options shared by catalog reads; every field is injectable for hermetic tests.
Properties
Section titled “Properties”cacheDir?
Section titled “cacheDir?”
optionalcacheDir?:string
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/providers/modelCatalog.ts:128
Override the cache directory (defaults to ~/.gsloth/model-catalog).
cacheOnly?
Section titled “cacheOnly?”
optionalcacheOnly?:boolean
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/providers/modelCatalog.ts:148
EXT-161 — read the cache and never reach the network, returning the cached slice whether
it is fresh or stale, and null when there is none.
For callers on a latency-critical path that would rather have no answer than a slow one. The
context guard runs before the first model call of a session, and api.json is a few MB behind
a 10 s timeout: a cold cache would put that delay in front of the user’s first turn, to decide
a threshold that has a perfectly good fallback (the model profile) and whose absence costs only
that one session’s preventive compaction. The cache is filled by gth init and
gth models --refresh, which are explicit and can afford to wait.
Ignored when refresh is set — an explicit refresh is a request to go to the network.
fetchImpl?
Section titled “fetchImpl?”
optionalfetchImpl?: {(input,init?):Promise<Response>; (input,init?):Promise<Response>; }
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/providers/modelCatalog.ts:132
Override the fetch implementation (defaults to the global fetch).
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”URL | RequestInfo
RequestInit
Returns
Section titled “Returns”Promise<Response>
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”string | URL | Request
RequestInit
Returns
Section titled “Returns”Promise<Response>
optionalnow?:number
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/providers/modelCatalog.ts:130
Override “now” for TTL math (defaults to Date.now()).
refresh?
Section titled “refresh?”
optionalrefresh?:boolean
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/providers/modelCatalog.ts:126
Force a network refresh even when a fresh cache exists (backs gth models --refresh).
ttlMs?
Section titled “ttlMs?”
optionalttlMs?:number
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/providers/modelCatalog.ts:134
Override the TTL window in ms (defaults to CATALOG_TTL_MS).