From 21ffbe5a1701d518ab01fd6331e3388243926472 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 5 Mar 2026 09:23:10 +0000
Subject: [PATCH 1/5] fix: fix request delays for retrying to be more
respectful of high requested delays
---
src/client.ts | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/client.ts b/src/client.ts
index 16476f2..ac39f9c 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -570,9 +570,9 @@ export class OzAPI {
}
}
- // If the API asks us to wait a certain amount of time (and it's a reasonable amount),
- // just do what it says, but otherwise calculate a default
- if (!(timeoutMillis && 0 <= timeoutMillis && timeoutMillis < 60 * 1000)) {
+ // If the API asks us to wait a certain amount of time, just do what it
+ // says, but otherwise calculate a default
+ if (timeoutMillis === undefined) {
const maxRetries = options.maxRetries ?? this.maxRetries;
timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);
}
From d584cc67d3739aa2b690732e4e936fe5d3f22b41 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 6 Mar 2026 20:08:50 +0000
Subject: [PATCH 2/5] feat(api): sorting
---
.stats.yml | 6 +-
api.md | 4 -
src/client.ts | 6 --
src/resources/agent/agent.ts | 122 -------------------------
src/resources/agent/index.ts | 4 -
src/resources/agent/runs.ts | 77 ++++++----------
src/resources/agent/schedules.ts | 52 +++++++----
src/resources/index.ts | 3 -
tests/api-resources/agent/runs.test.ts | 2 +
9 files changed, 68 insertions(+), 208 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 9573a11..b4d4de8 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 14
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-39e18bbb8b0af73eca7a880f56afbdecd69e3e5bab82a04c4d6429c32d7e6727.yml
-openapi_spec_hash: 7a0de988bb37416d6e80f4a4bbe9d0d0
-config_hash: 38ab203e1bd97a9bb22bbf744bcb5808
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-a368122275968e270e3e786e6cf176ae87aa56ef85e3270ed59da99c87996dc8.yml
+openapi_spec_hash: 86cab7da7cb620fc90482f50d92acf70
+config_hash: 25c1059aa958c8c2ad60ef16c318514d
diff --git a/api.md b/api.md
index 77aa9ca..41d7ab6 100644
--- a/api.md
+++ b/api.md
@@ -5,10 +5,7 @@ Types:
- AgentSkill
- AmbientAgentConfig
- CloudEnvironmentConfig
-- Error
-- ErrorCode
- McpServerConfig
-- Scope
- UserProfile
- AgentListResponse
- AgentGetArtifactResponse
@@ -41,7 +38,6 @@ Methods:
Types:
-- ScheduledAgentHistoryItem
- ScheduledAgentItem
- ScheduleListResponse
- ScheduleDeleteResponse
diff --git a/src/client.ts b/src/client.ts
index ac39f9c..5a85b4e 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -27,10 +27,7 @@ import {
AgentSkill,
AmbientAgentConfig,
CloudEnvironmentConfig,
- Error,
- ErrorCode,
McpServerConfig,
- Scope,
UserProfile,
} from './resources/agent/agent';
import { type Fetch } from './internal/builtin-types';
@@ -746,10 +743,7 @@ export declare namespace OzAPI {
type AgentSkill as AgentSkill,
type AmbientAgentConfig as AmbientAgentConfig,
type CloudEnvironmentConfig as CloudEnvironmentConfig,
- type Error as Error,
- type ErrorCode as ErrorCode,
type McpServerConfig as McpServerConfig,
- type Scope as Scope,
type UserProfile as UserProfile,
type AgentListResponse as AgentListResponse,
type AgentGetArtifactResponse as AgentGetArtifactResponse,
diff --git a/src/resources/agent/agent.ts b/src/resources/agent/agent.ts
index 938ea67..1e7d4ba 100644
--- a/src/resources/agent/agent.ts
+++ b/src/resources/agent/agent.ts
@@ -18,7 +18,6 @@ import {
ScheduleDeleteResponse,
ScheduleListResponse,
ScheduleUpdateParams,
- ScheduledAgentHistoryItem,
ScheduledAgentItem,
Schedules,
} from './schedules';
@@ -262,108 +261,6 @@ export namespace CloudEnvironmentConfig {
}
}
-/**
- * Error response following RFC 7807 (Problem Details for HTTP APIs). Includes
- * backward-compatible extension members.
- *
- * The response uses the `application/problem+json` content type. Additional
- * extension members (e.g., `auth_url`, `provider`) may be present depending on the
- * error code.
- */
-export interface Error {
- /**
- * Human-readable error message combining title and detail. Backward-compatible
- * extension member for older clients.
- */
- error: string;
-
- /**
- * The HTTP status code for this occurrence of the problem (RFC 7807)
- */
- status: number;
-
- /**
- * A short, human-readable summary of the problem type (RFC 7807)
- */
- title: string;
-
- /**
- * A URI reference that identifies the problem type (RFC 7807). Format:
- * `https://docs.warp.dev/agent-platform/troubleshooting/errors/{error_code}` See
- * PlatformErrorCode for the list of possible error codes.
- */
- type: string;
-
- /**
- * A human-readable explanation specific to this occurrence of the problem
- * (RFC 7807)
- */
- detail?: string;
-
- /**
- * The request path that generated this error (RFC 7807)
- */
- instance?: string;
-
- /**
- * Whether the request can be retried. When true, the error is transient and the
- * request may be retried. When false, retrying without addressing the underlying
- * cause will not succeed.
- */
- retryable?: boolean;
-
- /**
- * OpenTelemetry trace ID for debugging and support requests
- */
- trace_id?: string;
-}
-
-/**
- * Machine-readable error code identifying the problem type. Used in the `type` URI
- * of Error responses and in the `error_code` field of RunStatusMessage.
- *
- * User errors (run transitions to FAILED):
- *
- * - `insufficient_credits` — Team has no remaining add-on credits
- * - `feature_not_available` — Required feature not enabled for user's plan
- * - `external_authentication_required` — User hasn't authorized a required
- * external service
- * - `not_authorized` — Principal lacks permission for the requested operation
- * - `invalid_request` — Request is malformed or contains invalid parameters
- * - `resource_not_found` — Referenced resource does not exist
- * - `budget_exceeded` — Spending budget limit has been reached
- * - `integration_disabled` — Integration is disabled and must be enabled
- * - `integration_not_configured` — Integration setup is incomplete
- * - `operation_not_supported` — Requested operation not supported for this
- * resource/state
- * - `environment_setup_failed` — Client-side environment setup failed
- * - `content_policy_violation` — Prompt or setup commands violated content policy
- * - `conflict` — Request conflicts with the current state of the resource
- *
- * Warp errors (run transitions to ERROR):
- *
- * - `authentication_required` — Request lacks valid authentication credentials
- * - `resource_unavailable` — Transient infrastructure issue (retryable)
- * - `internal_error` — Unexpected server-side error (retryable)
- */
-export type ErrorCode =
- | 'insufficient_credits'
- | 'feature_not_available'
- | 'external_authentication_required'
- | 'not_authorized'
- | 'invalid_request'
- | 'resource_not_found'
- | 'budget_exceeded'
- | 'integration_disabled'
- | 'integration_not_configured'
- | 'operation_not_supported'
- | 'environment_setup_failed'
- | 'content_policy_violation'
- | 'conflict'
- | 'authentication_required'
- | 'resource_unavailable'
- | 'internal_error';
-
/**
* Configuration for an MCP server. Must have exactly one of: warp_id, command, or
* url.
@@ -400,21 +297,6 @@ export interface McpServerConfig {
warp_id?: string;
}
-/**
- * Ownership scope for a resource (team or personal)
- */
-export interface Scope {
- /**
- * Type of ownership ("User" for personal, "Team" for team-owned)
- */
- type: 'User' | 'Team';
-
- /**
- * UID of the owning user or team
- */
- uid?: string;
-}
-
export interface UserProfile {
/**
* Display name of the creator
@@ -645,10 +527,7 @@ export declare namespace Agent {
type AgentSkill as AgentSkill,
type AmbientAgentConfig as AmbientAgentConfig,
type CloudEnvironmentConfig as CloudEnvironmentConfig,
- type Error as Error,
- type ErrorCode as ErrorCode,
type McpServerConfig as McpServerConfig,
- type Scope as Scope,
type UserProfile as UserProfile,
type AgentListResponse as AgentListResponse,
type AgentGetArtifactResponse as AgentGetArtifactResponse,
@@ -670,7 +549,6 @@ export declare namespace Agent {
export {
Schedules as Schedules,
- type ScheduledAgentHistoryItem as ScheduledAgentHistoryItem,
type ScheduledAgentItem as ScheduledAgentItem,
type ScheduleListResponse as ScheduleListResponse,
type ScheduleDeleteResponse as ScheduleDeleteResponse,
diff --git a/src/resources/agent/index.ts b/src/resources/agent/index.ts
index d29a718..dc0f5fa 100644
--- a/src/resources/agent/index.ts
+++ b/src/resources/agent/index.ts
@@ -5,10 +5,7 @@ export {
type AgentSkill,
type AmbientAgentConfig,
type CloudEnvironmentConfig,
- type Error,
- type ErrorCode,
type McpServerConfig,
- type Scope,
type UserProfile,
type AgentListResponse,
type AgentGetArtifactResponse,
@@ -28,7 +25,6 @@ export {
} from './runs';
export {
Schedules,
- type ScheduledAgentHistoryItem,
type ScheduledAgentItem,
type ScheduleListResponse,
type ScheduleDeleteResponse,
diff --git a/src/resources/agent/runs.ts b/src/resources/agent/runs.ts
index 9ad1c5a..6d22ba0 100644
--- a/src/resources/agent/runs.ts
+++ b/src/resources/agent/runs.ts
@@ -24,8 +24,8 @@ export class Runs extends APIResource {
}
/**
- * Retrieve a paginated list of agent runs with optional filtering. Results are
- * ordered by creation time (newest first).
+ * Retrieve a paginated list of agent runs with optional filtering. Results default
+ * to `sort_by=updated_at` and `sort_order=desc`.
*
* @example
* ```ts
@@ -38,11 +38,7 @@ export class Runs extends APIResource {
/**
* Cancel an agent run that is currently queued or in progress. Once cancelled, the
- * run will transition to a cancelled state.
- *
- * Not all runs can be cancelled. Runs that are in a terminal state (SUCCEEDED,
- * FAILED, ERROR, BLOCKED, CANCELLED) return 400. Runs in PENDING state return 409
- * (retry after a moment). Self-hosted, local, and GitHub Action runs return 422.
+ * run will transition to a failed state.
*
* @example
* ```ts
@@ -243,7 +239,7 @@ export interface RunItem {
/**
* Ownership scope for a resource (team or personal)
*/
- scope?: AgentAPI.Scope;
+ scope?: RunItem.Scope;
/**
* UUID of the shared session (if available)
@@ -275,10 +271,6 @@ export interface RunItem {
*/
started_at?: string | null;
- /**
- * Status message for a run. For terminal error states, includes structured error
- * code and retryability info from the platform error catalog.
- */
status_message?: RunItem.StatusMessage;
}
@@ -346,51 +338,25 @@ export namespace RunItem {
}
/**
- * Status message for a run. For terminal error states, includes structured error
- * code and retryability info from the platform error catalog.
+ * Ownership scope for a resource (team or personal)
*/
- export interface StatusMessage {
+ export interface Scope {
/**
- * Human-readable status message
+ * Type of ownership ("User" for personal, "Team" for team-owned)
*/
- message: string;
+ type: 'User' | 'Team';
/**
- * Machine-readable error code identifying the problem type. Used in the `type` URI
- * of Error responses and in the `error_code` field of RunStatusMessage.
- *
- * User errors (run transitions to FAILED):
- *
- * - `insufficient_credits` — Team has no remaining add-on credits
- * - `feature_not_available` — Required feature not enabled for user's plan
- * - `external_authentication_required` — User hasn't authorized a required
- * external service
- * - `not_authorized` — Principal lacks permission for the requested operation
- * - `invalid_request` — Request is malformed or contains invalid parameters
- * - `resource_not_found` — Referenced resource does not exist
- * - `budget_exceeded` — Spending budget limit has been reached
- * - `integration_disabled` — Integration is disabled and must be enabled
- * - `integration_not_configured` — Integration setup is incomplete
- * - `operation_not_supported` — Requested operation not supported for this
- * resource/state
- * - `environment_setup_failed` — Client-side environment setup failed
- * - `content_policy_violation` — Prompt or setup commands violated content policy
- * - `conflict` — Request conflicts with the current state of the resource
- *
- * Warp errors (run transitions to ERROR):
- *
- * - `authentication_required` — Request lacks valid authentication credentials
- * - `resource_unavailable` — Transient infrastructure issue (retryable)
- * - `internal_error` — Unexpected server-side error (retryable)
+ * UID of the owning user or team
*/
- error_code?: AgentAPI.ErrorCode;
+ uid?: string;
+ }
+ export interface StatusMessage {
/**
- * Whether the error is transient and the client may retry by submitting a new run.
- * Only present on terminal error states. When false, retrying without addressing
- * the underlying cause will not succeed.
+ * Human-readable status message
*/
- retryable?: boolean;
+ message?: string;
}
}
@@ -534,6 +500,21 @@ export interface RunListParams {
*/
skill_spec?: string;
+ /**
+ * Sort field for results.
+ *
+ * - `updated_at`: Sort by last update timestamp (default)
+ * - `created_at`: Sort by creation timestamp
+ * - `title`: Sort alphabetically by run title
+ * - `agent`: Sort alphabetically by skill. Runs without a skill are grouped last.
+ */
+ sort_by?: 'updated_at' | 'created_at' | 'title' | 'agent';
+
+ /**
+ * Sort direction
+ */
+ sort_order?: 'asc' | 'desc';
+
/**
* Filter by run source type
*/
diff --git a/src/resources/agent/schedules.ts b/src/resources/agent/schedules.ts
index 31299f1..ff58fa4 100644
--- a/src/resources/agent/schedules.ts
+++ b/src/resources/agent/schedules.ts
@@ -122,21 +122,6 @@ export class Schedules extends APIResource {
}
}
-/**
- * Scheduler-derived history metadata for a scheduled agent
- */
-export interface ScheduledAgentHistoryItem {
- /**
- * Timestamp of the last successful run (RFC3339)
- */
- last_ran?: string | null;
-
- /**
- * Timestamp of the next scheduled run (RFC3339)
- */
- next_run?: string | null;
-}
-
export interface ScheduledAgentItem {
/**
* Unique identifier for the scheduled agent
@@ -189,7 +174,7 @@ export interface ScheduledAgentItem {
/**
* Scheduler-derived history metadata for a scheduled agent
*/
- history?: ScheduledAgentHistoryItem;
+ history?: ScheduledAgentItem.History;
/**
* Error message from the last failed spawn attempt, if any
@@ -199,11 +184,43 @@ export interface ScheduledAgentItem {
/**
* Ownership scope for a resource (team or personal)
*/
- scope?: AgentAPI.Scope;
+ scope?: ScheduledAgentItem.Scope;
updated_by?: AgentAPI.UserProfile;
}
+export namespace ScheduledAgentItem {
+ /**
+ * Scheduler-derived history metadata for a scheduled agent
+ */
+ export interface History {
+ /**
+ * Timestamp of the last successful run (RFC3339)
+ */
+ last_ran?: string | null;
+
+ /**
+ * Timestamp of the next scheduled run (RFC3339)
+ */
+ next_run?: string | null;
+ }
+
+ /**
+ * Ownership scope for a resource (team or personal)
+ */
+ export interface Scope {
+ /**
+ * Type of ownership ("User" for personal, "Team" for team-owned)
+ */
+ type: 'User' | 'Team';
+
+ /**
+ * UID of the owning user or team
+ */
+ uid?: string;
+ }
+}
+
export interface ScheduleListResponse {
/**
* List of scheduled agents
@@ -283,7 +300,6 @@ export interface ScheduleUpdateParams {
export declare namespace Schedules {
export {
- type ScheduledAgentHistoryItem as ScheduledAgentHistoryItem,
type ScheduledAgentItem as ScheduledAgentItem,
type ScheduleListResponse as ScheduleListResponse,
type ScheduleDeleteResponse as ScheduleDeleteResponse,
diff --git a/src/resources/index.ts b/src/resources/index.ts
index 26da403..6753268 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -5,10 +5,7 @@ export {
type AgentSkill,
type AmbientAgentConfig,
type CloudEnvironmentConfig,
- type Error,
- type ErrorCode,
type McpServerConfig,
- type Scope,
type UserProfile,
type AgentListResponse,
type AgentGetArtifactResponse,
diff --git a/tests/api-resources/agent/runs.test.ts b/tests/api-resources/agent/runs.test.ts
index 153f8d5..e94ce3f 100644
--- a/tests/api-resources/agent/runs.test.ts
+++ b/tests/api-resources/agent/runs.test.ts
@@ -51,6 +51,8 @@ describe('resource runs', () => {
schedule_id: 'schedule_id',
skill: 'skill',
skill_spec: 'skill_spec',
+ sort_by: 'updated_at',
+ sort_order: 'asc',
source: 'LINEAR',
state: ['QUEUED'],
updated_after: '2019-12-27T18:11:19.117Z',
From bda484e2cf52c1233cc3d31d574f1356a0dfe159 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 6 Mar 2026 20:17:27 +0000
Subject: [PATCH 3/5] feat(api): fix schema version issues
---
.stats.yml | 6 +-
api.md | 4 +
src/client.ts | 6 ++
src/resources/agent/agent.ts | 122 +++++++++++++++++++++++++++++++
src/resources/agent/index.ts | 4 +
src/resources/agent/runs.ts | 58 ++++++++++++---
src/resources/agent/schedules.ts | 52 +++++--------
src/resources/index.ts | 3 +
8 files changed, 206 insertions(+), 49 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index b4d4de8..7bbbb90 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 14
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-a368122275968e270e3e786e6cf176ae87aa56ef85e3270ed59da99c87996dc8.yml
-openapi_spec_hash: 86cab7da7cb620fc90482f50d92acf70
-config_hash: 25c1059aa958c8c2ad60ef16c318514d
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-6c175d34cab49d79dbb24289ae516867404c42f3097264bbae171aced72ecc49.yml
+openapi_spec_hash: 5abb55a1fc2836207bc88d4815f47f24
+config_hash: a28c6f6a70109573c79cd87a158124dc
diff --git a/api.md b/api.md
index 41d7ab6..311d5b5 100644
--- a/api.md
+++ b/api.md
@@ -5,7 +5,10 @@ Types:
- AgentSkill
- AmbientAgentConfig
- CloudEnvironmentConfig
+- Error
+- ErrorCode
- McpServerConfig
+- Scope
- UserProfile
- AgentListResponse
- AgentGetArtifactResponse
@@ -38,6 +41,7 @@ Methods:
Types:
+- ScheduleHistoryItem
- ScheduledAgentItem
- ScheduleListResponse
- ScheduleDeleteResponse
diff --git a/src/client.ts b/src/client.ts
index 5a85b4e..ac39f9c 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -27,7 +27,10 @@ import {
AgentSkill,
AmbientAgentConfig,
CloudEnvironmentConfig,
+ Error,
+ ErrorCode,
McpServerConfig,
+ Scope,
UserProfile,
} from './resources/agent/agent';
import { type Fetch } from './internal/builtin-types';
@@ -743,7 +746,10 @@ export declare namespace OzAPI {
type AgentSkill as AgentSkill,
type AmbientAgentConfig as AmbientAgentConfig,
type CloudEnvironmentConfig as CloudEnvironmentConfig,
+ type Error as Error,
+ type ErrorCode as ErrorCode,
type McpServerConfig as McpServerConfig,
+ type Scope as Scope,
type UserProfile as UserProfile,
type AgentListResponse as AgentListResponse,
type AgentGetArtifactResponse as AgentGetArtifactResponse,
diff --git a/src/resources/agent/agent.ts b/src/resources/agent/agent.ts
index 1e7d4ba..56d0e15 100644
--- a/src/resources/agent/agent.ts
+++ b/src/resources/agent/agent.ts
@@ -16,6 +16,7 @@ import * as SchedulesAPI from './schedules';
import {
ScheduleCreateParams,
ScheduleDeleteResponse,
+ ScheduleHistoryItem,
ScheduleListResponse,
ScheduleUpdateParams,
ScheduledAgentItem,
@@ -261,6 +262,108 @@ export namespace CloudEnvironmentConfig {
}
}
+/**
+ * Error response following RFC 7807 (Problem Details for HTTP APIs). Includes
+ * backward-compatible extension members.
+ *
+ * The response uses the `application/problem+json` content type. Additional
+ * extension members (e.g., `auth_url`, `provider`) may be present depending on the
+ * error code.
+ */
+export interface Error {
+ /**
+ * Human-readable error message combining title and detail. Backward-compatible
+ * extension member for older clients.
+ */
+ error: string;
+
+ /**
+ * The HTTP status code for this occurrence of the problem (RFC 7807)
+ */
+ status: number;
+
+ /**
+ * A short, human-readable summary of the problem type (RFC 7807)
+ */
+ title: string;
+
+ /**
+ * A URI reference that identifies the problem type (RFC 7807). Format:
+ * `https://docs.warp.dev/reference/api-and-sdk/troubleshooting/errors/{error_code}`
+ * See PlatformErrorCode for the list of possible error codes.
+ */
+ type: string;
+
+ /**
+ * A human-readable explanation specific to this occurrence of the problem
+ * (RFC 7807)
+ */
+ detail?: string;
+
+ /**
+ * The request path that generated this error (RFC 7807)
+ */
+ instance?: string;
+
+ /**
+ * Whether the request can be retried. When true, the error is transient and the
+ * request may be retried. When false, retrying without addressing the underlying
+ * cause will not succeed.
+ */
+ retryable?: boolean;
+
+ /**
+ * OpenTelemetry trace ID for debugging and support requests
+ */
+ trace_id?: string;
+}
+
+/**
+ * Machine-readable error code identifying the problem type. Used in the `type` URI
+ * of Error responses and in the `error_code` field of RunStatusMessage.
+ *
+ * User errors (run transitions to FAILED):
+ *
+ * - `insufficient_credits` — Team has no remaining add-on credits
+ * - `feature_not_available` — Required feature not enabled for user's plan
+ * - `external_authentication_required` — User hasn't authorized a required
+ * external service
+ * - `not_authorized` — Principal lacks permission for the requested operation
+ * - `invalid_request` — Request is malformed or contains invalid parameters
+ * - `resource_not_found` — Referenced resource does not exist
+ * - `budget_exceeded` — Spending budget limit has been reached
+ * - `integration_disabled` — Integration is disabled and must be enabled
+ * - `integration_not_configured` — Integration setup is incomplete
+ * - `operation_not_supported` — Requested operation not supported for this
+ * resource/state
+ * - `environment_setup_failed` — Client-side environment setup failed
+ * - `content_policy_violation` — Prompt or setup commands violated content policy
+ * - `conflict` — Request conflicts with the current state of the resource
+ *
+ * Warp errors (run transitions to ERROR):
+ *
+ * - `authentication_required` — Request lacks valid authentication credentials
+ * - `resource_unavailable` — Transient infrastructure issue (retryable)
+ * - `internal_error` — Unexpected server-side error (retryable)
+ */
+export type ErrorCode =
+ | 'insufficient_credits'
+ | 'feature_not_available'
+ | 'external_authentication_required'
+ | 'not_authorized'
+ | 'invalid_request'
+ | 'resource_not_found'
+ | 'budget_exceeded'
+ | 'integration_disabled'
+ | 'integration_not_configured'
+ | 'operation_not_supported'
+ | 'environment_setup_failed'
+ | 'content_policy_violation'
+ | 'conflict'
+ | 'authentication_required'
+ | 'resource_unavailable'
+ | 'internal_error';
+
/**
* Configuration for an MCP server. Must have exactly one of: warp_id, command, or
* url.
@@ -297,6 +400,21 @@ export interface McpServerConfig {
warp_id?: string;
}
+/**
+ * Ownership scope for a resource (team or personal)
+ */
+export interface Scope {
+ /**
+ * Type of ownership ("User" for personal, "Team" for team-owned)
+ */
+ type: 'User' | 'Team';
+
+ /**
+ * UID of the owning user or team
+ */
+ uid?: string;
+}
+
export interface UserProfile {
/**
* Display name of the creator
@@ -527,7 +645,10 @@ export declare namespace Agent {
type AgentSkill as AgentSkill,
type AmbientAgentConfig as AmbientAgentConfig,
type CloudEnvironmentConfig as CloudEnvironmentConfig,
+ type Error as Error,
+ type ErrorCode as ErrorCode,
type McpServerConfig as McpServerConfig,
+ type Scope as Scope,
type UserProfile as UserProfile,
type AgentListResponse as AgentListResponse,
type AgentGetArtifactResponse as AgentGetArtifactResponse,
@@ -549,6 +670,7 @@ export declare namespace Agent {
export {
Schedules as Schedules,
+ type ScheduleHistoryItem as ScheduleHistoryItem,
type ScheduledAgentItem as ScheduledAgentItem,
type ScheduleListResponse as ScheduleListResponse,
type ScheduleDeleteResponse as ScheduleDeleteResponse,
diff --git a/src/resources/agent/index.ts b/src/resources/agent/index.ts
index dc0f5fa..f9e3d0b 100644
--- a/src/resources/agent/index.ts
+++ b/src/resources/agent/index.ts
@@ -5,7 +5,10 @@ export {
type AgentSkill,
type AmbientAgentConfig,
type CloudEnvironmentConfig,
+ type Error,
+ type ErrorCode,
type McpServerConfig,
+ type Scope,
type UserProfile,
type AgentListResponse,
type AgentGetArtifactResponse,
@@ -25,6 +28,7 @@ export {
} from './runs';
export {
Schedules,
+ type ScheduleHistoryItem,
type ScheduledAgentItem,
type ScheduleListResponse,
type ScheduleDeleteResponse,
diff --git a/src/resources/agent/runs.ts b/src/resources/agent/runs.ts
index 6d22ba0..940c3a9 100644
--- a/src/resources/agent/runs.ts
+++ b/src/resources/agent/runs.ts
@@ -38,7 +38,11 @@ export class Runs extends APIResource {
/**
* Cancel an agent run that is currently queued or in progress. Once cancelled, the
- * run will transition to a failed state.
+ * run will transition to a cancelled state.
+ *
+ * Not all runs can be cancelled. Runs that are in a terminal state (SUCCEEDED,
+ * FAILED, ERROR, BLOCKED, CANCELLED) return 400. Runs in PENDING state return 409
+ * (retry after a moment). Self-hosted, local, and GitHub Action runs return 422.
*
* @example
* ```ts
@@ -239,7 +243,7 @@ export interface RunItem {
/**
* Ownership scope for a resource (team or personal)
*/
- scope?: RunItem.Scope;
+ scope?: AgentAPI.Scope;
/**
* UUID of the shared session (if available)
@@ -271,6 +275,10 @@ export interface RunItem {
*/
started_at?: string | null;
+ /**
+ * Status message for a run. For terminal error states, includes structured error
+ * code and retryability info from the platform error catalog.
+ */
status_message?: RunItem.StatusMessage;
}
@@ -338,25 +346,51 @@ export namespace RunItem {
}
/**
- * Ownership scope for a resource (team or personal)
+ * Status message for a run. For terminal error states, includes structured error
+ * code and retryability info from the platform error catalog.
*/
- export interface Scope {
+ export interface StatusMessage {
/**
- * Type of ownership ("User" for personal, "Team" for team-owned)
+ * Human-readable status message
*/
- type: 'User' | 'Team';
+ message: string;
/**
- * UID of the owning user or team
+ * Machine-readable error code identifying the problem type. Used in the `type` URI
+ * of Error responses and in the `error_code` field of RunStatusMessage.
+ *
+ * User errors (run transitions to FAILED):
+ *
+ * - `insufficient_credits` — Team has no remaining add-on credits
+ * - `feature_not_available` — Required feature not enabled for user's plan
+ * - `external_authentication_required` — User hasn't authorized a required
+ * external service
+ * - `not_authorized` — Principal lacks permission for the requested operation
+ * - `invalid_request` — Request is malformed or contains invalid parameters
+ * - `resource_not_found` — Referenced resource does not exist
+ * - `budget_exceeded` — Spending budget limit has been reached
+ * - `integration_disabled` — Integration is disabled and must be enabled
+ * - `integration_not_configured` — Integration setup is incomplete
+ * - `operation_not_supported` — Requested operation not supported for this
+ * resource/state
+ * - `environment_setup_failed` — Client-side environment setup failed
+ * - `content_policy_violation` — Prompt or setup commands violated content policy
+ * - `conflict` — Request conflicts with the current state of the resource
+ *
+ * Warp errors (run transitions to ERROR):
+ *
+ * - `authentication_required` — Request lacks valid authentication credentials
+ * - `resource_unavailable` — Transient infrastructure issue (retryable)
+ * - `internal_error` — Unexpected server-side error (retryable)
*/
- uid?: string;
- }
+ error_code?: AgentAPI.ErrorCode;
- export interface StatusMessage {
/**
- * Human-readable status message
+ * Whether the error is transient and the client may retry by submitting a new run.
+ * Only present on terminal error states. When false, retrying without addressing
+ * the underlying cause will not succeed.
*/
- message?: string;
+ retryable?: boolean;
}
}
diff --git a/src/resources/agent/schedules.ts b/src/resources/agent/schedules.ts
index ff58fa4..a066070 100644
--- a/src/resources/agent/schedules.ts
+++ b/src/resources/agent/schedules.ts
@@ -122,6 +122,21 @@ export class Schedules extends APIResource {
}
}
+/**
+ * Scheduler-derived history metadata for a scheduled agent
+ */
+export interface ScheduleHistoryItem {
+ /**
+ * Timestamp of the last successful run (RFC3339)
+ */
+ last_ran?: string | null;
+
+ /**
+ * Timestamp of the next scheduled run (RFC3339)
+ */
+ next_run?: string | null;
+}
+
export interface ScheduledAgentItem {
/**
* Unique identifier for the scheduled agent
@@ -174,7 +189,7 @@ export interface ScheduledAgentItem {
/**
* Scheduler-derived history metadata for a scheduled agent
*/
- history?: ScheduledAgentItem.History;
+ history?: ScheduleHistoryItem;
/**
* Error message from the last failed spawn attempt, if any
@@ -184,43 +199,11 @@ export interface ScheduledAgentItem {
/**
* Ownership scope for a resource (team or personal)
*/
- scope?: ScheduledAgentItem.Scope;
+ scope?: AgentAPI.Scope;
updated_by?: AgentAPI.UserProfile;
}
-export namespace ScheduledAgentItem {
- /**
- * Scheduler-derived history metadata for a scheduled agent
- */
- export interface History {
- /**
- * Timestamp of the last successful run (RFC3339)
- */
- last_ran?: string | null;
-
- /**
- * Timestamp of the next scheduled run (RFC3339)
- */
- next_run?: string | null;
- }
-
- /**
- * Ownership scope for a resource (team or personal)
- */
- export interface Scope {
- /**
- * Type of ownership ("User" for personal, "Team" for team-owned)
- */
- type: 'User' | 'Team';
-
- /**
- * UID of the owning user or team
- */
- uid?: string;
- }
-}
-
export interface ScheduleListResponse {
/**
* List of scheduled agents
@@ -300,6 +283,7 @@ export interface ScheduleUpdateParams {
export declare namespace Schedules {
export {
+ type ScheduleHistoryItem as ScheduleHistoryItem,
type ScheduledAgentItem as ScheduledAgentItem,
type ScheduleListResponse as ScheduleListResponse,
type ScheduleDeleteResponse as ScheduleDeleteResponse,
diff --git a/src/resources/index.ts b/src/resources/index.ts
index 6753268..26da403 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -5,7 +5,10 @@ export {
type AgentSkill,
type AmbientAgentConfig,
type CloudEnvironmentConfig,
+ type Error,
+ type ErrorCode,
type McpServerConfig,
+ type Scope,
type UserProfile,
type AgentListResponse,
type AgentGetArtifactResponse,
From 485083de645ff844e55bc1d04fbd51d3c5875947 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 6 Mar 2026 20:23:10 +0000
Subject: [PATCH 4/5] feat(api): fix ScheduledAgentHistoryItem name
---
.stats.yml | 2 +-
api.md | 2 +-
src/resources/agent/agent.ts | 4 ++--
src/resources/agent/index.ts | 2 +-
src/resources/agent/schedules.ts | 6 +++---
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 7bbbb90..7dd01bc 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 14
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-6c175d34cab49d79dbb24289ae516867404c42f3097264bbae171aced72ecc49.yml
openapi_spec_hash: 5abb55a1fc2836207bc88d4815f47f24
-config_hash: a28c6f6a70109573c79cd87a158124dc
+config_hash: a4b1ffc5b2e162efb3d557c7461153c1
diff --git a/api.md b/api.md
index 311d5b5..77aa9ca 100644
--- a/api.md
+++ b/api.md
@@ -41,7 +41,7 @@ Methods:
Types:
-- ScheduleHistoryItem
+- ScheduledAgentHistoryItem
- ScheduledAgentItem
- ScheduleListResponse
- ScheduleDeleteResponse
diff --git a/src/resources/agent/agent.ts b/src/resources/agent/agent.ts
index 56d0e15..750c010 100644
--- a/src/resources/agent/agent.ts
+++ b/src/resources/agent/agent.ts
@@ -16,9 +16,9 @@ import * as SchedulesAPI from './schedules';
import {
ScheduleCreateParams,
ScheduleDeleteResponse,
- ScheduleHistoryItem,
ScheduleListResponse,
ScheduleUpdateParams,
+ ScheduledAgentHistoryItem,
ScheduledAgentItem,
Schedules,
} from './schedules';
@@ -670,7 +670,7 @@ export declare namespace Agent {
export {
Schedules as Schedules,
- type ScheduleHistoryItem as ScheduleHistoryItem,
+ type ScheduledAgentHistoryItem as ScheduledAgentHistoryItem,
type ScheduledAgentItem as ScheduledAgentItem,
type ScheduleListResponse as ScheduleListResponse,
type ScheduleDeleteResponse as ScheduleDeleteResponse,
diff --git a/src/resources/agent/index.ts b/src/resources/agent/index.ts
index f9e3d0b..d29a718 100644
--- a/src/resources/agent/index.ts
+++ b/src/resources/agent/index.ts
@@ -28,7 +28,7 @@ export {
} from './runs';
export {
Schedules,
- type ScheduleHistoryItem,
+ type ScheduledAgentHistoryItem,
type ScheduledAgentItem,
type ScheduleListResponse,
type ScheduleDeleteResponse,
diff --git a/src/resources/agent/schedules.ts b/src/resources/agent/schedules.ts
index a066070..31299f1 100644
--- a/src/resources/agent/schedules.ts
+++ b/src/resources/agent/schedules.ts
@@ -125,7 +125,7 @@ export class Schedules extends APIResource {
/**
* Scheduler-derived history metadata for a scheduled agent
*/
-export interface ScheduleHistoryItem {
+export interface ScheduledAgentHistoryItem {
/**
* Timestamp of the last successful run (RFC3339)
*/
@@ -189,7 +189,7 @@ export interface ScheduledAgentItem {
/**
* Scheduler-derived history metadata for a scheduled agent
*/
- history?: ScheduleHistoryItem;
+ history?: ScheduledAgentHistoryItem;
/**
* Error message from the last failed spawn attempt, if any
@@ -283,7 +283,7 @@ export interface ScheduleUpdateParams {
export declare namespace Schedules {
export {
- type ScheduleHistoryItem as ScheduleHistoryItem,
+ type ScheduledAgentHistoryItem as ScheduledAgentHistoryItem,
type ScheduledAgentItem as ScheduledAgentItem,
type ScheduleListResponse as ScheduleListResponse,
type ScheduleDeleteResponse as ScheduleDeleteResponse,
From b04e2aa709e0b95e2a11b6d9d4bd7551bbb219f0 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 6 Mar 2026 20:24:56 +0000
Subject: [PATCH 5/5] release: 1.0.2
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 15 +++++++++++++++
package.json | 2 +-
src/version.ts | 2 +-
4 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 8d7e5f1..b870c5e 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "1.0.1"
+ ".": "1.0.2"
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6e2fa1d..ac78b9d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,20 @@
# Changelog
+## 1.0.2 (2026-03-06)
+
+Full Changelog: [v1.0.1...v1.0.2](https://github.com/warpdotdev/oz-sdk-typescript/compare/v1.0.1...v1.0.2)
+
+### Features
+
+* **api:** fix ScheduledAgentHistoryItem name ([485083d](https://github.com/warpdotdev/oz-sdk-typescript/commit/485083de645ff844e55bc1d04fbd51d3c5875947))
+* **api:** fix schema version issues ([bda484e](https://github.com/warpdotdev/oz-sdk-typescript/commit/bda484e2cf52c1233cc3d31d574f1356a0dfe159))
+* **api:** sorting ([d584cc6](https://github.com/warpdotdev/oz-sdk-typescript/commit/d584cc67d3739aa2b690732e4e936fe5d3f22b41))
+
+
+### Bug Fixes
+
+* fix request delays for retrying to be more respectful of high requested delays ([21ffbe5](https://github.com/warpdotdev/oz-sdk-typescript/commit/21ffbe5a1701d518ab01fd6331e3388243926472))
+
## 1.0.1 (2026-03-04)
Full Changelog: [v1.0.0-alpha.12...v1.0.1](https://github.com/warpdotdev/oz-sdk-typescript/compare/v1.0.0-alpha.12...v1.0.1)
diff --git a/package.json b/package.json
index fccdef5..988dbb5 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "oz-agent-sdk",
- "version": "1.0.1",
+ "version": "1.0.2",
"description": "The official TypeScript library for the Oz API API",
"author": "Oz API <>",
"types": "dist/index.d.ts",
diff --git a/src/version.ts b/src/version.ts
index 8cd23e5..0ac78d9 100644
--- a/src/version.ts
+++ b/src/version.ts
@@ -1 +1 @@
-export const VERSION = '1.0.1'; // x-release-please-version
+export const VERSION = '1.0.2'; // x-release-please-version