warp-agent-sdk 0.3.0 → 1.0.0-alpha.0
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/CHANGELOG.md +22 -0
- package/README.md +2 -2
- package/package.json +1 -1
- package/resources/agent/agent.d.mts +25 -21
- package/resources/agent/agent.d.mts.map +1 -1
- package/resources/agent/agent.d.ts +25 -21
- package/resources/agent/agent.d.ts.map +1 -1
- package/resources/agent/agent.js +5 -5
- package/resources/agent/agent.js.map +1 -1
- package/resources/agent/agent.mjs +5 -5
- package/resources/agent/agent.mjs.map +1 -1
- package/resources/agent/index.d.mts +1 -1
- package/resources/agent/index.d.mts.map +1 -1
- package/resources/agent/index.d.ts +1 -1
- package/resources/agent/index.d.ts.map +1 -1
- package/resources/agent/index.js +3 -3
- package/resources/agent/index.js.map +1 -1
- package/resources/agent/index.mjs +1 -1
- package/resources/agent/index.mjs.map +1 -1
- package/resources/agent/runs.d.mts +222 -0
- package/resources/agent/runs.d.mts.map +1 -0
- package/resources/agent/runs.d.ts +222 -0
- package/resources/agent/runs.d.ts.map +1 -0
- package/resources/agent/runs.js +34 -0
- package/resources/agent/runs.js.map +1 -0
- package/resources/agent/runs.mjs +30 -0
- package/resources/agent/runs.mjs.map +1 -0
- package/src/resources/agent/agent.ts +32 -27
- package/src/resources/agent/index.ts +7 -7
- package/src/resources/agent/runs.ts +276 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/agent/tasks.d.mts +0 -183
- package/resources/agent/tasks.d.mts.map +0 -1
- package/resources/agent/tasks.d.ts +0 -183
- package/resources/agent/tasks.d.ts.map +0 -1
- package/resources/agent/tasks.js +0 -36
- package/resources/agent/tasks.js.map +0 -1
- package/resources/agent/tasks.mjs +0 -32
- package/resources/agent/tasks.mjs.map +0 -1
- package/src/resources/agent/tasks.ts +0 -231
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as AgentAPI from './agent';
|
|
5
|
+
import { APIPromise } from '../../core/api-promise';
|
|
6
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
7
|
+
import { path } from '../../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
export class Runs extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Retrieve detailed information about a specific agent run, including the full
|
|
12
|
+
* prompt, session link, and resolved configuration.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const runItem = await client.agent.runs.retrieve('runId');
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
retrieve(runID: string, options?: RequestOptions): APIPromise<RunItem> {
|
|
20
|
+
return this._client.get(path`/agent/runs/${runID}`, options);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Retrieve a paginated list of agent runs with optional filtering. Results are
|
|
25
|
+
* ordered by creation time (newest first).
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const runs = await client.agent.runs.list();
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
list(query: RunListParams | null | undefined = {}, options?: RequestOptions): APIPromise<RunListResponse> {
|
|
33
|
+
return this._client.get('/agent/runs', { query, ...options });
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface RunItem {
|
|
38
|
+
/**
|
|
39
|
+
* Timestamp when the run was created (RFC3339)
|
|
40
|
+
*/
|
|
41
|
+
created_at: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The prompt/instruction for the agent
|
|
45
|
+
*/
|
|
46
|
+
prompt: string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Unique identifier for the run
|
|
50
|
+
*/
|
|
51
|
+
run_id: string;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Current state of the run:
|
|
55
|
+
*
|
|
56
|
+
* - QUEUED: Run is waiting to be picked up
|
|
57
|
+
* - PENDING: Run is being prepared
|
|
58
|
+
* - CLAIMED: Run has been claimed by a worker
|
|
59
|
+
* - INPROGRESS: Run is actively being executed
|
|
60
|
+
* - SUCCEEDED: Run completed successfully
|
|
61
|
+
* - FAILED: Run failed
|
|
62
|
+
*/
|
|
63
|
+
state: RunState;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @deprecated Use run_id instead.
|
|
67
|
+
*/
|
|
68
|
+
task_id: string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Human-readable title for the run
|
|
72
|
+
*/
|
|
73
|
+
title: string;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Timestamp when the run was last updated (RFC3339)
|
|
77
|
+
*/
|
|
78
|
+
updated_at: string;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Configuration for an ambient agent run
|
|
82
|
+
*/
|
|
83
|
+
agent_config?: AgentAPI.AmbientAgentConfig;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* UUID of the conversation associated with the run
|
|
87
|
+
*/
|
|
88
|
+
conversation_id?: string;
|
|
89
|
+
|
|
90
|
+
creator?: RunItem.Creator;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Whether the sandbox environment is currently running
|
|
94
|
+
*/
|
|
95
|
+
is_sandbox_running?: boolean;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Resource usage information for the run
|
|
99
|
+
*/
|
|
100
|
+
request_usage?: RunItem.RequestUsage;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* UUID of the shared session (if available)
|
|
104
|
+
*/
|
|
105
|
+
session_id?: string;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* URL to view the agent session
|
|
109
|
+
*/
|
|
110
|
+
session_link?: string;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Source that created the run:
|
|
114
|
+
*
|
|
115
|
+
* - LINEAR: Created from Linear integration
|
|
116
|
+
* - API: Created via the Warp API
|
|
117
|
+
* - SLACK: Created from Slack integration
|
|
118
|
+
* - LOCAL: Created from local CLI/app
|
|
119
|
+
* - SCHEDULED_AGENT: Created by a scheduled agent
|
|
120
|
+
*/
|
|
121
|
+
source?: RunSourceType;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Timestamp when the agent started working on the run (RFC3339)
|
|
125
|
+
*/
|
|
126
|
+
started_at?: string | null;
|
|
127
|
+
|
|
128
|
+
status_message?: RunItem.StatusMessage;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export namespace RunItem {
|
|
132
|
+
export interface Creator {
|
|
133
|
+
/**
|
|
134
|
+
* Display name of the creator
|
|
135
|
+
*/
|
|
136
|
+
display_name?: string;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* URL to the creator's photo
|
|
140
|
+
*/
|
|
141
|
+
photo_url?: string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Type of the creator principal
|
|
145
|
+
*/
|
|
146
|
+
type?: 'user' | 'service_account';
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Unique identifier of the creator
|
|
150
|
+
*/
|
|
151
|
+
uid?: string;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Resource usage information for the run
|
|
156
|
+
*/
|
|
157
|
+
export interface RequestUsage {
|
|
158
|
+
/**
|
|
159
|
+
* Cost of compute resources for the run
|
|
160
|
+
*/
|
|
161
|
+
compute_cost?: number;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Cost of LLM inference for the run
|
|
165
|
+
*/
|
|
166
|
+
inference_cost?: number;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export interface StatusMessage {
|
|
170
|
+
/**
|
|
171
|
+
* Human-readable status message
|
|
172
|
+
*/
|
|
173
|
+
message?: string;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Source that created the run:
|
|
179
|
+
*
|
|
180
|
+
* - LINEAR: Created from Linear integration
|
|
181
|
+
* - API: Created via the Warp API
|
|
182
|
+
* - SLACK: Created from Slack integration
|
|
183
|
+
* - LOCAL: Created from local CLI/app
|
|
184
|
+
* - SCHEDULED_AGENT: Created by a scheduled agent
|
|
185
|
+
*/
|
|
186
|
+
export type RunSourceType = 'LINEAR' | 'API' | 'SLACK' | 'LOCAL' | 'SCHEDULED_AGENT';
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Current state of the run:
|
|
190
|
+
*
|
|
191
|
+
* - QUEUED: Run is waiting to be picked up
|
|
192
|
+
* - PENDING: Run is being prepared
|
|
193
|
+
* - CLAIMED: Run has been claimed by a worker
|
|
194
|
+
* - INPROGRESS: Run is actively being executed
|
|
195
|
+
* - SUCCEEDED: Run completed successfully
|
|
196
|
+
* - FAILED: Run failed
|
|
197
|
+
*/
|
|
198
|
+
export type RunState = 'QUEUED' | 'PENDING' | 'CLAIMED' | 'INPROGRESS' | 'SUCCEEDED' | 'FAILED';
|
|
199
|
+
|
|
200
|
+
export interface RunListResponse {
|
|
201
|
+
page_info: RunListResponse.PageInfo;
|
|
202
|
+
|
|
203
|
+
runs: Array<RunItem>;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export namespace RunListResponse {
|
|
207
|
+
export interface PageInfo {
|
|
208
|
+
/**
|
|
209
|
+
* Whether there are more results available
|
|
210
|
+
*/
|
|
211
|
+
has_next_page: boolean;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Opaque cursor for fetching the next page
|
|
215
|
+
*/
|
|
216
|
+
next_cursor?: string;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export interface RunListParams {
|
|
221
|
+
/**
|
|
222
|
+
* Filter by agent config name
|
|
223
|
+
*/
|
|
224
|
+
config_name?: string;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Filter runs created after this timestamp (RFC3339 format)
|
|
228
|
+
*/
|
|
229
|
+
created_after?: string;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Filter runs created before this timestamp (RFC3339 format)
|
|
233
|
+
*/
|
|
234
|
+
created_before?: string;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Filter by creator UID (user or service account)
|
|
238
|
+
*/
|
|
239
|
+
creator?: string;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Pagination cursor from previous response
|
|
243
|
+
*/
|
|
244
|
+
cursor?: string;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Maximum number of runs to return
|
|
248
|
+
*/
|
|
249
|
+
limit?: number;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Filter by model ID
|
|
253
|
+
*/
|
|
254
|
+
model_id?: string;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Filter by run source type
|
|
258
|
+
*/
|
|
259
|
+
source?: RunSourceType;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Filter by run state. Can be specified multiple times to match any of the given
|
|
263
|
+
* states.
|
|
264
|
+
*/
|
|
265
|
+
state?: Array<RunState>;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
export declare namespace Runs {
|
|
269
|
+
export {
|
|
270
|
+
type RunItem as RunItem,
|
|
271
|
+
type RunSourceType as RunSourceType,
|
|
272
|
+
type RunState as RunState,
|
|
273
|
+
type RunListResponse as RunListResponse,
|
|
274
|
+
type RunListParams as RunListParams,
|
|
275
|
+
};
|
|
276
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '1.0.0-alpha.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "1.0.0-alpha.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,kBAAkB,CAAC"}
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "1.0.0-alpha.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,kBAAkB,CAAC"}
|
package/version.js
CHANGED
package/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,eAAe,CAAC,CAAC,2BAA2B"}
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '1.0.0-alpha.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,CAAC,2BAA2B"}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
-
import * as AgentAPI from "./agent.mjs";
|
|
3
|
-
import { APIPromise } from "../../core/api-promise.mjs";
|
|
4
|
-
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
5
|
-
export declare class Tasks extends APIResource {
|
|
6
|
-
/**
|
|
7
|
-
* Retrieve detailed information about a specific agent task, including the full
|
|
8
|
-
* prompt, session link, and resolved configuration.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```ts
|
|
12
|
-
* const taskItem = await client.agent.tasks.retrieve(
|
|
13
|
-
* 'taskId',
|
|
14
|
-
* );
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
retrieve(taskID: string, options?: RequestOptions): APIPromise<TaskItem>;
|
|
18
|
-
/**
|
|
19
|
-
* Retrieve a paginated list of agent tasks with optional filtering. Results are
|
|
20
|
-
* ordered by creation time (newest first).
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```ts
|
|
24
|
-
* const tasks = await client.agent.tasks.list();
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
list(query?: TaskListParams | null | undefined, options?: RequestOptions): APIPromise<TaskListResponse>;
|
|
28
|
-
}
|
|
29
|
-
export interface TaskItem {
|
|
30
|
-
/**
|
|
31
|
-
* Timestamp when the task was created (RFC3339)
|
|
32
|
-
*/
|
|
33
|
-
created_at: string;
|
|
34
|
-
/**
|
|
35
|
-
* The prompt/instruction for the agent
|
|
36
|
-
*/
|
|
37
|
-
prompt: string;
|
|
38
|
-
/**
|
|
39
|
-
* Current state of the task:
|
|
40
|
-
*
|
|
41
|
-
* - QUEUED: Task is waiting to be picked up
|
|
42
|
-
* - PENDING: Task is being prepared
|
|
43
|
-
* - CLAIMED: Task has been claimed by a worker
|
|
44
|
-
* - INPROGRESS: Task is actively being executed
|
|
45
|
-
* - SUCCEEDED: Task completed successfully
|
|
46
|
-
* - FAILED: Task failed
|
|
47
|
-
*/
|
|
48
|
-
state: TaskState;
|
|
49
|
-
/**
|
|
50
|
-
* Unique identifier for the task
|
|
51
|
-
*/
|
|
52
|
-
task_id: string;
|
|
53
|
-
/**
|
|
54
|
-
* Human-readable title for the task
|
|
55
|
-
*/
|
|
56
|
-
title: string;
|
|
57
|
-
/**
|
|
58
|
-
* Timestamp when the task was last updated (RFC3339)
|
|
59
|
-
*/
|
|
60
|
-
updated_at: string;
|
|
61
|
-
/**
|
|
62
|
-
* Configuration for an ambient agent task
|
|
63
|
-
*/
|
|
64
|
-
agent_config?: AgentAPI.AmbientAgentConfig;
|
|
65
|
-
creator?: TaskItem.Creator;
|
|
66
|
-
/**
|
|
67
|
-
* UUID of the shared session (if available)
|
|
68
|
-
*/
|
|
69
|
-
session_id?: string;
|
|
70
|
-
/**
|
|
71
|
-
* URL to view the agent session
|
|
72
|
-
*/
|
|
73
|
-
session_link?: string;
|
|
74
|
-
/**
|
|
75
|
-
* Source that created the task:
|
|
76
|
-
*
|
|
77
|
-
* - LINEAR: Created from Linear integration
|
|
78
|
-
* - API: Created via the public API
|
|
79
|
-
* - SLACK: Created from Slack integration
|
|
80
|
-
* - LOCAL: Created from local CLI/app
|
|
81
|
-
* - SCHEDULED_AGENT: Created by a scheduled agent
|
|
82
|
-
*/
|
|
83
|
-
source?: TaskSourceType;
|
|
84
|
-
status_message?: TaskItem.StatusMessage;
|
|
85
|
-
}
|
|
86
|
-
export declare namespace TaskItem {
|
|
87
|
-
interface Creator {
|
|
88
|
-
/**
|
|
89
|
-
* Type of the creator principal
|
|
90
|
-
*/
|
|
91
|
-
type?: 'user' | 'service_account';
|
|
92
|
-
/**
|
|
93
|
-
* Unique identifier of the creator
|
|
94
|
-
*/
|
|
95
|
-
uid?: string;
|
|
96
|
-
}
|
|
97
|
-
interface StatusMessage {
|
|
98
|
-
/**
|
|
99
|
-
* Human-readable status message
|
|
100
|
-
*/
|
|
101
|
-
message?: string;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Source that created the task:
|
|
106
|
-
*
|
|
107
|
-
* - LINEAR: Created from Linear integration
|
|
108
|
-
* - API: Created via the public API
|
|
109
|
-
* - SLACK: Created from Slack integration
|
|
110
|
-
* - LOCAL: Created from local CLI/app
|
|
111
|
-
* - SCHEDULED_AGENT: Created by a scheduled agent
|
|
112
|
-
*/
|
|
113
|
-
export type TaskSourceType = 'LINEAR' | 'API' | 'SLACK' | 'LOCAL' | 'SCHEDULED_AGENT';
|
|
114
|
-
/**
|
|
115
|
-
* Current state of the task:
|
|
116
|
-
*
|
|
117
|
-
* - QUEUED: Task is waiting to be picked up
|
|
118
|
-
* - PENDING: Task is being prepared
|
|
119
|
-
* - CLAIMED: Task has been claimed by a worker
|
|
120
|
-
* - INPROGRESS: Task is actively being executed
|
|
121
|
-
* - SUCCEEDED: Task completed successfully
|
|
122
|
-
* - FAILED: Task failed
|
|
123
|
-
*/
|
|
124
|
-
export type TaskState = 'QUEUED' | 'PENDING' | 'CLAIMED' | 'INPROGRESS' | 'SUCCEEDED' | 'FAILED';
|
|
125
|
-
export interface TaskListResponse {
|
|
126
|
-
page_info: TaskListResponse.PageInfo;
|
|
127
|
-
tasks: Array<TaskItem>;
|
|
128
|
-
}
|
|
129
|
-
export declare namespace TaskListResponse {
|
|
130
|
-
interface PageInfo {
|
|
131
|
-
/**
|
|
132
|
-
* Whether there are more results available
|
|
133
|
-
*/
|
|
134
|
-
has_next_page: boolean;
|
|
135
|
-
/**
|
|
136
|
-
* Opaque cursor for fetching the next page
|
|
137
|
-
*/
|
|
138
|
-
next_cursor?: string;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
export interface TaskListParams {
|
|
142
|
-
/**
|
|
143
|
-
* Filter by agent config name
|
|
144
|
-
*/
|
|
145
|
-
config_name?: string;
|
|
146
|
-
/**
|
|
147
|
-
* Filter tasks created after this timestamp (RFC3339 format)
|
|
148
|
-
*/
|
|
149
|
-
created_after?: string;
|
|
150
|
-
/**
|
|
151
|
-
* Filter tasks created before this timestamp (RFC3339 format)
|
|
152
|
-
*/
|
|
153
|
-
created_before?: string;
|
|
154
|
-
/**
|
|
155
|
-
* Filter by creator UID (user or service account)
|
|
156
|
-
*/
|
|
157
|
-
creator?: string;
|
|
158
|
-
/**
|
|
159
|
-
* Pagination cursor from previous response
|
|
160
|
-
*/
|
|
161
|
-
cursor?: string;
|
|
162
|
-
/**
|
|
163
|
-
* Maximum number of tasks to return
|
|
164
|
-
*/
|
|
165
|
-
limit?: number;
|
|
166
|
-
/**
|
|
167
|
-
* Filter by model ID
|
|
168
|
-
*/
|
|
169
|
-
model_id?: string;
|
|
170
|
-
/**
|
|
171
|
-
* Filter by task source type
|
|
172
|
-
*/
|
|
173
|
-
source?: TaskSourceType;
|
|
174
|
-
/**
|
|
175
|
-
* Filter by task state. Can be specified multiple times to match any of the given
|
|
176
|
-
* states.
|
|
177
|
-
*/
|
|
178
|
-
state?: Array<TaskState>;
|
|
179
|
-
}
|
|
180
|
-
export declare namespace Tasks {
|
|
181
|
-
export { type TaskItem as TaskItem, type TaskSourceType as TaskSourceType, type TaskState as TaskState, type TaskListResponse as TaskListResponse, type TaskListParams as TaskListParams, };
|
|
182
|
-
}
|
|
183
|
-
//# sourceMappingURL=tasks.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tasks.d.mts","sourceRoot":"","sources":["../../src/resources/agent/tasks.ts"],"names":[],"mappings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,GACtC,CAAC;CACH"}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../core/resource.js";
|
|
2
|
-
import * as AgentAPI from "./agent.js";
|
|
3
|
-
import { APIPromise } from "../../core/api-promise.js";
|
|
4
|
-
import { RequestOptions } from "../../internal/request-options.js";
|
|
5
|
-
export declare class Tasks extends APIResource {
|
|
6
|
-
/**
|
|
7
|
-
* Retrieve detailed information about a specific agent task, including the full
|
|
8
|
-
* prompt, session link, and resolved configuration.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```ts
|
|
12
|
-
* const taskItem = await client.agent.tasks.retrieve(
|
|
13
|
-
* 'taskId',
|
|
14
|
-
* );
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
retrieve(taskID: string, options?: RequestOptions): APIPromise<TaskItem>;
|
|
18
|
-
/**
|
|
19
|
-
* Retrieve a paginated list of agent tasks with optional filtering. Results are
|
|
20
|
-
* ordered by creation time (newest first).
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```ts
|
|
24
|
-
* const tasks = await client.agent.tasks.list();
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
list(query?: TaskListParams | null | undefined, options?: RequestOptions): APIPromise<TaskListResponse>;
|
|
28
|
-
}
|
|
29
|
-
export interface TaskItem {
|
|
30
|
-
/**
|
|
31
|
-
* Timestamp when the task was created (RFC3339)
|
|
32
|
-
*/
|
|
33
|
-
created_at: string;
|
|
34
|
-
/**
|
|
35
|
-
* The prompt/instruction for the agent
|
|
36
|
-
*/
|
|
37
|
-
prompt: string;
|
|
38
|
-
/**
|
|
39
|
-
* Current state of the task:
|
|
40
|
-
*
|
|
41
|
-
* - QUEUED: Task is waiting to be picked up
|
|
42
|
-
* - PENDING: Task is being prepared
|
|
43
|
-
* - CLAIMED: Task has been claimed by a worker
|
|
44
|
-
* - INPROGRESS: Task is actively being executed
|
|
45
|
-
* - SUCCEEDED: Task completed successfully
|
|
46
|
-
* - FAILED: Task failed
|
|
47
|
-
*/
|
|
48
|
-
state: TaskState;
|
|
49
|
-
/**
|
|
50
|
-
* Unique identifier for the task
|
|
51
|
-
*/
|
|
52
|
-
task_id: string;
|
|
53
|
-
/**
|
|
54
|
-
* Human-readable title for the task
|
|
55
|
-
*/
|
|
56
|
-
title: string;
|
|
57
|
-
/**
|
|
58
|
-
* Timestamp when the task was last updated (RFC3339)
|
|
59
|
-
*/
|
|
60
|
-
updated_at: string;
|
|
61
|
-
/**
|
|
62
|
-
* Configuration for an ambient agent task
|
|
63
|
-
*/
|
|
64
|
-
agent_config?: AgentAPI.AmbientAgentConfig;
|
|
65
|
-
creator?: TaskItem.Creator;
|
|
66
|
-
/**
|
|
67
|
-
* UUID of the shared session (if available)
|
|
68
|
-
*/
|
|
69
|
-
session_id?: string;
|
|
70
|
-
/**
|
|
71
|
-
* URL to view the agent session
|
|
72
|
-
*/
|
|
73
|
-
session_link?: string;
|
|
74
|
-
/**
|
|
75
|
-
* Source that created the task:
|
|
76
|
-
*
|
|
77
|
-
* - LINEAR: Created from Linear integration
|
|
78
|
-
* - API: Created via the public API
|
|
79
|
-
* - SLACK: Created from Slack integration
|
|
80
|
-
* - LOCAL: Created from local CLI/app
|
|
81
|
-
* - SCHEDULED_AGENT: Created by a scheduled agent
|
|
82
|
-
*/
|
|
83
|
-
source?: TaskSourceType;
|
|
84
|
-
status_message?: TaskItem.StatusMessage;
|
|
85
|
-
}
|
|
86
|
-
export declare namespace TaskItem {
|
|
87
|
-
interface Creator {
|
|
88
|
-
/**
|
|
89
|
-
* Type of the creator principal
|
|
90
|
-
*/
|
|
91
|
-
type?: 'user' | 'service_account';
|
|
92
|
-
/**
|
|
93
|
-
* Unique identifier of the creator
|
|
94
|
-
*/
|
|
95
|
-
uid?: string;
|
|
96
|
-
}
|
|
97
|
-
interface StatusMessage {
|
|
98
|
-
/**
|
|
99
|
-
* Human-readable status message
|
|
100
|
-
*/
|
|
101
|
-
message?: string;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Source that created the task:
|
|
106
|
-
*
|
|
107
|
-
* - LINEAR: Created from Linear integration
|
|
108
|
-
* - API: Created via the public API
|
|
109
|
-
* - SLACK: Created from Slack integration
|
|
110
|
-
* - LOCAL: Created from local CLI/app
|
|
111
|
-
* - SCHEDULED_AGENT: Created by a scheduled agent
|
|
112
|
-
*/
|
|
113
|
-
export type TaskSourceType = 'LINEAR' | 'API' | 'SLACK' | 'LOCAL' | 'SCHEDULED_AGENT';
|
|
114
|
-
/**
|
|
115
|
-
* Current state of the task:
|
|
116
|
-
*
|
|
117
|
-
* - QUEUED: Task is waiting to be picked up
|
|
118
|
-
* - PENDING: Task is being prepared
|
|
119
|
-
* - CLAIMED: Task has been claimed by a worker
|
|
120
|
-
* - INPROGRESS: Task is actively being executed
|
|
121
|
-
* - SUCCEEDED: Task completed successfully
|
|
122
|
-
* - FAILED: Task failed
|
|
123
|
-
*/
|
|
124
|
-
export type TaskState = 'QUEUED' | 'PENDING' | 'CLAIMED' | 'INPROGRESS' | 'SUCCEEDED' | 'FAILED';
|
|
125
|
-
export interface TaskListResponse {
|
|
126
|
-
page_info: TaskListResponse.PageInfo;
|
|
127
|
-
tasks: Array<TaskItem>;
|
|
128
|
-
}
|
|
129
|
-
export declare namespace TaskListResponse {
|
|
130
|
-
interface PageInfo {
|
|
131
|
-
/**
|
|
132
|
-
* Whether there are more results available
|
|
133
|
-
*/
|
|
134
|
-
has_next_page: boolean;
|
|
135
|
-
/**
|
|
136
|
-
* Opaque cursor for fetching the next page
|
|
137
|
-
*/
|
|
138
|
-
next_cursor?: string;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
export interface TaskListParams {
|
|
142
|
-
/**
|
|
143
|
-
* Filter by agent config name
|
|
144
|
-
*/
|
|
145
|
-
config_name?: string;
|
|
146
|
-
/**
|
|
147
|
-
* Filter tasks created after this timestamp (RFC3339 format)
|
|
148
|
-
*/
|
|
149
|
-
created_after?: string;
|
|
150
|
-
/**
|
|
151
|
-
* Filter tasks created before this timestamp (RFC3339 format)
|
|
152
|
-
*/
|
|
153
|
-
created_before?: string;
|
|
154
|
-
/**
|
|
155
|
-
* Filter by creator UID (user or service account)
|
|
156
|
-
*/
|
|
157
|
-
creator?: string;
|
|
158
|
-
/**
|
|
159
|
-
* Pagination cursor from previous response
|
|
160
|
-
*/
|
|
161
|
-
cursor?: string;
|
|
162
|
-
/**
|
|
163
|
-
* Maximum number of tasks to return
|
|
164
|
-
*/
|
|
165
|
-
limit?: number;
|
|
166
|
-
/**
|
|
167
|
-
* Filter by model ID
|
|
168
|
-
*/
|
|
169
|
-
model_id?: string;
|
|
170
|
-
/**
|
|
171
|
-
* Filter by task source type
|
|
172
|
-
*/
|
|
173
|
-
source?: TaskSourceType;
|
|
174
|
-
/**
|
|
175
|
-
* Filter by task state. Can be specified multiple times to match any of the given
|
|
176
|
-
* states.
|
|
177
|
-
*/
|
|
178
|
-
state?: Array<TaskState>;
|
|
179
|
-
}
|
|
180
|
-
export declare namespace Tasks {
|
|
181
|
-
export { type TaskItem as TaskItem, type TaskSourceType as TaskSourceType, type TaskState as TaskState, type TaskListResponse as TaskListResponse, type TaskListParams as TaskListParams, };
|
|
182
|
-
}
|
|
183
|
-
//# sourceMappingURL=tasks.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../../src/resources/agent/tasks.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;IAIxE;;;;;;;;OAQG;IACH,IAAI,CACF,KAAK,GAAE,cAA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