@orq-ai/node 3.13.4 → 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.
Files changed (134) hide show
  1. package/bin/mcp-server.js +202 -202
  2. package/bin/mcp-server.js.map +39 -39
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  9. package/models/operations/createbudget.js +2 -2
  10. package/models/operations/createcontact.js +2 -2
  11. package/models/operations/createdataset.js +2 -2
  12. package/models/operations/createdatasetitem.js +2 -2
  13. package/models/operations/createdatasource.js +2 -2
  14. package/models/operations/createeval.js +28 -28
  15. package/models/operations/createtool.js +14 -14
  16. package/models/operations/duplicatetool.js +10 -10
  17. package/models/operations/fileget.js +2 -2
  18. package/models/operations/filelist.js +2 -2
  19. package/models/operations/fileupload.js +2 -2
  20. package/models/operations/getagent.js +2 -2
  21. package/models/operations/getalltools.js +10 -10
  22. package/models/operations/getbudget.js +2 -2
  23. package/models/operations/getevals.js +28 -28
  24. package/models/operations/listagents.js +2 -2
  25. package/models/operations/listbudgets.js +2 -2
  26. package/models/operations/listcontacts.js +2 -2
  27. package/models/operations/listdatasetdatapoints.js +2 -2
  28. package/models/operations/listdatasets.js +2 -2
  29. package/models/operations/listdatasources.js +2 -2
  30. package/models/operations/retrievecontact.js +2 -2
  31. package/models/operations/retrievedatapoint.js +2 -2
  32. package/models/operations/retrievedataset.js +2 -2
  33. package/models/operations/retrievedatasource.js +2 -2
  34. package/models/operations/retrievetool.js +10 -10
  35. package/models/operations/runagent.js +2 -2
  36. package/models/operations/streamrunagent.js +2 -2
  37. package/models/operations/updatebudget.js +2 -2
  38. package/models/operations/updatecontact.js +2 -2
  39. package/models/operations/updatedatapoint.js +2 -2
  40. package/models/operations/updatedataset.js +2 -2
  41. package/models/operations/updatedatasource.js +2 -2
  42. package/models/operations/updateeval.js +28 -28
  43. package/models/operations/updatetool.js +14 -14
  44. package/package.json +1 -1
  45. package/packages/orq-rc/README.md +96 -93
  46. package/packages/orq-rc/docs/sdks/agents/README.md +95 -20
  47. package/packages/orq-rc/examples/package-lock.json +1 -1
  48. package/packages/orq-rc/jsr.json +1 -1
  49. package/packages/orq-rc/package-lock.json +2 -2
  50. package/packages/orq-rc/package.json +1 -1
  51. package/packages/orq-rc/src/funcs/agentsListTasks.ts +183 -0
  52. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +3 -3
  53. package/packages/orq-rc/src/lib/config.ts +2 -2
  54. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  55. package/packages/orq-rc/src/mcp-server/server.ts +4 -2
  56. package/packages/orq-rc/src/mcp-server/tools/agentsListTasks.ts +37 -0
  57. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieve.ts +1 -1
  58. package/packages/orq-rc/src/models/errors/index.ts +1 -0
  59. package/packages/orq-rc/src/models/errors/listagenttasks.ts +80 -0
  60. package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
  61. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  62. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  63. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
  64. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  65. package/packages/orq-rc/src/models/operations/createeval.ts +28 -28
  66. package/packages/orq-rc/src/models/operations/createtool.ts +10 -10
  67. package/packages/orq-rc/src/models/operations/duplicatetool.ts +10 -10
  68. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  69. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  70. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  71. package/packages/orq-rc/src/models/operations/getagent.ts +23 -15
  72. package/packages/orq-rc/src/models/operations/getalltools.ts +10 -10
  73. package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
  74. package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
  75. package/packages/orq-rc/src/models/operations/index.ts +1 -0
  76. package/packages/orq-rc/src/models/operations/listagents.ts +10 -10
  77. package/packages/orq-rc/src/models/operations/listagenttasks.ts +1099 -0
  78. package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
  79. package/packages/orq-rc/src/models/operations/listchunks.ts +21 -21
  80. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  81. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
  82. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  83. package/packages/orq-rc/src/models/operations/listdatasources.ts +29 -22
  84. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  85. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
  86. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  87. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  88. package/packages/orq-rc/src/models/operations/retrievetool.ts +10 -10
  89. package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
  90. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  91. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
  92. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  93. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  94. package/packages/orq-rc/src/models/operations/updateeval.ts +28 -28
  95. package/packages/orq-rc/src/models/operations/updatetool.ts +10 -10
  96. package/packages/orq-rc/src/sdk/agents.ts +25 -7
  97. package/src/lib/config.ts +3 -3
  98. package/src/mcp-server/mcp-server.ts +1 -1
  99. package/src/mcp-server/server.ts +1 -1
  100. package/src/models/operations/createbudget.ts +2 -2
  101. package/src/models/operations/createcontact.ts +2 -2
  102. package/src/models/operations/createdataset.ts +2 -2
  103. package/src/models/operations/createdatasetitem.ts +2 -2
  104. package/src/models/operations/createdatasource.ts +2 -2
  105. package/src/models/operations/createeval.ts +28 -28
  106. package/src/models/operations/createtool.ts +14 -14
  107. package/src/models/operations/duplicatetool.ts +10 -10
  108. package/src/models/operations/fileget.ts +2 -2
  109. package/src/models/operations/filelist.ts +2 -2
  110. package/src/models/operations/fileupload.ts +2 -2
  111. package/src/models/operations/getagent.ts +2 -2
  112. package/src/models/operations/getalltools.ts +10 -10
  113. package/src/models/operations/getbudget.ts +2 -2
  114. package/src/models/operations/getevals.ts +28 -28
  115. package/src/models/operations/listagents.ts +2 -2
  116. package/src/models/operations/listbudgets.ts +2 -2
  117. package/src/models/operations/listcontacts.ts +2 -2
  118. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  119. package/src/models/operations/listdatasets.ts +2 -2
  120. package/src/models/operations/listdatasources.ts +2 -2
  121. package/src/models/operations/retrievecontact.ts +2 -2
  122. package/src/models/operations/retrievedatapoint.ts +2 -2
  123. package/src/models/operations/retrievedataset.ts +2 -2
  124. package/src/models/operations/retrievedatasource.ts +2 -2
  125. package/src/models/operations/retrievetool.ts +10 -10
  126. package/src/models/operations/runagent.ts +2 -2
  127. package/src/models/operations/streamrunagent.ts +2 -2
  128. package/src/models/operations/updatebudget.ts +2 -2
  129. package/src/models/operations/updatecontact.ts +2 -2
  130. package/src/models/operations/updatedatapoint.ts +2 -2
  131. package/src/models/operations/updatedataset.ts +2 -2
  132. package/src/models/operations/updatedatasource.ts +2 -2
  133. package/src/models/operations/updateeval.ts +28 -28
  134. package/src/models/operations/updatetool.ts +14 -14
@@ -5,14 +5,91 @@
5
5
 
6
6
  ### Available Operations
7
7
 
8
+ * [retrieveTask](#retrievetask) - Retrieve a specific agent task
8
9
  * [list](#list) - List all agents
9
10
  * [retrieve](#retrieve) - Get an agent
10
- * [retrieveTask](#retrievetask) - Retrieve a specific agent task
11
+ * [listTasks](#listtasks) - List all tasks for an agent
11
12
  * [run](#run) - Run an agent
12
13
  * [streamRun](#streamrun) - Run and stream agent execution
13
14
  * [listActions](#listactions) - List all actions
14
15
  * [retrieveAction](#retrieveaction) - Retrieve an action executed by an agent task.
15
16
 
17
+ ## retrieveTask
18
+
19
+ Retrieves detailed information about a specific task for a given agent, including execution status and results.
20
+
21
+ ### Example Usage
22
+
23
+ <!-- UsageSnippet language="typescript" operationID="GetAgentTask" method="get" path="/v2/agents/{agent_key}/tasks/{task_id}" -->
24
+ ```typescript
25
+ import { Orq } from "@orq-ai/node";
26
+
27
+ const orq = new Orq({
28
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
29
+ });
30
+
31
+ async function run() {
32
+ const result = await orq.agents.retrieveTask({
33
+ agentKey: "<value>",
34
+ taskId: "<id>",
35
+ });
36
+
37
+ console.log(result);
38
+ }
39
+
40
+ run();
41
+ ```
42
+
43
+ ### Standalone function
44
+
45
+ The standalone function version of this method:
46
+
47
+ ```typescript
48
+ import { OrqCore } from "@orq-ai/node/core.js";
49
+ import { agentsRetrieveTask } from "@orq-ai/node/funcs/agentsRetrieveTask.js";
50
+
51
+ // Use `OrqCore` for best tree-shaking performance.
52
+ // You can create one instance of it to use across an application.
53
+ const orq = new OrqCore({
54
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
55
+ });
56
+
57
+ async function run() {
58
+ const res = await agentsRetrieveTask(orq, {
59
+ agentKey: "<value>",
60
+ taskId: "<id>",
61
+ });
62
+ if (res.ok) {
63
+ const { value: result } = res;
64
+ console.log(result);
65
+ } else {
66
+ console.log("agentsRetrieveTask failed:", res.error);
67
+ }
68
+ }
69
+
70
+ run();
71
+ ```
72
+
73
+ ### Parameters
74
+
75
+ | Parameter | Type | Required | Description |
76
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
77
+ | `request` | [operations.GetAgentTaskRequest](../../models/operations/getagenttaskrequest.md) | :heavy_check_mark: | The request object to use for the request. |
78
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
79
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
80
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
81
+
82
+ ### Response
83
+
84
+ **Promise\<[operations.GetAgentTaskResponseBody](../../models/operations/getagenttaskresponsebody.md)\>**
85
+
86
+ ### Errors
87
+
88
+ | Error Type | Status Code | Content Type |
89
+ | ------------------------------- | ------------------------------- | ------------------------------- |
90
+ | errors.GetAgentTaskResponseBody | 404 | application/json |
91
+ | errors.APIError | 4XX, 5XX | \*/\* |
92
+
16
93
  ## list
17
94
 
18
95
  Retrieves a paginated list of all agents in your workspace. Each agent includes its configuration, primary model, and optional fallback model settings.
@@ -84,11 +161,11 @@ run();
84
161
 
85
162
  ## retrieve
86
163
 
87
- Retrieves a single agent by ID, including its full configuration with primary and fallback model settings.
164
+ Retrieves a single agent by its unique key, including its full configuration with primary and fallback model settings.
88
165
 
89
166
  ### Example Usage
90
167
 
91
- <!-- UsageSnippet language="typescript" operationID="GetAgent" method="get" path="/v2/agents/{id}" -->
168
+ <!-- UsageSnippet language="typescript" operationID="GetAgent" method="get" path="/v2/agents/{agent_key}" -->
92
169
  ```typescript
93
170
  import { Orq } from "@orq-ai/node";
94
171
 
@@ -98,7 +175,7 @@ const orq = new Orq({
98
175
 
99
176
  async function run() {
100
177
  const result = await orq.agents.retrieve({
101
- id: "<id>",
178
+ agentKey: "<value>",
102
179
  });
103
180
 
104
181
  console.log(result);
@@ -123,7 +200,7 @@ const orq = new OrqCore({
123
200
 
124
201
  async function run() {
125
202
  const res = await agentsRetrieve(orq, {
126
- id: "<id>",
203
+ agentKey: "<value>",
127
204
  });
128
205
  if (res.ok) {
129
206
  const { value: result } = res;
@@ -156,13 +233,13 @@ run();
156
233
  | errors.GetAgentResponseBody | 404 | application/json |
157
234
  | errors.APIError | 4XX, 5XX | \*/\* |
158
235
 
159
- ## retrieveTask
236
+ ## listTasks
160
237
 
161
- Retrieves detailed information about a specific task for a given agent, including execution status and results.
238
+ Retrieves a paginated list of all tasks associated with a specific agent, optionally filtered by status.
162
239
 
163
240
  ### Example Usage
164
241
 
165
- <!-- UsageSnippet language="typescript" operationID="GetAgentTask" method="get" path="/v2/agents/{agent_key}/tasks/{task_id}" -->
242
+ <!-- UsageSnippet language="typescript" operationID="ListAgentTasks" method="get" path="/v2/agents/{agent_key}/tasks" -->
166
243
  ```typescript
167
244
  import { Orq } from "@orq-ai/node";
168
245
 
@@ -171,9 +248,8 @@ const orq = new Orq({
171
248
  });
172
249
 
173
250
  async function run() {
174
- const result = await orq.agents.retrieveTask({
251
+ const result = await orq.agents.listTasks({
175
252
  agentKey: "<value>",
176
- taskId: "<id>",
177
253
  });
178
254
 
179
255
  console.log(result);
@@ -188,7 +264,7 @@ The standalone function version of this method:
188
264
 
189
265
  ```typescript
190
266
  import { OrqCore } from "@orq-ai/node/core.js";
191
- import { agentsRetrieveTask } from "@orq-ai/node/funcs/agentsRetrieveTask.js";
267
+ import { agentsListTasks } from "@orq-ai/node/funcs/agentsListTasks.js";
192
268
 
193
269
  // Use `OrqCore` for best tree-shaking performance.
194
270
  // You can create one instance of it to use across an application.
@@ -197,15 +273,14 @@ const orq = new OrqCore({
197
273
  });
198
274
 
199
275
  async function run() {
200
- const res = await agentsRetrieveTask(orq, {
276
+ const res = await agentsListTasks(orq, {
201
277
  agentKey: "<value>",
202
- taskId: "<id>",
203
278
  });
204
279
  if (res.ok) {
205
280
  const { value: result } = res;
206
281
  console.log(result);
207
282
  } else {
208
- console.log("agentsRetrieveTask failed:", res.error);
283
+ console.log("agentsListTasks failed:", res.error);
209
284
  }
210
285
  }
211
286
 
@@ -216,21 +291,21 @@ run();
216
291
 
217
292
  | Parameter | Type | Required | Description |
218
293
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
219
- | `request` | [operations.GetAgentTaskRequest](../../models/operations/getagenttaskrequest.md) | :heavy_check_mark: | The request object to use for the request. |
294
+ | `request` | [operations.ListAgentTasksRequest](../../models/operations/listagenttasksrequest.md) | :heavy_check_mark: | The request object to use for the request. |
220
295
  | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
221
296
  | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
222
297
  | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
223
298
 
224
299
  ### Response
225
300
 
226
- **Promise\<[operations.GetAgentTaskResponseBody](../../models/operations/getagenttaskresponsebody.md)\>**
301
+ **Promise\<[operations.ListAgentTasksResponseBody](../../models/operations/listagenttasksresponsebody.md)\>**
227
302
 
228
303
  ### Errors
229
304
 
230
- | Error Type | Status Code | Content Type |
231
- | ------------------------------- | ------------------------------- | ------------------------------- |
232
- | errors.GetAgentTaskResponseBody | 404 | application/json |
233
- | errors.APIError | 4XX, 5XX | \*/\* |
305
+ | Error Type | Status Code | Content Type |
306
+ | --------------------------------- | --------------------------------- | --------------------------------- |
307
+ | errors.ListAgentTasksResponseBody | 404 | application/json |
308
+ | errors.APIError | 4XX, 5XX | \*/\* |
234
309
 
235
310
  ## run
236
311
 
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "..": {
20
20
  "name": "@orq-ai/node",
21
- "version": "3.14.0-rc.6",
21
+ "version": "3.14.0-rc.7",
22
22
  "dependencies": {
23
23
  "zod": "^3.20.0"
24
24
  },
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@orq-ai/node",
5
- "version": "3.14.0-rc.6",
5
+ "version": "3.14.0-rc.7",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@orq-ai/node",
3
- "version": "3.14.0-rc.6",
3
+ "version": "3.14.0-rc.7",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@orq-ai/node",
9
- "version": "3.14.0-rc.6",
9
+ "version": "3.14.0-rc.7",
10
10
  "dependencies": {
11
11
  "zod": "^3.20.0"
12
12
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orq-ai/node",
3
- "version": "3.14.0-rc.6",
3
+ "version": "3.14.0-rc.7",
4
4
  "author": "Orq",
5
5
  "bin": {
6
6
  "mcp": "bin/mcp-server.js"
@@ -0,0 +1,183 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { OrqCore } from "../core.js";
6
+ import { encodeFormQuery, 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
+ * List all tasks for an agent
30
+ *
31
+ * @remarks
32
+ * Retrieves a paginated list of all tasks associated with a specific agent, optionally filtered by status.
33
+ */
34
+ export function agentsListTasks(
35
+ client: OrqCore,
36
+ request: operations.ListAgentTasksRequest,
37
+ options?: RequestOptions,
38
+ ): APIPromise<
39
+ Result<
40
+ operations.ListAgentTasksResponseBody,
41
+ | errors.ListAgentTasksResponseBody
42
+ | OrqError
43
+ | ResponseValidationError
44
+ | ConnectionError
45
+ | RequestAbortedError
46
+ | RequestTimeoutError
47
+ | InvalidRequestError
48
+ | UnexpectedClientError
49
+ | SDKValidationError
50
+ >
51
+ > {
52
+ return new APIPromise($do(
53
+ client,
54
+ request,
55
+ options,
56
+ ));
57
+ }
58
+
59
+ async function $do(
60
+ client: OrqCore,
61
+ request: operations.ListAgentTasksRequest,
62
+ options?: RequestOptions,
63
+ ): Promise<
64
+ [
65
+ Result<
66
+ operations.ListAgentTasksResponseBody,
67
+ | errors.ListAgentTasksResponseBody
68
+ | OrqError
69
+ | ResponseValidationError
70
+ | ConnectionError
71
+ | RequestAbortedError
72
+ | RequestTimeoutError
73
+ | InvalidRequestError
74
+ | UnexpectedClientError
75
+ | SDKValidationError
76
+ >,
77
+ APICall,
78
+ ]
79
+ > {
80
+ const parsed = safeParse(
81
+ request,
82
+ (value) => operations.ListAgentTasksRequest$outboundSchema.parse(value),
83
+ "Input validation failed",
84
+ );
85
+ if (!parsed.ok) {
86
+ return [parsed, { status: "invalid" }];
87
+ }
88
+ const payload = parsed.value;
89
+ const body = null;
90
+
91
+ const pathParams = {
92
+ agent_key: encodeSimple("agent_key", payload.agent_key, {
93
+ explode: false,
94
+ charEncoding: "percent",
95
+ }),
96
+ };
97
+
98
+ const path = pathToFunc("/v2/agents/{agent_key}/tasks")(pathParams);
99
+
100
+ const query = encodeFormQuery({
101
+ "ending_before": payload.ending_before,
102
+ "limit": payload.limit,
103
+ "starting_after": payload.starting_after,
104
+ "status": payload.status,
105
+ });
106
+
107
+ const headers = new Headers(compactMap({
108
+ Accept: "application/json",
109
+ }));
110
+
111
+ const secConfig = await extractSecurity(client._options.apiKey);
112
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
113
+ const requestSecurity = resolveGlobalSecurity(securityInput);
114
+
115
+ const context = {
116
+ options: client._options,
117
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
118
+ operationID: "ListAgentTasks",
119
+ oAuth2Scopes: [],
120
+
121
+ resolvedSecurity: requestSecurity,
122
+
123
+ securitySource: client._options.apiKey,
124
+ retryConfig: options?.retries
125
+ || client._options.retryConfig
126
+ || { strategy: "none" },
127
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
128
+ };
129
+
130
+ const requestRes = client._createRequest(context, {
131
+ security: requestSecurity,
132
+ method: "GET",
133
+ baseURL: options?.serverURL,
134
+ path: path,
135
+ headers: headers,
136
+ query: query,
137
+ body: body,
138
+ userAgent: client._options.userAgent,
139
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
140
+ }, options);
141
+ if (!requestRes.ok) {
142
+ return [requestRes, { status: "invalid" }];
143
+ }
144
+ const req = requestRes.value;
145
+
146
+ const doResult = await client._do(req, {
147
+ context,
148
+ errorCodes: ["404", "4XX", "5XX"],
149
+ retryConfig: context.retryConfig,
150
+ retryCodes: context.retryCodes,
151
+ });
152
+ if (!doResult.ok) {
153
+ return [doResult, { status: "request-error", request: req }];
154
+ }
155
+ const response = doResult.value;
156
+
157
+ const responseFields = {
158
+ HttpMeta: { Response: response, Request: req },
159
+ };
160
+
161
+ const [result] = await M.match<
162
+ operations.ListAgentTasksResponseBody,
163
+ | errors.ListAgentTasksResponseBody
164
+ | OrqError
165
+ | ResponseValidationError
166
+ | ConnectionError
167
+ | RequestAbortedError
168
+ | RequestTimeoutError
169
+ | InvalidRequestError
170
+ | UnexpectedClientError
171
+ | SDKValidationError
172
+ >(
173
+ M.json(200, operations.ListAgentTasksResponseBody$inboundSchema),
174
+ M.jsonErr(404, errors.ListAgentTasksResponseBody$inboundSchema),
175
+ M.fail("4XX"),
176
+ M.fail("5XX"),
177
+ )(response, req, { extraFields: responseFields });
178
+ if (!result.ok) {
179
+ return [result, { status: "complete", request: req, response }];
180
+ }
181
+
182
+ return [result, { status: "complete", request: req, response }];
183
+ }
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
29
29
  * Get an agent
30
30
  *
31
31
  * @remarks
32
- * Retrieves a single agent by ID, including its full configuration with primary and fallback model settings.
32
+ * Retrieves a single agent by its unique key, including its full configuration with primary and fallback model settings.
33
33
  */
34
34
  export function agentsRetrieve(
35
35
  client: OrqCore,
@@ -89,13 +89,13 @@ async function $do(
89
89
  const body = null;
90
90
 
91
91
  const pathParams = {
92
- id: encodeSimple("id", payload.id, {
92
+ agent_key: encodeSimple("agent_key", payload.agent_key, {
93
93
  explode: false,
94
94
  charEncoding: "percent",
95
95
  }),
96
96
  };
97
97
 
98
- const path = pathToFunc("/v2/agents/{id}")(pathParams);
98
+ const path = pathToFunc("/v2/agents/{agent_key}")(pathParams);
99
99
 
100
100
  const headers = new Headers(compactMap({
101
101
  Accept: "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.6",
71
+ sdkVersion: "3.14.0-rc.7",
72
72
  genVersion: "2.721.0",
73
- userAgent: "speakeasy-sdk/typescript 3.14.0-rc.6 2.721.0 2.0 @orq-ai/node",
73
+ userAgent: "speakeasy-sdk/typescript 3.14.0-rc.7 2.721.0 2.0 @orq-ai/node",
74
74
  } as const;
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "3.14.0-rc.6",
22
+ currentVersion: "3.14.0-rc.7",
23
23
  },
24
24
  });
25
25
 
@@ -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";
@@ -156,7 +157,7 @@ export function createMCPServer(deps: {
156
157
  }) {
157
158
  const server = new McpServer({
158
159
  name: "Orq",
159
- version: "3.14.0-rc.6",
160
+ version: "3.14.0-rc.7",
160
161
  });
161
162
 
162
163
  const client = new OrqCore({
@@ -198,9 +199,10 @@ export function createMCPServer(deps: {
198
199
  tool(tool$deploymentsGetConfig);
199
200
  tool(tool$deploymentsInvoke);
200
201
  tool(tool$deploymentsStream);
202
+ tool(tool$agentsRetrieveTask);
201
203
  tool(tool$agentsList);
202
204
  tool(tool$agentsRetrieve);
203
- tool(tool$agentsRetrieveTask);
205
+ tool(tool$agentsListTasks);
204
206
  tool(tool$agentsRun);
205
207
  tool(tool$agentsStreamRun);
206
208
  tool(tool$agentsListActions);
@@ -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 ID, including its full configuration with primary and fallback model settings.`,
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(
@@ -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
+ }