@orq-ai/node 4.0.4 → 4.0.6

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 (170) hide show
  1. package/bin/mcp-server.js +213 -213
  2. package/bin/mcp-server.js.map +36 -36
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +2 -2
  6. package/lib/config.js +2 -2
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  9. package/models/operations/createbudget.js +2 -2
  10. package/models/operations/createcontact.js +2 -2
  11. package/models/operations/createdataset.js +2 -2
  12. package/models/operations/createdatasetitem.js +8 -8
  13. package/models/operations/createdatasource.js +2 -2
  14. package/models/operations/createeval.js +28 -28
  15. package/models/operations/createtool.js +12 -12
  16. package/models/operations/fileget.js +2 -2
  17. package/models/operations/filelist.js +2 -2
  18. package/models/operations/fileupload.js +2 -2
  19. package/models/operations/getalltools.js +12 -12
  20. package/models/operations/getbudget.js +2 -2
  21. package/models/operations/getevals.js +28 -28
  22. package/models/operations/listbudgets.js +2 -2
  23. package/models/operations/listcontacts.js +2 -2
  24. package/models/operations/listdatasetdatapoints.js +8 -8
  25. package/models/operations/listdatasets.js +2 -2
  26. package/models/operations/listdatasources.js +2 -2
  27. package/models/operations/retrievecontact.js +2 -2
  28. package/models/operations/retrievedatapoint.js +8 -8
  29. package/models/operations/retrievedataset.js +2 -2
  30. package/models/operations/retrievedatasource.js +2 -2
  31. package/models/operations/retrievetool.js +12 -12
  32. package/models/operations/runagent.js +2 -2
  33. package/models/operations/streamrunagent.js +2 -2
  34. package/models/operations/updatebudget.js +2 -2
  35. package/models/operations/updatecontact.js +2 -2
  36. package/models/operations/updatedatapoint.js +8 -8
  37. package/models/operations/updatedataset.js +2 -2
  38. package/models/operations/updatedatasource.js +2 -2
  39. package/models/operations/updateeval.js +28 -28
  40. package/models/operations/updatetool.js +14 -14
  41. package/package.json +1 -1
  42. package/packages/orq-rc/README.md +38 -47
  43. package/packages/orq-rc/docs/sdks/agents/README.md +230 -529
  44. package/packages/orq-rc/docs/sdks/responses/README.md +60 -65
  45. package/packages/orq-rc/examples/package-lock.json +1 -1
  46. package/packages/orq-rc/jsr.json +1 -1
  47. package/packages/orq-rc/package-lock.json +2 -2
  48. package/packages/orq-rc/package.json +1 -1
  49. package/packages/orq-rc/src/funcs/agentsCreate.ts +16 -14
  50. package/packages/orq-rc/src/funcs/agentsDelete.ts +10 -6
  51. package/packages/orq-rc/src/funcs/agentsInvoke.ts +16 -6
  52. package/packages/orq-rc/src/funcs/agentsList.ts +18 -6
  53. package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +23 -12
  54. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +21 -16
  55. package/packages/orq-rc/src/funcs/agentsRun.ts +4 -2
  56. package/packages/orq-rc/src/funcs/agentsStream.ts +16 -6
  57. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +4 -2
  58. package/packages/orq-rc/src/funcs/agentsUpdate.ts +14 -6
  59. package/packages/orq-rc/src/lib/config.ts +2 -2
  60. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  61. package/packages/orq-rc/src/mcp-server/server.ts +1 -9
  62. package/packages/orq-rc/src/mcp-server/tools/agentsCreate.ts +3 -3
  63. package/packages/orq-rc/src/mcp-server/tools/agentsDelete.ts +5 -5
  64. package/packages/orq-rc/src/mcp-server/tools/agentsInvoke.ts +7 -4
  65. package/packages/orq-rc/src/mcp-server/tools/agentsList.ts +9 -5
  66. package/packages/orq-rc/src/mcp-server/tools/agentsResponsesCreate.ts +8 -4
  67. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieve.ts +5 -5
  68. package/packages/orq-rc/src/mcp-server/tools/agentsRun.ts +2 -2
  69. package/packages/orq-rc/src/mcp-server/tools/agentsStream.ts +7 -4
  70. package/packages/orq-rc/src/mcp-server/tools/agentsStreamRun.ts +2 -2
  71. package/packages/orq-rc/src/mcp-server/tools/agentsUpdate.ts +8 -4
  72. package/packages/orq-rc/src/models/errors/createagentrequest.ts +67 -0
  73. package/packages/orq-rc/src/models/errors/deleteagent.ts +2 -2
  74. package/packages/orq-rc/src/models/errors/index.ts +2 -3
  75. package/packages/orq-rc/src/models/errors/{listagenttasks.ts → retrieveagentrequest.ts} +15 -15
  76. package/packages/orq-rc/src/models/errors/updateagent.ts +2 -2
  77. package/packages/orq-rc/src/models/operations/{createagent.ts → createagentrequest.ts} +1643 -1485
  78. package/packages/orq-rc/src/models/operations/{createagentresponse.ts → createagentresponserequest.ts} +141 -127
  79. package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
  80. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  81. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  82. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +8 -8
  83. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  84. package/packages/orq-rc/src/models/operations/createeval.ts +28 -28
  85. package/packages/orq-rc/src/models/operations/createprompt.ts +4 -4
  86. package/packages/orq-rc/src/models/operations/createtool.ts +12 -12
  87. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  88. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  89. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  90. package/packages/orq-rc/src/models/operations/getalltools.ts +12 -12
  91. package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
  92. package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
  93. package/packages/orq-rc/src/models/operations/index.ts +3 -7
  94. package/packages/orq-rc/src/models/operations/invokeagent.ts +153 -190
  95. package/packages/orq-rc/src/models/operations/listagents.ts +9 -21
  96. package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
  97. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  98. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +8 -8
  99. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  100. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  101. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +3741 -0
  102. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  103. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +8 -8
  104. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  105. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  106. package/packages/orq-rc/src/models/operations/retrievetool.ts +12 -12
  107. package/packages/orq-rc/src/models/operations/runagent.ts +53 -57
  108. package/packages/orq-rc/src/models/operations/streamagent.ts +1 -1
  109. package/packages/orq-rc/src/models/operations/streamrunagent.ts +68 -82
  110. package/packages/orq-rc/src/models/operations/updateagent.ts +17 -17
  111. package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
  112. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  113. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +8 -8
  114. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  115. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  116. package/packages/orq-rc/src/models/operations/updateeval.ts +28 -28
  117. package/packages/orq-rc/src/models/operations/updateprompt.ts +4 -4
  118. package/packages/orq-rc/src/models/operations/updatetool.ts +14 -14
  119. package/packages/orq-rc/src/sdk/agents.ts +51 -99
  120. package/packages/orq-rc/src/sdk/responses.ts +7 -5
  121. package/src/lib/config.ts +2 -2
  122. package/src/mcp-server/mcp-server.ts +1 -1
  123. package/src/mcp-server/server.ts +1 -1
  124. package/src/models/operations/createbudget.ts +2 -2
  125. package/src/models/operations/createcontact.ts +2 -2
  126. package/src/models/operations/createdataset.ts +2 -2
  127. package/src/models/operations/createdatasetitem.ts +8 -8
  128. package/src/models/operations/createdatasource.ts +2 -2
  129. package/src/models/operations/createeval.ts +28 -28
  130. package/src/models/operations/createtool.ts +12 -12
  131. package/src/models/operations/fileget.ts +2 -2
  132. package/src/models/operations/filelist.ts +2 -2
  133. package/src/models/operations/fileupload.ts +2 -2
  134. package/src/models/operations/getalltools.ts +12 -12
  135. package/src/models/operations/getbudget.ts +2 -2
  136. package/src/models/operations/getevals.ts +28 -28
  137. package/src/models/operations/listbudgets.ts +2 -2
  138. package/src/models/operations/listcontacts.ts +2 -2
  139. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  140. package/src/models/operations/listdatasets.ts +2 -2
  141. package/src/models/operations/listdatasources.ts +2 -2
  142. package/src/models/operations/retrievecontact.ts +2 -2
  143. package/src/models/operations/retrievedatapoint.ts +8 -8
  144. package/src/models/operations/retrievedataset.ts +2 -2
  145. package/src/models/operations/retrievedatasource.ts +2 -2
  146. package/src/models/operations/retrievetool.ts +12 -12
  147. package/src/models/operations/runagent.ts +2 -2
  148. package/src/models/operations/streamrunagent.ts +2 -2
  149. package/src/models/operations/updatebudget.ts +2 -2
  150. package/src/models/operations/updatecontact.ts +2 -2
  151. package/src/models/operations/updatedatapoint.ts +8 -8
  152. package/src/models/operations/updatedataset.ts +2 -2
  153. package/src/models/operations/updatedatasource.ts +2 -2
  154. package/src/models/operations/updateeval.ts +28 -28
  155. package/src/models/operations/updatetool.ts +14 -14
  156. package/packages/orq-rc/src/funcs/agentsListActions.ts +0 -169
  157. package/packages/orq-rc/src/funcs/agentsListTasks.ts +0 -183
  158. package/packages/orq-rc/src/funcs/agentsRetrieveAction.ts +0 -173
  159. package/packages/orq-rc/src/funcs/agentsRetrieveTask.ts +0 -179
  160. package/packages/orq-rc/src/mcp-server/tools/agentsListActions.ts +0 -35
  161. package/packages/orq-rc/src/mcp-server/tools/agentsListTasks.ts +0 -37
  162. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveAction.ts +0 -35
  163. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveTask.ts +0 -37
  164. package/packages/orq-rc/src/models/errors/createagent.ts +0 -67
  165. package/packages/orq-rc/src/models/errors/getagent.ts +0 -67
  166. package/packages/orq-rc/src/models/operations/getagent.ts +0 -3480
  167. package/packages/orq-rc/src/models/operations/getagenttask.ts +0 -2389
  168. package/packages/orq-rc/src/models/operations/listactions.ts +0 -427
  169. package/packages/orq-rc/src/models/operations/listagenttasks.ts +0 -2614
  170. package/packages/orq-rc/src/models/operations/retrieveaction.ts +0 -354
@@ -290,7 +290,7 @@ export type InvokeAgentAgentsKind = ClosedEnum<typeof InvokeAgentAgentsKind>;
290
290
  /**
291
291
  * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
292
292
  */
293
- export const InvokeAgentExtendedMessageRole = {
293
+ export const ExtendedMessageRole = {
294
294
  User: "user",
295
295
  Agent: "agent",
296
296
  Tool: "tool",
@@ -299,9 +299,7 @@ export const InvokeAgentExtendedMessageRole = {
299
299
  /**
300
300
  * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
301
301
  */
302
- export type InvokeAgentExtendedMessageRole = ClosedEnum<
303
- typeof InvokeAgentExtendedMessageRole
304
- >;
302
+ export type ExtendedMessageRole = ClosedEnum<typeof ExtendedMessageRole>;
305
303
 
306
304
  export const InvokeAgentPartsAgentsResponse200Kind = {
307
305
  ToolResult: "tool_result",
@@ -313,7 +311,7 @@ export type InvokeAgentPartsAgentsResponse200Kind = ClosedEnum<
313
311
  /**
314
312
  * The result of a tool execution. Contains the tool call ID for correlation and the result data from the tool invocation.
315
313
  */
316
- export type InvokeAgentPartsToolResultPart = {
314
+ export type PartsToolResultPart = {
317
315
  kind: InvokeAgentPartsAgentsResponse200Kind;
318
316
  toolCallId: string;
319
317
  result?: any | undefined;
@@ -330,7 +328,7 @@ export type InvokeAgentPartsAgentsResponseKind = ClosedEnum<
330
328
  /**
331
329
  * A tool invocation request from an agent. Contains the tool name, unique call ID, and arguments for the tool execution.
332
330
  */
333
- export type InvokeAgentPartsToolCallPart = {
331
+ export type ToolCallPart = {
334
332
  kind: InvokeAgentPartsAgentsResponseKind;
335
333
  toolName: string;
336
334
  toolCallId: string;
@@ -381,14 +379,14 @@ export type InvokeAgentFileBinaryFormat = {
381
379
  name?: string | undefined;
382
380
  };
383
381
 
384
- export type InvokeAgentPartsFile =
382
+ export type PartsFile =
385
383
  | InvokeAgentFileBinaryFormat
386
384
  | InvokeAgentFileFileInURIFormat;
387
385
 
388
386
  /**
389
387
  * A file content part that can contain either base64-encoded bytes or a URI reference. Used for images, documents, and other binary content in agent communications.
390
388
  */
391
- export type InvokeAgentPartsFilePart = {
389
+ export type PartsFilePart = {
392
390
  kind: InvokeAgentPartsAgentsKind;
393
391
  file: InvokeAgentFileBinaryFormat | InvokeAgentFileFileInURIFormat;
394
392
  metadata?: { [k: string]: any } | undefined;
@@ -402,33 +400,31 @@ export type InvokeAgentPartsKind = ClosedEnum<typeof InvokeAgentPartsKind>;
402
400
  /**
403
401
  * A structured data part containing JSON-serializable key-value pairs. Used for passing structured information between agents and tools.
404
402
  */
405
- export type InvokeAgentPartsDataPart = {
403
+ export type DataPart = {
406
404
  kind: InvokeAgentPartsKind;
407
405
  data: { [k: string]: any };
408
406
  metadata?: { [k: string]: any } | undefined;
409
407
  };
410
408
 
411
- export const InvokeAgentPartsAgentsResponse200ApplicationJSONKind = {
409
+ export const PartsKind = {
412
410
  Text: "text",
413
411
  } as const;
414
- export type InvokeAgentPartsAgentsResponse200ApplicationJSONKind = ClosedEnum<
415
- typeof InvokeAgentPartsAgentsResponse200ApplicationJSONKind
416
- >;
412
+ export type PartsKind = ClosedEnum<typeof PartsKind>;
417
413
 
418
414
  /**
419
415
  * A text content part containing plain text or markdown. Used for agent messages, user input, and text-based responses.
420
416
  */
421
- export type InvokeAgentPartsTextPart = {
422
- kind: InvokeAgentPartsAgentsResponse200ApplicationJSONKind;
417
+ export type PartsTextPart = {
418
+ kind: PartsKind;
423
419
  text: string;
424
420
  };
425
421
 
426
- export type InvokeAgentParts =
427
- | InvokeAgentPartsToolCallPart
428
- | InvokeAgentPartsTextPart
429
- | InvokeAgentPartsDataPart
430
- | InvokeAgentPartsFilePart
431
- | InvokeAgentPartsToolResultPart;
422
+ export type Parts =
423
+ | ToolCallPart
424
+ | PartsTextPart
425
+ | DataPart
426
+ | PartsFilePart
427
+ | PartsToolResultPart;
432
428
 
433
429
  /**
434
430
  * Optional A2A message providing additional context about the current status
@@ -439,13 +435,13 @@ export type TaskStatusMessage = {
439
435
  /**
440
436
  * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
441
437
  */
442
- role: InvokeAgentExtendedMessageRole;
438
+ role: ExtendedMessageRole;
443
439
  parts: Array<
444
- | InvokeAgentPartsToolCallPart
445
- | InvokeAgentPartsTextPart
446
- | InvokeAgentPartsDataPart
447
- | InvokeAgentPartsFilePart
448
- | InvokeAgentPartsToolResultPart
440
+ | ToolCallPart
441
+ | PartsTextPart
442
+ | DataPart
443
+ | PartsFilePart
444
+ | PartsToolResultPart
449
445
  >;
450
446
  };
451
447
 
@@ -1267,13 +1263,13 @@ export const InvokeAgentAgentsKind$outboundSchema: z.ZodNativeEnum<
1267
1263
  > = InvokeAgentAgentsKind$inboundSchema;
1268
1264
 
1269
1265
  /** @internal */
1270
- export const InvokeAgentExtendedMessageRole$inboundSchema: z.ZodNativeEnum<
1271
- typeof InvokeAgentExtendedMessageRole
1272
- > = z.nativeEnum(InvokeAgentExtendedMessageRole);
1266
+ export const ExtendedMessageRole$inboundSchema: z.ZodNativeEnum<
1267
+ typeof ExtendedMessageRole
1268
+ > = z.nativeEnum(ExtendedMessageRole);
1273
1269
  /** @internal */
1274
- export const InvokeAgentExtendedMessageRole$outboundSchema: z.ZodNativeEnum<
1275
- typeof InvokeAgentExtendedMessageRole
1276
- > = InvokeAgentExtendedMessageRole$inboundSchema;
1270
+ export const ExtendedMessageRole$outboundSchema: z.ZodNativeEnum<
1271
+ typeof ExtendedMessageRole
1272
+ > = ExtendedMessageRole$inboundSchema;
1277
1273
 
1278
1274
  /** @internal */
1279
1275
  export const InvokeAgentPartsAgentsResponse200Kind$inboundSchema:
@@ -1286,8 +1282,8 @@ export const InvokeAgentPartsAgentsResponse200Kind$outboundSchema:
1286
1282
  InvokeAgentPartsAgentsResponse200Kind$inboundSchema;
1287
1283
 
1288
1284
  /** @internal */
1289
- export const InvokeAgentPartsToolResultPart$inboundSchema: z.ZodType<
1290
- InvokeAgentPartsToolResultPart,
1285
+ export const PartsToolResultPart$inboundSchema: z.ZodType<
1286
+ PartsToolResultPart,
1291
1287
  z.ZodTypeDef,
1292
1288
  unknown
1293
1289
  > = z.object({
@@ -1301,7 +1297,7 @@ export const InvokeAgentPartsToolResultPart$inboundSchema: z.ZodType<
1301
1297
  });
1302
1298
  });
1303
1299
  /** @internal */
1304
- export type InvokeAgentPartsToolResultPart$Outbound = {
1300
+ export type PartsToolResultPart$Outbound = {
1305
1301
  kind: string;
1306
1302
  tool_call_id: string;
1307
1303
  result?: any | undefined;
@@ -1309,10 +1305,10 @@ export type InvokeAgentPartsToolResultPart$Outbound = {
1309
1305
  };
1310
1306
 
1311
1307
  /** @internal */
1312
- export const InvokeAgentPartsToolResultPart$outboundSchema: z.ZodType<
1313
- InvokeAgentPartsToolResultPart$Outbound,
1308
+ export const PartsToolResultPart$outboundSchema: z.ZodType<
1309
+ PartsToolResultPart$Outbound,
1314
1310
  z.ZodTypeDef,
1315
- InvokeAgentPartsToolResultPart
1311
+ PartsToolResultPart
1316
1312
  > = z.object({
1317
1313
  kind: InvokeAgentPartsAgentsResponse200Kind$outboundSchema,
1318
1314
  toolCallId: z.string(),
@@ -1324,22 +1320,20 @@ export const InvokeAgentPartsToolResultPart$outboundSchema: z.ZodType<
1324
1320
  });
1325
1321
  });
1326
1322
 
1327
- export function invokeAgentPartsToolResultPartToJSON(
1328
- invokeAgentPartsToolResultPart: InvokeAgentPartsToolResultPart,
1323
+ export function partsToolResultPartToJSON(
1324
+ partsToolResultPart: PartsToolResultPart,
1329
1325
  ): string {
1330
1326
  return JSON.stringify(
1331
- InvokeAgentPartsToolResultPart$outboundSchema.parse(
1332
- invokeAgentPartsToolResultPart,
1333
- ),
1327
+ PartsToolResultPart$outboundSchema.parse(partsToolResultPart),
1334
1328
  );
1335
1329
  }
1336
- export function invokeAgentPartsToolResultPartFromJSON(
1330
+ export function partsToolResultPartFromJSON(
1337
1331
  jsonString: string,
1338
- ): SafeParseResult<InvokeAgentPartsToolResultPart, SDKValidationError> {
1332
+ ): SafeParseResult<PartsToolResultPart, SDKValidationError> {
1339
1333
  return safeParse(
1340
1334
  jsonString,
1341
- (x) => InvokeAgentPartsToolResultPart$inboundSchema.parse(JSON.parse(x)),
1342
- `Failed to parse 'InvokeAgentPartsToolResultPart' from JSON`,
1335
+ (x) => PartsToolResultPart$inboundSchema.parse(JSON.parse(x)),
1336
+ `Failed to parse 'PartsToolResultPart' from JSON`,
1343
1337
  );
1344
1338
  }
1345
1339
 
@@ -1353,8 +1347,8 @@ export const InvokeAgentPartsAgentsResponseKind$outboundSchema: z.ZodNativeEnum<
1353
1347
  > = InvokeAgentPartsAgentsResponseKind$inboundSchema;
1354
1348
 
1355
1349
  /** @internal */
1356
- export const InvokeAgentPartsToolCallPart$inboundSchema: z.ZodType<
1357
- InvokeAgentPartsToolCallPart,
1350
+ export const ToolCallPart$inboundSchema: z.ZodType<
1351
+ ToolCallPart,
1358
1352
  z.ZodTypeDef,
1359
1353
  unknown
1360
1354
  > = z.object({
@@ -1370,7 +1364,7 @@ export const InvokeAgentPartsToolCallPart$inboundSchema: z.ZodType<
1370
1364
  });
1371
1365
  });
1372
1366
  /** @internal */
1373
- export type InvokeAgentPartsToolCallPart$Outbound = {
1367
+ export type ToolCallPart$Outbound = {
1374
1368
  kind: string;
1375
1369
  tool_name: string;
1376
1370
  tool_call_id: string;
@@ -1379,10 +1373,10 @@ export type InvokeAgentPartsToolCallPart$Outbound = {
1379
1373
  };
1380
1374
 
1381
1375
  /** @internal */
1382
- export const InvokeAgentPartsToolCallPart$outboundSchema: z.ZodType<
1383
- InvokeAgentPartsToolCallPart$Outbound,
1376
+ export const ToolCallPart$outboundSchema: z.ZodType<
1377
+ ToolCallPart$Outbound,
1384
1378
  z.ZodTypeDef,
1385
- InvokeAgentPartsToolCallPart
1379
+ ToolCallPart
1386
1380
  > = z.object({
1387
1381
  kind: InvokeAgentPartsAgentsResponseKind$outboundSchema,
1388
1382
  toolName: z.string(),
@@ -1396,22 +1390,16 @@ export const InvokeAgentPartsToolCallPart$outboundSchema: z.ZodType<
1396
1390
  });
1397
1391
  });
1398
1392
 
1399
- export function invokeAgentPartsToolCallPartToJSON(
1400
- invokeAgentPartsToolCallPart: InvokeAgentPartsToolCallPart,
1401
- ): string {
1402
- return JSON.stringify(
1403
- InvokeAgentPartsToolCallPart$outboundSchema.parse(
1404
- invokeAgentPartsToolCallPart,
1405
- ),
1406
- );
1393
+ export function toolCallPartToJSON(toolCallPart: ToolCallPart): string {
1394
+ return JSON.stringify(ToolCallPart$outboundSchema.parse(toolCallPart));
1407
1395
  }
1408
- export function invokeAgentPartsToolCallPartFromJSON(
1396
+ export function toolCallPartFromJSON(
1409
1397
  jsonString: string,
1410
- ): SafeParseResult<InvokeAgentPartsToolCallPart, SDKValidationError> {
1398
+ ): SafeParseResult<ToolCallPart, SDKValidationError> {
1411
1399
  return safeParse(
1412
1400
  jsonString,
1413
- (x) => InvokeAgentPartsToolCallPart$inboundSchema.parse(JSON.parse(x)),
1414
- `Failed to parse 'InvokeAgentPartsToolCallPart' from JSON`,
1401
+ (x) => ToolCallPart$inboundSchema.parse(JSON.parse(x)),
1402
+ `Failed to parse 'ToolCallPart' from JSON`,
1415
1403
  );
1416
1404
  }
1417
1405
 
@@ -1519,8 +1507,8 @@ export function invokeAgentFileBinaryFormatFromJSON(
1519
1507
  }
1520
1508
 
1521
1509
  /** @internal */
1522
- export const InvokeAgentPartsFile$inboundSchema: z.ZodType<
1523
- InvokeAgentPartsFile,
1510
+ export const PartsFile$inboundSchema: z.ZodType<
1511
+ PartsFile,
1524
1512
  z.ZodTypeDef,
1525
1513
  unknown
1526
1514
  > = z.union([
@@ -1528,40 +1516,36 @@ export const InvokeAgentPartsFile$inboundSchema: z.ZodType<
1528
1516
  z.lazy(() => InvokeAgentFileFileInURIFormat$inboundSchema),
1529
1517
  ]);
1530
1518
  /** @internal */
1531
- export type InvokeAgentPartsFile$Outbound =
1519
+ export type PartsFile$Outbound =
1532
1520
  | InvokeAgentFileBinaryFormat$Outbound
1533
1521
  | InvokeAgentFileFileInURIFormat$Outbound;
1534
1522
 
1535
1523
  /** @internal */
1536
- export const InvokeAgentPartsFile$outboundSchema: z.ZodType<
1537
- InvokeAgentPartsFile$Outbound,
1524
+ export const PartsFile$outboundSchema: z.ZodType<
1525
+ PartsFile$Outbound,
1538
1526
  z.ZodTypeDef,
1539
- InvokeAgentPartsFile
1527
+ PartsFile
1540
1528
  > = z.union([
1541
1529
  z.lazy(() => InvokeAgentFileBinaryFormat$outboundSchema),
1542
1530
  z.lazy(() => InvokeAgentFileFileInURIFormat$outboundSchema),
1543
1531
  ]);
1544
1532
 
1545
- export function invokeAgentPartsFileToJSON(
1546
- invokeAgentPartsFile: InvokeAgentPartsFile,
1547
- ): string {
1548
- return JSON.stringify(
1549
- InvokeAgentPartsFile$outboundSchema.parse(invokeAgentPartsFile),
1550
- );
1533
+ export function partsFileToJSON(partsFile: PartsFile): string {
1534
+ return JSON.stringify(PartsFile$outboundSchema.parse(partsFile));
1551
1535
  }
1552
- export function invokeAgentPartsFileFromJSON(
1536
+ export function partsFileFromJSON(
1553
1537
  jsonString: string,
1554
- ): SafeParseResult<InvokeAgentPartsFile, SDKValidationError> {
1538
+ ): SafeParseResult<PartsFile, SDKValidationError> {
1555
1539
  return safeParse(
1556
1540
  jsonString,
1557
- (x) => InvokeAgentPartsFile$inboundSchema.parse(JSON.parse(x)),
1558
- `Failed to parse 'InvokeAgentPartsFile' from JSON`,
1541
+ (x) => PartsFile$inboundSchema.parse(JSON.parse(x)),
1542
+ `Failed to parse 'PartsFile' from JSON`,
1559
1543
  );
1560
1544
  }
1561
1545
 
1562
1546
  /** @internal */
1563
- export const InvokeAgentPartsFilePart$inboundSchema: z.ZodType<
1564
- InvokeAgentPartsFilePart,
1547
+ export const PartsFilePart$inboundSchema: z.ZodType<
1548
+ PartsFilePart,
1565
1549
  z.ZodTypeDef,
1566
1550
  unknown
1567
1551
  > = z.object({
@@ -1573,7 +1557,7 @@ export const InvokeAgentPartsFilePart$inboundSchema: z.ZodType<
1573
1557
  metadata: z.record(z.any()).optional(),
1574
1558
  });
1575
1559
  /** @internal */
1576
- export type InvokeAgentPartsFilePart$Outbound = {
1560
+ export type PartsFilePart$Outbound = {
1577
1561
  kind: string;
1578
1562
  file:
1579
1563
  | InvokeAgentFileBinaryFormat$Outbound
@@ -1582,10 +1566,10 @@ export type InvokeAgentPartsFilePart$Outbound = {
1582
1566
  };
1583
1567
 
1584
1568
  /** @internal */
1585
- export const InvokeAgentPartsFilePart$outboundSchema: z.ZodType<
1586
- InvokeAgentPartsFilePart$Outbound,
1569
+ export const PartsFilePart$outboundSchema: z.ZodType<
1570
+ PartsFilePart$Outbound,
1587
1571
  z.ZodTypeDef,
1588
- InvokeAgentPartsFilePart
1572
+ PartsFilePart
1589
1573
  > = z.object({
1590
1574
  kind: InvokeAgentPartsAgentsKind$outboundSchema,
1591
1575
  file: z.union([
@@ -1595,20 +1579,16 @@ export const InvokeAgentPartsFilePart$outboundSchema: z.ZodType<
1595
1579
  metadata: z.record(z.any()).optional(),
1596
1580
  });
1597
1581
 
1598
- export function invokeAgentPartsFilePartToJSON(
1599
- invokeAgentPartsFilePart: InvokeAgentPartsFilePart,
1600
- ): string {
1601
- return JSON.stringify(
1602
- InvokeAgentPartsFilePart$outboundSchema.parse(invokeAgentPartsFilePart),
1603
- );
1582
+ export function partsFilePartToJSON(partsFilePart: PartsFilePart): string {
1583
+ return JSON.stringify(PartsFilePart$outboundSchema.parse(partsFilePart));
1604
1584
  }
1605
- export function invokeAgentPartsFilePartFromJSON(
1585
+ export function partsFilePartFromJSON(
1606
1586
  jsonString: string,
1607
- ): SafeParseResult<InvokeAgentPartsFilePart, SDKValidationError> {
1587
+ ): SafeParseResult<PartsFilePart, SDKValidationError> {
1608
1588
  return safeParse(
1609
1589
  jsonString,
1610
- (x) => InvokeAgentPartsFilePart$inboundSchema.parse(JSON.parse(x)),
1611
- `Failed to parse 'InvokeAgentPartsFilePart' from JSON`,
1590
+ (x) => PartsFilePart$inboundSchema.parse(JSON.parse(x)),
1591
+ `Failed to parse 'PartsFilePart' from JSON`,
1612
1592
  );
1613
1593
  }
1614
1594
 
@@ -1622,8 +1602,8 @@ export const InvokeAgentPartsKind$outboundSchema: z.ZodNativeEnum<
1622
1602
  > = InvokeAgentPartsKind$inboundSchema;
1623
1603
 
1624
1604
  /** @internal */
1625
- export const InvokeAgentPartsDataPart$inboundSchema: z.ZodType<
1626
- InvokeAgentPartsDataPart,
1605
+ export const DataPart$inboundSchema: z.ZodType<
1606
+ DataPart,
1627
1607
  z.ZodTypeDef,
1628
1608
  unknown
1629
1609
  > = z.object({
@@ -1632,138 +1612,121 @@ export const InvokeAgentPartsDataPart$inboundSchema: z.ZodType<
1632
1612
  metadata: z.record(z.any()).optional(),
1633
1613
  });
1634
1614
  /** @internal */
1635
- export type InvokeAgentPartsDataPart$Outbound = {
1615
+ export type DataPart$Outbound = {
1636
1616
  kind: string;
1637
1617
  data: { [k: string]: any };
1638
1618
  metadata?: { [k: string]: any } | undefined;
1639
1619
  };
1640
1620
 
1641
1621
  /** @internal */
1642
- export const InvokeAgentPartsDataPart$outboundSchema: z.ZodType<
1643
- InvokeAgentPartsDataPart$Outbound,
1622
+ export const DataPart$outboundSchema: z.ZodType<
1623
+ DataPart$Outbound,
1644
1624
  z.ZodTypeDef,
1645
- InvokeAgentPartsDataPart
1625
+ DataPart
1646
1626
  > = z.object({
1647
1627
  kind: InvokeAgentPartsKind$outboundSchema,
1648
1628
  data: z.record(z.any()),
1649
1629
  metadata: z.record(z.any()).optional(),
1650
1630
  });
1651
1631
 
1652
- export function invokeAgentPartsDataPartToJSON(
1653
- invokeAgentPartsDataPart: InvokeAgentPartsDataPart,
1654
- ): string {
1655
- return JSON.stringify(
1656
- InvokeAgentPartsDataPart$outboundSchema.parse(invokeAgentPartsDataPart),
1657
- );
1632
+ export function dataPartToJSON(dataPart: DataPart): string {
1633
+ return JSON.stringify(DataPart$outboundSchema.parse(dataPart));
1658
1634
  }
1659
- export function invokeAgentPartsDataPartFromJSON(
1635
+ export function dataPartFromJSON(
1660
1636
  jsonString: string,
1661
- ): SafeParseResult<InvokeAgentPartsDataPart, SDKValidationError> {
1637
+ ): SafeParseResult<DataPart, SDKValidationError> {
1662
1638
  return safeParse(
1663
1639
  jsonString,
1664
- (x) => InvokeAgentPartsDataPart$inboundSchema.parse(JSON.parse(x)),
1665
- `Failed to parse 'InvokeAgentPartsDataPart' from JSON`,
1640
+ (x) => DataPart$inboundSchema.parse(JSON.parse(x)),
1641
+ `Failed to parse 'DataPart' from JSON`,
1666
1642
  );
1667
1643
  }
1668
1644
 
1669
1645
  /** @internal */
1670
- export const InvokeAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema:
1671
- z.ZodNativeEnum<typeof InvokeAgentPartsAgentsResponse200ApplicationJSONKind> =
1672
- z.nativeEnum(InvokeAgentPartsAgentsResponse200ApplicationJSONKind);
1646
+ export const PartsKind$inboundSchema: z.ZodNativeEnum<typeof PartsKind> = z
1647
+ .nativeEnum(PartsKind);
1673
1648
  /** @internal */
1674
- export const InvokeAgentPartsAgentsResponse200ApplicationJSONKind$outboundSchema:
1675
- z.ZodNativeEnum<typeof InvokeAgentPartsAgentsResponse200ApplicationJSONKind> =
1676
- InvokeAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema;
1649
+ export const PartsKind$outboundSchema: z.ZodNativeEnum<typeof PartsKind> =
1650
+ PartsKind$inboundSchema;
1677
1651
 
1678
1652
  /** @internal */
1679
- export const InvokeAgentPartsTextPart$inboundSchema: z.ZodType<
1680
- InvokeAgentPartsTextPart,
1653
+ export const PartsTextPart$inboundSchema: z.ZodType<
1654
+ PartsTextPart,
1681
1655
  z.ZodTypeDef,
1682
1656
  unknown
1683
1657
  > = z.object({
1684
- kind: InvokeAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema,
1658
+ kind: PartsKind$inboundSchema,
1685
1659
  text: z.string(),
1686
1660
  });
1687
1661
  /** @internal */
1688
- export type InvokeAgentPartsTextPart$Outbound = {
1662
+ export type PartsTextPart$Outbound = {
1689
1663
  kind: string;
1690
1664
  text: string;
1691
1665
  };
1692
1666
 
1693
1667
  /** @internal */
1694
- export const InvokeAgentPartsTextPart$outboundSchema: z.ZodType<
1695
- InvokeAgentPartsTextPart$Outbound,
1668
+ export const PartsTextPart$outboundSchema: z.ZodType<
1669
+ PartsTextPart$Outbound,
1696
1670
  z.ZodTypeDef,
1697
- InvokeAgentPartsTextPart
1671
+ PartsTextPart
1698
1672
  > = z.object({
1699
- kind: InvokeAgentPartsAgentsResponse200ApplicationJSONKind$outboundSchema,
1673
+ kind: PartsKind$outboundSchema,
1700
1674
  text: z.string(),
1701
1675
  });
1702
1676
 
1703
- export function invokeAgentPartsTextPartToJSON(
1704
- invokeAgentPartsTextPart: InvokeAgentPartsTextPart,
1705
- ): string {
1706
- return JSON.stringify(
1707
- InvokeAgentPartsTextPart$outboundSchema.parse(invokeAgentPartsTextPart),
1708
- );
1677
+ export function partsTextPartToJSON(partsTextPart: PartsTextPart): string {
1678
+ return JSON.stringify(PartsTextPart$outboundSchema.parse(partsTextPart));
1709
1679
  }
1710
- export function invokeAgentPartsTextPartFromJSON(
1680
+ export function partsTextPartFromJSON(
1711
1681
  jsonString: string,
1712
- ): SafeParseResult<InvokeAgentPartsTextPart, SDKValidationError> {
1682
+ ): SafeParseResult<PartsTextPart, SDKValidationError> {
1713
1683
  return safeParse(
1714
1684
  jsonString,
1715
- (x) => InvokeAgentPartsTextPart$inboundSchema.parse(JSON.parse(x)),
1716
- `Failed to parse 'InvokeAgentPartsTextPart' from JSON`,
1685
+ (x) => PartsTextPart$inboundSchema.parse(JSON.parse(x)),
1686
+ `Failed to parse 'PartsTextPart' from JSON`,
1717
1687
  );
1718
1688
  }
1719
1689
 
1720
1690
  /** @internal */
1721
- export const InvokeAgentParts$inboundSchema: z.ZodType<
1722
- InvokeAgentParts,
1723
- z.ZodTypeDef,
1724
- unknown
1725
- > = z.union([
1726
- z.lazy(() => InvokeAgentPartsToolCallPart$inboundSchema),
1727
- z.lazy(() => InvokeAgentPartsTextPart$inboundSchema),
1728
- z.lazy(() => InvokeAgentPartsDataPart$inboundSchema),
1729
- z.lazy(() => InvokeAgentPartsFilePart$inboundSchema),
1730
- z.lazy(() => InvokeAgentPartsToolResultPart$inboundSchema),
1731
- ]);
1691
+ export const Parts$inboundSchema: z.ZodType<Parts, z.ZodTypeDef, unknown> = z
1692
+ .union([
1693
+ z.lazy(() => ToolCallPart$inboundSchema),
1694
+ z.lazy(() => PartsTextPart$inboundSchema),
1695
+ z.lazy(() => DataPart$inboundSchema),
1696
+ z.lazy(() => PartsFilePart$inboundSchema),
1697
+ z.lazy(() => PartsToolResultPart$inboundSchema),
1698
+ ]);
1732
1699
  /** @internal */
1733
- export type InvokeAgentParts$Outbound =
1734
- | InvokeAgentPartsToolCallPart$Outbound
1735
- | InvokeAgentPartsTextPart$Outbound
1736
- | InvokeAgentPartsDataPart$Outbound
1737
- | InvokeAgentPartsFilePart$Outbound
1738
- | InvokeAgentPartsToolResultPart$Outbound;
1700
+ export type Parts$Outbound =
1701
+ | ToolCallPart$Outbound
1702
+ | PartsTextPart$Outbound
1703
+ | DataPart$Outbound
1704
+ | PartsFilePart$Outbound
1705
+ | PartsToolResultPart$Outbound;
1739
1706
 
1740
1707
  /** @internal */
1741
- export const InvokeAgentParts$outboundSchema: z.ZodType<
1742
- InvokeAgentParts$Outbound,
1708
+ export const Parts$outboundSchema: z.ZodType<
1709
+ Parts$Outbound,
1743
1710
  z.ZodTypeDef,
1744
- InvokeAgentParts
1711
+ Parts
1745
1712
  > = z.union([
1746
- z.lazy(() => InvokeAgentPartsToolCallPart$outboundSchema),
1747
- z.lazy(() => InvokeAgentPartsTextPart$outboundSchema),
1748
- z.lazy(() => InvokeAgentPartsDataPart$outboundSchema),
1749
- z.lazy(() => InvokeAgentPartsFilePart$outboundSchema),
1750
- z.lazy(() => InvokeAgentPartsToolResultPart$outboundSchema),
1713
+ z.lazy(() => ToolCallPart$outboundSchema),
1714
+ z.lazy(() => PartsTextPart$outboundSchema),
1715
+ z.lazy(() => DataPart$outboundSchema),
1716
+ z.lazy(() => PartsFilePart$outboundSchema),
1717
+ z.lazy(() => PartsToolResultPart$outboundSchema),
1751
1718
  ]);
1752
1719
 
1753
- export function invokeAgentPartsToJSON(
1754
- invokeAgentParts: InvokeAgentParts,
1755
- ): string {
1756
- return JSON.stringify(
1757
- InvokeAgentParts$outboundSchema.parse(invokeAgentParts),
1758
- );
1720
+ export function partsToJSON(parts: Parts): string {
1721
+ return JSON.stringify(Parts$outboundSchema.parse(parts));
1759
1722
  }
1760
- export function invokeAgentPartsFromJSON(
1723
+ export function partsFromJSON(
1761
1724
  jsonString: string,
1762
- ): SafeParseResult<InvokeAgentParts, SDKValidationError> {
1725
+ ): SafeParseResult<Parts, SDKValidationError> {
1763
1726
  return safeParse(
1764
1727
  jsonString,
1765
- (x) => InvokeAgentParts$inboundSchema.parse(JSON.parse(x)),
1766
- `Failed to parse 'InvokeAgentParts' from JSON`,
1728
+ (x) => Parts$inboundSchema.parse(JSON.parse(x)),
1729
+ `Failed to parse 'Parts' from JSON`,
1767
1730
  );
1768
1731
  }
1769
1732
 
@@ -1775,14 +1738,14 @@ export const TaskStatusMessage$inboundSchema: z.ZodType<
1775
1738
  > = z.object({
1776
1739
  kind: InvokeAgentAgentsKind$inboundSchema,
1777
1740
  messageId: z.string(),
1778
- role: InvokeAgentExtendedMessageRole$inboundSchema,
1741
+ role: ExtendedMessageRole$inboundSchema,
1779
1742
  parts: z.array(
1780
1743
  z.union([
1781
- z.lazy(() => InvokeAgentPartsToolCallPart$inboundSchema),
1782
- z.lazy(() => InvokeAgentPartsTextPart$inboundSchema),
1783
- z.lazy(() => InvokeAgentPartsDataPart$inboundSchema),
1784
- z.lazy(() => InvokeAgentPartsFilePart$inboundSchema),
1785
- z.lazy(() => InvokeAgentPartsToolResultPart$inboundSchema),
1744
+ z.lazy(() => ToolCallPart$inboundSchema),
1745
+ z.lazy(() => PartsTextPart$inboundSchema),
1746
+ z.lazy(() => DataPart$inboundSchema),
1747
+ z.lazy(() => PartsFilePart$inboundSchema),
1748
+ z.lazy(() => PartsToolResultPart$inboundSchema),
1786
1749
  ]),
1787
1750
  ),
1788
1751
  });
@@ -1792,11 +1755,11 @@ export type TaskStatusMessage$Outbound = {
1792
1755
  messageId: string;
1793
1756
  role: string;
1794
1757
  parts: Array<
1795
- | InvokeAgentPartsToolCallPart$Outbound
1796
- | InvokeAgentPartsTextPart$Outbound
1797
- | InvokeAgentPartsDataPart$Outbound
1798
- | InvokeAgentPartsFilePart$Outbound
1799
- | InvokeAgentPartsToolResultPart$Outbound
1758
+ | ToolCallPart$Outbound
1759
+ | PartsTextPart$Outbound
1760
+ | DataPart$Outbound
1761
+ | PartsFilePart$Outbound
1762
+ | PartsToolResultPart$Outbound
1800
1763
  >;
1801
1764
  };
1802
1765
 
@@ -1808,14 +1771,14 @@ export const TaskStatusMessage$outboundSchema: z.ZodType<
1808
1771
  > = z.object({
1809
1772
  kind: InvokeAgentAgentsKind$outboundSchema,
1810
1773
  messageId: z.string(),
1811
- role: InvokeAgentExtendedMessageRole$outboundSchema,
1774
+ role: ExtendedMessageRole$outboundSchema,
1812
1775
  parts: z.array(
1813
1776
  z.union([
1814
- z.lazy(() => InvokeAgentPartsToolCallPart$outboundSchema),
1815
- z.lazy(() => InvokeAgentPartsTextPart$outboundSchema),
1816
- z.lazy(() => InvokeAgentPartsDataPart$outboundSchema),
1817
- z.lazy(() => InvokeAgentPartsFilePart$outboundSchema),
1818
- z.lazy(() => InvokeAgentPartsToolResultPart$outboundSchema),
1777
+ z.lazy(() => ToolCallPart$outboundSchema),
1778
+ z.lazy(() => PartsTextPart$outboundSchema),
1779
+ z.lazy(() => DataPart$outboundSchema),
1780
+ z.lazy(() => PartsFilePart$outboundSchema),
1781
+ z.lazy(() => PartsToolResultPart$outboundSchema),
1819
1782
  ]),
1820
1783
  ),
1821
1784
  });