File tree Expand file tree Collapse file tree
tests/api-resources/agent Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- configured_endpoints : 22
2- openapi_spec_url : https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-933dc0de5653397e66fc2618c9aeb6dc1b65bc327fe36346bb59f0bd0c25b2bd .yml
3- openapi_spec_hash : fed1d156b2b419f2bee85db21d5870f5
4- config_hash : ea21d91999803fd188cdbfdf2c654914
1+ configured_endpoints : 23
2+ openapi_spec_url : https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-439930897f625c088be1b09e394f4053e45060cd2daab7454dfcf6c775cba1fb .yml
3+ openapi_spec_hash : f0382bea9210d76f906665e8a825a05b
4+ config_hash : 5a6e285f6e3a958a887b31b972a3f49c
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ Methods:
7979- <code title =" put /agent/identities/{uid} " >client.agent.agent.<a href =" ./src/resources/agent/agent_.ts " >update</a >(uid, { ...params }) -> AgentResponse</code >
8080- <code title =" get /agent/identities " >client.agent.agent.<a href =" ./src/resources/agent/agent_.ts " >list</a >() -> ListAgentIdentitiesResponse</code >
8181- <code title =" delete /agent/identities/{uid} " >client.agent.agent.<a href =" ./src/resources/agent/agent_.ts " >delete</a >(uid) -> void</code >
82+ - <code title =" get /agent/identities/{uid} " >client.agent.agent.<a href =" ./src/resources/agent/agent_.ts " >get</a >(uid) -> AgentResponse</code >
8283
8384## Sessions
8485
Original file line number Diff line number Diff line change @@ -67,6 +67,20 @@ export class Agent extends APIResource {
6767 headers : buildHeaders ( [ { Accept : '*/*' } , options ?. headers ] ) ,
6868 } ) ;
6969 }
70+
71+ /**
72+ * Retrieve a single agent by its unique identifier. The response includes an
73+ * `available` flag indicating whether the agent is within the team's plan limit
74+ * and may be used for runs.
75+ *
76+ * @example
77+ * ```ts
78+ * const agentResponse = await client.agent.agent.get('uid');
79+ * ```
80+ */
81+ get ( uid : string , options ?: RequestOptions ) : APIPromise < AgentResponse > {
82+ return this . _client . get ( path `/agent/identities/${ uid } ` , options ) ;
83+ }
7084}
7185
7286export interface AgentResponse {
Original file line number Diff line number Diff line change @@ -455,6 +455,11 @@ export namespace RunItem {
455455 * Cost of LLM inference for the run
456456 */
457457 inference_cost ?: number ;
458+
459+ /**
460+ * Cost of platform usage for the run
461+ */
462+ platform_cost ?: number ;
458463 }
459464
460465 /**
Original file line number Diff line number Diff line change @@ -65,4 +65,16 @@ describe('resource agent', () => {
6565 expect ( dataAndResponse . data ) . toBe ( response ) ;
6666 expect ( dataAndResponse . response ) . toBe ( rawResponse ) ;
6767 } ) ;
68+
69+ // Mock server tests are disabled
70+ test . skip ( 'get' , async ( ) => {
71+ const responsePromise = client . agent . agent . get ( 'uid' ) ;
72+ const rawResponse = await responsePromise . asResponse ( ) ;
73+ expect ( rawResponse ) . toBeInstanceOf ( Response ) ;
74+ const response = await responsePromise ;
75+ expect ( response ) . not . toBeInstanceOf ( Response ) ;
76+ const dataAndResponse = await responsePromise . withResponse ( ) ;
77+ expect ( dataAndResponse . data ) . toBe ( response ) ;
78+ expect ( dataAndResponse . response ) . toBe ( rawResponse ) ;
79+ } ) ;
6880} ) ;
You can’t perform that action at this time.
0 commit comments