@orq-ai/node 4.11.0-rc.28 → 4.11.0-rc.29
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/funcs/agentsInvoke.d.ts +1 -1
- package/funcs/agentsInvoke.d.ts.map +1 -1
- package/funcs/agentsInvoke.js.map +1 -1
- package/funcs/agentsResponsesCreate.d.ts +2 -1
- package/funcs/agentsResponsesCreate.d.ts.map +1 -1
- package/funcs/agentsResponsesCreate.js +7 -5
- package/funcs/agentsResponsesCreate.js.map +1 -1
- package/funcs/agentsStream.d.ts +1 -1
- package/funcs/agentsStream.d.ts.map +1 -1
- package/funcs/agentsStream.js.map +1 -1
- package/funcs/annotationsCreate.d.ts +1 -1
- package/funcs/annotationsCreate.js +1 -1
- package/funcs/annotationsDelete.d.ts +1 -1
- package/funcs/annotationsDelete.js +1 -1
- package/funcs/deploymentsInvoke.d.ts +2 -1
- package/funcs/deploymentsInvoke.d.ts.map +1 -1
- package/funcs/deploymentsInvoke.js +2 -1
- package/funcs/deploymentsInvoke.js.map +1 -1
- package/funcs/promptsCreate.d.ts +1 -1
- package/funcs/promptsCreate.d.ts.map +1 -1
- package/funcs/promptsCreate.js +2 -1
- package/funcs/promptsCreate.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/agentresponserequest.d.ts +336 -0
- package/models/components/agentresponserequest.d.ts.map +1 -0
- package/models/components/agentresponserequest.js +210 -0
- package/models/components/agentresponserequest.js.map +1 -0
- package/models/components/agentthoughtstreamingevent.d.ts +12 -12
- package/models/components/agentthoughtstreamingevent.d.ts.map +1 -1
- package/models/components/agentthoughtstreamingevent.js +17 -17
- package/models/components/agentthoughtstreamingevent.js.map +1 -1
- package/models/components/index.d.ts +2 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -0
- package/models/components/index.js.map +1 -1
- package/models/components/invokedeploymentrequest.d.ts +1573 -0
- package/models/components/invokedeploymentrequest.d.ts.map +1 -0
- package/models/components/invokedeploymentrequest.js +1137 -0
- package/models/components/invokedeploymentrequest.js.map +1 -0
- package/models/components/reasoningpart.js +1 -1
- package/models/components/toolexecutionstartedstreamingevent.d.ts +4 -4
- package/models/components/toolexecutionstartedstreamingevent.d.ts.map +1 -1
- package/models/components/toolexecutionstartedstreamingevent.js +7 -7
- package/models/components/toolexecutionstartedstreamingevent.js.map +1 -1
- package/models/operations/createagentresponserequest.d.ts +2 -329
- package/models/operations/createagentresponserequest.d.ts.map +1 -1
- package/models/operations/createagentresponserequest.js +3 -166
- package/models/operations/createagentresponserequest.js.map +1 -1
- package/models/operations/createannotation.d.ts +48 -10
- package/models/operations/createannotation.d.ts.map +1 -1
- package/models/operations/createannotation.js +37 -5
- package/models/operations/createannotation.js.map +1 -1
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.d.ts +210 -12
- package/models/operations/createdatasetitem.d.ts.map +1 -1
- package/models/operations/createdatasetitem.js +136 -9
- package/models/operations/createdatasetitem.js.map +1 -1
- package/models/operations/createdatasource.d.ts +3 -0
- package/models/operations/createdatasource.d.ts.map +1 -1
- package/models/operations/createdatasource.js +1 -1
- package/models/operations/createdatasource.js.map +1 -1
- package/models/operations/createeval.js +16 -16
- package/models/operations/createprompt.d.ts +7 -4
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +5 -5
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/createtool.js +6 -6
- package/models/operations/deleteannotation.d.ts +19 -2
- package/models/operations/deleteannotation.d.ts.map +1 -1
- package/models/operations/deleteannotation.js +20 -2
- package/models/operations/deleteannotation.js.map +1 -1
- package/models/operations/deploymentgetconfig.d.ts +440 -440
- package/models/operations/deploymentgetconfig.d.ts.map +1 -1
- package/models/operations/deploymentgetconfig.js +484 -479
- package/models/operations/deploymentgetconfig.js.map +1 -1
- package/models/operations/deploymentinvoke.d.ts +0 -1560
- package/models/operations/deploymentinvoke.d.ts.map +1 -1
- package/models/operations/deploymentinvoke.js +1 -1126
- package/models/operations/deploymentinvoke.js.map +1 -1
- package/models/operations/deploymentstream.d.ts +56 -56
- package/models/operations/deploymentstream.d.ts.map +1 -1
- package/models/operations/deploymentstream.js +73 -72
- package/models/operations/deploymentstream.js.map +1 -1
- package/models/operations/getalltools.js +6 -6
- package/models/operations/getevals.js +16 -16
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/invokeagent.d.ts +51 -48
- package/models/operations/invokeagent.d.ts.map +1 -1
- package/models/operations/invokeagent.js +43 -46
- package/models/operations/invokeagent.js.map +1 -1
- package/models/operations/listdatasetdatapoints.d.ts +210 -12
- package/models/operations/listdatasetdatapoints.d.ts.map +1 -1
- package/models/operations/listdatasetdatapoints.js +138 -9
- package/models/operations/listdatasetdatapoints.js.map +1 -1
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listdatasources.js +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.d.ts +33 -12
- package/models/operations/postv2feedbackevaluation.d.ts.map +1 -1
- package/models/operations/postv2feedbackevaluation.js +9 -6
- package/models/operations/postv2feedbackevaluation.js.map +1 -1
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrievedatapoint.d.ts +210 -12
- package/models/operations/retrievedatapoint.d.ts.map +1 -1
- package/models/operations/retrievedatapoint.js +140 -8
- package/models/operations/retrievedatapoint.js.map +1 -1
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.js +1 -1
- package/models/operations/retrievetool.js +6 -6
- package/models/operations/runagent.js +1 -1
- package/models/operations/streamagent.d.ts +9 -6
- package/models/operations/streamagent.d.ts.map +1 -1
- package/models/operations/streamagent.js +6 -6
- package/models/operations/streamagent.js.map +1 -1
- package/models/operations/streamrunagent.js +1 -1
- package/models/operations/updatedatapoint.d.ts +210 -12
- package/models/operations/updatedatapoint.d.ts.map +1 -1
- package/models/operations/updatedatapoint.js +138 -9
- package/models/operations/updatedatapoint.js.map +1 -1
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatedatasource.js +1 -1
- package/models/operations/updateeval.js +16 -16
- package/models/operations/updateprompt.d.ts +9 -6
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +7 -6
- package/models/operations/updateprompt.js.map +1 -1
- package/models/operations/updatetool.js +7 -7
- package/package.json +3 -3
- package/sdk/agents.d.ts +2 -2
- package/sdk/agents.d.ts.map +1 -1
- package/sdk/agents.js.map +1 -1
- package/sdk/annotations.d.ts +2 -2
- package/sdk/annotations.js +2 -2
- package/sdk/deployments.d.ts +2 -1
- package/sdk/deployments.d.ts.map +1 -1
- package/sdk/deployments.js.map +1 -1
- package/sdk/feedback.d.ts +1 -4
- package/sdk/feedback.d.ts.map +1 -1
- package/sdk/feedback.js +1 -4
- package/sdk/feedback.js.map +1 -1
- package/sdk/orqresponses.d.ts +1 -1
- package/sdk/orqresponses.d.ts.map +1 -1
- package/sdk/orqresponses.js +2 -2
- package/sdk/orqresponses.js.map +1 -1
- package/sdk/prompts.d.ts +1 -1
- package/sdk/prompts.d.ts.map +1 -1
- package/sdk/prompts.js.map +1 -1
- package/src/funcs/agentsInvoke.ts +2 -2
- package/src/funcs/agentsResponsesCreate.ts +8 -5
- package/src/funcs/agentsStream.ts +2 -2
- package/src/funcs/annotationsCreate.ts +1 -1
- package/src/funcs/annotationsDelete.ts +1 -1
- package/src/funcs/deploymentsInvoke.ts +4 -4
- package/src/funcs/promptsCreate.ts +4 -3
- package/src/lib/config.ts +2 -2
- package/src/models/components/agentresponserequest.ts +565 -0
- package/src/models/components/agentthoughtstreamingevent.ts +55 -43
- package/src/models/components/index.ts +2 -0
- package/src/models/components/invokedeploymentrequest.ts +3457 -0
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/components/toolexecutionstartedstreamingevent.ts +24 -14
- package/src/models/operations/createagentresponserequest.ts +4 -550
- package/src/models/operations/createannotation.ts +110 -16
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +335 -19
- package/src/models/operations/createdatasource.ts +4 -1
- package/src/models/operations/createeval.ts +16 -16
- package/src/models/operations/createprompt.ts +13 -8
- package/src/models/operations/createtool.ts +6 -6
- package/src/models/operations/deleteannotation.ts +46 -3
- package/src/models/operations/deploymentgetconfig.ts +1156 -1606
- package/src/models/operations/deploymentinvoke.ts +222 -3675
- package/src/models/operations/deploymentstream.ts +244 -285
- package/src/models/operations/getalltools.ts +6 -6
- package/src/models/operations/getevals.ts +16 -16
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/invokeagent.ts +90 -116
- package/src/models/operations/listdatasetdatapoints.ts +378 -19
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/listdatasources.ts +1 -1
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +42 -18
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +363 -19
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +1 -1
- package/src/models/operations/retrievetool.ts +6 -6
- package/src/models/operations/runagent.ts +1 -1
- package/src/models/operations/streamagent.ts +16 -11
- package/src/models/operations/streamrunagent.ts +1 -1
- package/src/models/operations/updatedatapoint.ts +366 -19
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatedatasource.ts +1 -1
- package/src/models/operations/updateeval.ts +16 -16
- package/src/models/operations/updateprompt.ts +17 -11
- package/src/models/operations/updatetool.ts +7 -7
- package/src/sdk/agents.ts +2 -2
- package/src/sdk/annotations.ts +2 -2
- package/src/sdk/deployments.ts +2 -1
- package/src/sdk/feedback.ts +1 -4
- package/src/sdk/orqresponses.ts +2 -2
- package/src/sdk/prompts.ts +1 -1
|
@@ -40,7 +40,7 @@ export const ReasoningPart$inboundSchema: z.ZodType<
|
|
|
40
40
|
z.ZodTypeDef,
|
|
41
41
|
unknown
|
|
42
42
|
> = z.object({
|
|
43
|
-
_id: z.string().default("
|
|
43
|
+
_id: z.string().default("reasoning_01kvaq6zervadbq6rdbyw1cgzd"),
|
|
44
44
|
metadata: z.record(z.any()).optional(),
|
|
45
45
|
kind: z.literal("reasoning"),
|
|
46
46
|
reasoning: z.string(),
|
|
@@ -36,7 +36,7 @@ export const Product = {
|
|
|
36
36
|
*/
|
|
37
37
|
export type Product = ClosedEnum<typeof Product>;
|
|
38
38
|
|
|
39
|
-
export type
|
|
39
|
+
export type ToolExecutionStartedStreamingEventMemory = {
|
|
40
40
|
entityId: string;
|
|
41
41
|
};
|
|
42
42
|
|
|
@@ -50,7 +50,7 @@ export type ToolExecutionContext = {
|
|
|
50
50
|
* Orquesta product
|
|
51
51
|
*/
|
|
52
52
|
product: Product;
|
|
53
|
-
memory?:
|
|
53
|
+
memory?: ToolExecutionStartedStreamingEventMemory | undefined;
|
|
54
54
|
parentId?: string | undefined;
|
|
55
55
|
variables?: { [k: string]: any } | undefined;
|
|
56
56
|
secretKeys?: Array<string> | undefined;
|
|
@@ -86,22 +86,31 @@ export const Product$inboundSchema: z.ZodNativeEnum<typeof Product> = z
|
|
|
86
86
|
.nativeEnum(Product);
|
|
87
87
|
|
|
88
88
|
/** @internal */
|
|
89
|
-
export const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
export const ToolExecutionStartedStreamingEventMemory$inboundSchema: z.ZodType<
|
|
90
|
+
ToolExecutionStartedStreamingEventMemory,
|
|
91
|
+
z.ZodTypeDef,
|
|
92
|
+
unknown
|
|
93
|
+
> = z.object({
|
|
94
|
+
entity_id: z.string(),
|
|
95
|
+
}).transform((v) => {
|
|
96
|
+
return remap$(v, {
|
|
97
|
+
"entity_id": "entityId",
|
|
96
98
|
});
|
|
99
|
+
});
|
|
97
100
|
|
|
98
|
-
export function
|
|
101
|
+
export function toolExecutionStartedStreamingEventMemoryFromJSON(
|
|
99
102
|
jsonString: string,
|
|
100
|
-
): SafeParseResult<
|
|
103
|
+
): SafeParseResult<
|
|
104
|
+
ToolExecutionStartedStreamingEventMemory,
|
|
105
|
+
SDKValidationError
|
|
106
|
+
> {
|
|
101
107
|
return safeParse(
|
|
102
108
|
jsonString,
|
|
103
|
-
(x) =>
|
|
104
|
-
|
|
109
|
+
(x) =>
|
|
110
|
+
ToolExecutionStartedStreamingEventMemory$inboundSchema.parse(
|
|
111
|
+
JSON.parse(x),
|
|
112
|
+
),
|
|
113
|
+
`Failed to parse 'ToolExecutionStartedStreamingEventMemory' from JSON`,
|
|
105
114
|
);
|
|
106
115
|
}
|
|
107
116
|
|
|
@@ -117,7 +126,8 @@ export const ToolExecutionContext$inboundSchema: z.ZodType<
|
|
|
117
126
|
agent_manifest_id: z.string(),
|
|
118
127
|
agent_execution_id: z.string(),
|
|
119
128
|
product: Product$inboundSchema,
|
|
120
|
-
memory: z.lazy(() =>
|
|
129
|
+
memory: z.lazy(() => ToolExecutionStartedStreamingEventMemory$inboundSchema)
|
|
130
|
+
.optional(),
|
|
121
131
|
parent_id: z.string().optional(),
|
|
122
132
|
variables: z.record(z.any()).optional(),
|
|
123
133
|
secret_keys: z.array(z.string()).optional(),
|
|
@@ -6,254 +6,16 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { EventStream } from "../../lib/event-streams.js";
|
|
7
7
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
8
8
|
import { safeParse } from "../../lib/schemas.js";
|
|
9
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
10
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
11
10
|
import * as components from "../components/index.js";
|
|
12
11
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
13
12
|
|
|
14
|
-
/**
|
|
15
|
-
* Message containing tool execution results
|
|
16
|
-
*/
|
|
17
|
-
export const RoleToolMessage = {
|
|
18
|
-
Tool: "tool",
|
|
19
|
-
} as const;
|
|
20
|
-
/**
|
|
21
|
-
* Message containing tool execution results
|
|
22
|
-
*/
|
|
23
|
-
export type RoleToolMessage = ClosedEnum<typeof RoleToolMessage>;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Message from the end user
|
|
27
|
-
*/
|
|
28
|
-
export const RoleUserMessage = {
|
|
29
|
-
User: "user",
|
|
30
|
-
} as const;
|
|
31
|
-
/**
|
|
32
|
-
* Message from the end user
|
|
33
|
-
*/
|
|
34
|
-
export type RoleUserMessage = ClosedEnum<typeof RoleUserMessage>;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Message role (user or tool for continuing executions)
|
|
38
|
-
*/
|
|
39
|
-
export type CreateAgentResponseRequestRole = RoleUserMessage | RoleToolMessage;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Message part that can be provided by users. Use "text" for regular messages, "file" for attachments, or "tool_result" when responding to tool call requests.
|
|
43
|
-
*/
|
|
44
|
-
export type PublicMessagePart =
|
|
45
|
-
| components.TextPart
|
|
46
|
-
| components.FilePart
|
|
47
|
-
| components.ToolResultPart
|
|
48
|
-
| components.ErrorPart;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* The A2A message to send to the agent (user input or tool results)
|
|
52
|
-
*/
|
|
53
|
-
export type A2AMessage = {
|
|
54
|
-
/**
|
|
55
|
-
* Optional A2A message ID in ULID format
|
|
56
|
-
*/
|
|
57
|
-
messageId?: string | undefined;
|
|
58
|
-
/**
|
|
59
|
-
* Message role (user or tool for continuing executions)
|
|
60
|
-
*/
|
|
61
|
-
role: RoleUserMessage | RoleToolMessage;
|
|
62
|
-
/**
|
|
63
|
-
* A2A message parts (text, file, or tool_result only). Note: Tool role messages must only contain tool_result parts.
|
|
64
|
-
*/
|
|
65
|
-
parts: Array<
|
|
66
|
-
| components.TextPart
|
|
67
|
-
| components.FilePart
|
|
68
|
-
| components.ToolResultPart
|
|
69
|
-
| components.ErrorPart
|
|
70
|
-
>;
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Information about the identity making the request. If the identity does not exist, it will be created automatically.
|
|
75
|
-
*/
|
|
76
|
-
export type Identity = {
|
|
77
|
-
/**
|
|
78
|
-
* Unique identifier for the contact
|
|
79
|
-
*/
|
|
80
|
-
id: string;
|
|
81
|
-
/**
|
|
82
|
-
* Display name of the contact
|
|
83
|
-
*/
|
|
84
|
-
displayName?: string | undefined;
|
|
85
|
-
/**
|
|
86
|
-
* Email address of the contact
|
|
87
|
-
*/
|
|
88
|
-
email?: string | undefined;
|
|
89
|
-
/**
|
|
90
|
-
* A hash of key/value pairs containing any other data about the contact
|
|
91
|
-
*/
|
|
92
|
-
metadata?: Array<{ [k: string]: any }> | undefined;
|
|
93
|
-
/**
|
|
94
|
-
* URL to the contact's avatar or logo
|
|
95
|
-
*/
|
|
96
|
-
logoUrl?: string | undefined;
|
|
97
|
-
/**
|
|
98
|
-
* A list of tags associated with the contact
|
|
99
|
-
*/
|
|
100
|
-
tags?: Array<string> | undefined;
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @deprecated Use identity instead. Information about the contact making the request.
|
|
105
|
-
*
|
|
106
|
-
* @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
107
|
-
*/
|
|
108
|
-
export type Contact = {
|
|
109
|
-
/**
|
|
110
|
-
* Unique identifier for the contact
|
|
111
|
-
*/
|
|
112
|
-
id: string;
|
|
113
|
-
/**
|
|
114
|
-
* Display name of the contact
|
|
115
|
-
*/
|
|
116
|
-
displayName?: string | undefined;
|
|
117
|
-
/**
|
|
118
|
-
* Email address of the contact
|
|
119
|
-
*/
|
|
120
|
-
email?: string | undefined;
|
|
121
|
-
/**
|
|
122
|
-
* A hash of key/value pairs containing any other data about the contact
|
|
123
|
-
*/
|
|
124
|
-
metadata?: Array<{ [k: string]: any }> | undefined;
|
|
125
|
-
/**
|
|
126
|
-
* URL to the contact's avatar or logo
|
|
127
|
-
*/
|
|
128
|
-
logoUrl?: string | undefined;
|
|
129
|
-
/**
|
|
130
|
-
* A list of tags associated with the contact
|
|
131
|
-
*/
|
|
132
|
-
tags?: Array<string> | undefined;
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Thread information to group related requests
|
|
137
|
-
*/
|
|
138
|
-
export type CreateAgentResponseRequestThread = {
|
|
139
|
-
/**
|
|
140
|
-
* Unique thread identifier to group related invocations.
|
|
141
|
-
*/
|
|
142
|
-
id: string;
|
|
143
|
-
/**
|
|
144
|
-
* Optional tags to differentiate or categorize threads
|
|
145
|
-
*/
|
|
146
|
-
tags?: Array<string> | undefined;
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Memory configuration for the agent execution. Used to associate memory stores with specific entities like users or sessions.
|
|
151
|
-
*/
|
|
152
|
-
export type Memory = {
|
|
153
|
-
/**
|
|
154
|
-
* An entity ID used to link memory stores to a specific user, session, or conversation. This ID is used to isolate and retrieve memories specific to the entity across agent executions.
|
|
155
|
-
*/
|
|
156
|
-
entityId: string;
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Override template engine for this invocation. If not provided, uses the agent default.
|
|
161
|
-
*/
|
|
162
|
-
export const CreateAgentResponseRequestEngine = {
|
|
163
|
-
Text: "text",
|
|
164
|
-
Jinja: "jinja",
|
|
165
|
-
Mustache: "mustache",
|
|
166
|
-
} as const;
|
|
167
|
-
/**
|
|
168
|
-
* Override template engine for this invocation. If not provided, uses the agent default.
|
|
169
|
-
*/
|
|
170
|
-
export type CreateAgentResponseRequestEngine = ClosedEnum<
|
|
171
|
-
typeof CreateAgentResponseRequestEngine
|
|
172
|
-
>;
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* Configuration options for the agent invocation
|
|
176
|
-
*/
|
|
177
|
-
export type Configuration = {
|
|
178
|
-
/**
|
|
179
|
-
* Whether to block until the agent task completes. When true, the response will include the full task with messages. When false (default), returns immediately with task ID and status.
|
|
180
|
-
*/
|
|
181
|
-
blocking?: boolean | undefined;
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Conversation context for chat studio integration
|
|
186
|
-
*/
|
|
187
|
-
export type Conversation = {
|
|
188
|
-
/**
|
|
189
|
-
* Unique ULID identifier for the conversation, prefixed with "conv_". Used to link agent executions to a specific conversation thread.
|
|
190
|
-
*/
|
|
191
|
-
id: string;
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
export type CreateAgentResponseRequestRequestBody = {
|
|
195
|
-
/**
|
|
196
|
-
* 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.
|
|
197
|
-
*/
|
|
198
|
-
taskId?: string | undefined;
|
|
199
|
-
/**
|
|
200
|
-
* The A2A message to send to the agent (user input or tool results)
|
|
201
|
-
*/
|
|
202
|
-
message: A2AMessage;
|
|
203
|
-
/**
|
|
204
|
-
* Optional variables for template replacement in system prompt, instructions, and messages
|
|
205
|
-
*/
|
|
206
|
-
variables?: { [k: string]: any } | undefined;
|
|
207
|
-
/**
|
|
208
|
-
* Information about the identity making the request. If the identity does not exist, it will be created automatically.
|
|
209
|
-
*/
|
|
210
|
-
identity?: Identity | undefined;
|
|
211
|
-
/**
|
|
212
|
-
* @deprecated Use identity instead. Information about the contact making the request.
|
|
213
|
-
*
|
|
214
|
-
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
215
|
-
*/
|
|
216
|
-
contact?: Contact | undefined;
|
|
217
|
-
/**
|
|
218
|
-
* Thread information to group related requests
|
|
219
|
-
*/
|
|
220
|
-
thread?: CreateAgentResponseRequestThread | undefined;
|
|
221
|
-
/**
|
|
222
|
-
* Memory configuration for the agent execution. Used to associate memory stores with specific entities like users or sessions.
|
|
223
|
-
*/
|
|
224
|
-
memory?: Memory | undefined;
|
|
225
|
-
/**
|
|
226
|
-
* Optional metadata for the agent invocation as key-value pairs that will be included in traces
|
|
227
|
-
*/
|
|
228
|
-
metadata?: { [k: string]: any } | undefined;
|
|
229
|
-
/**
|
|
230
|
-
* Override template engine for this invocation. If not provided, uses the agent default.
|
|
231
|
-
*/
|
|
232
|
-
engine?: CreateAgentResponseRequestEngine | undefined;
|
|
233
|
-
/**
|
|
234
|
-
* Configuration options for the agent invocation
|
|
235
|
-
*/
|
|
236
|
-
configuration?: Configuration | undefined;
|
|
237
|
-
/**
|
|
238
|
-
* If true, returns immediately without waiting for completion. If false (default), waits until the agent becomes inactive or errors.
|
|
239
|
-
*/
|
|
240
|
-
background?: boolean | undefined;
|
|
241
|
-
/**
|
|
242
|
-
* If true, returns Server-Sent Events (SSE) streaming response with real-time events. If false (default), returns standard JSON response.
|
|
243
|
-
*/
|
|
244
|
-
stream?: boolean | undefined;
|
|
245
|
-
/**
|
|
246
|
-
* Conversation context for chat studio integration
|
|
247
|
-
*/
|
|
248
|
-
conversation?: Conversation | undefined;
|
|
249
|
-
};
|
|
250
|
-
|
|
251
13
|
export type CreateAgentResponseRequestRequest = {
|
|
252
14
|
/**
|
|
253
15
|
* The unique key of identifier of the agent to invoke
|
|
254
16
|
*/
|
|
255
17
|
agentKey: string;
|
|
256
|
-
|
|
18
|
+
agentResponseRequest: components.AgentResponseRequest;
|
|
257
19
|
};
|
|
258
20
|
|
|
259
21
|
/**
|
|
@@ -270,316 +32,10 @@ export type CreateAgentResponseRequestResponse =
|
|
|
270
32
|
| components.CreateAgentResponse
|
|
271
33
|
| EventStream<CreateAgentResponseRequestResponseBody>;
|
|
272
34
|
|
|
273
|
-
/** @internal */
|
|
274
|
-
export const RoleToolMessage$outboundSchema: z.ZodNativeEnum<
|
|
275
|
-
typeof RoleToolMessage
|
|
276
|
-
> = z.nativeEnum(RoleToolMessage);
|
|
277
|
-
|
|
278
|
-
/** @internal */
|
|
279
|
-
export const RoleUserMessage$outboundSchema: z.ZodNativeEnum<
|
|
280
|
-
typeof RoleUserMessage
|
|
281
|
-
> = z.nativeEnum(RoleUserMessage);
|
|
282
|
-
|
|
283
|
-
/** @internal */
|
|
284
|
-
export type CreateAgentResponseRequestRole$Outbound = string | string;
|
|
285
|
-
|
|
286
|
-
/** @internal */
|
|
287
|
-
export const CreateAgentResponseRequestRole$outboundSchema: z.ZodType<
|
|
288
|
-
CreateAgentResponseRequestRole$Outbound,
|
|
289
|
-
z.ZodTypeDef,
|
|
290
|
-
CreateAgentResponseRequestRole
|
|
291
|
-
> = z.union([RoleUserMessage$outboundSchema, RoleToolMessage$outboundSchema]);
|
|
292
|
-
|
|
293
|
-
export function createAgentResponseRequestRoleToJSON(
|
|
294
|
-
createAgentResponseRequestRole: CreateAgentResponseRequestRole,
|
|
295
|
-
): string {
|
|
296
|
-
return JSON.stringify(
|
|
297
|
-
CreateAgentResponseRequestRole$outboundSchema.parse(
|
|
298
|
-
createAgentResponseRequestRole,
|
|
299
|
-
),
|
|
300
|
-
);
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
/** @internal */
|
|
304
|
-
export type PublicMessagePart$Outbound =
|
|
305
|
-
| components.TextPart$Outbound
|
|
306
|
-
| components.FilePart$Outbound
|
|
307
|
-
| components.ToolResultPart$Outbound
|
|
308
|
-
| components.ErrorPart$Outbound;
|
|
309
|
-
|
|
310
|
-
/** @internal */
|
|
311
|
-
export const PublicMessagePart$outboundSchema: z.ZodType<
|
|
312
|
-
PublicMessagePart$Outbound,
|
|
313
|
-
z.ZodTypeDef,
|
|
314
|
-
PublicMessagePart
|
|
315
|
-
> = z.union([
|
|
316
|
-
components.TextPart$outboundSchema,
|
|
317
|
-
components.FilePart$outboundSchema,
|
|
318
|
-
components.ToolResultPart$outboundSchema,
|
|
319
|
-
components.ErrorPart$outboundSchema,
|
|
320
|
-
]);
|
|
321
|
-
|
|
322
|
-
export function publicMessagePartToJSON(
|
|
323
|
-
publicMessagePart: PublicMessagePart,
|
|
324
|
-
): string {
|
|
325
|
-
return JSON.stringify(
|
|
326
|
-
PublicMessagePart$outboundSchema.parse(publicMessagePart),
|
|
327
|
-
);
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
/** @internal */
|
|
331
|
-
export type A2AMessage$Outbound = {
|
|
332
|
-
messageId?: string | undefined;
|
|
333
|
-
role: string | string;
|
|
334
|
-
parts: Array<
|
|
335
|
-
| components.TextPart$Outbound
|
|
336
|
-
| components.FilePart$Outbound
|
|
337
|
-
| components.ToolResultPart$Outbound
|
|
338
|
-
| components.ErrorPart$Outbound
|
|
339
|
-
>;
|
|
340
|
-
};
|
|
341
|
-
|
|
342
|
-
/** @internal */
|
|
343
|
-
export const A2AMessage$outboundSchema: z.ZodType<
|
|
344
|
-
A2AMessage$Outbound,
|
|
345
|
-
z.ZodTypeDef,
|
|
346
|
-
A2AMessage
|
|
347
|
-
> = z.object({
|
|
348
|
-
messageId: z.string().optional(),
|
|
349
|
-
role: z.union([
|
|
350
|
-
RoleUserMessage$outboundSchema,
|
|
351
|
-
RoleToolMessage$outboundSchema,
|
|
352
|
-
]),
|
|
353
|
-
parts: z.array(
|
|
354
|
-
z.union([
|
|
355
|
-
components.TextPart$outboundSchema,
|
|
356
|
-
components.FilePart$outboundSchema,
|
|
357
|
-
components.ToolResultPart$outboundSchema,
|
|
358
|
-
components.ErrorPart$outboundSchema,
|
|
359
|
-
]),
|
|
360
|
-
),
|
|
361
|
-
});
|
|
362
|
-
|
|
363
|
-
export function a2AMessageToJSON(a2AMessage: A2AMessage): string {
|
|
364
|
-
return JSON.stringify(A2AMessage$outboundSchema.parse(a2AMessage));
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
/** @internal */
|
|
368
|
-
export type Identity$Outbound = {
|
|
369
|
-
id: string;
|
|
370
|
-
display_name?: string | undefined;
|
|
371
|
-
email?: string | undefined;
|
|
372
|
-
metadata?: Array<{ [k: string]: any }> | undefined;
|
|
373
|
-
logo_url?: string | undefined;
|
|
374
|
-
tags?: Array<string> | undefined;
|
|
375
|
-
};
|
|
376
|
-
|
|
377
|
-
/** @internal */
|
|
378
|
-
export const Identity$outboundSchema: z.ZodType<
|
|
379
|
-
Identity$Outbound,
|
|
380
|
-
z.ZodTypeDef,
|
|
381
|
-
Identity
|
|
382
|
-
> = z.object({
|
|
383
|
-
id: z.string(),
|
|
384
|
-
displayName: z.string().optional(),
|
|
385
|
-
email: z.string().optional(),
|
|
386
|
-
metadata: z.array(z.record(z.any())).optional(),
|
|
387
|
-
logoUrl: z.string().optional(),
|
|
388
|
-
tags: z.array(z.string()).optional(),
|
|
389
|
-
}).transform((v) => {
|
|
390
|
-
return remap$(v, {
|
|
391
|
-
displayName: "display_name",
|
|
392
|
-
logoUrl: "logo_url",
|
|
393
|
-
});
|
|
394
|
-
});
|
|
395
|
-
|
|
396
|
-
export function identityToJSON(identity: Identity): string {
|
|
397
|
-
return JSON.stringify(Identity$outboundSchema.parse(identity));
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
/** @internal */
|
|
401
|
-
export type Contact$Outbound = {
|
|
402
|
-
id: string;
|
|
403
|
-
display_name?: string | undefined;
|
|
404
|
-
email?: string | undefined;
|
|
405
|
-
metadata?: Array<{ [k: string]: any }> | undefined;
|
|
406
|
-
logo_url?: string | undefined;
|
|
407
|
-
tags?: Array<string> | undefined;
|
|
408
|
-
};
|
|
409
|
-
|
|
410
|
-
/** @internal */
|
|
411
|
-
export const Contact$outboundSchema: z.ZodType<
|
|
412
|
-
Contact$Outbound,
|
|
413
|
-
z.ZodTypeDef,
|
|
414
|
-
Contact
|
|
415
|
-
> = z.object({
|
|
416
|
-
id: z.string(),
|
|
417
|
-
displayName: z.string().optional(),
|
|
418
|
-
email: z.string().optional(),
|
|
419
|
-
metadata: z.array(z.record(z.any())).optional(),
|
|
420
|
-
logoUrl: z.string().optional(),
|
|
421
|
-
tags: z.array(z.string()).optional(),
|
|
422
|
-
}).transform((v) => {
|
|
423
|
-
return remap$(v, {
|
|
424
|
-
displayName: "display_name",
|
|
425
|
-
logoUrl: "logo_url",
|
|
426
|
-
});
|
|
427
|
-
});
|
|
428
|
-
|
|
429
|
-
export function contactToJSON(contact: Contact): string {
|
|
430
|
-
return JSON.stringify(Contact$outboundSchema.parse(contact));
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
/** @internal */
|
|
434
|
-
export type CreateAgentResponseRequestThread$Outbound = {
|
|
435
|
-
id: string;
|
|
436
|
-
tags?: Array<string> | undefined;
|
|
437
|
-
};
|
|
438
|
-
|
|
439
|
-
/** @internal */
|
|
440
|
-
export const CreateAgentResponseRequestThread$outboundSchema: z.ZodType<
|
|
441
|
-
CreateAgentResponseRequestThread$Outbound,
|
|
442
|
-
z.ZodTypeDef,
|
|
443
|
-
CreateAgentResponseRequestThread
|
|
444
|
-
> = z.object({
|
|
445
|
-
id: z.string(),
|
|
446
|
-
tags: z.array(z.string()).optional(),
|
|
447
|
-
});
|
|
448
|
-
|
|
449
|
-
export function createAgentResponseRequestThreadToJSON(
|
|
450
|
-
createAgentResponseRequestThread: CreateAgentResponseRequestThread,
|
|
451
|
-
): string {
|
|
452
|
-
return JSON.stringify(
|
|
453
|
-
CreateAgentResponseRequestThread$outboundSchema.parse(
|
|
454
|
-
createAgentResponseRequestThread,
|
|
455
|
-
),
|
|
456
|
-
);
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
/** @internal */
|
|
460
|
-
export type Memory$Outbound = {
|
|
461
|
-
entity_id: string;
|
|
462
|
-
};
|
|
463
|
-
|
|
464
|
-
/** @internal */
|
|
465
|
-
export const Memory$outboundSchema: z.ZodType<
|
|
466
|
-
Memory$Outbound,
|
|
467
|
-
z.ZodTypeDef,
|
|
468
|
-
Memory
|
|
469
|
-
> = z.object({
|
|
470
|
-
entityId: z.string(),
|
|
471
|
-
}).transform((v) => {
|
|
472
|
-
return remap$(v, {
|
|
473
|
-
entityId: "entity_id",
|
|
474
|
-
});
|
|
475
|
-
});
|
|
476
|
-
|
|
477
|
-
export function memoryToJSON(memory: Memory): string {
|
|
478
|
-
return JSON.stringify(Memory$outboundSchema.parse(memory));
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
/** @internal */
|
|
482
|
-
export const CreateAgentResponseRequestEngine$outboundSchema: z.ZodNativeEnum<
|
|
483
|
-
typeof CreateAgentResponseRequestEngine
|
|
484
|
-
> = z.nativeEnum(CreateAgentResponseRequestEngine);
|
|
485
|
-
|
|
486
|
-
/** @internal */
|
|
487
|
-
export type Configuration$Outbound = {
|
|
488
|
-
blocking: boolean;
|
|
489
|
-
};
|
|
490
|
-
|
|
491
|
-
/** @internal */
|
|
492
|
-
export const Configuration$outboundSchema: z.ZodType<
|
|
493
|
-
Configuration$Outbound,
|
|
494
|
-
z.ZodTypeDef,
|
|
495
|
-
Configuration
|
|
496
|
-
> = z.object({
|
|
497
|
-
blocking: z.boolean().default(false),
|
|
498
|
-
});
|
|
499
|
-
|
|
500
|
-
export function configurationToJSON(configuration: Configuration): string {
|
|
501
|
-
return JSON.stringify(Configuration$outboundSchema.parse(configuration));
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
/** @internal */
|
|
505
|
-
export type Conversation$Outbound = {
|
|
506
|
-
_id: string;
|
|
507
|
-
};
|
|
508
|
-
|
|
509
|
-
/** @internal */
|
|
510
|
-
export const Conversation$outboundSchema: z.ZodType<
|
|
511
|
-
Conversation$Outbound,
|
|
512
|
-
z.ZodTypeDef,
|
|
513
|
-
Conversation
|
|
514
|
-
> = z.object({
|
|
515
|
-
id: z.string(),
|
|
516
|
-
}).transform((v) => {
|
|
517
|
-
return remap$(v, {
|
|
518
|
-
id: "_id",
|
|
519
|
-
});
|
|
520
|
-
});
|
|
521
|
-
|
|
522
|
-
export function conversationToJSON(conversation: Conversation): string {
|
|
523
|
-
return JSON.stringify(Conversation$outboundSchema.parse(conversation));
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
/** @internal */
|
|
527
|
-
export type CreateAgentResponseRequestRequestBody$Outbound = {
|
|
528
|
-
task_id?: string | undefined;
|
|
529
|
-
message: A2AMessage$Outbound;
|
|
530
|
-
variables?: { [k: string]: any } | undefined;
|
|
531
|
-
identity?: Identity$Outbound | undefined;
|
|
532
|
-
contact?: Contact$Outbound | undefined;
|
|
533
|
-
thread?: CreateAgentResponseRequestThread$Outbound | undefined;
|
|
534
|
-
memory?: Memory$Outbound | undefined;
|
|
535
|
-
metadata?: { [k: string]: any } | undefined;
|
|
536
|
-
engine?: string | undefined;
|
|
537
|
-
configuration?: Configuration$Outbound | undefined;
|
|
538
|
-
background: boolean;
|
|
539
|
-
stream: boolean;
|
|
540
|
-
conversation?: Conversation$Outbound | undefined;
|
|
541
|
-
};
|
|
542
|
-
|
|
543
|
-
/** @internal */
|
|
544
|
-
export const CreateAgentResponseRequestRequestBody$outboundSchema: z.ZodType<
|
|
545
|
-
CreateAgentResponseRequestRequestBody$Outbound,
|
|
546
|
-
z.ZodTypeDef,
|
|
547
|
-
CreateAgentResponseRequestRequestBody
|
|
548
|
-
> = z.object({
|
|
549
|
-
taskId: z.string().optional(),
|
|
550
|
-
message: z.lazy(() => A2AMessage$outboundSchema),
|
|
551
|
-
variables: z.record(z.any()).optional(),
|
|
552
|
-
identity: z.lazy(() => Identity$outboundSchema).optional(),
|
|
553
|
-
contact: z.lazy(() => Contact$outboundSchema).optional(),
|
|
554
|
-
thread: z.lazy(() => CreateAgentResponseRequestThread$outboundSchema)
|
|
555
|
-
.optional(),
|
|
556
|
-
memory: z.lazy(() => Memory$outboundSchema).optional(),
|
|
557
|
-
metadata: z.record(z.any()).optional(),
|
|
558
|
-
engine: CreateAgentResponseRequestEngine$outboundSchema.optional(),
|
|
559
|
-
configuration: z.lazy(() => Configuration$outboundSchema).optional(),
|
|
560
|
-
background: z.boolean().default(false),
|
|
561
|
-
stream: z.boolean().default(false),
|
|
562
|
-
conversation: z.lazy(() => Conversation$outboundSchema).optional(),
|
|
563
|
-
}).transform((v) => {
|
|
564
|
-
return remap$(v, {
|
|
565
|
-
taskId: "task_id",
|
|
566
|
-
});
|
|
567
|
-
});
|
|
568
|
-
|
|
569
|
-
export function createAgentResponseRequestRequestBodyToJSON(
|
|
570
|
-
createAgentResponseRequestRequestBody: CreateAgentResponseRequestRequestBody,
|
|
571
|
-
): string {
|
|
572
|
-
return JSON.stringify(
|
|
573
|
-
CreateAgentResponseRequestRequestBody$outboundSchema.parse(
|
|
574
|
-
createAgentResponseRequestRequestBody,
|
|
575
|
-
),
|
|
576
|
-
);
|
|
577
|
-
}
|
|
578
|
-
|
|
579
35
|
/** @internal */
|
|
580
36
|
export type CreateAgentResponseRequestRequest$Outbound = {
|
|
581
37
|
agent_key: string;
|
|
582
|
-
|
|
38
|
+
AgentResponseRequest: components.AgentResponseRequest$Outbound;
|
|
583
39
|
};
|
|
584
40
|
|
|
585
41
|
/** @internal */
|
|
@@ -589,13 +45,11 @@ export const CreateAgentResponseRequestRequest$outboundSchema: z.ZodType<
|
|
|
589
45
|
CreateAgentResponseRequestRequest
|
|
590
46
|
> = z.object({
|
|
591
47
|
agentKey: z.string(),
|
|
592
|
-
|
|
593
|
-
CreateAgentResponseRequestRequestBody$outboundSchema
|
|
594
|
-
),
|
|
48
|
+
agentResponseRequest: components.AgentResponseRequest$outboundSchema,
|
|
595
49
|
}).transform((v) => {
|
|
596
50
|
return remap$(v, {
|
|
597
51
|
agentKey: "agent_key",
|
|
598
|
-
|
|
52
|
+
agentResponseRequest: "AgentResponseRequest",
|
|
599
53
|
});
|
|
600
54
|
});
|
|
601
55
|
|