@orq-ai/node 4.0.0-rc.51 → 4.0.0-rc.52
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.
- package/README.md +3 -4
- package/bin/mcp-server.js +1125 -606
- package/bin/mcp-server.js.map +50 -51
- package/docs/sdks/agents/README.md +80 -80
- package/examples/package-lock.json +1 -1
- package/funcs/agentsInvoke.d.ts +1 -1
- package/funcs/agentsInvoke.d.ts.map +1 -1
- package/funcs/agentsInvoke.js +1 -1
- package/funcs/agentsInvoke.js.map +1 -1
- package/funcs/agentsListTasks.d.ts +1 -1
- package/funcs/agentsListTasks.d.ts.map +1 -1
- package/funcs/agentsListTasks.js +1 -1
- package/funcs/agentsListTasks.js.map +1 -1
- package/funcs/agentsRetrieveTask.d.ts +1 -1
- package/funcs/agentsRetrieveTask.d.ts.map +1 -1
- package/funcs/agentsRetrieveTask.js +1 -1
- package/funcs/agentsRetrieveTask.js.map +1 -1
- package/funcs/agentsRun.d.ts +1 -1
- package/funcs/agentsRun.d.ts.map +1 -1
- package/funcs/agentsRun.js +1 -1
- package/funcs/agentsRun.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +2 -2
- package/mcp-server/server.js.map +1 -1
- package/models/errors/index.d.ts +0 -1
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +0 -1
- package/models/errors/index.js.map +1 -1
- package/models/operations/createbudget.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +8 -8
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +28 -28
- package/models/operations/createtool.d.ts +25 -25
- package/models/operations/createtool.d.ts.map +1 -1
- package/models/operations/createtool.js +41 -41
- package/models/operations/createtool.js.map +1 -1
- package/models/operations/deploymentinvoke.d.ts +6 -6
- package/models/operations/deploymentinvoke.d.ts.map +1 -1
- package/models/operations/deploymentinvoke.js +9 -9
- package/models/operations/deploymentinvoke.js.map +1 -1
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getagenttask.d.ts +682 -108
- package/models/operations/getagenttask.d.ts.map +1 -1
- package/models/operations/getagenttask.js +635 -155
- package/models/operations/getagenttask.js.map +1 -1
- package/models/operations/getalltools.js +12 -12
- package/models/operations/getbudget.js +2 -2
- package/models/operations/getevals.js +28 -28
- package/models/operations/invokeagent.d.ts +143 -123
- package/models/operations/invokeagent.d.ts.map +1 -1
- package/models/operations/invokeagent.js +143 -146
- package/models/operations/invokeagent.js.map +1 -1
- package/models/operations/listagenttasks.d.ts +680 -118
- package/models/operations/listagenttasks.d.ts.map +1 -1
- package/models/operations/listagenttasks.js +612 -144
- package/models/operations/listagenttasks.js.map +1 -1
- package/models/operations/listbudgets.js +2 -2
- package/models/operations/listchunks.d.ts +6 -6
- package/models/operations/listchunks.d.ts.map +1 -1
- package/models/operations/listchunks.js +9 -9
- package/models/operations/listchunks.js.map +1 -1
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +8 -8
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.d.ts +6 -6
- package/models/operations/listdatasources.d.ts.map +1 -1
- package/models/operations/listdatasources.js +12 -11
- package/models/operations/listdatasources.js.map +1 -1
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrievedatapoint.js +8 -8
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/retrievetool.js +12 -12
- package/models/operations/runagent.d.ts +112 -98
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +120 -121
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamagent.d.ts +18 -12
- package/models/operations/streamagent.d.ts.map +1 -1
- package/models/operations/streamagent.js +13 -13
- package/models/operations/streamagent.js.map +1 -1
- package/models/operations/streamrunagent.d.ts +12 -12
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +15 -15
- package/models/operations/streamrunagent.js.map +1 -1
- package/models/operations/updateagent.d.ts +11 -8
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +13 -11
- package/models/operations/updateagent.js.map +1 -1
- package/models/operations/updatebudget.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updatedatapoint.js +8 -8
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +28 -28
- package/models/operations/updatetool.js +14 -14
- package/package.json +1 -1
- package/sdk/agents.d.ts +10 -10
- package/sdk/agents.d.ts.map +1 -1
- package/sdk/agents.js +9 -9
- package/sdk/agents.js.map +1 -1
- package/src/funcs/agentsInvoke.ts +4 -4
- package/src/funcs/agentsListTasks.ts +4 -4
- package/src/funcs/agentsRetrieveTask.ts +8 -8
- package/src/funcs/agentsRun.ts +4 -4
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +2 -2
- package/src/models/errors/index.ts +0 -1
- package/src/models/operations/createbudget.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +8 -8
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +28 -28
- package/src/models/operations/createtool.ts +76 -76
- package/src/models/operations/deploymentinvoke.ts +17 -24
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/getagenttask.ts +1873 -428
- package/src/models/operations/getalltools.ts +12 -12
- package/src/models/operations/getbudget.ts +2 -2
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/invokeagent.ts +319 -299
- package/src/models/operations/listagenttasks.ts +2029 -540
- package/src/models/operations/listbudgets.ts +2 -2
- package/src/models/operations/listchunks.ts +14 -14
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +8 -8
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +15 -22
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +8 -8
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/retrievetool.ts +12 -12
- package/src/models/operations/runagent.ts +264 -220
- package/src/models/operations/streamagent.ts +28 -22
- package/src/models/operations/streamrunagent.ts +24 -24
- package/src/models/operations/updateagent.ts +25 -18
- package/src/models/operations/updatebudget.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +8 -8
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +28 -28
- package/src/models/operations/updatetool.ts +14 -14
- package/src/sdk/agents.ts +20 -20
- package/models/errors/getagenttask.d.ts +0 -29
- package/models/errors/getagenttask.d.ts.map +0 -1
- package/models/errors/getagenttask.js +0 -74
- package/models/errors/getagenttask.js.map +0 -1
- package/src/models/errors/getagenttask.ts +0 -67
|
@@ -10,24 +10,24 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Message containing tool execution results
|
|
14
14
|
*/
|
|
15
15
|
export const RoleToolMessage = {
|
|
16
16
|
Tool: "tool",
|
|
17
17
|
} as const;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Message containing tool execution results
|
|
20
20
|
*/
|
|
21
21
|
export type RoleToolMessage = ClosedEnum<typeof RoleToolMessage>;
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Message from the end user
|
|
25
25
|
*/
|
|
26
26
|
export const RoleUserMessage = {
|
|
27
27
|
User: "user",
|
|
28
28
|
} as const;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Message from the end user
|
|
31
31
|
*/
|
|
32
32
|
export type RoleUserMessage = ClosedEnum<typeof RoleUserMessage>;
|
|
33
33
|
|
|
@@ -123,7 +123,10 @@ export type TextPart = {
|
|
|
123
123
|
*/
|
|
124
124
|
export type PublicMessagePart = TextPart | FilePart | ToolResultPart;
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
/**
|
|
127
|
+
* The A2A message to send to the agent (user input or tool results)
|
|
128
|
+
*/
|
|
129
|
+
export type A2AMessage = {
|
|
127
130
|
/**
|
|
128
131
|
* Optional A2A message ID in ULID format
|
|
129
132
|
*/
|
|
@@ -197,7 +200,10 @@ export type InvokeAgentRequestBody = {
|
|
|
197
200
|
* Optional task ID to continue an existing agent execution. When provided, the agent will continue the conversation from the existing task state. The task must be in an inactive state to continue.
|
|
198
201
|
*/
|
|
199
202
|
taskId?: string | undefined;
|
|
200
|
-
|
|
203
|
+
/**
|
|
204
|
+
* The A2A message to send to the agent (user input or tool results)
|
|
205
|
+
*/
|
|
206
|
+
message: A2AMessage;
|
|
201
207
|
/**
|
|
202
208
|
* Optional variables for template replacement in system prompt, instructions, and messages
|
|
203
209
|
*/
|
|
@@ -229,34 +235,33 @@ export type InvokeAgentRequest = {
|
|
|
229
235
|
};
|
|
230
236
|
|
|
231
237
|
/**
|
|
232
|
-
* A2A entity type
|
|
238
|
+
* A2A entity type identifier
|
|
233
239
|
*/
|
|
234
240
|
export const InvokeAgentKind = {
|
|
235
241
|
Task: "task",
|
|
236
242
|
} as const;
|
|
237
243
|
/**
|
|
238
|
-
* A2A entity type
|
|
244
|
+
* A2A entity type identifier
|
|
239
245
|
*/
|
|
240
246
|
export type InvokeAgentKind = ClosedEnum<typeof InvokeAgentKind>;
|
|
241
247
|
|
|
242
248
|
/**
|
|
243
|
-
* Current task
|
|
249
|
+
* Current state of the agent task execution. Values: submitted (queued), working (executing), input-required (awaiting user input), completed (finished successfully), failed (error occurred). Note: auth-required, canceled, and rejected statuses are defined for A2A protocol compatibility but are not currently supported in task execution.
|
|
244
250
|
*/
|
|
245
|
-
export const
|
|
251
|
+
export const TaskState = {
|
|
246
252
|
Submitted: "submitted",
|
|
247
253
|
Working: "working",
|
|
248
254
|
InputRequired: "input-required",
|
|
255
|
+
AuthRequired: "auth-required",
|
|
249
256
|
Completed: "completed",
|
|
250
257
|
Failed: "failed",
|
|
251
258
|
Canceled: "canceled",
|
|
252
259
|
Rejected: "rejected",
|
|
253
|
-
AuthRequired: "auth-required",
|
|
254
|
-
Unknown: "unknown",
|
|
255
260
|
} as const;
|
|
256
261
|
/**
|
|
257
|
-
* Current task
|
|
262
|
+
* Current state of the agent task execution. Values: submitted (queued), working (executing), input-required (awaiting user input), completed (finished successfully), failed (error occurred). Note: auth-required, canceled, and rejected statuses are defined for A2A protocol compatibility but are not currently supported in task execution.
|
|
258
263
|
*/
|
|
259
|
-
export type
|
|
264
|
+
export type TaskState = ClosedEnum<typeof TaskState>;
|
|
260
265
|
|
|
261
266
|
export const InvokeAgentAgentsKind = {
|
|
262
267
|
Message: "message",
|
|
@@ -264,53 +269,61 @@ export const InvokeAgentAgentsKind = {
|
|
|
264
269
|
export type InvokeAgentAgentsKind = ClosedEnum<typeof InvokeAgentAgentsKind>;
|
|
265
270
|
|
|
266
271
|
/**
|
|
267
|
-
*
|
|
272
|
+
* Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
|
|
268
273
|
*/
|
|
269
|
-
export const
|
|
274
|
+
export const InvokeAgentExtendedMessageRole = {
|
|
270
275
|
User: "user",
|
|
271
276
|
Agent: "agent",
|
|
272
277
|
Tool: "tool",
|
|
273
278
|
System: "system",
|
|
274
279
|
} as const;
|
|
275
280
|
/**
|
|
276
|
-
*
|
|
281
|
+
* Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
|
|
277
282
|
*/
|
|
278
|
-
export type
|
|
283
|
+
export type InvokeAgentExtendedMessageRole = ClosedEnum<
|
|
284
|
+
typeof InvokeAgentExtendedMessageRole
|
|
285
|
+
>;
|
|
279
286
|
|
|
280
|
-
export const
|
|
287
|
+
export const InvokeAgentPartsAgentsResponse200Kind = {
|
|
281
288
|
ToolResult: "tool_result",
|
|
282
289
|
} as const;
|
|
283
|
-
export type
|
|
284
|
-
typeof
|
|
290
|
+
export type InvokeAgentPartsAgentsResponse200Kind = ClosedEnum<
|
|
291
|
+
typeof InvokeAgentPartsAgentsResponse200Kind
|
|
285
292
|
>;
|
|
286
293
|
|
|
287
|
-
|
|
288
|
-
|
|
294
|
+
/**
|
|
295
|
+
* The result of a tool execution. Contains the tool call ID for correlation and the result data from the tool invocation.
|
|
296
|
+
*/
|
|
297
|
+
export type InvokeAgentPartsToolResultPart = {
|
|
298
|
+
kind: InvokeAgentPartsAgentsResponse200Kind;
|
|
289
299
|
toolCallId: string;
|
|
290
300
|
result?: any | undefined;
|
|
291
301
|
metadata?: { [k: string]: any } | undefined;
|
|
292
302
|
};
|
|
293
303
|
|
|
294
|
-
export const
|
|
304
|
+
export const InvokeAgentPartsAgentsResponseKind = {
|
|
295
305
|
ToolCall: "tool_call",
|
|
296
306
|
} as const;
|
|
297
|
-
export type
|
|
298
|
-
typeof
|
|
307
|
+
export type InvokeAgentPartsAgentsResponseKind = ClosedEnum<
|
|
308
|
+
typeof InvokeAgentPartsAgentsResponseKind
|
|
299
309
|
>;
|
|
300
310
|
|
|
301
|
-
|
|
302
|
-
|
|
311
|
+
/**
|
|
312
|
+
* A tool invocation request from an agent. Contains the tool name, unique call ID, and arguments for the tool execution.
|
|
313
|
+
*/
|
|
314
|
+
export type InvokeAgentPartsToolCallPart = {
|
|
315
|
+
kind: InvokeAgentPartsAgentsResponseKind;
|
|
303
316
|
toolName: string;
|
|
304
317
|
toolCallId: string;
|
|
305
318
|
arguments: { [k: string]: any };
|
|
306
319
|
metadata?: { [k: string]: any } | undefined;
|
|
307
320
|
};
|
|
308
321
|
|
|
309
|
-
export const
|
|
322
|
+
export const InvokeAgentPartsAgentsKind = {
|
|
310
323
|
File: "file",
|
|
311
324
|
} as const;
|
|
312
|
-
export type
|
|
313
|
-
typeof
|
|
325
|
+
export type InvokeAgentPartsAgentsKind = ClosedEnum<
|
|
326
|
+
typeof InvokeAgentPartsAgentsKind
|
|
314
327
|
>;
|
|
315
328
|
|
|
316
329
|
/**
|
|
@@ -353,101 +366,110 @@ export type InvokeAgentPartsFile =
|
|
|
353
366
|
| InvokeAgentFileBinaryFormat
|
|
354
367
|
| InvokeAgentFileFileInURIFormat;
|
|
355
368
|
|
|
356
|
-
|
|
357
|
-
|
|
369
|
+
/**
|
|
370
|
+
* 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.
|
|
371
|
+
*/
|
|
372
|
+
export type InvokeAgentPartsFilePart = {
|
|
373
|
+
kind: InvokeAgentPartsAgentsKind;
|
|
358
374
|
file: InvokeAgentFileBinaryFormat | InvokeAgentFileFileInURIFormat;
|
|
359
375
|
metadata?: { [k: string]: any } | undefined;
|
|
360
376
|
};
|
|
361
377
|
|
|
362
|
-
export const
|
|
378
|
+
export const InvokeAgentPartsKind = {
|
|
363
379
|
Data: "data",
|
|
364
380
|
} as const;
|
|
365
|
-
export type
|
|
366
|
-
typeof InvokeAgentPartsAgentsKind
|
|
367
|
-
>;
|
|
381
|
+
export type InvokeAgentPartsKind = ClosedEnum<typeof InvokeAgentPartsKind>;
|
|
368
382
|
|
|
369
|
-
|
|
370
|
-
|
|
383
|
+
/**
|
|
384
|
+
* A structured data part containing JSON-serializable key-value pairs. Used for passing structured information between agents and tools.
|
|
385
|
+
*/
|
|
386
|
+
export type InvokeAgentPartsDataPart = {
|
|
387
|
+
kind: InvokeAgentPartsKind;
|
|
371
388
|
data: { [k: string]: any };
|
|
372
389
|
metadata?: { [k: string]: any } | undefined;
|
|
373
390
|
};
|
|
374
391
|
|
|
375
|
-
export const
|
|
392
|
+
export const InvokeAgentPartsAgentsResponse200ApplicationJSONKind = {
|
|
376
393
|
Text: "text",
|
|
377
394
|
} as const;
|
|
378
|
-
export type
|
|
395
|
+
export type InvokeAgentPartsAgentsResponse200ApplicationJSONKind = ClosedEnum<
|
|
396
|
+
typeof InvokeAgentPartsAgentsResponse200ApplicationJSONKind
|
|
397
|
+
>;
|
|
379
398
|
|
|
380
|
-
|
|
381
|
-
|
|
399
|
+
/**
|
|
400
|
+
* A text content part containing plain text or markdown. Used for agent messages, user input, and text-based responses.
|
|
401
|
+
*/
|
|
402
|
+
export type InvokeAgentPartsTextPart = {
|
|
403
|
+
kind: InvokeAgentPartsAgentsResponse200ApplicationJSONKind;
|
|
382
404
|
text: string;
|
|
383
405
|
};
|
|
384
406
|
|
|
385
407
|
export type InvokeAgentParts =
|
|
386
|
-
|
|
|
387
|
-
|
|
|
388
|
-
|
|
|
389
|
-
|
|
|
390
|
-
|
|
|
408
|
+
| InvokeAgentPartsToolCallPart
|
|
409
|
+
| InvokeAgentPartsTextPart
|
|
410
|
+
| InvokeAgentPartsDataPart
|
|
411
|
+
| InvokeAgentPartsFilePart
|
|
412
|
+
| InvokeAgentPartsToolResultPart;
|
|
391
413
|
|
|
392
414
|
/**
|
|
393
|
-
* Optional
|
|
415
|
+
* Optional A2A message providing additional context about the current status
|
|
394
416
|
*/
|
|
395
|
-
export type
|
|
417
|
+
export type TaskStatusMessage = {
|
|
396
418
|
kind: InvokeAgentAgentsKind;
|
|
397
419
|
messageId: string;
|
|
398
420
|
/**
|
|
399
|
-
*
|
|
421
|
+
* Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
|
|
400
422
|
*/
|
|
401
|
-
role:
|
|
423
|
+
role: InvokeAgentExtendedMessageRole;
|
|
402
424
|
parts: Array<
|
|
403
|
-
|
|
|
404
|
-
|
|
|
405
|
-
|
|
|
406
|
-
|
|
|
407
|
-
|
|
|
425
|
+
| InvokeAgentPartsToolCallPart
|
|
426
|
+
| InvokeAgentPartsTextPart
|
|
427
|
+
| InvokeAgentPartsDataPart
|
|
428
|
+
| InvokeAgentPartsFilePart
|
|
429
|
+
| InvokeAgentPartsToolResultPart
|
|
408
430
|
>;
|
|
409
431
|
};
|
|
410
432
|
|
|
411
433
|
/**
|
|
412
|
-
*
|
|
434
|
+
* Current task status information
|
|
413
435
|
*/
|
|
414
|
-
export type
|
|
436
|
+
export type TaskStatus = {
|
|
415
437
|
/**
|
|
416
|
-
* Current task
|
|
438
|
+
* Current state of the agent task execution. Values: submitted (queued), working (executing), input-required (awaiting user input), completed (finished successfully), failed (error occurred). Note: auth-required, canceled, and rejected statuses are defined for A2A protocol compatibility but are not currently supported in task execution.
|
|
417
439
|
*/
|
|
418
|
-
state:
|
|
440
|
+
state: TaskState;
|
|
419
441
|
/**
|
|
420
|
-
* ISO timestamp of status
|
|
442
|
+
* ISO 8601 timestamp of when the status was updated
|
|
421
443
|
*/
|
|
422
444
|
timestamp?: string | undefined;
|
|
423
445
|
/**
|
|
424
|
-
* Optional
|
|
446
|
+
* Optional A2A message providing additional context about the current status
|
|
425
447
|
*/
|
|
426
|
-
message?:
|
|
448
|
+
message?: TaskStatusMessage | undefined;
|
|
427
449
|
};
|
|
428
450
|
|
|
429
451
|
/**
|
|
430
|
-
* A2A
|
|
452
|
+
* Response format following the Agent-to-Agent (A2A) protocol. Returned when starting or continuing an agent task execution.
|
|
431
453
|
*/
|
|
432
|
-
export type
|
|
454
|
+
export type InvokeAgentA2ATaskResponse = {
|
|
433
455
|
/**
|
|
434
|
-
* The ID of the created agent execution task
|
|
456
|
+
* The unique ID of the created agent execution task
|
|
435
457
|
*/
|
|
436
458
|
id: string;
|
|
437
459
|
/**
|
|
438
|
-
* The correlation ID for this execution
|
|
460
|
+
* The correlation ID for this execution (used for tracking)
|
|
439
461
|
*/
|
|
440
462
|
contextId: string;
|
|
441
463
|
/**
|
|
442
|
-
* A2A entity type
|
|
464
|
+
* A2A entity type identifier
|
|
443
465
|
*/
|
|
444
466
|
kind: InvokeAgentKind;
|
|
445
467
|
/**
|
|
446
|
-
*
|
|
468
|
+
* Current task status information
|
|
447
469
|
*/
|
|
448
|
-
status:
|
|
470
|
+
status: TaskStatus;
|
|
449
471
|
/**
|
|
450
|
-
* Task metadata containing workspace_id and trace_id for feedback
|
|
472
|
+
* Task metadata containing workspace_id and trace_id for feedback and tracking
|
|
451
473
|
*/
|
|
452
474
|
metadata?: { [k: string]: any } | undefined;
|
|
453
475
|
};
|
|
@@ -834,33 +856,33 @@ export function publicMessagePartFromJSON(
|
|
|
834
856
|
}
|
|
835
857
|
|
|
836
858
|
/** @internal */
|
|
837
|
-
export const
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
859
|
+
export const A2AMessage$inboundSchema: z.ZodType<
|
|
860
|
+
A2AMessage,
|
|
861
|
+
z.ZodTypeDef,
|
|
862
|
+
unknown
|
|
863
|
+
> = z.object({
|
|
864
|
+
messageId: z.string().optional(),
|
|
865
|
+
role: z.union([RoleUserMessage$inboundSchema, RoleToolMessage$inboundSchema]),
|
|
866
|
+
parts: z.array(
|
|
867
|
+
z.union([
|
|
868
|
+
z.lazy(() => TextPart$inboundSchema),
|
|
869
|
+
z.lazy(() => FilePart$inboundSchema),
|
|
870
|
+
z.lazy(() => ToolResultPart$inboundSchema),
|
|
843
871
|
]),
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
z.lazy(() => TextPart$inboundSchema),
|
|
847
|
-
z.lazy(() => FilePart$inboundSchema),
|
|
848
|
-
z.lazy(() => ToolResultPart$inboundSchema),
|
|
849
|
-
]),
|
|
850
|
-
),
|
|
851
|
-
});
|
|
872
|
+
),
|
|
873
|
+
});
|
|
852
874
|
/** @internal */
|
|
853
|
-
export type
|
|
875
|
+
export type A2AMessage$Outbound = {
|
|
854
876
|
messageId?: string | undefined;
|
|
855
877
|
role: string | string;
|
|
856
878
|
parts: Array<TextPart$Outbound | FilePart$Outbound | ToolResultPart$Outbound>;
|
|
857
879
|
};
|
|
858
880
|
|
|
859
881
|
/** @internal */
|
|
860
|
-
export const
|
|
861
|
-
|
|
882
|
+
export const A2AMessage$outboundSchema: z.ZodType<
|
|
883
|
+
A2AMessage$Outbound,
|
|
862
884
|
z.ZodTypeDef,
|
|
863
|
-
|
|
885
|
+
A2AMessage
|
|
864
886
|
> = z.object({
|
|
865
887
|
messageId: z.string().optional(),
|
|
866
888
|
role: z.union([
|
|
@@ -876,16 +898,16 @@ export const Message$outboundSchema: z.ZodType<
|
|
|
876
898
|
),
|
|
877
899
|
});
|
|
878
900
|
|
|
879
|
-
export function
|
|
880
|
-
return JSON.stringify(
|
|
901
|
+
export function a2AMessageToJSON(a2AMessage: A2AMessage): string {
|
|
902
|
+
return JSON.stringify(A2AMessage$outboundSchema.parse(a2AMessage));
|
|
881
903
|
}
|
|
882
|
-
export function
|
|
904
|
+
export function a2AMessageFromJSON(
|
|
883
905
|
jsonString: string,
|
|
884
|
-
): SafeParseResult<
|
|
906
|
+
): SafeParseResult<A2AMessage, SDKValidationError> {
|
|
885
907
|
return safeParse(
|
|
886
908
|
jsonString,
|
|
887
|
-
(x) =>
|
|
888
|
-
`Failed to parse '
|
|
909
|
+
(x) => A2AMessage$inboundSchema.parse(JSON.parse(x)),
|
|
910
|
+
`Failed to parse 'A2AMessage' from JSON`,
|
|
889
911
|
);
|
|
890
912
|
}
|
|
891
913
|
|
|
@@ -1035,7 +1057,7 @@ export const InvokeAgentRequestBody$inboundSchema: z.ZodType<
|
|
|
1035
1057
|
unknown
|
|
1036
1058
|
> = z.object({
|
|
1037
1059
|
task_id: z.string().optional(),
|
|
1038
|
-
message: z.lazy(() =>
|
|
1060
|
+
message: z.lazy(() => A2AMessage$inboundSchema),
|
|
1039
1061
|
variables: z.record(z.any()).optional(),
|
|
1040
1062
|
contact: z.lazy(() => Contact$inboundSchema).optional(),
|
|
1041
1063
|
thread: z.lazy(() => InvokeAgentThread$inboundSchema).optional(),
|
|
@@ -1049,7 +1071,7 @@ export const InvokeAgentRequestBody$inboundSchema: z.ZodType<
|
|
|
1049
1071
|
/** @internal */
|
|
1050
1072
|
export type InvokeAgentRequestBody$Outbound = {
|
|
1051
1073
|
task_id?: string | undefined;
|
|
1052
|
-
message:
|
|
1074
|
+
message: A2AMessage$Outbound;
|
|
1053
1075
|
variables?: { [k: string]: any } | undefined;
|
|
1054
1076
|
contact?: Contact$Outbound | undefined;
|
|
1055
1077
|
thread?: InvokeAgentThread$Outbound | undefined;
|
|
@@ -1064,7 +1086,7 @@ export const InvokeAgentRequestBody$outboundSchema: z.ZodType<
|
|
|
1064
1086
|
InvokeAgentRequestBody
|
|
1065
1087
|
> = z.object({
|
|
1066
1088
|
taskId: z.string().optional(),
|
|
1067
|
-
message: z.lazy(() =>
|
|
1089
|
+
message: z.lazy(() => A2AMessage$outboundSchema),
|
|
1068
1090
|
variables: z.record(z.any()).optional(),
|
|
1069
1091
|
contact: z.lazy(() => Contact$outboundSchema).optional(),
|
|
1070
1092
|
thread: z.lazy(() => InvokeAgentThread$outboundSchema).optional(),
|
|
@@ -1153,13 +1175,11 @@ export const InvokeAgentKind$outboundSchema: z.ZodNativeEnum<
|
|
|
1153
1175
|
> = InvokeAgentKind$inboundSchema;
|
|
1154
1176
|
|
|
1155
1177
|
/** @internal */
|
|
1156
|
-
export const
|
|
1157
|
-
|
|
1158
|
-
> = z.nativeEnum(InvokeAgentState);
|
|
1178
|
+
export const TaskState$inboundSchema: z.ZodNativeEnum<typeof TaskState> = z
|
|
1179
|
+
.nativeEnum(TaskState);
|
|
1159
1180
|
/** @internal */
|
|
1160
|
-
export const
|
|
1161
|
-
|
|
1162
|
-
> = InvokeAgentState$inboundSchema;
|
|
1181
|
+
export const TaskState$outboundSchema: z.ZodNativeEnum<typeof TaskState> =
|
|
1182
|
+
TaskState$inboundSchema;
|
|
1163
1183
|
|
|
1164
1184
|
/** @internal */
|
|
1165
1185
|
export const InvokeAgentAgentsKind$inboundSchema: z.ZodNativeEnum<
|
|
@@ -1171,30 +1191,31 @@ export const InvokeAgentAgentsKind$outboundSchema: z.ZodNativeEnum<
|
|
|
1171
1191
|
> = InvokeAgentAgentsKind$inboundSchema;
|
|
1172
1192
|
|
|
1173
1193
|
/** @internal */
|
|
1174
|
-
export const
|
|
1175
|
-
typeof
|
|
1176
|
-
> = z.nativeEnum(
|
|
1194
|
+
export const InvokeAgentExtendedMessageRole$inboundSchema: z.ZodNativeEnum<
|
|
1195
|
+
typeof InvokeAgentExtendedMessageRole
|
|
1196
|
+
> = z.nativeEnum(InvokeAgentExtendedMessageRole);
|
|
1177
1197
|
/** @internal */
|
|
1178
|
-
export const
|
|
1179
|
-
typeof
|
|
1180
|
-
> =
|
|
1198
|
+
export const InvokeAgentExtendedMessageRole$outboundSchema: z.ZodNativeEnum<
|
|
1199
|
+
typeof InvokeAgentExtendedMessageRole
|
|
1200
|
+
> = InvokeAgentExtendedMessageRole$inboundSchema;
|
|
1181
1201
|
|
|
1182
1202
|
/** @internal */
|
|
1183
|
-
export const
|
|
1184
|
-
z.ZodNativeEnum<typeof
|
|
1185
|
-
|
|
1203
|
+
export const InvokeAgentPartsAgentsResponse200Kind$inboundSchema:
|
|
1204
|
+
z.ZodNativeEnum<typeof InvokeAgentPartsAgentsResponse200Kind> = z.nativeEnum(
|
|
1205
|
+
InvokeAgentPartsAgentsResponse200Kind,
|
|
1206
|
+
);
|
|
1186
1207
|
/** @internal */
|
|
1187
|
-
export const
|
|
1188
|
-
z.ZodNativeEnum<typeof
|
|
1189
|
-
|
|
1208
|
+
export const InvokeAgentPartsAgentsResponse200Kind$outboundSchema:
|
|
1209
|
+
z.ZodNativeEnum<typeof InvokeAgentPartsAgentsResponse200Kind> =
|
|
1210
|
+
InvokeAgentPartsAgentsResponse200Kind$inboundSchema;
|
|
1190
1211
|
|
|
1191
1212
|
/** @internal */
|
|
1192
|
-
export const
|
|
1193
|
-
|
|
1213
|
+
export const InvokeAgentPartsToolResultPart$inboundSchema: z.ZodType<
|
|
1214
|
+
InvokeAgentPartsToolResultPart,
|
|
1194
1215
|
z.ZodTypeDef,
|
|
1195
1216
|
unknown
|
|
1196
1217
|
> = z.object({
|
|
1197
|
-
kind:
|
|
1218
|
+
kind: InvokeAgentPartsAgentsResponse200Kind$inboundSchema,
|
|
1198
1219
|
tool_call_id: z.string(),
|
|
1199
1220
|
result: z.any().optional(),
|
|
1200
1221
|
metadata: z.record(z.any()).optional(),
|
|
@@ -1204,7 +1225,7 @@ export const InvokeAgentParts5$inboundSchema: z.ZodType<
|
|
|
1204
1225
|
});
|
|
1205
1226
|
});
|
|
1206
1227
|
/** @internal */
|
|
1207
|
-
export type
|
|
1228
|
+
export type InvokeAgentPartsToolResultPart$Outbound = {
|
|
1208
1229
|
kind: string;
|
|
1209
1230
|
tool_call_id: string;
|
|
1210
1231
|
result?: any | undefined;
|
|
@@ -1212,12 +1233,12 @@ export type InvokeAgentParts5$Outbound = {
|
|
|
1212
1233
|
};
|
|
1213
1234
|
|
|
1214
1235
|
/** @internal */
|
|
1215
|
-
export const
|
|
1216
|
-
|
|
1236
|
+
export const InvokeAgentPartsToolResultPart$outboundSchema: z.ZodType<
|
|
1237
|
+
InvokeAgentPartsToolResultPart$Outbound,
|
|
1217
1238
|
z.ZodTypeDef,
|
|
1218
|
-
|
|
1239
|
+
InvokeAgentPartsToolResultPart
|
|
1219
1240
|
> = z.object({
|
|
1220
|
-
kind:
|
|
1241
|
+
kind: InvokeAgentPartsAgentsResponse200Kind$outboundSchema,
|
|
1221
1242
|
toolCallId: z.string(),
|
|
1222
1243
|
result: z.any().optional(),
|
|
1223
1244
|
metadata: z.record(z.any()).optional(),
|
|
@@ -1227,40 +1248,41 @@ export const InvokeAgentParts5$outboundSchema: z.ZodType<
|
|
|
1227
1248
|
});
|
|
1228
1249
|
});
|
|
1229
1250
|
|
|
1230
|
-
export function
|
|
1231
|
-
|
|
1251
|
+
export function invokeAgentPartsToolResultPartToJSON(
|
|
1252
|
+
invokeAgentPartsToolResultPart: InvokeAgentPartsToolResultPart,
|
|
1232
1253
|
): string {
|
|
1233
1254
|
return JSON.stringify(
|
|
1234
|
-
|
|
1255
|
+
InvokeAgentPartsToolResultPart$outboundSchema.parse(
|
|
1256
|
+
invokeAgentPartsToolResultPart,
|
|
1257
|
+
),
|
|
1235
1258
|
);
|
|
1236
1259
|
}
|
|
1237
|
-
export function
|
|
1260
|
+
export function invokeAgentPartsToolResultPartFromJSON(
|
|
1238
1261
|
jsonString: string,
|
|
1239
|
-
): SafeParseResult<
|
|
1262
|
+
): SafeParseResult<InvokeAgentPartsToolResultPart, SDKValidationError> {
|
|
1240
1263
|
return safeParse(
|
|
1241
1264
|
jsonString,
|
|
1242
|
-
(x) =>
|
|
1243
|
-
`Failed to parse '
|
|
1265
|
+
(x) => InvokeAgentPartsToolResultPart$inboundSchema.parse(JSON.parse(x)),
|
|
1266
|
+
`Failed to parse 'InvokeAgentPartsToolResultPart' from JSON`,
|
|
1244
1267
|
);
|
|
1245
1268
|
}
|
|
1246
1269
|
|
|
1247
1270
|
/** @internal */
|
|
1248
|
-
export const
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
);
|
|
1271
|
+
export const InvokeAgentPartsAgentsResponseKind$inboundSchema: z.ZodNativeEnum<
|
|
1272
|
+
typeof InvokeAgentPartsAgentsResponseKind
|
|
1273
|
+
> = z.nativeEnum(InvokeAgentPartsAgentsResponseKind);
|
|
1252
1274
|
/** @internal */
|
|
1253
|
-
export const
|
|
1254
|
-
|
|
1255
|
-
|
|
1275
|
+
export const InvokeAgentPartsAgentsResponseKind$outboundSchema: z.ZodNativeEnum<
|
|
1276
|
+
typeof InvokeAgentPartsAgentsResponseKind
|
|
1277
|
+
> = InvokeAgentPartsAgentsResponseKind$inboundSchema;
|
|
1256
1278
|
|
|
1257
1279
|
/** @internal */
|
|
1258
|
-
export const
|
|
1259
|
-
|
|
1280
|
+
export const InvokeAgentPartsToolCallPart$inboundSchema: z.ZodType<
|
|
1281
|
+
InvokeAgentPartsToolCallPart,
|
|
1260
1282
|
z.ZodTypeDef,
|
|
1261
1283
|
unknown
|
|
1262
1284
|
> = z.object({
|
|
1263
|
-
kind:
|
|
1285
|
+
kind: InvokeAgentPartsAgentsResponseKind$inboundSchema,
|
|
1264
1286
|
tool_name: z.string(),
|
|
1265
1287
|
tool_call_id: z.string(),
|
|
1266
1288
|
arguments: z.record(z.any()),
|
|
@@ -1272,7 +1294,7 @@ export const InvokeAgentParts4$inboundSchema: z.ZodType<
|
|
|
1272
1294
|
});
|
|
1273
1295
|
});
|
|
1274
1296
|
/** @internal */
|
|
1275
|
-
export type
|
|
1297
|
+
export type InvokeAgentPartsToolCallPart$Outbound = {
|
|
1276
1298
|
kind: string;
|
|
1277
1299
|
tool_name: string;
|
|
1278
1300
|
tool_call_id: string;
|
|
@@ -1281,12 +1303,12 @@ export type InvokeAgentParts4$Outbound = {
|
|
|
1281
1303
|
};
|
|
1282
1304
|
|
|
1283
1305
|
/** @internal */
|
|
1284
|
-
export const
|
|
1285
|
-
|
|
1306
|
+
export const InvokeAgentPartsToolCallPart$outboundSchema: z.ZodType<
|
|
1307
|
+
InvokeAgentPartsToolCallPart$Outbound,
|
|
1286
1308
|
z.ZodTypeDef,
|
|
1287
|
-
|
|
1309
|
+
InvokeAgentPartsToolCallPart
|
|
1288
1310
|
> = z.object({
|
|
1289
|
-
kind:
|
|
1311
|
+
kind: InvokeAgentPartsAgentsResponseKind$outboundSchema,
|
|
1290
1312
|
toolName: z.string(),
|
|
1291
1313
|
toolCallId: z.string(),
|
|
1292
1314
|
arguments: z.record(z.any()),
|
|
@@ -1298,31 +1320,33 @@ export const InvokeAgentParts4$outboundSchema: z.ZodType<
|
|
|
1298
1320
|
});
|
|
1299
1321
|
});
|
|
1300
1322
|
|
|
1301
|
-
export function
|
|
1302
|
-
|
|
1323
|
+
export function invokeAgentPartsToolCallPartToJSON(
|
|
1324
|
+
invokeAgentPartsToolCallPart: InvokeAgentPartsToolCallPart,
|
|
1303
1325
|
): string {
|
|
1304
1326
|
return JSON.stringify(
|
|
1305
|
-
|
|
1327
|
+
InvokeAgentPartsToolCallPart$outboundSchema.parse(
|
|
1328
|
+
invokeAgentPartsToolCallPart,
|
|
1329
|
+
),
|
|
1306
1330
|
);
|
|
1307
1331
|
}
|
|
1308
|
-
export function
|
|
1332
|
+
export function invokeAgentPartsToolCallPartFromJSON(
|
|
1309
1333
|
jsonString: string,
|
|
1310
|
-
): SafeParseResult<
|
|
1334
|
+
): SafeParseResult<InvokeAgentPartsToolCallPart, SDKValidationError> {
|
|
1311
1335
|
return safeParse(
|
|
1312
1336
|
jsonString,
|
|
1313
|
-
(x) =>
|
|
1314
|
-
`Failed to parse '
|
|
1337
|
+
(x) => InvokeAgentPartsToolCallPart$inboundSchema.parse(JSON.parse(x)),
|
|
1338
|
+
`Failed to parse 'InvokeAgentPartsToolCallPart' from JSON`,
|
|
1315
1339
|
);
|
|
1316
1340
|
}
|
|
1317
1341
|
|
|
1318
1342
|
/** @internal */
|
|
1319
|
-
export const
|
|
1320
|
-
typeof
|
|
1321
|
-
> = z.nativeEnum(
|
|
1343
|
+
export const InvokeAgentPartsAgentsKind$inboundSchema: z.ZodNativeEnum<
|
|
1344
|
+
typeof InvokeAgentPartsAgentsKind
|
|
1345
|
+
> = z.nativeEnum(InvokeAgentPartsAgentsKind);
|
|
1322
1346
|
/** @internal */
|
|
1323
|
-
export const
|
|
1324
|
-
typeof
|
|
1325
|
-
> =
|
|
1347
|
+
export const InvokeAgentPartsAgentsKind$outboundSchema: z.ZodNativeEnum<
|
|
1348
|
+
typeof InvokeAgentPartsAgentsKind
|
|
1349
|
+
> = InvokeAgentPartsAgentsKind$inboundSchema;
|
|
1326
1350
|
|
|
1327
1351
|
/** @internal */
|
|
1328
1352
|
export const InvokeAgentFileFileInURIFormat$inboundSchema: z.ZodType<
|
|
@@ -1460,12 +1484,12 @@ export function invokeAgentPartsFileFromJSON(
|
|
|
1460
1484
|
}
|
|
1461
1485
|
|
|
1462
1486
|
/** @internal */
|
|
1463
|
-
export const
|
|
1464
|
-
|
|
1487
|
+
export const InvokeAgentPartsFilePart$inboundSchema: z.ZodType<
|
|
1488
|
+
InvokeAgentPartsFilePart,
|
|
1465
1489
|
z.ZodTypeDef,
|
|
1466
1490
|
unknown
|
|
1467
1491
|
> = z.object({
|
|
1468
|
-
kind:
|
|
1492
|
+
kind: InvokeAgentPartsAgentsKind$inboundSchema,
|
|
1469
1493
|
file: z.union([
|
|
1470
1494
|
z.lazy(() => InvokeAgentFileBinaryFormat$inboundSchema),
|
|
1471
1495
|
z.lazy(() => InvokeAgentFileFileInURIFormat$inboundSchema),
|
|
@@ -1473,7 +1497,7 @@ export const InvokeAgentParts3$inboundSchema: z.ZodType<
|
|
|
1473
1497
|
metadata: z.record(z.any()).optional(),
|
|
1474
1498
|
});
|
|
1475
1499
|
/** @internal */
|
|
1476
|
-
export type
|
|
1500
|
+
export type InvokeAgentPartsFilePart$Outbound = {
|
|
1477
1501
|
kind: string;
|
|
1478
1502
|
file:
|
|
1479
1503
|
| InvokeAgentFileBinaryFormat$Outbound
|
|
@@ -1482,12 +1506,12 @@ export type InvokeAgentParts3$Outbound = {
|
|
|
1482
1506
|
};
|
|
1483
1507
|
|
|
1484
1508
|
/** @internal */
|
|
1485
|
-
export const
|
|
1486
|
-
|
|
1509
|
+
export const InvokeAgentPartsFilePart$outboundSchema: z.ZodType<
|
|
1510
|
+
InvokeAgentPartsFilePart$Outbound,
|
|
1487
1511
|
z.ZodTypeDef,
|
|
1488
|
-
|
|
1512
|
+
InvokeAgentPartsFilePart
|
|
1489
1513
|
> = z.object({
|
|
1490
|
-
kind:
|
|
1514
|
+
kind: InvokeAgentPartsAgentsKind$outboundSchema,
|
|
1491
1515
|
file: z.union([
|
|
1492
1516
|
z.lazy(() => InvokeAgentFileBinaryFormat$outboundSchema),
|
|
1493
1517
|
z.lazy(() => InvokeAgentFileFileInURIFormat$outboundSchema),
|
|
@@ -1495,125 +1519,125 @@ export const InvokeAgentParts3$outboundSchema: z.ZodType<
|
|
|
1495
1519
|
metadata: z.record(z.any()).optional(),
|
|
1496
1520
|
});
|
|
1497
1521
|
|
|
1498
|
-
export function
|
|
1499
|
-
|
|
1522
|
+
export function invokeAgentPartsFilePartToJSON(
|
|
1523
|
+
invokeAgentPartsFilePart: InvokeAgentPartsFilePart,
|
|
1500
1524
|
): string {
|
|
1501
1525
|
return JSON.stringify(
|
|
1502
|
-
|
|
1526
|
+
InvokeAgentPartsFilePart$outboundSchema.parse(invokeAgentPartsFilePart),
|
|
1503
1527
|
);
|
|
1504
1528
|
}
|
|
1505
|
-
export function
|
|
1529
|
+
export function invokeAgentPartsFilePartFromJSON(
|
|
1506
1530
|
jsonString: string,
|
|
1507
|
-
): SafeParseResult<
|
|
1531
|
+
): SafeParseResult<InvokeAgentPartsFilePart, SDKValidationError> {
|
|
1508
1532
|
return safeParse(
|
|
1509
1533
|
jsonString,
|
|
1510
|
-
(x) =>
|
|
1511
|
-
`Failed to parse '
|
|
1534
|
+
(x) => InvokeAgentPartsFilePart$inboundSchema.parse(JSON.parse(x)),
|
|
1535
|
+
`Failed to parse 'InvokeAgentPartsFilePart' from JSON`,
|
|
1512
1536
|
);
|
|
1513
1537
|
}
|
|
1514
1538
|
|
|
1515
1539
|
/** @internal */
|
|
1516
|
-
export const
|
|
1517
|
-
typeof
|
|
1518
|
-
> = z.nativeEnum(
|
|
1540
|
+
export const InvokeAgentPartsKind$inboundSchema: z.ZodNativeEnum<
|
|
1541
|
+
typeof InvokeAgentPartsKind
|
|
1542
|
+
> = z.nativeEnum(InvokeAgentPartsKind);
|
|
1519
1543
|
/** @internal */
|
|
1520
|
-
export const
|
|
1521
|
-
typeof
|
|
1522
|
-
> =
|
|
1544
|
+
export const InvokeAgentPartsKind$outboundSchema: z.ZodNativeEnum<
|
|
1545
|
+
typeof InvokeAgentPartsKind
|
|
1546
|
+
> = InvokeAgentPartsKind$inboundSchema;
|
|
1523
1547
|
|
|
1524
1548
|
/** @internal */
|
|
1525
|
-
export const
|
|
1526
|
-
|
|
1549
|
+
export const InvokeAgentPartsDataPart$inboundSchema: z.ZodType<
|
|
1550
|
+
InvokeAgentPartsDataPart,
|
|
1527
1551
|
z.ZodTypeDef,
|
|
1528
1552
|
unknown
|
|
1529
1553
|
> = z.object({
|
|
1530
|
-
kind:
|
|
1554
|
+
kind: InvokeAgentPartsKind$inboundSchema,
|
|
1531
1555
|
data: z.record(z.any()),
|
|
1532
1556
|
metadata: z.record(z.any()).optional(),
|
|
1533
1557
|
});
|
|
1534
1558
|
/** @internal */
|
|
1535
|
-
export type
|
|
1559
|
+
export type InvokeAgentPartsDataPart$Outbound = {
|
|
1536
1560
|
kind: string;
|
|
1537
1561
|
data: { [k: string]: any };
|
|
1538
1562
|
metadata?: { [k: string]: any } | undefined;
|
|
1539
1563
|
};
|
|
1540
1564
|
|
|
1541
1565
|
/** @internal */
|
|
1542
|
-
export const
|
|
1543
|
-
|
|
1566
|
+
export const InvokeAgentPartsDataPart$outboundSchema: z.ZodType<
|
|
1567
|
+
InvokeAgentPartsDataPart$Outbound,
|
|
1544
1568
|
z.ZodTypeDef,
|
|
1545
|
-
|
|
1569
|
+
InvokeAgentPartsDataPart
|
|
1546
1570
|
> = z.object({
|
|
1547
|
-
kind:
|
|
1571
|
+
kind: InvokeAgentPartsKind$outboundSchema,
|
|
1548
1572
|
data: z.record(z.any()),
|
|
1549
1573
|
metadata: z.record(z.any()).optional(),
|
|
1550
1574
|
});
|
|
1551
1575
|
|
|
1552
|
-
export function
|
|
1553
|
-
|
|
1576
|
+
export function invokeAgentPartsDataPartToJSON(
|
|
1577
|
+
invokeAgentPartsDataPart: InvokeAgentPartsDataPart,
|
|
1554
1578
|
): string {
|
|
1555
1579
|
return JSON.stringify(
|
|
1556
|
-
|
|
1580
|
+
InvokeAgentPartsDataPart$outboundSchema.parse(invokeAgentPartsDataPart),
|
|
1557
1581
|
);
|
|
1558
1582
|
}
|
|
1559
|
-
export function
|
|
1583
|
+
export function invokeAgentPartsDataPartFromJSON(
|
|
1560
1584
|
jsonString: string,
|
|
1561
|
-
): SafeParseResult<
|
|
1585
|
+
): SafeParseResult<InvokeAgentPartsDataPart, SDKValidationError> {
|
|
1562
1586
|
return safeParse(
|
|
1563
1587
|
jsonString,
|
|
1564
|
-
(x) =>
|
|
1565
|
-
`Failed to parse '
|
|
1588
|
+
(x) => InvokeAgentPartsDataPart$inboundSchema.parse(JSON.parse(x)),
|
|
1589
|
+
`Failed to parse 'InvokeAgentPartsDataPart' from JSON`,
|
|
1566
1590
|
);
|
|
1567
1591
|
}
|
|
1568
1592
|
|
|
1569
1593
|
/** @internal */
|
|
1570
|
-
export const
|
|
1571
|
-
typeof
|
|
1572
|
-
|
|
1594
|
+
export const InvokeAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema:
|
|
1595
|
+
z.ZodNativeEnum<typeof InvokeAgentPartsAgentsResponse200ApplicationJSONKind> =
|
|
1596
|
+
z.nativeEnum(InvokeAgentPartsAgentsResponse200ApplicationJSONKind);
|
|
1573
1597
|
/** @internal */
|
|
1574
|
-
export const
|
|
1575
|
-
typeof
|
|
1576
|
-
|
|
1598
|
+
export const InvokeAgentPartsAgentsResponse200ApplicationJSONKind$outboundSchema:
|
|
1599
|
+
z.ZodNativeEnum<typeof InvokeAgentPartsAgentsResponse200ApplicationJSONKind> =
|
|
1600
|
+
InvokeAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema;
|
|
1577
1601
|
|
|
1578
1602
|
/** @internal */
|
|
1579
|
-
export const
|
|
1580
|
-
|
|
1603
|
+
export const InvokeAgentPartsTextPart$inboundSchema: z.ZodType<
|
|
1604
|
+
InvokeAgentPartsTextPart,
|
|
1581
1605
|
z.ZodTypeDef,
|
|
1582
1606
|
unknown
|
|
1583
1607
|
> = z.object({
|
|
1584
|
-
kind:
|
|
1608
|
+
kind: InvokeAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema,
|
|
1585
1609
|
text: z.string(),
|
|
1586
1610
|
});
|
|
1587
1611
|
/** @internal */
|
|
1588
|
-
export type
|
|
1612
|
+
export type InvokeAgentPartsTextPart$Outbound = {
|
|
1589
1613
|
kind: string;
|
|
1590
1614
|
text: string;
|
|
1591
1615
|
};
|
|
1592
1616
|
|
|
1593
1617
|
/** @internal */
|
|
1594
|
-
export const
|
|
1595
|
-
|
|
1618
|
+
export const InvokeAgentPartsTextPart$outboundSchema: z.ZodType<
|
|
1619
|
+
InvokeAgentPartsTextPart$Outbound,
|
|
1596
1620
|
z.ZodTypeDef,
|
|
1597
|
-
|
|
1621
|
+
InvokeAgentPartsTextPart
|
|
1598
1622
|
> = z.object({
|
|
1599
|
-
kind:
|
|
1623
|
+
kind: InvokeAgentPartsAgentsResponse200ApplicationJSONKind$outboundSchema,
|
|
1600
1624
|
text: z.string(),
|
|
1601
1625
|
});
|
|
1602
1626
|
|
|
1603
|
-
export function
|
|
1604
|
-
|
|
1627
|
+
export function invokeAgentPartsTextPartToJSON(
|
|
1628
|
+
invokeAgentPartsTextPart: InvokeAgentPartsTextPart,
|
|
1605
1629
|
): string {
|
|
1606
1630
|
return JSON.stringify(
|
|
1607
|
-
|
|
1631
|
+
InvokeAgentPartsTextPart$outboundSchema.parse(invokeAgentPartsTextPart),
|
|
1608
1632
|
);
|
|
1609
1633
|
}
|
|
1610
|
-
export function
|
|
1634
|
+
export function invokeAgentPartsTextPartFromJSON(
|
|
1611
1635
|
jsonString: string,
|
|
1612
|
-
): SafeParseResult<
|
|
1636
|
+
): SafeParseResult<InvokeAgentPartsTextPart, SDKValidationError> {
|
|
1613
1637
|
return safeParse(
|
|
1614
1638
|
jsonString,
|
|
1615
|
-
(x) =>
|
|
1616
|
-
`Failed to parse '
|
|
1639
|
+
(x) => InvokeAgentPartsTextPart$inboundSchema.parse(JSON.parse(x)),
|
|
1640
|
+
`Failed to parse 'InvokeAgentPartsTextPart' from JSON`,
|
|
1617
1641
|
);
|
|
1618
1642
|
}
|
|
1619
1643
|
|
|
@@ -1623,19 +1647,19 @@ export const InvokeAgentParts$inboundSchema: z.ZodType<
|
|
|
1623
1647
|
z.ZodTypeDef,
|
|
1624
1648
|
unknown
|
|
1625
1649
|
> = z.union([
|
|
1626
|
-
z.lazy(() =>
|
|
1627
|
-
z.lazy(() =>
|
|
1628
|
-
z.lazy(() =>
|
|
1629
|
-
z.lazy(() =>
|
|
1630
|
-
z.lazy(() =>
|
|
1650
|
+
z.lazy(() => InvokeAgentPartsToolCallPart$inboundSchema),
|
|
1651
|
+
z.lazy(() => InvokeAgentPartsTextPart$inboundSchema),
|
|
1652
|
+
z.lazy(() => InvokeAgentPartsDataPart$inboundSchema),
|
|
1653
|
+
z.lazy(() => InvokeAgentPartsFilePart$inboundSchema),
|
|
1654
|
+
z.lazy(() => InvokeAgentPartsToolResultPart$inboundSchema),
|
|
1631
1655
|
]);
|
|
1632
1656
|
/** @internal */
|
|
1633
1657
|
export type InvokeAgentParts$Outbound =
|
|
1634
|
-
|
|
|
1635
|
-
|
|
|
1636
|
-
|
|
|
1637
|
-
|
|
|
1638
|
-
|
|
|
1658
|
+
| InvokeAgentPartsToolCallPart$Outbound
|
|
1659
|
+
| InvokeAgentPartsTextPart$Outbound
|
|
1660
|
+
| InvokeAgentPartsDataPart$Outbound
|
|
1661
|
+
| InvokeAgentPartsFilePart$Outbound
|
|
1662
|
+
| InvokeAgentPartsToolResultPart$Outbound;
|
|
1639
1663
|
|
|
1640
1664
|
/** @internal */
|
|
1641
1665
|
export const InvokeAgentParts$outboundSchema: z.ZodType<
|
|
@@ -1643,11 +1667,11 @@ export const InvokeAgentParts$outboundSchema: z.ZodType<
|
|
|
1643
1667
|
z.ZodTypeDef,
|
|
1644
1668
|
InvokeAgentParts
|
|
1645
1669
|
> = z.union([
|
|
1646
|
-
z.lazy(() =>
|
|
1647
|
-
z.lazy(() =>
|
|
1648
|
-
z.lazy(() =>
|
|
1649
|
-
z.lazy(() =>
|
|
1650
|
-
z.lazy(() =>
|
|
1670
|
+
z.lazy(() => InvokeAgentPartsToolCallPart$outboundSchema),
|
|
1671
|
+
z.lazy(() => InvokeAgentPartsTextPart$outboundSchema),
|
|
1672
|
+
z.lazy(() => InvokeAgentPartsDataPart$outboundSchema),
|
|
1673
|
+
z.lazy(() => InvokeAgentPartsFilePart$outboundSchema),
|
|
1674
|
+
z.lazy(() => InvokeAgentPartsToolResultPart$outboundSchema),
|
|
1651
1675
|
]);
|
|
1652
1676
|
|
|
1653
1677
|
export function invokeAgentPartsToJSON(
|
|
@@ -1668,167 +1692,163 @@ export function invokeAgentPartsFromJSON(
|
|
|
1668
1692
|
}
|
|
1669
1693
|
|
|
1670
1694
|
/** @internal */
|
|
1671
|
-
export const
|
|
1672
|
-
|
|
1695
|
+
export const TaskStatusMessage$inboundSchema: z.ZodType<
|
|
1696
|
+
TaskStatusMessage,
|
|
1673
1697
|
z.ZodTypeDef,
|
|
1674
1698
|
unknown
|
|
1675
1699
|
> = z.object({
|
|
1676
1700
|
kind: InvokeAgentAgentsKind$inboundSchema,
|
|
1677
1701
|
messageId: z.string(),
|
|
1678
|
-
role:
|
|
1702
|
+
role: InvokeAgentExtendedMessageRole$inboundSchema,
|
|
1679
1703
|
parts: z.array(
|
|
1680
1704
|
z.union([
|
|
1681
|
-
z.lazy(() =>
|
|
1682
|
-
z.lazy(() =>
|
|
1683
|
-
z.lazy(() =>
|
|
1684
|
-
z.lazy(() =>
|
|
1685
|
-
z.lazy(() =>
|
|
1705
|
+
z.lazy(() => InvokeAgentPartsToolCallPart$inboundSchema),
|
|
1706
|
+
z.lazy(() => InvokeAgentPartsTextPart$inboundSchema),
|
|
1707
|
+
z.lazy(() => InvokeAgentPartsDataPart$inboundSchema),
|
|
1708
|
+
z.lazy(() => InvokeAgentPartsFilePart$inboundSchema),
|
|
1709
|
+
z.lazy(() => InvokeAgentPartsToolResultPart$inboundSchema),
|
|
1686
1710
|
]),
|
|
1687
1711
|
),
|
|
1688
1712
|
});
|
|
1689
1713
|
/** @internal */
|
|
1690
|
-
export type
|
|
1714
|
+
export type TaskStatusMessage$Outbound = {
|
|
1691
1715
|
kind: string;
|
|
1692
1716
|
messageId: string;
|
|
1693
1717
|
role: string;
|
|
1694
1718
|
parts: Array<
|
|
1695
|
-
|
|
|
1696
|
-
|
|
|
1697
|
-
|
|
|
1698
|
-
|
|
|
1699
|
-
|
|
|
1719
|
+
| InvokeAgentPartsToolCallPart$Outbound
|
|
1720
|
+
| InvokeAgentPartsTextPart$Outbound
|
|
1721
|
+
| InvokeAgentPartsDataPart$Outbound
|
|
1722
|
+
| InvokeAgentPartsFilePart$Outbound
|
|
1723
|
+
| InvokeAgentPartsToolResultPart$Outbound
|
|
1700
1724
|
>;
|
|
1701
1725
|
};
|
|
1702
1726
|
|
|
1703
1727
|
/** @internal */
|
|
1704
|
-
export const
|
|
1705
|
-
|
|
1728
|
+
export const TaskStatusMessage$outboundSchema: z.ZodType<
|
|
1729
|
+
TaskStatusMessage$Outbound,
|
|
1706
1730
|
z.ZodTypeDef,
|
|
1707
|
-
|
|
1731
|
+
TaskStatusMessage
|
|
1708
1732
|
> = z.object({
|
|
1709
1733
|
kind: InvokeAgentAgentsKind$outboundSchema,
|
|
1710
1734
|
messageId: z.string(),
|
|
1711
|
-
role:
|
|
1735
|
+
role: InvokeAgentExtendedMessageRole$outboundSchema,
|
|
1712
1736
|
parts: z.array(
|
|
1713
1737
|
z.union([
|
|
1714
|
-
z.lazy(() =>
|
|
1715
|
-
z.lazy(() =>
|
|
1716
|
-
z.lazy(() =>
|
|
1717
|
-
z.lazy(() =>
|
|
1718
|
-
z.lazy(() =>
|
|
1738
|
+
z.lazy(() => InvokeAgentPartsToolCallPart$outboundSchema),
|
|
1739
|
+
z.lazy(() => InvokeAgentPartsTextPart$outboundSchema),
|
|
1740
|
+
z.lazy(() => InvokeAgentPartsDataPart$outboundSchema),
|
|
1741
|
+
z.lazy(() => InvokeAgentPartsFilePart$outboundSchema),
|
|
1742
|
+
z.lazy(() => InvokeAgentPartsToolResultPart$outboundSchema),
|
|
1719
1743
|
]),
|
|
1720
1744
|
),
|
|
1721
1745
|
});
|
|
1722
1746
|
|
|
1723
|
-
export function
|
|
1724
|
-
|
|
1747
|
+
export function taskStatusMessageToJSON(
|
|
1748
|
+
taskStatusMessage: TaskStatusMessage,
|
|
1725
1749
|
): string {
|
|
1726
1750
|
return JSON.stringify(
|
|
1727
|
-
|
|
1751
|
+
TaskStatusMessage$outboundSchema.parse(taskStatusMessage),
|
|
1728
1752
|
);
|
|
1729
1753
|
}
|
|
1730
|
-
export function
|
|
1754
|
+
export function taskStatusMessageFromJSON(
|
|
1731
1755
|
jsonString: string,
|
|
1732
|
-
): SafeParseResult<
|
|
1756
|
+
): SafeParseResult<TaskStatusMessage, SDKValidationError> {
|
|
1733
1757
|
return safeParse(
|
|
1734
1758
|
jsonString,
|
|
1735
|
-
(x) =>
|
|
1736
|
-
`Failed to parse '
|
|
1759
|
+
(x) => TaskStatusMessage$inboundSchema.parse(JSON.parse(x)),
|
|
1760
|
+
`Failed to parse 'TaskStatusMessage' from JSON`,
|
|
1737
1761
|
);
|
|
1738
1762
|
}
|
|
1739
1763
|
|
|
1740
1764
|
/** @internal */
|
|
1741
|
-
export const
|
|
1742
|
-
|
|
1765
|
+
export const TaskStatus$inboundSchema: z.ZodType<
|
|
1766
|
+
TaskStatus,
|
|
1743
1767
|
z.ZodTypeDef,
|
|
1744
1768
|
unknown
|
|
1745
1769
|
> = z.object({
|
|
1746
|
-
state:
|
|
1770
|
+
state: TaskState$inboundSchema,
|
|
1747
1771
|
timestamp: z.string().optional(),
|
|
1748
|
-
message: z.lazy(() =>
|
|
1772
|
+
message: z.lazy(() => TaskStatusMessage$inboundSchema).optional(),
|
|
1749
1773
|
});
|
|
1750
1774
|
/** @internal */
|
|
1751
|
-
export type
|
|
1775
|
+
export type TaskStatus$Outbound = {
|
|
1752
1776
|
state: string;
|
|
1753
1777
|
timestamp?: string | undefined;
|
|
1754
|
-
message?:
|
|
1778
|
+
message?: TaskStatusMessage$Outbound | undefined;
|
|
1755
1779
|
};
|
|
1756
1780
|
|
|
1757
1781
|
/** @internal */
|
|
1758
|
-
export const
|
|
1759
|
-
|
|
1782
|
+
export const TaskStatus$outboundSchema: z.ZodType<
|
|
1783
|
+
TaskStatus$Outbound,
|
|
1760
1784
|
z.ZodTypeDef,
|
|
1761
|
-
|
|
1785
|
+
TaskStatus
|
|
1762
1786
|
> = z.object({
|
|
1763
|
-
state:
|
|
1787
|
+
state: TaskState$outboundSchema,
|
|
1764
1788
|
timestamp: z.string().optional(),
|
|
1765
|
-
message: z.lazy(() =>
|
|
1789
|
+
message: z.lazy(() => TaskStatusMessage$outboundSchema).optional(),
|
|
1766
1790
|
});
|
|
1767
1791
|
|
|
1768
|
-
export function
|
|
1769
|
-
|
|
1770
|
-
): string {
|
|
1771
|
-
return JSON.stringify(
|
|
1772
|
-
InvokeAgentStatus$outboundSchema.parse(invokeAgentStatus),
|
|
1773
|
-
);
|
|
1792
|
+
export function taskStatusToJSON(taskStatus: TaskStatus): string {
|
|
1793
|
+
return JSON.stringify(TaskStatus$outboundSchema.parse(taskStatus));
|
|
1774
1794
|
}
|
|
1775
|
-
export function
|
|
1795
|
+
export function taskStatusFromJSON(
|
|
1776
1796
|
jsonString: string,
|
|
1777
|
-
): SafeParseResult<
|
|
1797
|
+
): SafeParseResult<TaskStatus, SDKValidationError> {
|
|
1778
1798
|
return safeParse(
|
|
1779
1799
|
jsonString,
|
|
1780
|
-
(x) =>
|
|
1781
|
-
`Failed to parse '
|
|
1800
|
+
(x) => TaskStatus$inboundSchema.parse(JSON.parse(x)),
|
|
1801
|
+
`Failed to parse 'TaskStatus' from JSON`,
|
|
1782
1802
|
);
|
|
1783
1803
|
}
|
|
1784
1804
|
|
|
1785
1805
|
/** @internal */
|
|
1786
|
-
export const
|
|
1787
|
-
|
|
1806
|
+
export const InvokeAgentA2ATaskResponse$inboundSchema: z.ZodType<
|
|
1807
|
+
InvokeAgentA2ATaskResponse,
|
|
1788
1808
|
z.ZodTypeDef,
|
|
1789
1809
|
unknown
|
|
1790
1810
|
> = z.object({
|
|
1791
1811
|
id: z.string(),
|
|
1792
1812
|
contextId: z.string(),
|
|
1793
1813
|
kind: InvokeAgentKind$inboundSchema,
|
|
1794
|
-
status: z.lazy(() =>
|
|
1814
|
+
status: z.lazy(() => TaskStatus$inboundSchema),
|
|
1795
1815
|
metadata: z.record(z.any()).optional(),
|
|
1796
1816
|
});
|
|
1797
1817
|
/** @internal */
|
|
1798
|
-
export type
|
|
1818
|
+
export type InvokeAgentA2ATaskResponse$Outbound = {
|
|
1799
1819
|
id: string;
|
|
1800
1820
|
contextId: string;
|
|
1801
1821
|
kind: string;
|
|
1802
|
-
status:
|
|
1822
|
+
status: TaskStatus$Outbound;
|
|
1803
1823
|
metadata?: { [k: string]: any } | undefined;
|
|
1804
1824
|
};
|
|
1805
1825
|
|
|
1806
1826
|
/** @internal */
|
|
1807
|
-
export const
|
|
1808
|
-
|
|
1827
|
+
export const InvokeAgentA2ATaskResponse$outboundSchema: z.ZodType<
|
|
1828
|
+
InvokeAgentA2ATaskResponse$Outbound,
|
|
1809
1829
|
z.ZodTypeDef,
|
|
1810
|
-
|
|
1830
|
+
InvokeAgentA2ATaskResponse
|
|
1811
1831
|
> = z.object({
|
|
1812
1832
|
id: z.string(),
|
|
1813
1833
|
contextId: z.string(),
|
|
1814
1834
|
kind: InvokeAgentKind$outboundSchema,
|
|
1815
|
-
status: z.lazy(() =>
|
|
1835
|
+
status: z.lazy(() => TaskStatus$outboundSchema),
|
|
1816
1836
|
metadata: z.record(z.any()).optional(),
|
|
1817
1837
|
});
|
|
1818
1838
|
|
|
1819
|
-
export function
|
|
1820
|
-
|
|
1839
|
+
export function invokeAgentA2ATaskResponseToJSON(
|
|
1840
|
+
invokeAgentA2ATaskResponse: InvokeAgentA2ATaskResponse,
|
|
1821
1841
|
): string {
|
|
1822
1842
|
return JSON.stringify(
|
|
1823
|
-
|
|
1843
|
+
InvokeAgentA2ATaskResponse$outboundSchema.parse(invokeAgentA2ATaskResponse),
|
|
1824
1844
|
);
|
|
1825
1845
|
}
|
|
1826
|
-
export function
|
|
1846
|
+
export function invokeAgentA2ATaskResponseFromJSON(
|
|
1827
1847
|
jsonString: string,
|
|
1828
|
-
): SafeParseResult<
|
|
1848
|
+
): SafeParseResult<InvokeAgentA2ATaskResponse, SDKValidationError> {
|
|
1829
1849
|
return safeParse(
|
|
1830
1850
|
jsonString,
|
|
1831
|
-
(x) =>
|
|
1832
|
-
`Failed to parse '
|
|
1851
|
+
(x) => InvokeAgentA2ATaskResponse$inboundSchema.parse(JSON.parse(x)),
|
|
1852
|
+
`Failed to parse 'InvokeAgentA2ATaskResponse' from JSON`,
|
|
1833
1853
|
);
|
|
1834
1854
|
}
|