TimeReader
Interface: TimeReader
Defined in: src/time/reader.ts:66
A strategy that reads a person's words into zone-less PARTS (time design
§ 5.1). Armed with .time({ reader }); there is no default. It runs once
per turn, at the seed, on the message a person wrote, and never again for
that message — a resume and a retry read the recorded reading.
Example
const reader: TimeReader = {
id: 'my-app/english', version: '1.2.0', locale: 'en-US', kind: 'rule',
read: (text) => ({ mentions: tokenize(text) }),
};
Agent.create({ provider, model }).time({ zone: 'UTC', reader }).build();Properties
id
readonlyid:string
Defined in: src/time/reader.ts:68
Recorded on every reading with the version, e.g. 'agentfootprint/english'.
kind
readonlykind:"model"|"rule"
Defined in: src/time/reader.ts:78
'rule': deterministic over the text. 'model': an LLM or other learned
reader. Neither kind's reading is ever the person's words: a rule
reading is offered through the time ask to confirm; a model reading
fills as a reading (derived-from-reading) until the person confirms it.
locale
readonlylocale:string
Defined in: src/time/reader.ts:71
The language it reads, e.g. 'en-US'.
version
readonlyversion:string
Defined in: src/time/reader.ts:69
Methods
read()
read(
text,context):TimeReading|Promise<TimeReading>
Defined in: src/time/reader.ts:79
Parameters
text
string
context
Returns
TimeReading | Promise<TimeReading>
