@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.
Files changed (94) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +47 -0
  3. package/client.d.mts +19 -4
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +19 -4
  6. package/client.d.ts.map +1 -1
  7. package/client.js +18 -0
  8. package/client.js.map +1 -1
  9. package/client.mjs +18 -0
  10. package/client.mjs.map +1 -1
  11. package/core/pagination.d.mts +57 -0
  12. package/core/pagination.d.mts.map +1 -0
  13. package/core/pagination.d.ts +57 -0
  14. package/core/pagination.d.ts.map +1 -0
  15. package/core/pagination.js +108 -0
  16. package/core/pagination.js.map +1 -0
  17. package/core/pagination.mjs +102 -0
  18. package/core/pagination.mjs.map +1 -0
  19. package/index.d.mts +1 -0
  20. package/index.d.mts.map +1 -1
  21. package/index.d.ts +1 -0
  22. package/index.d.ts.map +1 -1
  23. package/index.js +3 -1
  24. package/index.js.map +1 -1
  25. package/index.mjs +1 -0
  26. package/index.mjs.map +1 -1
  27. package/package.json +11 -1
  28. package/pagination.d.mts +2 -0
  29. package/pagination.d.mts.map +1 -0
  30. package/pagination.d.ts +2 -0
  31. package/pagination.d.ts.map +1 -0
  32. package/pagination.js +6 -0
  33. package/pagination.js.map +1 -0
  34. package/pagination.mjs +2 -0
  35. package/pagination.mjs.map +1 -0
  36. package/resources/agents.d.mts +246 -90
  37. package/resources/agents.d.mts.map +1 -1
  38. package/resources/agents.d.ts +246 -90
  39. package/resources/agents.d.ts.map +1 -1
  40. package/resources/agents.js +28 -2
  41. package/resources/agents.js.map +1 -1
  42. package/resources/agents.mjs +28 -2
  43. package/resources/agents.mjs.map +1 -1
  44. package/resources/conversations.d.mts +107 -0
  45. package/resources/conversations.d.mts.map +1 -0
  46. package/resources/conversations.d.ts +107 -0
  47. package/resources/conversations.d.ts.map +1 -0
  48. package/resources/conversations.js +41 -0
  49. package/resources/conversations.js.map +1 -0
  50. package/resources/conversations.mjs +37 -0
  51. package/resources/conversations.mjs.map +1 -0
  52. package/resources/execution-logs.d.mts +93 -0
  53. package/resources/execution-logs.d.mts.map +1 -0
  54. package/resources/execution-logs.d.ts +93 -0
  55. package/resources/execution-logs.d.ts.map +1 -0
  56. package/resources/execution-logs.js +33 -0
  57. package/resources/execution-logs.js.map +1 -0
  58. package/resources/execution-logs.mjs +29 -0
  59. package/resources/execution-logs.mjs.map +1 -0
  60. package/resources/index.d.mts +5 -2
  61. package/resources/index.d.mts.map +1 -1
  62. package/resources/index.d.ts +5 -2
  63. package/resources/index.d.ts.map +1 -1
  64. package/resources/index.js +7 -1
  65. package/resources/index.js.map +1 -1
  66. package/resources/index.mjs +3 -0
  67. package/resources/index.mjs.map +1 -1
  68. package/resources/projects.d.mts +1 -11
  69. package/resources/projects.d.mts.map +1 -1
  70. package/resources/projects.d.ts +1 -11
  71. package/resources/projects.d.ts.map +1 -1
  72. package/resources/tools.d.mts +152 -0
  73. package/resources/tools.d.mts.map +1 -0
  74. package/resources/tools.d.ts +152 -0
  75. package/resources/tools.d.ts.map +1 -0
  76. package/resources/tools.js +59 -0
  77. package/resources/tools.js.map +1 -0
  78. package/resources/tools.mjs +55 -0
  79. package/resources/tools.mjs.map +1 -0
  80. package/src/client.ts +86 -4
  81. package/src/core/pagination.ts +165 -0
  82. package/src/index.ts +1 -0
  83. package/src/pagination.ts +2 -0
  84. package/src/resources/agents.ts +296 -89
  85. package/src/resources/conversations.ts +146 -0
  86. package/src/resources/execution-logs.ts +125 -0
  87. package/src/resources/index.ts +26 -2
  88. package/src/resources/projects.ts +1 -13
  89. package/src/resources/tools.ts +192 -0
  90. package/src/version.ts +1 -1
  91. package/version.d.mts +1 -1
  92. package/version.d.ts +1 -1
  93. package/version.js +1 -1
  94. package/version.mjs +1 -1
@@ -0,0 +1,125 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { Cursor, type CursorParams, PagePromise } from '../core/pagination';
6
+ import { RequestOptions } from '../internal/request-options';
7
+ import { path } from '../internal/utils/path';
8
+
9
+ export class ExecutionLogs extends APIResource {
10
+ /**
11
+ * Get details of a specific execution log by ID.
12
+ */
13
+ retrieve(id: string, options?: RequestOptions): APIPromise<ExecutionLog> {
14
+ return this._client.get(path`/execution-logs/${id}`, options);
15
+ }
16
+
17
+ /**
18
+ * List execution logs for the project with optional filtering.
19
+ *
20
+ * Execution logs track all agent invocations, chats, and tool executions. Use
21
+ * filters to narrow down results by type, source, name, or status.
22
+ *
23
+ * **Filters:**
24
+ *
25
+ * - `type`: Filter by execution type (agent_execute, tool_execute)
26
+ * - `source`: Filter by request source (api, cli, dashboard, widget, sdk)
27
+ * - `name`: Filter by agent or tool name
28
+ * - `status`: Filter by result status (success, error, timeout)
29
+ */
30
+ list(
31
+ query: ExecutionLogListParams | null | undefined = {},
32
+ options?: RequestOptions,
33
+ ): PagePromise<ExecutionLogsCursor, ExecutionLog> {
34
+ return this._client.getAPIList('/execution-logs', Cursor<ExecutionLog>, { query, ...options });
35
+ }
36
+ }
37
+
38
+ export type ExecutionLogsCursor = Cursor<ExecutionLog>;
39
+
40
+ export interface ExecutionLog {
41
+ /**
42
+ * Unique execution log ID
43
+ */
44
+ id: string;
45
+
46
+ /**
47
+ * When the execution occurred
48
+ */
49
+ createdAt: string;
50
+
51
+ /**
52
+ * Execution duration in milliseconds
53
+ */
54
+ durationMs: number | null;
55
+
56
+ /**
57
+ * Error message (null for success)
58
+ */
59
+ error: string | null;
60
+
61
+ /**
62
+ * Agent or tool name
63
+ */
64
+ name: string;
65
+
66
+ /**
67
+ * Project ID
68
+ */
69
+ projectId: string;
70
+
71
+ /**
72
+ * Where the request originated
73
+ */
74
+ source: 'api' | 'cli' | 'dashboard' | 'widget' | 'sdk';
75
+
76
+ /**
77
+ * Execution result status
78
+ */
79
+ status: 'success' | 'error' | 'timeout';
80
+
81
+ /**
82
+ * Type of execution
83
+ */
84
+ type: 'agent_execute' | 'agent_chat' | 'tool_execute';
85
+
86
+ /**
87
+ * Input parameters
88
+ */
89
+ input?: unknown;
90
+
91
+ /**
92
+ * Output from execution (null for errors)
93
+ */
94
+ output?: unknown;
95
+ }
96
+
97
+ export interface ExecutionLogListParams extends CursorParams {
98
+ /**
99
+ * Filter by agent or tool name
100
+ */
101
+ name?: string;
102
+
103
+ /**
104
+ * Filter by request source
105
+ */
106
+ source?: 'api' | 'cli' | 'dashboard' | 'widget' | 'sdk';
107
+
108
+ /**
109
+ * Filter by execution status
110
+ */
111
+ status?: 'success' | 'error' | 'timeout';
112
+
113
+ /**
114
+ * Filter by execution type
115
+ */
116
+ type?: 'agent_execute' | 'agent_chat' | 'tool_execute';
117
+ }
118
+
119
+ export declare namespace ExecutionLogs {
120
+ export {
121
+ type ExecutionLog as ExecutionLog,
122
+ type ExecutionLogsCursor as ExecutionLogsCursor,
123
+ type ExecutionLogListParams as ExecutionLogListParams,
124
+ };
125
+ }
@@ -2,17 +2,41 @@
2
2
 
3
3
  export {
4
4
  Agents,
5
+ type Agent,
6
+ type AgentConfig,
5
7
  type ChatMessage,
6
- type Context,
7
8
  type StreamChunk,
8
9
  type AgentChatResponse,
9
10
  type AgentInvokeResponse,
11
+ type AgentListParams,
10
12
  type AgentChatParams,
11
13
  type AgentChatParamsNonStreaming,
12
14
  type AgentChatParamsStreaming,
13
15
  type AgentInvokeParams,
14
16
  type AgentInvokeParamsNonStreaming,
15
17
  type AgentInvokeParamsStreaming,
18
+ type AgentsCursor,
16
19
  } from './agents';
17
20
  export { ClientTokens, type ClientTokenCreateResponse, type ClientTokenCreateParams } from './client-tokens';
18
- export { Projects, type PaginationCursor, type Project } from './projects';
21
+ export {
22
+ Conversations,
23
+ type Conversation,
24
+ type ConversationRetrieveResponse,
25
+ type ConversationListParams,
26
+ type ConversationsCursor,
27
+ } from './conversations';
28
+ export {
29
+ ExecutionLogs,
30
+ type ExecutionLog,
31
+ type ExecutionLogListParams,
32
+ type ExecutionLogsCursor,
33
+ } from './execution-logs';
34
+ export { Projects, type Project } from './projects';
35
+ export {
36
+ Tools,
37
+ type Tool,
38
+ type ToolCallResponse,
39
+ type ToolListParams,
40
+ type ToolCallParams,
41
+ type ToolsCursor,
42
+ } from './tools';
@@ -24,18 +24,6 @@ export class Projects extends APIResource {
24
24
  }
25
25
  }
26
26
 
27
- export interface PaginationCursor {
28
- /**
29
- * Whether there are more results available
30
- */
31
- hasMore: boolean;
32
-
33
- /**
34
- * Cursor for the next page of results. Null if there are no more results.
35
- */
36
- nextCursor: string | null;
37
- }
38
-
39
27
  export interface Project {
40
28
  /**
41
29
  * Unique identifier for the project
@@ -96,5 +84,5 @@ export namespace Project {
96
84
  }
97
85
 
98
86
  export declare namespace Projects {
99
- export { type PaginationCursor as PaginationCursor, type Project as Project };
87
+ export { type Project as Project };
100
88
  }
@@ -0,0 +1,192 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { Cursor, type CursorParams, PagePromise } from '../core/pagination';
6
+ import { RequestOptions } from '../internal/request-options';
7
+ import { path } from '../internal/utils/path';
8
+
9
+ export class Tools extends APIResource {
10
+ /**
11
+ * Get details of a specific tool by name.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const tool = await client.tools.retrieve('x');
16
+ * ```
17
+ */
18
+ retrieve(name: string, options?: RequestOptions): APIPromise<Tool> {
19
+ return this._client.get(path`/tools/${name}`, options);
20
+ }
21
+
22
+ /**
23
+ * List all tools in the project with optional filtering by type and status. Tools
24
+ * are automatically discovered from deployments.
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * // Automatically fetches more pages as needed.
29
+ * for await (const tool of client.tools.list()) {
30
+ * // ...
31
+ * }
32
+ * ```
33
+ */
34
+ list(
35
+ query: ToolListParams | null | undefined = {},
36
+ options?: RequestOptions,
37
+ ): PagePromise<ToolsCursor, Tool> {
38
+ return this._client.getAPIList('/tools', Cursor<Tool>, { query, ...options });
39
+ }
40
+
41
+ /**
42
+ * Call a tool with the provided input parameters.
43
+ *
44
+ * **Timeout:** Tool calls have a 60-second timeout. If the tool takes longer to
45
+ * respond, you will receive a 504 Gateway Timeout error.
46
+ *
47
+ * **Use cases:**
48
+ *
49
+ * - Calling custom tools from your deployment
50
+ * - Invoking utility functions
51
+ * - Integrating with external services via tools
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * const response = await client.tools.call('x', {
56
+ * input: { name: 'World', greeting: 'Hello' },
57
+ * });
58
+ * ```
59
+ */
60
+ call(name: string, body: ToolCallParams, options?: RequestOptions): APIPromise<ToolCallResponse> {
61
+ return this._client.post(path`/tools/${name}/call`, { body, ...options });
62
+ }
63
+ }
64
+
65
+ export type ToolsCursor = Cursor<Tool>;
66
+
67
+ export interface Tool {
68
+ /**
69
+ * Unique tool ID
70
+ */
71
+ id: string;
72
+
73
+ /**
74
+ * Creation timestamp
75
+ */
76
+ createdAt: string;
77
+
78
+ /**
79
+ * User who created the tool (for managed tools)
80
+ */
81
+ createdBy: string | null;
82
+
83
+ /**
84
+ * Tool description
85
+ */
86
+ description: string | null;
87
+
88
+ /**
89
+ * When the tool was discovered
90
+ */
91
+ discoveredAt: string | null;
92
+
93
+ /**
94
+ * Tool name
95
+ */
96
+ name: string;
97
+
98
+ /**
99
+ * JSON Schema for agent input parameters
100
+ */
101
+ output: Tool.Output | null;
102
+
103
+ /**
104
+ * JSON Schema for agent input parameters
105
+ */
106
+ parameters: Tool.Parameters | null;
107
+
108
+ /**
109
+ * Project ID
110
+ */
111
+ projectId: string;
112
+
113
+ /**
114
+ * Tool status
115
+ */
116
+ status: 'active' | 'inactive';
117
+
118
+ /**
119
+ * Tool type: "managed" for platform-provided, or "{language}" for custom tools
120
+ * (e.g., "python", "typescript")
121
+ */
122
+ type: string;
123
+
124
+ /**
125
+ * Last update timestamp
126
+ */
127
+ updatedAt: string;
128
+ }
129
+
130
+ export namespace Tool {
131
+ /**
132
+ * JSON Schema for agent input parameters
133
+ */
134
+ export interface Output {
135
+ type: string;
136
+
137
+ properties?: { [key: string]: unknown };
138
+
139
+ required?: Array<string>;
140
+
141
+ [k: string]: unknown;
142
+ }
143
+
144
+ /**
145
+ * JSON Schema for agent input parameters
146
+ */
147
+ export interface Parameters {
148
+ type: string;
149
+
150
+ properties?: { [key: string]: unknown };
151
+
152
+ required?: Array<string>;
153
+
154
+ [k: string]: unknown;
155
+ }
156
+ }
157
+
158
+ export interface ToolCallResponse {
159
+ /**
160
+ * Output from the tool execution.
161
+ */
162
+ output?: unknown;
163
+ }
164
+
165
+ export interface ToolListParams extends CursorParams {
166
+ /**
167
+ * Filter by tool status
168
+ */
169
+ status?: 'active' | 'inactive';
170
+
171
+ /**
172
+ * Filter by tool type (python, typescript)
173
+ */
174
+ type?: string;
175
+ }
176
+
177
+ export interface ToolCallParams {
178
+ /**
179
+ * Input parameters for the tool. Structure depends on tool definition.
180
+ */
181
+ input: { [key: string]: unknown };
182
+ }
183
+
184
+ export declare namespace Tools {
185
+ export {
186
+ type Tool as Tool,
187
+ type ToolCallResponse as ToolCallResponse,
188
+ type ToolsCursor as ToolsCursor,
189
+ type ToolListParams as ToolListParams,
190
+ type ToolCallParams as ToolCallParams,
191
+ };
192
+ }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.10.0'; // x-release-please-version
1
+ export const VERSION = '0.12.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.10.0";
1
+ export declare const VERSION = "0.12.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.10.0";
1
+ export declare const VERSION = "0.12.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.10.0'; // x-release-please-version
4
+ exports.VERSION = '0.12.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.10.0'; // x-release-please-version
1
+ export const VERSION = '0.12.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map