Skip to content

Commit a821f87

Browse files
feat(api): api update
1 parent 35da5a3 commit a821f87

File tree

3 files changed

+71
-6
lines changed

3 files changed

+71
-6
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 29
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-9ebf85d18734165031e91e412135096421282c2c92fb421e0103a48ff93ebb2d.yml
3-
openapi_spec_hash: 036a34aaf89d82a2ad396909b5d6c53b
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-65697a8bbd4e408eef3beaefeda67477c1b02cea618a1be98f5ace6cfe3108d3.yml
3+
openapi_spec_hash: d3eedec1e7c3ed88654f30a055d4abbd
44
config_hash: 13d74f8cb9cb62642ab105f797da852c

src/resources/tools/tools.ts

Lines changed: 68 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ export interface AuthorizeToolRequest {
102102
export interface ExecuteToolRequest {
103103
tool_name: string;
104104

105+
/**
106+
* Whether to include the error stacktrace in the response. If not provided, the
107+
* error stacktrace is not included.
108+
*/
109+
include_error_stacktrace?: boolean;
110+
105111
/**
106112
* JSON input to the tool, if any
107113
*/
@@ -159,15 +165,41 @@ export namespace ExecuteToolResponse {
159165

160166
export namespace Output {
161167
export interface Error {
168+
can_retry: boolean;
169+
170+
kind:
171+
| 'TOOLKIT_LOAD_FAILED'
172+
| 'TOOL_DEFINITION_BAD_DEFINITION'
173+
| 'TOOL_DEFINITION_BAD_INPUT_SCHEMA'
174+
| 'TOOL_DEFINITION_BAD_OUTPUT_SCHEMA'
175+
| 'TOOL_REQUIREMENTS_NOT_MET'
176+
| 'TOOL_RUNTIME_BAD_INPUT_VALUE'
177+
| 'TOOL_RUNTIME_BAD_OUTPUT_VALUE'
178+
| 'TOOL_RUNTIME_RETRY'
179+
| 'TOOL_RUNTIME_CONTEXT_REQUIRED'
180+
| 'TOOL_RUNTIME_FATAL'
181+
| 'UPSTREAM_RUNTIME_BAD_REQUEST'
182+
| 'UPSTREAM_RUNTIME_AUTH_ERROR'
183+
| 'UPSTREAM_RUNTIME_NOT_FOUND'
184+
| 'UPSTREAM_RUNTIME_VALIDATION_ERROR'
185+
| 'UPSTREAM_RUNTIME_RATE_LIMIT'
186+
| 'UPSTREAM_RUNTIME_SERVER_ERROR'
187+
| 'UPSTREAM_RUNTIME_UNMAPPED'
188+
| 'UNKNOWN';
189+
162190
message: string;
163191

164192
additional_prompt_content?: string;
165193

166-
can_retry?: boolean;
167-
168194
developer_message?: string;
169195

196+
extra?: { [key: string]: unknown };
197+
170198
retry_after_ms?: number;
199+
200+
stacktrace?: string;
201+
202+
status_code?: number;
171203
}
172204

173205
export interface Log {
@@ -329,15 +361,41 @@ export namespace ToolExecutionAttempt {
329361

330362
export namespace Output {
331363
export interface Error {
364+
can_retry: boolean;
365+
366+
kind:
367+
| 'TOOLKIT_LOAD_FAILED'
368+
| 'TOOL_DEFINITION_BAD_DEFINITION'
369+
| 'TOOL_DEFINITION_BAD_INPUT_SCHEMA'
370+
| 'TOOL_DEFINITION_BAD_OUTPUT_SCHEMA'
371+
| 'TOOL_REQUIREMENTS_NOT_MET'
372+
| 'TOOL_RUNTIME_BAD_INPUT_VALUE'
373+
| 'TOOL_RUNTIME_BAD_OUTPUT_VALUE'
374+
| 'TOOL_RUNTIME_RETRY'
375+
| 'TOOL_RUNTIME_CONTEXT_REQUIRED'
376+
| 'TOOL_RUNTIME_FATAL'
377+
| 'UPSTREAM_RUNTIME_BAD_REQUEST'
378+
| 'UPSTREAM_RUNTIME_AUTH_ERROR'
379+
| 'UPSTREAM_RUNTIME_NOT_FOUND'
380+
| 'UPSTREAM_RUNTIME_VALIDATION_ERROR'
381+
| 'UPSTREAM_RUNTIME_RATE_LIMIT'
382+
| 'UPSTREAM_RUNTIME_SERVER_ERROR'
383+
| 'UPSTREAM_RUNTIME_UNMAPPED'
384+
| 'UNKNOWN';
385+
332386
message: string;
333387

334388
additional_prompt_content?: string;
335389

336-
can_retry?: boolean;
337-
338390
developer_message?: string;
339391

392+
extra?: { [key: string]: unknown };
393+
340394
retry_after_ms?: number;
395+
396+
stacktrace?: string;
397+
398+
status_code?: number;
341399
}
342400

343401
export interface Log {
@@ -398,6 +456,12 @@ export interface ToolAuthorizeParams {
398456
export interface ToolExecuteParams {
399457
tool_name: string;
400458

459+
/**
460+
* Whether to include the error stacktrace in the response. If not provided, the
461+
* error stacktrace is not included.
462+
*/
463+
include_error_stacktrace?: boolean;
464+
401465
/**
402466
* JSON input to the tool, if any
403467
*/

tests/api-resources/tools/tools.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ describe('resource tools', () => {
7171
test('execute: required and optional params', async () => {
7272
const response = await client.tools.execute({
7373
tool_name: 'tool_name',
74+
include_error_stacktrace: true,
7475
input: { foo: 'bar' },
7576
run_at: 'run_at',
7677
tool_version: 'tool_version',

0 commit comments

Comments
 (0)