@orq-ai/node 3.13.3 → 3.13.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 +216 -246
- package/bin/mcp-server.js.map +42 -42
- package/docs/sdks/agents/README.md +3 -3
- package/examples/package-lock.json +1 -1
- package/funcs/agentsRetrieveTask.js +2 -2
- package/funcs/agentsRetrieveTask.js.map +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 +2 -2
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +28 -28
- package/models/operations/createtool.js +14 -14
- 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/getagent.d.ts +5 -2
- package/models/operations/getagent.d.ts.map +1 -1
- package/models/operations/getagent.js +4 -12
- package/models/operations/getagent.js.map +1 -1
- package/models/operations/getagenttask.d.ts +2 -2
- package/models/operations/getagenttask.d.ts.map +1 -1
- package/models/operations/getagenttask.js +4 -2
- package/models/operations/getagenttask.js.map +1 -1
- package/models/operations/getalltools.js +10 -10
- package/models/operations/getbudget.js +2 -2
- package/models/operations/getevals.js +28 -28
- package/models/operations/listagents.d.ts +5 -2
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js +4 -12
- package/models/operations/listagents.js.map +1 -1
- package/models/operations/listbudgets.js +2 -2
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +2 -2
- 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 +2 -2
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/retrievetool.js +10 -10
- package/models/operations/runagent.d.ts +5 -2
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +4 -12
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamrunagent.d.ts +5 -2
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +4 -12
- 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 +2 -2
- 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 +102 -93
- package/packages/orq-rc/docs/sdks/agents/README.md +97 -22
- package/packages/orq-rc/docs/sdks/knowledge/README.md +228 -0
- package/packages/orq-rc/docs/sdks/tools/README.md +14 -16
- 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/agentsListTasks.ts +183 -0
- package/packages/orq-rc/src/funcs/agentsRetrieve.ts +3 -3
- package/packages/orq-rc/src/funcs/agentsRetrieveTask.ts +2 -2
- package/packages/orq-rc/src/funcs/knowledgeDeleteChunks.ts +170 -0
- package/packages/orq-rc/src/funcs/knowledgeGetChunksCount.ts +170 -0
- package/packages/orq-rc/src/funcs/knowledgeListChunksPaginated.ts +171 -0
- package/packages/orq-rc/src/funcs/toolsDelete.ts +2 -2
- package/packages/orq-rc/src/funcs/toolsDuplicate.ts +3 -3
- package/packages/orq-rc/src/funcs/toolsRetrieve.ts +3 -3
- package/packages/orq-rc/src/funcs/toolsUpdate.ts +2 -2
- 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 +10 -2
- package/packages/orq-rc/src/mcp-server/tools/agentsListTasks.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieve.ts +1 -1
- package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteChunks.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/knowledgeGetChunksCount.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/knowledgeListChunksPaginated.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/toolsDuplicate.ts +1 -1
- package/packages/orq-rc/src/mcp-server/tools/toolsRetrieve.ts +1 -1
- package/packages/orq-rc/src/models/errors/index.ts +1 -0
- package/packages/orq-rc/src/models/errors/listagenttasks.ts +80 -0
- 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 +2 -2
- 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 +8 -0
- package/packages/orq-rc/src/models/operations/createtool.ts +10 -22
- package/packages/orq-rc/src/models/operations/deletechunks.ts +243 -0
- package/packages/orq-rc/src/models/operations/deletetool.ts +6 -6
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +4 -0
- package/packages/orq-rc/src/models/operations/deployments.ts +4 -0
- package/packages/orq-rc/src/models/operations/duplicatetool.ts +23 -15
- 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 +30 -27
- package/packages/orq-rc/src/models/operations/getagenttask.ts +6 -4
- package/packages/orq-rc/src/models/operations/getallprompts.ts +4 -0
- package/packages/orq-rc/src/models/operations/getalltools.ts +10 -10
- package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/getchunkscount.ts +230 -0
- package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
- package/packages/orq-rc/src/models/operations/getoneprompt.ts +4 -0
- package/packages/orq-rc/src/models/operations/getpromptversion.ts +4 -0
- package/packages/orq-rc/src/models/operations/index.ts +4 -0
- package/packages/orq-rc/src/models/operations/listagents.ts +17 -22
- package/packages/orq-rc/src/models/operations/listagenttasks.ts +1099 -0
- package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listchunks.ts +21 -21
- package/packages/orq-rc/src/models/operations/listchunkspaginated.ts +507 -0
- package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasources.ts +29 -22
- package/packages/orq-rc/src/models/operations/listpromptversions.ts +4 -0
- package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
- 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 +16 -16
- package/packages/orq-rc/src/models/operations/runagent.ts +7 -18
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +7 -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 +2 -2
- 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 +8 -0
- package/packages/orq-rc/src/models/operations/updatetool.ts +44 -28
- package/packages/orq-rc/src/sdk/agents.ts +25 -7
- package/packages/orq-rc/src/sdk/knowledge.ts +45 -0
- package/packages/orq-rc/src/sdk/tools.ts +2 -2
- package/src/funcs/agentsRetrieveTask.ts +2 -2
- 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 +2 -2
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +28 -28
- package/src/models/operations/createtool.ts +14 -14
- 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/getagent.ts +9 -14
- package/src/models/operations/getagenttask.ts +6 -4
- 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/listagents.ts +9 -14
- package/src/models/operations/listbudgets.ts +2 -2
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +2 -2
- 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 +2 -2
- 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/runagent.ts +9 -14
- package/src/models/operations/streamrunagent.ts +9 -14
- package/src/models/operations/updatebudget.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +2 -2
- 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
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { OrqCore } from "../core.js";
|
|
6
|
+
import { encodeJSON, 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 { OrqError } from "../models/errors/orqerror.js";
|
|
21
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
+
import * as operations from "../models/operations/index.js";
|
|
24
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
25
|
+
import { Result } from "../types/fp.js";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* List chunks with offset-based pagination
|
|
29
|
+
*/
|
|
30
|
+
export function knowledgeListChunksPaginated(
|
|
31
|
+
client: OrqCore,
|
|
32
|
+
request: operations.ListChunksPaginatedRequest,
|
|
33
|
+
options?: RequestOptions,
|
|
34
|
+
): APIPromise<
|
|
35
|
+
Result<
|
|
36
|
+
operations.ListChunksPaginatedResponseBody,
|
|
37
|
+
| OrqError
|
|
38
|
+
| ResponseValidationError
|
|
39
|
+
| ConnectionError
|
|
40
|
+
| RequestAbortedError
|
|
41
|
+
| RequestTimeoutError
|
|
42
|
+
| InvalidRequestError
|
|
43
|
+
| UnexpectedClientError
|
|
44
|
+
| SDKValidationError
|
|
45
|
+
>
|
|
46
|
+
> {
|
|
47
|
+
return new APIPromise($do(
|
|
48
|
+
client,
|
|
49
|
+
request,
|
|
50
|
+
options,
|
|
51
|
+
));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
async function $do(
|
|
55
|
+
client: OrqCore,
|
|
56
|
+
request: operations.ListChunksPaginatedRequest,
|
|
57
|
+
options?: RequestOptions,
|
|
58
|
+
): Promise<
|
|
59
|
+
[
|
|
60
|
+
Result<
|
|
61
|
+
operations.ListChunksPaginatedResponseBody,
|
|
62
|
+
| OrqError
|
|
63
|
+
| ResponseValidationError
|
|
64
|
+
| ConnectionError
|
|
65
|
+
| RequestAbortedError
|
|
66
|
+
| RequestTimeoutError
|
|
67
|
+
| InvalidRequestError
|
|
68
|
+
| UnexpectedClientError
|
|
69
|
+
| SDKValidationError
|
|
70
|
+
>,
|
|
71
|
+
APICall,
|
|
72
|
+
]
|
|
73
|
+
> {
|
|
74
|
+
const parsed = safeParse(
|
|
75
|
+
request,
|
|
76
|
+
(value) =>
|
|
77
|
+
operations.ListChunksPaginatedRequest$outboundSchema.parse(value),
|
|
78
|
+
"Input validation failed",
|
|
79
|
+
);
|
|
80
|
+
if (!parsed.ok) {
|
|
81
|
+
return [parsed, { status: "invalid" }];
|
|
82
|
+
}
|
|
83
|
+
const payload = parsed.value;
|
|
84
|
+
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
85
|
+
|
|
86
|
+
const pathParams = {
|
|
87
|
+
datasource_id: encodeSimple("datasource_id", payload.datasource_id, {
|
|
88
|
+
explode: false,
|
|
89
|
+
charEncoding: "percent",
|
|
90
|
+
}),
|
|
91
|
+
knowledge_id: encodeSimple("knowledge_id", payload.knowledge_id, {
|
|
92
|
+
explode: false,
|
|
93
|
+
charEncoding: "percent",
|
|
94
|
+
}),
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
const path = pathToFunc(
|
|
98
|
+
"/v2/knowledge/{knowledge_id}/datasources/{datasource_id}/chunks/list",
|
|
99
|
+
)(pathParams);
|
|
100
|
+
|
|
101
|
+
const headers = new Headers(compactMap({
|
|
102
|
+
"Content-Type": "application/json",
|
|
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: "ListChunksPaginated",
|
|
114
|
+
oAuth2Scopes: [],
|
|
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: ["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 [result] = await M.match<
|
|
152
|
+
operations.ListChunksPaginatedResponseBody,
|
|
153
|
+
| OrqError
|
|
154
|
+
| ResponseValidationError
|
|
155
|
+
| ConnectionError
|
|
156
|
+
| RequestAbortedError
|
|
157
|
+
| RequestTimeoutError
|
|
158
|
+
| InvalidRequestError
|
|
159
|
+
| UnexpectedClientError
|
|
160
|
+
| SDKValidationError
|
|
161
|
+
>(
|
|
162
|
+
M.json(200, operations.ListChunksPaginatedResponseBody$inboundSchema),
|
|
163
|
+
M.fail("4XX"),
|
|
164
|
+
M.fail("5XX"),
|
|
165
|
+
)(response, req);
|
|
166
|
+
if (!result.ok) {
|
|
167
|
+
return [result, { status: "complete", request: req, response }];
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return [result, { status: "complete", request: req, response }];
|
|
171
|
+
}
|
|
@@ -87,13 +87,13 @@ async function $do(
|
|
|
87
87
|
const body = null;
|
|
88
88
|
|
|
89
89
|
const pathParams = {
|
|
90
|
-
|
|
90
|
+
tool_id: encodeSimple("tool_id", payload.tool_id, {
|
|
91
91
|
explode: false,
|
|
92
92
|
charEncoding: "percent",
|
|
93
93
|
}),
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
-
const path = pathToFunc("/v2/tools/{
|
|
96
|
+
const path = pathToFunc("/v2/tools/{tool_id}")(pathParams);
|
|
97
97
|
|
|
98
98
|
const headers = new Headers(compactMap({
|
|
99
99
|
Accept: "*/*",
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* Duplicate tool
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Creates a copy of an existing tool with a new
|
|
32
|
+
* Creates a copy of an existing tool with a new id and ID.
|
|
33
33
|
*/
|
|
34
34
|
export function toolsDuplicate(
|
|
35
35
|
client: OrqCore,
|
|
@@ -89,13 +89,13 @@ async function $do(
|
|
|
89
89
|
const body = null;
|
|
90
90
|
|
|
91
91
|
const pathParams = {
|
|
92
|
-
|
|
92
|
+
tool_id: encodeSimple("tool_id", payload.tool_id, {
|
|
93
93
|
explode: false,
|
|
94
94
|
charEncoding: "percent",
|
|
95
95
|
}),
|
|
96
96
|
};
|
|
97
97
|
|
|
98
|
-
const path = pathToFunc("/v2/tools/{
|
|
98
|
+
const path = pathToFunc("/v2/tools/{tool_id}/duplicate")(pathParams);
|
|
99
99
|
|
|
100
100
|
const headers = new Headers(compactMap({
|
|
101
101
|
Accept: "application/json",
|
|
@@ -28,7 +28,7 @@ import { Result } from "../types/fp.js";
|
|
|
28
28
|
* Retrieve tool
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
|
-
* Retrieves a tool by
|
|
31
|
+
* Retrieves a tool by id.
|
|
32
32
|
*/
|
|
33
33
|
export function toolsRetrieve(
|
|
34
34
|
client: OrqCore,
|
|
@@ -86,13 +86,13 @@ async function $do(
|
|
|
86
86
|
const body = null;
|
|
87
87
|
|
|
88
88
|
const pathParams = {
|
|
89
|
-
|
|
89
|
+
tool_id: encodeSimple("tool_id", payload.tool_id, {
|
|
90
90
|
explode: false,
|
|
91
91
|
charEncoding: "percent",
|
|
92
92
|
}),
|
|
93
93
|
};
|
|
94
94
|
|
|
95
|
-
const path = pathToFunc("/v2/tools/{
|
|
95
|
+
const path = pathToFunc("/v2/tools/{tool_id}")(pathParams);
|
|
96
96
|
|
|
97
97
|
const headers = new Headers(compactMap({
|
|
98
98
|
Accept: "application/json",
|
|
@@ -89,13 +89,13 @@ async function $do(
|
|
|
89
89
|
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
90
90
|
|
|
91
91
|
const pathParams = {
|
|
92
|
-
|
|
92
|
+
tool_id: encodeSimple("tool_id", payload.tool_id, {
|
|
93
93
|
explode: false,
|
|
94
94
|
charEncoding: "percent",
|
|
95
95
|
}),
|
|
96
96
|
};
|
|
97
97
|
|
|
98
|
-
const path = pathToFunc("/v2/tools/{
|
|
98
|
+
const path = pathToFunc("/v2/tools/{tool_id}")(pathParams);
|
|
99
99
|
|
|
100
100
|
const headers = new Headers(compactMap({
|
|
101
101
|
"Content-Type": "application/json",
|
|
@@ -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: "3.14.0-rc.
|
|
72
|
-
genVersion: "2.
|
|
73
|
-
userAgent: "speakeasy-sdk/typescript 3.14.0-rc.
|
|
71
|
+
sdkVersion: "3.14.0-rc.7",
|
|
72
|
+
genVersion: "2.721.0",
|
|
73
|
+
userAgent: "speakeasy-sdk/typescript 3.14.0-rc.7 2.721.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$agentsList } from "./tools/agentsList.js";
|
|
17
17
|
import { tool$agentsListActions } from "./tools/agentsListActions.js";
|
|
18
|
+
import { tool$agentsListTasks } from "./tools/agentsListTasks.js";
|
|
18
19
|
import { tool$agentsRetrieve } from "./tools/agentsRetrieve.js";
|
|
19
20
|
import { tool$agentsRetrieveAction } from "./tools/agentsRetrieveAction.js";
|
|
20
21
|
import { tool$agentsRetrieveTask } from "./tools/agentsRetrieveTask.js";
|
|
@@ -99,9 +100,12 @@ import { tool$knowledgeCreateChunks } from "./tools/knowledgeCreateChunks.js";
|
|
|
99
100
|
import { tool$knowledgeCreateDatasource } from "./tools/knowledgeCreateDatasource.js";
|
|
100
101
|
import { tool$knowledgeDelete } from "./tools/knowledgeDelete.js";
|
|
101
102
|
import { tool$knowledgeDeleteChunk } from "./tools/knowledgeDeleteChunk.js";
|
|
103
|
+
import { tool$knowledgeDeleteChunks } from "./tools/knowledgeDeleteChunks.js";
|
|
102
104
|
import { tool$knowledgeDeleteDatasource } from "./tools/knowledgeDeleteDatasource.js";
|
|
105
|
+
import { tool$knowledgeGetChunksCount } from "./tools/knowledgeGetChunksCount.js";
|
|
103
106
|
import { tool$knowledgeList } from "./tools/knowledgeList.js";
|
|
104
107
|
import { tool$knowledgeListChunks } from "./tools/knowledgeListChunks.js";
|
|
108
|
+
import { tool$knowledgeListChunksPaginated } from "./tools/knowledgeListChunksPaginated.js";
|
|
105
109
|
import { tool$knowledgeListDatasources } from "./tools/knowledgeListDatasources.js";
|
|
106
110
|
import { tool$knowledgeRetrieve } from "./tools/knowledgeRetrieve.js";
|
|
107
111
|
import { tool$knowledgeRetrieveChunk } from "./tools/knowledgeRetrieveChunk.js";
|
|
@@ -153,7 +157,7 @@ export function createMCPServer(deps: {
|
|
|
153
157
|
}) {
|
|
154
158
|
const server = new McpServer({
|
|
155
159
|
name: "Orq",
|
|
156
|
-
version: "3.14.0-rc.
|
|
160
|
+
version: "3.14.0-rc.7",
|
|
157
161
|
});
|
|
158
162
|
|
|
159
163
|
const client = new OrqCore({
|
|
@@ -195,9 +199,10 @@ export function createMCPServer(deps: {
|
|
|
195
199
|
tool(tool$deploymentsGetConfig);
|
|
196
200
|
tool(tool$deploymentsInvoke);
|
|
197
201
|
tool(tool$deploymentsStream);
|
|
202
|
+
tool(tool$agentsRetrieveTask);
|
|
198
203
|
tool(tool$agentsList);
|
|
199
204
|
tool(tool$agentsRetrieve);
|
|
200
|
-
tool(tool$
|
|
205
|
+
tool(tool$agentsListTasks);
|
|
201
206
|
tool(tool$agentsRun);
|
|
202
207
|
tool(tool$agentsStreamRun);
|
|
203
208
|
tool(tool$agentsListActions);
|
|
@@ -254,6 +259,9 @@ export function createMCPServer(deps: {
|
|
|
254
259
|
tool(tool$knowledgeUpdateDatasource);
|
|
255
260
|
tool(tool$knowledgeCreateChunks);
|
|
256
261
|
tool(tool$knowledgeListChunks);
|
|
262
|
+
tool(tool$knowledgeDeleteChunks);
|
|
263
|
+
tool(tool$knowledgeListChunksPaginated);
|
|
264
|
+
tool(tool$knowledgeGetChunksCount);
|
|
257
265
|
tool(tool$knowledgeUpdateChunk);
|
|
258
266
|
tool(tool$knowledgeDeleteChunk);
|
|
259
267
|
tool(tool$knowledgeRetrieveChunk);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { agentsListTasks } from "../../funcs/agentsListTasks.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.ListAgentTasksRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$agentsListTasks: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "agents-list-tasks",
|
|
15
|
+
description: `List all tasks for an agent
|
|
16
|
+
|
|
17
|
+
Retrieves a paginated list of all tasks associated with a specific agent, optionally filtered by status.`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await agentsListTasks(
|
|
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$agentsRetrieve: ToolDefinition<typeof args> = {
|
|
|
14
14
|
name: "agents-retrieve",
|
|
15
15
|
description: `Get an agent
|
|
16
16
|
|
|
17
|
-
Retrieves a single agent by
|
|
17
|
+
Retrieves a single agent by its unique key, including its full configuration with primary and fallback model settings.`,
|
|
18
18
|
args,
|
|
19
19
|
tool: async (client, args, ctx) => {
|
|
20
20
|
const [result, apiCall] = await agentsRetrieve(
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { knowledgeDeleteChunks } from "../../funcs/knowledgeDeleteChunks.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.DeleteChunksRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$knowledgeDeleteChunks: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "knowledge-delete-chunks",
|
|
15
|
+
description: `Delete multiple chunks`,
|
|
16
|
+
args,
|
|
17
|
+
tool: async (client, args, ctx) => {
|
|
18
|
+
const [result, apiCall] = await knowledgeDeleteChunks(
|
|
19
|
+
client,
|
|
20
|
+
args.request,
|
|
21
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
22
|
+
).$inspect();
|
|
23
|
+
|
|
24
|
+
if (!result.ok) {
|
|
25
|
+
return {
|
|
26
|
+
content: [{ type: "text", text: result.error.message }],
|
|
27
|
+
isError: true,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const value = result.value;
|
|
32
|
+
|
|
33
|
+
return formatResult(value, apiCall);
|
|
34
|
+
},
|
|
35
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { knowledgeGetChunksCount } from "../../funcs/knowledgeGetChunksCount.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.GetChunksCountRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$knowledgeGetChunksCount: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "knowledge-get-chunks-count",
|
|
15
|
+
description: `Get chunks total count`,
|
|
16
|
+
args,
|
|
17
|
+
tool: async (client, args, ctx) => {
|
|
18
|
+
const [result, apiCall] = await knowledgeGetChunksCount(
|
|
19
|
+
client,
|
|
20
|
+
args.request,
|
|
21
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
22
|
+
).$inspect();
|
|
23
|
+
|
|
24
|
+
if (!result.ok) {
|
|
25
|
+
return {
|
|
26
|
+
content: [{ type: "text", text: result.error.message }],
|
|
27
|
+
isError: true,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const value = result.value;
|
|
32
|
+
|
|
33
|
+
return formatResult(value, apiCall);
|
|
34
|
+
},
|
|
35
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { knowledgeListChunksPaginated } from "../../funcs/knowledgeListChunksPaginated.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.ListChunksPaginatedRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$knowledgeListChunksPaginated: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "knowledge-list-chunks-paginated",
|
|
15
|
+
description: `List chunks with offset-based pagination`,
|
|
16
|
+
args,
|
|
17
|
+
tool: async (client, args, ctx) => {
|
|
18
|
+
const [result, apiCall] = await knowledgeListChunksPaginated(
|
|
19
|
+
client,
|
|
20
|
+
args.request,
|
|
21
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
22
|
+
).$inspect();
|
|
23
|
+
|
|
24
|
+
if (!result.ok) {
|
|
25
|
+
return {
|
|
26
|
+
content: [{ type: "text", text: result.error.message }],
|
|
27
|
+
isError: true,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const value = result.value;
|
|
32
|
+
|
|
33
|
+
return formatResult(value, apiCall);
|
|
34
|
+
},
|
|
35
|
+
};
|
|
@@ -14,7 +14,7 @@ export const tool$toolsDuplicate: ToolDefinition<typeof args> = {
|
|
|
14
14
|
name: "tools-duplicate",
|
|
15
15
|
description: `Duplicate tool
|
|
16
16
|
|
|
17
|
-
Creates a copy of an existing tool with a new
|
|
17
|
+
Creates a copy of an existing tool with a new id and ID.`,
|
|
18
18
|
args,
|
|
19
19
|
tool: async (client, args, ctx) => {
|
|
20
20
|
const [result, apiCall] = await toolsDuplicate(
|
|
@@ -14,7 +14,7 @@ export const tool$toolsRetrieve: ToolDefinition<typeof args> = {
|
|
|
14
14
|
name: "tools-retrieve",
|
|
15
15
|
description: `Retrieve tool
|
|
16
16
|
|
|
17
|
-
Retrieves a tool by
|
|
17
|
+
Retrieves a tool by id.`,
|
|
18
18
|
args,
|
|
19
19
|
tool: async (client, args, ctx) => {
|
|
20
20
|
const [result, apiCall] = await toolsRetrieve(
|
|
@@ -51,6 +51,7 @@ export * from "./getpromptversion.js";
|
|
|
51
51
|
export * from "./honoapierror.js";
|
|
52
52
|
export * from "./httpclienterrors.js";
|
|
53
53
|
export * from "./invokeeval.js";
|
|
54
|
+
export * from "./listagenttasks.js";
|
|
54
55
|
export * from "./orqerror.js";
|
|
55
56
|
export * from "./responsevalidationerror.js";
|
|
56
57
|
export * from "./retrievecontact.js";
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { OrqError } from "./orqerror.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* No agent tasks found
|
|
10
|
+
*/
|
|
11
|
+
export type ListAgentTasksResponseBodyData = {
|
|
12
|
+
message: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* No agent tasks found
|
|
17
|
+
*/
|
|
18
|
+
export class ListAgentTasksResponseBody extends OrqError {
|
|
19
|
+
/** The original data that was passed to this error instance. */
|
|
20
|
+
data$: ListAgentTasksResponseBodyData;
|
|
21
|
+
|
|
22
|
+
constructor(
|
|
23
|
+
err: ListAgentTasksResponseBodyData,
|
|
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 = "ListAgentTasksResponseBody";
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const ListAgentTasksResponseBody$inboundSchema: z.ZodType<
|
|
36
|
+
ListAgentTasksResponseBody,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
unknown
|
|
39
|
+
> = z.object({
|
|
40
|
+
message: z.string(),
|
|
41
|
+
request$: z.instanceof(Request),
|
|
42
|
+
response$: z.instanceof(Response),
|
|
43
|
+
body$: z.string(),
|
|
44
|
+
})
|
|
45
|
+
.transform((v) => {
|
|
46
|
+
return new ListAgentTasksResponseBody(v, {
|
|
47
|
+
request: v.request$,
|
|
48
|
+
response: v.response$,
|
|
49
|
+
body: v.body$,
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export type ListAgentTasksResponseBody$Outbound = {
|
|
55
|
+
message: string;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const ListAgentTasksResponseBody$outboundSchema: z.ZodType<
|
|
60
|
+
ListAgentTasksResponseBody$Outbound,
|
|
61
|
+
z.ZodTypeDef,
|
|
62
|
+
ListAgentTasksResponseBody
|
|
63
|
+
> = z.instanceof(ListAgentTasksResponseBody)
|
|
64
|
+
.transform(v => v.data$)
|
|
65
|
+
.pipe(z.object({
|
|
66
|
+
message: z.string(),
|
|
67
|
+
}));
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @internal
|
|
71
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
72
|
+
*/
|
|
73
|
+
export namespace ListAgentTasksResponseBody$ {
|
|
74
|
+
/** @deprecated use `ListAgentTasksResponseBody$inboundSchema` instead. */
|
|
75
|
+
export const inboundSchema = ListAgentTasksResponseBody$inboundSchema;
|
|
76
|
+
/** @deprecated use `ListAgentTasksResponseBody$outboundSchema` instead. */
|
|
77
|
+
export const outboundSchema = ListAgentTasksResponseBody$outboundSchema;
|
|
78
|
+
/** @deprecated use `ListAgentTasksResponseBody$Outbound` instead. */
|
|
79
|
+
export type Outbound = ListAgentTasksResponseBody$Outbound;
|
|
80
|
+
}
|
|
@@ -658,7 +658,7 @@ export const CreateBudgetResponseBody$inboundSchema: z.ZodType<
|
|
|
658
658
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
659
659
|
.optional(),
|
|
660
660
|
updated: z.string().datetime({ offset: true }).default(
|
|
661
|
-
"2025-10-
|
|
661
|
+
"2025-10-03T13:53:58.021Z",
|
|
662
662
|
).transform(v => new Date(v)),
|
|
663
663
|
}).transform((v) => {
|
|
664
664
|
return remap$(v, {
|
|
@@ -693,7 +693,7 @@ export const CreateBudgetResponseBody$outboundSchema: z.ZodType<
|
|
|
693
693
|
isActive: z.boolean(),
|
|
694
694
|
consumption: z.lazy(() => Consumption$outboundSchema).optional(),
|
|
695
695
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
696
|
-
updated: z.date().default(() => new Date("2025-10-
|
|
696
|
+
updated: z.date().default(() => new Date("2025-10-03T13:53:58.021Z"))
|
|
697
697
|
.transform(v => v.toISOString()),
|
|
698
698
|
}).transform((v) => {
|
|
699
699
|
return remap$(v, {
|
|
@@ -182,7 +182,7 @@ export const CreateContactResponseBody$inboundSchema: z.ZodType<
|
|
|
182
182
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
183
183
|
.optional(),
|
|
184
184
|
updated: z.string().datetime({ offset: true }).default(
|
|
185
|
-
"2025-10-
|
|
185
|
+
"2025-10-03T13:53:58.021Z",
|
|
186
186
|
).transform(v => new Date(v)),
|
|
187
187
|
}).transform((v) => {
|
|
188
188
|
return remap$(v, {
|
|
@@ -223,7 +223,7 @@ export const CreateContactResponseBody$outboundSchema: z.ZodType<
|
|
|
223
223
|
tags: z.array(z.string()).optional(),
|
|
224
224
|
metadata: z.record(z.any()).optional(),
|
|
225
225
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
226
|
-
updated: z.date().default(() => new Date("2025-10-
|
|
226
|
+
updated: z.date().default(() => new Date("2025-10-03T13:53:58.021Z"))
|
|
227
227
|
.transform(v => v.toISOString()),
|
|
228
228
|
}).transform((v) => {
|
|
229
229
|
return remap$(v, {
|
|
@@ -211,7 +211,7 @@ export const CreateDatasetResponseBody$inboundSchema: z.ZodType<
|
|
|
211
211
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
212
212
|
.optional(),
|
|
213
213
|
updated: z.string().datetime({ offset: true }).default(
|
|
214
|
-
"2025-10-
|
|
214
|
+
"2025-10-03T13:53:58.021Z",
|
|
215
215
|
).transform(v => new Date(v)),
|
|
216
216
|
}).transform((v) => {
|
|
217
217
|
return remap$(v, {
|
|
@@ -251,7 +251,7 @@ export const CreateDatasetResponseBody$outboundSchema: z.ZodType<
|
|
|
251
251
|
updatedById: z.string().optional(),
|
|
252
252
|
metadata: z.lazy(() => CreateDatasetMetadata$outboundSchema),
|
|
253
253
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
254
|
-
updated: z.date().default(() => new Date("2025-10-
|
|
254
|
+
updated: z.date().default(() => new Date("2025-10-03T13:53:58.021Z"))
|
|
255
255
|
.transform(v => v.toISOString()),
|
|
256
256
|
}).transform((v) => {
|
|
257
257
|
return remap$(v, {
|
|
@@ -6083,7 +6083,7 @@ export const ResponseBody$inboundSchema: z.ZodType<
|
|
|
6083
6083
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
6084
6084
|
.optional(),
|
|
6085
6085
|
updated: z.string().datetime({ offset: true }).default(
|
|
6086
|
-
"2025-10-
|
|
6086
|
+
"2025-10-03T13:53:58.021Z",
|
|
6087
6087
|
).transform(v => new Date(v)),
|
|
6088
6088
|
}).transform((v) => {
|
|
6089
6089
|
return remap$(v, {
|
|
@@ -6147,7 +6147,7 @@ export const ResponseBody$outboundSchema: z.ZodType<
|
|
|
6147
6147
|
createdById: z.string().optional(),
|
|
6148
6148
|
updatedById: z.string().optional(),
|
|
6149
6149
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
6150
|
-
updated: z.date().default(() => new Date("2025-10-
|
|
6150
|
+
updated: z.date().default(() => new Date("2025-10-03T13:53:58.021Z"))
|
|
6151
6151
|
.transform(v => v.toISOString()),
|
|
6152
6152
|
}).transform((v) => {
|
|
6153
6153
|
return remap$(v, {
|