@orq-ai/node 4.1.0-rc.3 → 4.1.0-rc.5
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 +34865 -37649
- package/bin/mcp-server.js.map +77 -55
- 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/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/components/actionreviewedstreamingevent.d.ts +76 -0
- package/models/components/actionreviewedstreamingevent.d.ts.map +1 -0
- package/models/components/actionreviewedstreamingevent.js +127 -0
- package/models/components/actionreviewedstreamingevent.js.map +1 -0
- package/models/components/actionreviewrequestedstreamingevent.d.ts +135 -0
- package/models/components/actionreviewrequestedstreamingevent.d.ts.map +1 -0
- package/models/components/actionreviewrequestedstreamingevent.js +180 -0
- package/models/components/actionreviewrequestedstreamingevent.js.map +1 -0
- package/models/components/agenterroredstreamingevent.d.ts +58 -0
- package/models/components/agenterroredstreamingevent.d.ts.map +1 -0
- package/models/components/agenterroredstreamingevent.js +91 -0
- package/models/components/agenterroredstreamingevent.js.map +1 -0
- package/models/components/agentexecutionstartedstreamingevent.d.ts +62 -0
- package/models/components/agentexecutionstartedstreamingevent.d.ts.map +1 -0
- package/models/components/agentexecutionstartedstreamingevent.js +103 -0
- package/models/components/agentexecutionstartedstreamingevent.js.map +1 -0
- package/models/components/agenthandedoffstreamingevent.d.ts +51 -0
- package/models/components/agenthandedoffstreamingevent.d.ts.map +1 -0
- package/models/components/agenthandedoffstreamingevent.js +96 -0
- package/models/components/agenthandedoffstreamingevent.js.map +1 -0
- package/models/components/agentinactivestreamingevent.d.ts +309 -0
- package/models/components/agentinactivestreamingevent.d.ts.map +1 -0
- package/models/components/agentinactivestreamingevent.js +385 -0
- package/models/components/agentinactivestreamingevent.js.map +1 -0
- package/models/components/agentmessagecreatedstreamingevent.d.ts +141 -0
- package/models/components/agentmessagecreatedstreamingevent.d.ts.map +1 -0
- package/models/components/agentmessagecreatedstreamingevent.js +190 -0
- package/models/components/agentmessagecreatedstreamingevent.js.map +1 -0
- package/models/components/agentstartedstreamingevent.d.ts +382 -0
- package/models/components/agentstartedstreamingevent.d.ts.map +1 -0
- package/models/components/agentstartedstreamingevent.js +441 -0
- package/models/components/agentstartedstreamingevent.js.map +1 -0
- package/models/components/agentthoughtstreamingevent.d.ts +542 -0
- package/models/components/agentthoughtstreamingevent.d.ts.map +1 -0
- package/models/components/agentthoughtstreamingevent.js +626 -0
- package/models/components/agentthoughtstreamingevent.js.map +1 -0
- package/models/components/datapart.d.ts +41 -0
- package/models/components/datapart.d.ts.map +1 -0
- package/models/components/datapart.js +69 -0
- package/models/components/datapart.js.map +1 -0
- package/models/components/errorstreamingevent.d.ts +51 -0
- package/models/components/errorstreamingevent.d.ts.map +1 -0
- package/models/components/errorstreamingevent.js +87 -0
- package/models/components/errorstreamingevent.js.map +1 -0
- package/models/components/executionnamedstreamingevent.d.ts +51 -0
- package/models/components/executionnamedstreamingevent.d.ts.map +1 -0
- package/models/components/executionnamedstreamingevent.js +96 -0
- package/models/components/executionnamedstreamingevent.js.map +1 -0
- package/models/components/executionreviewedstreamingevent.d.ts +45 -0
- package/models/components/executionreviewedstreamingevent.d.ts.map +1 -0
- package/models/components/executionreviewedstreamingevent.js +81 -0
- package/models/components/executionreviewedstreamingevent.js.map +1 -0
- package/models/components/executionreviewrequiredstreamingevent.d.ts +45 -0
- package/models/components/executionreviewrequiredstreamingevent.d.ts.map +1 -0
- package/models/components/executionreviewrequiredstreamingevent.js +82 -0
- package/models/components/executionreviewrequiredstreamingevent.js.map +1 -0
- package/models/components/filepart.d.ts +104 -0
- package/models/components/filepart.d.ts.map +1 -0
- package/models/components/filepart.js +134 -0
- package/models/components/filepart.js.map +1 -0
- package/models/components/index.d.ts +22 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +22 -0
- package/models/components/index.js.map +1 -1
- package/models/components/invokedeploymentrequest.d.ts +21 -21
- package/models/components/invokedeploymentrequest.d.ts.map +1 -1
- package/models/components/invokedeploymentrequest.js +27 -28
- package/models/components/invokedeploymentrequest.js.map +1 -1
- package/models/components/textpart.d.ts +31 -0
- package/models/components/textpart.d.ts.map +1 -0
- package/models/components/textpart.js +67 -0
- package/models/components/textpart.js.map +1 -0
- package/models/components/timeoutstreamingevent.d.ts +49 -0
- package/models/components/timeoutstreamingevent.d.ts.map +1 -0
- package/models/components/timeoutstreamingevent.js +85 -0
- package/models/components/timeoutstreamingevent.js.map +1 -0
- package/models/components/toolcallpart.d.ts +45 -0
- package/models/components/toolcallpart.d.ts.map +1 -0
- package/models/components/toolcallpart.js +84 -0
- package/models/components/toolcallpart.js.map +1 -0
- package/models/components/toolexecutionfailedstreamingevent.d.ts +144 -0
- package/models/components/toolexecutionfailedstreamingevent.d.ts.map +1 -0
- package/models/components/toolexecutionfailedstreamingevent.js +223 -0
- package/models/components/toolexecutionfailedstreamingevent.js.map +1 -0
- package/models/components/toolexecutionfinishedstreamingevent.d.ts +129 -0
- package/models/components/toolexecutionfinishedstreamingevent.d.ts.map +1 -0
- package/models/components/toolexecutionfinishedstreamingevent.js +205 -0
- package/models/components/toolexecutionfinishedstreamingevent.js.map +1 -0
- package/models/components/toolexecutionstartedstreamingevent.d.ts +139 -0
- package/models/components/toolexecutionstartedstreamingevent.d.ts.map +1 -0
- package/models/components/toolexecutionstartedstreamingevent.js +217 -0
- package/models/components/toolexecutionstartedstreamingevent.js.map +1 -0
- package/models/components/toolresultpart.d.ts +39 -0
- package/models/components/toolresultpart.d.ts.map +1 -0
- package/models/components/toolresultpart.js +80 -0
- package/models/components/toolresultpart.js.map +1 -0
- package/models/operations/createagentresponserequest.d.ts +56 -165
- package/models/operations/createagentresponserequest.d.ts.map +1 -1
- package/models/operations/createagentresponserequest.js +87 -170
- package/models/operations/createagentresponserequest.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.d.ts +80 -145
- package/models/operations/createeval.d.ts.map +1 -1
- package/models/operations/createeval.js +190 -266
- package/models/operations/createeval.js.map +1 -1
- package/models/operations/createprompt.d.ts +9 -11
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +9 -11
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/createtool.js +12 -12
- package/models/operations/deploymentinvoke.d.ts +9 -11
- package/models/operations/deploymentinvoke.d.ts.map +1 -1
- package/models/operations/deploymentinvoke.js +9 -11
- package/models/operations/deploymentinvoke.js.map +1 -1
- package/models/operations/deployments.d.ts +9 -11
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +9 -11
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/deploymentstream.d.ts +9 -11
- package/models/operations/deploymentstream.d.ts.map +1 -1
- package/models/operations/deploymentstream.js +9 -11
- package/models/operations/deploymentstream.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/getallprompts.d.ts +9 -11
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +9 -11
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getalltools.js +12 -12
- package/models/operations/getbudget.js +2 -2
- package/models/operations/getevals.d.ts +14 -79
- package/models/operations/getevals.d.ts.map +1 -1
- package/models/operations/getevals.js +49 -132
- package/models/operations/getevals.js.map +1 -1
- package/models/operations/getoneprompt.d.ts +9 -11
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +9 -11
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +9 -11
- package/models/operations/getpromptversion.d.ts.map +1 -1
- package/models/operations/getpromptversion.js +9 -11
- package/models/operations/getpromptversion.js.map +1 -1
- package/models/operations/invokeagent.d.ts +63 -416
- package/models/operations/invokeagent.d.ts.map +1 -1
- package/models/operations/invokeagent.js +80 -429
- package/models/operations/invokeagent.js.map +1 -1
- package/models/operations/listbudgets.js +2 -2
- 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/listknowledgebases.d.ts +16 -16
- package/models/operations/listknowledgebases.d.ts.map +1 -1
- package/models/operations/listknowledgebases.js +27 -25
- package/models/operations/listknowledgebases.js.map +1 -1
- package/models/operations/listpromptversions.d.ts +9 -11
- package/models/operations/listpromptversions.d.ts.map +1 -1
- package/models/operations/listpromptversions.js +9 -11
- package/models/operations/listpromptversions.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 +49 -402
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +70 -418
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamagent.d.ts +238 -3279
- package/models/operations/streamagent.d.ts.map +1 -1
- package/models/operations/streamagent.js +158 -3602
- package/models/operations/streamagent.js.map +1 -1
- package/models/operations/streamrunagent.d.ts +888 -3929
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +165 -3605
- package/models/operations/streamrunagent.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.d.ts +14 -79
- package/models/operations/updateeval.d.ts.map +1 -1
- package/models/operations/updateeval.js +51 -134
- package/models/operations/updateeval.js.map +1 -1
- package/models/operations/updatememorystore.d.ts +9 -20
- package/models/operations/updatememorystore.d.ts.map +1 -1
- package/models/operations/updatememorystore.js +9 -14
- package/models/operations/updatememorystore.js.map +1 -1
- package/models/operations/updateprompt.d.ts +18 -22
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +18 -22
- package/models/operations/updateprompt.js.map +1 -1
- package/models/operations/updatetool.js +14 -14
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/actionreviewedstreamingevent.ts +189 -0
- package/src/models/components/actionreviewrequestedstreamingevent.ts +326 -0
- package/src/models/components/agenterroredstreamingevent.ts +142 -0
- package/src/models/components/agentexecutionstartedstreamingevent.ts +145 -0
- package/src/models/components/agenthandedoffstreamingevent.ts +142 -0
- package/src/models/components/agentinactivestreamingevent.ts +857 -0
- package/src/models/components/agentmessagecreatedstreamingevent.ts +396 -0
- package/src/models/components/agentstartedstreamingevent.ts +909 -0
- package/src/models/components/agentthoughtstreamingevent.ts +1419 -0
- package/src/models/components/datapart.ts +71 -0
- package/src/models/components/errorstreamingevent.ts +129 -0
- package/src/models/components/executionnamedstreamingevent.ts +142 -0
- package/src/models/components/executionreviewedstreamingevent.ts +122 -0
- package/src/models/components/executionreviewrequiredstreamingevent.ts +130 -0
- package/src/models/components/filepart.ts +231 -0
- package/src/models/components/index.ts +22 -0
- package/src/models/components/invokedeploymentrequest.ts +66 -52
- package/src/models/components/textpart.ts +68 -0
- package/src/models/components/timeoutstreamingevent.ts +125 -0
- package/src/models/components/toolcallpart.ts +92 -0
- package/src/models/components/toolexecutionfailedstreamingevent.ts +406 -0
- package/src/models/components/toolexecutionfinishedstreamingevent.ts +373 -0
- package/src/models/components/toolexecutionstartedstreamingevent.ts +350 -0
- package/src/models/components/toolresultpart.ts +86 -0
- package/src/models/operations/createagentresponserequest.ts +184 -392
- 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 +318 -615
- package/src/models/operations/createprompt.ts +9 -11
- package/src/models/operations/createtool.ts +12 -12
- package/src/models/operations/deploymentinvoke.ts +9 -11
- package/src/models/operations/deployments.ts +9 -11
- package/src/models/operations/deploymentstream.ts +9 -11
- 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/getallprompts.ts +9 -11
- package/src/models/operations/getalltools.ts +12 -12
- package/src/models/operations/getbudget.ts +2 -2
- package/src/models/operations/getevals.ts +52 -287
- package/src/models/operations/getoneprompt.ts +9 -11
- package/src/models/operations/getpromptversion.ts +9 -11
- package/src/models/operations/invokeagent.ts +180 -1041
- package/src/models/operations/listbudgets.ts +2 -2
- 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/listknowledgebases.ts +82 -102
- package/src/models/operations/listpromptversions.ts +9 -11
- 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 +238 -1140
- package/src/models/operations/streamagent.ts +777 -9305
- package/src/models/operations/streamrunagent.ts +3839 -12309
- 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 +52 -287
- package/src/models/operations/updatememorystore.ts +9 -20
- package/src/models/operations/updateprompt.ts +18 -22
- package/src/models/operations/updatetool.ts +14 -14
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export const ToolCallPartKind = {
|
|
13
|
+
ToolCall: "tool_call",
|
|
14
|
+
} as const;
|
|
15
|
+
export type ToolCallPartKind = ClosedEnum<typeof ToolCallPartKind>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* A tool invocation request from an agent. Contains the tool name, unique call ID, and arguments for the tool execution.
|
|
19
|
+
*/
|
|
20
|
+
export type ToolCallPart = {
|
|
21
|
+
kind: ToolCallPartKind;
|
|
22
|
+
toolName: string;
|
|
23
|
+
toolCallId: string;
|
|
24
|
+
arguments: { [k: string]: any };
|
|
25
|
+
metadata?: { [k: string]: any } | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const ToolCallPartKind$inboundSchema: z.ZodNativeEnum<
|
|
30
|
+
typeof ToolCallPartKind
|
|
31
|
+
> = z.nativeEnum(ToolCallPartKind);
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const ToolCallPartKind$outboundSchema: z.ZodNativeEnum<
|
|
34
|
+
typeof ToolCallPartKind
|
|
35
|
+
> = ToolCallPartKind$inboundSchema;
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const ToolCallPart$inboundSchema: z.ZodType<
|
|
39
|
+
ToolCallPart,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
unknown
|
|
42
|
+
> = z.object({
|
|
43
|
+
kind: ToolCallPartKind$inboundSchema,
|
|
44
|
+
tool_name: z.string(),
|
|
45
|
+
tool_call_id: z.string(),
|
|
46
|
+
arguments: z.record(z.any()),
|
|
47
|
+
metadata: z.record(z.any()).optional(),
|
|
48
|
+
}).transform((v) => {
|
|
49
|
+
return remap$(v, {
|
|
50
|
+
"tool_name": "toolName",
|
|
51
|
+
"tool_call_id": "toolCallId",
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
/** @internal */
|
|
55
|
+
export type ToolCallPart$Outbound = {
|
|
56
|
+
kind: string;
|
|
57
|
+
tool_name: string;
|
|
58
|
+
tool_call_id: string;
|
|
59
|
+
arguments: { [k: string]: any };
|
|
60
|
+
metadata?: { [k: string]: any } | undefined;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const ToolCallPart$outboundSchema: z.ZodType<
|
|
65
|
+
ToolCallPart$Outbound,
|
|
66
|
+
z.ZodTypeDef,
|
|
67
|
+
ToolCallPart
|
|
68
|
+
> = z.object({
|
|
69
|
+
kind: ToolCallPartKind$outboundSchema,
|
|
70
|
+
toolName: z.string(),
|
|
71
|
+
toolCallId: z.string(),
|
|
72
|
+
arguments: z.record(z.any()),
|
|
73
|
+
metadata: z.record(z.any()).optional(),
|
|
74
|
+
}).transform((v) => {
|
|
75
|
+
return remap$(v, {
|
|
76
|
+
toolName: "tool_name",
|
|
77
|
+
toolCallId: "tool_call_id",
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
export function toolCallPartToJSON(toolCallPart: ToolCallPart): string {
|
|
82
|
+
return JSON.stringify(ToolCallPart$outboundSchema.parse(toolCallPart));
|
|
83
|
+
}
|
|
84
|
+
export function toolCallPartFromJSON(
|
|
85
|
+
jsonString: string,
|
|
86
|
+
): SafeParseResult<ToolCallPart, SDKValidationError> {
|
|
87
|
+
return safeParse(
|
|
88
|
+
jsonString,
|
|
89
|
+
(x) => ToolCallPart$inboundSchema.parse(JSON.parse(x)),
|
|
90
|
+
`Failed to parse 'ToolCallPart' from JSON`,
|
|
91
|
+
);
|
|
92
|
+
}
|
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export const ToolExecutionFailedStreamingEventType = {
|
|
13
|
+
EventWorkflowEventsToolExecutionFailed:
|
|
14
|
+
"event.workflow_events.tool_execution_failed",
|
|
15
|
+
} as const;
|
|
16
|
+
export type ToolExecutionFailedStreamingEventType = ClosedEnum<
|
|
17
|
+
typeof ToolExecutionFailedStreamingEventType
|
|
18
|
+
>;
|
|
19
|
+
|
|
20
|
+
export type ErrorT = {
|
|
21
|
+
message: string;
|
|
22
|
+
stack?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Orquesta product
|
|
27
|
+
*/
|
|
28
|
+
export const ToolExecutionFailedStreamingEventProduct = {
|
|
29
|
+
Remoteconfigs: "remoteconfigs",
|
|
30
|
+
Deployments: "deployments",
|
|
31
|
+
Experiments: "experiments",
|
|
32
|
+
Playgrounds: "playgrounds",
|
|
33
|
+
Spreadsheets: "spreadsheets",
|
|
34
|
+
SpreadsheetRun: "spreadsheet_run",
|
|
35
|
+
LlmEvaluator: "llm_evaluator",
|
|
36
|
+
Knowledge: "knowledge",
|
|
37
|
+
Router: "router",
|
|
38
|
+
Workflows: "workflows",
|
|
39
|
+
ExternalEvents: "external_events",
|
|
40
|
+
Agents: "agents",
|
|
41
|
+
MemoryStores: "memory-stores",
|
|
42
|
+
Generic: "generic",
|
|
43
|
+
Evaluators: "evaluators",
|
|
44
|
+
Otel: "otel",
|
|
45
|
+
} as const;
|
|
46
|
+
/**
|
|
47
|
+
* Orquesta product
|
|
48
|
+
*/
|
|
49
|
+
export type ToolExecutionFailedStreamingEventProduct = ClosedEnum<
|
|
50
|
+
typeof ToolExecutionFailedStreamingEventProduct
|
|
51
|
+
>;
|
|
52
|
+
|
|
53
|
+
export type ToolExecutionFailedStreamingEventMemory = {
|
|
54
|
+
entityId: string;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export type ToolExecutionFailedStreamingEventToolExecutionContext = {
|
|
58
|
+
actionId: string;
|
|
59
|
+
agentToolCallId: string;
|
|
60
|
+
workspaceId: string;
|
|
61
|
+
agentManifestId: string;
|
|
62
|
+
agentExecutionId: string;
|
|
63
|
+
/**
|
|
64
|
+
* Orquesta product
|
|
65
|
+
*/
|
|
66
|
+
product: ToolExecutionFailedStreamingEventProduct;
|
|
67
|
+
memory?: ToolExecutionFailedStreamingEventMemory | undefined;
|
|
68
|
+
parentId?: string | undefined;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export type ToolExecutionFailedStreamingEventData = {
|
|
72
|
+
error: ErrorT;
|
|
73
|
+
actionType: string;
|
|
74
|
+
toolExecutionContext: ToolExecutionFailedStreamingEventToolExecutionContext;
|
|
75
|
+
responseId?: string | undefined;
|
|
76
|
+
workflowRunId: string;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Emitted when a tool execution fails. Contains the error details, action type, and execution context.
|
|
81
|
+
*/
|
|
82
|
+
export type ToolExecutionFailedStreamingEvent = {
|
|
83
|
+
type: ToolExecutionFailedStreamingEventType;
|
|
84
|
+
/**
|
|
85
|
+
* ISO timestamp of the event
|
|
86
|
+
*/
|
|
87
|
+
timestamp: string;
|
|
88
|
+
data: ToolExecutionFailedStreamingEventData;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/** @internal */
|
|
92
|
+
export const ToolExecutionFailedStreamingEventType$inboundSchema:
|
|
93
|
+
z.ZodNativeEnum<typeof ToolExecutionFailedStreamingEventType> = z.nativeEnum(
|
|
94
|
+
ToolExecutionFailedStreamingEventType,
|
|
95
|
+
);
|
|
96
|
+
/** @internal */
|
|
97
|
+
export const ToolExecutionFailedStreamingEventType$outboundSchema:
|
|
98
|
+
z.ZodNativeEnum<typeof ToolExecutionFailedStreamingEventType> =
|
|
99
|
+
ToolExecutionFailedStreamingEventType$inboundSchema;
|
|
100
|
+
|
|
101
|
+
/** @internal */
|
|
102
|
+
export const ErrorT$inboundSchema: z.ZodType<ErrorT, z.ZodTypeDef, unknown> = z
|
|
103
|
+
.object({
|
|
104
|
+
message: z.string(),
|
|
105
|
+
stack: z.string().optional(),
|
|
106
|
+
});
|
|
107
|
+
/** @internal */
|
|
108
|
+
export type ErrorT$Outbound = {
|
|
109
|
+
message: string;
|
|
110
|
+
stack?: string | undefined;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
/** @internal */
|
|
114
|
+
export const ErrorT$outboundSchema: z.ZodType<
|
|
115
|
+
ErrorT$Outbound,
|
|
116
|
+
z.ZodTypeDef,
|
|
117
|
+
ErrorT
|
|
118
|
+
> = z.object({
|
|
119
|
+
message: z.string(),
|
|
120
|
+
stack: z.string().optional(),
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
export function errorToJSON(errorT: ErrorT): string {
|
|
124
|
+
return JSON.stringify(ErrorT$outboundSchema.parse(errorT));
|
|
125
|
+
}
|
|
126
|
+
export function errorFromJSON(
|
|
127
|
+
jsonString: string,
|
|
128
|
+
): SafeParseResult<ErrorT, SDKValidationError> {
|
|
129
|
+
return safeParse(
|
|
130
|
+
jsonString,
|
|
131
|
+
(x) => ErrorT$inboundSchema.parse(JSON.parse(x)),
|
|
132
|
+
`Failed to parse 'ErrorT' from JSON`,
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** @internal */
|
|
137
|
+
export const ToolExecutionFailedStreamingEventProduct$inboundSchema:
|
|
138
|
+
z.ZodNativeEnum<typeof ToolExecutionFailedStreamingEventProduct> = z
|
|
139
|
+
.nativeEnum(ToolExecutionFailedStreamingEventProduct);
|
|
140
|
+
/** @internal */
|
|
141
|
+
export const ToolExecutionFailedStreamingEventProduct$outboundSchema:
|
|
142
|
+
z.ZodNativeEnum<typeof ToolExecutionFailedStreamingEventProduct> =
|
|
143
|
+
ToolExecutionFailedStreamingEventProduct$inboundSchema;
|
|
144
|
+
|
|
145
|
+
/** @internal */
|
|
146
|
+
export const ToolExecutionFailedStreamingEventMemory$inboundSchema: z.ZodType<
|
|
147
|
+
ToolExecutionFailedStreamingEventMemory,
|
|
148
|
+
z.ZodTypeDef,
|
|
149
|
+
unknown
|
|
150
|
+
> = z.object({
|
|
151
|
+
entity_id: z.string(),
|
|
152
|
+
}).transform((v) => {
|
|
153
|
+
return remap$(v, {
|
|
154
|
+
"entity_id": "entityId",
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
/** @internal */
|
|
158
|
+
export type ToolExecutionFailedStreamingEventMemory$Outbound = {
|
|
159
|
+
entity_id: string;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
/** @internal */
|
|
163
|
+
export const ToolExecutionFailedStreamingEventMemory$outboundSchema: z.ZodType<
|
|
164
|
+
ToolExecutionFailedStreamingEventMemory$Outbound,
|
|
165
|
+
z.ZodTypeDef,
|
|
166
|
+
ToolExecutionFailedStreamingEventMemory
|
|
167
|
+
> = z.object({
|
|
168
|
+
entityId: z.string(),
|
|
169
|
+
}).transform((v) => {
|
|
170
|
+
return remap$(v, {
|
|
171
|
+
entityId: "entity_id",
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
export function toolExecutionFailedStreamingEventMemoryToJSON(
|
|
176
|
+
toolExecutionFailedStreamingEventMemory:
|
|
177
|
+
ToolExecutionFailedStreamingEventMemory,
|
|
178
|
+
): string {
|
|
179
|
+
return JSON.stringify(
|
|
180
|
+
ToolExecutionFailedStreamingEventMemory$outboundSchema.parse(
|
|
181
|
+
toolExecutionFailedStreamingEventMemory,
|
|
182
|
+
),
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
export function toolExecutionFailedStreamingEventMemoryFromJSON(
|
|
186
|
+
jsonString: string,
|
|
187
|
+
): SafeParseResult<
|
|
188
|
+
ToolExecutionFailedStreamingEventMemory,
|
|
189
|
+
SDKValidationError
|
|
190
|
+
> {
|
|
191
|
+
return safeParse(
|
|
192
|
+
jsonString,
|
|
193
|
+
(x) =>
|
|
194
|
+
ToolExecutionFailedStreamingEventMemory$inboundSchema.parse(
|
|
195
|
+
JSON.parse(x),
|
|
196
|
+
),
|
|
197
|
+
`Failed to parse 'ToolExecutionFailedStreamingEventMemory' from JSON`,
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/** @internal */
|
|
202
|
+
export const ToolExecutionFailedStreamingEventToolExecutionContext$inboundSchema:
|
|
203
|
+
z.ZodType<
|
|
204
|
+
ToolExecutionFailedStreamingEventToolExecutionContext,
|
|
205
|
+
z.ZodTypeDef,
|
|
206
|
+
unknown
|
|
207
|
+
> = z.object({
|
|
208
|
+
action_id: z.string(),
|
|
209
|
+
agent_tool_call_id: z.string(),
|
|
210
|
+
workspace_id: z.string(),
|
|
211
|
+
agent_manifest_id: z.string(),
|
|
212
|
+
agent_execution_id: z.string(),
|
|
213
|
+
product: ToolExecutionFailedStreamingEventProduct$inboundSchema,
|
|
214
|
+
memory: z.lazy(() => ToolExecutionFailedStreamingEventMemory$inboundSchema)
|
|
215
|
+
.optional(),
|
|
216
|
+
parent_id: z.string().optional(),
|
|
217
|
+
}).transform((v) => {
|
|
218
|
+
return remap$(v, {
|
|
219
|
+
"action_id": "actionId",
|
|
220
|
+
"agent_tool_call_id": "agentToolCallId",
|
|
221
|
+
"workspace_id": "workspaceId",
|
|
222
|
+
"agent_manifest_id": "agentManifestId",
|
|
223
|
+
"agent_execution_id": "agentExecutionId",
|
|
224
|
+
"parent_id": "parentId",
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
/** @internal */
|
|
228
|
+
export type ToolExecutionFailedStreamingEventToolExecutionContext$Outbound = {
|
|
229
|
+
action_id: string;
|
|
230
|
+
agent_tool_call_id: string;
|
|
231
|
+
workspace_id: string;
|
|
232
|
+
agent_manifest_id: string;
|
|
233
|
+
agent_execution_id: string;
|
|
234
|
+
product: string;
|
|
235
|
+
memory?: ToolExecutionFailedStreamingEventMemory$Outbound | undefined;
|
|
236
|
+
parent_id?: string | undefined;
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
/** @internal */
|
|
240
|
+
export const ToolExecutionFailedStreamingEventToolExecutionContext$outboundSchema:
|
|
241
|
+
z.ZodType<
|
|
242
|
+
ToolExecutionFailedStreamingEventToolExecutionContext$Outbound,
|
|
243
|
+
z.ZodTypeDef,
|
|
244
|
+
ToolExecutionFailedStreamingEventToolExecutionContext
|
|
245
|
+
> = z.object({
|
|
246
|
+
actionId: z.string(),
|
|
247
|
+
agentToolCallId: z.string(),
|
|
248
|
+
workspaceId: z.string(),
|
|
249
|
+
agentManifestId: z.string(),
|
|
250
|
+
agentExecutionId: z.string(),
|
|
251
|
+
product: ToolExecutionFailedStreamingEventProduct$outboundSchema,
|
|
252
|
+
memory: z.lazy(() => ToolExecutionFailedStreamingEventMemory$outboundSchema)
|
|
253
|
+
.optional(),
|
|
254
|
+
parentId: z.string().optional(),
|
|
255
|
+
}).transform((v) => {
|
|
256
|
+
return remap$(v, {
|
|
257
|
+
actionId: "action_id",
|
|
258
|
+
agentToolCallId: "agent_tool_call_id",
|
|
259
|
+
workspaceId: "workspace_id",
|
|
260
|
+
agentManifestId: "agent_manifest_id",
|
|
261
|
+
agentExecutionId: "agent_execution_id",
|
|
262
|
+
parentId: "parent_id",
|
|
263
|
+
});
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
export function toolExecutionFailedStreamingEventToolExecutionContextToJSON(
|
|
267
|
+
toolExecutionFailedStreamingEventToolExecutionContext:
|
|
268
|
+
ToolExecutionFailedStreamingEventToolExecutionContext,
|
|
269
|
+
): string {
|
|
270
|
+
return JSON.stringify(
|
|
271
|
+
ToolExecutionFailedStreamingEventToolExecutionContext$outboundSchema.parse(
|
|
272
|
+
toolExecutionFailedStreamingEventToolExecutionContext,
|
|
273
|
+
),
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
export function toolExecutionFailedStreamingEventToolExecutionContextFromJSON(
|
|
277
|
+
jsonString: string,
|
|
278
|
+
): SafeParseResult<
|
|
279
|
+
ToolExecutionFailedStreamingEventToolExecutionContext,
|
|
280
|
+
SDKValidationError
|
|
281
|
+
> {
|
|
282
|
+
return safeParse(
|
|
283
|
+
jsonString,
|
|
284
|
+
(x) =>
|
|
285
|
+
ToolExecutionFailedStreamingEventToolExecutionContext$inboundSchema.parse(
|
|
286
|
+
JSON.parse(x),
|
|
287
|
+
),
|
|
288
|
+
`Failed to parse 'ToolExecutionFailedStreamingEventToolExecutionContext' from JSON`,
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/** @internal */
|
|
293
|
+
export const ToolExecutionFailedStreamingEventData$inboundSchema: z.ZodType<
|
|
294
|
+
ToolExecutionFailedStreamingEventData,
|
|
295
|
+
z.ZodTypeDef,
|
|
296
|
+
unknown
|
|
297
|
+
> = z.object({
|
|
298
|
+
error: z.lazy(() => ErrorT$inboundSchema),
|
|
299
|
+
action_type: z.string(),
|
|
300
|
+
tool_execution_context: z.lazy(() =>
|
|
301
|
+
ToolExecutionFailedStreamingEventToolExecutionContext$inboundSchema
|
|
302
|
+
),
|
|
303
|
+
responseId: z.string().optional(),
|
|
304
|
+
workflowRunId: z.string(),
|
|
305
|
+
}).transform((v) => {
|
|
306
|
+
return remap$(v, {
|
|
307
|
+
"action_type": "actionType",
|
|
308
|
+
"tool_execution_context": "toolExecutionContext",
|
|
309
|
+
});
|
|
310
|
+
});
|
|
311
|
+
/** @internal */
|
|
312
|
+
export type ToolExecutionFailedStreamingEventData$Outbound = {
|
|
313
|
+
error: ErrorT$Outbound;
|
|
314
|
+
action_type: string;
|
|
315
|
+
tool_execution_context:
|
|
316
|
+
ToolExecutionFailedStreamingEventToolExecutionContext$Outbound;
|
|
317
|
+
responseId?: string | undefined;
|
|
318
|
+
workflowRunId: string;
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
/** @internal */
|
|
322
|
+
export const ToolExecutionFailedStreamingEventData$outboundSchema: z.ZodType<
|
|
323
|
+
ToolExecutionFailedStreamingEventData$Outbound,
|
|
324
|
+
z.ZodTypeDef,
|
|
325
|
+
ToolExecutionFailedStreamingEventData
|
|
326
|
+
> = z.object({
|
|
327
|
+
error: z.lazy(() => ErrorT$outboundSchema),
|
|
328
|
+
actionType: z.string(),
|
|
329
|
+
toolExecutionContext: z.lazy(() =>
|
|
330
|
+
ToolExecutionFailedStreamingEventToolExecutionContext$outboundSchema
|
|
331
|
+
),
|
|
332
|
+
responseId: z.string().optional(),
|
|
333
|
+
workflowRunId: z.string(),
|
|
334
|
+
}).transform((v) => {
|
|
335
|
+
return remap$(v, {
|
|
336
|
+
actionType: "action_type",
|
|
337
|
+
toolExecutionContext: "tool_execution_context",
|
|
338
|
+
});
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
export function toolExecutionFailedStreamingEventDataToJSON(
|
|
342
|
+
toolExecutionFailedStreamingEventData: ToolExecutionFailedStreamingEventData,
|
|
343
|
+
): string {
|
|
344
|
+
return JSON.stringify(
|
|
345
|
+
ToolExecutionFailedStreamingEventData$outboundSchema.parse(
|
|
346
|
+
toolExecutionFailedStreamingEventData,
|
|
347
|
+
),
|
|
348
|
+
);
|
|
349
|
+
}
|
|
350
|
+
export function toolExecutionFailedStreamingEventDataFromJSON(
|
|
351
|
+
jsonString: string,
|
|
352
|
+
): SafeParseResult<ToolExecutionFailedStreamingEventData, SDKValidationError> {
|
|
353
|
+
return safeParse(
|
|
354
|
+
jsonString,
|
|
355
|
+
(x) =>
|
|
356
|
+
ToolExecutionFailedStreamingEventData$inboundSchema.parse(JSON.parse(x)),
|
|
357
|
+
`Failed to parse 'ToolExecutionFailedStreamingEventData' from JSON`,
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/** @internal */
|
|
362
|
+
export const ToolExecutionFailedStreamingEvent$inboundSchema: z.ZodType<
|
|
363
|
+
ToolExecutionFailedStreamingEvent,
|
|
364
|
+
z.ZodTypeDef,
|
|
365
|
+
unknown
|
|
366
|
+
> = z.object({
|
|
367
|
+
type: ToolExecutionFailedStreamingEventType$inboundSchema,
|
|
368
|
+
timestamp: z.string(),
|
|
369
|
+
data: z.lazy(() => ToolExecutionFailedStreamingEventData$inboundSchema),
|
|
370
|
+
});
|
|
371
|
+
/** @internal */
|
|
372
|
+
export type ToolExecutionFailedStreamingEvent$Outbound = {
|
|
373
|
+
type: string;
|
|
374
|
+
timestamp: string;
|
|
375
|
+
data: ToolExecutionFailedStreamingEventData$Outbound;
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
/** @internal */
|
|
379
|
+
export const ToolExecutionFailedStreamingEvent$outboundSchema: z.ZodType<
|
|
380
|
+
ToolExecutionFailedStreamingEvent$Outbound,
|
|
381
|
+
z.ZodTypeDef,
|
|
382
|
+
ToolExecutionFailedStreamingEvent
|
|
383
|
+
> = z.object({
|
|
384
|
+
type: ToolExecutionFailedStreamingEventType$outboundSchema,
|
|
385
|
+
timestamp: z.string(),
|
|
386
|
+
data: z.lazy(() => ToolExecutionFailedStreamingEventData$outboundSchema),
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
export function toolExecutionFailedStreamingEventToJSON(
|
|
390
|
+
toolExecutionFailedStreamingEvent: ToolExecutionFailedStreamingEvent,
|
|
391
|
+
): string {
|
|
392
|
+
return JSON.stringify(
|
|
393
|
+
ToolExecutionFailedStreamingEvent$outboundSchema.parse(
|
|
394
|
+
toolExecutionFailedStreamingEvent,
|
|
395
|
+
),
|
|
396
|
+
);
|
|
397
|
+
}
|
|
398
|
+
export function toolExecutionFailedStreamingEventFromJSON(
|
|
399
|
+
jsonString: string,
|
|
400
|
+
): SafeParseResult<ToolExecutionFailedStreamingEvent, SDKValidationError> {
|
|
401
|
+
return safeParse(
|
|
402
|
+
jsonString,
|
|
403
|
+
(x) => ToolExecutionFailedStreamingEvent$inboundSchema.parse(JSON.parse(x)),
|
|
404
|
+
`Failed to parse 'ToolExecutionFailedStreamingEvent' from JSON`,
|
|
405
|
+
);
|
|
406
|
+
}
|