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.
Files changed (48) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +2 -2
  3. package/package.json +1 -1
  4. package/resources/agent/agent.d.mts +25 -21
  5. package/resources/agent/agent.d.mts.map +1 -1
  6. package/resources/agent/agent.d.ts +25 -21
  7. package/resources/agent/agent.d.ts.map +1 -1
  8. package/resources/agent/agent.js +5 -5
  9. package/resources/agent/agent.js.map +1 -1
  10. package/resources/agent/agent.mjs +5 -5
  11. package/resources/agent/agent.mjs.map +1 -1
  12. package/resources/agent/index.d.mts +1 -1
  13. package/resources/agent/index.d.mts.map +1 -1
  14. package/resources/agent/index.d.ts +1 -1
  15. package/resources/agent/index.d.ts.map +1 -1
  16. package/resources/agent/index.js +3 -3
  17. package/resources/agent/index.js.map +1 -1
  18. package/resources/agent/index.mjs +1 -1
  19. package/resources/agent/index.mjs.map +1 -1
  20. package/resources/agent/runs.d.mts +222 -0
  21. package/resources/agent/runs.d.mts.map +1 -0
  22. package/resources/agent/runs.d.ts +222 -0
  23. package/resources/agent/runs.d.ts.map +1 -0
  24. package/resources/agent/runs.js +34 -0
  25. package/resources/agent/runs.js.map +1 -0
  26. package/resources/agent/runs.mjs +30 -0
  27. package/resources/agent/runs.mjs.map +1 -0
  28. package/src/resources/agent/agent.ts +32 -27
  29. package/src/resources/agent/index.ts +7 -7
  30. package/src/resources/agent/runs.ts +276 -0
  31. package/src/version.ts +1 -1
  32. package/version.d.mts +1 -1
  33. package/version.d.mts.map +1 -1
  34. package/version.d.ts +1 -1
  35. package/version.d.ts.map +1 -1
  36. package/version.js +1 -1
  37. package/version.js.map +1 -1
  38. package/version.mjs +1 -1
  39. package/version.mjs.map +1 -1
  40. package/resources/agent/tasks.d.mts +0 -183
  41. package/resources/agent/tasks.d.mts.map +0 -1
  42. package/resources/agent/tasks.d.ts +0 -183
  43. package/resources/agent/tasks.d.ts.map +0 -1
  44. package/resources/agent/tasks.js +0 -36
  45. package/resources/agent/tasks.js.map +0 -1
  46. package/resources/agent/tasks.mjs +0 -32
  47. package/resources/agent/tasks.mjs.map +0 -1
  48. package/src/resources/agent/tasks.ts +0 -231
@@ -1,36 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Tasks = void 0;
5
- const resource_1 = require("../../core/resource.js");
6
- const path_1 = require("../../internal/utils/path.js");
7
- class Tasks extends resource_1.APIResource {
8
- /**
9
- * Retrieve detailed information about a specific agent task, including the full
10
- * prompt, session link, and resolved configuration.
11
- *
12
- * @example
13
- * ```ts
14
- * const taskItem = await client.agent.tasks.retrieve(
15
- * 'taskId',
16
- * );
17
- * ```
18
- */
19
- retrieve(taskID, options) {
20
- return this._client.get((0, path_1.path) `/agent/tasks/${taskID}`, options);
21
- }
22
- /**
23
- * Retrieve a paginated list of agent tasks with optional filtering. Results are
24
- * ordered by creation time (newest first).
25
- *
26
- * @example
27
- * ```ts
28
- * const tasks = await client.agent.tasks.list();
29
- * ```
30
- */
31
- list(query = {}, options) {
32
- return this._client.get('/agent/tasks', { query, ...options });
33
- }
34
- }
35
- exports.Tasks = Tasks;
36
- //# sourceMappingURL=tasks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../src/resources/agent/tasks.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,uDAAiD;AAEjD,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,MAAc,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,gBAAgB,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;CACF;AA/BD,sBA+BC"}
@@ -1,32 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../../core/resource.mjs";
3
- import { path } from "../../internal/utils/path.mjs";
4
- export class Tasks extends APIResource {
5
- /**
6
- * Retrieve detailed information about a specific agent task, including the full
7
- * prompt, session link, and resolved configuration.
8
- *
9
- * @example
10
- * ```ts
11
- * const taskItem = await client.agent.tasks.retrieve(
12
- * 'taskId',
13
- * );
14
- * ```
15
- */
16
- retrieve(taskID, options) {
17
- return this._client.get(path `/agent/tasks/${taskID}`, options);
18
- }
19
- /**
20
- * Retrieve a paginated list of agent tasks with optional filtering. Results are
21
- * ordered by creation time (newest first).
22
- *
23
- * @example
24
- * ```ts
25
- * const tasks = await client.agent.tasks.list();
26
- * ```
27
- */
28
- list(query = {}, options) {
29
- return this._client.get('/agent/tasks', { query, ...options });
30
- }
31
- }
32
- //# sourceMappingURL=tasks.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tasks.mjs","sourceRoot":"","sources":["../../src/resources/agent/tasks.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,MAAc,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,gBAAgB,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;CACF"}
@@ -1,231 +0,0 @@
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 Tasks extends APIResource {
10
- /**
11
- * Retrieve detailed information about a specific agent task, including the full
12
- * prompt, session link, and resolved configuration.
13
- *
14
- * @example
15
- * ```ts
16
- * const taskItem = await client.agent.tasks.retrieve(
17
- * 'taskId',
18
- * );
19
- * ```
20
- */
21
- retrieve(taskID: string, options?: RequestOptions): APIPromise<TaskItem> {
22
- return this._client.get(path`/agent/tasks/${taskID}`, options);
23
- }
24
-
25
- /**
26
- * Retrieve a paginated list of agent tasks with optional filtering. Results are
27
- * ordered by creation time (newest first).
28
- *
29
- * @example
30
- * ```ts
31
- * const tasks = await client.agent.tasks.list();
32
- * ```
33
- */
34
- list(
35
- query: TaskListParams | null | undefined = {},
36
- options?: RequestOptions,
37
- ): APIPromise<TaskListResponse> {
38
- return this._client.get('/agent/tasks', { query, ...options });
39
- }
40
- }
41
-
42
- export interface TaskItem {
43
- /**
44
- * Timestamp when the task was created (RFC3339)
45
- */
46
- created_at: string;
47
-
48
- /**
49
- * The prompt/instruction for the agent
50
- */
51
- prompt: string;
52
-
53
- /**
54
- * Current state of the task:
55
- *
56
- * - QUEUED: Task is waiting to be picked up
57
- * - PENDING: Task is being prepared
58
- * - CLAIMED: Task has been claimed by a worker
59
- * - INPROGRESS: Task is actively being executed
60
- * - SUCCEEDED: Task completed successfully
61
- * - FAILED: Task failed
62
- */
63
- state: TaskState;
64
-
65
- /**
66
- * Unique identifier for the task
67
- */
68
- task_id: string;
69
-
70
- /**
71
- * Human-readable title for the task
72
- */
73
- title: string;
74
-
75
- /**
76
- * Timestamp when the task was last updated (RFC3339)
77
- */
78
- updated_at: string;
79
-
80
- /**
81
- * Configuration for an ambient agent task
82
- */
83
- agent_config?: AgentAPI.AmbientAgentConfig;
84
-
85
- creator?: TaskItem.Creator;
86
-
87
- /**
88
- * UUID of the shared session (if available)
89
- */
90
- session_id?: string;
91
-
92
- /**
93
- * URL to view the agent session
94
- */
95
- session_link?: string;
96
-
97
- /**
98
- * Source that created the task:
99
- *
100
- * - LINEAR: Created from Linear integration
101
- * - API: Created via the public API
102
- * - SLACK: Created from Slack integration
103
- * - LOCAL: Created from local CLI/app
104
- * - SCHEDULED_AGENT: Created by a scheduled agent
105
- */
106
- source?: TaskSourceType;
107
-
108
- status_message?: TaskItem.StatusMessage;
109
- }
110
-
111
- export namespace TaskItem {
112
- export interface Creator {
113
- /**
114
- * Type of the creator principal
115
- */
116
- type?: 'user' | 'service_account';
117
-
118
- /**
119
- * Unique identifier of the creator
120
- */
121
- uid?: string;
122
- }
123
-
124
- export interface StatusMessage {
125
- /**
126
- * Human-readable status message
127
- */
128
- message?: string;
129
- }
130
- }
131
-
132
- /**
133
- * Source that created the task:
134
- *
135
- * - LINEAR: Created from Linear integration
136
- * - API: Created via the public API
137
- * - SLACK: Created from Slack integration
138
- * - LOCAL: Created from local CLI/app
139
- * - SCHEDULED_AGENT: Created by a scheduled agent
140
- */
141
- export type TaskSourceType = 'LINEAR' | 'API' | 'SLACK' | 'LOCAL' | 'SCHEDULED_AGENT';
142
-
143
- /**
144
- * Current state of the task:
145
- *
146
- * - QUEUED: Task is waiting to be picked up
147
- * - PENDING: Task is being prepared
148
- * - CLAIMED: Task has been claimed by a worker
149
- * - INPROGRESS: Task is actively being executed
150
- * - SUCCEEDED: Task completed successfully
151
- * - FAILED: Task failed
152
- */
153
- export type TaskState = 'QUEUED' | 'PENDING' | 'CLAIMED' | 'INPROGRESS' | 'SUCCEEDED' | 'FAILED';
154
-
155
- export interface TaskListResponse {
156
- page_info: TaskListResponse.PageInfo;
157
-
158
- tasks: Array<TaskItem>;
159
- }
160
-
161
- export namespace TaskListResponse {
162
- export interface PageInfo {
163
- /**
164
- * Whether there are more results available
165
- */
166
- has_next_page: boolean;
167
-
168
- /**
169
- * Opaque cursor for fetching the next page
170
- */
171
- next_cursor?: string;
172
- }
173
- }
174
-
175
- export interface TaskListParams {
176
- /**
177
- * Filter by agent config name
178
- */
179
- config_name?: string;
180
-
181
- /**
182
- * Filter tasks created after this timestamp (RFC3339 format)
183
- */
184
- created_after?: string;
185
-
186
- /**
187
- * Filter tasks created before this timestamp (RFC3339 format)
188
- */
189
- created_before?: string;
190
-
191
- /**
192
- * Filter by creator UID (user or service account)
193
- */
194
- creator?: string;
195
-
196
- /**
197
- * Pagination cursor from previous response
198
- */
199
- cursor?: string;
200
-
201
- /**
202
- * Maximum number of tasks to return
203
- */
204
- limit?: number;
205
-
206
- /**
207
- * Filter by model ID
208
- */
209
- model_id?: string;
210
-
211
- /**
212
- * Filter by task source type
213
- */
214
- source?: TaskSourceType;
215
-
216
- /**
217
- * Filter by task state. Can be specified multiple times to match any of the given
218
- * states.
219
- */
220
- state?: Array<TaskState>;
221
- }
222
-
223
- export declare namespace Tasks {
224
- export {
225
- type TaskItem as TaskItem,
226
- type TaskSourceType as TaskSourceType,
227
- type TaskState as TaskState,
228
- type TaskListResponse as TaskListResponse,
229
- type TaskListParams as TaskListParams,
230
- };
231
- }