@@ -164,21 +164,6 @@ export namespace ArtifactItem {
164164 }
165165}
166166
167- /**
168- * Resource usage information for the run
169- */
170- export interface RequestUsage {
171- /**
172- * Cost of compute resources for the run
173- */
174- compute_cost ?: number ;
175-
176- /**
177- * Cost of LLM inference for the run
178- */
179- inference_cost ?: number ;
180- }
181-
182167export interface RunItem {
183168 /**
184169 * Timestamp when the run was created (RFC3339)
@@ -264,13 +249,13 @@ export interface RunItem {
264249 /**
265250 * Resource usage information for the run
266251 */
267- request_usage ?: RequestUsage ;
252+ request_usage ?: RunItem . RequestUsage ;
268253
269254 /**
270255 * Information about the schedule that triggered this run (only present for
271256 * scheduled runs)
272257 */
273- schedule ?: ScheduleInfo ;
258+ schedule ?: RunItem . Schedule ;
274259
275260 /**
276261 * Ownership scope for a resource (team or personal)
@@ -311,7 +296,7 @@ export interface RunItem {
311296 * Status message for a run. For terminal error states, includes structured error
312297 * code and retryability info from the platform error catalog.
313298 */
314- status_message ?: RunStatusMessage ;
299+ status_message ?: RunItem . StatusMessage ;
315300}
316301
317302export namespace RunItem {
@@ -340,6 +325,90 @@ export namespace RunItem {
340325 */
341326 name ?: string ;
342327 }
328+
329+ /**
330+ * Resource usage information for the run
331+ */
332+ export interface RequestUsage {
333+ /**
334+ * Cost of compute resources for the run
335+ */
336+ compute_cost ?: number ;
337+
338+ /**
339+ * Cost of LLM inference for the run
340+ */
341+ inference_cost ?: number ;
342+ }
343+
344+ /**
345+ * Information about the schedule that triggered this run (only present for
346+ * scheduled runs)
347+ */
348+ export interface Schedule {
349+ /**
350+ * Cron expression at the time the run was created
351+ */
352+ cron_schedule : string ;
353+
354+ /**
355+ * Unique identifier for the schedule
356+ */
357+ schedule_id : string ;
358+
359+ /**
360+ * Name of the schedule at the time the run was created
361+ */
362+ schedule_name : string ;
363+ }
364+
365+ /**
366+ * Status message for a run. For terminal error states, includes structured error
367+ * code and retryability info from the platform error catalog.
368+ */
369+ export interface StatusMessage {
370+ /**
371+ * Human-readable status message
372+ */
373+ message : string ;
374+
375+ /**
376+ * Machine-readable error code identifying the problem type. Used in the `type` URI
377+ * of Error responses and in the `error_code` field of RunStatusMessage.
378+ *
379+ * User errors (run transitions to FAILED):
380+ *
381+ * - `insufficient_credits` — Team has no remaining add-on credits
382+ * - `feature_not_available` — Required feature not enabled for user's plan
383+ * - `external_authentication_required` — User hasn't authorized a required
384+ * external service
385+ * - `not_authorized` — Principal lacks permission for the requested operation
386+ * - `invalid_request` — Request is malformed or contains invalid parameters
387+ * - `resource_not_found` — Referenced resource does not exist
388+ * - `budget_exceeded` — Spending budget limit has been reached
389+ * - `integration_disabled` — Integration is disabled and must be enabled
390+ * - `integration_not_configured` — Integration setup is incomplete
391+ * - `operation_not_supported` — Requested operation not supported for this
392+ * resource/state
393+ * - `environment_setup_failed` — Client-side environment setup failed
394+ * - `content_policy_violation` — Prompt or setup commands violated content policy
395+ * - `conflict` — Request conflicts with the current state of the resource
396+ *
397+ * Warp errors (run transitions to ERROR):
398+ *
399+ * - `authentication_required` — Request lacks valid authentication credentials
400+ * - `resource_unavailable` — Transient infrastructure issue (retryable)
401+ * - `internal_error` — Unexpected server-side error (retryable)
402+ */
403+ error_code ?: AgentAPI . ErrorCode ;
404+
405+ /**
406+ * Whether the error is transient and the client may retry by submitting a new run.
407+ * Only present on terminal error states. When false, retrying without addressing
408+ * the underlying cause will not succeed.
409+ */
410+ retryable ?: boolean ;
411+ }
343412}
344413
345414/**
@@ -390,75 +459,6 @@ export type RunState =
390459 | 'ERROR'
391460 | 'CANCELLED' ;
392461
393- /**
394- * Status message for a run. For terminal error states, includes structured error
395- * code and retryability info from the platform error catalog.
396- */
397- export interface RunStatusMessage {
398- /**
399- * Human-readable status message
400- */
401- message : string ;
402-
403- /**
404- * Machine-readable error code identifying the problem type. Used in the `type` URI
405- * of Error responses and in the `error_code` field of RunStatusMessage.
406- *
407- * User errors (run transitions to FAILED):
408- *
409- * - `insufficient_credits` — Team has no remaining add-on credits
410- * - `feature_not_available` — Required feature not enabled for user's plan
411- * - `external_authentication_required` — User hasn't authorized a required
412- * external service
413- * - `not_authorized` — Principal lacks permission for the requested operation
414- * - `invalid_request` — Request is malformed or contains invalid parameters
415- * - `resource_not_found` — Referenced resource does not exist
416- * - `budget_exceeded` — Spending budget limit has been reached
417- * - `integration_disabled` — Integration is disabled and must be enabled
418- * - `integration_not_configured` — Integration setup is incomplete
419- * - `operation_not_supported` — Requested operation not supported for this
420- * resource/state
421- * - `environment_setup_failed` — Client-side environment setup failed
422- * - `content_policy_violation` — Prompt or setup commands violated content policy
423- * - `conflict` — Request conflicts with the current state of the resource
424- *
425- * Warp errors (run transitions to ERROR):
426- *
427- * - `authentication_required` — Request lacks valid authentication credentials
428- * - `resource_unavailable` — Transient infrastructure issue (retryable)
429- * - `internal_error` — Unexpected server-side error (retryable)
430- */
431- error_code ?: AgentAPI . ErrorCode ;
432-
433- /**
434- * Whether the error is transient and the client may retry by submitting a new run.
435- * Only present on terminal error states. When false, retrying without addressing
436- * the underlying cause will not succeed.
437- */
438- retryable ?: boolean ;
439- }
440-
441- /**
442- * Information about the schedule that triggered this run (only present for
443- * scheduled runs)
444- */
445- export interface ScheduleInfo {
446- /**
447- * Cron expression at the time the run was created
448- */
449- cron_schedule : string ;
450-
451- /**
452- * Unique identifier for the schedule
453- */
454- schedule_id : string ;
455-
456- /**
457- * Name of the schedule at the time the run was created
458- */
459- schedule_name : string ;
460- }
461-
462462/**
463463 * The ID of the cancelled run
464464 */
@@ -561,12 +561,9 @@ export interface RunListParams extends RunsCursorPageParams {
561561export declare namespace Runs {
562562 export {
563563 type ArtifactItem as ArtifactItem ,
564- type RequestUsage as RequestUsage ,
565564 type RunItem as RunItem ,
566565 type RunSourceType as RunSourceType ,
567566 type RunState as RunState ,
568- type RunStatusMessage as RunStatusMessage ,
569- type ScheduleInfo as ScheduleInfo ,
570567 type RunCancelResponse as RunCancelResponse ,
571568 type RunItemsRunsCursorPage as RunItemsRunsCursorPage ,
572569 type RunListParams as RunListParams ,
0 commit comments