@arcadeai/arcadejs 0.2.0 → 0.2.2

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.
Files changed (66) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +2 -2
  3. package/core.d.ts +1 -2
  4. package/core.d.ts.map +1 -1
  5. package/core.js +7 -11
  6. package/core.js.map +1 -1
  7. package/core.mjs +7 -11
  8. package/core.mjs.map +1 -1
  9. package/error.d.ts +18 -24
  10. package/error.d.ts.map +1 -1
  11. package/error.js +1 -31
  12. package/error.js.map +1 -1
  13. package/error.mjs +1 -31
  14. package/error.mjs.map +1 -1
  15. package/index.d.mts +2 -3
  16. package/index.d.ts +2 -3
  17. package/index.d.ts.map +1 -1
  18. package/index.js +1 -0
  19. package/index.js.map +1 -1
  20. package/index.mjs +2 -1
  21. package/index.mjs.map +1 -1
  22. package/package.json +1 -1
  23. package/resources/index.d.ts +1 -1
  24. package/resources/index.d.ts.map +1 -1
  25. package/resources/index.js +2 -1
  26. package/resources/index.js.map +1 -1
  27. package/resources/index.mjs +1 -1
  28. package/resources/index.mjs.map +1 -1
  29. package/resources/shared.d.ts +0 -12
  30. package/resources/shared.d.ts.map +1 -1
  31. package/resources/shared.js +0 -5
  32. package/resources/shared.js.map +1 -1
  33. package/resources/shared.mjs +1 -3
  34. package/resources/shared.mjs.map +1 -1
  35. package/resources/tools/formatted.d.ts +2 -2
  36. package/resources/tools/index.d.ts +2 -1
  37. package/resources/tools/index.d.ts.map +1 -1
  38. package/resources/tools/index.js +4 -1
  39. package/resources/tools/index.js.map +1 -1
  40. package/resources/tools/index.mjs +2 -1
  41. package/resources/tools/index.mjs.map +1 -1
  42. package/resources/tools/scheduled.d.ts +57 -0
  43. package/resources/tools/scheduled.d.ts.map +1 -0
  44. package/resources/tools/scheduled.js +21 -0
  45. package/resources/tools/scheduled.js.map +1 -0
  46. package/resources/tools/scheduled.mjs +17 -0
  47. package/resources/tools/scheduled.mjs.map +1 -0
  48. package/resources/tools/tools.d.ts +225 -49
  49. package/resources/tools/tools.d.ts.map +1 -1
  50. package/resources/tools/tools.js +11 -4
  51. package/resources/tools/tools.js.map +1 -1
  52. package/resources/tools/tools.mjs +9 -3
  53. package/resources/tools/tools.mjs.map +1 -1
  54. package/src/core.ts +8 -14
  55. package/src/error.ts +24 -40
  56. package/src/index.ts +13 -15
  57. package/src/resources/index.ts +6 -7
  58. package/src/resources/shared.ts +0 -19
  59. package/src/resources/tools/formatted.ts +2 -2
  60. package/src/resources/tools/index.ts +7 -7
  61. package/src/resources/tools/scheduled.ts +92 -0
  62. package/src/resources/tools/tools.ts +321 -66
  63. package/src/version.ts +1 -1
  64. package/version.d.ts +1 -1
  65. package/version.js +1 -1
  66. package/version.mjs +1 -1
package/src/index.ts CHANGED
@@ -13,19 +13,18 @@ import { Chat, ChatMessage, ChatRequest, ChatResponse, Choice, Usage } from './r
13
13
  import {
14
14
  AuthorizeToolRequest,
15
15
  ExecuteToolRequest,
16
- Inputs,
17
- Output,
18
- Parameter,
19
- Requirements,
20
- Response,
16
+ ExecuteToolResponse,
21
17
  ResponseOutput,
22
18
  ToolAuthorizeParams,
23
19
  ToolExecuteParams,
20
+ ToolExecution,
21
+ ToolExecutionAttempt,
24
22
  ToolGetParams,
23
+ ToolGetResponse,
25
24
  ToolListParams,
26
- ToolkitDefinition,
25
+ ToolListResponse,
26
+ ToolListResponsesOffsetPage,
27
27
  Tools,
28
- ValueSchema,
29
28
  } from './resources/tools/tools';
30
29
 
31
30
  export interface ClientOptions {
@@ -187,6 +186,7 @@ Arcade.Auth = Auth;
187
186
  Arcade.Health = Health;
188
187
  Arcade.Chat = Chat;
189
188
  Arcade.Tools = Tools;
189
+ Arcade.ToolListResponsesOffsetPage = ToolListResponsesOffsetPage;
190
190
  export declare namespace Arcade {
191
191
  export type RequestOptions = Core.RequestOptions;
192
192
 
@@ -215,14 +215,13 @@ export declare namespace Arcade {
215
215
  Tools as Tools,
216
216
  type AuthorizeToolRequest as AuthorizeToolRequest,
217
217
  type ExecuteToolRequest as ExecuteToolRequest,
218
- type Inputs as Inputs,
219
- type Output as Output,
220
- type Parameter as Parameter,
221
- type Requirements as Requirements,
222
- type Response as Response,
218
+ type ExecuteToolResponse as ExecuteToolResponse,
223
219
  type ResponseOutput as ResponseOutput,
224
- type ToolkitDefinition as ToolkitDefinition,
225
- type ValueSchema as ValueSchema,
220
+ type ToolExecution as ToolExecution,
221
+ type ToolExecutionAttempt as ToolExecutionAttempt,
222
+ type ToolListResponse as ToolListResponse,
223
+ type ToolGetResponse as ToolGetResponse,
224
+ ToolListResponsesOffsetPage as ToolListResponsesOffsetPage,
226
225
  type ToolListParams as ToolListParams,
227
226
  type ToolAuthorizeParams as ToolAuthorizeParams,
228
227
  type ToolExecuteParams as ToolExecuteParams,
@@ -231,7 +230,6 @@ export declare namespace Arcade {
231
230
 
232
231
  export type AuthorizationResponse = API.AuthorizationResponse;
233
232
  export type Error = API.Error;
234
- export type ToolDefinition = API.ToolDefinition;
235
233
  }
236
234
 
237
235
  export { toFile, fileFromPath } from './uploads';
@@ -12,17 +12,16 @@ export {
12
12
  } from './chat/chat';
13
13
  export { Health, type HealthSchema } from './health';
14
14
  export {
15
+ ToolListResponsesOffsetPage,
15
16
  Tools,
16
17
  type AuthorizeToolRequest,
17
18
  type ExecuteToolRequest,
18
- type Inputs,
19
- type Output,
20
- type Parameter,
21
- type Requirements,
22
- type Response,
19
+ type ExecuteToolResponse,
23
20
  type ResponseOutput,
24
- type ToolkitDefinition,
25
- type ValueSchema,
21
+ type ToolExecution,
22
+ type ToolExecutionAttempt,
23
+ type ToolListResponse,
24
+ type ToolGetResponse,
26
25
  type ToolListParams,
27
26
  type ToolAuthorizeParams,
28
27
  type ToolExecuteParams,
@@ -1,8 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import * as ToolsAPI from './tools/tools';
4
- import { OffsetPage } from '../pagination';
5
-
6
3
  export interface AuthorizationResponse {
7
4
  authorization_id?: string;
8
5
 
@@ -32,19 +29,3 @@ export interface Error {
32
29
 
33
30
  name?: string;
34
31
  }
35
-
36
- export interface ToolDefinition {
37
- inputs: ToolsAPI.Inputs;
38
-
39
- name: string;
40
-
41
- toolkit: ToolsAPI.ToolkitDefinition;
42
-
43
- description?: string;
44
-
45
- output?: ToolsAPI.Output;
46
-
47
- requirements?: ToolsAPI.Requirements;
48
- }
49
-
50
- export class ToolDefinitionsOffsetPage extends OffsetPage<ToolDefinition> {}
@@ -7,8 +7,8 @@ import { OffsetPage, type OffsetPageParams } from '../../pagination';
7
7
 
8
8
  export class Formatted extends APIResource {
9
9
  /**
10
- * Returns a page of tools, optionally filtered by toolkit, formatted for a
11
- * specific provider
10
+ * Returns a page of tools from the engine configuration, optionally filtered by
11
+ * toolkit, formatted for a specific provider
12
12
  */
13
13
  list(
14
14
  query?: FormattedListParams,
@@ -8,18 +8,18 @@ export {
8
8
  type FormattedListParams,
9
9
  type FormattedGetParams,
10
10
  } from './formatted';
11
+ export { Scheduled, type ScheduledListResponse, type ScheduledDetailsResponse } from './scheduled';
11
12
  export {
13
+ ToolListResponsesOffsetPage,
12
14
  Tools,
13
15
  type AuthorizeToolRequest,
14
16
  type ExecuteToolRequest,
15
- type Inputs,
16
- type Output,
17
- type Parameter,
18
- type Requirements,
19
- type Response,
17
+ type ExecuteToolResponse,
20
18
  type ResponseOutput,
21
- type ToolkitDefinition,
22
- type ValueSchema,
19
+ type ToolExecution,
20
+ type ToolExecutionAttempt,
21
+ type ToolListResponse,
22
+ type ToolGetResponse,
23
23
  type ToolListParams,
24
24
  type ToolAuthorizeParams,
25
25
  type ToolExecuteParams,
@@ -0,0 +1,92 @@
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 ToolsAPI from './tools';
6
+
7
+ export class Scheduled extends APIResource {
8
+ /**
9
+ * Returns a page of scheduled tool executions
10
+ */
11
+ list(options?: Core.RequestOptions): Core.APIPromise<ScheduledListResponse> {
12
+ return this._client.get('/v1/tools/scheduled', options);
13
+ }
14
+
15
+ /**
16
+ * Returns the details for a specific scheduled tool execution
17
+ */
18
+ details(id: string, options?: Core.RequestOptions): Core.APIPromise<ScheduledDetailsResponse> {
19
+ return this._client.get(`/v1/tools/scheduled/${id}`, options);
20
+ }
21
+ }
22
+
23
+ export interface ScheduledListResponse {
24
+ items?: Array<ToolsAPI.ToolExecution>;
25
+
26
+ limit?: number;
27
+
28
+ offset?: number;
29
+
30
+ page_count?: number;
31
+
32
+ total_count?: number;
33
+ }
34
+
35
+ export interface ScheduledDetailsResponse {
36
+ id?: string;
37
+
38
+ attempts?: Array<ToolsAPI.ToolExecutionAttempt>;
39
+
40
+ created_at?: ScheduledDetailsResponse.CreatedAt;
41
+
42
+ execution_status?: string;
43
+
44
+ execution_type?: string;
45
+
46
+ finished_at?: ScheduledDetailsResponse.FinishedAt;
47
+
48
+ inputs?: Record<string, unknown>;
49
+
50
+ run_at?: ScheduledDetailsResponse.RunAt;
51
+
52
+ started_at?: ScheduledDetailsResponse.StartedAt;
53
+
54
+ tool_name?: string;
55
+
56
+ toolkit_name?: string;
57
+
58
+ toolkit_version?: string;
59
+
60
+ updated_at?: ScheduledDetailsResponse.UpdatedAt;
61
+
62
+ user_id?: string;
63
+ }
64
+
65
+ export namespace ScheduledDetailsResponse {
66
+ export interface CreatedAt {
67
+ 'time.Time'?: string;
68
+ }
69
+
70
+ export interface FinishedAt {
71
+ 'time.Time'?: string;
72
+ }
73
+
74
+ export interface RunAt {
75
+ 'time.Time'?: string;
76
+ }
77
+
78
+ export interface StartedAt {
79
+ 'time.Time'?: string;
80
+ }
81
+
82
+ export interface UpdatedAt {
83
+ 'time.Time'?: string;
84
+ }
85
+ }
86
+
87
+ export declare namespace Scheduled {
88
+ export {
89
+ type ScheduledListResponse as ScheduledListResponse,
90
+ type ScheduledDetailsResponse as ScheduledDetailsResponse,
91
+ };
92
+ }