@orq-ai/node 4.1.0-rc.4 → 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 +25494 -27422
- package/bin/mcp-server.js.map +64 -47
- 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/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 +1 -1
- package/models/components/index.d.ts +17 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +17 -0
- package/models/components/index.js.map +1 -1
- package/models/components/invokedeploymentrequest.d.ts +13 -13
- package/models/components/invokedeploymentrequest.d.ts.map +1 -1
- package/models/components/invokedeploymentrequest.js +17 -17
- package/models/components/invokedeploymentrequest.js.map +1 -1
- 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/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 +1 -1
- package/models/operations/createagentresponserequest.d.ts +4 -137
- package/models/operations/createagentresponserequest.d.ts.map +1 -1
- package/models/operations/createagentresponserequest.js +9 -138
- 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/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/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/invokeagent.d.ts +14 -147
- package/models/operations/invokeagent.d.ts.map +1 -1
- package/models/operations/invokeagent.js +19 -148
- 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/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 +4 -137
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +17 -145
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamagent.d.ts +241 -2491
- package/models/operations/streamagent.d.ts.map +1 -1
- package/models/operations/streamagent.js +172 -2826
- package/models/operations/streamagent.js.map +1 -1
- package/models/operations/streamrunagent.d.ts +889 -3139
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +175 -2825
- 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/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/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 +1 -1
- package/src/models/components/index.ts +17 -0
- package/src/models/components/invokedeploymentrequest.ts +32 -27
- package/src/models/components/timeoutstreamingevent.ts +125 -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 +1 -1
- package/src/models/operations/createagentresponserequest.ts +20 -321
- 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/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/getalltools.ts +12 -12
- package/src/models/operations/getbudget.ts +2 -2
- package/src/models/operations/getevals.ts +52 -287
- package/src/models/operations/invokeagent.ts +36 -373
- 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/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 +17 -365
- package/src/models/operations/streamagent.ts +794 -6985
- package/src/models/operations/streamrunagent.ts +3939 -9983
- 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/updatetool.ts +14 -14
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export const TimeoutStreamingEventType = {
|
|
12
|
+
AgentsTimeout: "agents.timeout",
|
|
13
|
+
} as const;
|
|
14
|
+
export type TimeoutStreamingEventType = ClosedEnum<
|
|
15
|
+
typeof TimeoutStreamingEventType
|
|
16
|
+
>;
|
|
17
|
+
|
|
18
|
+
export type TimeoutStreamingEventData = {
|
|
19
|
+
message: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Emitted when the agent stream exceeds the configured timeout duration. Contains a message describing the timeout condition.
|
|
24
|
+
*/
|
|
25
|
+
export type TimeoutStreamingEvent = {
|
|
26
|
+
type: TimeoutStreamingEventType;
|
|
27
|
+
/**
|
|
28
|
+
* ISO timestamp of the event
|
|
29
|
+
*/
|
|
30
|
+
timestamp: string;
|
|
31
|
+
data: TimeoutStreamingEventData;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const TimeoutStreamingEventType$inboundSchema: z.ZodNativeEnum<
|
|
36
|
+
typeof TimeoutStreamingEventType
|
|
37
|
+
> = z.nativeEnum(TimeoutStreamingEventType);
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const TimeoutStreamingEventType$outboundSchema: z.ZodNativeEnum<
|
|
40
|
+
typeof TimeoutStreamingEventType
|
|
41
|
+
> = TimeoutStreamingEventType$inboundSchema;
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const TimeoutStreamingEventData$inboundSchema: z.ZodType<
|
|
45
|
+
TimeoutStreamingEventData,
|
|
46
|
+
z.ZodTypeDef,
|
|
47
|
+
unknown
|
|
48
|
+
> = z.object({
|
|
49
|
+
message: z.string(),
|
|
50
|
+
});
|
|
51
|
+
/** @internal */
|
|
52
|
+
export type TimeoutStreamingEventData$Outbound = {
|
|
53
|
+
message: string;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** @internal */
|
|
57
|
+
export const TimeoutStreamingEventData$outboundSchema: z.ZodType<
|
|
58
|
+
TimeoutStreamingEventData$Outbound,
|
|
59
|
+
z.ZodTypeDef,
|
|
60
|
+
TimeoutStreamingEventData
|
|
61
|
+
> = z.object({
|
|
62
|
+
message: z.string(),
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
export function timeoutStreamingEventDataToJSON(
|
|
66
|
+
timeoutStreamingEventData: TimeoutStreamingEventData,
|
|
67
|
+
): string {
|
|
68
|
+
return JSON.stringify(
|
|
69
|
+
TimeoutStreamingEventData$outboundSchema.parse(timeoutStreamingEventData),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
export function timeoutStreamingEventDataFromJSON(
|
|
73
|
+
jsonString: string,
|
|
74
|
+
): SafeParseResult<TimeoutStreamingEventData, SDKValidationError> {
|
|
75
|
+
return safeParse(
|
|
76
|
+
jsonString,
|
|
77
|
+
(x) => TimeoutStreamingEventData$inboundSchema.parse(JSON.parse(x)),
|
|
78
|
+
`Failed to parse 'TimeoutStreamingEventData' from JSON`,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** @internal */
|
|
83
|
+
export const TimeoutStreamingEvent$inboundSchema: z.ZodType<
|
|
84
|
+
TimeoutStreamingEvent,
|
|
85
|
+
z.ZodTypeDef,
|
|
86
|
+
unknown
|
|
87
|
+
> = z.object({
|
|
88
|
+
type: TimeoutStreamingEventType$inboundSchema,
|
|
89
|
+
timestamp: z.string(),
|
|
90
|
+
data: z.lazy(() => TimeoutStreamingEventData$inboundSchema),
|
|
91
|
+
});
|
|
92
|
+
/** @internal */
|
|
93
|
+
export type TimeoutStreamingEvent$Outbound = {
|
|
94
|
+
type: string;
|
|
95
|
+
timestamp: string;
|
|
96
|
+
data: TimeoutStreamingEventData$Outbound;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/** @internal */
|
|
100
|
+
export const TimeoutStreamingEvent$outboundSchema: z.ZodType<
|
|
101
|
+
TimeoutStreamingEvent$Outbound,
|
|
102
|
+
z.ZodTypeDef,
|
|
103
|
+
TimeoutStreamingEvent
|
|
104
|
+
> = z.object({
|
|
105
|
+
type: TimeoutStreamingEventType$outboundSchema,
|
|
106
|
+
timestamp: z.string(),
|
|
107
|
+
data: z.lazy(() => TimeoutStreamingEventData$outboundSchema),
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
export function timeoutStreamingEventToJSON(
|
|
111
|
+
timeoutStreamingEvent: TimeoutStreamingEvent,
|
|
112
|
+
): string {
|
|
113
|
+
return JSON.stringify(
|
|
114
|
+
TimeoutStreamingEvent$outboundSchema.parse(timeoutStreamingEvent),
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
export function timeoutStreamingEventFromJSON(
|
|
118
|
+
jsonString: string,
|
|
119
|
+
): SafeParseResult<TimeoutStreamingEvent, SDKValidationError> {
|
|
120
|
+
return safeParse(
|
|
121
|
+
jsonString,
|
|
122
|
+
(x) => TimeoutStreamingEvent$inboundSchema.parse(JSON.parse(x)),
|
|
123
|
+
`Failed to parse 'TimeoutStreamingEvent' from JSON`,
|
|
124
|
+
);
|
|
125
|
+
}
|
|
@@ -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
|
+
}
|