Skip to main content

Interface: IRun

Defined in: internal/run-store/types.ts:298

The persisted state of one agent run.

Properties​

answer?​

optional answer?: IStoredAnswer

Defined in: internal/run-store/types.ts:351

The checked answer of a run paused for review (D99); present while the pause is a RESULT_REVIEW.

What the settlement had in hand when the run paused, so the decision can finish it as a run that never paused.

Cleared when the run leaves the review. The reviewer's copy is the envelope's result.


chunkIds​

chunkIds: string[]

Defined in: internal/run-store/types.ts:334

The knowledge-base chunks in the request (D36): the citations and the trace annotation of the resumed answer.


createdAt​

createdAt: Date

Defined in: internal/run-store/types.ts:355

When the run was first stored.


id​

id: string

Defined in: internal/run-store/types.ts:300

The run's id (IPausedResponse.runId); kept across the pauses of one run.


messages​

messages: IMessage[]

Defined in: internal/run-store/types.ts:338

LLMClient messages so far, including pending tool calls; their files without bytes, loaded again on resume (D108).


pending?​

optional pending?: TPauseEnvelope[]

Defined in: internal/run-store/types.ts:343

The envelopes of the pause, present while status is PAUSED: one per tool call of the step that waits for a human (D102), or the one RESULT_REVIEW envelope (D99). Never empty while paused.


profileId​

profileId: string

Defined in: internal/run-store/types.ts:308

The profile the run started on; a resume may switch it (D65), the run is saved with the new one.


request​

request: Omit<IModelRequest, "messages" | "outputSchema">

Defined in: internal/run-store/types.ts:315

The request as built for step 1 (system, modelId, caps); messages live separately below. No outputSchema: a zod schema is code, not data, so resume takes it again from its caller (D36).


skills?​

optional skills?: ISkill[]

Defined in: internal/run-store/types.ts:326

The skills the call brought (IGatewayRunInput.skills, D124), present when it brought any.

A skill is data, so the run keeps it: a resume offers it again, next to the skills of the profile it resumes on.

The profile's skills are not stored: they are read from the profile of the resume, as its tools are (D65). Emptied by anonymizeByUser.


startTurnCount​

startTurnCount: number

Defined in: internal/run-store/types.ts:332

The thread's turn count before the run's question was stored (D36).

The memory of a resumed run is extracted from the whole run, not from the resumed part.


status​

status: ERunStatus

Defined in: internal/run-store/types.ts:310

Where the run is in its lifecycle (ERunStatus).


steps​

steps: number

Defined in: internal/run-store/types.ts:353

Model calls done so far; the profile's maxStepsPerRun caps it.


templateVersion​

templateVersion: number

Defined in: internal/run-store/types.ts:336

The version of CHAT_MAIN the request was rendered from (D36): the trace annotation of the resumed steps.


tenantId​

tenantId: string

Defined in: internal/run-store/types.ts:302

The owner; every read is filtered by it.


threadId​

threadId: string

Defined in: internal/run-store/types.ts:304

The thread the run answers on; one thread has at most one open run.


toolNames​

toolNames: string[]

Defined in: internal/run-store/types.ts:317

Tool names resolved for this run; re-fetched from ToolRegistry on resume. dyna_aigw_load_skill among them is rebuilt from skills.


updatedAt​

updatedAt: Date

Defined in: internal/run-store/types.ts:357

When the run was last saved or changed status.


userId​

userId: string

Defined in: internal/run-store/types.ts:306

The user who asked; the pseudonym after anonymizeByUser.