@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,373 @@
|
|
|
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 ToolExecutionFinishedStreamingEventType = {
|
|
13
|
+
EventWorkflowEventsToolExecutionFinished:
|
|
14
|
+
"event.workflow_events.tool_execution_finished",
|
|
15
|
+
} as const;
|
|
16
|
+
export type ToolExecutionFinishedStreamingEventType = ClosedEnum<
|
|
17
|
+
typeof ToolExecutionFinishedStreamingEventType
|
|
18
|
+
>;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Orquesta product
|
|
22
|
+
*/
|
|
23
|
+
export const ToolExecutionFinishedStreamingEventProduct = {
|
|
24
|
+
Remoteconfigs: "remoteconfigs",
|
|
25
|
+
Deployments: "deployments",
|
|
26
|
+
Experiments: "experiments",
|
|
27
|
+
Playgrounds: "playgrounds",
|
|
28
|
+
Spreadsheets: "spreadsheets",
|
|
29
|
+
SpreadsheetRun: "spreadsheet_run",
|
|
30
|
+
LlmEvaluator: "llm_evaluator",
|
|
31
|
+
Knowledge: "knowledge",
|
|
32
|
+
Router: "router",
|
|
33
|
+
Workflows: "workflows",
|
|
34
|
+
ExternalEvents: "external_events",
|
|
35
|
+
Agents: "agents",
|
|
36
|
+
MemoryStores: "memory-stores",
|
|
37
|
+
Generic: "generic",
|
|
38
|
+
Evaluators: "evaluators",
|
|
39
|
+
Otel: "otel",
|
|
40
|
+
} as const;
|
|
41
|
+
/**
|
|
42
|
+
* Orquesta product
|
|
43
|
+
*/
|
|
44
|
+
export type ToolExecutionFinishedStreamingEventProduct = ClosedEnum<
|
|
45
|
+
typeof ToolExecutionFinishedStreamingEventProduct
|
|
46
|
+
>;
|
|
47
|
+
|
|
48
|
+
export type ToolExecutionFinishedStreamingEventMemory = {
|
|
49
|
+
entityId: string;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export type ToolExecutionFinishedStreamingEventToolExecutionContext = {
|
|
53
|
+
actionId: string;
|
|
54
|
+
agentToolCallId: string;
|
|
55
|
+
workspaceId: string;
|
|
56
|
+
agentManifestId: string;
|
|
57
|
+
agentExecutionId: string;
|
|
58
|
+
/**
|
|
59
|
+
* Orquesta product
|
|
60
|
+
*/
|
|
61
|
+
product: ToolExecutionFinishedStreamingEventProduct;
|
|
62
|
+
memory?: ToolExecutionFinishedStreamingEventMemory | undefined;
|
|
63
|
+
parentId?: string | undefined;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export type ToolExecutionFinishedStreamingEventData = {
|
|
67
|
+
result?: any | undefined;
|
|
68
|
+
actionType: string;
|
|
69
|
+
toolExecutionContext: ToolExecutionFinishedStreamingEventToolExecutionContext;
|
|
70
|
+
responseId?: string | undefined;
|
|
71
|
+
workflowRunId: string;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Emitted when a tool completes execution successfully. Contains the result data, action type, and execution context.
|
|
76
|
+
*/
|
|
77
|
+
export type ToolExecutionFinishedStreamingEvent = {
|
|
78
|
+
type: ToolExecutionFinishedStreamingEventType;
|
|
79
|
+
/**
|
|
80
|
+
* ISO timestamp of the event
|
|
81
|
+
*/
|
|
82
|
+
timestamp: string;
|
|
83
|
+
data: ToolExecutionFinishedStreamingEventData;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const ToolExecutionFinishedStreamingEventType$inboundSchema:
|
|
88
|
+
z.ZodNativeEnum<typeof ToolExecutionFinishedStreamingEventType> = z
|
|
89
|
+
.nativeEnum(ToolExecutionFinishedStreamingEventType);
|
|
90
|
+
/** @internal */
|
|
91
|
+
export const ToolExecutionFinishedStreamingEventType$outboundSchema:
|
|
92
|
+
z.ZodNativeEnum<typeof ToolExecutionFinishedStreamingEventType> =
|
|
93
|
+
ToolExecutionFinishedStreamingEventType$inboundSchema;
|
|
94
|
+
|
|
95
|
+
/** @internal */
|
|
96
|
+
export const ToolExecutionFinishedStreamingEventProduct$inboundSchema:
|
|
97
|
+
z.ZodNativeEnum<typeof ToolExecutionFinishedStreamingEventProduct> = z
|
|
98
|
+
.nativeEnum(ToolExecutionFinishedStreamingEventProduct);
|
|
99
|
+
/** @internal */
|
|
100
|
+
export const ToolExecutionFinishedStreamingEventProduct$outboundSchema:
|
|
101
|
+
z.ZodNativeEnum<typeof ToolExecutionFinishedStreamingEventProduct> =
|
|
102
|
+
ToolExecutionFinishedStreamingEventProduct$inboundSchema;
|
|
103
|
+
|
|
104
|
+
/** @internal */
|
|
105
|
+
export const ToolExecutionFinishedStreamingEventMemory$inboundSchema: z.ZodType<
|
|
106
|
+
ToolExecutionFinishedStreamingEventMemory,
|
|
107
|
+
z.ZodTypeDef,
|
|
108
|
+
unknown
|
|
109
|
+
> = z.object({
|
|
110
|
+
entity_id: z.string(),
|
|
111
|
+
}).transform((v) => {
|
|
112
|
+
return remap$(v, {
|
|
113
|
+
"entity_id": "entityId",
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
/** @internal */
|
|
117
|
+
export type ToolExecutionFinishedStreamingEventMemory$Outbound = {
|
|
118
|
+
entity_id: string;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
/** @internal */
|
|
122
|
+
export const ToolExecutionFinishedStreamingEventMemory$outboundSchema:
|
|
123
|
+
z.ZodType<
|
|
124
|
+
ToolExecutionFinishedStreamingEventMemory$Outbound,
|
|
125
|
+
z.ZodTypeDef,
|
|
126
|
+
ToolExecutionFinishedStreamingEventMemory
|
|
127
|
+
> = z.object({
|
|
128
|
+
entityId: z.string(),
|
|
129
|
+
}).transform((v) => {
|
|
130
|
+
return remap$(v, {
|
|
131
|
+
entityId: "entity_id",
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
export function toolExecutionFinishedStreamingEventMemoryToJSON(
|
|
136
|
+
toolExecutionFinishedStreamingEventMemory:
|
|
137
|
+
ToolExecutionFinishedStreamingEventMemory,
|
|
138
|
+
): string {
|
|
139
|
+
return JSON.stringify(
|
|
140
|
+
ToolExecutionFinishedStreamingEventMemory$outboundSchema.parse(
|
|
141
|
+
toolExecutionFinishedStreamingEventMemory,
|
|
142
|
+
),
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
export function toolExecutionFinishedStreamingEventMemoryFromJSON(
|
|
146
|
+
jsonString: string,
|
|
147
|
+
): SafeParseResult<
|
|
148
|
+
ToolExecutionFinishedStreamingEventMemory,
|
|
149
|
+
SDKValidationError
|
|
150
|
+
> {
|
|
151
|
+
return safeParse(
|
|
152
|
+
jsonString,
|
|
153
|
+
(x) =>
|
|
154
|
+
ToolExecutionFinishedStreamingEventMemory$inboundSchema.parse(
|
|
155
|
+
JSON.parse(x),
|
|
156
|
+
),
|
|
157
|
+
`Failed to parse 'ToolExecutionFinishedStreamingEventMemory' from JSON`,
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/** @internal */
|
|
162
|
+
export const ToolExecutionFinishedStreamingEventToolExecutionContext$inboundSchema:
|
|
163
|
+
z.ZodType<
|
|
164
|
+
ToolExecutionFinishedStreamingEventToolExecutionContext,
|
|
165
|
+
z.ZodTypeDef,
|
|
166
|
+
unknown
|
|
167
|
+
> = z.object({
|
|
168
|
+
action_id: z.string(),
|
|
169
|
+
agent_tool_call_id: z.string(),
|
|
170
|
+
workspace_id: z.string(),
|
|
171
|
+
agent_manifest_id: z.string(),
|
|
172
|
+
agent_execution_id: z.string(),
|
|
173
|
+
product: ToolExecutionFinishedStreamingEventProduct$inboundSchema,
|
|
174
|
+
memory: z.lazy(() =>
|
|
175
|
+
ToolExecutionFinishedStreamingEventMemory$inboundSchema
|
|
176
|
+
).optional(),
|
|
177
|
+
parent_id: z.string().optional(),
|
|
178
|
+
}).transform((v) => {
|
|
179
|
+
return remap$(v, {
|
|
180
|
+
"action_id": "actionId",
|
|
181
|
+
"agent_tool_call_id": "agentToolCallId",
|
|
182
|
+
"workspace_id": "workspaceId",
|
|
183
|
+
"agent_manifest_id": "agentManifestId",
|
|
184
|
+
"agent_execution_id": "agentExecutionId",
|
|
185
|
+
"parent_id": "parentId",
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
/** @internal */
|
|
189
|
+
export type ToolExecutionFinishedStreamingEventToolExecutionContext$Outbound = {
|
|
190
|
+
action_id: string;
|
|
191
|
+
agent_tool_call_id: string;
|
|
192
|
+
workspace_id: string;
|
|
193
|
+
agent_manifest_id: string;
|
|
194
|
+
agent_execution_id: string;
|
|
195
|
+
product: string;
|
|
196
|
+
memory?: ToolExecutionFinishedStreamingEventMemory$Outbound | undefined;
|
|
197
|
+
parent_id?: string | undefined;
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
/** @internal */
|
|
201
|
+
export const ToolExecutionFinishedStreamingEventToolExecutionContext$outboundSchema:
|
|
202
|
+
z.ZodType<
|
|
203
|
+
ToolExecutionFinishedStreamingEventToolExecutionContext$Outbound,
|
|
204
|
+
z.ZodTypeDef,
|
|
205
|
+
ToolExecutionFinishedStreamingEventToolExecutionContext
|
|
206
|
+
> = z.object({
|
|
207
|
+
actionId: z.string(),
|
|
208
|
+
agentToolCallId: z.string(),
|
|
209
|
+
workspaceId: z.string(),
|
|
210
|
+
agentManifestId: z.string(),
|
|
211
|
+
agentExecutionId: z.string(),
|
|
212
|
+
product: ToolExecutionFinishedStreamingEventProduct$outboundSchema,
|
|
213
|
+
memory: z.lazy(() =>
|
|
214
|
+
ToolExecutionFinishedStreamingEventMemory$outboundSchema
|
|
215
|
+
).optional(),
|
|
216
|
+
parentId: z.string().optional(),
|
|
217
|
+
}).transform((v) => {
|
|
218
|
+
return remap$(v, {
|
|
219
|
+
actionId: "action_id",
|
|
220
|
+
agentToolCallId: "agent_tool_call_id",
|
|
221
|
+
workspaceId: "workspace_id",
|
|
222
|
+
agentManifestId: "agent_manifest_id",
|
|
223
|
+
agentExecutionId: "agent_execution_id",
|
|
224
|
+
parentId: "parent_id",
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
export function toolExecutionFinishedStreamingEventToolExecutionContextToJSON(
|
|
229
|
+
toolExecutionFinishedStreamingEventToolExecutionContext:
|
|
230
|
+
ToolExecutionFinishedStreamingEventToolExecutionContext,
|
|
231
|
+
): string {
|
|
232
|
+
return JSON.stringify(
|
|
233
|
+
ToolExecutionFinishedStreamingEventToolExecutionContext$outboundSchema
|
|
234
|
+
.parse(toolExecutionFinishedStreamingEventToolExecutionContext),
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
export function toolExecutionFinishedStreamingEventToolExecutionContextFromJSON(
|
|
238
|
+
jsonString: string,
|
|
239
|
+
): SafeParseResult<
|
|
240
|
+
ToolExecutionFinishedStreamingEventToolExecutionContext,
|
|
241
|
+
SDKValidationError
|
|
242
|
+
> {
|
|
243
|
+
return safeParse(
|
|
244
|
+
jsonString,
|
|
245
|
+
(x) =>
|
|
246
|
+
ToolExecutionFinishedStreamingEventToolExecutionContext$inboundSchema
|
|
247
|
+
.parse(JSON.parse(x)),
|
|
248
|
+
`Failed to parse 'ToolExecutionFinishedStreamingEventToolExecutionContext' from JSON`,
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/** @internal */
|
|
253
|
+
export const ToolExecutionFinishedStreamingEventData$inboundSchema: z.ZodType<
|
|
254
|
+
ToolExecutionFinishedStreamingEventData,
|
|
255
|
+
z.ZodTypeDef,
|
|
256
|
+
unknown
|
|
257
|
+
> = z.object({
|
|
258
|
+
result: z.any().optional(),
|
|
259
|
+
action_type: z.string(),
|
|
260
|
+
tool_execution_context: z.lazy(() =>
|
|
261
|
+
ToolExecutionFinishedStreamingEventToolExecutionContext$inboundSchema
|
|
262
|
+
),
|
|
263
|
+
responseId: z.string().optional(),
|
|
264
|
+
workflowRunId: z.string(),
|
|
265
|
+
}).transform((v) => {
|
|
266
|
+
return remap$(v, {
|
|
267
|
+
"action_type": "actionType",
|
|
268
|
+
"tool_execution_context": "toolExecutionContext",
|
|
269
|
+
});
|
|
270
|
+
});
|
|
271
|
+
/** @internal */
|
|
272
|
+
export type ToolExecutionFinishedStreamingEventData$Outbound = {
|
|
273
|
+
result?: any | undefined;
|
|
274
|
+
action_type: string;
|
|
275
|
+
tool_execution_context:
|
|
276
|
+
ToolExecutionFinishedStreamingEventToolExecutionContext$Outbound;
|
|
277
|
+
responseId?: string | undefined;
|
|
278
|
+
workflowRunId: string;
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
/** @internal */
|
|
282
|
+
export const ToolExecutionFinishedStreamingEventData$outboundSchema: z.ZodType<
|
|
283
|
+
ToolExecutionFinishedStreamingEventData$Outbound,
|
|
284
|
+
z.ZodTypeDef,
|
|
285
|
+
ToolExecutionFinishedStreamingEventData
|
|
286
|
+
> = z.object({
|
|
287
|
+
result: z.any().optional(),
|
|
288
|
+
actionType: z.string(),
|
|
289
|
+
toolExecutionContext: z.lazy(() =>
|
|
290
|
+
ToolExecutionFinishedStreamingEventToolExecutionContext$outboundSchema
|
|
291
|
+
),
|
|
292
|
+
responseId: z.string().optional(),
|
|
293
|
+
workflowRunId: z.string(),
|
|
294
|
+
}).transform((v) => {
|
|
295
|
+
return remap$(v, {
|
|
296
|
+
actionType: "action_type",
|
|
297
|
+
toolExecutionContext: "tool_execution_context",
|
|
298
|
+
});
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
export function toolExecutionFinishedStreamingEventDataToJSON(
|
|
302
|
+
toolExecutionFinishedStreamingEventData:
|
|
303
|
+
ToolExecutionFinishedStreamingEventData,
|
|
304
|
+
): string {
|
|
305
|
+
return JSON.stringify(
|
|
306
|
+
ToolExecutionFinishedStreamingEventData$outboundSchema.parse(
|
|
307
|
+
toolExecutionFinishedStreamingEventData,
|
|
308
|
+
),
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
export function toolExecutionFinishedStreamingEventDataFromJSON(
|
|
312
|
+
jsonString: string,
|
|
313
|
+
): SafeParseResult<
|
|
314
|
+
ToolExecutionFinishedStreamingEventData,
|
|
315
|
+
SDKValidationError
|
|
316
|
+
> {
|
|
317
|
+
return safeParse(
|
|
318
|
+
jsonString,
|
|
319
|
+
(x) =>
|
|
320
|
+
ToolExecutionFinishedStreamingEventData$inboundSchema.parse(
|
|
321
|
+
JSON.parse(x),
|
|
322
|
+
),
|
|
323
|
+
`Failed to parse 'ToolExecutionFinishedStreamingEventData' from JSON`,
|
|
324
|
+
);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/** @internal */
|
|
328
|
+
export const ToolExecutionFinishedStreamingEvent$inboundSchema: z.ZodType<
|
|
329
|
+
ToolExecutionFinishedStreamingEvent,
|
|
330
|
+
z.ZodTypeDef,
|
|
331
|
+
unknown
|
|
332
|
+
> = z.object({
|
|
333
|
+
type: ToolExecutionFinishedStreamingEventType$inboundSchema,
|
|
334
|
+
timestamp: z.string(),
|
|
335
|
+
data: z.lazy(() => ToolExecutionFinishedStreamingEventData$inboundSchema),
|
|
336
|
+
});
|
|
337
|
+
/** @internal */
|
|
338
|
+
export type ToolExecutionFinishedStreamingEvent$Outbound = {
|
|
339
|
+
type: string;
|
|
340
|
+
timestamp: string;
|
|
341
|
+
data: ToolExecutionFinishedStreamingEventData$Outbound;
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
/** @internal */
|
|
345
|
+
export const ToolExecutionFinishedStreamingEvent$outboundSchema: z.ZodType<
|
|
346
|
+
ToolExecutionFinishedStreamingEvent$Outbound,
|
|
347
|
+
z.ZodTypeDef,
|
|
348
|
+
ToolExecutionFinishedStreamingEvent
|
|
349
|
+
> = z.object({
|
|
350
|
+
type: ToolExecutionFinishedStreamingEventType$outboundSchema,
|
|
351
|
+
timestamp: z.string(),
|
|
352
|
+
data: z.lazy(() => ToolExecutionFinishedStreamingEventData$outboundSchema),
|
|
353
|
+
});
|
|
354
|
+
|
|
355
|
+
export function toolExecutionFinishedStreamingEventToJSON(
|
|
356
|
+
toolExecutionFinishedStreamingEvent: ToolExecutionFinishedStreamingEvent,
|
|
357
|
+
): string {
|
|
358
|
+
return JSON.stringify(
|
|
359
|
+
ToolExecutionFinishedStreamingEvent$outboundSchema.parse(
|
|
360
|
+
toolExecutionFinishedStreamingEvent,
|
|
361
|
+
),
|
|
362
|
+
);
|
|
363
|
+
}
|
|
364
|
+
export function toolExecutionFinishedStreamingEventFromJSON(
|
|
365
|
+
jsonString: string,
|
|
366
|
+
): SafeParseResult<ToolExecutionFinishedStreamingEvent, SDKValidationError> {
|
|
367
|
+
return safeParse(
|
|
368
|
+
jsonString,
|
|
369
|
+
(x) =>
|
|
370
|
+
ToolExecutionFinishedStreamingEvent$inboundSchema.parse(JSON.parse(x)),
|
|
371
|
+
`Failed to parse 'ToolExecutionFinishedStreamingEvent' from JSON`,
|
|
372
|
+
);
|
|
373
|
+
}
|