@orq-ai/node 4.1.10 → 4.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/bin/mcp-server.js +222 -222
  2. package/bin/mcp-server.js.map +40 -40
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/lib/sdks.js +2 -2
  8. package/lib/sdks.js.map +1 -1
  9. package/mcp-server/mcp-server.js +1 -1
  10. package/mcp-server/server.js +1 -1
  11. package/models/components/conversationresponse.js +2 -2
  12. package/models/components/partdoneevent.js +2 -2
  13. package/models/components/reasoningpart.js +2 -2
  14. package/models/operations/createcontact.js +2 -2
  15. package/models/operations/createconversation.js +2 -2
  16. package/models/operations/createdataset.js +2 -2
  17. package/models/operations/createdatasetitem.js +8 -8
  18. package/models/operations/createdatasource.js +2 -2
  19. package/models/operations/createeval.js +28 -28
  20. package/models/operations/createtool.js +12 -12
  21. package/models/operations/fileget.js +2 -2
  22. package/models/operations/filelist.js +2 -2
  23. package/models/operations/fileupload.js +2 -2
  24. package/models/operations/generateconversationname.js +2 -2
  25. package/models/operations/getalltools.js +12 -12
  26. package/models/operations/getevals.js +28 -28
  27. package/models/operations/listcontacts.js +2 -2
  28. package/models/operations/listdatasetdatapoints.js +8 -8
  29. package/models/operations/listdatasets.js +2 -2
  30. package/models/operations/listdatasources.js +2 -2
  31. package/models/operations/retrievecontact.js +2 -2
  32. package/models/operations/retrieveconversation.js +2 -2
  33. package/models/operations/retrievedatapoint.js +8 -8
  34. package/models/operations/retrievedataset.js +2 -2
  35. package/models/operations/retrievedatasource.js +2 -2
  36. package/models/operations/retrievetool.js +12 -12
  37. package/models/operations/runagent.js +2 -2
  38. package/models/operations/streamrunagent.js +2 -2
  39. package/models/operations/updatecontact.js +2 -2
  40. package/models/operations/updateconversation.js +2 -2
  41. package/models/operations/updatedatapoint.js +8 -8
  42. package/models/operations/updatedataset.js +2 -2
  43. package/models/operations/updatedatasource.js +2 -2
  44. package/models/operations/updateeval.js +28 -28
  45. package/models/operations/updatetool.js +14 -14
  46. package/package.json +1 -1
  47. package/packages/orq-rc/examples/package-lock.json +1 -1
  48. package/packages/orq-rc/jsr.json +1 -1
  49. package/packages/orq-rc/package-lock.json +2 -2
  50. package/packages/orq-rc/package.json +1 -1
  51. package/packages/orq-rc/src/funcs/agentsCreate.ts +2 -11
  52. package/packages/orq-rc/src/funcs/{evaluatorsGetV2EvaluatorsIdVersionsVersionId.ts → conversationsCreateConversationResponse.ts} +34 -38
  53. package/packages/orq-rc/src/funcs/conversationsList.ts +6 -1
  54. package/packages/orq-rc/src/funcs/conversationsRetrieve.ts +5 -4
  55. package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +6 -5
  56. package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +6 -5
  57. package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +6 -5
  58. package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +6 -5
  59. package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +6 -5
  60. package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +6 -5
  61. package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +6 -5
  62. package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +6 -5
  63. package/packages/orq-rc/src/funcs/toolsCreate.ts +2 -11
  64. package/packages/orq-rc/src/lib/config.ts +3 -3
  65. package/packages/orq-rc/src/lib/sdks.ts +2 -2
  66. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  67. package/packages/orq-rc/src/mcp-server/server.ts +3 -3
  68. package/packages/orq-rc/src/mcp-server/tools/conversationsCreateConversationResponse.ts +39 -0
  69. package/packages/orq-rc/src/mcp-server/tools/conversationsList.ts +2 -0
  70. package/packages/orq-rc/src/models/components/agentinactivestreamingevent.ts +16 -1
  71. package/packages/orq-rc/src/models/components/agentmessagecreatedstreamingevent.ts +16 -1
  72. package/packages/orq-rc/src/models/components/agentresponsemessage.ts +16 -1
  73. package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +16 -1
  74. package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +16 -1
  75. package/packages/orq-rc/src/models/components/conversationresponse.ts +26 -26
  76. package/packages/orq-rc/src/models/components/conversationwithmessagesresponse.ts +226 -0
  77. package/packages/orq-rc/src/models/components/errorpart.ts +58 -0
  78. package/packages/orq-rc/src/models/components/index.ts +4 -0
  79. package/packages/orq-rc/src/models/components/messageresponse.ts +217 -0
  80. package/packages/orq-rc/src/models/components/partdoneevent.ts +2 -2
  81. package/packages/orq-rc/src/models/components/publiccontact.ts +1 -1
  82. package/packages/orq-rc/src/models/components/reasoningpart.ts +2 -2
  83. package/packages/orq-rc/src/models/components/responsestartedevent.ts +14 -0
  84. package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +1 -0
  85. package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +1 -0
  86. package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +1 -0
  87. package/packages/orq-rc/src/models/components/usermessagerequest.ts +194 -0
  88. package/packages/orq-rc/src/models/errors/index.ts +0 -2
  89. package/packages/orq-rc/src/models/operations/createagentrequest.ts +40 -0
  90. package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +122 -5
  91. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +110 -7
  92. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  93. package/packages/orq-rc/src/models/operations/createconversation.ts +59 -36
  94. package/packages/orq-rc/src/models/operations/createconversationresponse.ts +794 -0
  95. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  96. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +48 -40
  97. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  98. package/packages/orq-rc/src/models/operations/createeval.ts +28 -28
  99. package/packages/orq-rc/src/models/operations/createimage.ts +105 -5
  100. package/packages/orq-rc/src/models/operations/creatememory.ts +3 -15
  101. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +7 -7
  102. package/packages/orq-rc/src/models/operations/createtool.ts +12 -12
  103. package/packages/orq-rc/src/models/operations/deletememory.ts +6 -6
  104. package/packages/orq-rc/src/models/operations/deletememorydocument.ts +6 -6
  105. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  106. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  107. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  108. package/packages/orq-rc/src/models/operations/generateconversationname.ts +27 -27
  109. package/packages/orq-rc/src/models/operations/getallmemories.ts +3 -8
  110. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +6 -6
  111. package/packages/orq-rc/src/models/operations/getalltools.ts +12 -12
  112. package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
  113. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +4 -4
  114. package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +4 -4
  115. package/packages/orq-rc/src/models/operations/getv2toolstoolidversionsversionid.ts +4 -4
  116. package/packages/orq-rc/src/models/operations/index.ts +1 -1
  117. package/packages/orq-rc/src/models/operations/invokeagent.ts +128 -5
  118. package/packages/orq-rc/src/models/operations/listagents.ts +20 -0
  119. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  120. package/packages/orq-rc/src/models/operations/listconversations.ts +10 -3
  121. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +53 -53
  122. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  123. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  124. package/packages/orq-rc/src/models/operations/parse.ts +157 -2
  125. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +9 -0
  126. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +22 -0
  127. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  128. package/packages/orq-rc/src/models/operations/retrieveconversation.ts +0 -197
  129. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +8 -8
  130. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  131. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  132. package/packages/orq-rc/src/models/operations/retrievememory.ts +9 -14
  133. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +6 -6
  134. package/packages/orq-rc/src/models/operations/retrievetool.ts +12 -12
  135. package/packages/orq-rc/src/models/operations/runagent.ts +130 -7
  136. package/packages/orq-rc/src/models/operations/streamagent.ts +120 -5
  137. package/packages/orq-rc/src/models/operations/streamrunagent.ts +122 -7
  138. package/packages/orq-rc/src/models/operations/updateagent.ts +20 -0
  139. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  140. package/packages/orq-rc/src/models/operations/updateconversation.ts +39 -33
  141. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +8 -8
  142. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  143. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  144. package/packages/orq-rc/src/models/operations/updateeval.ts +28 -28
  145. package/packages/orq-rc/src/models/operations/updatememory.ts +9 -32
  146. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +6 -6
  147. package/packages/orq-rc/src/models/operations/updatetool.ts +14 -14
  148. package/packages/orq-rc/src/sdk/conversations.ts +23 -1
  149. package/packages/orq-rc/src/sdk/evaluators.ts +0 -18
  150. package/packages/orq-rc/src/sdk/internal.ts +28 -0
  151. package/packages/orq-rc/src/sdk/sdk.ts +6 -0
  152. package/src/lib/config.ts +3 -3
  153. package/src/lib/sdks.ts +2 -2
  154. package/src/mcp-server/mcp-server.ts +1 -1
  155. package/src/mcp-server/server.ts +1 -1
  156. package/src/models/components/conversationresponse.ts +2 -2
  157. package/src/models/components/partdoneevent.ts +2 -2
  158. package/src/models/components/reasoningpart.ts +2 -2
  159. package/src/models/operations/createcontact.ts +2 -2
  160. package/src/models/operations/createconversation.ts +2 -2
  161. package/src/models/operations/createdataset.ts +2 -2
  162. package/src/models/operations/createdatasetitem.ts +8 -8
  163. package/src/models/operations/createdatasource.ts +2 -2
  164. package/src/models/operations/createeval.ts +28 -28
  165. package/src/models/operations/createtool.ts +12 -12
  166. package/src/models/operations/fileget.ts +2 -2
  167. package/src/models/operations/filelist.ts +2 -2
  168. package/src/models/operations/fileupload.ts +2 -2
  169. package/src/models/operations/generateconversationname.ts +2 -2
  170. package/src/models/operations/getalltools.ts +12 -12
  171. package/src/models/operations/getevals.ts +28 -28
  172. package/src/models/operations/listcontacts.ts +2 -2
  173. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  174. package/src/models/operations/listdatasets.ts +2 -2
  175. package/src/models/operations/listdatasources.ts +2 -2
  176. package/src/models/operations/retrievecontact.ts +2 -2
  177. package/src/models/operations/retrieveconversation.ts +2 -2
  178. package/src/models/operations/retrievedatapoint.ts +8 -8
  179. package/src/models/operations/retrievedataset.ts +2 -2
  180. package/src/models/operations/retrievedatasource.ts +2 -2
  181. package/src/models/operations/retrievetool.ts +12 -12
  182. package/src/models/operations/runagent.ts +2 -2
  183. package/src/models/operations/streamrunagent.ts +2 -2
  184. package/src/models/operations/updatecontact.ts +2 -2
  185. package/src/models/operations/updateconversation.ts +2 -2
  186. package/src/models/operations/updatedatapoint.ts +8 -8
  187. package/src/models/operations/updatedataset.ts +2 -2
  188. package/src/models/operations/updatedatasource.ts +2 -2
  189. package/src/models/operations/updateeval.ts +28 -28
  190. package/src/models/operations/updatetool.ts +14 -14
  191. package/packages/orq-rc/src/mcp-server/tools/evaluatorsGetV2EvaluatorsIdVersionsVersionId.ts +0 -40
  192. package/packages/orq-rc/src/models/errors/createagentrequest.ts +0 -67
  193. package/packages/orq-rc/src/models/errors/getv2evaluatorsidversionsversionid.ts +0 -69
  194. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversionsversionid.ts +0 -193
@@ -0,0 +1,39 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { conversationsCreateConversationResponse } from "../../funcs/conversationsCreateConversationResponse.js";
6
+ import * as operations from "../../models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.CreateConversationResponseRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$conversationsCreateConversationResponse: ToolDefinition<
14
+ typeof args
15
+ > = {
16
+ name: "conversations-create-conversation-response",
17
+ description: `Create internal response
18
+
19
+ Creates a response for a freeform conversation without an agent. Uses a default model for generation.`,
20
+ args,
21
+ tool: async (client, args, ctx) => {
22
+ const [result, apiCall] = await conversationsCreateConversationResponse(
23
+ client,
24
+ args.request,
25
+ { fetchOptions: { signal: ctx.signal } },
26
+ ).$inspect();
27
+
28
+ if (!result.ok) {
29
+ return {
30
+ content: [{ type: "text", text: result.error.message }],
31
+ isError: true,
32
+ };
33
+ }
34
+
35
+ const value = result.value;
36
+
37
+ return formatResult(value, apiCall);
38
+ },
39
+ };
@@ -10,6 +10,7 @@ const args = {
10
10
  limit: z.number().int().optional(),
11
11
  startingAfter: z.string().optional(),
12
12
  endingBefore: z.string().optional(),
13
+ entityId: z.string().optional(),
13
14
  };
14
15
 
15
16
  export const tool$conversationsList: ToolDefinition<typeof args> = {
@@ -24,6 +25,7 @@ Retrieves a paginated list of conversations in your workspace. Conversations are
24
25
  args.limit,
25
26
  args.startingAfter,
26
27
  args.endingBefore,
28
+ args.entityId,
27
29
  { fetchOptions: { signal: ctx.signal } },
28
30
  ).$inspect();
29
31
 
@@ -14,6 +14,12 @@ import {
14
14
  DataPart$Outbound,
15
15
  DataPart$outboundSchema,
16
16
  } from "./datapart.js";
17
+ import {
18
+ ErrorPart,
19
+ ErrorPart$inboundSchema,
20
+ ErrorPart$Outbound,
21
+ ErrorPart$outboundSchema,
22
+ } from "./errorpart.js";
17
23
  import {
18
24
  FilePart,
19
25
  FilePart$inboundSchema,
@@ -57,6 +63,7 @@ export type AgentInactiveStreamingEventRole = ClosedEnum<
57
63
 
58
64
  export type AgentInactiveStreamingEventParts =
59
65
  | TextPart
66
+ | ErrorPart
60
67
  | DataPart
61
68
  | FilePart
62
69
  | ToolCallPart
@@ -71,7 +78,9 @@ export type LastMessageFull = {
71
78
  * Extended A2A message role
72
79
  */
73
80
  role: AgentInactiveStreamingEventRole;
74
- parts: Array<TextPart | DataPart | FilePart | ToolCallPart | ToolResultPart>;
81
+ parts: Array<
82
+ TextPart | ErrorPart | DataPart | FilePart | ToolCallPart | ToolResultPart
83
+ >;
75
84
  metadata?: { [k: string]: any } | undefined;
76
85
  };
77
86
 
@@ -212,6 +221,7 @@ export const AgentInactiveStreamingEventParts$inboundSchema: z.ZodType<
212
221
  unknown
213
222
  > = z.union([
214
223
  TextPart$inboundSchema,
224
+ ErrorPart$inboundSchema,
215
225
  DataPart$inboundSchema,
216
226
  FilePart$inboundSchema,
217
227
  ToolCallPart$inboundSchema,
@@ -220,6 +230,7 @@ export const AgentInactiveStreamingEventParts$inboundSchema: z.ZodType<
220
230
  /** @internal */
221
231
  export type AgentInactiveStreamingEventParts$Outbound =
222
232
  | TextPart$Outbound
233
+ | ErrorPart$Outbound
223
234
  | DataPart$Outbound
224
235
  | FilePart$Outbound
225
236
  | ToolCallPart$Outbound
@@ -232,6 +243,7 @@ export const AgentInactiveStreamingEventParts$outboundSchema: z.ZodType<
232
243
  AgentInactiveStreamingEventParts
233
244
  > = z.union([
234
245
  TextPart$outboundSchema,
246
+ ErrorPart$outboundSchema,
235
247
  DataPart$outboundSchema,
236
248
  FilePart$outboundSchema,
237
249
  ToolCallPart$outboundSchema,
@@ -268,6 +280,7 @@ export const LastMessageFull$inboundSchema: z.ZodType<
268
280
  parts: z.array(
269
281
  z.union([
270
282
  TextPart$inboundSchema,
283
+ ErrorPart$inboundSchema,
271
284
  DataPart$inboundSchema,
272
285
  FilePart$inboundSchema,
273
286
  ToolCallPart$inboundSchema,
@@ -282,6 +295,7 @@ export type LastMessageFull$Outbound = {
282
295
  role: string;
283
296
  parts: Array<
284
297
  | TextPart$Outbound
298
+ | ErrorPart$Outbound
285
299
  | DataPart$Outbound
286
300
  | FilePart$Outbound
287
301
  | ToolCallPart$Outbound
@@ -301,6 +315,7 @@ export const LastMessageFull$outboundSchema: z.ZodType<
301
315
  parts: z.array(
302
316
  z.union([
303
317
  TextPart$outboundSchema,
318
+ ErrorPart$outboundSchema,
304
319
  DataPart$outboundSchema,
305
320
  FilePart$outboundSchema,
306
321
  ToolCallPart$outboundSchema,
@@ -13,6 +13,12 @@ import {
13
13
  DataPart$Outbound,
14
14
  DataPart$outboundSchema,
15
15
  } from "./datapart.js";
16
+ import {
17
+ ErrorPart,
18
+ ErrorPart$inboundSchema,
19
+ ErrorPart$Outbound,
20
+ ErrorPart$outboundSchema,
21
+ } from "./errorpart.js";
16
22
  import {
17
23
  FilePart,
18
24
  FilePart$inboundSchema,
@@ -48,6 +54,7 @@ export type AgentMessageCreatedStreamingEventRole = ClosedEnum<
48
54
 
49
55
  export type AgentMessageCreatedStreamingEventParts =
50
56
  | TextPart
57
+ | ErrorPart
51
58
  | DataPart
52
59
  | FilePart
53
60
  | ToolCallPart
@@ -56,7 +63,9 @@ export type AgentMessageCreatedStreamingEventParts =
56
63
  export type Message = {
57
64
  messageId?: string | undefined;
58
65
  role: AgentMessageCreatedStreamingEventRole;
59
- parts: Array<TextPart | DataPart | FilePart | ToolCallPart | ToolResultPart>;
66
+ parts: Array<
67
+ TextPart | ErrorPart | DataPart | FilePart | ToolCallPart | ToolResultPart
68
+ >;
60
69
  metadata?: { [k: string]: any } | undefined;
61
70
  };
62
71
 
@@ -96,6 +105,7 @@ export const AgentMessageCreatedStreamingEventParts$inboundSchema: z.ZodType<
96
105
  unknown
97
106
  > = z.union([
98
107
  TextPart$inboundSchema,
108
+ ErrorPart$inboundSchema,
99
109
  DataPart$inboundSchema,
100
110
  FilePart$inboundSchema,
101
111
  ToolCallPart$inboundSchema,
@@ -104,6 +114,7 @@ export const AgentMessageCreatedStreamingEventParts$inboundSchema: z.ZodType<
104
114
  /** @internal */
105
115
  export type AgentMessageCreatedStreamingEventParts$Outbound =
106
116
  | TextPart$Outbound
117
+ | ErrorPart$Outbound
107
118
  | DataPart$Outbound
108
119
  | FilePart$Outbound
109
120
  | ToolCallPart$Outbound
@@ -116,6 +127,7 @@ export const AgentMessageCreatedStreamingEventParts$outboundSchema: z.ZodType<
116
127
  AgentMessageCreatedStreamingEventParts
117
128
  > = z.union([
118
129
  TextPart$outboundSchema,
130
+ ErrorPart$outboundSchema,
119
131
  DataPart$outboundSchema,
120
132
  FilePart$outboundSchema,
121
133
  ToolCallPart$outboundSchema,
@@ -151,6 +163,7 @@ export const Message$inboundSchema: z.ZodType<Message, z.ZodTypeDef, unknown> =
151
163
  parts: z.array(
152
164
  z.union([
153
165
  TextPart$inboundSchema,
166
+ ErrorPart$inboundSchema,
154
167
  DataPart$inboundSchema,
155
168
  FilePart$inboundSchema,
156
169
  ToolCallPart$inboundSchema,
@@ -165,6 +178,7 @@ export type Message$Outbound = {
165
178
  role: string;
166
179
  parts: Array<
167
180
  | TextPart$Outbound
181
+ | ErrorPart$Outbound
168
182
  | DataPart$Outbound
169
183
  | FilePart$Outbound
170
184
  | ToolCallPart$Outbound
@@ -184,6 +198,7 @@ export const Message$outboundSchema: z.ZodType<
184
198
  parts: z.array(
185
199
  z.union([
186
200
  TextPart$outboundSchema,
201
+ ErrorPart$outboundSchema,
187
202
  DataPart$outboundSchema,
188
203
  FilePart$outboundSchema,
189
204
  ToolCallPart$outboundSchema,
@@ -13,6 +13,12 @@ import {
13
13
  DataPart$Outbound,
14
14
  DataPart$outboundSchema,
15
15
  } from "./datapart.js";
16
+ import {
17
+ ErrorPart,
18
+ ErrorPart$inboundSchema,
19
+ ErrorPart$Outbound,
20
+ ErrorPart$outboundSchema,
21
+ } from "./errorpart.js";
16
22
  import {
17
23
  FilePart,
18
24
  FilePart$inboundSchema,
@@ -48,6 +54,7 @@ export type Role = ClosedEnum<typeof Role>;
48
54
 
49
55
  export type Parts =
50
56
  | TextPart
57
+ | ErrorPart
51
58
  | DataPart
52
59
  | FilePart
53
60
  | ToolCallPart
@@ -59,7 +66,9 @@ export type Parts =
59
66
  export type AgentResponseMessage = {
60
67
  messageId: string;
61
68
  role: Role;
62
- parts: Array<TextPart | DataPart | FilePart | ToolCallPart | ToolResultPart>;
69
+ parts: Array<
70
+ TextPart | ErrorPart | DataPart | FilePart | ToolCallPart | ToolResultPart
71
+ >;
63
72
  metadata?: { [k: string]: any } | undefined;
64
73
  };
65
74
 
@@ -75,6 +84,7 @@ export const Role$outboundSchema: z.ZodNativeEnum<typeof Role> =
75
84
  export const Parts$inboundSchema: z.ZodType<Parts, z.ZodTypeDef, unknown> = z
76
85
  .union([
77
86
  TextPart$inboundSchema,
87
+ ErrorPart$inboundSchema,
78
88
  DataPart$inboundSchema,
79
89
  FilePart$inboundSchema,
80
90
  ToolCallPart$inboundSchema,
@@ -83,6 +93,7 @@ export const Parts$inboundSchema: z.ZodType<Parts, z.ZodTypeDef, unknown> = z
83
93
  /** @internal */
84
94
  export type Parts$Outbound =
85
95
  | TextPart$Outbound
96
+ | ErrorPart$Outbound
86
97
  | DataPart$Outbound
87
98
  | FilePart$Outbound
88
99
  | ToolCallPart$Outbound
@@ -95,6 +106,7 @@ export const Parts$outboundSchema: z.ZodType<
95
106
  Parts
96
107
  > = z.union([
97
108
  TextPart$outboundSchema,
109
+ ErrorPart$outboundSchema,
98
110
  DataPart$outboundSchema,
99
111
  FilePart$outboundSchema,
100
112
  ToolCallPart$outboundSchema,
@@ -125,6 +137,7 @@ export const AgentResponseMessage$inboundSchema: z.ZodType<
125
137
  parts: z.array(
126
138
  z.union([
127
139
  TextPart$inboundSchema,
140
+ ErrorPart$inboundSchema,
128
141
  DataPart$inboundSchema,
129
142
  FilePart$inboundSchema,
130
143
  ToolCallPart$inboundSchema,
@@ -139,6 +152,7 @@ export type AgentResponseMessage$Outbound = {
139
152
  role: string;
140
153
  parts: Array<
141
154
  | TextPart$Outbound
155
+ | ErrorPart$Outbound
142
156
  | DataPart$Outbound
143
157
  | FilePart$Outbound
144
158
  | ToolCallPart$Outbound
@@ -158,6 +172,7 @@ export const AgentResponseMessage$outboundSchema: z.ZodType<
158
172
  parts: z.array(
159
173
  z.union([
160
174
  TextPart$outboundSchema,
175
+ ErrorPart$outboundSchema,
161
176
  DataPart$outboundSchema,
162
177
  FilePart$outboundSchema,
163
178
  ToolCallPart$outboundSchema,
@@ -14,6 +14,12 @@ import {
14
14
  DataPart$Outbound,
15
15
  DataPart$outboundSchema,
16
16
  } from "./datapart.js";
17
+ import {
18
+ ErrorPart,
19
+ ErrorPart$inboundSchema,
20
+ ErrorPart$Outbound,
21
+ ErrorPart$outboundSchema,
22
+ } from "./errorpart.js";
17
23
  import {
18
24
  FilePart,
19
25
  FilePart$inboundSchema,
@@ -57,6 +63,7 @@ export type AgentStartedStreamingEventRole = ClosedEnum<
57
63
 
58
64
  export type AgentStartedStreamingEventParts =
59
65
  | TextPart
66
+ | ErrorPart
60
67
  | DataPart
61
68
  | FilePart
62
69
  | ToolCallPart
@@ -68,7 +75,9 @@ export type InputMessage = {
68
75
  * Extended A2A message role
69
76
  */
70
77
  role: AgentStartedStreamingEventRole;
71
- parts: Array<TextPart | DataPart | FilePart | ToolCallPart | ToolResultPart>;
78
+ parts: Array<
79
+ TextPart | ErrorPart | DataPart | FilePart | ToolCallPart | ToolResultPart
80
+ >;
72
81
  metadata?: { [k: string]: any } | undefined;
73
82
  };
74
83
 
@@ -252,6 +261,7 @@ export const AgentStartedStreamingEventParts$inboundSchema: z.ZodType<
252
261
  unknown
253
262
  > = z.union([
254
263
  TextPart$inboundSchema,
264
+ ErrorPart$inboundSchema,
255
265
  DataPart$inboundSchema,
256
266
  FilePart$inboundSchema,
257
267
  ToolCallPart$inboundSchema,
@@ -260,6 +270,7 @@ export const AgentStartedStreamingEventParts$inboundSchema: z.ZodType<
260
270
  /** @internal */
261
271
  export type AgentStartedStreamingEventParts$Outbound =
262
272
  | TextPart$Outbound
273
+ | ErrorPart$Outbound
263
274
  | DataPart$Outbound
264
275
  | FilePart$Outbound
265
276
  | ToolCallPart$Outbound
@@ -272,6 +283,7 @@ export const AgentStartedStreamingEventParts$outboundSchema: z.ZodType<
272
283
  AgentStartedStreamingEventParts
273
284
  > = z.union([
274
285
  TextPart$outboundSchema,
286
+ ErrorPart$outboundSchema,
275
287
  DataPart$outboundSchema,
276
288
  FilePart$outboundSchema,
277
289
  ToolCallPart$outboundSchema,
@@ -308,6 +320,7 @@ export const InputMessage$inboundSchema: z.ZodType<
308
320
  parts: z.array(
309
321
  z.union([
310
322
  TextPart$inboundSchema,
323
+ ErrorPart$inboundSchema,
311
324
  DataPart$inboundSchema,
312
325
  FilePart$inboundSchema,
313
326
  ToolCallPart$inboundSchema,
@@ -322,6 +335,7 @@ export type InputMessage$Outbound = {
322
335
  role: string;
323
336
  parts: Array<
324
337
  | TextPart$Outbound
338
+ | ErrorPart$Outbound
325
339
  | DataPart$Outbound
326
340
  | FilePart$Outbound
327
341
  | ToolCallPart$Outbound
@@ -341,6 +355,7 @@ export const InputMessage$outboundSchema: z.ZodType<
341
355
  parts: z.array(
342
356
  z.union([
343
357
  TextPart$outboundSchema,
358
+ ErrorPart$outboundSchema,
344
359
  DataPart$outboundSchema,
345
360
  FilePart$outboundSchema,
346
361
  ToolCallPart$outboundSchema,
@@ -14,6 +14,12 @@ import {
14
14
  DataPart$Outbound,
15
15
  DataPart$outboundSchema,
16
16
  } from "./datapart.js";
17
+ import {
18
+ ErrorPart,
19
+ ErrorPart$inboundSchema,
20
+ ErrorPart$Outbound,
21
+ ErrorPart$outboundSchema,
22
+ } from "./errorpart.js";
17
23
  import {
18
24
  FilePart,
19
25
  FilePart$inboundSchema,
@@ -51,6 +57,7 @@ export type AgentThoughtStreamingEventRole = ClosedEnum<
51
57
 
52
58
  export type AgentThoughtStreamingEventParts =
53
59
  | TextPart
60
+ | ErrorPart
54
61
  | DataPart
55
62
  | FilePart
56
63
  | ToolCallPart
@@ -59,7 +66,9 @@ export type AgentThoughtStreamingEventParts =
59
66
  export type MessageDifference = {
60
67
  messageId: string;
61
68
  role: AgentThoughtStreamingEventRole;
62
- parts: Array<TextPart | DataPart | FilePart | ToolCallPart | ToolResultPart>;
69
+ parts: Array<
70
+ TextPart | ErrorPart | DataPart | FilePart | ToolCallPart | ToolResultPart
71
+ >;
63
72
  metadata?: { [k: string]: any } | undefined;
64
73
  agentId: string;
65
74
  agentExecutionId: string;
@@ -343,6 +352,7 @@ export const AgentThoughtStreamingEventParts$inboundSchema: z.ZodType<
343
352
  unknown
344
353
  > = z.union([
345
354
  TextPart$inboundSchema,
355
+ ErrorPart$inboundSchema,
346
356
  DataPart$inboundSchema,
347
357
  FilePart$inboundSchema,
348
358
  ToolCallPart$inboundSchema,
@@ -351,6 +361,7 @@ export const AgentThoughtStreamingEventParts$inboundSchema: z.ZodType<
351
361
  /** @internal */
352
362
  export type AgentThoughtStreamingEventParts$Outbound =
353
363
  | TextPart$Outbound
364
+ | ErrorPart$Outbound
354
365
  | DataPart$Outbound
355
366
  | FilePart$Outbound
356
367
  | ToolCallPart$Outbound
@@ -363,6 +374,7 @@ export const AgentThoughtStreamingEventParts$outboundSchema: z.ZodType<
363
374
  AgentThoughtStreamingEventParts
364
375
  > = z.union([
365
376
  TextPart$outboundSchema,
377
+ ErrorPart$outboundSchema,
366
378
  DataPart$outboundSchema,
367
379
  FilePart$outboundSchema,
368
380
  ToolCallPart$outboundSchema,
@@ -399,6 +411,7 @@ export const MessageDifference$inboundSchema: z.ZodType<
399
411
  parts: z.array(
400
412
  z.union([
401
413
  TextPart$inboundSchema,
414
+ ErrorPart$inboundSchema,
402
415
  DataPart$inboundSchema,
403
416
  FilePart$inboundSchema,
404
417
  ToolCallPart$inboundSchema,
@@ -422,6 +435,7 @@ export type MessageDifference$Outbound = {
422
435
  role: string;
423
436
  parts: Array<
424
437
  | TextPart$Outbound
438
+ | ErrorPart$Outbound
425
439
  | DataPart$Outbound
426
440
  | FilePart$Outbound
427
441
  | ToolCallPart$Outbound
@@ -444,6 +458,7 @@ export const MessageDifference$outboundSchema: z.ZodType<
444
458
  parts: z.array(
445
459
  z.union([
446
460
  TextPart$outboundSchema,
461
+ ErrorPart$outboundSchema,
447
462
  DataPart$outboundSchema,
448
463
  FilePart$outboundSchema,
449
464
  ToolCallPart$outboundSchema,
@@ -10,67 +10,67 @@ import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
12
  /**
13
- * Type discriminator indicating this is a conversation
13
+ * Resource type discriminator.
14
14
  */
15
15
  export const ConversationResponseKind = {
16
16
  Conversation: "conversation",
17
17
  } as const;
18
18
  /**
19
- * Type discriminator indicating this is a conversation
19
+ * Resource type discriminator.
20
20
  */
21
21
  export type ConversationResponseKind = ClosedEnum<
22
22
  typeof ConversationResponseKind
23
23
  >;
24
24
 
25
25
  /**
26
- * Optional metadata associated with the conversation.
26
+ * Additional conversation metadata.
27
27
  */
28
28
  export type Metadata = {
29
29
  /**
30
- * Indicates whether the conversation title is currently being generated by AI.
30
+ * When `true`, indicates the conversation title is being auto-generated.
31
31
  */
32
32
  generatingTitle?: boolean | undefined;
33
33
  /**
34
- * Identifier of the parent entity (agent, deployment, etc.) this conversation belongs to. Used for filtering conversations by entity.
34
+ * Parent entity identifier (e.g., agent or deployment). Set to `null` for standalone conversations.
35
35
  */
36
- entityId?: string | undefined;
36
+ entityId?: string | null | undefined;
37
+ /**
38
+ * Model identifier for standalone conversations in `provider/model_id` format. Set to `null` for entity-bound conversations.
39
+ */
40
+ model?: string | null | undefined;
37
41
  };
38
42
 
39
43
  export type ConversationResponse = {
40
44
  /**
41
- * Unique ULID (Universally Unique Lexicographically Sortable Identifier) for the conversation, prefixed with "conv_"
45
+ * Unique conversation identifier with `conv_` prefix.
42
46
  */
43
47
  id?: string | undefined;
44
48
  /**
45
- * Identifier of the parent entity (agent, deployment, etc.) this conversation belongs to.
46
- */
47
- entityId: string;
48
- /**
49
- * Type discriminator indicating this is a conversation
49
+ * Resource type discriminator.
50
50
  */
51
51
  kind: ConversationResponseKind;
52
52
  /**
53
- * Display name for the conversation. Can be auto-generated or set by the user.
53
+ * Human-readable name for the conversation. Maximum 100 characters.
54
54
  */
55
55
  displayName: string;
56
56
  /**
57
- * Unix timestamp (in milliseconds) when the conversation was created
57
+ * Unix timestamp in milliseconds when the conversation was created.
58
58
  */
59
59
  createdAt: number;
60
60
  /**
61
- * Unix timestamp (in milliseconds) when the conversation was last updated
61
+ * Unix timestamp in milliseconds when the conversation was last modified.
62
62
  */
63
63
  updatedAt: number;
64
64
  /**
65
- * Optional identifier of the user or agent that created the conversation
65
+ * Identifier of the user or system that created the conversation.
66
66
  */
67
67
  createdById?: string | undefined;
68
68
  /**
69
- * Optional identifier of the user or agent that last updated the conversation
69
+ * Identifier of the user or system that last modified the conversation.
70
70
  */
71
71
  updatedById?: string | undefined;
72
72
  /**
73
- * Optional metadata associated with the conversation.
73
+ * Additional conversation metadata.
74
74
  */
75
75
  metadata?: Metadata | undefined;
76
76
  };
@@ -91,12 +91,14 @@ export const Metadata$inboundSchema: z.ZodType<
91
91
  unknown
92
92
  > = z.object({
93
93
  generatingTitle: z.boolean().optional(),
94
- entityId: z.string().optional(),
94
+ entityId: z.nullable(z.string()).optional(),
95
+ model: z.nullable(z.string()).optional(),
95
96
  });
96
97
  /** @internal */
97
98
  export type Metadata$Outbound = {
98
99
  generatingTitle?: boolean | undefined;
99
- entityId?: string | undefined;
100
+ entityId?: string | null | undefined;
101
+ model?: string | null | undefined;
100
102
  };
101
103
 
102
104
  /** @internal */
@@ -106,7 +108,8 @@ export const Metadata$outboundSchema: z.ZodType<
106
108
  Metadata
107
109
  > = z.object({
108
110
  generatingTitle: z.boolean().optional(),
109
- entityId: z.string().optional(),
111
+ entityId: z.nullable(z.string()).optional(),
112
+ model: z.nullable(z.string()).optional(),
110
113
  });
111
114
 
112
115
  export function metadataToJSON(metadata: Metadata): string {
@@ -128,8 +131,7 @@ export const ConversationResponse$inboundSchema: z.ZodType<
128
131
  z.ZodTypeDef,
129
132
  unknown
130
133
  > = z.object({
131
- _id: z.string().default("conv_01kebd76qb17fyvrrta9ewam0g"),
132
- entityId: z.string(),
134
+ _id: z.string().default("conv_01kevxwaj8946tjn61v53bxxqk"),
133
135
  kind: ConversationResponseKind$inboundSchema,
134
136
  displayName: z.string(),
135
137
  createdAt: z.number(),
@@ -145,7 +147,6 @@ export const ConversationResponse$inboundSchema: z.ZodType<
145
147
  /** @internal */
146
148
  export type ConversationResponse$Outbound = {
147
149
  _id: string;
148
- entityId: string;
149
150
  kind: string;
150
151
  displayName: string;
151
152
  createdAt: number;
@@ -161,8 +162,7 @@ export const ConversationResponse$outboundSchema: z.ZodType<
161
162
  z.ZodTypeDef,
162
163
  ConversationResponse
163
164
  > = z.object({
164
- id: z.string().default("conv_01kebd76qb17fyvrrta9ewam0g"),
165
- entityId: z.string(),
165
+ id: z.string().default("conv_01kevxwaj8946tjn61v53bxxqk"),
166
166
  kind: ConversationResponseKind$outboundSchema,
167
167
  displayName: z.string(),
168
168
  createdAt: z.number(),