Skip to content

Commit 8105304

Browse files
feat(api): add models for agent skill, user profile
1 parent 1927318 commit 8105304

File tree

8 files changed

+68
-58
lines changed

8 files changed

+68
-58
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 12
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-3ee19d97da1711b8dfcba85f38c3c345fa96aaf78ea7f025e1ae490d17e97517.yml
33
openapi_spec_hash: 2d03e7a248b1be5bd5600b62912cdab8
4-
config_hash: 9db55bfa03e8dd5e251342bd7491408c
4+
config_hash: 07820b17df23cbea39cb77fa05292538

api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ Types:
44

55
```python
66
from warp_agent_sdk.types import (
7+
AgentSkill,
78
AmbientAgentConfig,
89
CloudEnvironmentConfig,
910
McpServerConfig,
10-
RunCreatorInfo,
11+
UserProfile,
1112
AgentListResponse,
1213
AgentRunResponse,
1314
)

src/warp_agent_sdk/types/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
from __future__ import annotations
44

5+
from .agent_skill import AgentSkill as AgentSkill
6+
from .user_profile import UserProfile as UserProfile
57
from .agent_run_params import AgentRunParams as AgentRunParams
6-
from .run_creator_info import RunCreatorInfo as RunCreatorInfo
78
from .agent_list_params import AgentListParams as AgentListParams
89
from .mcp_server_config import McpServerConfig as McpServerConfig
910
from .agent_run_response import AgentRunResponse as AgentRunResponse

src/warp_agent_sdk/types/agent/run_item.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
from ..._models import BaseModel
77
from .run_state import RunState
8+
from ..user_profile import UserProfile
89
from .artifact_item import ArtifactItem
910
from .run_source_type import RunSourceType
10-
from ..run_creator_info import RunCreatorInfo
1111
from ..ambient_agent_config import AmbientAgentConfig
1212

1313
__all__ = ["RunItem", "RequestUsage", "StatusMessage"]
@@ -70,7 +70,7 @@ class RunItem(BaseModel):
7070
conversation_id: Optional[str] = None
7171
"""UUID of the conversation associated with the run"""
7272

73-
creator: Optional[RunCreatorInfo] = None
73+
creator: Optional[UserProfile] = None
7474

7575
is_sandbox_running: Optional[bool] = None
7676
"""Whether the sandbox environment is currently running"""

src/warp_agent_sdk/types/agent/scheduled_agent_item.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from datetime import datetime
55

66
from ..._models import BaseModel
7-
from ..run_creator_info import RunCreatorInfo
7+
from ..user_profile import UserProfile
88
from ..ambient_agent_config import AmbientAgentConfig
99
from ..cloud_environment_config import CloudEnvironmentConfig
1010

@@ -49,7 +49,7 @@ class ScheduledAgentItem(BaseModel):
4949
agent_config: Optional[AmbientAgentConfig] = None
5050
"""Configuration for an ambient agent run"""
5151

52-
created_by: Optional[RunCreatorInfo] = None
52+
created_by: Optional[UserProfile] = None
5353

5454
environment: Optional[CloudEnvironmentConfig] = None
5555
"""Configuration for a cloud environment used by scheduled agents"""
@@ -60,4 +60,4 @@ class ScheduledAgentItem(BaseModel):
6060
last_spawn_error: Optional[str] = None
6161
"""Error message from the last failed spawn attempt, if any"""
6262

63-
updated_by: Optional[RunCreatorInfo] = None
63+
updated_by: Optional[UserProfile] = None

src/warp_agent_sdk/types/agent_list_response.py

Lines changed: 3 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -3,56 +3,11 @@
33
from typing import List
44

55
from .._models import BaseModel
6+
from .agent_skill import AgentSkill
67

7-
__all__ = ["AgentListResponse", "Agent", "AgentVariant", "AgentVariantEnvironment", "AgentVariantSource"]
8-
9-
10-
class AgentVariantEnvironment(BaseModel):
11-
name: str
12-
"""Human-readable name of the environment"""
13-
14-
uid: str
15-
"""Unique identifier for the environment"""
16-
17-
18-
class AgentVariantSource(BaseModel):
19-
name: str
20-
"""GitHub repository name"""
21-
22-
owner: str
23-
"""GitHub repository owner"""
24-
25-
skill_path: str
26-
"""Path to the skill definition file within the repository"""
27-
28-
29-
class AgentVariant(BaseModel):
30-
id: str
31-
"""
32-
Stable identifier for this skill variant. Format: "{owner}/{repo}:{skill_path}"
33-
Example: "warpdotdev/warp-server:.claude/skills/deploy/SKILL.md"
34-
"""
35-
36-
base_prompt: str
37-
"""Base prompt/instructions for the agent"""
38-
39-
description: str
40-
"""Description of the agent variant"""
41-
42-
environments: List[AgentVariantEnvironment]
43-
"""Environments where this agent variant is available"""
44-
45-
source: AgentVariantSource
46-
47-
48-
class Agent(BaseModel):
49-
name: str
50-
"""Human-readable name of the agent"""
51-
52-
variants: List[AgentVariant]
53-
"""Available variants of this agent"""
8+
__all__ = ["AgentListResponse"]
549

5510

5611
class AgentListResponse(BaseModel):
57-
agents: List[Agent]
12+
agents: List[AgentSkill]
5813
"""List of available agents"""
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing import List
4+
5+
from .._models import BaseModel
6+
7+
__all__ = ["AgentSkill", "Variant", "VariantEnvironment", "VariantSource"]
8+
9+
10+
class VariantEnvironment(BaseModel):
11+
name: str
12+
"""Human-readable name of the environment"""
13+
14+
uid: str
15+
"""Unique identifier for the environment"""
16+
17+
18+
class VariantSource(BaseModel):
19+
name: str
20+
"""GitHub repository name"""
21+
22+
owner: str
23+
"""GitHub repository owner"""
24+
25+
skill_path: str
26+
"""Path to the skill definition file within the repository"""
27+
28+
29+
class Variant(BaseModel):
30+
id: str
31+
"""
32+
Stable identifier for this skill variant. Format: "{owner}/{repo}:{skill_path}"
33+
Example: "warpdotdev/warp-server:.claude/skills/deploy/SKILL.md"
34+
"""
35+
36+
base_prompt: str
37+
"""Base prompt/instructions for the agent"""
38+
39+
description: str
40+
"""Description of the agent variant"""
41+
42+
environments: List[VariantEnvironment]
43+
"""Environments where this agent variant is available"""
44+
45+
source: VariantSource
46+
47+
48+
class AgentSkill(BaseModel):
49+
name: str
50+
"""Human-readable name of the agent"""
51+
52+
variants: List[Variant]
53+
"""Available variants of this agent"""

src/warp_agent_sdk/types/run_creator_info.py renamed to src/warp_agent_sdk/types/user_profile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
from .._models import BaseModel
77

8-
__all__ = ["RunCreatorInfo"]
8+
__all__ = ["UserProfile"]
99

1010

11-
class RunCreatorInfo(BaseModel):
11+
class UserProfile(BaseModel):
1212
display_name: Optional[str] = None
1313
"""Display name of the creator"""
1414

0 commit comments

Comments
 (0)