@orq-ai/node 3.14.28 → 3.14.30
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 +210 -210
- package/bin/mcp-server.js.map +35 -35
- 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/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 +10 -10
- package/models/operations/duplicatetool.js +10 -10
- 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 +10 -10
- 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 +10 -10
- 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 +10 -10
- package/package.json +1 -1
- package/packages/orq-rc/README.md +25 -21
- package/packages/orq-rc/docs/sdks/agents/README.md +83 -3
- 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/agentsDuplicate.ts +179 -0
- package/packages/orq-rc/src/funcs/agentsList.ts +1 -1
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +3 -1
- package/packages/orq-rc/src/mcp-server/tools/agentsDuplicate.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsList.ts +1 -1
- package/packages/orq-rc/src/models/errors/duplicateagent.ts +128 -0
- package/packages/orq-rc/src/models/errors/index.ts +1 -0
- package/packages/orq-rc/src/models/operations/createagent.ts +33 -16
- 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/createtool.ts +149 -38
- package/packages/orq-rc/src/models/operations/duplicateagent.ts +3280 -0
- package/packages/orq-rc/src/models/operations/duplicatetool.ts +70 -14
- 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/getagent.ts +29 -17
- package/packages/orq-rc/src/models/operations/getagenttask.ts +750 -8
- package/packages/orq-rc/src/models/operations/getalltools.ts +63 -14
- 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 +1 -0
- package/packages/orq-rc/src/models/operations/invokeagent.ts +632 -4
- package/packages/orq-rc/src/models/operations/listagents.ts +32 -21
- package/packages/orq-rc/src/models/operations/listagenttasks.ts +640 -2908
- 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/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 +70 -14
- package/packages/orq-rc/src/models/operations/runagent.ts +650 -9
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +54 -5
- package/packages/orq-rc/src/models/operations/updateagent.ts +72 -18
- 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/updatetool.ts +151 -36
- package/packages/orq-rc/src/sdk/agents.ts +19 -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/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 +10 -10
- package/src/models/operations/duplicatetool.ts +10 -10
- 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 +10 -10
- 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 +10 -10
- 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 +10 -10
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { OrqCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import * as errors from "../models/errors/index.js";
|
|
21
|
+
import { OrqError } from "../models/errors/orqerror.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Duplicate an existing agent
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Creates a copy of an existing agent with a new unique key. The duplicated agent will have all the same configuration as the original, including model settings, instructions, tools, and knowledge bases.
|
|
33
|
+
*/
|
|
34
|
+
export function agentsDuplicate(
|
|
35
|
+
client: OrqCore,
|
|
36
|
+
request: operations.DuplicateAgentRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
operations.DuplicateAgentResponseBody,
|
|
41
|
+
| errors.DuplicateAgentResponseBody
|
|
42
|
+
| errors.DuplicateAgentAgentsResponseBody
|
|
43
|
+
| OrqError
|
|
44
|
+
| ResponseValidationError
|
|
45
|
+
| ConnectionError
|
|
46
|
+
| RequestAbortedError
|
|
47
|
+
| RequestTimeoutError
|
|
48
|
+
| InvalidRequestError
|
|
49
|
+
| UnexpectedClientError
|
|
50
|
+
| SDKValidationError
|
|
51
|
+
>
|
|
52
|
+
> {
|
|
53
|
+
return new APIPromise($do(
|
|
54
|
+
client,
|
|
55
|
+
request,
|
|
56
|
+
options,
|
|
57
|
+
));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async function $do(
|
|
61
|
+
client: OrqCore,
|
|
62
|
+
request: operations.DuplicateAgentRequest,
|
|
63
|
+
options?: RequestOptions,
|
|
64
|
+
): Promise<
|
|
65
|
+
[
|
|
66
|
+
Result<
|
|
67
|
+
operations.DuplicateAgentResponseBody,
|
|
68
|
+
| errors.DuplicateAgentResponseBody
|
|
69
|
+
| errors.DuplicateAgentAgentsResponseBody
|
|
70
|
+
| OrqError
|
|
71
|
+
| ResponseValidationError
|
|
72
|
+
| ConnectionError
|
|
73
|
+
| RequestAbortedError
|
|
74
|
+
| RequestTimeoutError
|
|
75
|
+
| InvalidRequestError
|
|
76
|
+
| UnexpectedClientError
|
|
77
|
+
| SDKValidationError
|
|
78
|
+
>,
|
|
79
|
+
APICall,
|
|
80
|
+
]
|
|
81
|
+
> {
|
|
82
|
+
const parsed = safeParse(
|
|
83
|
+
request,
|
|
84
|
+
(value) => operations.DuplicateAgentRequest$outboundSchema.parse(value),
|
|
85
|
+
"Input validation failed",
|
|
86
|
+
);
|
|
87
|
+
if (!parsed.ok) {
|
|
88
|
+
return [parsed, { status: "invalid" }];
|
|
89
|
+
}
|
|
90
|
+
const payload = parsed.value;
|
|
91
|
+
const body = null;
|
|
92
|
+
|
|
93
|
+
const pathParams = {
|
|
94
|
+
id: encodeSimple("id", payload.id, {
|
|
95
|
+
explode: false,
|
|
96
|
+
charEncoding: "percent",
|
|
97
|
+
}),
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const path = pathToFunc("/v2/agents/{id}/duplicate")(pathParams);
|
|
101
|
+
|
|
102
|
+
const headers = new Headers(compactMap({
|
|
103
|
+
Accept: "application/json",
|
|
104
|
+
}));
|
|
105
|
+
|
|
106
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
107
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
108
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
109
|
+
|
|
110
|
+
const context = {
|
|
111
|
+
options: client._options,
|
|
112
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
113
|
+
operationID: "DuplicateAgent",
|
|
114
|
+
oAuth2Scopes: null,
|
|
115
|
+
|
|
116
|
+
resolvedSecurity: requestSecurity,
|
|
117
|
+
|
|
118
|
+
securitySource: client._options.apiKey,
|
|
119
|
+
retryConfig: options?.retries
|
|
120
|
+
|| client._options.retryConfig
|
|
121
|
+
|| { strategy: "none" },
|
|
122
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const requestRes = client._createRequest(context, {
|
|
126
|
+
security: requestSecurity,
|
|
127
|
+
method: "POST",
|
|
128
|
+
baseURL: options?.serverURL,
|
|
129
|
+
path: path,
|
|
130
|
+
headers: headers,
|
|
131
|
+
body: body,
|
|
132
|
+
userAgent: client._options.userAgent,
|
|
133
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
134
|
+
}, options);
|
|
135
|
+
if (!requestRes.ok) {
|
|
136
|
+
return [requestRes, { status: "invalid" }];
|
|
137
|
+
}
|
|
138
|
+
const req = requestRes.value;
|
|
139
|
+
|
|
140
|
+
const doResult = await client._do(req, {
|
|
141
|
+
context,
|
|
142
|
+
errorCodes: ["404", "409", "4XX", "5XX"],
|
|
143
|
+
retryConfig: context.retryConfig,
|
|
144
|
+
retryCodes: context.retryCodes,
|
|
145
|
+
});
|
|
146
|
+
if (!doResult.ok) {
|
|
147
|
+
return [doResult, { status: "request-error", request: req }];
|
|
148
|
+
}
|
|
149
|
+
const response = doResult.value;
|
|
150
|
+
|
|
151
|
+
const responseFields = {
|
|
152
|
+
HttpMeta: { Response: response, Request: req },
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
const [result] = await M.match<
|
|
156
|
+
operations.DuplicateAgentResponseBody,
|
|
157
|
+
| errors.DuplicateAgentResponseBody
|
|
158
|
+
| errors.DuplicateAgentAgentsResponseBody
|
|
159
|
+
| OrqError
|
|
160
|
+
| ResponseValidationError
|
|
161
|
+
| ConnectionError
|
|
162
|
+
| RequestAbortedError
|
|
163
|
+
| RequestTimeoutError
|
|
164
|
+
| InvalidRequestError
|
|
165
|
+
| UnexpectedClientError
|
|
166
|
+
| SDKValidationError
|
|
167
|
+
>(
|
|
168
|
+
M.json(201, operations.DuplicateAgentResponseBody$inboundSchema),
|
|
169
|
+
M.jsonErr(404, errors.DuplicateAgentResponseBody$inboundSchema),
|
|
170
|
+
M.jsonErr(409, errors.DuplicateAgentAgentsResponseBody$inboundSchema),
|
|
171
|
+
M.fail("4XX"),
|
|
172
|
+
M.fail("5XX"),
|
|
173
|
+
)(response, req, { extraFields: responseFields });
|
|
174
|
+
if (!result.ok) {
|
|
175
|
+
return [result, { status: "complete", request: req, response }];
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
return [result, { status: "complete", request: req, response }];
|
|
179
|
+
}
|
|
@@ -28,7 +28,7 @@ import { Result } from "../types/fp.js";
|
|
|
28
28
|
* List all agents
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
|
-
* Retrieves a
|
|
31
|
+
* Retrieves a list of all agents in your workspace. When no limit is provided, returns all agents without pagination. When a limit is specified, returns a paginated list. Each agent includes its configuration, primary model, and optional fallback model settings.
|
|
32
32
|
*/
|
|
33
33
|
export function agentsList(
|
|
34
34
|
client: OrqCore,
|
|
@@ -68,7 +68,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
68
68
|
export const SDK_METADATA = {
|
|
69
69
|
language: "typescript",
|
|
70
70
|
openapiDocVersion: "2.0",
|
|
71
|
-
sdkVersion: "4.0.0-rc.
|
|
72
|
-
genVersion: "2.
|
|
73
|
-
userAgent: "speakeasy-sdk/typescript 4.0.0-rc.
|
|
71
|
+
sdkVersion: "4.0.0-rc.23",
|
|
72
|
+
genVersion: "2.748.0",
|
|
73
|
+
userAgent: "speakeasy-sdk/typescript 4.0.0-rc.23 2.748.0 2.0 @orq-ai/node",
|
|
74
74
|
} as const;
|
|
@@ -15,6 +15,7 @@ import { MCPScope } from "./scopes.js";
|
|
|
15
15
|
import { createRegisterTool } from "./tools.js";
|
|
16
16
|
import { tool$agentsCreate } from "./tools/agentsCreate.js";
|
|
17
17
|
import { tool$agentsDelete } from "./tools/agentsDelete.js";
|
|
18
|
+
import { tool$agentsDuplicate } from "./tools/agentsDuplicate.js";
|
|
18
19
|
import { tool$agentsInvoke } from "./tools/agentsInvoke.js";
|
|
19
20
|
import { tool$agentsList } from "./tools/agentsList.js";
|
|
20
21
|
import { tool$agentsListActions } from "./tools/agentsListActions.js";
|
|
@@ -124,7 +125,7 @@ export function createMCPServer(deps: {
|
|
|
124
125
|
}) {
|
|
125
126
|
const server = new McpServer({
|
|
126
127
|
name: "Orq",
|
|
127
|
-
version: "4.0.0-rc.
|
|
128
|
+
version: "4.0.0-rc.23",
|
|
128
129
|
});
|
|
129
130
|
|
|
130
131
|
const client = new OrqCore({
|
|
@@ -176,6 +177,7 @@ export function createMCPServer(deps: {
|
|
|
176
177
|
tool(tool$agentsDelete);
|
|
177
178
|
tool(tool$agentsRetrieve);
|
|
178
179
|
tool(tool$agentsUpdate);
|
|
180
|
+
tool(tool$agentsDuplicate);
|
|
179
181
|
tool(tool$agentsInvoke);
|
|
180
182
|
tool(tool$agentsListTasks);
|
|
181
183
|
tool(tool$agentsRun);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { agentsDuplicate } from "../../funcs/agentsDuplicate.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.DuplicateAgentRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$agentsDuplicate: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "agents-duplicate",
|
|
15
|
+
description: `Duplicate an existing agent
|
|
16
|
+
|
|
17
|
+
Creates a copy of an existing agent with a new unique key. The duplicated agent will have all the same configuration as the original, including model settings, instructions, tools, and knowledge bases.`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await agentsDuplicate(
|
|
21
|
+
client,
|
|
22
|
+
args.request,
|
|
23
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
24
|
+
).$inspect();
|
|
25
|
+
|
|
26
|
+
if (!result.ok) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: result.error.message }],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const value = result.value;
|
|
34
|
+
|
|
35
|
+
return formatResult(value, apiCall);
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -14,7 +14,7 @@ export const tool$agentsList: ToolDefinition<typeof args> = {
|
|
|
14
14
|
name: "agents-list",
|
|
15
15
|
description: `List all agents
|
|
16
16
|
|
|
17
|
-
Retrieves a
|
|
17
|
+
Retrieves a list of all agents in your workspace. When no limit is provided, returns all agents without pagination. When a limit is specified, returns a paginated list. Each agent includes its configuration, primary model, and optional fallback model settings.`,
|
|
18
18
|
args,
|
|
19
19
|
tool: async (client, args, ctx) => {
|
|
20
20
|
const [result, apiCall] = await agentsList(
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { OrqError } from "./orqerror.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Agent with generated key already exists
|
|
10
|
+
*/
|
|
11
|
+
export type DuplicateAgentAgentsResponseBodyData = {
|
|
12
|
+
message: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Agent with generated key already exists
|
|
17
|
+
*/
|
|
18
|
+
export class DuplicateAgentAgentsResponseBody extends OrqError {
|
|
19
|
+
/** The original data that was passed to this error instance. */
|
|
20
|
+
data$: DuplicateAgentAgentsResponseBodyData;
|
|
21
|
+
|
|
22
|
+
constructor(
|
|
23
|
+
err: DuplicateAgentAgentsResponseBodyData,
|
|
24
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
25
|
+
) {
|
|
26
|
+
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
27
|
+
super(message, httpMeta);
|
|
28
|
+
this.data$ = err;
|
|
29
|
+
|
|
30
|
+
this.name = "DuplicateAgentAgentsResponseBody";
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Agent not found
|
|
36
|
+
*/
|
|
37
|
+
export type DuplicateAgentResponseBodyData = {
|
|
38
|
+
message: string;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Agent not found
|
|
43
|
+
*/
|
|
44
|
+
export class DuplicateAgentResponseBody extends OrqError {
|
|
45
|
+
/** The original data that was passed to this error instance. */
|
|
46
|
+
data$: DuplicateAgentResponseBodyData;
|
|
47
|
+
|
|
48
|
+
constructor(
|
|
49
|
+
err: DuplicateAgentResponseBodyData,
|
|
50
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
51
|
+
) {
|
|
52
|
+
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
53
|
+
super(message, httpMeta);
|
|
54
|
+
this.data$ = err;
|
|
55
|
+
|
|
56
|
+
this.name = "DuplicateAgentResponseBody";
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
export const DuplicateAgentAgentsResponseBody$inboundSchema: z.ZodType<
|
|
62
|
+
DuplicateAgentAgentsResponseBody,
|
|
63
|
+
z.ZodTypeDef,
|
|
64
|
+
unknown
|
|
65
|
+
> = z.object({
|
|
66
|
+
message: z.string(),
|
|
67
|
+
request$: z.instanceof(Request),
|
|
68
|
+
response$: z.instanceof(Response),
|
|
69
|
+
body$: z.string(),
|
|
70
|
+
})
|
|
71
|
+
.transform((v) => {
|
|
72
|
+
return new DuplicateAgentAgentsResponseBody(v, {
|
|
73
|
+
request: v.request$,
|
|
74
|
+
response: v.response$,
|
|
75
|
+
body: v.body$,
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
/** @internal */
|
|
80
|
+
export type DuplicateAgentAgentsResponseBody$Outbound = {
|
|
81
|
+
message: string;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/** @internal */
|
|
85
|
+
export const DuplicateAgentAgentsResponseBody$outboundSchema: z.ZodType<
|
|
86
|
+
DuplicateAgentAgentsResponseBody$Outbound,
|
|
87
|
+
z.ZodTypeDef,
|
|
88
|
+
DuplicateAgentAgentsResponseBody
|
|
89
|
+
> = z.instanceof(DuplicateAgentAgentsResponseBody)
|
|
90
|
+
.transform(v => v.data$)
|
|
91
|
+
.pipe(z.object({
|
|
92
|
+
message: z.string(),
|
|
93
|
+
}));
|
|
94
|
+
|
|
95
|
+
/** @internal */
|
|
96
|
+
export const DuplicateAgentResponseBody$inboundSchema: z.ZodType<
|
|
97
|
+
DuplicateAgentResponseBody,
|
|
98
|
+
z.ZodTypeDef,
|
|
99
|
+
unknown
|
|
100
|
+
> = z.object({
|
|
101
|
+
message: z.string(),
|
|
102
|
+
request$: z.instanceof(Request),
|
|
103
|
+
response$: z.instanceof(Response),
|
|
104
|
+
body$: z.string(),
|
|
105
|
+
})
|
|
106
|
+
.transform((v) => {
|
|
107
|
+
return new DuplicateAgentResponseBody(v, {
|
|
108
|
+
request: v.request$,
|
|
109
|
+
response: v.response$,
|
|
110
|
+
body: v.body$,
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
/** @internal */
|
|
115
|
+
export type DuplicateAgentResponseBody$Outbound = {
|
|
116
|
+
message: string;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/** @internal */
|
|
120
|
+
export const DuplicateAgentResponseBody$outboundSchema: z.ZodType<
|
|
121
|
+
DuplicateAgentResponseBody$Outbound,
|
|
122
|
+
z.ZodTypeDef,
|
|
123
|
+
DuplicateAgentResponseBody
|
|
124
|
+
> = z.instanceof(DuplicateAgentResponseBody)
|
|
125
|
+
.transform(v => v.data$)
|
|
126
|
+
.pipe(z.object({
|
|
127
|
+
message: z.string(),
|
|
128
|
+
}));
|
|
@@ -8,6 +8,7 @@ export * from "./createeval.js";
|
|
|
8
8
|
export * from "./deleteagent.js";
|
|
9
9
|
export * from "./deletecontact.js";
|
|
10
10
|
export * from "./deleteeval.js";
|
|
11
|
+
export * from "./duplicateagent.js";
|
|
11
12
|
export * from "./duplicatetool.js";
|
|
12
13
|
export * from "./getagent.js";
|
|
13
14
|
export * from "./getagenttask.js";
|
|
@@ -1106,7 +1106,7 @@ export type CreateAgentRequestBody = {
|
|
|
1106
1106
|
*/
|
|
1107
1107
|
settings: Settings;
|
|
1108
1108
|
/**
|
|
1109
|
-
* Optional array of memory store
|
|
1109
|
+
* Optional array of memory store identifiers for the agent to access. Accepts both memory store IDs and keys.
|
|
1110
1110
|
*/
|
|
1111
1111
|
memoryStores?: Array<string> | undefined;
|
|
1112
1112
|
/**
|
|
@@ -1117,6 +1117,7 @@ export type CreateAgentRequestBody = {
|
|
|
1117
1117
|
* The agents that are accessible to this orchestrator. The main agent can hand off to these agents to perform tasks.
|
|
1118
1118
|
*/
|
|
1119
1119
|
teamOfAgents?: Array<TeamOfAgents> | undefined;
|
|
1120
|
+
variables?: { [k: string]: any } | undefined;
|
|
1120
1121
|
};
|
|
1121
1122
|
|
|
1122
1123
|
/**
|
|
@@ -1908,14 +1909,16 @@ export type CreateAgentKnowledgeBases = {
|
|
|
1908
1909
|
knowledgeId: string;
|
|
1909
1910
|
};
|
|
1910
1911
|
|
|
1911
|
-
export const
|
|
1912
|
+
export const CreateAgentCollapsedConfigurationSections = {
|
|
1913
|
+
Information: "information",
|
|
1912
1914
|
Model: "model",
|
|
1913
1915
|
Tools: "tools",
|
|
1914
|
-
|
|
1915
|
-
Variables: "variables",
|
|
1916
|
+
Context: "context",
|
|
1916
1917
|
RuntimeConstraints: "runtime_constraints",
|
|
1917
1918
|
} as const;
|
|
1918
|
-
export type
|
|
1919
|
+
export type CreateAgentCollapsedConfigurationSections = ClosedEnum<
|
|
1920
|
+
typeof CreateAgentCollapsedConfigurationSections
|
|
1921
|
+
>;
|
|
1919
1922
|
|
|
1920
1923
|
/**
|
|
1921
1924
|
* Agent created successfully
|
|
@@ -1950,6 +1953,9 @@ export type CreateAgentResponseBody = {
|
|
|
1950
1953
|
* With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
|
|
1951
1954
|
*/
|
|
1952
1955
|
path: string;
|
|
1956
|
+
/**
|
|
1957
|
+
* Array of memory store identifiers. Accepts both memory store IDs and keys.
|
|
1958
|
+
*/
|
|
1953
1959
|
memoryStores: Array<string>;
|
|
1954
1960
|
/**
|
|
1955
1961
|
* The agents that are accessible to this orchestrator. The main agent can hand off to these agents to perform tasks.
|
|
@@ -1965,9 +1971,11 @@ export type CreateAgentResponseBody = {
|
|
|
1965
1971
|
*/
|
|
1966
1972
|
knowledgeBases?: Array<CreateAgentKnowledgeBases> | undefined;
|
|
1967
1973
|
/**
|
|
1968
|
-
* List of
|
|
1974
|
+
* List of collapsed sections in configuration. Duplicates are not allowed.
|
|
1969
1975
|
*/
|
|
1970
|
-
|
|
1976
|
+
collapsedConfigurationSections?:
|
|
1977
|
+
| Array<CreateAgentCollapsedConfigurationSections>
|
|
1978
|
+
| undefined;
|
|
1971
1979
|
};
|
|
1972
1980
|
|
|
1973
1981
|
/** @internal */
|
|
@@ -4835,6 +4843,7 @@ export const CreateAgentRequestBody$inboundSchema: z.ZodType<
|
|
|
4835
4843
|
knowledge_bases: z.array(z.lazy(() => KnowledgeBases$inboundSchema))
|
|
4836
4844
|
.optional(),
|
|
4837
4845
|
team_of_agents: z.array(z.lazy(() => TeamOfAgents$inboundSchema)).optional(),
|
|
4846
|
+
variables: z.record(z.any()).optional(),
|
|
4838
4847
|
}).transform((v) => {
|
|
4839
4848
|
return remap$(v, {
|
|
4840
4849
|
"system_prompt": "systemPrompt",
|
|
@@ -4860,6 +4869,7 @@ export type CreateAgentRequestBody$Outbound = {
|
|
|
4860
4869
|
memory_stores?: Array<string> | undefined;
|
|
4861
4870
|
knowledge_bases?: Array<KnowledgeBases$Outbound> | undefined;
|
|
4862
4871
|
team_of_agents?: Array<TeamOfAgents$Outbound> | undefined;
|
|
4872
|
+
variables?: { [k: string]: any } | undefined;
|
|
4863
4873
|
};
|
|
4864
4874
|
|
|
4865
4875
|
/** @internal */
|
|
@@ -4889,6 +4899,7 @@ export const CreateAgentRequestBody$outboundSchema: z.ZodType<
|
|
|
4889
4899
|
knowledgeBases: z.array(z.lazy(() => KnowledgeBases$outboundSchema))
|
|
4890
4900
|
.optional(),
|
|
4891
4901
|
teamOfAgents: z.array(z.lazy(() => TeamOfAgents$outboundSchema)).optional(),
|
|
4902
|
+
variables: z.record(z.any()).optional(),
|
|
4892
4903
|
}).transform((v) => {
|
|
4893
4904
|
return remap$(v, {
|
|
4894
4905
|
systemPrompt: "system_prompt",
|
|
@@ -7141,11 +7152,13 @@ export function createAgentKnowledgeBasesFromJSON(
|
|
|
7141
7152
|
}
|
|
7142
7153
|
|
|
7143
7154
|
/** @internal */
|
|
7144
|
-
export const
|
|
7145
|
-
z.
|
|
7155
|
+
export const CreateAgentCollapsedConfigurationSections$inboundSchema:
|
|
7156
|
+
z.ZodNativeEnum<typeof CreateAgentCollapsedConfigurationSections> = z
|
|
7157
|
+
.nativeEnum(CreateAgentCollapsedConfigurationSections);
|
|
7146
7158
|
/** @internal */
|
|
7147
|
-
export const
|
|
7148
|
-
|
|
7159
|
+
export const CreateAgentCollapsedConfigurationSections$outboundSchema:
|
|
7160
|
+
z.ZodNativeEnum<typeof CreateAgentCollapsedConfigurationSections> =
|
|
7161
|
+
CreateAgentCollapsedConfigurationSections$inboundSchema;
|
|
7149
7162
|
|
|
7150
7163
|
/** @internal */
|
|
7151
7164
|
export const CreateAgentResponseBody$inboundSchema: z.ZodType<
|
|
@@ -7177,7 +7190,9 @@ export const CreateAgentResponseBody$inboundSchema: z.ZodType<
|
|
|
7177
7190
|
knowledge_bases: z.array(
|
|
7178
7191
|
z.lazy(() => CreateAgentKnowledgeBases$inboundSchema),
|
|
7179
7192
|
).optional(),
|
|
7180
|
-
|
|
7193
|
+
collapsed_configuration_sections: z.array(
|
|
7194
|
+
CreateAgentCollapsedConfigurationSections$inboundSchema,
|
|
7195
|
+
).optional(),
|
|
7181
7196
|
}).transform((v) => {
|
|
7182
7197
|
return remap$(v, {
|
|
7183
7198
|
"_id": "id",
|
|
@@ -7190,7 +7205,7 @@ export const CreateAgentResponseBody$inboundSchema: z.ZodType<
|
|
|
7190
7205
|
"memory_stores": "memoryStores",
|
|
7191
7206
|
"team_of_agents": "teamOfAgents",
|
|
7192
7207
|
"knowledge_bases": "knowledgeBases",
|
|
7193
|
-
"
|
|
7208
|
+
"collapsed_configuration_sections": "collapsedConfigurationSections",
|
|
7194
7209
|
});
|
|
7195
7210
|
});
|
|
7196
7211
|
/** @internal */
|
|
@@ -7217,7 +7232,7 @@ export type CreateAgentResponseBody$Outbound = {
|
|
|
7217
7232
|
metrics?: Metrics$Outbound | undefined;
|
|
7218
7233
|
variables?: { [k: string]: any } | undefined;
|
|
7219
7234
|
knowledge_bases?: Array<CreateAgentKnowledgeBases$Outbound> | undefined;
|
|
7220
|
-
|
|
7235
|
+
collapsed_configuration_sections?: Array<string> | undefined;
|
|
7221
7236
|
};
|
|
7222
7237
|
|
|
7223
7238
|
/** @internal */
|
|
@@ -7250,7 +7265,9 @@ export const CreateAgentResponseBody$outboundSchema: z.ZodType<
|
|
|
7250
7265
|
knowledgeBases: z.array(
|
|
7251
7266
|
z.lazy(() => CreateAgentKnowledgeBases$outboundSchema),
|
|
7252
7267
|
).optional(),
|
|
7253
|
-
|
|
7268
|
+
collapsedConfigurationSections: z.array(
|
|
7269
|
+
CreateAgentCollapsedConfigurationSections$outboundSchema,
|
|
7270
|
+
).optional(),
|
|
7254
7271
|
}).transform((v) => {
|
|
7255
7272
|
return remap$(v, {
|
|
7256
7273
|
id: "_id",
|
|
@@ -7263,7 +7280,7 @@ export const CreateAgentResponseBody$outboundSchema: z.ZodType<
|
|
|
7263
7280
|
memoryStores: "memory_stores",
|
|
7264
7281
|
teamOfAgents: "team_of_agents",
|
|
7265
7282
|
knowledgeBases: "knowledge_bases",
|
|
7266
|
-
|
|
7283
|
+
collapsedConfigurationSections: "collapsed_configuration_sections",
|
|
7267
7284
|
});
|
|
7268
7285
|
});
|
|
7269
7286
|
|
|
@@ -516,7 +516,7 @@ export const CreateBudgetResponseBody$inboundSchema: z.ZodType<
|
|
|
516
516
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
517
517
|
.optional(),
|
|
518
518
|
updated: z.string().datetime({ offset: true }).default(
|
|
519
|
-
"2025-11-
|
|
519
|
+
"2025-11-11T11:23:16.586Z",
|
|
520
520
|
).transform(v => new Date(v)),
|
|
521
521
|
}).transform((v) => {
|
|
522
522
|
return remap$(v, {
|
|
@@ -553,7 +553,7 @@ export const CreateBudgetResponseBody$outboundSchema: z.ZodType<
|
|
|
553
553
|
isActive: z.boolean(),
|
|
554
554
|
consumption: z.lazy(() => Consumption$outboundSchema).optional(),
|
|
555
555
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
556
|
-
updated: z.date().default(() => new Date("2025-11-
|
|
556
|
+
updated: z.date().default(() => new Date("2025-11-11T11:23:16.586Z"))
|
|
557
557
|
.transform(v => v.toISOString()),
|
|
558
558
|
}).transform((v) => {
|
|
559
559
|
return remap$(v, {
|
|
@@ -167,7 +167,7 @@ export const CreateContactResponseBody$inboundSchema: z.ZodType<
|
|
|
167
167
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
168
168
|
.optional(),
|
|
169
169
|
updated: z.string().datetime({ offset: true }).default(
|
|
170
|
-
"2025-11-
|
|
170
|
+
"2025-11-11T11:23:16.262Z",
|
|
171
171
|
).transform(v => new Date(v)),
|
|
172
172
|
}).transform((v) => {
|
|
173
173
|
return remap$(v, {
|
|
@@ -207,7 +207,7 @@ export const CreateContactResponseBody$outboundSchema: z.ZodType<
|
|
|
207
207
|
tags: z.array(z.string()).optional(),
|
|
208
208
|
metadata: z.record(z.any()).optional(),
|
|
209
209
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
210
|
-
updated: z.date().default(() => new Date("2025-11-
|
|
210
|
+
updated: z.date().default(() => new Date("2025-11-11T11:23:16.262Z"))
|
|
211
211
|
.transform(v => v.toISOString()),
|
|
212
212
|
}).transform((v) => {
|
|
213
213
|
return remap$(v, {
|
|
@@ -187,7 +187,7 @@ export const CreateDatasetResponseBody$inboundSchema: z.ZodType<
|
|
|
187
187
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
188
188
|
.optional(),
|
|
189
189
|
updated: z.string().datetime({ offset: true }).default(
|
|
190
|
-
"2025-11-
|
|
190
|
+
"2025-11-11T11:23:16.262Z",
|
|
191
191
|
).transform(v => new Date(v)),
|
|
192
192
|
}).transform((v) => {
|
|
193
193
|
return remap$(v, {
|
|
@@ -226,7 +226,7 @@ export const CreateDatasetResponseBody$outboundSchema: z.ZodType<
|
|
|
226
226
|
createdById: z.string().optional(),
|
|
227
227
|
updatedById: z.string().optional(),
|
|
228
228
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
229
|
-
updated: z.date().default(() => new Date("2025-11-
|
|
229
|
+
updated: z.date().default(() => new Date("2025-11-11T11:23:16.262Z"))
|
|
230
230
|
.transform(v => v.toISOString()),
|
|
231
231
|
}).transform((v) => {
|
|
232
232
|
return remap$(v, {
|