@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,350 @@
|
|
|
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 ToolExecutionStartedStreamingEventType = {
|
|
13
|
+
EventWorkflowEventsToolExecutionStarted:
|
|
14
|
+
"event.workflow_events.tool_execution_started",
|
|
15
|
+
} as const;
|
|
16
|
+
export type ToolExecutionStartedStreamingEventType = ClosedEnum<
|
|
17
|
+
typeof ToolExecutionStartedStreamingEventType
|
|
18
|
+
>;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Orquesta product
|
|
22
|
+
*/
|
|
23
|
+
export const Product = {
|
|
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 Product = ClosedEnum<typeof Product>;
|
|
45
|
+
|
|
46
|
+
export type Memory = {
|
|
47
|
+
entityId: string;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export type ToolExecutionContext = {
|
|
51
|
+
actionId: string;
|
|
52
|
+
agentToolCallId: string;
|
|
53
|
+
workspaceId: string;
|
|
54
|
+
agentManifestId: string;
|
|
55
|
+
agentExecutionId: string;
|
|
56
|
+
/**
|
|
57
|
+
* Orquesta product
|
|
58
|
+
*/
|
|
59
|
+
product: Product;
|
|
60
|
+
memory?: Memory | undefined;
|
|
61
|
+
parentId?: string | undefined;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export type ToolExecutionStartedStreamingEventData = {
|
|
65
|
+
toolId: string;
|
|
66
|
+
toolKey?: string | undefined;
|
|
67
|
+
toolDisplayName?: string | undefined;
|
|
68
|
+
actionType: string;
|
|
69
|
+
toolArguments: { [k: string]: any };
|
|
70
|
+
toolExecutionContext: ToolExecutionContext;
|
|
71
|
+
responseId?: string | undefined;
|
|
72
|
+
workflowRunId: string;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Emitted when a tool begins execution. Contains the tool ID, name, action type, input arguments, and execution context.
|
|
77
|
+
*/
|
|
78
|
+
export type ToolExecutionStartedStreamingEvent = {
|
|
79
|
+
type: ToolExecutionStartedStreamingEventType;
|
|
80
|
+
/**
|
|
81
|
+
* ISO timestamp of the event
|
|
82
|
+
*/
|
|
83
|
+
timestamp: string;
|
|
84
|
+
data: ToolExecutionStartedStreamingEventData;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/** @internal */
|
|
88
|
+
export const ToolExecutionStartedStreamingEventType$inboundSchema:
|
|
89
|
+
z.ZodNativeEnum<typeof ToolExecutionStartedStreamingEventType> = z.nativeEnum(
|
|
90
|
+
ToolExecutionStartedStreamingEventType,
|
|
91
|
+
);
|
|
92
|
+
/** @internal */
|
|
93
|
+
export const ToolExecutionStartedStreamingEventType$outboundSchema:
|
|
94
|
+
z.ZodNativeEnum<typeof ToolExecutionStartedStreamingEventType> =
|
|
95
|
+
ToolExecutionStartedStreamingEventType$inboundSchema;
|
|
96
|
+
|
|
97
|
+
/** @internal */
|
|
98
|
+
export const Product$inboundSchema: z.ZodNativeEnum<typeof Product> = z
|
|
99
|
+
.nativeEnum(Product);
|
|
100
|
+
/** @internal */
|
|
101
|
+
export const Product$outboundSchema: z.ZodNativeEnum<typeof Product> =
|
|
102
|
+
Product$inboundSchema;
|
|
103
|
+
|
|
104
|
+
/** @internal */
|
|
105
|
+
export const Memory$inboundSchema: z.ZodType<Memory, z.ZodTypeDef, unknown> = z
|
|
106
|
+
.object({
|
|
107
|
+
entity_id: z.string(),
|
|
108
|
+
}).transform((v) => {
|
|
109
|
+
return remap$(v, {
|
|
110
|
+
"entity_id": "entityId",
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
/** @internal */
|
|
114
|
+
export type Memory$Outbound = {
|
|
115
|
+
entity_id: string;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
/** @internal */
|
|
119
|
+
export const Memory$outboundSchema: z.ZodType<
|
|
120
|
+
Memory$Outbound,
|
|
121
|
+
z.ZodTypeDef,
|
|
122
|
+
Memory
|
|
123
|
+
> = z.object({
|
|
124
|
+
entityId: z.string(),
|
|
125
|
+
}).transform((v) => {
|
|
126
|
+
return remap$(v, {
|
|
127
|
+
entityId: "entity_id",
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
export function memoryToJSON(memory: Memory): string {
|
|
132
|
+
return JSON.stringify(Memory$outboundSchema.parse(memory));
|
|
133
|
+
}
|
|
134
|
+
export function memoryFromJSON(
|
|
135
|
+
jsonString: string,
|
|
136
|
+
): SafeParseResult<Memory, SDKValidationError> {
|
|
137
|
+
return safeParse(
|
|
138
|
+
jsonString,
|
|
139
|
+
(x) => Memory$inboundSchema.parse(JSON.parse(x)),
|
|
140
|
+
`Failed to parse 'Memory' from JSON`,
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/** @internal */
|
|
145
|
+
export const ToolExecutionContext$inboundSchema: z.ZodType<
|
|
146
|
+
ToolExecutionContext,
|
|
147
|
+
z.ZodTypeDef,
|
|
148
|
+
unknown
|
|
149
|
+
> = z.object({
|
|
150
|
+
action_id: z.string(),
|
|
151
|
+
agent_tool_call_id: z.string(),
|
|
152
|
+
workspace_id: z.string(),
|
|
153
|
+
agent_manifest_id: z.string(),
|
|
154
|
+
agent_execution_id: z.string(),
|
|
155
|
+
product: Product$inboundSchema,
|
|
156
|
+
memory: z.lazy(() => Memory$inboundSchema).optional(),
|
|
157
|
+
parent_id: z.string().optional(),
|
|
158
|
+
}).transform((v) => {
|
|
159
|
+
return remap$(v, {
|
|
160
|
+
"action_id": "actionId",
|
|
161
|
+
"agent_tool_call_id": "agentToolCallId",
|
|
162
|
+
"workspace_id": "workspaceId",
|
|
163
|
+
"agent_manifest_id": "agentManifestId",
|
|
164
|
+
"agent_execution_id": "agentExecutionId",
|
|
165
|
+
"parent_id": "parentId",
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
/** @internal */
|
|
169
|
+
export type ToolExecutionContext$Outbound = {
|
|
170
|
+
action_id: string;
|
|
171
|
+
agent_tool_call_id: string;
|
|
172
|
+
workspace_id: string;
|
|
173
|
+
agent_manifest_id: string;
|
|
174
|
+
agent_execution_id: string;
|
|
175
|
+
product: string;
|
|
176
|
+
memory?: Memory$Outbound | undefined;
|
|
177
|
+
parent_id?: string | undefined;
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
/** @internal */
|
|
181
|
+
export const ToolExecutionContext$outboundSchema: z.ZodType<
|
|
182
|
+
ToolExecutionContext$Outbound,
|
|
183
|
+
z.ZodTypeDef,
|
|
184
|
+
ToolExecutionContext
|
|
185
|
+
> = z.object({
|
|
186
|
+
actionId: z.string(),
|
|
187
|
+
agentToolCallId: z.string(),
|
|
188
|
+
workspaceId: z.string(),
|
|
189
|
+
agentManifestId: z.string(),
|
|
190
|
+
agentExecutionId: z.string(),
|
|
191
|
+
product: Product$outboundSchema,
|
|
192
|
+
memory: z.lazy(() => Memory$outboundSchema).optional(),
|
|
193
|
+
parentId: z.string().optional(),
|
|
194
|
+
}).transform((v) => {
|
|
195
|
+
return remap$(v, {
|
|
196
|
+
actionId: "action_id",
|
|
197
|
+
agentToolCallId: "agent_tool_call_id",
|
|
198
|
+
workspaceId: "workspace_id",
|
|
199
|
+
agentManifestId: "agent_manifest_id",
|
|
200
|
+
agentExecutionId: "agent_execution_id",
|
|
201
|
+
parentId: "parent_id",
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
export function toolExecutionContextToJSON(
|
|
206
|
+
toolExecutionContext: ToolExecutionContext,
|
|
207
|
+
): string {
|
|
208
|
+
return JSON.stringify(
|
|
209
|
+
ToolExecutionContext$outboundSchema.parse(toolExecutionContext),
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
export function toolExecutionContextFromJSON(
|
|
213
|
+
jsonString: string,
|
|
214
|
+
): SafeParseResult<ToolExecutionContext, SDKValidationError> {
|
|
215
|
+
return safeParse(
|
|
216
|
+
jsonString,
|
|
217
|
+
(x) => ToolExecutionContext$inboundSchema.parse(JSON.parse(x)),
|
|
218
|
+
`Failed to parse 'ToolExecutionContext' from JSON`,
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/** @internal */
|
|
223
|
+
export const ToolExecutionStartedStreamingEventData$inboundSchema: z.ZodType<
|
|
224
|
+
ToolExecutionStartedStreamingEventData,
|
|
225
|
+
z.ZodTypeDef,
|
|
226
|
+
unknown
|
|
227
|
+
> = z.object({
|
|
228
|
+
tool_id: z.string(),
|
|
229
|
+
tool_key: z.string().optional(),
|
|
230
|
+
tool_display_name: z.string().optional(),
|
|
231
|
+
action_type: z.string(),
|
|
232
|
+
tool_arguments: z.record(z.any()),
|
|
233
|
+
tool_execution_context: z.lazy(() => ToolExecutionContext$inboundSchema),
|
|
234
|
+
responseId: z.string().optional(),
|
|
235
|
+
workflowRunId: z.string(),
|
|
236
|
+
}).transform((v) => {
|
|
237
|
+
return remap$(v, {
|
|
238
|
+
"tool_id": "toolId",
|
|
239
|
+
"tool_key": "toolKey",
|
|
240
|
+
"tool_display_name": "toolDisplayName",
|
|
241
|
+
"action_type": "actionType",
|
|
242
|
+
"tool_arguments": "toolArguments",
|
|
243
|
+
"tool_execution_context": "toolExecutionContext",
|
|
244
|
+
});
|
|
245
|
+
});
|
|
246
|
+
/** @internal */
|
|
247
|
+
export type ToolExecutionStartedStreamingEventData$Outbound = {
|
|
248
|
+
tool_id: string;
|
|
249
|
+
tool_key?: string | undefined;
|
|
250
|
+
tool_display_name?: string | undefined;
|
|
251
|
+
action_type: string;
|
|
252
|
+
tool_arguments: { [k: string]: any };
|
|
253
|
+
tool_execution_context: ToolExecutionContext$Outbound;
|
|
254
|
+
responseId?: string | undefined;
|
|
255
|
+
workflowRunId: string;
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
/** @internal */
|
|
259
|
+
export const ToolExecutionStartedStreamingEventData$outboundSchema: z.ZodType<
|
|
260
|
+
ToolExecutionStartedStreamingEventData$Outbound,
|
|
261
|
+
z.ZodTypeDef,
|
|
262
|
+
ToolExecutionStartedStreamingEventData
|
|
263
|
+
> = z.object({
|
|
264
|
+
toolId: z.string(),
|
|
265
|
+
toolKey: z.string().optional(),
|
|
266
|
+
toolDisplayName: z.string().optional(),
|
|
267
|
+
actionType: z.string(),
|
|
268
|
+
toolArguments: z.record(z.any()),
|
|
269
|
+
toolExecutionContext: z.lazy(() => ToolExecutionContext$outboundSchema),
|
|
270
|
+
responseId: z.string().optional(),
|
|
271
|
+
workflowRunId: z.string(),
|
|
272
|
+
}).transform((v) => {
|
|
273
|
+
return remap$(v, {
|
|
274
|
+
toolId: "tool_id",
|
|
275
|
+
toolKey: "tool_key",
|
|
276
|
+
toolDisplayName: "tool_display_name",
|
|
277
|
+
actionType: "action_type",
|
|
278
|
+
toolArguments: "tool_arguments",
|
|
279
|
+
toolExecutionContext: "tool_execution_context",
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
export function toolExecutionStartedStreamingEventDataToJSON(
|
|
284
|
+
toolExecutionStartedStreamingEventData:
|
|
285
|
+
ToolExecutionStartedStreamingEventData,
|
|
286
|
+
): string {
|
|
287
|
+
return JSON.stringify(
|
|
288
|
+
ToolExecutionStartedStreamingEventData$outboundSchema.parse(
|
|
289
|
+
toolExecutionStartedStreamingEventData,
|
|
290
|
+
),
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
export function toolExecutionStartedStreamingEventDataFromJSON(
|
|
294
|
+
jsonString: string,
|
|
295
|
+
): SafeParseResult<ToolExecutionStartedStreamingEventData, SDKValidationError> {
|
|
296
|
+
return safeParse(
|
|
297
|
+
jsonString,
|
|
298
|
+
(x) =>
|
|
299
|
+
ToolExecutionStartedStreamingEventData$inboundSchema.parse(JSON.parse(x)),
|
|
300
|
+
`Failed to parse 'ToolExecutionStartedStreamingEventData' from JSON`,
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/** @internal */
|
|
305
|
+
export const ToolExecutionStartedStreamingEvent$inboundSchema: z.ZodType<
|
|
306
|
+
ToolExecutionStartedStreamingEvent,
|
|
307
|
+
z.ZodTypeDef,
|
|
308
|
+
unknown
|
|
309
|
+
> = z.object({
|
|
310
|
+
type: ToolExecutionStartedStreamingEventType$inboundSchema,
|
|
311
|
+
timestamp: z.string(),
|
|
312
|
+
data: z.lazy(() => ToolExecutionStartedStreamingEventData$inboundSchema),
|
|
313
|
+
});
|
|
314
|
+
/** @internal */
|
|
315
|
+
export type ToolExecutionStartedStreamingEvent$Outbound = {
|
|
316
|
+
type: string;
|
|
317
|
+
timestamp: string;
|
|
318
|
+
data: ToolExecutionStartedStreamingEventData$Outbound;
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
/** @internal */
|
|
322
|
+
export const ToolExecutionStartedStreamingEvent$outboundSchema: z.ZodType<
|
|
323
|
+
ToolExecutionStartedStreamingEvent$Outbound,
|
|
324
|
+
z.ZodTypeDef,
|
|
325
|
+
ToolExecutionStartedStreamingEvent
|
|
326
|
+
> = z.object({
|
|
327
|
+
type: ToolExecutionStartedStreamingEventType$outboundSchema,
|
|
328
|
+
timestamp: z.string(),
|
|
329
|
+
data: z.lazy(() => ToolExecutionStartedStreamingEventData$outboundSchema),
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
export function toolExecutionStartedStreamingEventToJSON(
|
|
333
|
+
toolExecutionStartedStreamingEvent: ToolExecutionStartedStreamingEvent,
|
|
334
|
+
): string {
|
|
335
|
+
return JSON.stringify(
|
|
336
|
+
ToolExecutionStartedStreamingEvent$outboundSchema.parse(
|
|
337
|
+
toolExecutionStartedStreamingEvent,
|
|
338
|
+
),
|
|
339
|
+
);
|
|
340
|
+
}
|
|
341
|
+
export function toolExecutionStartedStreamingEventFromJSON(
|
|
342
|
+
jsonString: string,
|
|
343
|
+
): SafeParseResult<ToolExecutionStartedStreamingEvent, SDKValidationError> {
|
|
344
|
+
return safeParse(
|
|
345
|
+
jsonString,
|
|
346
|
+
(x) =>
|
|
347
|
+
ToolExecutionStartedStreamingEvent$inboundSchema.parse(JSON.parse(x)),
|
|
348
|
+
`Failed to parse 'ToolExecutionStartedStreamingEvent' from JSON`,
|
|
349
|
+
);
|
|
350
|
+
}
|
|
@@ -15,7 +15,7 @@ export const ToolResultPartKind = {
|
|
|
15
15
|
export type ToolResultPartKind = ClosedEnum<typeof ToolResultPartKind>;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Tool execution result part. Use this ONLY when providing results for a pending tool call from the agent. The tool_call_id must match the ID from the agent's tool call request.
|
|
19
19
|
*/
|
|
20
20
|
export type ToolResultPart = {
|
|
21
21
|
kind: ToolResultPartKind;
|