@orq-ai/node 4.1.10 → 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.
- package/bin/mcp-server.js +222 -222
- package/bin/mcp-server.js.map +40 -40
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/sdks.js +2 -2
- package/lib/sdks.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/components/conversationresponse.js +2 -2
- package/models/components/partdoneevent.js +2 -2
- package/models/components/reasoningpart.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createconversation.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.js +12 -12
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/generateconversationname.js +2 -2
- package/models/operations/getalltools.js +12 -12
- package/models/operations/getevals.js +28 -28
- 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.js +2 -2
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrieveconversation.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.js +2 -2
- package/models/operations/streamrunagent.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updateconversation.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/packages/orq-rc/examples/package-lock.json +1 -1
- package/packages/orq-rc/jsr.json +1 -1
- package/packages/orq-rc/package-lock.json +2 -2
- package/packages/orq-rc/package.json +1 -1
- package/packages/orq-rc/src/funcs/agentsCreate.ts +2 -11
- package/packages/orq-rc/src/funcs/{evaluatorsGetV2EvaluatorsIdVersionsVersionId.ts → conversationsCreateConversationResponse.ts} +34 -38
- package/packages/orq-rc/src/funcs/conversationsList.ts +6 -1
- package/packages/orq-rc/src/funcs/conversationsRetrieve.ts +5 -4
- package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +6 -5
- package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +6 -5
- package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +6 -5
- package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +6 -5
- package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +6 -5
- package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +6 -5
- package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +6 -5
- package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +6 -5
- package/packages/orq-rc/src/funcs/toolsCreate.ts +2 -11
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/lib/sdks.ts +2 -2
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +3 -3
- package/packages/orq-rc/src/mcp-server/tools/conversationsCreateConversationResponse.ts +39 -0
- package/packages/orq-rc/src/mcp-server/tools/conversationsList.ts +2 -0
- package/packages/orq-rc/src/models/components/agentinactivestreamingevent.ts +16 -1
- package/packages/orq-rc/src/models/components/agentmessagecreatedstreamingevent.ts +16 -1
- package/packages/orq-rc/src/models/components/agentresponsemessage.ts +16 -1
- package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +16 -1
- package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +16 -1
- package/packages/orq-rc/src/models/components/conversationresponse.ts +26 -26
- package/packages/orq-rc/src/models/components/conversationwithmessagesresponse.ts +226 -0
- package/packages/orq-rc/src/models/components/errorpart.ts +58 -0
- package/packages/orq-rc/src/models/components/index.ts +4 -0
- package/packages/orq-rc/src/models/components/messageresponse.ts +217 -0
- package/packages/orq-rc/src/models/components/partdoneevent.ts +2 -2
- package/packages/orq-rc/src/models/components/publiccontact.ts +1 -1
- package/packages/orq-rc/src/models/components/reasoningpart.ts +2 -2
- package/packages/orq-rc/src/models/components/responsestartedevent.ts +14 -0
- package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +1 -0
- package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +1 -0
- package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +1 -0
- package/packages/orq-rc/src/models/components/usermessagerequest.ts +194 -0
- package/packages/orq-rc/src/models/errors/index.ts +0 -2
- package/packages/orq-rc/src/models/operations/createagentrequest.ts +40 -0
- package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +122 -5
- package/packages/orq-rc/src/models/operations/createchatcompletion.ts +110 -7
- package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/createconversation.ts +59 -36
- package/packages/orq-rc/src/models/operations/createconversationresponse.ts +794 -0
- package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +48 -40
- package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/createeval.ts +28 -28
- package/packages/orq-rc/src/models/operations/createimage.ts +105 -5
- package/packages/orq-rc/src/models/operations/creatememory.ts +3 -15
- package/packages/orq-rc/src/models/operations/creatememorydocument.ts +7 -7
- package/packages/orq-rc/src/models/operations/createtool.ts +12 -12
- package/packages/orq-rc/src/models/operations/deletememory.ts +6 -6
- package/packages/orq-rc/src/models/operations/deletememorydocument.ts +6 -6
- package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
- package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
- package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
- package/packages/orq-rc/src/models/operations/generateconversationname.ts +27 -27
- package/packages/orq-rc/src/models/operations/getallmemories.ts +3 -8
- package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +6 -6
- package/packages/orq-rc/src/models/operations/getalltools.ts +12 -12
- package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
- package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +4 -4
- package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +4 -4
- package/packages/orq-rc/src/models/operations/getv2toolstoolidversionsversionid.ts +4 -4
- package/packages/orq-rc/src/models/operations/index.ts +1 -1
- package/packages/orq-rc/src/models/operations/invokeagent.ts +128 -5
- package/packages/orq-rc/src/models/operations/listagents.ts +20 -0
- package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
- package/packages/orq-rc/src/models/operations/listconversations.ts +10 -3
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +53 -53
- package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
- package/packages/orq-rc/src/models/operations/parse.ts +157 -2
- package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +22 -0
- package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrieveconversation.ts +0 -197
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +8 -8
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievememory.ts +9 -14
- package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +6 -6
- package/packages/orq-rc/src/models/operations/retrievetool.ts +12 -12
- package/packages/orq-rc/src/models/operations/runagent.ts +130 -7
- package/packages/orq-rc/src/models/operations/streamagent.ts +120 -5
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +122 -7
- package/packages/orq-rc/src/models/operations/updateagent.ts +20 -0
- package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/updateconversation.ts +39 -33
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +8 -8
- package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/updateeval.ts +28 -28
- package/packages/orq-rc/src/models/operations/updatememory.ts +9 -32
- package/packages/orq-rc/src/models/operations/updatememorydocument.ts +6 -6
- package/packages/orq-rc/src/models/operations/updatetool.ts +14 -14
- package/packages/orq-rc/src/sdk/conversations.ts +23 -1
- package/packages/orq-rc/src/sdk/evaluators.ts +0 -18
- package/packages/orq-rc/src/sdk/internal.ts +28 -0
- package/packages/orq-rc/src/sdk/sdk.ts +6 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/sdks.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/conversationresponse.ts +2 -2
- package/src/models/components/partdoneevent.ts +2 -2
- package/src/models/components/reasoningpart.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createconversation.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 +12 -12
- 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/generateconversationname.ts +2 -2
- package/src/models/operations/getalltools.ts +12 -12
- package/src/models/operations/getevals.ts +28 -28
- 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 +2 -2
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrieveconversation.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 +2 -2
- package/src/models/operations/streamrunagent.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updateconversation.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/packages/orq-rc/src/mcp-server/tools/evaluatorsGetV2EvaluatorsIdVersionsVersionId.ts +0 -40
- package/packages/orq-rc/src/models/errors/createagentrequest.ts +0 -67
- package/packages/orq-rc/src/models/errors/getv2evaluatorsidversionsversionid.ts +0 -69
- package/packages/orq-rc/src/models/operations/getv2evaluatorsidversionsversionid.ts +0 -193
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { conversationsCreateConversationResponse } from "../../funcs/conversationsCreateConversationResponse.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.CreateConversationResponseRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$conversationsCreateConversationResponse: ToolDefinition<
|
|
14
|
+
typeof args
|
|
15
|
+
> = {
|
|
16
|
+
name: "conversations-create-conversation-response",
|
|
17
|
+
description: `Create internal response
|
|
18
|
+
|
|
19
|
+
Creates a response for a freeform conversation without an agent. Uses a default model for generation.`,
|
|
20
|
+
args,
|
|
21
|
+
tool: async (client, args, ctx) => {
|
|
22
|
+
const [result, apiCall] = await conversationsCreateConversationResponse(
|
|
23
|
+
client,
|
|
24
|
+
args.request,
|
|
25
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
26
|
+
).$inspect();
|
|
27
|
+
|
|
28
|
+
if (!result.ok) {
|
|
29
|
+
return {
|
|
30
|
+
content: [{ type: "text", text: result.error.message }],
|
|
31
|
+
isError: true,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const value = result.value;
|
|
36
|
+
|
|
37
|
+
return formatResult(value, apiCall);
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -10,6 +10,7 @@ const args = {
|
|
|
10
10
|
limit: z.number().int().optional(),
|
|
11
11
|
startingAfter: z.string().optional(),
|
|
12
12
|
endingBefore: z.string().optional(),
|
|
13
|
+
entityId: z.string().optional(),
|
|
13
14
|
};
|
|
14
15
|
|
|
15
16
|
export const tool$conversationsList: ToolDefinition<typeof args> = {
|
|
@@ -24,6 +25,7 @@ Retrieves a paginated list of conversations in your workspace. Conversations are
|
|
|
24
25
|
args.limit,
|
|
25
26
|
args.startingAfter,
|
|
26
27
|
args.endingBefore,
|
|
28
|
+
args.entityId,
|
|
27
29
|
{ fetchOptions: { signal: ctx.signal } },
|
|
28
30
|
).$inspect();
|
|
29
31
|
|
|
@@ -14,6 +14,12 @@ import {
|
|
|
14
14
|
DataPart$Outbound,
|
|
15
15
|
DataPart$outboundSchema,
|
|
16
16
|
} from "./datapart.js";
|
|
17
|
+
import {
|
|
18
|
+
ErrorPart,
|
|
19
|
+
ErrorPart$inboundSchema,
|
|
20
|
+
ErrorPart$Outbound,
|
|
21
|
+
ErrorPart$outboundSchema,
|
|
22
|
+
} from "./errorpart.js";
|
|
17
23
|
import {
|
|
18
24
|
FilePart,
|
|
19
25
|
FilePart$inboundSchema,
|
|
@@ -57,6 +63,7 @@ export type AgentInactiveStreamingEventRole = ClosedEnum<
|
|
|
57
63
|
|
|
58
64
|
export type AgentInactiveStreamingEventParts =
|
|
59
65
|
| TextPart
|
|
66
|
+
| ErrorPart
|
|
60
67
|
| DataPart
|
|
61
68
|
| FilePart
|
|
62
69
|
| ToolCallPart
|
|
@@ -71,7 +78,9 @@ export type LastMessageFull = {
|
|
|
71
78
|
* Extended A2A message role
|
|
72
79
|
*/
|
|
73
80
|
role: AgentInactiveStreamingEventRole;
|
|
74
|
-
parts: Array<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
69
|
+
parts: Array<
|
|
70
|
+
TextPart | ErrorPart | DataPart | FilePart | ToolCallPart | ToolResultPart
|
|
71
|
+
>;
|
|
63
72
|
metadata?: { [k: string]: any } | undefined;
|
|
64
73
|
agentId: string;
|
|
65
74
|
agentExecutionId: string;
|
|
@@ -343,6 +352,7 @@ export const AgentThoughtStreamingEventParts$inboundSchema: z.ZodType<
|
|
|
343
352
|
unknown
|
|
344
353
|
> = z.union([
|
|
345
354
|
TextPart$inboundSchema,
|
|
355
|
+
ErrorPart$inboundSchema,
|
|
346
356
|
DataPart$inboundSchema,
|
|
347
357
|
FilePart$inboundSchema,
|
|
348
358
|
ToolCallPart$inboundSchema,
|
|
@@ -351,6 +361,7 @@ export const AgentThoughtStreamingEventParts$inboundSchema: z.ZodType<
|
|
|
351
361
|
/** @internal */
|
|
352
362
|
export type AgentThoughtStreamingEventParts$Outbound =
|
|
353
363
|
| TextPart$Outbound
|
|
364
|
+
| ErrorPart$Outbound
|
|
354
365
|
| DataPart$Outbound
|
|
355
366
|
| FilePart$Outbound
|
|
356
367
|
| ToolCallPart$Outbound
|
|
@@ -363,6 +374,7 @@ export const AgentThoughtStreamingEventParts$outboundSchema: z.ZodType<
|
|
|
363
374
|
AgentThoughtStreamingEventParts
|
|
364
375
|
> = z.union([
|
|
365
376
|
TextPart$outboundSchema,
|
|
377
|
+
ErrorPart$outboundSchema,
|
|
366
378
|
DataPart$outboundSchema,
|
|
367
379
|
FilePart$outboundSchema,
|
|
368
380
|
ToolCallPart$outboundSchema,
|
|
@@ -399,6 +411,7 @@ export const MessageDifference$inboundSchema: z.ZodType<
|
|
|
399
411
|
parts: z.array(
|
|
400
412
|
z.union([
|
|
401
413
|
TextPart$inboundSchema,
|
|
414
|
+
ErrorPart$inboundSchema,
|
|
402
415
|
DataPart$inboundSchema,
|
|
403
416
|
FilePart$inboundSchema,
|
|
404
417
|
ToolCallPart$inboundSchema,
|
|
@@ -422,6 +435,7 @@ export type MessageDifference$Outbound = {
|
|
|
422
435
|
role: string;
|
|
423
436
|
parts: Array<
|
|
424
437
|
| TextPart$Outbound
|
|
438
|
+
| ErrorPart$Outbound
|
|
425
439
|
| DataPart$Outbound
|
|
426
440
|
| FilePart$Outbound
|
|
427
441
|
| ToolCallPart$Outbound
|
|
@@ -444,6 +458,7 @@ export const MessageDifference$outboundSchema: z.ZodType<
|
|
|
444
458
|
parts: z.array(
|
|
445
459
|
z.union([
|
|
446
460
|
TextPart$outboundSchema,
|
|
461
|
+
ErrorPart$outboundSchema,
|
|
447
462
|
DataPart$outboundSchema,
|
|
448
463
|
FilePart$outboundSchema,
|
|
449
464
|
ToolCallPart$outboundSchema,
|
|
@@ -10,67 +10,67 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Resource type discriminator.
|
|
14
14
|
*/
|
|
15
15
|
export const ConversationResponseKind = {
|
|
16
16
|
Conversation: "conversation",
|
|
17
17
|
} as const;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Resource type discriminator.
|
|
20
20
|
*/
|
|
21
21
|
export type ConversationResponseKind = ClosedEnum<
|
|
22
22
|
typeof ConversationResponseKind
|
|
23
23
|
>;
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Additional conversation metadata.
|
|
27
27
|
*/
|
|
28
28
|
export type Metadata = {
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* When `true`, indicates the conversation title is being auto-generated.
|
|
31
31
|
*/
|
|
32
32
|
generatingTitle?: boolean | undefined;
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* Parent entity identifier (e.g., agent or deployment). Set to `null` for standalone conversations.
|
|
35
35
|
*/
|
|
36
|
-
entityId?: string | undefined;
|
|
36
|
+
entityId?: string | null | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Model identifier for standalone conversations in `provider/model_id` format. Set to `null` for entity-bound conversations.
|
|
39
|
+
*/
|
|
40
|
+
model?: string | null | undefined;
|
|
37
41
|
};
|
|
38
42
|
|
|
39
43
|
export type ConversationResponse = {
|
|
40
44
|
/**
|
|
41
|
-
* Unique
|
|
45
|
+
* Unique conversation identifier with `conv_` prefix.
|
|
42
46
|
*/
|
|
43
47
|
id?: string | undefined;
|
|
44
48
|
/**
|
|
45
|
-
*
|
|
46
|
-
*/
|
|
47
|
-
entityId: string;
|
|
48
|
-
/**
|
|
49
|
-
* Type discriminator indicating this is a conversation
|
|
49
|
+
* Resource type discriminator.
|
|
50
50
|
*/
|
|
51
51
|
kind: ConversationResponseKind;
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
53
|
+
* Human-readable name for the conversation. Maximum 100 characters.
|
|
54
54
|
*/
|
|
55
55
|
displayName: string;
|
|
56
56
|
/**
|
|
57
|
-
* Unix timestamp
|
|
57
|
+
* Unix timestamp in milliseconds when the conversation was created.
|
|
58
58
|
*/
|
|
59
59
|
createdAt: number;
|
|
60
60
|
/**
|
|
61
|
-
* Unix timestamp
|
|
61
|
+
* Unix timestamp in milliseconds when the conversation was last modified.
|
|
62
62
|
*/
|
|
63
63
|
updatedAt: number;
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
65
|
+
* Identifier of the user or system that created the conversation.
|
|
66
66
|
*/
|
|
67
67
|
createdById?: string | undefined;
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* Identifier of the user or system that last modified the conversation.
|
|
70
70
|
*/
|
|
71
71
|
updatedById?: string | undefined;
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* Additional conversation metadata.
|
|
74
74
|
*/
|
|
75
75
|
metadata?: Metadata | undefined;
|
|
76
76
|
};
|
|
@@ -91,12 +91,14 @@ export const Metadata$inboundSchema: z.ZodType<
|
|
|
91
91
|
unknown
|
|
92
92
|
> = z.object({
|
|
93
93
|
generatingTitle: z.boolean().optional(),
|
|
94
|
-
entityId: z.string().optional(),
|
|
94
|
+
entityId: z.nullable(z.string()).optional(),
|
|
95
|
+
model: z.nullable(z.string()).optional(),
|
|
95
96
|
});
|
|
96
97
|
/** @internal */
|
|
97
98
|
export type Metadata$Outbound = {
|
|
98
99
|
generatingTitle?: boolean | undefined;
|
|
99
|
-
entityId?: string | undefined;
|
|
100
|
+
entityId?: string | null | undefined;
|
|
101
|
+
model?: string | null | undefined;
|
|
100
102
|
};
|
|
101
103
|
|
|
102
104
|
/** @internal */
|
|
@@ -106,7 +108,8 @@ export const Metadata$outboundSchema: z.ZodType<
|
|
|
106
108
|
Metadata
|
|
107
109
|
> = z.object({
|
|
108
110
|
generatingTitle: z.boolean().optional(),
|
|
109
|
-
entityId: z.string().optional(),
|
|
111
|
+
entityId: z.nullable(z.string()).optional(),
|
|
112
|
+
model: z.nullable(z.string()).optional(),
|
|
110
113
|
});
|
|
111
114
|
|
|
112
115
|
export function metadataToJSON(metadata: Metadata): string {
|
|
@@ -128,8 +131,7 @@ export const ConversationResponse$inboundSchema: z.ZodType<
|
|
|
128
131
|
z.ZodTypeDef,
|
|
129
132
|
unknown
|
|
130
133
|
> = z.object({
|
|
131
|
-
_id: z.string().default("
|
|
132
|
-
entityId: z.string(),
|
|
134
|
+
_id: z.string().default("conv_01keveeqc4cn41rd0s2pvy4q4p"),
|
|
133
135
|
kind: ConversationResponseKind$inboundSchema,
|
|
134
136
|
displayName: z.string(),
|
|
135
137
|
createdAt: z.number(),
|
|
@@ -145,7 +147,6 @@ export const ConversationResponse$inboundSchema: z.ZodType<
|
|
|
145
147
|
/** @internal */
|
|
146
148
|
export type ConversationResponse$Outbound = {
|
|
147
149
|
_id: string;
|
|
148
|
-
entityId: string;
|
|
149
150
|
kind: string;
|
|
150
151
|
displayName: string;
|
|
151
152
|
createdAt: number;
|
|
@@ -161,8 +162,7 @@ export const ConversationResponse$outboundSchema: z.ZodType<
|
|
|
161
162
|
z.ZodTypeDef,
|
|
162
163
|
ConversationResponse
|
|
163
164
|
> = z.object({
|
|
164
|
-
id: z.string().default("
|
|
165
|
-
entityId: z.string(),
|
|
165
|
+
id: z.string().default("conv_01keveeqc4cn41rd0s2pvy4q4p"),
|
|
166
166
|
kind: ConversationResponseKind$outboundSchema,
|
|
167
167
|
displayName: z.string(),
|
|
168
168
|
createdAt: z.number(),
|