@reminix/sdk 0.10.0 → 0.12.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 +43 -0
- package/README.md +47 -0
- package/client.d.mts +19 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +19 -4
- package/client.d.ts.map +1 -1
- package/client.js +18 -0
- package/client.js.map +1 -1
- package/client.mjs +18 -0
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +57 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +57 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +108 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +102 -0
- package/core/pagination.mjs.map +1 -0
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/package.json +11 -1
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resources/agents.d.mts +246 -90
- package/resources/agents.d.mts.map +1 -1
- package/resources/agents.d.ts +246 -90
- package/resources/agents.d.ts.map +1 -1
- package/resources/agents.js +28 -2
- package/resources/agents.js.map +1 -1
- package/resources/agents.mjs +28 -2
- package/resources/agents.mjs.map +1 -1
- package/resources/conversations.d.mts +107 -0
- package/resources/conversations.d.mts.map +1 -0
- package/resources/conversations.d.ts +107 -0
- package/resources/conversations.d.ts.map +1 -0
- package/resources/conversations.js +41 -0
- package/resources/conversations.js.map +1 -0
- package/resources/conversations.mjs +37 -0
- package/resources/conversations.mjs.map +1 -0
- package/resources/execution-logs.d.mts +93 -0
- package/resources/execution-logs.d.mts.map +1 -0
- package/resources/execution-logs.d.ts +93 -0
- package/resources/execution-logs.d.ts.map +1 -0
- package/resources/execution-logs.js +33 -0
- package/resources/execution-logs.js.map +1 -0
- package/resources/execution-logs.mjs +29 -0
- package/resources/execution-logs.mjs.map +1 -0
- package/resources/index.d.mts +5 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/projects.d.mts +1 -11
- package/resources/projects.d.mts.map +1 -1
- package/resources/projects.d.ts +1 -11
- package/resources/projects.d.ts.map +1 -1
- package/resources/tools.d.mts +152 -0
- package/resources/tools.d.mts.map +1 -0
- package/resources/tools.d.ts +152 -0
- package/resources/tools.d.ts.map +1 -0
- package/resources/tools.js +59 -0
- package/resources/tools.js.map +1 -0
- package/resources/tools.mjs +55 -0
- package/resources/tools.mjs.map +1 -0
- package/src/client.ts +86 -4
- package/src/core/pagination.ts +165 -0
- package/src/index.ts +1 -0
- package/src/pagination.ts +2 -0
- package/src/resources/agents.ts +296 -89
- package/src/resources/conversations.ts +146 -0
- package/src/resources/execution-logs.ts +125 -0
- package/src/resources/index.ts +26 -2
- package/src/resources/projects.ts +1 -13
- package/src/resources/tools.ts +192 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,GAeP;OACM,EAAE,YAAY,EAAgE;OAC9E,EACL,aAAa,GAKd;OACM,EACL,aAAa,GAId;OACM,EAAE,QAAQ,EAAgB;OAC1B,EACL,KAAK,GAMN"}
|
package/resources/projects.d.mts
CHANGED
|
@@ -18,16 +18,6 @@ export declare class Projects extends APIResource {
|
|
|
18
18
|
*/
|
|
19
19
|
retrieveCurrent(options?: RequestOptions): APIPromise<Project>;
|
|
20
20
|
}
|
|
21
|
-
export interface PaginationCursor {
|
|
22
|
-
/**
|
|
23
|
-
* Whether there are more results available
|
|
24
|
-
*/
|
|
25
|
-
hasMore: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Cursor for the next page of results. Null if there are no more results.
|
|
28
|
-
*/
|
|
29
|
-
nextCursor: string | null;
|
|
30
|
-
}
|
|
31
21
|
export interface Project {
|
|
32
22
|
/**
|
|
33
23
|
* Unique identifier for the project
|
|
@@ -78,6 +68,6 @@ export declare namespace Project {
|
|
|
78
68
|
}
|
|
79
69
|
}
|
|
80
70
|
export declare namespace Projects {
|
|
81
|
-
export { type
|
|
71
|
+
export { type Project as Project };
|
|
82
72
|
}
|
|
83
73
|
//# sourceMappingURL=projects.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.d.mts","sourceRoot":"","sources":["../src/resources/projects.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;OAaG;IACH,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;CAG/D;AAED,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"projects.d.mts","sourceRoot":"","sources":["../src/resources/projects.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;OAaG;IACH,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;CAG/D;AAED,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,YAAY,EAAE,OAAO,CAAC,YAAY,CAAC;IAEnC;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,yBAAiB,OAAO,CAAC;IACvB;;OAEG;IACH,UAAiB,YAAY;QAC3B;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,OAAO,IAAI,OAAO,EAAE,CAAC;CACpC"}
|
package/resources/projects.d.ts
CHANGED
|
@@ -18,16 +18,6 @@ export declare class Projects extends APIResource {
|
|
|
18
18
|
*/
|
|
19
19
|
retrieveCurrent(options?: RequestOptions): APIPromise<Project>;
|
|
20
20
|
}
|
|
21
|
-
export interface PaginationCursor {
|
|
22
|
-
/**
|
|
23
|
-
* Whether there are more results available
|
|
24
|
-
*/
|
|
25
|
-
hasMore: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Cursor for the next page of results. Null if there are no more results.
|
|
28
|
-
*/
|
|
29
|
-
nextCursor: string | null;
|
|
30
|
-
}
|
|
31
21
|
export interface Project {
|
|
32
22
|
/**
|
|
33
23
|
* Unique identifier for the project
|
|
@@ -78,6 +68,6 @@ export declare namespace Project {
|
|
|
78
68
|
}
|
|
79
69
|
}
|
|
80
70
|
export declare namespace Projects {
|
|
81
|
-
export { type
|
|
71
|
+
export { type Project as Project };
|
|
82
72
|
}
|
|
83
73
|
//# sourceMappingURL=projects.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../src/resources/projects.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;OAaG;IACH,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;CAG/D;AAED,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../src/resources/projects.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;OAaG;IACH,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;CAG/D;AAED,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,YAAY,EAAE,OAAO,CAAC,YAAY,CAAC;IAEnC;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,yBAAiB,OAAO,CAAC;IACvB;;OAEG;IACH,UAAiB,YAAY;QAC3B;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,OAAO,IAAI,OAAO,EAAE,CAAC;CACpC"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { Cursor, type CursorParams, PagePromise } from "../core/pagination.mjs";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
|
+
export declare class Tools extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Get details of a specific tool by name.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const tool = await client.tools.retrieve('x');
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
retrieve(name: string, options?: RequestOptions): APIPromise<Tool>;
|
|
15
|
+
/**
|
|
16
|
+
* List all tools in the project with optional filtering by type and status. Tools
|
|
17
|
+
* are automatically discovered from deployments.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* // Automatically fetches more pages as needed.
|
|
22
|
+
* for await (const tool of client.tools.list()) {
|
|
23
|
+
* // ...
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
list(query?: ToolListParams | null | undefined, options?: RequestOptions): PagePromise<ToolsCursor, Tool>;
|
|
28
|
+
/**
|
|
29
|
+
* Call a tool with the provided input parameters.
|
|
30
|
+
*
|
|
31
|
+
* **Timeout:** Tool calls have a 60-second timeout. If the tool takes longer to
|
|
32
|
+
* respond, you will receive a 504 Gateway Timeout error.
|
|
33
|
+
*
|
|
34
|
+
* **Use cases:**
|
|
35
|
+
*
|
|
36
|
+
* - Calling custom tools from your deployment
|
|
37
|
+
* - Invoking utility functions
|
|
38
|
+
* - Integrating with external services via tools
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const response = await client.tools.call('x', {
|
|
43
|
+
* input: { name: 'World', greeting: 'Hello' },
|
|
44
|
+
* });
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
call(name: string, body: ToolCallParams, options?: RequestOptions): APIPromise<ToolCallResponse>;
|
|
48
|
+
}
|
|
49
|
+
export type ToolsCursor = Cursor<Tool>;
|
|
50
|
+
export interface Tool {
|
|
51
|
+
/**
|
|
52
|
+
* Unique tool ID
|
|
53
|
+
*/
|
|
54
|
+
id: string;
|
|
55
|
+
/**
|
|
56
|
+
* Creation timestamp
|
|
57
|
+
*/
|
|
58
|
+
createdAt: string;
|
|
59
|
+
/**
|
|
60
|
+
* User who created the tool (for managed tools)
|
|
61
|
+
*/
|
|
62
|
+
createdBy: string | null;
|
|
63
|
+
/**
|
|
64
|
+
* Tool description
|
|
65
|
+
*/
|
|
66
|
+
description: string | null;
|
|
67
|
+
/**
|
|
68
|
+
* When the tool was discovered
|
|
69
|
+
*/
|
|
70
|
+
discoveredAt: string | null;
|
|
71
|
+
/**
|
|
72
|
+
* Tool name
|
|
73
|
+
*/
|
|
74
|
+
name: string;
|
|
75
|
+
/**
|
|
76
|
+
* JSON Schema for agent input parameters
|
|
77
|
+
*/
|
|
78
|
+
output: Tool.Output | null;
|
|
79
|
+
/**
|
|
80
|
+
* JSON Schema for agent input parameters
|
|
81
|
+
*/
|
|
82
|
+
parameters: Tool.Parameters | null;
|
|
83
|
+
/**
|
|
84
|
+
* Project ID
|
|
85
|
+
*/
|
|
86
|
+
projectId: string;
|
|
87
|
+
/**
|
|
88
|
+
* Tool status
|
|
89
|
+
*/
|
|
90
|
+
status: 'active' | 'inactive';
|
|
91
|
+
/**
|
|
92
|
+
* Tool type: "managed" for platform-provided, or "{language}" for custom tools
|
|
93
|
+
* (e.g., "python", "typescript")
|
|
94
|
+
*/
|
|
95
|
+
type: string;
|
|
96
|
+
/**
|
|
97
|
+
* Last update timestamp
|
|
98
|
+
*/
|
|
99
|
+
updatedAt: string;
|
|
100
|
+
}
|
|
101
|
+
export declare namespace Tool {
|
|
102
|
+
/**
|
|
103
|
+
* JSON Schema for agent input parameters
|
|
104
|
+
*/
|
|
105
|
+
interface Output {
|
|
106
|
+
type: string;
|
|
107
|
+
properties?: {
|
|
108
|
+
[key: string]: unknown;
|
|
109
|
+
};
|
|
110
|
+
required?: Array<string>;
|
|
111
|
+
[k: string]: unknown;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* JSON Schema for agent input parameters
|
|
115
|
+
*/
|
|
116
|
+
interface Parameters {
|
|
117
|
+
type: string;
|
|
118
|
+
properties?: {
|
|
119
|
+
[key: string]: unknown;
|
|
120
|
+
};
|
|
121
|
+
required?: Array<string>;
|
|
122
|
+
[k: string]: unknown;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
export interface ToolCallResponse {
|
|
126
|
+
/**
|
|
127
|
+
* Output from the tool execution.
|
|
128
|
+
*/
|
|
129
|
+
output?: unknown;
|
|
130
|
+
}
|
|
131
|
+
export interface ToolListParams extends CursorParams {
|
|
132
|
+
/**
|
|
133
|
+
* Filter by tool status
|
|
134
|
+
*/
|
|
135
|
+
status?: 'active' | 'inactive';
|
|
136
|
+
/**
|
|
137
|
+
* Filter by tool type (python, typescript)
|
|
138
|
+
*/
|
|
139
|
+
type?: string;
|
|
140
|
+
}
|
|
141
|
+
export interface ToolCallParams {
|
|
142
|
+
/**
|
|
143
|
+
* Input parameters for the tool. Structure depends on tool definition.
|
|
144
|
+
*/
|
|
145
|
+
input: {
|
|
146
|
+
[key: string]: unknown;
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
export declare namespace Tools {
|
|
150
|
+
export { type Tool as Tool, type ToolCallResponse as ToolCallResponse, type ToolsCursor as ToolsCursor, type ToolListParams as ToolListParams, type ToolCallParams as ToolCallParams, };
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=tools.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.mts","sourceRoot":"","sources":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1,152 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { Cursor, type CursorParams, PagePromise } from "../core/pagination.js";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
5
|
+
export declare class Tools extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Get details of a specific tool by name.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const tool = await client.tools.retrieve('x');
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
retrieve(name: string, options?: RequestOptions): APIPromise<Tool>;
|
|
15
|
+
/**
|
|
16
|
+
* List all tools in the project with optional filtering by type and status. Tools
|
|
17
|
+
* are automatically discovered from deployments.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* // Automatically fetches more pages as needed.
|
|
22
|
+
* for await (const tool of client.tools.list()) {
|
|
23
|
+
* // ...
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
list(query?: ToolListParams | null | undefined, options?: RequestOptions): PagePromise<ToolsCursor, Tool>;
|
|
28
|
+
/**
|
|
29
|
+
* Call a tool with the provided input parameters.
|
|
30
|
+
*
|
|
31
|
+
* **Timeout:** Tool calls have a 60-second timeout. If the tool takes longer to
|
|
32
|
+
* respond, you will receive a 504 Gateway Timeout error.
|
|
33
|
+
*
|
|
34
|
+
* **Use cases:**
|
|
35
|
+
*
|
|
36
|
+
* - Calling custom tools from your deployment
|
|
37
|
+
* - Invoking utility functions
|
|
38
|
+
* - Integrating with external services via tools
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const response = await client.tools.call('x', {
|
|
43
|
+
* input: { name: 'World', greeting: 'Hello' },
|
|
44
|
+
* });
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
call(name: string, body: ToolCallParams, options?: RequestOptions): APIPromise<ToolCallResponse>;
|
|
48
|
+
}
|
|
49
|
+
export type ToolsCursor = Cursor<Tool>;
|
|
50
|
+
export interface Tool {
|
|
51
|
+
/**
|
|
52
|
+
* Unique tool ID
|
|
53
|
+
*/
|
|
54
|
+
id: string;
|
|
55
|
+
/**
|
|
56
|
+
* Creation timestamp
|
|
57
|
+
*/
|
|
58
|
+
createdAt: string;
|
|
59
|
+
/**
|
|
60
|
+
* User who created the tool (for managed tools)
|
|
61
|
+
*/
|
|
62
|
+
createdBy: string | null;
|
|
63
|
+
/**
|
|
64
|
+
* Tool description
|
|
65
|
+
*/
|
|
66
|
+
description: string | null;
|
|
67
|
+
/**
|
|
68
|
+
* When the tool was discovered
|
|
69
|
+
*/
|
|
70
|
+
discoveredAt: string | null;
|
|
71
|
+
/**
|
|
72
|
+
* Tool name
|
|
73
|
+
*/
|
|
74
|
+
name: string;
|
|
75
|
+
/**
|
|
76
|
+
* JSON Schema for agent input parameters
|
|
77
|
+
*/
|
|
78
|
+
output: Tool.Output | null;
|
|
79
|
+
/**
|
|
80
|
+
* JSON Schema for agent input parameters
|
|
81
|
+
*/
|
|
82
|
+
parameters: Tool.Parameters | null;
|
|
83
|
+
/**
|
|
84
|
+
* Project ID
|
|
85
|
+
*/
|
|
86
|
+
projectId: string;
|
|
87
|
+
/**
|
|
88
|
+
* Tool status
|
|
89
|
+
*/
|
|
90
|
+
status: 'active' | 'inactive';
|
|
91
|
+
/**
|
|
92
|
+
* Tool type: "managed" for platform-provided, or "{language}" for custom tools
|
|
93
|
+
* (e.g., "python", "typescript")
|
|
94
|
+
*/
|
|
95
|
+
type: string;
|
|
96
|
+
/**
|
|
97
|
+
* Last update timestamp
|
|
98
|
+
*/
|
|
99
|
+
updatedAt: string;
|
|
100
|
+
}
|
|
101
|
+
export declare namespace Tool {
|
|
102
|
+
/**
|
|
103
|
+
* JSON Schema for agent input parameters
|
|
104
|
+
*/
|
|
105
|
+
interface Output {
|
|
106
|
+
type: string;
|
|
107
|
+
properties?: {
|
|
108
|
+
[key: string]: unknown;
|
|
109
|
+
};
|
|
110
|
+
required?: Array<string>;
|
|
111
|
+
[k: string]: unknown;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* JSON Schema for agent input parameters
|
|
115
|
+
*/
|
|
116
|
+
interface Parameters {
|
|
117
|
+
type: string;
|
|
118
|
+
properties?: {
|
|
119
|
+
[key: string]: unknown;
|
|
120
|
+
};
|
|
121
|
+
required?: Array<string>;
|
|
122
|
+
[k: string]: unknown;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
export interface ToolCallResponse {
|
|
126
|
+
/**
|
|
127
|
+
* Output from the tool execution.
|
|
128
|
+
*/
|
|
129
|
+
output?: unknown;
|
|
130
|
+
}
|
|
131
|
+
export interface ToolListParams extends CursorParams {
|
|
132
|
+
/**
|
|
133
|
+
* Filter by tool status
|
|
134
|
+
*/
|
|
135
|
+
status?: 'active' | 'inactive';
|
|
136
|
+
/**
|
|
137
|
+
* Filter by tool type (python, typescript)
|
|
138
|
+
*/
|
|
139
|
+
type?: string;
|
|
140
|
+
}
|
|
141
|
+
export interface ToolCallParams {
|
|
142
|
+
/**
|
|
143
|
+
* Input parameters for the tool. Structure depends on tool definition.
|
|
144
|
+
*/
|
|
145
|
+
input: {
|
|
146
|
+
[key: string]: unknown;
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
export declare namespace Tools {
|
|
150
|
+
export { type Tool as Tool, type ToolCallResponse as ToolCallResponse, type ToolsCursor as ToolsCursor, type ToolListParams as ToolListParams, type ToolCallParams as ToolCallParams, };
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/resources/tools.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAA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Property(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Tools = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../core/pagination.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
8
|
+
class Tools extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Get details of a specific tool by name.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const tool = await client.tools.retrieve('x');
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
retrieve(name, options) {
|
|
18
|
+
return this._client.get((0, path_1.path) `/tools/${name}`, options);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* List all tools in the project with optional filtering by type and status. Tools
|
|
22
|
+
* are automatically discovered from deployments.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* // Automatically fetches more pages as needed.
|
|
27
|
+
* for await (const tool of client.tools.list()) {
|
|
28
|
+
* // ...
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
list(query = {}, options) {
|
|
33
|
+
return this._client.getAPIList('/tools', (pagination_1.Cursor), { query, ...options });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Call a tool with the provided input parameters.
|
|
37
|
+
*
|
|
38
|
+
* **Timeout:** Tool calls have a 60-second timeout. If the tool takes longer to
|
|
39
|
+
* respond, you will receive a 504 Gateway Timeout error.
|
|
40
|
+
*
|
|
41
|
+
* **Use cases:**
|
|
42
|
+
*
|
|
43
|
+
* - Calling custom tools from your deployment
|
|
44
|
+
* - Invoking utility functions
|
|
45
|
+
* - Integrating with external services via tools
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const response = await client.tools.call('x', {
|
|
50
|
+
* input: { name: 'World', greeting: 'Hello' },
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
call(name, body, options) {
|
|
55
|
+
return this._client.post((0, path_1.path) `/tools/${name}/call`, { body, ...options });
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.Tools = Tools;
|
|
59
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/resources/tools.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAA4E;AAE5E,oDAA8C;AAE9C,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAY,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAA,mBAAY,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,CAAC,IAAY,EAAE,IAAoB,EAAE,OAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,UAAU,IAAI,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;CACF;AAtDD,sBAsDC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { Cursor } from "../core/pagination.mjs";
|
|
4
|
+
import { path } from "../internal/utils/path.mjs";
|
|
5
|
+
export class Tools extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Get details of a specific tool by name.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const tool = await client.tools.retrieve('x');
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
retrieve(name, options) {
|
|
15
|
+
return this._client.get(path `/tools/${name}`, options);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* List all tools in the project with optional filtering by type and status. Tools
|
|
19
|
+
* are automatically discovered from deployments.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* // Automatically fetches more pages as needed.
|
|
24
|
+
* for await (const tool of client.tools.list()) {
|
|
25
|
+
* // ...
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
list(query = {}, options) {
|
|
30
|
+
return this._client.getAPIList('/tools', (Cursor), { query, ...options });
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Call a tool with the provided input parameters.
|
|
34
|
+
*
|
|
35
|
+
* **Timeout:** Tool calls have a 60-second timeout. If the tool takes longer to
|
|
36
|
+
* respond, you will receive a 504 Gateway Timeout error.
|
|
37
|
+
*
|
|
38
|
+
* **Use cases:**
|
|
39
|
+
*
|
|
40
|
+
* - Calling custom tools from your deployment
|
|
41
|
+
* - Invoking utility functions
|
|
42
|
+
* - Integrating with external services via tools
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const response = await client.tools.call('x', {
|
|
47
|
+
* input: { name: 'World', greeting: 'Hello' },
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
call(name, body, options) {
|
|
52
|
+
return this._client.post(path `/tools/${name}/call`, { body, ...options });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=tools.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.mjs","sourceRoot":"","sources":["../src/resources/tools.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,MAAM,EAAkC;OAE1C,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAY,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAA,MAAY,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,CAAC,IAAY,EAAE,IAAoB,EAAE,OAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,UAAU,IAAI,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;CACF"}
|
package/src/client.ts
CHANGED
|
@@ -13,25 +13,51 @@ import * as Shims from './internal/shims';
|
|
|
13
13
|
import * as Opts from './internal/request-options';
|
|
14
14
|
import { VERSION } from './version';
|
|
15
15
|
import * as Errors from './core/error';
|
|
16
|
+
import * as Pagination from './core/pagination';
|
|
17
|
+
import { AbstractPage, type CursorParams, CursorResponse } from './core/pagination';
|
|
16
18
|
import * as Uploads from './core/uploads';
|
|
17
19
|
import * as API from './resources/index';
|
|
18
20
|
import { APIPromise } from './core/api-promise';
|
|
19
21
|
import {
|
|
22
|
+
Agent,
|
|
20
23
|
AgentChatParams,
|
|
21
24
|
AgentChatParamsNonStreaming,
|
|
22
25
|
AgentChatParamsStreaming,
|
|
23
26
|
AgentChatResponse,
|
|
27
|
+
AgentConfig,
|
|
24
28
|
AgentInvokeParams,
|
|
25
29
|
AgentInvokeParamsNonStreaming,
|
|
26
30
|
AgentInvokeParamsStreaming,
|
|
27
31
|
AgentInvokeResponse,
|
|
32
|
+
AgentListParams,
|
|
28
33
|
Agents,
|
|
34
|
+
AgentsCursor,
|
|
29
35
|
ChatMessage,
|
|
30
|
-
Context,
|
|
31
36
|
StreamChunk,
|
|
32
37
|
} from './resources/agents';
|
|
33
38
|
import { ClientTokenCreateParams, ClientTokenCreateResponse, ClientTokens } from './resources/client-tokens';
|
|
34
|
-
import {
|
|
39
|
+
import {
|
|
40
|
+
Conversation,
|
|
41
|
+
ConversationListParams,
|
|
42
|
+
ConversationRetrieveResponse,
|
|
43
|
+
Conversations,
|
|
44
|
+
ConversationsCursor,
|
|
45
|
+
} from './resources/conversations';
|
|
46
|
+
import {
|
|
47
|
+
ExecutionLog,
|
|
48
|
+
ExecutionLogListParams,
|
|
49
|
+
ExecutionLogs,
|
|
50
|
+
ExecutionLogsCursor,
|
|
51
|
+
} from './resources/execution-logs';
|
|
52
|
+
import { Project, Projects } from './resources/projects';
|
|
53
|
+
import {
|
|
54
|
+
Tool,
|
|
55
|
+
ToolCallParams,
|
|
56
|
+
ToolCallResponse,
|
|
57
|
+
ToolListParams,
|
|
58
|
+
Tools,
|
|
59
|
+
ToolsCursor,
|
|
60
|
+
} from './resources/tools';
|
|
35
61
|
import { type Fetch } from './internal/builtin-types';
|
|
36
62
|
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
|
|
37
63
|
import { FinalRequestOptions, RequestOptions } from './internal/request-options';
|
|
@@ -497,6 +523,25 @@ export class Reminix {
|
|
|
497
523
|
return { response, options, controller, requestLogID, retryOfRequestLogID, startTime };
|
|
498
524
|
}
|
|
499
525
|
|
|
526
|
+
getAPIList<Item, PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>>(
|
|
527
|
+
path: string,
|
|
528
|
+
Page: new (...args: any[]) => PageClass,
|
|
529
|
+
opts?: RequestOptions,
|
|
530
|
+
): Pagination.PagePromise<PageClass, Item> {
|
|
531
|
+
return this.requestAPIList(Page, { method: 'get', path, ...opts });
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
requestAPIList<
|
|
535
|
+
Item = unknown,
|
|
536
|
+
PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>,
|
|
537
|
+
>(
|
|
538
|
+
Page: new (...args: ConstructorParameters<typeof Pagination.AbstractPage>) => PageClass,
|
|
539
|
+
options: FinalRequestOptions,
|
|
540
|
+
): Pagination.PagePromise<PageClass, Item> {
|
|
541
|
+
const request = this.makeRequest(options, null, undefined);
|
|
542
|
+
return new Pagination.PagePromise<PageClass, Item>(this as any as Reminix, request, Page);
|
|
543
|
+
}
|
|
544
|
+
|
|
500
545
|
async fetchWithTimeout(
|
|
501
546
|
url: RequestInfo,
|
|
502
547
|
init: RequestInit | undefined,
|
|
@@ -661,6 +706,7 @@ export class Reminix {
|
|
|
661
706
|
'X-Stainless-Retry-Count': String(retryCount),
|
|
662
707
|
...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}),
|
|
663
708
|
...getPlatformHeaders(),
|
|
709
|
+
'X-Reminix-Source': 'sdk',
|
|
664
710
|
},
|
|
665
711
|
await this.authHeaders(options),
|
|
666
712
|
this._options.defaultHeaders,
|
|
@@ -731,25 +777,37 @@ export class Reminix {
|
|
|
731
777
|
|
|
732
778
|
projects: API.Projects = new API.Projects(this);
|
|
733
779
|
agents: API.Agents = new API.Agents(this);
|
|
780
|
+
tools: API.Tools = new API.Tools(this);
|
|
734
781
|
clientTokens: API.ClientTokens = new API.ClientTokens(this);
|
|
782
|
+
executionLogs: API.ExecutionLogs = new API.ExecutionLogs(this);
|
|
783
|
+
conversations: API.Conversations = new API.Conversations(this);
|
|
735
784
|
}
|
|
736
785
|
|
|
737
786
|
Reminix.Projects = Projects;
|
|
738
787
|
Reminix.Agents = Agents;
|
|
788
|
+
Reminix.Tools = Tools;
|
|
739
789
|
Reminix.ClientTokens = ClientTokens;
|
|
790
|
+
Reminix.ExecutionLogs = ExecutionLogs;
|
|
791
|
+
Reminix.Conversations = Conversations;
|
|
740
792
|
|
|
741
793
|
export declare namespace Reminix {
|
|
742
794
|
export type RequestOptions = Opts.RequestOptions;
|
|
743
795
|
|
|
744
|
-
export
|
|
796
|
+
export import Cursor = Pagination.Cursor;
|
|
797
|
+
export { type CursorParams as CursorParams, type CursorResponse as CursorResponse };
|
|
798
|
+
|
|
799
|
+
export { Projects as Projects, type Project as Project };
|
|
745
800
|
|
|
746
801
|
export {
|
|
747
802
|
Agents as Agents,
|
|
803
|
+
type Agent as Agent,
|
|
804
|
+
type AgentConfig as AgentConfig,
|
|
748
805
|
type ChatMessage as ChatMessage,
|
|
749
|
-
type Context as Context,
|
|
750
806
|
type StreamChunk as StreamChunk,
|
|
751
807
|
type AgentChatResponse as AgentChatResponse,
|
|
752
808
|
type AgentInvokeResponse as AgentInvokeResponse,
|
|
809
|
+
type AgentsCursor as AgentsCursor,
|
|
810
|
+
type AgentListParams as AgentListParams,
|
|
753
811
|
type AgentChatParams as AgentChatParams,
|
|
754
812
|
type AgentChatParamsNonStreaming as AgentChatParamsNonStreaming,
|
|
755
813
|
type AgentChatParamsStreaming as AgentChatParamsStreaming,
|
|
@@ -758,9 +816,33 @@ export declare namespace Reminix {
|
|
|
758
816
|
type AgentInvokeParamsStreaming as AgentInvokeParamsStreaming,
|
|
759
817
|
};
|
|
760
818
|
|
|
819
|
+
export {
|
|
820
|
+
Tools as Tools,
|
|
821
|
+
type Tool as Tool,
|
|
822
|
+
type ToolCallResponse as ToolCallResponse,
|
|
823
|
+
type ToolsCursor as ToolsCursor,
|
|
824
|
+
type ToolListParams as ToolListParams,
|
|
825
|
+
type ToolCallParams as ToolCallParams,
|
|
826
|
+
};
|
|
827
|
+
|
|
761
828
|
export {
|
|
762
829
|
ClientTokens as ClientTokens,
|
|
763
830
|
type ClientTokenCreateResponse as ClientTokenCreateResponse,
|
|
764
831
|
type ClientTokenCreateParams as ClientTokenCreateParams,
|
|
765
832
|
};
|
|
833
|
+
|
|
834
|
+
export {
|
|
835
|
+
ExecutionLogs as ExecutionLogs,
|
|
836
|
+
type ExecutionLog as ExecutionLog,
|
|
837
|
+
type ExecutionLogsCursor as ExecutionLogsCursor,
|
|
838
|
+
type ExecutionLogListParams as ExecutionLogListParams,
|
|
839
|
+
};
|
|
840
|
+
|
|
841
|
+
export {
|
|
842
|
+
Conversations as Conversations,
|
|
843
|
+
type Conversation as Conversation,
|
|
844
|
+
type ConversationRetrieveResponse as ConversationRetrieveResponse,
|
|
845
|
+
type ConversationsCursor as ConversationsCursor,
|
|
846
|
+
type ConversationListParams as ConversationListParams,
|
|
847
|
+
};
|
|
766
848
|
}
|