@arcadeai/arcadejs 1.0.0-rc.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -2
- package/README.md +1 -1
- package/core.d.ts.map +1 -1
- package/core.js +12 -6
- package/core.js.map +1 -1
- package/core.mjs +12 -6
- package/core.mjs.map +1 -1
- package/index.d.mts +5 -5
- package/index.d.ts +5 -5
- package/index.d.ts.map +1 -1
- package/index.js +3 -3
- package/index.js.map +1 -1
- package/index.mjs +4 -4
- package/index.mjs.map +1 -1
- package/package.json +2 -2
- package/resources/auth.d.ts +4 -4
- package/resources/auth.d.ts.map +1 -1
- package/resources/auth.js.map +1 -1
- package/resources/auth.mjs.map +1 -1
- package/resources/chat/chat.d.ts +1 -1
- package/resources/chat/chat.d.ts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +2 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/shared.d.ts +3 -3
- package/resources/shared.d.ts.map +1 -1
- package/resources/tools/index.d.ts +1 -1
- package/resources/tools/index.d.ts.map +1 -1
- package/resources/tools/index.js +2 -2
- package/resources/tools/index.js.map +1 -1
- package/resources/tools/index.mjs +1 -1
- package/resources/tools/index.mjs.map +1 -1
- package/resources/tools/tools.d.ts +50 -99
- package/resources/tools/tools.d.ts.map +1 -1
- package/resources/tools/tools.js +5 -5
- package/resources/tools/tools.js.map +1 -1
- package/resources/tools/tools.mjs +3 -3
- package/resources/tools/tools.mjs.map +1 -1
- package/src/core.ts +14 -6
- package/src/index.ts +9 -11
- package/src/resources/auth.ts +7 -7
- package/src/resources/chat/chat.ts +1 -1
- package/src/resources/index.ts +2 -3
- package/src/resources/shared.ts +3 -3
- package/src/resources/tools/index.ts +2 -3
- package/src/resources/tools/tools.ts +60 -135
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/src/core.ts
CHANGED
|
@@ -280,6 +280,7 @@ export abstract class APIClient {
|
|
|
280
280
|
options: FinalRequestOptions<Req>,
|
|
281
281
|
{ retryCount = 0 }: { retryCount?: number } = {},
|
|
282
282
|
): { req: RequestInit; url: string; timeout: number } {
|
|
283
|
+
options = { ...options };
|
|
283
284
|
const { method, path, query, headers: headers = {} } = options;
|
|
284
285
|
|
|
285
286
|
const body =
|
|
@@ -292,9 +293,9 @@ export abstract class APIClient {
|
|
|
292
293
|
|
|
293
294
|
const url = this.buildURL(path!, query);
|
|
294
295
|
if ('timeout' in options) validatePositiveInteger('timeout', options.timeout);
|
|
295
|
-
|
|
296
|
+
options.timeout = options.timeout ?? this.timeout;
|
|
296
297
|
const httpAgent = options.httpAgent ?? this.httpAgent ?? getDefaultAgent(url);
|
|
297
|
-
const minAgentTimeout = timeout + 1000;
|
|
298
|
+
const minAgentTimeout = options.timeout + 1000;
|
|
298
299
|
if (
|
|
299
300
|
typeof (httpAgent as any)?.options?.timeout === 'number' &&
|
|
300
301
|
minAgentTimeout > ((httpAgent as any).options.timeout ?? 0)
|
|
@@ -323,7 +324,7 @@ export abstract class APIClient {
|
|
|
323
324
|
signal: options.signal ?? null,
|
|
324
325
|
};
|
|
325
326
|
|
|
326
|
-
return { req, url, timeout };
|
|
327
|
+
return { req, url, timeout: options.timeout };
|
|
327
328
|
}
|
|
328
329
|
|
|
329
330
|
private buildHeaders({
|
|
@@ -351,15 +352,22 @@ export abstract class APIClient {
|
|
|
351
352
|
delete reqHeaders['content-type'];
|
|
352
353
|
}
|
|
353
354
|
|
|
354
|
-
// Don't set
|
|
355
|
-
//
|
|
356
|
-
//
|
|
355
|
+
// Don't set theses headers if they were already set or removed through default headers or by the caller.
|
|
356
|
+
// We check `defaultHeaders` and `headers`, which can contain nulls, instead of `reqHeaders` to account
|
|
357
|
+
// for the removal case.
|
|
357
358
|
if (
|
|
358
359
|
getHeader(defaultHeaders, 'x-stainless-retry-count') === undefined &&
|
|
359
360
|
getHeader(headers, 'x-stainless-retry-count') === undefined
|
|
360
361
|
) {
|
|
361
362
|
reqHeaders['x-stainless-retry-count'] = String(retryCount);
|
|
362
363
|
}
|
|
364
|
+
if (
|
|
365
|
+
getHeader(defaultHeaders, 'x-stainless-timeout') === undefined &&
|
|
366
|
+
getHeader(headers, 'x-stainless-timeout') === undefined &&
|
|
367
|
+
options.timeout
|
|
368
|
+
) {
|
|
369
|
+
reqHeaders['x-stainless-timeout'] = String(options.timeout);
|
|
370
|
+
}
|
|
363
371
|
|
|
364
372
|
this.validateHeaders(reqHeaders, headers);
|
|
365
373
|
|
package/src/index.ts
CHANGED
|
@@ -15,13 +15,12 @@ import {
|
|
|
15
15
|
ExecuteToolRequest,
|
|
16
16
|
ExecuteToolResponse,
|
|
17
17
|
ToolAuthorizeParams,
|
|
18
|
+
ToolDefinition,
|
|
19
|
+
ToolDefinitionsOffsetPage,
|
|
18
20
|
ToolExecuteParams,
|
|
19
21
|
ToolExecution,
|
|
20
22
|
ToolExecutionAttempt,
|
|
21
|
-
ToolGetResponse,
|
|
22
23
|
ToolListParams,
|
|
23
|
-
ToolListResponse,
|
|
24
|
-
ToolListResponsesOffsetPage,
|
|
25
24
|
Tools,
|
|
26
25
|
ValueSchema,
|
|
27
26
|
} from './resources/tools/tools';
|
|
@@ -101,7 +100,7 @@ export class Arcade extends Core.APIClient {
|
|
|
101
100
|
* API Client for interfacing with the Arcade API.
|
|
102
101
|
*
|
|
103
102
|
* @param {string | undefined} [opts.apiKey=process.env['ARCADE_API_KEY'] ?? undefined]
|
|
104
|
-
* @param {string} [opts.baseURL=process.env['ARCADE_BASE_URL'] ?? https://api.arcade
|
|
103
|
+
* @param {string} [opts.baseURL=process.env['ARCADE_BASE_URL'] ?? https://api.arcade.dev] - Override the default base URL for the API.
|
|
105
104
|
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
106
105
|
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
|
|
107
106
|
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
@@ -123,7 +122,7 @@ export class Arcade extends Core.APIClient {
|
|
|
123
122
|
const options: ClientOptions = {
|
|
124
123
|
apiKey,
|
|
125
124
|
...opts,
|
|
126
|
-
baseURL: baseURL || `https://api.arcade
|
|
125
|
+
baseURL: baseURL || `https://api.arcade.dev`,
|
|
127
126
|
};
|
|
128
127
|
|
|
129
128
|
super({
|
|
@@ -185,7 +184,7 @@ Arcade.Auth = Auth;
|
|
|
185
184
|
Arcade.Health = Health;
|
|
186
185
|
Arcade.Chat = Chat;
|
|
187
186
|
Arcade.Tools = Tools;
|
|
188
|
-
Arcade.
|
|
187
|
+
Arcade.ToolDefinitionsOffsetPage = ToolDefinitionsOffsetPage;
|
|
189
188
|
export declare namespace Arcade {
|
|
190
189
|
export type RequestOptions = Core.RequestOptions;
|
|
191
190
|
|
|
@@ -215,19 +214,18 @@ export declare namespace Arcade {
|
|
|
215
214
|
type AuthorizeToolRequest as AuthorizeToolRequest,
|
|
216
215
|
type ExecuteToolRequest as ExecuteToolRequest,
|
|
217
216
|
type ExecuteToolResponse as ExecuteToolResponse,
|
|
217
|
+
type ToolDefinition as ToolDefinition,
|
|
218
218
|
type ToolExecution as ToolExecution,
|
|
219
219
|
type ToolExecutionAttempt as ToolExecutionAttempt,
|
|
220
220
|
type ValueSchema as ValueSchema,
|
|
221
|
-
|
|
222
|
-
type ToolGetResponse as ToolGetResponse,
|
|
223
|
-
ToolListResponsesOffsetPage as ToolListResponsesOffsetPage,
|
|
221
|
+
ToolDefinitionsOffsetPage as ToolDefinitionsOffsetPage,
|
|
224
222
|
type ToolListParams as ToolListParams,
|
|
225
223
|
type ToolAuthorizeParams as ToolAuthorizeParams,
|
|
226
224
|
type ToolExecuteParams as ToolExecuteParams,
|
|
227
225
|
};
|
|
228
226
|
|
|
229
|
-
export type
|
|
230
|
-
export type
|
|
227
|
+
export type AuthorizationContext = API.AuthorizationContext;
|
|
228
|
+
export type AuthorizationResponse = API.AuthorizationResponse;
|
|
231
229
|
export type Error = API.Error;
|
|
232
230
|
}
|
|
233
231
|
|
package/src/resources/auth.ts
CHANGED
|
@@ -35,7 +35,7 @@ export class Auth extends APIResource {
|
|
|
35
35
|
userId: string,
|
|
36
36
|
provider: string,
|
|
37
37
|
options: AuthStartOptions = {},
|
|
38
|
-
): Core.APIPromise<Shared.
|
|
38
|
+
): Core.APIPromise<Shared.AuthorizationResponse> {
|
|
39
39
|
const { providerType = 'oauth2', scopes = [] } = options;
|
|
40
40
|
|
|
41
41
|
const authRequirement: AuthAuthorizeParams.AuthRequirement = {
|
|
@@ -58,7 +58,7 @@ export class Auth extends APIResource {
|
|
|
58
58
|
authorize(
|
|
59
59
|
body: AuthAuthorizeParams,
|
|
60
60
|
options?: Core.RequestOptions,
|
|
61
|
-
): Core.APIPromise<Shared.
|
|
61
|
+
): Core.APIPromise<Shared.AuthorizationResponse> {
|
|
62
62
|
return this._client.post('/v1/auth/authorize', { body, ...options });
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -70,7 +70,7 @@ export class Auth extends APIResource {
|
|
|
70
70
|
status(
|
|
71
71
|
query: AuthStatusParams,
|
|
72
72
|
options?: Core.RequestOptions,
|
|
73
|
-
): Core.APIPromise<Shared.
|
|
73
|
+
): Core.APIPromise<Shared.AuthorizationResponse> {
|
|
74
74
|
return this._client.get('/v1/auth/status', { query, ...options });
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -94,14 +94,14 @@ export class Auth extends APIResource {
|
|
|
94
94
|
* ```
|
|
95
95
|
*/
|
|
96
96
|
async waitForCompletion(
|
|
97
|
-
authResponseOrId: Shared.
|
|
98
|
-
): Promise<Shared.
|
|
97
|
+
authResponseOrId: Shared.AuthorizationResponse | string,
|
|
98
|
+
): Promise<Shared.AuthorizationResponse> {
|
|
99
99
|
let authId: string;
|
|
100
|
-
let authResponse: Shared.
|
|
100
|
+
let authResponse: Shared.AuthorizationResponse;
|
|
101
101
|
|
|
102
102
|
if (typeof authResponseOrId === 'string') {
|
|
103
103
|
authId = authResponseOrId;
|
|
104
|
-
authResponse = { status: 'pending' } as Shared.
|
|
104
|
+
authResponse = { status: 'pending' } as Shared.AuthorizationResponse;
|
|
105
105
|
} else {
|
|
106
106
|
if (!authResponseOrId.id) {
|
|
107
107
|
throw new AuthorizationError('Authorization ID is required');
|
package/src/resources/index.ts
CHANGED
|
@@ -13,16 +13,15 @@ export {
|
|
|
13
13
|
export { Health, type HealthSchema } from './health';
|
|
14
14
|
export {
|
|
15
15
|
ToolExecutionsOffsetPage,
|
|
16
|
-
|
|
16
|
+
ToolDefinitionsOffsetPage,
|
|
17
17
|
Tools,
|
|
18
18
|
type AuthorizeToolRequest,
|
|
19
19
|
type ExecuteToolRequest,
|
|
20
20
|
type ExecuteToolResponse,
|
|
21
|
+
type ToolDefinition,
|
|
21
22
|
type ToolExecution,
|
|
22
23
|
type ToolExecutionAttempt,
|
|
23
24
|
type ValueSchema,
|
|
24
|
-
type ToolListResponse,
|
|
25
|
-
type ToolGetResponse,
|
|
26
25
|
type ToolListParams,
|
|
27
26
|
type ToolAuthorizeParams,
|
|
28
27
|
type ToolExecuteParams,
|
package/src/resources/shared.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export interface
|
|
3
|
+
export interface AuthorizationContext {
|
|
4
4
|
token?: string;
|
|
5
5
|
|
|
6
6
|
user_info?: Record<string, unknown>;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export interface
|
|
9
|
+
export interface AuthorizationResponse {
|
|
10
10
|
id?: string;
|
|
11
11
|
|
|
12
|
-
context?:
|
|
12
|
+
context?: AuthorizationContext;
|
|
13
13
|
|
|
14
14
|
provider_id?: string;
|
|
15
15
|
|
|
@@ -11,16 +11,15 @@ export {
|
|
|
11
11
|
export { Scheduled, type ScheduledGetResponse, type ScheduledListParams } from './scheduled';
|
|
12
12
|
export {
|
|
13
13
|
ToolExecutionsOffsetPage,
|
|
14
|
-
|
|
14
|
+
ToolDefinitionsOffsetPage,
|
|
15
15
|
Tools,
|
|
16
16
|
type AuthorizeToolRequest,
|
|
17
17
|
type ExecuteToolRequest,
|
|
18
18
|
type ExecuteToolResponse,
|
|
19
|
+
type ToolDefinition,
|
|
19
20
|
type ToolExecution,
|
|
20
21
|
type ToolExecutionAttempt,
|
|
21
22
|
type ValueSchema,
|
|
22
|
-
type ToolListResponse,
|
|
23
|
-
type ToolGetResponse,
|
|
24
23
|
type ToolListParams,
|
|
25
24
|
type ToolAuthorizeParams,
|
|
26
25
|
type ToolExecuteParams,
|
|
@@ -29,16 +29,16 @@ export class Tools extends APIResource {
|
|
|
29
29
|
list(
|
|
30
30
|
query?: ToolListParams,
|
|
31
31
|
options?: Core.RequestOptions,
|
|
32
|
-
): Core.PagePromise<
|
|
33
|
-
list(options?: Core.RequestOptions): Core.PagePromise<
|
|
32
|
+
): Core.PagePromise<ToolDefinitionsOffsetPage, ToolDefinition>;
|
|
33
|
+
list(options?: Core.RequestOptions): Core.PagePromise<ToolDefinitionsOffsetPage, ToolDefinition>;
|
|
34
34
|
list(
|
|
35
35
|
query: ToolListParams | Core.RequestOptions = {},
|
|
36
36
|
options?: Core.RequestOptions,
|
|
37
|
-
): Core.PagePromise<
|
|
37
|
+
): Core.PagePromise<ToolDefinitionsOffsetPage, ToolDefinition> {
|
|
38
38
|
if (isRequestOptions(query)) {
|
|
39
39
|
return this.list({}, query);
|
|
40
40
|
}
|
|
41
|
-
return this._client.getAPIList('/v1/tools',
|
|
41
|
+
return this._client.getAPIList('/v1/tools', ToolDefinitionsOffsetPage, { query, ...options });
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
/**
|
|
@@ -47,7 +47,7 @@ export class Tools extends APIResource {
|
|
|
47
47
|
authorize(
|
|
48
48
|
body: ToolAuthorizeParams,
|
|
49
49
|
options?: Core.RequestOptions,
|
|
50
|
-
): Core.APIPromise<Shared.
|
|
50
|
+
): Core.APIPromise<Shared.AuthorizationResponse> {
|
|
51
51
|
return this._client.post('/v1/tools/authorize', { body, ...options });
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -61,12 +61,12 @@ export class Tools extends APIResource {
|
|
|
61
61
|
/**
|
|
62
62
|
* Returns the arcade tool specification for a specific tool
|
|
63
63
|
*/
|
|
64
|
-
get(name: string, options?: Core.RequestOptions): Core.APIPromise<
|
|
64
|
+
get(name: string, options?: Core.RequestOptions): Core.APIPromise<ToolDefinition> {
|
|
65
65
|
return this._client.get(`/v1/tools/${name}`, options);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
export class
|
|
69
|
+
export class ToolDefinitionsOffsetPage extends OffsetPage<ToolDefinition> {}
|
|
70
70
|
|
|
71
71
|
export class ToolExecutionsOffsetPage extends OffsetPage<ToolExecution> {}
|
|
72
72
|
|
|
@@ -133,7 +133,7 @@ export interface ExecuteToolResponse {
|
|
|
133
133
|
|
|
134
134
|
export namespace ExecuteToolResponse {
|
|
135
135
|
export interface Output {
|
|
136
|
-
authorization?: Shared.
|
|
136
|
+
authorization?: Shared.AuthorizationResponse;
|
|
137
137
|
|
|
138
138
|
error?: Output.Error;
|
|
139
139
|
|
|
@@ -155,95 +155,23 @@ export namespace ExecuteToolResponse {
|
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
export interface
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
created_at?: string;
|
|
162
|
-
|
|
163
|
-
execution_status?: string;
|
|
164
|
-
|
|
165
|
-
execution_type?: string;
|
|
166
|
-
|
|
167
|
-
finished_at?: string;
|
|
168
|
-
|
|
169
|
-
run_at?: string;
|
|
170
|
-
|
|
171
|
-
started_at?: string;
|
|
172
|
-
|
|
173
|
-
tool_name?: string;
|
|
174
|
-
|
|
175
|
-
toolkit_name?: string;
|
|
176
|
-
|
|
177
|
-
toolkit_version?: string;
|
|
178
|
-
|
|
179
|
-
updated_at?: string;
|
|
180
|
-
|
|
181
|
-
user_id?: string;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
export interface ToolExecutionAttempt {
|
|
185
|
-
id?: string;
|
|
186
|
-
|
|
187
|
-
finished_at?: string;
|
|
188
|
-
|
|
189
|
-
output?: ToolExecutionAttempt.Output;
|
|
190
|
-
|
|
191
|
-
started_at?: string;
|
|
192
|
-
|
|
193
|
-
success?: boolean;
|
|
194
|
-
|
|
195
|
-
system_error_message?: string;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
export namespace ToolExecutionAttempt {
|
|
199
|
-
export interface Output {
|
|
200
|
-
authorization?: Shared.AuthAuthorizationResponse;
|
|
201
|
-
|
|
202
|
-
error?: Output.Error;
|
|
203
|
-
|
|
204
|
-
value?: unknown;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
export namespace Output {
|
|
208
|
-
export interface Error {
|
|
209
|
-
message: string;
|
|
210
|
-
|
|
211
|
-
additional_prompt_content?: string;
|
|
212
|
-
|
|
213
|
-
can_retry?: boolean;
|
|
214
|
-
|
|
215
|
-
developer_message?: string;
|
|
216
|
-
|
|
217
|
-
retry_after_ms?: number;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
export interface ValueSchema {
|
|
223
|
-
val_type: string;
|
|
224
|
-
|
|
225
|
-
enum?: Array<string>;
|
|
226
|
-
|
|
227
|
-
inner_val_type?: string;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
export interface ToolListResponse {
|
|
231
|
-
input: ToolListResponse.Input;
|
|
158
|
+
export interface ToolDefinition {
|
|
159
|
+
input: ToolDefinition.Input;
|
|
232
160
|
|
|
233
161
|
name: string;
|
|
234
162
|
|
|
235
|
-
toolkit:
|
|
163
|
+
toolkit: ToolDefinition.Toolkit;
|
|
236
164
|
|
|
237
165
|
description?: string;
|
|
238
166
|
|
|
239
167
|
fully_qualified_name?: string;
|
|
240
168
|
|
|
241
|
-
output?:
|
|
169
|
+
output?: ToolDefinition.Output;
|
|
242
170
|
|
|
243
|
-
requirements?:
|
|
171
|
+
requirements?: ToolDefinition.Requirements;
|
|
244
172
|
}
|
|
245
173
|
|
|
246
|
-
export namespace
|
|
174
|
+
export namespace ToolDefinition {
|
|
247
175
|
export interface Input {
|
|
248
176
|
parameters?: Array<Input.Parameter>;
|
|
249
177
|
}
|
|
@@ -301,80 +229,78 @@ export namespace ToolListResponse {
|
|
|
301
229
|
}
|
|
302
230
|
}
|
|
303
231
|
|
|
304
|
-
export interface
|
|
305
|
-
|
|
232
|
+
export interface ToolExecution {
|
|
233
|
+
id?: string;
|
|
306
234
|
|
|
307
|
-
|
|
235
|
+
created_at?: string;
|
|
236
|
+
|
|
237
|
+
execution_status?: string;
|
|
308
238
|
|
|
309
|
-
|
|
239
|
+
execution_type?: string;
|
|
310
240
|
|
|
311
|
-
|
|
241
|
+
finished_at?: string;
|
|
312
242
|
|
|
313
|
-
|
|
243
|
+
run_at?: string;
|
|
314
244
|
|
|
315
|
-
|
|
245
|
+
started_at?: string;
|
|
316
246
|
|
|
317
|
-
|
|
318
|
-
}
|
|
247
|
+
tool_name?: string;
|
|
319
248
|
|
|
320
|
-
|
|
321
|
-
export interface Input {
|
|
322
|
-
parameters?: Array<Input.Parameter>;
|
|
323
|
-
}
|
|
249
|
+
toolkit_name?: string;
|
|
324
250
|
|
|
325
|
-
|
|
326
|
-
export interface Parameter {
|
|
327
|
-
name: string;
|
|
251
|
+
toolkit_version?: string;
|
|
328
252
|
|
|
329
|
-
|
|
253
|
+
updated_at?: string;
|
|
330
254
|
|
|
331
|
-
|
|
255
|
+
user_id?: string;
|
|
256
|
+
}
|
|
332
257
|
|
|
333
|
-
|
|
258
|
+
export interface ToolExecutionAttempt {
|
|
259
|
+
id?: string;
|
|
334
260
|
|
|
335
|
-
|
|
336
|
-
}
|
|
337
|
-
}
|
|
261
|
+
finished_at?: string;
|
|
338
262
|
|
|
339
|
-
|
|
340
|
-
name: string;
|
|
263
|
+
output?: ToolExecutionAttempt.Output;
|
|
341
264
|
|
|
342
|
-
|
|
265
|
+
started_at?: string;
|
|
343
266
|
|
|
344
|
-
|
|
345
|
-
}
|
|
267
|
+
success?: boolean;
|
|
346
268
|
|
|
347
|
-
|
|
348
|
-
|
|
269
|
+
system_error_message?: string;
|
|
270
|
+
}
|
|
349
271
|
|
|
350
|
-
|
|
272
|
+
export namespace ToolExecutionAttempt {
|
|
273
|
+
export interface Output {
|
|
274
|
+
authorization?: Shared.AuthorizationResponse;
|
|
351
275
|
|
|
352
|
-
|
|
353
|
-
}
|
|
276
|
+
error?: Output.Error;
|
|
354
277
|
|
|
355
|
-
|
|
356
|
-
authorization?: Requirements.Authorization;
|
|
278
|
+
value?: unknown;
|
|
357
279
|
}
|
|
358
280
|
|
|
359
|
-
export namespace
|
|
360
|
-
export interface
|
|
361
|
-
|
|
281
|
+
export namespace Output {
|
|
282
|
+
export interface Error {
|
|
283
|
+
message: string;
|
|
362
284
|
|
|
363
|
-
|
|
285
|
+
additional_prompt_content?: string;
|
|
364
286
|
|
|
365
|
-
|
|
287
|
+
can_retry?: boolean;
|
|
366
288
|
|
|
367
|
-
|
|
368
|
-
}
|
|
289
|
+
developer_message?: string;
|
|
369
290
|
|
|
370
|
-
|
|
371
|
-
export interface Oauth2 {
|
|
372
|
-
scopes?: Array<string>;
|
|
373
|
-
}
|
|
291
|
+
retry_after_ms?: number;
|
|
374
292
|
}
|
|
375
293
|
}
|
|
376
294
|
}
|
|
377
295
|
|
|
296
|
+
export interface ValueSchema {
|
|
297
|
+
val_type: string;
|
|
298
|
+
|
|
299
|
+
enum?: Array<string>;
|
|
300
|
+
|
|
301
|
+
inner_val_type?: string;
|
|
302
|
+
}
|
|
303
|
+
|
|
378
304
|
export interface ToolListParams extends OffsetPageParams {
|
|
379
305
|
/**
|
|
380
306
|
* Toolkit name
|
|
@@ -418,7 +344,7 @@ export interface ToolExecuteParams {
|
|
|
418
344
|
user_id?: string;
|
|
419
345
|
}
|
|
420
346
|
|
|
421
|
-
Tools.
|
|
347
|
+
Tools.ToolDefinitionsOffsetPage = ToolDefinitionsOffsetPage;
|
|
422
348
|
Tools.Scheduled = Scheduled;
|
|
423
349
|
Tools.Formatted = Formatted;
|
|
424
350
|
Tools.FormattedListResponsesOffsetPage = FormattedListResponsesOffsetPage;
|
|
@@ -428,12 +354,11 @@ export declare namespace Tools {
|
|
|
428
354
|
type AuthorizeToolRequest as AuthorizeToolRequest,
|
|
429
355
|
type ExecuteToolRequest as ExecuteToolRequest,
|
|
430
356
|
type ExecuteToolResponse as ExecuteToolResponse,
|
|
357
|
+
type ToolDefinition as ToolDefinition,
|
|
431
358
|
type ToolExecution as ToolExecution,
|
|
432
359
|
type ToolExecutionAttempt as ToolExecutionAttempt,
|
|
433
360
|
type ValueSchema as ValueSchema,
|
|
434
|
-
|
|
435
|
-
type ToolGetResponse as ToolGetResponse,
|
|
436
|
-
ToolListResponsesOffsetPage as ToolListResponsesOffsetPage,
|
|
361
|
+
ToolDefinitionsOffsetPage as ToolDefinitionsOffsetPage,
|
|
437
362
|
type ToolListParams as ToolListParams,
|
|
438
363
|
type ToolAuthorizeParams as ToolAuthorizeParams,
|
|
439
364
|
type ToolExecuteParams as ToolExecuteParams,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.1.0'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.1.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
package/version.js
CHANGED
package/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B"}
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.1.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B"}
|