Skip to main content

Interface: UserSegment

Defined in: packages/core/src/stream-segments/types.ts:188

Extends​

Properties​

agentId?​

optional agentId?: string

Defined in: packages/core/src/stream-segments/types.ts:14

Set in group chat.

Inherited from​

BaseSegment.agentId


agentName?​

optional agentName?: string

Defined in: packages/core/src/stream-segments/types.ts:15

Inherited from​

BaseSegment.agentName


avatarEmoji?​

optional avatarEmoji?: string

Defined in: packages/core/src/stream-segments/types.ts:16

Inherited from​

BaseSegment.avatarEmoji


content​

content: string

Defined in: packages/core/src/stream-segments/types.ts:190


id​

id: string

Defined in: packages/core/src/stream-segments/types.ts:10

Inherited from​

BaseSegment.id


instructions?​

optional instructions?: string

Defined in: packages/core/src/stream-segments/types.ts:198

Instructions the request sent just before this message, as their own user message (the active skills' instructions, outside the cached system prompt). Recorded so a later request rebuilds the conversation as it was sent and its cached prefix still matches. Not the person's words: UIs and transcripts read content.


preloaded?​

optional preloaded?: object[]

Defined in: packages/core/src/stream-segments/types.ts:205

Skills the request pre-loaded as conversation before this message: a synthetic load_skill call per skill answered by Anthropic tool references to its deferred tools (see preloadMessages). Recorded so a later request rebuilds them exactly, and keeps those tools deferred.

skill​

skill: string

toolCallId​

toolCallId: string

tools​

tools: string[]


step?​

optional step?: number

Defined in: packages/core/src/stream-segments/types.ts:24

The model step (0-based, within its turn) that produced this segment. History stamps it when the step finishes, so a turn is rebuilt for the next request one step at a time, in the order it was sent (see deriveAPIMessages). Absent on segments stored without it, which are rebuilt as one assistant message per turn.

Inherited from​

BaseSegment.step


timestamp​

timestamp: number

Defined in: packages/core/src/stream-segments/types.ts:12

Epoch milliseconds.

Inherited from​

BaseSegment.timestamp


type​

type: "user"

Defined in: packages/core/src/stream-segments/types.ts:189