@@ -23,38 +23,158 @@ const result = CodeContentSchema.parse(data);
2323
2424## CodeContent
2525
26+ ### Properties
27+
28+ | Property | Type | Required | Description |
29+ | :--- | :--- | :--- | :--- |
30+ | ** type** | ` string ` | ✅ | |
31+ | ** text** | ` string ` | ✅ | Code snippet |
32+ | ** language** | ` string ` | optional | |
33+ | ** metadata** | ` Record<string, any> ` | optional | |
34+
2635---
2736
2837## ConversationAnalytics
2938
39+ ### Properties
40+
41+ | Property | Type | Required | Description |
42+ | :--- | :--- | :--- | :--- |
43+ | ** sessionId** | ` string ` | ✅ | |
44+ | ** totalMessages** | ` integer ` | ✅ | |
45+ | ** userMessages** | ` integer ` | ✅ | |
46+ | ** assistantMessages** | ` integer ` | ✅ | |
47+ | ** systemMessages** | ` integer ` | ✅ | |
48+ | ** totalTokens** | ` integer ` | ✅ | |
49+ | ** averageTokensPerMessage** | ` number ` | ✅ | |
50+ | ** peakTokenUsage** | ` integer ` | ✅ | |
51+ | ** pruningEvents** | ` integer ` | optional | |
52+ | ** summarizationEvents** | ` integer ` | optional | |
53+ | ** tokensSavedByPruning** | ` integer ` | optional | |
54+ | ** tokensSavedBySummarization** | ` integer ` | optional | |
55+ | ** duration** | ` number ` | optional | Session duration in seconds |
56+ | ** firstMessageAt** | ` string ` | optional | ISO 8601 timestamp |
57+ | ** lastMessageAt** | ` string ` | optional | ISO 8601 timestamp |
58+
3059---
3160
3261## ConversationContext
3362
63+ ### Properties
64+
65+ | Property | Type | Required | Description |
66+ | :--- | :--- | :--- | :--- |
67+ | ** sessionId** | ` string ` | ✅ | Conversation session ID |
68+ | ** userId** | ` string ` | optional | User identifier |
69+ | ** agentId** | ` string ` | optional | AI agent identifier |
70+ | ** object** | ` string ` | optional | Related object (e.g., "case", "project") |
71+ | ** recordId** | ` string ` | optional | Related record ID |
72+ | ** scope** | ` Record<string, any> ` | optional | Additional context scope |
73+ | ** systemMessage** | ` string ` | optional | System prompt/instructions |
74+ | ** metadata** | ` Record<string, any> ` | optional | |
75+
3476---
3577
3678## ConversationMessage
3779
80+ ### Properties
81+
82+ | Property | Type | Required | Description |
83+ | :--- | :--- | :--- | :--- |
84+ | ** id** | ` string ` | ✅ | Unique message ID |
85+ | ** timestamp** | ` string ` | ✅ | ISO 8601 timestamp |
86+ | ** role** | ` Enum<'system' \| 'user' \| 'assistant' \| 'function' \| 'tool'> ` | ✅ | |
87+ | ** content** | ` object \| object \| object \| object[] ` | ✅ | Message content (multimodal array) |
88+ | ** functionCall** | ` object ` | optional | Legacy function call |
89+ | ** toolCalls** | ` object[] ` | optional | Tool calls |
90+ | ** toolCallId** | ` string ` | optional | Tool call ID this message responds to |
91+ | ** name** | ` string ` | optional | Name of the function/user |
92+ | ** tokens** | ` object ` | optional | Token usage for this message |
93+ | ** cost** | ` number ` | optional | Cost for this message in USD |
94+ | ** pinned** | ` boolean ` | optional | Prevent removal during pruning |
95+ | ** importance** | ` number ` | optional | Importance score for pruning |
96+ | ** embedding** | ` number[] ` | optional | Vector embedding for semantic search |
97+ | ** metadata** | ` Record<string, any> ` | optional | |
98+
3899---
39100
40101## ConversationSession
41102
103+ ### Properties
104+
105+ | Property | Type | Required | Description |
106+ | :--- | :--- | :--- | :--- |
107+ | ** id** | ` string ` | ✅ | Unique session ID |
108+ | ** name** | ` string ` | optional | Session name/title |
109+ | ** context** | ` object ` | ✅ | |
110+ | ** modelId** | ` string ` | optional | AI model ID |
111+ | ** tokenBudget** | ` object ` | ✅ | |
112+ | ** messages** | ` object[] ` | optional | |
113+ | ** tokens** | ` object ` | optional | |
114+ | ** totalTokens** | ` object ` | optional | Total tokens across all messages |
115+ | ** totalCost** | ` number ` | optional | Total cost for this session in USD |
116+ | ** status** | ` Enum<'active' \| 'paused' \| 'completed' \| 'archived'> ` | optional | |
117+ | ** createdAt** | ` string ` | ✅ | ISO 8601 timestamp |
118+ | ** updatedAt** | ` string ` | ✅ | ISO 8601 timestamp |
119+ | ** expiresAt** | ` string ` | optional | ISO 8601 timestamp |
120+ | ** metadata** | ` Record<string, any> ` | optional | |
121+
42122---
43123
44124## ConversationSummary
45125
126+ ### Properties
127+
128+ | Property | Type | Required | Description |
129+ | :--- | :--- | :--- | :--- |
130+ | ** summary** | ` string ` | ✅ | Conversation summary |
131+ | ** keyPoints** | ` string[] ` | optional | Key discussion points |
132+ | ** originalTokens** | ` integer ` | ✅ | Original token count |
133+ | ** summaryTokens** | ` integer ` | ✅ | Summary token count |
134+ | ** tokensSaved** | ` integer ` | ✅ | Tokens saved |
135+ | ** messageRange** | ` object ` | ✅ | Range of messages summarized |
136+ | ** generatedAt** | ` string ` | ✅ | ISO 8601 timestamp |
137+ | ** modelId** | ` string ` | optional | Model used for summarization |
138+
46139---
47140
48141## FileContent
49142
143+ ### Properties
144+
145+ | Property | Type | Required | Description |
146+ | :--- | :--- | :--- | :--- |
147+ | ** type** | ` string ` | ✅ | |
148+ | ** fileUrl** | ` string ` | ✅ | File attachment URL |
149+ | ** mimeType** | ` string ` | ✅ | MIME type |
150+ | ** fileName** | ` string ` | optional | |
151+ | ** metadata** | ` Record<string, any> ` | optional | |
152+
50153---
51154
52155## FunctionCall
53156
157+ ### Properties
158+
159+ | Property | Type | Required | Description |
160+ | :--- | :--- | :--- | :--- |
161+ | ** name** | ` string ` | ✅ | Function name |
162+ | ** arguments** | ` string ` | ✅ | JSON string of function arguments |
163+ | ** result** | ` string ` | optional | Function execution result |
164+
54165---
55166
56167## ImageContent
57168
169+ ### Properties
170+
171+ | Property | Type | Required | Description |
172+ | :--- | :--- | :--- | :--- |
173+ | ** type** | ` string ` | ✅ | |
174+ | ** imageUrl** | ` string ` | ✅ | Image URL |
175+ | ** detail** | ` Enum<'low' \| 'high' \| 'auto'> ` | optional | |
176+ | ** metadata** | ` Record<string, any> ` | optional | |
177+
58178---
59179
60180## MessageContent
@@ -63,31 +183,115 @@ const result = CodeContentSchema.parse(data);
63183
64184## MessageContentType
65185
186+ ### Allowed Values
187+
188+ * ` text `
189+ * ` image `
190+ * ` file `
191+ * ` code `
192+ * ` structured `
193+
66194---
67195
68196## MessagePruningEvent
69197
198+ ### Properties
199+
200+ | Property | Type | Required | Description |
201+ | :--- | :--- | :--- | :--- |
202+ | ** timestamp** | ` string ` | ✅ | Event timestamp |
203+ | ** prunedMessages** | ` object[] ` | ✅ | |
204+ | ** tokensFreed** | ` integer ` | ✅ | |
205+ | ** messagesRemoved** | ` integer ` | ✅ | |
206+ | ** remainingTokens** | ` integer ` | ✅ | |
207+ | ** remainingMessages** | ` integer ` | ✅ | |
208+
70209---
71210
72211## MessageRole
73212
213+ ### Allowed Values
214+
215+ * ` system `
216+ * ` user `
217+ * ` assistant `
218+ * ` function `
219+ * ` tool `
220+
74221---
75222
76223## TextContent
77224
225+ ### Properties
226+
227+ | Property | Type | Required | Description |
228+ | :--- | :--- | :--- | :--- |
229+ | ** type** | ` string ` | ✅ | |
230+ | ** text** | ` string ` | ✅ | Text content |
231+ | ** metadata** | ` Record<string, any> ` | optional | |
232+
78233---
79234
80235## TokenBudgetConfig
81236
237+ ### Properties
238+
239+ | Property | Type | Required | Description |
240+ | :--- | :--- | :--- | :--- |
241+ | ** maxTokens** | ` integer ` | ✅ | Maximum total tokens |
242+ | ** maxPromptTokens** | ` integer ` | optional | Max tokens for prompt |
243+ | ** maxCompletionTokens** | ` integer ` | optional | Max tokens for completion |
244+ | ** reserveTokens** | ` integer ` | optional | Reserve tokens for system messages |
245+ | ** bufferPercentage** | ` number ` | optional | Buffer percentage (0.1 = 10%) |
246+ | ** strategy** | ` Enum<'fifo' \| 'importance' \| 'semantic' \| 'sliding_window' \| 'summary'> ` | optional | |
247+ | ** slidingWindowSize** | ` integer ` | optional | Number of recent messages to keep |
248+ | ** minImportanceScore** | ` number ` | optional | Minimum importance to keep |
249+ | ** semanticThreshold** | ` number ` | optional | Semantic similarity threshold |
250+ | ** enableSummarization** | ` boolean ` | optional | Enable context summarization |
251+ | ** summarizationThreshold** | ` integer ` | optional | Trigger summarization at N tokens |
252+ | ** summaryModel** | ` string ` | optional | Model ID for summarization |
253+ | ** warnThreshold** | ` number ` | optional | Warn at % of budget (0.8 = 80%) |
254+
82255---
83256
84257## TokenBudgetStrategy
85258
259+ ### Allowed Values
260+
261+ * ` fifo `
262+ * ` importance `
263+ * ` semantic `
264+ * ` sliding_window `
265+ * ` summary `
266+
86267---
87268
88269## TokenUsageStats
89270
271+ ### Properties
272+
273+ | Property | Type | Required | Description |
274+ | :--- | :--- | :--- | :--- |
275+ | ** promptTokens** | ` integer ` | optional | |
276+ | ** completionTokens** | ` integer ` | optional | |
277+ | ** totalTokens** | ` integer ` | optional | |
278+ | ** budgetLimit** | ` integer ` | ✅ | |
279+ | ** budgetUsed** | ` integer ` | optional | |
280+ | ** budgetRemaining** | ` integer ` | ✅ | |
281+ | ** budgetPercentage** | ` number ` | ✅ | Usage as percentage of budget |
282+ | ** messageCount** | ` integer ` | optional | |
283+ | ** prunedMessageCount** | ` integer ` | optional | |
284+ | ** summarizedMessageCount** | ` integer ` | optional | |
285+
90286---
91287
92288## ToolCall
93289
290+ ### Properties
291+
292+ | Property | Type | Required | Description |
293+ | :--- | :--- | :--- | :--- |
294+ | ** id** | ` string ` | ✅ | Tool call ID |
295+ | ** type** | ` Enum<'function'> ` | optional | |
296+ | ** function** | ` object ` | ✅ | |
297+
0 commit comments