@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
@@ -86,10 +86,11 @@ async function $do(
86
86
  const body = encodeJSON("body", payload.RequestBody, { explode: true });
87
87
 
88
88
  const pathParams = {
89
- memory_id: encodeSimple("memory_id", payload.memory_id, {
90
- explode: false,
91
- charEncoding: "percent",
92
- }),
89
+ memory_entity_id: encodeSimple(
90
+ "memory_entity_id",
91
+ payload.memory_entity_id,
92
+ { explode: false, charEncoding: "percent" },
93
+ ),
93
94
  memory_store_key: encodeSimple(
94
95
  "memory_store_key",
95
96
  payload.memory_store_key,
@@ -98,7 +99,7 @@ async function $do(
98
99
  };
99
100
 
100
101
  const path = pathToFunc(
101
- "/v2/memory-stores/{memory_store_key}/memories/{memory_id}",
102
+ "/v2/memory-stores/{memory_store_key}/memories/{memory_entity_id}",
102
103
  )(pathParams);
103
104
 
104
105
  const headers = new Headers(compactMap({
@@ -17,7 +17,6 @@ import {
17
17
  RequestTimeoutError,
18
18
  UnexpectedClientError,
19
19
  } from "../models/errors/httpclienterrors.js";
20
- import * as errors from "../models/errors/index.js";
21
20
  import { OrqError } from "../models/errors/orqerror.js";
22
21
  import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
22
  import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
@@ -38,7 +37,6 @@ export function toolsCreate(
38
37
  ): APIPromise<
39
38
  Result<
40
39
  operations.CreateToolResponseBody,
41
- | errors.HonoApiError
42
40
  | OrqError
43
41
  | ResponseValidationError
44
42
  | ConnectionError
@@ -64,7 +62,6 @@ async function $do(
64
62
  [
65
63
  Result<
66
64
  operations.CreateToolResponseBody,
67
- | errors.HonoApiError
68
65
  | OrqError
69
66
  | ResponseValidationError
70
67
  | ConnectionError
@@ -134,7 +131,7 @@ async function $do(
134
131
 
135
132
  const doResult = await client._do(req, {
136
133
  context,
137
- errorCodes: ["400", "404", "4XX", "5XX"],
134
+ errorCodes: ["4XX", "5XX"],
138
135
  retryConfig: context.retryConfig,
139
136
  retryCodes: context.retryCodes,
140
137
  });
@@ -143,13 +140,8 @@ async function $do(
143
140
  }
144
141
  const response = doResult.value;
145
142
 
146
- const responseFields = {
147
- HttpMeta: { Response: response, Request: req },
148
- };
149
-
150
143
  const [result] = await M.match<
151
144
  operations.CreateToolResponseBody,
152
- | errors.HonoApiError
153
145
  | OrqError
154
146
  | ResponseValidationError
155
147
  | ConnectionError
@@ -160,10 +152,9 @@ async function $do(
160
152
  | SDKValidationError
161
153
  >(
162
154
  M.json(200, operations.CreateToolResponseBody$inboundSchema),
163
- M.jsonErr([400, 404], errors.HonoApiError$inboundSchema),
164
155
  M.fail("4XX"),
165
156
  M.fail("5XX"),
166
- )(response, req, { extraFields: responseFields });
157
+ )(response, req);
167
158
  if (!result.ok) {
168
159
  return [result, { status: "complete", request: req, response }];
169
160
  }
@@ -68,7 +68,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
68
68
  export const SDK_METADATA = {
69
69
  language: "typescript",
70
70
  openapiDocVersion: "2.0",
71
- sdkVersion: "4.2.0-rc.13",
72
- genVersion: "2.791.1",
73
- userAgent: "speakeasy-sdk/typescript 4.2.0-rc.13 2.791.1 2.0 @orq-ai/node",
71
+ sdkVersion: "4.2.0-rc.26",
72
+ genVersion: "2.794.1",
73
+ userAgent: "speakeasy-sdk/typescript 4.2.0-rc.26 2.794.1 2.0 @orq-ai/node",
74
74
  } as const;
@@ -308,9 +308,9 @@ export class ClientSDK {
308
308
  }
309
309
  }
310
310
 
311
- const jsonLikeContentTypeRE = /(application|text)\/.*?\+*json.*/;
311
+ const jsonLikeContentTypeRE = /^(application|text)\/([^+]+\+)*json.*/;
312
312
  const jsonlLikeContentTypeRE =
313
- /(application|text)\/(.*?\+*\bjsonl\b.*|.*?\+*\bx-ndjson\b.*)/;
313
+ /^(application|text)\/([^+]+\+)*(jsonl|x-ndjson)\b.*/;
314
314
  async function logRequest(logger: Logger | undefined, req: Request) {
315
315
  if (!logger) {
316
316
  return;
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "4.2.0-rc.13",
22
+ currentVersion: "4.2.0-rc.26",
23
23
  },
24
24
  });
25
25
 
@@ -30,6 +30,7 @@ import { tool$contactsList } from "./tools/contactsList.js";
30
30
  import { tool$contactsRetrieve } from "./tools/contactsRetrieve.js";
31
31
  import { tool$contactsUpdate } from "./tools/contactsUpdate.js";
32
32
  import { tool$conversationsCreate } from "./tools/conversationsCreate.js";
33
+ import { tool$conversationsCreateConversationResponse } from "./tools/conversationsCreateConversationResponse.js";
33
34
  import { tool$conversationsDelete } from "./tools/conversationsDelete.js";
34
35
  import { tool$conversationsGenerateName } from "./tools/conversationsGenerateName.js";
35
36
  import { tool$conversationsList } from "./tools/conversationsList.js";
@@ -57,7 +58,6 @@ import { tool$evalsDelete } from "./tools/evalsDelete.js";
57
58
  import { tool$evalsInvoke } from "./tools/evalsInvoke.js";
58
59
  import { tool$evalsUpdate } from "./tools/evalsUpdate.js";
59
60
  import { tool$evaluatorsGetV2EvaluatorsIdVersions } from "./tools/evaluatorsGetV2EvaluatorsIdVersions.js";
60
- import { tool$evaluatorsGetV2EvaluatorsIdVersionsVersionId } from "./tools/evaluatorsGetV2EvaluatorsIdVersionsVersionId.js";
61
61
  import { tool$feedbackCreate } from "./tools/feedbackCreate.js";
62
62
  import { tool$filesCreate } from "./tools/filesCreate.js";
63
63
  import { tool$filesDelete } from "./tools/filesDelete.js";
@@ -128,7 +128,7 @@ export function createMCPServer(deps: {
128
128
  }) {
129
129
  const server = new McpServer({
130
130
  name: "Orq",
131
- version: "4.2.0-rc.13",
131
+ version: "4.2.0-rc.26",
132
132
  });
133
133
 
134
134
  const client = new OrqCore({
@@ -172,7 +172,6 @@ export function createMCPServer(deps: {
172
172
  tool(tool$evalsDelete);
173
173
  tool(tool$evalsInvoke);
174
174
  tool(tool$evaluatorsGetV2EvaluatorsIdVersions);
175
- tool(tool$evaluatorsGetV2EvaluatorsIdVersionsVersionId);
176
175
  tool(tool$deploymentsInvoke);
177
176
  tool(tool$deploymentsList);
178
177
  tool(tool$deploymentsGetConfig);
@@ -192,6 +191,7 @@ export function createMCPServer(deps: {
192
191
  tool(tool$conversationsRetrieve);
193
192
  tool(tool$conversationsUpdate);
194
193
  tool(tool$conversationsDelete);
194
+ tool(tool$conversationsCreateConversationResponse);
195
195
  tool(tool$filesCreate);
196
196
  tool(tool$filesList);
197
197
  tool(tool$filesGet);
@@ -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,