@reminix/sdk 0.10.0 → 0.11.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 +34 -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 +257 -98
- package/resources/agents.d.mts.map +1 -1
- package/resources/agents.d.ts +257 -98
- package/resources/agents.d.ts.map +1 -1
- package/resources/agents.js +29 -3
- package/resources/agents.js.map +1 -1
- package/resources/agents.mjs +29 -3
- 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 +94 -12
- package/src/core/pagination.ts +165 -0
- package/src/index.ts +1 -0
- package/src/pagination.ts +2 -0
- package/src/resources/agents.ts +319 -109
- package/src/resources/conversations.ts +146 -0
- package/src/resources/execution-logs.ts +125 -0
- package/src/resources/index.ts +30 -6
- 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/agents.d.mts
CHANGED
|
@@ -1,46 +1,53 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
2
|
import * as AgentsAPI from "./agents.mjs";
|
|
3
3
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
4
|
+
import { Cursor, type CursorParams, PagePromise } from "../core/pagination.mjs";
|
|
4
5
|
import { Stream } from "../core/streaming.mjs";
|
|
5
6
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
6
7
|
export declare class Agents extends APIResource {
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
-
* conversation context through the messages array, allowing for multi-turn
|
|
10
|
-
* conversations.
|
|
9
|
+
* Get details of a specific agent by name.
|
|
11
10
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const agent = await client.agents.retrieve('x');
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
retrieve(name: string, options?: RequestOptions): APIPromise<Agent>;
|
|
17
|
+
/**
|
|
18
|
+
* List all agents in the project with optional filtering by type and status.
|
|
16
19
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* // Automatically fetches more pages as needed.
|
|
23
|
+
* for await (const agent of client.agents.list()) {
|
|
24
|
+
* // ...
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
list(query?: AgentListParams | null | undefined, options?: RequestOptions): PagePromise<AgentsCursor, Agent>;
|
|
29
|
+
/**
|
|
30
|
+
* Send a chat message to an agent and receive a response.
|
|
20
31
|
*
|
|
21
|
-
* **
|
|
32
|
+
* **Supported Agents:**
|
|
22
33
|
*
|
|
23
|
-
* -
|
|
24
|
-
* -
|
|
25
|
-
*
|
|
26
|
-
* - Conversational agents that need context
|
|
34
|
+
* - Managed agents: Always supported
|
|
35
|
+
* - Custom agents: Only supported if agent has `messages` in both requestKeys and
|
|
36
|
+
* responseKeys
|
|
27
37
|
*
|
|
28
|
-
* **
|
|
38
|
+
* **Tool Calls:** Messages support the OpenAI tool calling format:
|
|
29
39
|
*
|
|
30
|
-
* -
|
|
31
|
-
* -
|
|
32
|
-
* -
|
|
40
|
+
* - Assistant messages can include `tool_calls` array with function calls
|
|
41
|
+
* - Tool result messages use `role: "tool"` with `tool_call_id` and `name`
|
|
42
|
+
* - Content can be `null` when `tool_calls` is present
|
|
33
43
|
*
|
|
34
|
-
* **Streaming:** Set `stream: true`
|
|
35
|
-
*
|
|
36
|
-
* chat interfaces.
|
|
44
|
+
* **Streaming:** Set `stream: true` to receive Server-Sent Events (SSE) for
|
|
45
|
+
* real-time responses.
|
|
37
46
|
*
|
|
38
47
|
* @example
|
|
39
48
|
* ```ts
|
|
40
49
|
* const response = await client.agents.chat('name', {
|
|
41
|
-
* messages: [
|
|
42
|
-
* { role: 'user', content: 'What is the weather today?' },
|
|
43
|
-
* ],
|
|
50
|
+
* messages: [{ content: 'string', role: 'system' }],
|
|
44
51
|
* });
|
|
45
52
|
* ```
|
|
46
53
|
*/
|
|
@@ -48,10 +55,14 @@ export declare class Agents extends APIResource {
|
|
|
48
55
|
chat(name: string, body: AgentChatParamsStreaming, options?: RequestOptions): APIPromise<Stream<StreamChunk>>;
|
|
49
56
|
chat(name: string, body: AgentChatParamsBase, options?: RequestOptions): APIPromise<Stream<StreamChunk> | AgentChatResponse>;
|
|
50
57
|
/**
|
|
51
|
-
* Execute
|
|
52
|
-
*
|
|
58
|
+
* Execute an agent with the provided input.
|
|
59
|
+
*
|
|
60
|
+
* **Agent Types:**
|
|
53
61
|
*
|
|
54
|
-
*
|
|
62
|
+
* - Task-oriented agents: Pass structured input data
|
|
63
|
+
* - Chat agents: Pass `{ messages: [...] }` in the input
|
|
64
|
+
*
|
|
65
|
+
* **Timeout:** Agent executions have a 60-second timeout. If the agent takes
|
|
55
66
|
* longer to respond, you will receive a 504 Gateway Timeout error. For
|
|
56
67
|
* long-running tasks, consider using streaming mode which does not have the same
|
|
57
68
|
* timeout constraints.
|
|
@@ -60,38 +71,153 @@ export declare class Agents extends APIResource {
|
|
|
60
71
|
* with a unique value (e.g., UUID) to ensure duplicate requests return the same
|
|
61
72
|
* response. Keys are valid for 24 hours. Streaming responses are not cached.
|
|
62
73
|
*
|
|
63
|
-
* **Use cases:**
|
|
64
|
-
*
|
|
65
|
-
* - Data analysis and processing
|
|
66
|
-
* - Content generation (with streaming for long outputs)
|
|
67
|
-
* - One-time operations that don't require conversation history
|
|
68
|
-
* - API-like operations
|
|
69
|
-
*
|
|
70
74
|
* **Streaming:** Set `stream: true` in the request body to receive Server-Sent
|
|
71
75
|
* Events (SSE) stream with incremental chunks. Useful for long-running tasks or
|
|
72
|
-
* real-time
|
|
76
|
+
* real-time chat interfaces.
|
|
73
77
|
*
|
|
74
78
|
* @example
|
|
75
79
|
* ```ts
|
|
76
|
-
* const response = await client.agents.
|
|
77
|
-
* input: {
|
|
78
|
-
* task: 'analyze this data',
|
|
79
|
-
* data: { value: 123, items: ['a', 'b', 'c'] },
|
|
80
|
-
* },
|
|
81
|
-
* });
|
|
80
|
+
* const response = await client.agents.execute('name');
|
|
82
81
|
* ```
|
|
83
82
|
*/
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
execute(name: string, body?: AgentExecuteParamsNonStreaming, options?: RequestOptions): APIPromise<AgentExecuteResponse>;
|
|
84
|
+
execute(name: string, body: AgentExecuteParamsStreaming, options?: RequestOptions): APIPromise<Stream<StreamChunk>>;
|
|
85
|
+
execute(name: string, body?: AgentExecuteParamsBase | undefined, options?: RequestOptions): APIPromise<Stream<StreamChunk> | AgentExecuteResponse>;
|
|
86
|
+
}
|
|
87
|
+
export type AgentsCursor = Cursor<Agent>;
|
|
88
|
+
export interface Agent {
|
|
89
|
+
/**
|
|
90
|
+
* Unique agent ID
|
|
91
|
+
*/
|
|
92
|
+
id: string;
|
|
93
|
+
/**
|
|
94
|
+
* Whether agent supports chat interface
|
|
95
|
+
*/
|
|
96
|
+
canChat: boolean | null;
|
|
97
|
+
/**
|
|
98
|
+
* Whether agent supports streaming
|
|
99
|
+
*/
|
|
100
|
+
canStream: boolean | null;
|
|
101
|
+
/**
|
|
102
|
+
* Agent configuration (for managed agents)
|
|
103
|
+
*/
|
|
104
|
+
config: AgentConfig | null;
|
|
105
|
+
/**
|
|
106
|
+
* Creation timestamp
|
|
107
|
+
*/
|
|
108
|
+
createdAt: string;
|
|
109
|
+
/**
|
|
110
|
+
* User who created the agent
|
|
111
|
+
*/
|
|
112
|
+
createdBy: string | null;
|
|
113
|
+
/**
|
|
114
|
+
* Agent description
|
|
115
|
+
*/
|
|
116
|
+
description: string | null;
|
|
117
|
+
/**
|
|
118
|
+
* When the agent was discovered (for custom agents)
|
|
119
|
+
*/
|
|
120
|
+
discoveredAt: string | null;
|
|
121
|
+
/**
|
|
122
|
+
* Agent name
|
|
123
|
+
*/
|
|
124
|
+
name: string;
|
|
125
|
+
/**
|
|
126
|
+
* JSON Schema for agent input parameters
|
|
127
|
+
*/
|
|
128
|
+
output: Agent.Output | null;
|
|
129
|
+
/**
|
|
130
|
+
* JSON Schema for agent input parameters
|
|
131
|
+
*/
|
|
132
|
+
parameters: Agent.Parameters | null;
|
|
133
|
+
/**
|
|
134
|
+
* Project ID
|
|
135
|
+
*/
|
|
136
|
+
projectId: string;
|
|
137
|
+
/**
|
|
138
|
+
* Top-level keys expected in request body
|
|
139
|
+
*/
|
|
140
|
+
requestKeys: Array<string> | null;
|
|
141
|
+
/**
|
|
142
|
+
* Top-level keys returned in response body
|
|
143
|
+
*/
|
|
144
|
+
responseKeys: Array<string> | null;
|
|
145
|
+
/**
|
|
146
|
+
* Agent status
|
|
147
|
+
*/
|
|
148
|
+
status: 'active' | 'inactive';
|
|
149
|
+
/**
|
|
150
|
+
* Agent type: "managed" for UI-created, "{language}" for custom agents (e.g.,
|
|
151
|
+
* "python"), or "{language}-{adapter}" for adapter-based (e.g.,
|
|
152
|
+
* "python-langchain")
|
|
153
|
+
*/
|
|
154
|
+
type: string;
|
|
155
|
+
/**
|
|
156
|
+
* Last update timestamp
|
|
157
|
+
*/
|
|
158
|
+
updatedAt: string;
|
|
159
|
+
}
|
|
160
|
+
export declare namespace Agent {
|
|
161
|
+
/**
|
|
162
|
+
* JSON Schema for agent input parameters
|
|
163
|
+
*/
|
|
164
|
+
interface Output {
|
|
165
|
+
type: string;
|
|
166
|
+
properties?: {
|
|
167
|
+
[key: string]: unknown;
|
|
168
|
+
};
|
|
169
|
+
required?: Array<string>;
|
|
170
|
+
[k: string]: unknown;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* JSON Schema for agent input parameters
|
|
174
|
+
*/
|
|
175
|
+
interface Parameters {
|
|
176
|
+
type: string;
|
|
177
|
+
properties?: {
|
|
178
|
+
[key: string]: unknown;
|
|
179
|
+
};
|
|
180
|
+
required?: Array<string>;
|
|
181
|
+
[k: string]: unknown;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Agent configuration (for managed agents)
|
|
186
|
+
*/
|
|
187
|
+
export interface AgentConfig {
|
|
188
|
+
/**
|
|
189
|
+
* Model identifier (e.g., "gpt-4o", "claude-sonnet-4-20250514")
|
|
190
|
+
*/
|
|
191
|
+
model: string;
|
|
192
|
+
/**
|
|
193
|
+
* LLM provider
|
|
194
|
+
*/
|
|
195
|
+
provider: 'openai' | 'anthropic';
|
|
196
|
+
/**
|
|
197
|
+
* System prompt for the agent
|
|
198
|
+
*/
|
|
199
|
+
systemPrompt: string;
|
|
200
|
+
/**
|
|
201
|
+
* List of tools available to the agent
|
|
202
|
+
*/
|
|
203
|
+
tools: Array<string>;
|
|
204
|
+
/**
|
|
205
|
+
* Maximum tool call iterations
|
|
206
|
+
*/
|
|
207
|
+
maxIterations?: number;
|
|
208
|
+
/**
|
|
209
|
+
* Whether to require approval for tool calls
|
|
210
|
+
*/
|
|
211
|
+
requireApproval?: boolean;
|
|
87
212
|
}
|
|
88
213
|
export interface ChatMessage {
|
|
89
214
|
/**
|
|
90
|
-
* Message content. Can be string, array (multimodal),
|
|
215
|
+
* Message content. Can be string, array (multimodal), object (tool), or null (when
|
|
216
|
+
* tool_calls present).
|
|
91
217
|
*/
|
|
92
218
|
content: string | Array<ChatMessage.MultimodalContent> | {
|
|
93
219
|
[key: string]: unknown;
|
|
94
|
-
};
|
|
220
|
+
} | null;
|
|
95
221
|
/**
|
|
96
222
|
* Message role
|
|
97
223
|
*/
|
|
@@ -101,9 +227,13 @@ export interface ChatMessage {
|
|
|
101
227
|
*/
|
|
102
228
|
name?: string;
|
|
103
229
|
/**
|
|
104
|
-
* Tool call ID (for tool role)
|
|
230
|
+
* Tool call ID (for tool role messages)
|
|
105
231
|
*/
|
|
106
232
|
tool_call_id?: string;
|
|
233
|
+
/**
|
|
234
|
+
* Tool calls requested by assistant (for assistant role messages)
|
|
235
|
+
*/
|
|
236
|
+
tool_calls?: Array<ChatMessage.ToolCall>;
|
|
107
237
|
}
|
|
108
238
|
export declare namespace ChatMessage {
|
|
109
239
|
interface MultimodalContent {
|
|
@@ -116,113 +246,142 @@ export declare namespace ChatMessage {
|
|
|
116
246
|
url: string;
|
|
117
247
|
}
|
|
118
248
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
*/
|
|
131
|
-
custom?: {
|
|
132
|
-
[key: string]: unknown;
|
|
133
|
-
};
|
|
134
|
-
/**
|
|
135
|
-
* ID of the user making the request
|
|
136
|
-
*/
|
|
137
|
-
user_id?: string;
|
|
249
|
+
interface ToolCall {
|
|
250
|
+
id: string;
|
|
251
|
+
function: ToolCall.Function;
|
|
252
|
+
type: 'function';
|
|
253
|
+
}
|
|
254
|
+
namespace ToolCall {
|
|
255
|
+
interface Function {
|
|
256
|
+
arguments: string;
|
|
257
|
+
name: string;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
138
260
|
}
|
|
139
261
|
export interface StreamChunk {
|
|
140
262
|
/**
|
|
141
263
|
* Text chunk from the stream
|
|
142
264
|
*/
|
|
143
265
|
chunk: string;
|
|
266
|
+
[k: string]: unknown;
|
|
144
267
|
}
|
|
145
268
|
export interface AgentChatResponse {
|
|
146
269
|
/**
|
|
147
|
-
*
|
|
270
|
+
* Array of assistant response messages
|
|
148
271
|
*/
|
|
149
272
|
messages: Array<ChatMessage>;
|
|
150
273
|
/**
|
|
151
|
-
*
|
|
274
|
+
* Conversation ID (present when conversation persistence is enabled)
|
|
152
275
|
*/
|
|
153
|
-
|
|
276
|
+
conversation_id?: string;
|
|
154
277
|
}
|
|
155
|
-
|
|
278
|
+
/**
|
|
279
|
+
* Response with dynamic keys based on agent configuration. Regular agents return {
|
|
280
|
+
* output: ... }, chat agents return { messages: [...] }.
|
|
281
|
+
*/
|
|
282
|
+
export type AgentExecuteResponse = {
|
|
283
|
+
[key: string]: unknown;
|
|
284
|
+
};
|
|
285
|
+
export interface AgentListParams extends CursorParams {
|
|
156
286
|
/**
|
|
157
|
-
*
|
|
287
|
+
* Filter by agent status
|
|
158
288
|
*/
|
|
159
|
-
|
|
289
|
+
status?: 'active' | 'inactive';
|
|
290
|
+
/**
|
|
291
|
+
* Filter by agent type (managed, python, typescript, python-langchain, etc.)
|
|
292
|
+
*/
|
|
293
|
+
type?: string;
|
|
160
294
|
}
|
|
161
295
|
export type AgentChatParams = AgentChatParamsNonStreaming | AgentChatParamsStreaming;
|
|
162
296
|
export interface AgentChatParamsBase {
|
|
163
297
|
/**
|
|
164
|
-
*
|
|
298
|
+
* Array of chat messages
|
|
165
299
|
*/
|
|
166
300
|
messages: Array<ChatMessage>;
|
|
167
301
|
/**
|
|
168
|
-
* Optional
|
|
302
|
+
* Optional context for the agent execution
|
|
303
|
+
*/
|
|
304
|
+
context?: AgentChatParams.Context;
|
|
305
|
+
/**
|
|
306
|
+
* Conversation ID to continue an existing conversation
|
|
169
307
|
*/
|
|
170
|
-
|
|
308
|
+
conversation_id?: string;
|
|
171
309
|
/**
|
|
172
|
-
*
|
|
310
|
+
* Enable streaming response
|
|
173
311
|
*/
|
|
174
312
|
stream?: boolean;
|
|
175
313
|
}
|
|
176
314
|
export declare namespace AgentChatParams {
|
|
315
|
+
/**
|
|
316
|
+
* Optional context for the agent execution
|
|
317
|
+
*/
|
|
318
|
+
interface Context {
|
|
319
|
+
/**
|
|
320
|
+
* Identity fields for conversation scoping (e.g., user_id, tenant_id)
|
|
321
|
+
*/
|
|
322
|
+
identity?: {
|
|
323
|
+
[key: string]: unknown;
|
|
324
|
+
};
|
|
325
|
+
[k: string]: unknown;
|
|
326
|
+
}
|
|
177
327
|
type AgentChatParamsNonStreaming = AgentsAPI.AgentChatParamsNonStreaming;
|
|
178
328
|
type AgentChatParamsStreaming = AgentsAPI.AgentChatParamsStreaming;
|
|
179
329
|
}
|
|
180
330
|
export interface AgentChatParamsNonStreaming extends AgentChatParamsBase {
|
|
181
331
|
/**
|
|
182
|
-
*
|
|
332
|
+
* Enable streaming response
|
|
183
333
|
*/
|
|
184
334
|
stream?: false;
|
|
185
335
|
}
|
|
186
336
|
export interface AgentChatParamsStreaming extends AgentChatParamsBase {
|
|
187
337
|
/**
|
|
188
|
-
*
|
|
338
|
+
* Enable streaming response
|
|
189
339
|
*/
|
|
190
340
|
stream: true;
|
|
191
341
|
}
|
|
192
|
-
export type
|
|
193
|
-
export interface
|
|
342
|
+
export type AgentExecuteParams = AgentExecuteParamsNonStreaming | AgentExecuteParamsStreaming;
|
|
343
|
+
export interface AgentExecuteParamsBase {
|
|
194
344
|
/**
|
|
195
|
-
*
|
|
345
|
+
* Optional context for the agent execution
|
|
196
346
|
*/
|
|
197
|
-
|
|
198
|
-
[key: string]: unknown;
|
|
199
|
-
};
|
|
200
|
-
/**
|
|
201
|
-
* Optional request context passed to the agent handler.
|
|
202
|
-
*/
|
|
203
|
-
context?: Context;
|
|
347
|
+
context?: AgentExecuteParams.Context;
|
|
204
348
|
/**
|
|
205
|
-
*
|
|
349
|
+
* Enable streaming response (SSE)
|
|
206
350
|
*/
|
|
207
351
|
stream?: boolean;
|
|
352
|
+
[k: string]: unknown;
|
|
208
353
|
}
|
|
209
|
-
export declare namespace
|
|
210
|
-
|
|
211
|
-
|
|
354
|
+
export declare namespace AgentExecuteParams {
|
|
355
|
+
/**
|
|
356
|
+
* Optional context for the agent execution
|
|
357
|
+
*/
|
|
358
|
+
interface Context {
|
|
359
|
+
/**
|
|
360
|
+
* Identity fields for conversation scoping (e.g., user_id, tenant_id)
|
|
361
|
+
*/
|
|
362
|
+
identity?: {
|
|
363
|
+
[key: string]: unknown;
|
|
364
|
+
};
|
|
365
|
+
[k: string]: unknown;
|
|
366
|
+
}
|
|
367
|
+
type AgentExecuteParamsNonStreaming = AgentsAPI.AgentExecuteParamsNonStreaming;
|
|
368
|
+
type AgentExecuteParamsStreaming = AgentsAPI.AgentExecuteParamsStreaming;
|
|
212
369
|
}
|
|
213
|
-
export interface
|
|
370
|
+
export interface AgentExecuteParamsNonStreaming extends AgentExecuteParamsBase {
|
|
214
371
|
/**
|
|
215
|
-
*
|
|
372
|
+
* Enable streaming response (SSE)
|
|
216
373
|
*/
|
|
217
374
|
stream?: false;
|
|
375
|
+
[k: string]: unknown;
|
|
218
376
|
}
|
|
219
|
-
export interface
|
|
377
|
+
export interface AgentExecuteParamsStreaming extends AgentExecuteParamsBase {
|
|
220
378
|
/**
|
|
221
|
-
*
|
|
379
|
+
* Enable streaming response (SSE)
|
|
222
380
|
*/
|
|
223
381
|
stream: true;
|
|
382
|
+
[k: string]: unknown;
|
|
224
383
|
}
|
|
225
384
|
export declare namespace Agents {
|
|
226
|
-
export { type
|
|
385
|
+
export { type Agent as Agent, type AgentConfig as AgentConfig, type ChatMessage as ChatMessage, type StreamChunk as StreamChunk, type AgentChatResponse as AgentChatResponse, type AgentExecuteResponse as AgentExecuteResponse, type AgentsCursor as AgentsCursor, type AgentListParams as AgentListParams, type AgentChatParams as AgentChatParams, type AgentChatParamsNonStreaming as AgentChatParamsNonStreaming, type AgentChatParamsStreaming as AgentChatParamsStreaming, type AgentExecuteParams as AgentExecuteParams, type AgentExecuteParamsNonStreaming as AgentExecuteParamsNonStreaming, type AgentExecuteParamsStreaming as AgentExecuteParamsStreaming, };
|
|
227
386
|
}
|
|
228
387
|
//# sourceMappingURL=agents.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.mts","sourceRoot":"","sources":["../src/resources/agents.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OACV,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"agents.d.mts","sourceRoot":"","sources":["../src/resources/agents.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAC1C,EAAE,MAAM,EAAE;OACV,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;IAInE;;;;;;;;;;OAUG;IACH,IAAI,CACF,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,YAAY,EAAE,KAAK,CAAC;IAInC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,IAAI,CACF,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,2BAA2B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iBAAiB,CAAC;IAChC,IAAI,CACF,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAClC,IAAI,CACF,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,mBAAmB,EACzB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,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