casedev 0.22.1 → 0.23.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 (57) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +1 -1
  3. package/resources/agent/v1/agents.d.mts +33 -4
  4. package/resources/agent/v1/agents.d.mts.map +1 -1
  5. package/resources/agent/v1/agents.d.ts +33 -4
  6. package/resources/agent/v1/agents.d.ts.map +1 -1
  7. package/resources/agent/v1/agents.js +5 -2
  8. package/resources/agent/v1/agents.js.map +1 -1
  9. package/resources/agent/v1/agents.mjs +5 -2
  10. package/resources/agent/v1/agents.mjs.map +1 -1
  11. package/resources/agent/v1/chat.d.mts +63 -26
  12. package/resources/agent/v1/chat.d.mts.map +1 -1
  13. package/resources/agent/v1/chat.d.ts +63 -26
  14. package/resources/agent/v1/chat.d.ts.map +1 -1
  15. package/resources/agent/v1/chat.js +31 -23
  16. package/resources/agent/v1/chat.js.map +1 -1
  17. package/resources/agent/v1/chat.mjs +31 -23
  18. package/resources/agent/v1/chat.mjs.map +1 -1
  19. package/resources/agent/v1/execute.d.mts +16 -3
  20. package/resources/agent/v1/execute.d.mts.map +1 -1
  21. package/resources/agent/v1/execute.d.ts +16 -3
  22. package/resources/agent/v1/execute.d.ts.map +1 -1
  23. package/resources/agent/v1/execute.js +10 -0
  24. package/resources/agent/v1/execute.js.map +1 -1
  25. package/resources/agent/v1/execute.mjs +10 -0
  26. package/resources/agent/v1/execute.mjs.map +1 -1
  27. package/resources/agent/v1/index.d.mts +3 -3
  28. package/resources/agent/v1/index.d.mts.map +1 -1
  29. package/resources/agent/v1/index.d.ts +3 -3
  30. package/resources/agent/v1/index.d.ts.map +1 -1
  31. package/resources/agent/v1/index.js.map +1 -1
  32. package/resources/agent/v1/index.mjs.map +1 -1
  33. package/resources/agent/v1/run.d.mts +57 -1
  34. package/resources/agent/v1/run.d.mts.map +1 -1
  35. package/resources/agent/v1/run.d.ts +57 -1
  36. package/resources/agent/v1/run.d.ts.map +1 -1
  37. package/resources/agent/v1/run.js +10 -0
  38. package/resources/agent/v1/run.js.map +1 -1
  39. package/resources/agent/v1/run.mjs +10 -0
  40. package/resources/agent/v1/run.mjs.map +1 -1
  41. package/resources/agent/v1/v1.d.mts +6 -6
  42. package/resources/agent/v1/v1.d.mts.map +1 -1
  43. package/resources/agent/v1/v1.d.ts +6 -6
  44. package/resources/agent/v1/v1.d.ts.map +1 -1
  45. package/resources/agent/v1/v1.js.map +1 -1
  46. package/resources/agent/v1/v1.mjs.map +1 -1
  47. package/src/resources/agent/v1/agents.ts +41 -4
  48. package/src/resources/agent/v1/chat.ts +65 -43
  49. package/src/resources/agent/v1/execute.ts +16 -3
  50. package/src/resources/agent/v1/index.ts +3 -2
  51. package/src/resources/agent/v1/run.ts +77 -0
  52. package/src/resources/agent/v1/v1.ts +6 -4
  53. package/src/version.ts +1 -1
  54. package/version.d.mts +1 -1
  55. package/version.d.ts +1 -1
  56. package/version.js +1 -1
  57. package/version.mjs +1 -1
@@ -7,6 +7,9 @@ import { buildHeaders } from '../../../internal/headers';
7
7
  import { RequestOptions } from '../../../internal/request-options';
8
8
  import { path } from '../../../internal/utils/path';
9
9
 
10
+ /**
11
+ * Create, manage, and execute AI agents with tool access, sandbox environments, and async run workflows
12
+ */
10
13
  export class Run extends APIResource {
11
14
  /**
12
15
  * Creates a run in queued state. Call POST /agent/v1/run/:id/exec to start
@@ -16,6 +19,14 @@ export class Run extends APIResource {
16
19
  return this._client.post('/agent/v1/run', { body, ...options });
17
20
  }
18
21
 
22
+ /**
23
+ * Lists agent runs for the authenticated organization. Supports filtering by
24
+ * agent, status, and cursor-based pagination.
25
+ */
26
+ list(query: RunListParams | null | undefined = {}, options?: RequestOptions): APIPromise<RunListResponse> {
27
+ return this._client.get('/agent/v1/run', { query, ...options });
28
+ }
29
+
19
30
  /**
20
31
  * Cancels a running or queued run. Idempotent — cancelling a finished run returns
21
32
  * its current status.
@@ -85,6 +96,40 @@ export interface RunCreateResponse {
85
96
  status?: 'queued';
86
97
  }
87
98
 
99
+ export interface RunListResponse {
100
+ hasMore?: boolean;
101
+
102
+ /**
103
+ * Pass as cursor to fetch the next page
104
+ */
105
+ nextCursor?: string | null;
106
+
107
+ runs?: Array<RunListResponse.Run>;
108
+ }
109
+
110
+ export namespace RunListResponse {
111
+ export interface Run {
112
+ id?: string;
113
+
114
+ agentId?: string;
115
+
116
+ completedAt?: string | null;
117
+
118
+ createdAt?: string;
119
+
120
+ model?: string | null;
121
+
122
+ /**
123
+ * Truncated to first 200 characters
124
+ */
125
+ prompt?: string;
126
+
127
+ startedAt?: string | null;
128
+
129
+ status?: 'queued' | 'running' | 'completed' | 'failed' | 'cancelled';
130
+ }
131
+ }
132
+
88
133
  export interface RunCancelResponse {
89
134
  id?: string;
90
135
 
@@ -311,6 +356,13 @@ export interface RunCreateParams {
311
356
  */
312
357
  prompt: string;
313
358
 
359
+ /**
360
+ * HTTPS callback URL to receive a notification when the run completes. Registered
361
+ * atomically with the run — eliminates the race condition of calling /watch after
362
+ * /exec. Additional watchers can still be added via POST /run/:id/watch.
363
+ */
364
+ callbackUrl?: string | null;
365
+
314
366
  /**
315
367
  * Additional guidance for this run
316
368
  */
@@ -328,6 +380,29 @@ export interface RunCreateParams {
328
380
  objectIds?: Array<string> | null;
329
381
  }
330
382
 
383
+ export interface RunListParams {
384
+ /**
385
+ * Filter by agent ID
386
+ */
387
+ agentId?: string;
388
+
389
+ /**
390
+ * Pagination cursor (run ID from previous page). Returns runs created before this
391
+ * run.
392
+ */
393
+ cursor?: string;
394
+
395
+ /**
396
+ * Maximum number of runs to return (default 50, max 250)
397
+ */
398
+ limit?: number;
399
+
400
+ /**
401
+ * Filter by run status
402
+ */
403
+ status?: 'queued' | 'running' | 'completed' | 'failed' | 'cancelled';
404
+ }
405
+
331
406
  export interface RunEventsParams {
332
407
  /**
333
408
  * Replay events after this sequence number
@@ -345,6 +420,7 @@ export interface RunWatchParams {
345
420
  export declare namespace Run {
346
421
  export {
347
422
  type RunCreateResponse as RunCreateResponse,
423
+ type RunListResponse as RunListResponse,
348
424
  type RunCancelResponse as RunCancelResponse,
349
425
  type RunEventsResponse as RunEventsResponse,
350
426
  type RunExecResponse as RunExecResponse,
@@ -352,6 +428,7 @@ export declare namespace Run {
352
428
  type RunGetStatusResponse as RunGetStatusResponse,
353
429
  type RunWatchResponse as RunWatchResponse,
354
430
  type RunCreateParams as RunCreateParams,
431
+ type RunListParams as RunListParams,
355
432
  type RunEventsParams as RunEventsParams,
356
433
  type RunWatchParams as RunWatchParams,
357
434
  };
@@ -6,6 +6,7 @@ import {
6
6
  AgentCreateParams,
7
7
  AgentCreateResponse,
8
8
  AgentDeleteResponse,
9
+ AgentListParams,
9
10
  AgentListResponse,
10
11
  AgentRetrieveResponse,
11
12
  AgentUpdateParams,
@@ -25,8 +26,6 @@ import {
25
26
  ChatSendMessageParams,
26
27
  ChatStreamParams,
27
28
  ChatStreamResponse,
28
- ChatUiStreamParams,
29
- ChatUiStreamResponse,
30
29
  } from './chat';
31
30
  import * as ExecuteAPI from './execute';
32
31
  import { Execute, ExecuteCreateParams, ExecuteCreateResponse } from './execute';
@@ -41,6 +40,8 @@ import {
41
40
  RunExecResponse,
42
41
  RunGetDetailsResponse,
43
42
  RunGetStatusResponse,
43
+ RunListParams,
44
+ RunListResponse,
44
45
  RunWatchParams,
45
46
  RunWatchResponse,
46
47
  } from './run';
@@ -67,11 +68,13 @@ export declare namespace V1 {
67
68
  type AgentDeleteResponse as AgentDeleteResponse,
68
69
  type AgentCreateParams as AgentCreateParams,
69
70
  type AgentUpdateParams as AgentUpdateParams,
71
+ type AgentListParams as AgentListParams,
70
72
  };
71
73
 
72
74
  export {
73
75
  Run as Run,
74
76
  type RunCreateResponse as RunCreateResponse,
77
+ type RunListResponse as RunListResponse,
75
78
  type RunCancelResponse as RunCancelResponse,
76
79
  type RunEventsResponse as RunEventsResponse,
77
80
  type RunExecResponse as RunExecResponse,
@@ -79,6 +82,7 @@ export declare namespace V1 {
79
82
  type RunGetStatusResponse as RunGetStatusResponse,
80
83
  type RunWatchResponse as RunWatchResponse,
81
84
  type RunCreateParams as RunCreateParams,
85
+ type RunListParams as RunListParams,
82
86
  type RunEventsParams as RunEventsParams,
83
87
  type RunWatchParams as RunWatchParams,
84
88
  };
@@ -96,12 +100,10 @@ export declare namespace V1 {
96
100
  type ChatCancelResponse as ChatCancelResponse,
97
101
  type ChatRespondResponse as ChatRespondResponse,
98
102
  type ChatStreamResponse as ChatStreamResponse,
99
- type ChatUiStreamResponse as ChatUiStreamResponse,
100
103
  type ChatCreateParams as ChatCreateParams,
101
104
  type ChatReplyToQuestionParams as ChatReplyToQuestionParams,
102
105
  type ChatRespondParams as ChatRespondParams,
103
106
  type ChatSendMessageParams as ChatSendMessageParams,
104
107
  type ChatStreamParams as ChatStreamParams,
105
- type ChatUiStreamParams as ChatUiStreamParams,
106
108
  };
107
109
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.22.1'; // x-release-please-version
1
+ export const VERSION = '0.23.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.22.1";
1
+ export declare const VERSION = "0.23.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.22.1";
1
+ export declare const VERSION = "0.23.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.22.1'; // x-release-please-version
4
+ exports.VERSION = '0.23.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.22.1'; // x-release-please-version
1
+ export const VERSION = '0.23.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map