Interface: GuardedFetchOptions
Defined in: packages/agentos/src/cognition/memory/io/ingestion/guardedFetch.ts:70
What the caller allows a guardedFetch.
Properties
accept?
optionalaccept: readonlystring[]
Defined in: packages/agentos/src/cognition/memory/io/ingestion/guardedFetch.ts:82
Media types read, without parameters, in lower case. An answer with no
Content-Type counts as application/octet-stream.
Default
['text/html', 'application/xhtml+xml', 'application/pdf', 'text/plain']
allowAddresses?
optionalallowAddresses: readonlystring[]
Defined in: packages/agentos/src/cognition/memory/io/ingestion/guardedFetch.ts:92
Addresses reachable though not public, for a test's own server. Never set it in production.
allowPorts?
optionalallowPorts: readonlynumber[]
Defined in: packages/agentos/src/cognition/memory/io/ingestion/guardedFetch.ts:84
Ports read.
Default
[80, 443]
deadlineMs
deadlineMs:
number
Defined in: packages/agentos/src/cognition/memory/io/ingestion/guardedFetch.ts:74
How long the whole read may take in milliseconds: the lookups, every redirect and the body.
maxBytes
maxBytes:
number
Defined in: packages/agentos/src/cognition/memory/io/ingestion/guardedFetch.ts:72
The most bytes the body may hold, counted as they arrive and again after a gzip, deflate or br coding is decoded.
maxRedirects?
optionalmaxRedirects:number
Defined in: packages/agentos/src/cognition/memory/io/ingestion/guardedFetch.ts:76
The most redirects followed, each checked as the first address is.
Default
3
resolve()?
optionalresolve: (host) =>Promise<object[]>
Defined in: packages/agentos/src/cognition/memory/io/ingestion/guardedFetch.ts:90
Answers a host's addresses; a test passes a stand-in.
Parameters
host
string
Returns
Promise<object[]>
Default
dns.lookup with every address
signal?
optionalsignal:AbortSignal
Defined in: packages/agentos/src/cognition/memory/io/ingestion/guardedFetch.ts:88
Ends the read early; the fetch then rejects with the signal's reason.
userAgent?
optionaluserAgent:string
Defined in: packages/agentos/src/cognition/memory/io/ingestion/guardedFetch.ts:86
The User-Agent header; none is sent when absent.