Skip to main content

Interface: IThread

Defined in: internal/thread-store/types.ts:510

A conversation. Turns are stored separately (see ITurn in chapter 1).

Properties​

createdAt​

createdAt: Date

Defined in: internal/thread-store/types.ts:528

When the thread was created; the order of listThreads.


deletedAt​

deletedAt: Date | null

Defined in: internal/thread-store/types.ts:532

Set by a host repository that soft-deletes; the gateway reads such a thread as gone and never sets it itself (D119 deletes hard).


id​

id: string

Defined in: internal/thread-store/types.ts:512

The gateway's id of the thread (a UUID); what a call names in threadId.


lease​

lease: IThreadLease | null

Defined in: internal/thread-store/types.ts:526

The call that runs on the thread now; null when none (D77).


status​

status: EThreadStatus

Defined in: internal/thread-store/types.ts:520

OPEN, AWAITING_HUMAN while a run is paused, CLOSED after a pseudonymisation.


tenantId​

tenantId: string

Defined in: internal/thread-store/types.ts:514

The tenant the thread belongs to; every read is scoped to it.


title​

title: string

Defined in: internal/thread-store/types.ts:518

The user's title for the list; empty until AIGateway.renameThread sets it.


turnCount​

turnCount: number

Defined in: internal/thread-store/types.ts:524

How many turns the thread holds; bumped by appendTurn, read by the run memory (D36) and the fact extraction.


updatedAt​

updatedAt: Date

Defined in: internal/thread-store/types.ts:530

The last turn appended or the last title/status change; a memory write does not move it.


userId​

userId: string

Defined in: internal/thread-store/types.ts:516

The user the thread belongs to (D32); a pseudonym after anonymizeByUser (D54).


workingMemory​

workingMemory: IWorkingMemoryState

Defined in: internal/thread-store/types.ts:522

Written by WorkingMemory only.