22
33from __future__ import annotations
44
5- from typing import Iterable , Optional
6-
75import httpx
86
9- from ..._types import Body , Omit , Query , Headers , NoneType , NotGiven , SequenceNotStr , omit , not_given
7+ from ..._types import Body , Omit , Query , Headers , NoneType , NotGiven , omit , not_given
108from ..._utils import path_template , maybe_transform , async_maybe_transform
119from ..._compat import cached_property
1210from ..._resource import SyncAPIResource , AsyncAPIResource
@@ -50,9 +48,6 @@ def create(
5048 self ,
5149 * ,
5250 name : str ,
53- description : Optional [str ] | Omit = omit ,
54- secrets : Iterable [agent_create_params .Secret ] | Omit = omit ,
55- skills : SequenceNotStr [str ] | Omit = omit ,
5651 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5752 # The extra values given here take precedence over values defined on the client or passed to this method.
5853 extra_headers : Headers | None = None ,
@@ -68,18 +63,6 @@ def create(
6863 Args:
6964 name: A name for the agent
7065
71- description: Optional description of the agent
72-
73- secrets: Optional list of secrets associated with the agent. Duplicate names within a
74- single request are rejected.
75-
76- skills:
77- Optional list of skill specs to associate with the agent. Format:
78- "{owner}/{repo}:{skill_path}" (e.g.,
79- "warpdotdev/warp-server:.claude/skills/deploy/SKILL.md"). Each spec is validated
80- and normalized at attach time using the team's GitHub credentials; inaccessible
81- or malformed specs are rejected.
82-
8366 extra_headers: Send extra headers
8467
8568 extra_query: Add additional query parameters to the request
@@ -90,15 +73,7 @@ def create(
9073 """
9174 return self ._post (
9275 "/agent/identities" ,
93- body = maybe_transform (
94- {
95- "name" : name ,
96- "description" : description ,
97- "secrets" : secrets ,
98- "skills" : skills ,
99- },
100- agent_create_params .AgentCreateParams ,
101- ),
76+ body = maybe_transform ({"name" : name }, agent_create_params .AgentCreateParams ),
10277 options = make_request_options (
10378 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
10479 ),
@@ -109,33 +84,20 @@ def update(
10984 self ,
11085 uid : str ,
11186 * ,
112- description : Optional [str ] | Omit = omit ,
11387 name : str | Omit = omit ,
114- secrets : Optional [Iterable [agent_update_params .Secret ]] | Omit = omit ,
115- skills : Optional [SequenceNotStr [str ]] | Omit = omit ,
11688 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
11789 # The extra values given here take precedence over values defined on the client or passed to this method.
11890 extra_headers : Headers | None = None ,
11991 extra_query : Query | None = None ,
12092 extra_body : Body | None = None ,
12193 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
12294 ) -> AgentResponse :
123- """Update an existing agent.
95+ """
96+ Update an existing agent.
12497
12598 Args:
126- description: Replacement description.
127-
128- Omit or pass `null` to leave unchanged, or use an empty
129- value to clear.
130-
13199 name: The new name for the agent
132100
133- secrets: Replacement list of secrets. Omit to leave unchanged, pass an empty array to
134- clear, or pass a non-empty array to replace. Duplicate names are rejected.
135-
136- skills: Replacement list of skill specs. Omit to leave unchanged, pass an empty array to
137- clear, or pass a non-empty array to replace.
138-
139101 extra_headers: Send extra headers
140102
141103 extra_query: Add additional query parameters to the request
@@ -148,15 +110,7 @@ def update(
148110 raise ValueError (f"Expected a non-empty value for `uid` but received { uid !r} " )
149111 return self ._put (
150112 path_template ("/agent/identities/{uid}" , uid = uid ),
151- body = maybe_transform (
152- {
153- "description" : description ,
154- "name" : name ,
155- "secrets" : secrets ,
156- "skills" : skills ,
157- },
158- agent_update_params .AgentUpdateParams ,
159- ),
113+ body = maybe_transform ({"name" : name }, agent_update_params .AgentUpdateParams ),
160114 options = make_request_options (
161115 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
162116 ),
@@ -248,9 +202,6 @@ async def create(
248202 self ,
249203 * ,
250204 name : str ,
251- description : Optional [str ] | Omit = omit ,
252- secrets : Iterable [agent_create_params .Secret ] | Omit = omit ,
253- skills : SequenceNotStr [str ] | Omit = omit ,
254205 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
255206 # The extra values given here take precedence over values defined on the client or passed to this method.
256207 extra_headers : Headers | None = None ,
@@ -266,18 +217,6 @@ async def create(
266217 Args:
267218 name: A name for the agent
268219
269- description: Optional description of the agent
270-
271- secrets: Optional list of secrets associated with the agent. Duplicate names within a
272- single request are rejected.
273-
274- skills:
275- Optional list of skill specs to associate with the agent. Format:
276- "{owner}/{repo}:{skill_path}" (e.g.,
277- "warpdotdev/warp-server:.claude/skills/deploy/SKILL.md"). Each spec is validated
278- and normalized at attach time using the team's GitHub credentials; inaccessible
279- or malformed specs are rejected.
280-
281220 extra_headers: Send extra headers
282221
283222 extra_query: Add additional query parameters to the request
@@ -288,15 +227,7 @@ async def create(
288227 """
289228 return await self ._post (
290229 "/agent/identities" ,
291- body = await async_maybe_transform (
292- {
293- "name" : name ,
294- "description" : description ,
295- "secrets" : secrets ,
296- "skills" : skills ,
297- },
298- agent_create_params .AgentCreateParams ,
299- ),
230+ body = await async_maybe_transform ({"name" : name }, agent_create_params .AgentCreateParams ),
300231 options = make_request_options (
301232 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
302233 ),
@@ -307,33 +238,20 @@ async def update(
307238 self ,
308239 uid : str ,
309240 * ,
310- description : Optional [str ] | Omit = omit ,
311241 name : str | Omit = omit ,
312- secrets : Optional [Iterable [agent_update_params .Secret ]] | Omit = omit ,
313- skills : Optional [SequenceNotStr [str ]] | Omit = omit ,
314242 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
315243 # The extra values given here take precedence over values defined on the client or passed to this method.
316244 extra_headers : Headers | None = None ,
317245 extra_query : Query | None = None ,
318246 extra_body : Body | None = None ,
319247 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
320248 ) -> AgentResponse :
321- """Update an existing agent.
249+ """
250+ Update an existing agent.
322251
323252 Args:
324- description: Replacement description.
325-
326- Omit or pass `null` to leave unchanged, or use an empty
327- value to clear.
328-
329253 name: The new name for the agent
330254
331- secrets: Replacement list of secrets. Omit to leave unchanged, pass an empty array to
332- clear, or pass a non-empty array to replace. Duplicate names are rejected.
333-
334- skills: Replacement list of skill specs. Omit to leave unchanged, pass an empty array to
335- clear, or pass a non-empty array to replace.
336-
337255 extra_headers: Send extra headers
338256
339257 extra_query: Add additional query parameters to the request
@@ -346,15 +264,7 @@ async def update(
346264 raise ValueError (f"Expected a non-empty value for `uid` but received { uid !r} " )
347265 return await self ._put (
348266 path_template ("/agent/identities/{uid}" , uid = uid ),
349- body = await async_maybe_transform (
350- {
351- "description" : description ,
352- "name" : name ,
353- "secrets" : secrets ,
354- "skills" : skills ,
355- },
356- agent_update_params .AgentUpdateParams ,
357- ),
267+ body = await async_maybe_transform ({"name" : name }, agent_update_params .AgentUpdateParams ),
358268 options = make_request_options (
359269 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
360270 ),
0 commit comments