@orq-ai/node 4.1.9 → 4.1.11

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 (196) 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/config.js.map +1 -1
  8. package/lib/sdks.js +2 -2
  9. package/lib/sdks.js.map +1 -1
  10. package/mcp-server/mcp-server.js +1 -1
  11. package/mcp-server/mcp-server.js.map +1 -1
  12. package/mcp-server/server.js +1 -1
  13. package/mcp-server/server.js.map +1 -1
  14. package/models/components/conversationresponse.js +2 -2
  15. package/models/components/partdoneevent.js +2 -2
  16. package/models/components/reasoningpart.js +2 -2
  17. package/models/operations/createcontact.js +2 -2
  18. package/models/operations/createconversation.js +2 -2
  19. package/models/operations/createdataset.js +2 -2
  20. package/models/operations/createdatasetitem.js +8 -8
  21. package/models/operations/createdatasource.js +2 -2
  22. package/models/operations/createeval.js +28 -28
  23. package/models/operations/createtool.js +12 -12
  24. package/models/operations/fileget.js +2 -2
  25. package/models/operations/filelist.js +2 -2
  26. package/models/operations/fileupload.js +2 -2
  27. package/models/operations/generateconversationname.js +2 -2
  28. package/models/operations/getalltools.js +12 -12
  29. package/models/operations/getevals.js +28 -28
  30. package/models/operations/listcontacts.js +2 -2
  31. package/models/operations/listdatasetdatapoints.js +8 -8
  32. package/models/operations/listdatasets.js +2 -2
  33. package/models/operations/listdatasources.js +2 -2
  34. package/models/operations/retrievecontact.js +2 -2
  35. package/models/operations/retrieveconversation.js +2 -2
  36. package/models/operations/retrievedatapoint.js +8 -8
  37. package/models/operations/retrievedataset.js +2 -2
  38. package/models/operations/retrievedatasource.js +2 -2
  39. package/models/operations/retrievetool.js +12 -12
  40. package/models/operations/runagent.js +2 -2
  41. package/models/operations/streamrunagent.js +2 -2
  42. package/models/operations/updatecontact.js +2 -2
  43. package/models/operations/updateconversation.js +2 -2
  44. package/models/operations/updatedatapoint.js +8 -8
  45. package/models/operations/updatedataset.js +2 -2
  46. package/models/operations/updatedatasource.js +2 -2
  47. package/models/operations/updateeval.js +28 -28
  48. package/models/operations/updatetool.js +14 -14
  49. package/package.json +1 -1
  50. package/packages/orq-rc/examples/package-lock.json +1 -1
  51. package/packages/orq-rc/jsr.json +1 -1
  52. package/packages/orq-rc/package-lock.json +2 -2
  53. package/packages/orq-rc/package.json +1 -1
  54. package/packages/orq-rc/src/funcs/agentsCreate.ts +2 -11
  55. package/packages/orq-rc/src/funcs/{evaluatorsGetV2EvaluatorsIdVersionsVersionId.ts → conversationsCreateConversationResponse.ts} +34 -38
  56. package/packages/orq-rc/src/funcs/conversationsList.ts +6 -1
  57. package/packages/orq-rc/src/funcs/conversationsRetrieve.ts +5 -4
  58. package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +6 -5
  59. package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +6 -5
  60. package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +6 -5
  61. package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +6 -5
  62. package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +6 -5
  63. package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +6 -5
  64. package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +6 -5
  65. package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +6 -5
  66. package/packages/orq-rc/src/funcs/toolsCreate.ts +2 -11
  67. package/packages/orq-rc/src/lib/config.ts +3 -3
  68. package/packages/orq-rc/src/lib/sdks.ts +2 -2
  69. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  70. package/packages/orq-rc/src/mcp-server/server.ts +3 -3
  71. package/packages/orq-rc/src/mcp-server/tools/conversationsCreateConversationResponse.ts +39 -0
  72. package/packages/orq-rc/src/mcp-server/tools/conversationsList.ts +2 -0
  73. package/packages/orq-rc/src/models/components/agentinactivestreamingevent.ts +16 -1
  74. package/packages/orq-rc/src/models/components/agentmessagecreatedstreamingevent.ts +16 -1
  75. package/packages/orq-rc/src/models/components/agentresponsemessage.ts +16 -1
  76. package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +16 -1
  77. package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +16 -1
  78. package/packages/orq-rc/src/models/components/conversationresponse.ts +26 -26
  79. package/packages/orq-rc/src/models/components/conversationwithmessagesresponse.ts +226 -0
  80. package/packages/orq-rc/src/models/components/errorpart.ts +58 -0
  81. package/packages/orq-rc/src/models/components/index.ts +4 -0
  82. package/packages/orq-rc/src/models/components/messageresponse.ts +217 -0
  83. package/packages/orq-rc/src/models/components/partdoneevent.ts +2 -2
  84. package/packages/orq-rc/src/models/components/publiccontact.ts +1 -1
  85. package/packages/orq-rc/src/models/components/reasoningpart.ts +2 -2
  86. package/packages/orq-rc/src/models/components/responsestartedevent.ts +14 -0
  87. package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +1 -0
  88. package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +1 -0
  89. package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +1 -0
  90. package/packages/orq-rc/src/models/components/usermessagerequest.ts +194 -0
  91. package/packages/orq-rc/src/models/errors/index.ts +0 -2
  92. package/packages/orq-rc/src/models/operations/createagentrequest.ts +40 -0
  93. package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +122 -5
  94. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +110 -7
  95. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  96. package/packages/orq-rc/src/models/operations/createconversation.ts +59 -36
  97. package/packages/orq-rc/src/models/operations/createconversationresponse.ts +794 -0
  98. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  99. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +48 -40
  100. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  101. package/packages/orq-rc/src/models/operations/createeval.ts +28 -28
  102. package/packages/orq-rc/src/models/operations/createimage.ts +105 -5
  103. package/packages/orq-rc/src/models/operations/creatememory.ts +3 -15
  104. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +7 -7
  105. package/packages/orq-rc/src/models/operations/createtool.ts +12 -12
  106. package/packages/orq-rc/src/models/operations/deletememory.ts +6 -6
  107. package/packages/orq-rc/src/models/operations/deletememorydocument.ts +6 -6
  108. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  109. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  110. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  111. package/packages/orq-rc/src/models/operations/generateconversationname.ts +27 -27
  112. package/packages/orq-rc/src/models/operations/getallmemories.ts +3 -8
  113. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +6 -6
  114. package/packages/orq-rc/src/models/operations/getalltools.ts +12 -12
  115. package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
  116. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +4 -4
  117. package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +4 -4
  118. package/packages/orq-rc/src/models/operations/getv2toolstoolidversionsversionid.ts +4 -4
  119. package/packages/orq-rc/src/models/operations/index.ts +1 -1
  120. package/packages/orq-rc/src/models/operations/invokeagent.ts +128 -5
  121. package/packages/orq-rc/src/models/operations/listagents.ts +20 -0
  122. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  123. package/packages/orq-rc/src/models/operations/listconversations.ts +10 -3
  124. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +53 -53
  125. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  126. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  127. package/packages/orq-rc/src/models/operations/parse.ts +157 -2
  128. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +22 -0
  129. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  130. package/packages/orq-rc/src/models/operations/retrieveconversation.ts +0 -197
  131. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +8 -8
  132. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  133. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  134. package/packages/orq-rc/src/models/operations/retrievememory.ts +9 -14
  135. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +6 -6
  136. package/packages/orq-rc/src/models/operations/retrievetool.ts +12 -12
  137. package/packages/orq-rc/src/models/operations/runagent.ts +130 -7
  138. package/packages/orq-rc/src/models/operations/streamagent.ts +120 -5
  139. package/packages/orq-rc/src/models/operations/streamrunagent.ts +122 -7
  140. package/packages/orq-rc/src/models/operations/updateagent.ts +20 -0
  141. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  142. package/packages/orq-rc/src/models/operations/updateconversation.ts +39 -33
  143. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +8 -8
  144. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  145. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  146. package/packages/orq-rc/src/models/operations/updateeval.ts +28 -28
  147. package/packages/orq-rc/src/models/operations/updatememory.ts +9 -32
  148. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +6 -6
  149. package/packages/orq-rc/src/models/operations/updatetool.ts +14 -14
  150. package/packages/orq-rc/src/sdk/conversations.ts +23 -1
  151. package/packages/orq-rc/src/sdk/evaluators.ts +0 -18
  152. package/packages/orq-rc/src/sdk/internal.ts +28 -0
  153. package/packages/orq-rc/src/sdk/sdk.ts +6 -0
  154. package/src/lib/config.ts +3 -3
  155. package/src/lib/sdks.ts +2 -2
  156. package/src/mcp-server/mcp-server.ts +1 -1
  157. package/src/mcp-server/server.ts +1 -1
  158. package/src/models/components/conversationresponse.ts +2 -2
  159. package/src/models/components/partdoneevent.ts +2 -2
  160. package/src/models/components/reasoningpart.ts +2 -2
  161. package/src/models/operations/createcontact.ts +2 -2
  162. package/src/models/operations/createconversation.ts +2 -2
  163. package/src/models/operations/createdataset.ts +2 -2
  164. package/src/models/operations/createdatasetitem.ts +8 -8
  165. package/src/models/operations/createdatasource.ts +2 -2
  166. package/src/models/operations/createeval.ts +28 -28
  167. package/src/models/operations/createtool.ts +12 -12
  168. package/src/models/operations/fileget.ts +2 -2
  169. package/src/models/operations/filelist.ts +2 -2
  170. package/src/models/operations/fileupload.ts +2 -2
  171. package/src/models/operations/generateconversationname.ts +2 -2
  172. package/src/models/operations/getalltools.ts +12 -12
  173. package/src/models/operations/getevals.ts +28 -28
  174. package/src/models/operations/listcontacts.ts +2 -2
  175. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  176. package/src/models/operations/listdatasets.ts +2 -2
  177. package/src/models/operations/listdatasources.ts +2 -2
  178. package/src/models/operations/retrievecontact.ts +2 -2
  179. package/src/models/operations/retrieveconversation.ts +2 -2
  180. package/src/models/operations/retrievedatapoint.ts +8 -8
  181. package/src/models/operations/retrievedataset.ts +2 -2
  182. package/src/models/operations/retrievedatasource.ts +2 -2
  183. package/src/models/operations/retrievetool.ts +12 -12
  184. package/src/models/operations/runagent.ts +2 -2
  185. package/src/models/operations/streamrunagent.ts +2 -2
  186. package/src/models/operations/updatecontact.ts +2 -2
  187. package/src/models/operations/updateconversation.ts +2 -2
  188. package/src/models/operations/updatedatapoint.ts +8 -8
  189. package/src/models/operations/updatedataset.ts +2 -2
  190. package/src/models/operations/updatedatasource.ts +2 -2
  191. package/src/models/operations/updateeval.ts +28 -28
  192. package/src/models/operations/updatetool.ts +14 -14
  193. package/packages/orq-rc/src/mcp-server/tools/evaluatorsGetV2EvaluatorsIdVersionsVersionId.ts +0 -40
  194. package/packages/orq-rc/src/models/errors/createagentrequest.ts +0 -67
  195. package/packages/orq-rc/src/models/errors/getv2evaluatorsidversionsversionid.ts +0 -69
  196. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversionsversionid.ts +0 -193
@@ -40,7 +40,7 @@ export const ReasoningPart$inboundSchema: z.ZodType<
40
40
  z.ZodTypeDef,
41
41
  unknown
42
42
  > = z.object({
43
- _id: z.string().default("reasoning_01kebd76d59s1ck7an4cmx9k07"),
43
+ _id: z.string().default("reasoning_01keveeq2tekm1n6201amswnne"),
44
44
  metadata: z.record(z.any()).optional(),
45
45
  kind: z.literal("reasoning"),
46
46
  reasoning: z.string(),
@@ -65,7 +65,7 @@ export const ReasoningPart$outboundSchema: z.ZodType<
65
65
  z.ZodTypeDef,
66
66
  ReasoningPart
67
67
  > = z.object({
68
- id: z.string().default("reasoning_01kebd76d59s1ck7an4cmx9k07"),
68
+ id: z.string().default("reasoning_01keveeq2tekm1n6201amswnne"),
69
69
  metadata: z.record(z.any()).optional(),
70
70
  kind: z.literal("reasoning"),
71
71
  reasoning: z.string(),
@@ -26,6 +26,14 @@ export type Data = {
26
26
  * Trace ID for this turn of the conversation (new for each continuation)
27
27
  */
28
28
  workflowRunId: string;
29
+ /**
30
+ * Server-generated ID for the user message. Use this ID for frontend state consistency.
31
+ */
32
+ userMessageId?: string | undefined;
33
+ /**
34
+ * Server-generated ID for the assistant message. Use this ID for frontend state consistency.
35
+ */
36
+ assistantMessageId?: string | undefined;
29
37
  };
30
38
 
31
39
  /**
@@ -47,6 +55,8 @@ export const Data$inboundSchema: z.ZodType<Data, z.ZodTypeDef, unknown> = z
47
55
  taskId: z.string(),
48
56
  model: z.string(),
49
57
  workflowRunId: z.string(),
58
+ userMessageId: z.string().optional(),
59
+ assistantMessageId: z.string().optional(),
50
60
  });
51
61
  /** @internal */
52
62
  export type Data$Outbound = {
@@ -54,6 +64,8 @@ export type Data$Outbound = {
54
64
  taskId: string;
55
65
  model: string;
56
66
  workflowRunId: string;
67
+ userMessageId?: string | undefined;
68
+ assistantMessageId?: string | undefined;
57
69
  };
58
70
 
59
71
  /** @internal */
@@ -63,6 +75,8 @@ export const Data$outboundSchema: z.ZodType<Data$Outbound, z.ZodTypeDef, Data> =
63
75
  taskId: z.string(),
64
76
  model: z.string(),
65
77
  workflowRunId: z.string(),
78
+ userMessageId: z.string().optional(),
79
+ assistantMessageId: z.string().optional(),
66
80
  });
67
81
 
68
82
  export function dataToJSON(data: Data): string {
@@ -34,6 +34,7 @@ export const ToolExecutionFailedStreamingEventProduct = {
34
34
  Generic: "generic",
35
35
  Evaluators: "evaluators",
36
36
  Otel: "otel",
37
+ AiChat: "ai-chat",
37
38
  } as const;
38
39
  /**
39
40
  * Orquesta product
@@ -29,6 +29,7 @@ export const ToolExecutionFinishedStreamingEventProduct = {
29
29
  Generic: "generic",
30
30
  Evaluators: "evaluators",
31
31
  Otel: "otel",
32
+ AiChat: "ai-chat",
32
33
  } as const;
33
34
  /**
34
35
  * Orquesta product
@@ -29,6 +29,7 @@ export const Product = {
29
29
  Generic: "generic",
30
30
  Evaluators: "evaluators",
31
31
  Otel: "otel",
32
+ AiChat: "ai-chat",
32
33
  } as const;
33
34
  /**
34
35
  * Orquesta product
@@ -0,0 +1,194 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ ErrorPart,
12
+ ErrorPart$inboundSchema,
13
+ ErrorPart$Outbound,
14
+ ErrorPart$outboundSchema,
15
+ } from "./errorpart.js";
16
+ import {
17
+ FilePart,
18
+ FilePart$inboundSchema,
19
+ FilePart$Outbound,
20
+ FilePart$outboundSchema,
21
+ } from "./filepart.js";
22
+ import {
23
+ TextPart,
24
+ TextPart$inboundSchema,
25
+ TextPart$Outbound,
26
+ TextPart$outboundSchema,
27
+ } from "./textpart.js";
28
+ import {
29
+ ToolResultPart,
30
+ ToolResultPart$inboundSchema,
31
+ ToolResultPart$Outbound,
32
+ ToolResultPart$outboundSchema,
33
+ } from "./toolresultpart.js";
34
+
35
+ /**
36
+ * Role indicating this message is from a user
37
+ */
38
+ export const UserMessageRequestRole = {
39
+ User: "user",
40
+ } as const;
41
+ /**
42
+ * Role indicating this message is from a user
43
+ */
44
+ export type UserMessageRequestRole = ClosedEnum<typeof UserMessageRequestRole>;
45
+
46
+ /**
47
+ * Message part that can be provided by users. Use "text" for regular messages, "file" for attachments, or "tool_result" when responding to tool call requests.
48
+ */
49
+ export type UserMessageRequestPublicMessagePart =
50
+ | TextPart
51
+ | FilePart
52
+ | ToolResultPart
53
+ | ErrorPart;
54
+
55
+ /**
56
+ * The user message to send to the model
57
+ */
58
+ export type UserMessageRequest = {
59
+ /**
60
+ * Optional message ID in ULID format
61
+ */
62
+ messageId?: string | undefined;
63
+ /**
64
+ * Role indicating this message is from a user
65
+ */
66
+ role: UserMessageRequestRole;
67
+ /**
68
+ * Array of message parts. User messages can contain text, file, tool_result, and error parts.
69
+ */
70
+ parts: Array<TextPart | FilePart | ToolResultPart | ErrorPart>;
71
+ };
72
+
73
+ /** @internal */
74
+ export const UserMessageRequestRole$inboundSchema: z.ZodNativeEnum<
75
+ typeof UserMessageRequestRole
76
+ > = z.nativeEnum(UserMessageRequestRole);
77
+ /** @internal */
78
+ export const UserMessageRequestRole$outboundSchema: z.ZodNativeEnum<
79
+ typeof UserMessageRequestRole
80
+ > = UserMessageRequestRole$inboundSchema;
81
+
82
+ /** @internal */
83
+ export const UserMessageRequestPublicMessagePart$inboundSchema: z.ZodType<
84
+ UserMessageRequestPublicMessagePart,
85
+ z.ZodTypeDef,
86
+ unknown
87
+ > = z.union([
88
+ TextPart$inboundSchema,
89
+ FilePart$inboundSchema,
90
+ ToolResultPart$inboundSchema,
91
+ ErrorPart$inboundSchema,
92
+ ]);
93
+ /** @internal */
94
+ export type UserMessageRequestPublicMessagePart$Outbound =
95
+ | TextPart$Outbound
96
+ | FilePart$Outbound
97
+ | ToolResultPart$Outbound
98
+ | ErrorPart$Outbound;
99
+
100
+ /** @internal */
101
+ export const UserMessageRequestPublicMessagePart$outboundSchema: z.ZodType<
102
+ UserMessageRequestPublicMessagePart$Outbound,
103
+ z.ZodTypeDef,
104
+ UserMessageRequestPublicMessagePart
105
+ > = z.union([
106
+ TextPart$outboundSchema,
107
+ FilePart$outboundSchema,
108
+ ToolResultPart$outboundSchema,
109
+ ErrorPart$outboundSchema,
110
+ ]);
111
+
112
+ export function userMessageRequestPublicMessagePartToJSON(
113
+ userMessageRequestPublicMessagePart: UserMessageRequestPublicMessagePart,
114
+ ): string {
115
+ return JSON.stringify(
116
+ UserMessageRequestPublicMessagePart$outboundSchema.parse(
117
+ userMessageRequestPublicMessagePart,
118
+ ),
119
+ );
120
+ }
121
+ export function userMessageRequestPublicMessagePartFromJSON(
122
+ jsonString: string,
123
+ ): SafeParseResult<UserMessageRequestPublicMessagePart, SDKValidationError> {
124
+ return safeParse(
125
+ jsonString,
126
+ (x) =>
127
+ UserMessageRequestPublicMessagePart$inboundSchema.parse(JSON.parse(x)),
128
+ `Failed to parse 'UserMessageRequestPublicMessagePart' from JSON`,
129
+ );
130
+ }
131
+
132
+ /** @internal */
133
+ export const UserMessageRequest$inboundSchema: z.ZodType<
134
+ UserMessageRequest,
135
+ z.ZodTypeDef,
136
+ unknown
137
+ > = z.object({
138
+ messageId: z.string().optional(),
139
+ role: UserMessageRequestRole$inboundSchema,
140
+ parts: z.array(
141
+ z.union([
142
+ TextPart$inboundSchema,
143
+ FilePart$inboundSchema,
144
+ ToolResultPart$inboundSchema,
145
+ ErrorPart$inboundSchema,
146
+ ]),
147
+ ),
148
+ });
149
+ /** @internal */
150
+ export type UserMessageRequest$Outbound = {
151
+ messageId?: string | undefined;
152
+ role: string;
153
+ parts: Array<
154
+ | TextPart$Outbound
155
+ | FilePart$Outbound
156
+ | ToolResultPart$Outbound
157
+ | ErrorPart$Outbound
158
+ >;
159
+ };
160
+
161
+ /** @internal */
162
+ export const UserMessageRequest$outboundSchema: z.ZodType<
163
+ UserMessageRequest$Outbound,
164
+ z.ZodTypeDef,
165
+ UserMessageRequest
166
+ > = z.object({
167
+ messageId: z.string().optional(),
168
+ role: UserMessageRequestRole$outboundSchema,
169
+ parts: z.array(
170
+ z.union([
171
+ TextPart$outboundSchema,
172
+ FilePart$outboundSchema,
173
+ ToolResultPart$outboundSchema,
174
+ ErrorPart$outboundSchema,
175
+ ]),
176
+ ),
177
+ });
178
+
179
+ export function userMessageRequestToJSON(
180
+ userMessageRequest: UserMessageRequest,
181
+ ): string {
182
+ return JSON.stringify(
183
+ UserMessageRequest$outboundSchema.parse(userMessageRequest),
184
+ );
185
+ }
186
+ export function userMessageRequestFromJSON(
187
+ jsonString: string,
188
+ ): SafeParseResult<UserMessageRequest, SDKValidationError> {
189
+ return safeParse(
190
+ jsonString,
191
+ (x) => UserMessageRequest$inboundSchema.parse(JSON.parse(x)),
192
+ `Failed to parse 'UserMessageRequest' from JSON`,
193
+ );
194
+ }
@@ -3,7 +3,6 @@
3
3
  */
4
4
 
5
5
  export * from "./apierror.js";
6
- export * from "./createagentrequest.js";
7
6
  export * from "./createeval.js";
8
7
  export * from "./deleteagent.js";
9
8
  export * from "./deletecontact.js";
@@ -13,7 +12,6 @@ export * from "./generateconversationname.js";
13
12
  export * from "./getevals.js";
14
13
  export * from "./getpromptversion.js";
15
14
  export * from "./getv2evaluatorsidversions.js";
16
- export * from "./getv2evaluatorsidversionsversionid.js";
17
15
  export * from "./getv2toolstoolidversions.js";
18
16
  export * from "./getv2toolstoolidversionsversionid.js";
19
17
  export * from "./honoapierror.js";
@@ -1317,6 +1317,13 @@ export type TeamOfAgents = {
1317
1317
  role?: string | undefined;
1318
1318
  };
1319
1319
 
1320
+ export const Source = {
1321
+ Internal: "internal",
1322
+ External: "external",
1323
+ Experiment: "experiment",
1324
+ } as const;
1325
+ export type Source = ClosedEnum<typeof Source>;
1326
+
1320
1327
  export type CreateAgentRequestRequestBody = {
1321
1328
  /**
1322
1329
  * Unique identifier for the agent within the workspace
@@ -1375,6 +1382,7 @@ export type CreateAgentRequestRequestBody = {
1375
1382
  */
1376
1383
  teamOfAgents?: Array<TeamOfAgents> | undefined;
1377
1384
  variables?: { [k: string]: any } | undefined;
1385
+ source?: Source | undefined;
1378
1386
  };
1379
1387
 
1380
1388
  /**
@@ -2382,6 +2390,15 @@ export type CreateAgentRequestKnowledgeBases = {
2382
2390
  knowledgeId: string;
2383
2391
  };
2384
2392
 
2393
+ export const CreateAgentRequestSource = {
2394
+ Internal: "internal",
2395
+ External: "external",
2396
+ Experiment: "experiment",
2397
+ } as const;
2398
+ export type CreateAgentRequestSource = ClosedEnum<
2399
+ typeof CreateAgentRequestSource
2400
+ >;
2401
+
2385
2402
  /**
2386
2403
  * Agent successfully created and ready for use. Returns the complete agent manifest including the generated ID, configuration, and all settings.
2387
2404
  */
@@ -2435,6 +2452,7 @@ export type CreateAgentRequestResponseBody = {
2435
2452
  * Agent knowledge bases reference
2436
2453
  */
2437
2454
  knowledgeBases?: Array<CreateAgentRequestKnowledgeBases> | undefined;
2455
+ source?: CreateAgentRequestSource | undefined;
2438
2456
  };
2439
2457
 
2440
2458
  /** @internal */
@@ -5748,6 +5766,13 @@ export function teamOfAgentsFromJSON(
5748
5766
  );
5749
5767
  }
5750
5768
 
5769
+ /** @internal */
5770
+ export const Source$inboundSchema: z.ZodNativeEnum<typeof Source> = z
5771
+ .nativeEnum(Source);
5772
+ /** @internal */
5773
+ export const Source$outboundSchema: z.ZodNativeEnum<typeof Source> =
5774
+ Source$inboundSchema;
5775
+
5751
5776
  /** @internal */
5752
5777
  export const CreateAgentRequestRequestBody$inboundSchema: z.ZodType<
5753
5778
  CreateAgentRequestRequestBody,
@@ -5774,6 +5799,7 @@ export const CreateAgentRequestRequestBody$inboundSchema: z.ZodType<
5774
5799
  .optional(),
5775
5800
  team_of_agents: z.array(z.lazy(() => TeamOfAgents$inboundSchema)).optional(),
5776
5801
  variables: z.record(z.any()).optional(),
5802
+ source: Source$inboundSchema.optional(),
5777
5803
  }).transform((v) => {
5778
5804
  return remap$(v, {
5779
5805
  "display_name": "displayName",
@@ -5802,6 +5828,7 @@ export type CreateAgentRequestRequestBody$Outbound = {
5802
5828
  knowledge_bases?: Array<KnowledgeBases$Outbound> | undefined;
5803
5829
  team_of_agents?: Array<TeamOfAgents$Outbound> | undefined;
5804
5830
  variables?: { [k: string]: any } | undefined;
5831
+ source?: string | undefined;
5805
5832
  };
5806
5833
 
5807
5834
  /** @internal */
@@ -5833,6 +5860,7 @@ export const CreateAgentRequestRequestBody$outboundSchema: z.ZodType<
5833
5860
  .optional(),
5834
5861
  teamOfAgents: z.array(z.lazy(() => TeamOfAgents$outboundSchema)).optional(),
5835
5862
  variables: z.record(z.any()).optional(),
5863
+ source: Source$outboundSchema.optional(),
5836
5864
  }).transform((v) => {
5837
5865
  return remap$(v, {
5838
5866
  displayName: "display_name",
@@ -8631,6 +8659,15 @@ export function createAgentRequestKnowledgeBasesFromJSON(
8631
8659
  );
8632
8660
  }
8633
8661
 
8662
+ /** @internal */
8663
+ export const CreateAgentRequestSource$inboundSchema: z.ZodNativeEnum<
8664
+ typeof CreateAgentRequestSource
8665
+ > = z.nativeEnum(CreateAgentRequestSource);
8666
+ /** @internal */
8667
+ export const CreateAgentRequestSource$outboundSchema: z.ZodNativeEnum<
8668
+ typeof CreateAgentRequestSource
8669
+ > = CreateAgentRequestSource$inboundSchema;
8670
+
8634
8671
  /** @internal */
8635
8672
  export const CreateAgentRequestResponseBody$inboundSchema: z.ZodType<
8636
8673
  CreateAgentRequestResponseBody,
@@ -8663,6 +8700,7 @@ export const CreateAgentRequestResponseBody$inboundSchema: z.ZodType<
8663
8700
  knowledge_bases: z.array(
8664
8701
  z.lazy(() => CreateAgentRequestKnowledgeBases$inboundSchema),
8665
8702
  ).optional(),
8703
+ source: CreateAgentRequestSource$inboundSchema.optional(),
8666
8704
  }).transform((v) => {
8667
8705
  return remap$(v, {
8668
8706
  "_id": "id",
@@ -8703,6 +8741,7 @@ export type CreateAgentRequestResponseBody$Outbound = {
8703
8741
  knowledge_bases?:
8704
8742
  | Array<CreateAgentRequestKnowledgeBases$Outbound>
8705
8743
  | undefined;
8744
+ source?: string | undefined;
8706
8745
  };
8707
8746
 
8708
8747
  /** @internal */
@@ -8737,6 +8776,7 @@ export const CreateAgentRequestResponseBody$outboundSchema: z.ZodType<
8737
8776
  knowledgeBases: z.array(
8738
8777
  z.lazy(() => CreateAgentRequestKnowledgeBases$outboundSchema),
8739
8778
  ).optional(),
8779
+ source: CreateAgentRequestSource$outboundSchema.optional(),
8740
8780
  }).transform((v) => {
8741
8781
  return remap$(v, {
8742
8782
  id: "_id",
@@ -44,7 +44,8 @@ export type CreateAgentResponseRequestRole = RoleUserMessage | RoleToolMessage;
44
44
  export type PublicMessagePart =
45
45
  | components.TextPart
46
46
  | components.FilePart
47
- | components.ToolResultPart;
47
+ | components.ToolResultPart
48
+ | components.ErrorPart;
48
49
 
49
50
  /**
50
51
  * The A2A message to send to the agent (user input or tool results)
@@ -62,12 +63,47 @@ export type A2AMessage = {
62
63
  * A2A message parts (text, file, or tool_result only)
63
64
  */
64
65
  parts: Array<
65
- components.TextPart | components.FilePart | components.ToolResultPart
66
+ | components.TextPart
67
+ | components.FilePart
68
+ | components.ToolResultPart
69
+ | components.ErrorPart
66
70
  >;
67
71
  };
68
72
 
69
73
  /**
70
- * Information about the contact making the request. If the contact does not exist, it will be created automatically.
74
+ * Information about the identity making the request. If the identity does not exist, it will be created automatically.
75
+ */
76
+ export type Identity = {
77
+ /**
78
+ * Unique identifier for the contact
79
+ */
80
+ id: string;
81
+ /**
82
+ * Display name of the contact
83
+ */
84
+ displayName?: string | undefined;
85
+ /**
86
+ * Email address of the contact
87
+ */
88
+ email?: string | undefined;
89
+ /**
90
+ * A hash of key/value pairs containing any other data about the contact
91
+ */
92
+ metadata?: Array<{ [k: string]: any }> | undefined;
93
+ /**
94
+ * URL to the contact's avatar or logo
95
+ */
96
+ logoUrl?: string | undefined;
97
+ /**
98
+ * A list of tags associated with the contact
99
+ */
100
+ tags?: Array<string> | undefined;
101
+ };
102
+
103
+ /**
104
+ * @deprecated Use identity instead. Information about the contact making the request.
105
+ *
106
+ * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
71
107
  */
72
108
  export type Contact = {
73
109
  /**
@@ -120,6 +156,9 @@ export type Memory = {
120
156
  entityId: string;
121
157
  };
122
158
 
159
+ /**
160
+ * Conversation context for chat studio integration
161
+ */
123
162
  export type Conversation = {
124
163
  /**
125
164
  * Unique ULID identifier for the conversation, prefixed with "conv_". Used to link agent executions to a specific conversation thread.
@@ -141,7 +180,13 @@ export type CreateAgentResponseRequestRequestBody = {
141
180
  */
142
181
  variables?: { [k: string]: any } | undefined;
143
182
  /**
144
- * Information about the contact making the request. If the contact does not exist, it will be created automatically.
183
+ * Information about the identity making the request. If the identity does not exist, it will be created automatically.
184
+ */
185
+ identity?: Identity | undefined;
186
+ /**
187
+ * @deprecated Use identity instead. Information about the contact making the request.
188
+ *
189
+ * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
145
190
  */
146
191
  contact?: Contact | undefined;
147
192
  /**
@@ -164,6 +209,9 @@ export type CreateAgentResponseRequestRequestBody = {
164
209
  * If true, returns Server-Sent Events (SSE) streaming response with real-time events. If false (default), returns standard JSON response.
165
210
  */
166
211
  stream?: boolean | undefined;
212
+ /**
213
+ * Conversation context for chat studio integration
214
+ */
167
215
  conversation?: Conversation | undefined;
168
216
  };
169
217
 
@@ -251,12 +299,14 @@ export const PublicMessagePart$inboundSchema: z.ZodType<
251
299
  components.TextPart$inboundSchema,
252
300
  components.FilePart$inboundSchema,
253
301
  components.ToolResultPart$inboundSchema,
302
+ components.ErrorPart$inboundSchema,
254
303
  ]);
255
304
  /** @internal */
256
305
  export type PublicMessagePart$Outbound =
257
306
  | components.TextPart$Outbound
258
307
  | components.FilePart$Outbound
259
- | components.ToolResultPart$Outbound;
308
+ | components.ToolResultPart$Outbound
309
+ | components.ErrorPart$Outbound;
260
310
 
261
311
  /** @internal */
262
312
  export const PublicMessagePart$outboundSchema: z.ZodType<
@@ -267,6 +317,7 @@ export const PublicMessagePart$outboundSchema: z.ZodType<
267
317
  components.TextPart$outboundSchema,
268
318
  components.FilePart$outboundSchema,
269
319
  components.ToolResultPart$outboundSchema,
320
+ components.ErrorPart$outboundSchema,
270
321
  ]);
271
322
 
272
323
  export function publicMessagePartToJSON(
@@ -299,6 +350,7 @@ export const A2AMessage$inboundSchema: z.ZodType<
299
350
  components.TextPart$inboundSchema,
300
351
  components.FilePart$inboundSchema,
301
352
  components.ToolResultPart$inboundSchema,
353
+ components.ErrorPart$inboundSchema,
302
354
  ]),
303
355
  ),
304
356
  });
@@ -310,6 +362,7 @@ export type A2AMessage$Outbound = {
310
362
  | components.TextPart$Outbound
311
363
  | components.FilePart$Outbound
312
364
  | components.ToolResultPart$Outbound
365
+ | components.ErrorPart$Outbound
313
366
  >;
314
367
  };
315
368
 
@@ -329,6 +382,7 @@ export const A2AMessage$outboundSchema: z.ZodType<
329
382
  components.TextPart$outboundSchema,
330
383
  components.FilePart$outboundSchema,
331
384
  components.ToolResultPart$outboundSchema,
385
+ components.ErrorPart$outboundSchema,
332
386
  ]),
333
387
  ),
334
388
  });
@@ -346,6 +400,66 @@ export function a2AMessageFromJSON(
346
400
  );
347
401
  }
348
402
 
403
+ /** @internal */
404
+ export const Identity$inboundSchema: z.ZodType<
405
+ Identity,
406
+ z.ZodTypeDef,
407
+ unknown
408
+ > = z.object({
409
+ id: z.string(),
410
+ display_name: z.string().optional(),
411
+ email: z.string().optional(),
412
+ metadata: z.array(z.record(z.any())).optional(),
413
+ logo_url: z.string().optional(),
414
+ tags: z.array(z.string()).optional(),
415
+ }).transform((v) => {
416
+ return remap$(v, {
417
+ "display_name": "displayName",
418
+ "logo_url": "logoUrl",
419
+ });
420
+ });
421
+ /** @internal */
422
+ export type Identity$Outbound = {
423
+ id: string;
424
+ display_name?: string | undefined;
425
+ email?: string | undefined;
426
+ metadata?: Array<{ [k: string]: any }> | undefined;
427
+ logo_url?: string | undefined;
428
+ tags?: Array<string> | undefined;
429
+ };
430
+
431
+ /** @internal */
432
+ export const Identity$outboundSchema: z.ZodType<
433
+ Identity$Outbound,
434
+ z.ZodTypeDef,
435
+ Identity
436
+ > = z.object({
437
+ id: z.string(),
438
+ displayName: z.string().optional(),
439
+ email: z.string().optional(),
440
+ metadata: z.array(z.record(z.any())).optional(),
441
+ logoUrl: z.string().optional(),
442
+ tags: z.array(z.string()).optional(),
443
+ }).transform((v) => {
444
+ return remap$(v, {
445
+ displayName: "display_name",
446
+ logoUrl: "logo_url",
447
+ });
448
+ });
449
+
450
+ export function identityToJSON(identity: Identity): string {
451
+ return JSON.stringify(Identity$outboundSchema.parse(identity));
452
+ }
453
+ export function identityFromJSON(
454
+ jsonString: string,
455
+ ): SafeParseResult<Identity, SDKValidationError> {
456
+ return safeParse(
457
+ jsonString,
458
+ (x) => Identity$inboundSchema.parse(JSON.parse(x)),
459
+ `Failed to parse 'Identity' from JSON`,
460
+ );
461
+ }
462
+
349
463
  /** @internal */
350
464
  export const Contact$inboundSchema: z.ZodType<Contact, z.ZodTypeDef, unknown> =
351
465
  z.object({
@@ -539,6 +653,7 @@ export const CreateAgentResponseRequestRequestBody$inboundSchema: z.ZodType<
539
653
  task_id: z.string().optional(),
540
654
  message: z.lazy(() => A2AMessage$inboundSchema),
541
655
  variables: z.record(z.any()).optional(),
656
+ identity: z.lazy(() => Identity$inboundSchema).optional(),
542
657
  contact: z.lazy(() => Contact$inboundSchema).optional(),
543
658
  thread: z.lazy(() => CreateAgentResponseRequestThread$inboundSchema)
544
659
  .optional(),
@@ -557,6 +672,7 @@ export type CreateAgentResponseRequestRequestBody$Outbound = {
557
672
  task_id?: string | undefined;
558
673
  message: A2AMessage$Outbound;
559
674
  variables?: { [k: string]: any } | undefined;
675
+ identity?: Identity$Outbound | undefined;
560
676
  contact?: Contact$Outbound | undefined;
561
677
  thread?: CreateAgentResponseRequestThread$Outbound | undefined;
562
678
  memory?: Memory$Outbound | undefined;
@@ -575,6 +691,7 @@ export const CreateAgentResponseRequestRequestBody$outboundSchema: z.ZodType<
575
691
  taskId: z.string().optional(),
576
692
  message: z.lazy(() => A2AMessage$outboundSchema),
577
693
  variables: z.record(z.any()).optional(),
694
+ identity: z.lazy(() => Identity$outboundSchema).optional(),
578
695
  contact: z.lazy(() => Contact$outboundSchema).optional(),
579
696
  thread: z.lazy(() => CreateAgentResponseRequestThread$outboundSchema)
580
697
  .optional(),