@orq-ai/node 4.0.2 → 4.0.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 +213 -213
- package/bin/mcp-server.js.map +36 -36
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +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.js +28 -28
- 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.js +28 -28
- 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/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.js +2 -2
- package/models/operations/streamrunagent.js +2 -2
- 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.js +28 -28
- package/models/operations/updatetool.js +14 -14
- package/package.json +1 -1
- package/packages/orq-rc/README.md +38 -47
- package/packages/orq-rc/docs/sdks/agents/README.md +230 -529
- package/packages/orq-rc/docs/sdks/responses/README.md +60 -65
- package/packages/orq-rc/examples/package-lock.json +1 -1
- package/packages/orq-rc/jsr.json +1 -1
- package/packages/orq-rc/package-lock.json +2 -2
- package/packages/orq-rc/package.json +1 -1
- package/packages/orq-rc/src/funcs/agentsCreate.ts +16 -14
- package/packages/orq-rc/src/funcs/agentsDelete.ts +10 -6
- package/packages/orq-rc/src/funcs/agentsInvoke.ts +16 -6
- package/packages/orq-rc/src/funcs/agentsList.ts +18 -6
- package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +23 -12
- package/packages/orq-rc/src/funcs/agentsRetrieve.ts +21 -16
- package/packages/orq-rc/src/funcs/agentsRun.ts +4 -2
- package/packages/orq-rc/src/funcs/agentsStream.ts +16 -6
- package/packages/orq-rc/src/funcs/agentsStreamRun.ts +4 -2
- package/packages/orq-rc/src/funcs/agentsUpdate.ts +14 -6
- package/packages/orq-rc/src/lib/config.ts +2 -2
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +1 -9
- package/packages/orq-rc/src/mcp-server/tools/agentsCreate.ts +3 -3
- package/packages/orq-rc/src/mcp-server/tools/agentsDelete.ts +5 -5
- package/packages/orq-rc/src/mcp-server/tools/agentsInvoke.ts +7 -4
- package/packages/orq-rc/src/mcp-server/tools/agentsList.ts +9 -5
- package/packages/orq-rc/src/mcp-server/tools/agentsResponsesCreate.ts +8 -4
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieve.ts +5 -5
- package/packages/orq-rc/src/mcp-server/tools/agentsRun.ts +2 -2
- package/packages/orq-rc/src/mcp-server/tools/agentsStream.ts +7 -4
- package/packages/orq-rc/src/mcp-server/tools/agentsStreamRun.ts +2 -2
- package/packages/orq-rc/src/mcp-server/tools/agentsUpdate.ts +8 -4
- package/packages/orq-rc/src/models/errors/createagentrequest.ts +67 -0
- package/packages/orq-rc/src/models/errors/deleteagent.ts +2 -2
- package/packages/orq-rc/src/models/errors/index.ts +2 -3
- package/packages/orq-rc/src/models/errors/{listagenttasks.ts → retrieveagentrequest.ts} +15 -15
- package/packages/orq-rc/src/models/errors/updateagent.ts +2 -2
- package/packages/orq-rc/src/models/operations/{createagent.ts → createagentrequest.ts} +1643 -1485
- package/packages/orq-rc/src/models/operations/{createagentresponse.ts → createagentresponserequest.ts} +141 -127
- package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +8 -8
- package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/createeval.ts +28 -28
- package/packages/orq-rc/src/models/operations/createprompt.ts +4 -4
- package/packages/orq-rc/src/models/operations/createtool.ts +12 -12
- package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
- package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
- package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
- package/packages/orq-rc/src/models/operations/getalltools.ts +12 -12
- package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
- package/packages/orq-rc/src/models/operations/index.ts +3 -7
- package/packages/orq-rc/src/models/operations/invokeagent.ts +153 -190
- package/packages/orq-rc/src/models/operations/listagents.ts +9 -21
- package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +8 -8
- package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +3741 -0
- package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +8 -8
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievetool.ts +12 -12
- package/packages/orq-rc/src/models/operations/runagent.ts +53 -57
- package/packages/orq-rc/src/models/operations/streamagent.ts +1 -1
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +68 -82
- package/packages/orq-rc/src/models/operations/updateagent.ts +17 -17
- package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +8 -8
- package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/updateeval.ts +28 -28
- package/packages/orq-rc/src/models/operations/updateprompt.ts +4 -4
- package/packages/orq-rc/src/models/operations/updatetool.ts +14 -14
- package/packages/orq-rc/src/sdk/agents.ts +51 -99
- package/packages/orq-rc/src/sdk/responses.ts +7 -5
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- 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 +28 -28
- 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 +28 -28
- 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/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 +2 -2
- package/src/models/operations/streamrunagent.ts +2 -2
- 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 +28 -28
- package/src/models/operations/updatetool.ts +14 -14
- package/packages/orq-rc/src/funcs/agentsListActions.ts +0 -169
- package/packages/orq-rc/src/funcs/agentsListTasks.ts +0 -183
- package/packages/orq-rc/src/funcs/agentsRetrieveAction.ts +0 -173
- package/packages/orq-rc/src/funcs/agentsRetrieveTask.ts +0 -179
- package/packages/orq-rc/src/mcp-server/tools/agentsListActions.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/agentsListTasks.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveAction.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveTask.ts +0 -37
- package/packages/orq-rc/src/models/errors/createagent.ts +0 -67
- package/packages/orq-rc/src/models/errors/getagent.ts +0 -67
- package/packages/orq-rc/src/models/operations/getagent.ts +0 -3480
- package/packages/orq-rc/src/models/operations/getagenttask.ts +0 -2389
- package/packages/orq-rc/src/models/operations/listactions.ts +0 -427
- package/packages/orq-rc/src/models/operations/listagenttasks.ts +0 -2614
- package/packages/orq-rc/src/models/operations/retrieveaction.ts +0 -354
|
@@ -1,354 +0,0 @@
|
|
|
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 type RetrieveActionRequest = {
|
|
13
|
-
/**
|
|
14
|
-
* The unique key of the agent
|
|
15
|
-
*/
|
|
16
|
-
agentKey: string;
|
|
17
|
-
/**
|
|
18
|
-
* The unique id of the task
|
|
19
|
-
*/
|
|
20
|
-
taskId: string;
|
|
21
|
-
/**
|
|
22
|
-
* The unique id of the action
|
|
23
|
-
*/
|
|
24
|
-
actionId: string;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export type Tool = {
|
|
28
|
-
/**
|
|
29
|
-
* The tool' id in orq
|
|
30
|
-
*/
|
|
31
|
-
id: string;
|
|
32
|
-
displayName: string;
|
|
33
|
-
requiresApproval?: boolean | undefined;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Review status of the tool call
|
|
38
|
-
*/
|
|
39
|
-
export const Review = {
|
|
40
|
-
Approved: "approved",
|
|
41
|
-
Rejected: "rejected",
|
|
42
|
-
} as const;
|
|
43
|
-
/**
|
|
44
|
-
* Review status of the tool call
|
|
45
|
-
*/
|
|
46
|
-
export type Review = ClosedEnum<typeof Review>;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* An action is a tool that an agent chooses to use. If executed is false, together with the output being there, it can indicate that a tool was mocked
|
|
50
|
-
*/
|
|
51
|
-
export type State = {
|
|
52
|
-
/**
|
|
53
|
-
* Review status of the tool call
|
|
54
|
-
*/
|
|
55
|
-
review?: Review | null | undefined;
|
|
56
|
-
/**
|
|
57
|
-
* The source of the review, where it was approved or rejected
|
|
58
|
-
*/
|
|
59
|
-
reviewSource?: string | undefined;
|
|
60
|
-
/**
|
|
61
|
-
* Only refers to an internal user of the platform, who approved or rejected the tool execution
|
|
62
|
-
*/
|
|
63
|
-
reviewedById?: string | undefined;
|
|
64
|
-
executed?: boolean | undefined;
|
|
65
|
-
error?: string | undefined;
|
|
66
|
-
input: { [k: string]: any };
|
|
67
|
-
output: { [k: string]: any };
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* The action object
|
|
72
|
-
*/
|
|
73
|
-
export type RetrieveActionResponseBody = {
|
|
74
|
-
/**
|
|
75
|
-
* Internal id for the action
|
|
76
|
-
*/
|
|
77
|
-
id: string;
|
|
78
|
-
/**
|
|
79
|
-
* The tool call id what the agent chooses to use and generates
|
|
80
|
-
*/
|
|
81
|
-
agentToolCallId: string;
|
|
82
|
-
tool: Tool;
|
|
83
|
-
created: string;
|
|
84
|
-
updated: string;
|
|
85
|
-
started?: string | undefined;
|
|
86
|
-
finished?: string | undefined;
|
|
87
|
-
agentId: string;
|
|
88
|
-
actionType: string;
|
|
89
|
-
agentExecutionId: string;
|
|
90
|
-
workspaceId: string;
|
|
91
|
-
/**
|
|
92
|
-
* An action is a tool that an agent chooses to use. If executed is false, together with the output being there, it can indicate that a tool was mocked
|
|
93
|
-
*/
|
|
94
|
-
state: State;
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
/** @internal */
|
|
98
|
-
export const RetrieveActionRequest$inboundSchema: z.ZodType<
|
|
99
|
-
RetrieveActionRequest,
|
|
100
|
-
z.ZodTypeDef,
|
|
101
|
-
unknown
|
|
102
|
-
> = z.object({
|
|
103
|
-
agent_key: z.string(),
|
|
104
|
-
task_id: z.string(),
|
|
105
|
-
action_id: z.string(),
|
|
106
|
-
}).transform((v) => {
|
|
107
|
-
return remap$(v, {
|
|
108
|
-
"agent_key": "agentKey",
|
|
109
|
-
"task_id": "taskId",
|
|
110
|
-
"action_id": "actionId",
|
|
111
|
-
});
|
|
112
|
-
});
|
|
113
|
-
/** @internal */
|
|
114
|
-
export type RetrieveActionRequest$Outbound = {
|
|
115
|
-
agent_key: string;
|
|
116
|
-
task_id: string;
|
|
117
|
-
action_id: string;
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
/** @internal */
|
|
121
|
-
export const RetrieveActionRequest$outboundSchema: z.ZodType<
|
|
122
|
-
RetrieveActionRequest$Outbound,
|
|
123
|
-
z.ZodTypeDef,
|
|
124
|
-
RetrieveActionRequest
|
|
125
|
-
> = z.object({
|
|
126
|
-
agentKey: z.string(),
|
|
127
|
-
taskId: z.string(),
|
|
128
|
-
actionId: z.string(),
|
|
129
|
-
}).transform((v) => {
|
|
130
|
-
return remap$(v, {
|
|
131
|
-
agentKey: "agent_key",
|
|
132
|
-
taskId: "task_id",
|
|
133
|
-
actionId: "action_id",
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
export function retrieveActionRequestToJSON(
|
|
138
|
-
retrieveActionRequest: RetrieveActionRequest,
|
|
139
|
-
): string {
|
|
140
|
-
return JSON.stringify(
|
|
141
|
-
RetrieveActionRequest$outboundSchema.parse(retrieveActionRequest),
|
|
142
|
-
);
|
|
143
|
-
}
|
|
144
|
-
export function retrieveActionRequestFromJSON(
|
|
145
|
-
jsonString: string,
|
|
146
|
-
): SafeParseResult<RetrieveActionRequest, SDKValidationError> {
|
|
147
|
-
return safeParse(
|
|
148
|
-
jsonString,
|
|
149
|
-
(x) => RetrieveActionRequest$inboundSchema.parse(JSON.parse(x)),
|
|
150
|
-
`Failed to parse 'RetrieveActionRequest' from JSON`,
|
|
151
|
-
);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
/** @internal */
|
|
155
|
-
export const Tool$inboundSchema: z.ZodType<Tool, z.ZodTypeDef, unknown> = z
|
|
156
|
-
.object({
|
|
157
|
-
id: z.string(),
|
|
158
|
-
display_name: z.string(),
|
|
159
|
-
requires_approval: z.boolean().default(false),
|
|
160
|
-
}).transform((v) => {
|
|
161
|
-
return remap$(v, {
|
|
162
|
-
"display_name": "displayName",
|
|
163
|
-
"requires_approval": "requiresApproval",
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
/** @internal */
|
|
167
|
-
export type Tool$Outbound = {
|
|
168
|
-
id: string;
|
|
169
|
-
display_name: string;
|
|
170
|
-
requires_approval: boolean;
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
/** @internal */
|
|
174
|
-
export const Tool$outboundSchema: z.ZodType<Tool$Outbound, z.ZodTypeDef, Tool> =
|
|
175
|
-
z.object({
|
|
176
|
-
id: z.string(),
|
|
177
|
-
displayName: z.string(),
|
|
178
|
-
requiresApproval: z.boolean().default(false),
|
|
179
|
-
}).transform((v) => {
|
|
180
|
-
return remap$(v, {
|
|
181
|
-
displayName: "display_name",
|
|
182
|
-
requiresApproval: "requires_approval",
|
|
183
|
-
});
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
export function toolToJSON(tool: Tool): string {
|
|
187
|
-
return JSON.stringify(Tool$outboundSchema.parse(tool));
|
|
188
|
-
}
|
|
189
|
-
export function toolFromJSON(
|
|
190
|
-
jsonString: string,
|
|
191
|
-
): SafeParseResult<Tool, SDKValidationError> {
|
|
192
|
-
return safeParse(
|
|
193
|
-
jsonString,
|
|
194
|
-
(x) => Tool$inboundSchema.parse(JSON.parse(x)),
|
|
195
|
-
`Failed to parse 'Tool' from JSON`,
|
|
196
|
-
);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/** @internal */
|
|
200
|
-
export const Review$inboundSchema: z.ZodNativeEnum<typeof Review> = z
|
|
201
|
-
.nativeEnum(Review);
|
|
202
|
-
/** @internal */
|
|
203
|
-
export const Review$outboundSchema: z.ZodNativeEnum<typeof Review> =
|
|
204
|
-
Review$inboundSchema;
|
|
205
|
-
|
|
206
|
-
/** @internal */
|
|
207
|
-
export const State$inboundSchema: z.ZodType<State, z.ZodTypeDef, unknown> = z
|
|
208
|
-
.object({
|
|
209
|
-
review: z.nullable(Review$inboundSchema).default(null),
|
|
210
|
-
review_source: z.string().optional(),
|
|
211
|
-
reviewed_by_id: z.string().optional(),
|
|
212
|
-
executed: z.boolean().default(false),
|
|
213
|
-
error: z.string().optional(),
|
|
214
|
-
input: z.record(z.any()),
|
|
215
|
-
output: z.record(z.any()),
|
|
216
|
-
}).transform((v) => {
|
|
217
|
-
return remap$(v, {
|
|
218
|
-
"review_source": "reviewSource",
|
|
219
|
-
"reviewed_by_id": "reviewedById",
|
|
220
|
-
});
|
|
221
|
-
});
|
|
222
|
-
/** @internal */
|
|
223
|
-
export type State$Outbound = {
|
|
224
|
-
review: string | null;
|
|
225
|
-
review_source?: string | undefined;
|
|
226
|
-
reviewed_by_id?: string | undefined;
|
|
227
|
-
executed: boolean;
|
|
228
|
-
error?: string | undefined;
|
|
229
|
-
input: { [k: string]: any };
|
|
230
|
-
output: { [k: string]: any };
|
|
231
|
-
};
|
|
232
|
-
|
|
233
|
-
/** @internal */
|
|
234
|
-
export const State$outboundSchema: z.ZodType<
|
|
235
|
-
State$Outbound,
|
|
236
|
-
z.ZodTypeDef,
|
|
237
|
-
State
|
|
238
|
-
> = z.object({
|
|
239
|
-
review: z.nullable(Review$outboundSchema).default(null),
|
|
240
|
-
reviewSource: z.string().optional(),
|
|
241
|
-
reviewedById: z.string().optional(),
|
|
242
|
-
executed: z.boolean().default(false),
|
|
243
|
-
error: z.string().optional(),
|
|
244
|
-
input: z.record(z.any()),
|
|
245
|
-
output: z.record(z.any()),
|
|
246
|
-
}).transform((v) => {
|
|
247
|
-
return remap$(v, {
|
|
248
|
-
reviewSource: "review_source",
|
|
249
|
-
reviewedById: "reviewed_by_id",
|
|
250
|
-
});
|
|
251
|
-
});
|
|
252
|
-
|
|
253
|
-
export function stateToJSON(state: State): string {
|
|
254
|
-
return JSON.stringify(State$outboundSchema.parse(state));
|
|
255
|
-
}
|
|
256
|
-
export function stateFromJSON(
|
|
257
|
-
jsonString: string,
|
|
258
|
-
): SafeParseResult<State, SDKValidationError> {
|
|
259
|
-
return safeParse(
|
|
260
|
-
jsonString,
|
|
261
|
-
(x) => State$inboundSchema.parse(JSON.parse(x)),
|
|
262
|
-
`Failed to parse 'State' from JSON`,
|
|
263
|
-
);
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
/** @internal */
|
|
267
|
-
export const RetrieveActionResponseBody$inboundSchema: z.ZodType<
|
|
268
|
-
RetrieveActionResponseBody,
|
|
269
|
-
z.ZodTypeDef,
|
|
270
|
-
unknown
|
|
271
|
-
> = z.object({
|
|
272
|
-
_id: z.string(),
|
|
273
|
-
agent_tool_call_id: z.string(),
|
|
274
|
-
tool: z.lazy(() => Tool$inboundSchema),
|
|
275
|
-
created: z.string(),
|
|
276
|
-
updated: z.string(),
|
|
277
|
-
started: z.string().optional(),
|
|
278
|
-
finished: z.string().optional(),
|
|
279
|
-
agent_id: z.string(),
|
|
280
|
-
action_type: z.string(),
|
|
281
|
-
agent_execution_id: z.string(),
|
|
282
|
-
workspace_id: z.string(),
|
|
283
|
-
state: z.lazy(() => State$inboundSchema),
|
|
284
|
-
}).transform((v) => {
|
|
285
|
-
return remap$(v, {
|
|
286
|
-
"_id": "id",
|
|
287
|
-
"agent_tool_call_id": "agentToolCallId",
|
|
288
|
-
"agent_id": "agentId",
|
|
289
|
-
"action_type": "actionType",
|
|
290
|
-
"agent_execution_id": "agentExecutionId",
|
|
291
|
-
"workspace_id": "workspaceId",
|
|
292
|
-
});
|
|
293
|
-
});
|
|
294
|
-
/** @internal */
|
|
295
|
-
export type RetrieveActionResponseBody$Outbound = {
|
|
296
|
-
_id: string;
|
|
297
|
-
agent_tool_call_id: string;
|
|
298
|
-
tool: Tool$Outbound;
|
|
299
|
-
created: string;
|
|
300
|
-
updated: string;
|
|
301
|
-
started?: string | undefined;
|
|
302
|
-
finished?: string | undefined;
|
|
303
|
-
agent_id: string;
|
|
304
|
-
action_type: string;
|
|
305
|
-
agent_execution_id: string;
|
|
306
|
-
workspace_id: string;
|
|
307
|
-
state: State$Outbound;
|
|
308
|
-
};
|
|
309
|
-
|
|
310
|
-
/** @internal */
|
|
311
|
-
export const RetrieveActionResponseBody$outboundSchema: z.ZodType<
|
|
312
|
-
RetrieveActionResponseBody$Outbound,
|
|
313
|
-
z.ZodTypeDef,
|
|
314
|
-
RetrieveActionResponseBody
|
|
315
|
-
> = z.object({
|
|
316
|
-
id: z.string(),
|
|
317
|
-
agentToolCallId: z.string(),
|
|
318
|
-
tool: z.lazy(() => Tool$outboundSchema),
|
|
319
|
-
created: z.string(),
|
|
320
|
-
updated: z.string(),
|
|
321
|
-
started: z.string().optional(),
|
|
322
|
-
finished: z.string().optional(),
|
|
323
|
-
agentId: z.string(),
|
|
324
|
-
actionType: z.string(),
|
|
325
|
-
agentExecutionId: z.string(),
|
|
326
|
-
workspaceId: z.string(),
|
|
327
|
-
state: z.lazy(() => State$outboundSchema),
|
|
328
|
-
}).transform((v) => {
|
|
329
|
-
return remap$(v, {
|
|
330
|
-
id: "_id",
|
|
331
|
-
agentToolCallId: "agent_tool_call_id",
|
|
332
|
-
agentId: "agent_id",
|
|
333
|
-
actionType: "action_type",
|
|
334
|
-
agentExecutionId: "agent_execution_id",
|
|
335
|
-
workspaceId: "workspace_id",
|
|
336
|
-
});
|
|
337
|
-
});
|
|
338
|
-
|
|
339
|
-
export function retrieveActionResponseBodyToJSON(
|
|
340
|
-
retrieveActionResponseBody: RetrieveActionResponseBody,
|
|
341
|
-
): string {
|
|
342
|
-
return JSON.stringify(
|
|
343
|
-
RetrieveActionResponseBody$outboundSchema.parse(retrieveActionResponseBody),
|
|
344
|
-
);
|
|
345
|
-
}
|
|
346
|
-
export function retrieveActionResponseBodyFromJSON(
|
|
347
|
-
jsonString: string,
|
|
348
|
-
): SafeParseResult<RetrieveActionResponseBody, SDKValidationError> {
|
|
349
|
-
return safeParse(
|
|
350
|
-
jsonString,
|
|
351
|
-
(x) => RetrieveActionResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
352
|
-
`Failed to parse 'RetrieveActionResponseBody' from JSON`,
|
|
353
|
-
);
|
|
354
|
-
}
|