@arcadeai/arcadejs 0.1.2 → 0.2.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 +25 -0
- package/README.md +10 -1
- package/core.d.ts +3 -3
- package/core.d.ts.map +1 -1
- package/core.js.map +1 -1
- package/core.mjs.map +1 -1
- package/error.d.ts.map +1 -1
- package/index.d.mts +18 -38
- package/index.d.ts +18 -38
- package/index.d.ts.map +1 -1
- package/index.js +28 -13
- package/index.js.map +1 -1
- package/index.mjs +12 -12
- package/index.mjs.map +1 -1
- package/package.json +2 -2
- package/resources/auth.d.ts +1 -4
- package/resources/auth.d.ts.map +1 -1
- package/resources/auth.js +0 -2
- package/resources/auth.js.map +1 -1
- package/resources/auth.mjs +0 -2
- package/resources/auth.mjs.map +1 -1
- package/resources/chat/chat.d.ts +3 -8
- package/resources/chat/chat.d.ts.map +1 -1
- package/resources/chat/chat.js +2 -3
- package/resources/chat/chat.js.map +1 -1
- package/resources/chat/chat.mjs +2 -3
- package/resources/chat/chat.mjs.map +1 -1
- package/resources/chat/completions.d.ts +1 -2
- package/resources/chat/completions.d.ts.map +1 -1
- package/resources/chat/completions.js +0 -2
- package/resources/chat/completions.js.map +1 -1
- package/resources/chat/completions.mjs +0 -2
- package/resources/chat/completions.mjs.map +1 -1
- package/resources/chat/index.d.ts +2 -2
- package/resources/chat/index.d.ts.map +1 -1
- package/resources/chat/index.js.map +1 -1
- package/resources/chat/index.mjs.map +1 -1
- package/resources/health.d.ts +1 -2
- package/resources/health.d.ts.map +1 -1
- package/resources/health.js +0 -2
- package/resources/health.js.map +1 -1
- package/resources/health.mjs +0 -2
- package/resources/health.mjs.map +1 -1
- package/resources/index.d.ts +4 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -2
- package/resources/index.mjs.map +1 -1
- package/resources/shared.d.ts +2 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/shared.js.map +1 -1
- package/resources/shared.mjs.map +1 -1
- package/resources/tools/formatted.d.ts +1 -6
- package/resources/tools/formatted.d.ts.map +1 -1
- package/resources/tools/formatted.js +1 -27
- package/resources/tools/formatted.js.map +1 -1
- package/resources/tools/formatted.mjs +1 -4
- package/resources/tools/formatted.mjs.map +1 -1
- package/resources/tools/index.d.ts +2 -2
- package/resources/tools/index.d.ts.map +1 -1
- package/resources/tools/index.js +3 -3
- 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 +3 -21
- package/resources/tools/tools.d.ts.map +1 -1
- package/resources/tools/tools.js +3 -4
- package/resources/tools/tools.js.map +1 -1
- package/resources/tools/tools.mjs +3 -4
- package/resources/tools/tools.mjs.map +1 -1
- package/resources/tools.d.ts +0 -160
- package/resources/tools.d.ts.map +1 -1
- package/resources/tools.js +0 -36
- package/resources/tools.js.map +1 -1
- package/resources/tools.mjs +1 -33
- package/resources/tools.mjs.map +1 -1
- package/src/core.ts +5 -5
- package/src/error.ts +1 -1
- package/src/index.ts +77 -50
- package/src/resources/auth.ts +6 -5
- package/src/resources/chat/chat.ts +13 -9
- package/src/resources/chat/completions.ts +2 -3
- package/src/resources/chat/index.ts +2 -2
- package/src/resources/health.ts +2 -3
- package/src/resources/index.ts +24 -17
- package/src/resources/shared.ts +4 -0
- package/src/resources/tools/formatted.ts +10 -7
- package/src/resources/tools/index.ts +21 -21
- package/src/resources/tools/tools.ts +37 -22
- package/src/resources/tools.ts +0 -240
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/tools/definition.d.ts +0 -24
- package/resources/tools/definition.d.ts.map +0 -1
- package/resources/tools/definition.js +0 -17
- package/resources/tools/definition.js.map +0 -1
- package/resources/tools/definition.mjs +0 -13
- package/resources/tools/definition.mjs.map +0 -1
- package/src/resources/tools/definition.ts +0 -31
package/src/resources/tools.ts
CHANGED
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../resource';
|
|
4
|
-
import { isRequestOptions } from '../core';
|
|
5
|
-
import * as Core from '../core';
|
|
6
|
-
import * as ToolsAPI from './tools';
|
|
7
|
-
import * as Shared from './shared';
|
|
8
|
-
import { ToolDefinitionsOffsetPage } from './shared';
|
|
9
|
-
import { type OffsetPageParams } from '../pagination';
|
|
10
|
-
|
|
11
|
-
export class Tools extends APIResource {
|
|
12
|
-
/**
|
|
13
|
-
* Returns a list of tools, optionally filtered by toolkit or auth provider
|
|
14
|
-
*/
|
|
15
|
-
list(
|
|
16
|
-
query?: ToolListParams,
|
|
17
|
-
options?: Core.RequestOptions,
|
|
18
|
-
): Core.PagePromise<ToolDefinitionsOffsetPage, Shared.ToolDefinition>;
|
|
19
|
-
list(options?: Core.RequestOptions): Core.PagePromise<ToolDefinitionsOffsetPage, Shared.ToolDefinition>;
|
|
20
|
-
list(
|
|
21
|
-
query: ToolListParams | Core.RequestOptions = {},
|
|
22
|
-
options?: Core.RequestOptions,
|
|
23
|
-
): Core.PagePromise<ToolDefinitionsOffsetPage, Shared.ToolDefinition> {
|
|
24
|
-
if (isRequestOptions(query)) {
|
|
25
|
-
return this.list({}, query);
|
|
26
|
-
}
|
|
27
|
-
return this._client.getAPIList('/v1/tools/list', ToolDefinitionsOffsetPage, { query, ...options });
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Authorizes a user for a specific tool by name
|
|
32
|
-
*/
|
|
33
|
-
authorize(
|
|
34
|
-
body: ToolAuthorizeParams,
|
|
35
|
-
options?: Core.RequestOptions,
|
|
36
|
-
): Core.APIPromise<Shared.AuthorizationResponse> {
|
|
37
|
-
return this._client.post('/v1/tools/authorize', { body, ...options });
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Executes a tool by name and arguments
|
|
42
|
-
*/
|
|
43
|
-
execute(body: ToolExecuteParams, options?: Core.RequestOptions): Core.APIPromise<Response> {
|
|
44
|
-
return this._client.post('/v1/tools/execute', { body, ...options });
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Returns the arcade tool specification for a specific tool
|
|
49
|
-
*/
|
|
50
|
-
get(query: ToolGetParams, options?: Core.RequestOptions): Core.APIPromise<Shared.ToolDefinition> {
|
|
51
|
-
return this._client.get('/v1/tools/definition', { query, ...options });
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export interface AuthorizeToolRequest {
|
|
56
|
-
tool_name: string;
|
|
57
|
-
|
|
58
|
-
user_id: string;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Optional: if not provided, any version is used
|
|
62
|
-
*/
|
|
63
|
-
tool_version?: string;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export interface ExecuteToolRequest {
|
|
67
|
-
tool_name: string;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Serialized JSON string
|
|
71
|
-
*/
|
|
72
|
-
inputs?: string;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Optional: if not provided, any version is used
|
|
76
|
-
*/
|
|
77
|
-
tool_version?: string;
|
|
78
|
-
|
|
79
|
-
user_id?: string;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export interface Inputs {
|
|
83
|
-
parameters?: Array<Parameter>;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export interface Output {
|
|
87
|
-
available_modes?: Array<string>;
|
|
88
|
-
|
|
89
|
-
description?: string;
|
|
90
|
-
|
|
91
|
-
value_schema?: ValueSchema;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export interface Parameter {
|
|
95
|
-
name: string;
|
|
96
|
-
|
|
97
|
-
value_schema: ValueSchema;
|
|
98
|
-
|
|
99
|
-
description?: string;
|
|
100
|
-
|
|
101
|
-
inferrable?: boolean;
|
|
102
|
-
|
|
103
|
-
required?: boolean;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export interface Requirements {
|
|
107
|
-
authorization?: Requirements.Authorization;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export namespace Requirements {
|
|
111
|
-
export interface Authorization {
|
|
112
|
-
oauth2?: Authorization.Oauth2;
|
|
113
|
-
|
|
114
|
-
provider_id?: string;
|
|
115
|
-
|
|
116
|
-
provider_type?: string;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export namespace Authorization {
|
|
120
|
-
export interface Oauth2 {
|
|
121
|
-
scopes?: Array<string>;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export interface Response {
|
|
127
|
-
invocation_id: string;
|
|
128
|
-
|
|
129
|
-
duration?: number;
|
|
130
|
-
|
|
131
|
-
finished_at?: Response.FinishedAt;
|
|
132
|
-
|
|
133
|
-
output?: ResponseOutput;
|
|
134
|
-
|
|
135
|
-
success?: boolean;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export namespace Response {
|
|
139
|
-
export interface FinishedAt {
|
|
140
|
-
'time.Time'?: string;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export interface ResponseOutput {
|
|
145
|
-
error?: ResponseOutput.Error;
|
|
146
|
-
|
|
147
|
-
requires_authorization?: Shared.AuthorizationResponse;
|
|
148
|
-
|
|
149
|
-
value?: unknown;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
export namespace ResponseOutput {
|
|
153
|
-
export interface Error {
|
|
154
|
-
message: string;
|
|
155
|
-
|
|
156
|
-
additional_prompt_content?: string;
|
|
157
|
-
|
|
158
|
-
can_retry?: boolean;
|
|
159
|
-
|
|
160
|
-
developer_message?: string;
|
|
161
|
-
|
|
162
|
-
retry_after_ms?: number;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
export interface ToolkitDefinition {
|
|
167
|
-
name: string;
|
|
168
|
-
|
|
169
|
-
description?: string;
|
|
170
|
-
|
|
171
|
-
version?: string;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export interface ValueSchema {
|
|
175
|
-
val_type: string;
|
|
176
|
-
|
|
177
|
-
enum?: Array<string>;
|
|
178
|
-
|
|
179
|
-
inner_val_type?: string;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
export interface ToolListParams extends OffsetPageParams {
|
|
183
|
-
/**
|
|
184
|
-
* Toolkit name
|
|
185
|
-
*/
|
|
186
|
-
toolkit?: string;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
export interface ToolAuthorizeParams {
|
|
190
|
-
tool_name: string;
|
|
191
|
-
|
|
192
|
-
user_id: string;
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Optional: if not provided, any version is used
|
|
196
|
-
*/
|
|
197
|
-
tool_version?: string;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
export interface ToolExecuteParams {
|
|
201
|
-
tool_name: string;
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Serialized JSON string
|
|
205
|
-
*/
|
|
206
|
-
inputs?: string;
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Optional: if not provided, any version is used
|
|
210
|
-
*/
|
|
211
|
-
tool_version?: string;
|
|
212
|
-
|
|
213
|
-
user_id?: string;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
export interface ToolGetParams {
|
|
217
|
-
/**
|
|
218
|
-
* Tool ID
|
|
219
|
-
*/
|
|
220
|
-
toolId: string;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
export namespace Tools {
|
|
224
|
-
export import AuthorizeToolRequest = ToolsAPI.AuthorizeToolRequest;
|
|
225
|
-
export import ExecuteToolRequest = ToolsAPI.ExecuteToolRequest;
|
|
226
|
-
export import Inputs = ToolsAPI.Inputs;
|
|
227
|
-
export import Output = ToolsAPI.Output;
|
|
228
|
-
export import Parameter = ToolsAPI.Parameter;
|
|
229
|
-
export import Requirements = ToolsAPI.Requirements;
|
|
230
|
-
export import Response = ToolsAPI.Response;
|
|
231
|
-
export import ResponseOutput = ToolsAPI.ResponseOutput;
|
|
232
|
-
export import ToolkitDefinition = ToolsAPI.ToolkitDefinition;
|
|
233
|
-
export import ValueSchema = ToolsAPI.ValueSchema;
|
|
234
|
-
export import ToolListParams = ToolsAPI.ToolListParams;
|
|
235
|
-
export import ToolAuthorizeParams = ToolsAPI.ToolAuthorizeParams;
|
|
236
|
-
export import ToolExecuteParams = ToolsAPI.ToolExecuteParams;
|
|
237
|
-
export import ToolGetParams = ToolsAPI.ToolGetParams;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
export { ToolDefinitionsOffsetPage };
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.2.0'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.2.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.2.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../resource.js";
|
|
2
|
-
import * as Core from "../../core.js";
|
|
3
|
-
import * as DefinitionAPI from "./definition.js";
|
|
4
|
-
import * as Shared from "../shared.js";
|
|
5
|
-
export declare class Definition extends APIResource {
|
|
6
|
-
/**
|
|
7
|
-
* Returns the arcade tool specification for a specific tool
|
|
8
|
-
*/
|
|
9
|
-
get(query: DefinitionGetParams, options?: Core.RequestOptions): Core.APIPromise<Shared.ToolDefinition>;
|
|
10
|
-
}
|
|
11
|
-
export interface DefinitionGetParams {
|
|
12
|
-
/**
|
|
13
|
-
* Director ID
|
|
14
|
-
*/
|
|
15
|
-
directorId: string;
|
|
16
|
-
/**
|
|
17
|
-
* Tool ID
|
|
18
|
-
*/
|
|
19
|
-
toolId: string;
|
|
20
|
-
}
|
|
21
|
-
export declare namespace Definition {
|
|
22
|
-
export import DefinitionGetParams = DefinitionAPI.DefinitionGetParams;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=definition.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/resources/tools/definition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,aAAa,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AAEpC,qBAAa,UAAW,SAAQ,WAAW;IACzC;;OAEG;IACH,GAAG,CAAC,KAAK,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,cAAc,CAAC;CAGvG;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,yBAAiB,UAAU,CAAC;IAC1B,MAAM,QAAQ,mBAAmB,GAAG,aAAa,CAAC,mBAAmB,CAAC;CACvE"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Definition = void 0;
|
|
5
|
-
const resource_1 = require("../../resource.js");
|
|
6
|
-
class Definition extends resource_1.APIResource {
|
|
7
|
-
/**
|
|
8
|
-
* Returns the arcade tool specification for a specific tool
|
|
9
|
-
*/
|
|
10
|
-
get(query, options) {
|
|
11
|
-
return this._client.get('/v1/tools/definition', { query, ...options });
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.Definition = Definition;
|
|
15
|
-
(function (Definition) {
|
|
16
|
-
})(Definition = exports.Definition || (exports.Definition = {}));
|
|
17
|
-
//# sourceMappingURL=definition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../src/resources/tools/definition.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAK7C,MAAa,UAAW,SAAQ,sBAAW;IACzC;;OAEG;IACH,GAAG,CAAC,KAA0B,EAAE,OAA6B;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;CACF;AAPD,gCAOC;AAcD,WAAiB,UAAU;AAE3B,CAAC,EAFgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAE1B"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../../resource.mjs";
|
|
3
|
-
export class Definition extends APIResource {
|
|
4
|
-
/**
|
|
5
|
-
* Returns the arcade tool specification for a specific tool
|
|
6
|
-
*/
|
|
7
|
-
get(query, options) {
|
|
8
|
-
return this._client.get('/v1/tools/definition', { query, ...options });
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
(function (Definition) {
|
|
12
|
-
})(Definition || (Definition = {}));
|
|
13
|
-
//# sourceMappingURL=definition.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"definition.mjs","sourceRoot":"","sources":["../../src/resources/tools/definition.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAKtB,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;OAEG;IACH,GAAG,CAAC,KAA0B,EAAE,OAA6B;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;CACF;AAcD,WAAiB,UAAU;AAE3B,CAAC,EAFgB,UAAU,KAAV,UAAU,QAE1B"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../../resource';
|
|
4
|
-
import * as Core from '../../core';
|
|
5
|
-
import * as DefinitionAPI from './definition';
|
|
6
|
-
import * as Shared from '../shared';
|
|
7
|
-
|
|
8
|
-
export class Definition extends APIResource {
|
|
9
|
-
/**
|
|
10
|
-
* Returns the arcade tool specification for a specific tool
|
|
11
|
-
*/
|
|
12
|
-
get(query: DefinitionGetParams, options?: Core.RequestOptions): Core.APIPromise<Shared.ToolDefinition> {
|
|
13
|
-
return this._client.get('/v1/tools/definition', { query, ...options });
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface DefinitionGetParams {
|
|
18
|
-
/**
|
|
19
|
-
* Director ID
|
|
20
|
-
*/
|
|
21
|
-
directorId: string;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Tool ID
|
|
25
|
-
*/
|
|
26
|
-
toolId: string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export namespace Definition {
|
|
30
|
-
export import DefinitionGetParams = DefinitionAPI.DefinitionGetParams;
|
|
31
|
-
}
|