@mastra/client-js 0.0.0-error-handler-fix-20251020202607 → 0.0.0-esbuild-bundle-worker-20260807182016

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 (127) hide show
  1. package/CHANGELOG.md +9405 -3
  2. package/LICENSE.md +15 -0
  3. package/README.md +11 -13
  4. package/dist/_types/@ai-sdk_provider/dist/index.d.ts +1587 -0
  5. package/dist/_types/@ai-sdk_provider-utils/dist/index.d.ts +379 -0
  6. package/dist/_types/@ai-sdk_ui-utils/dist/index.d.ts +820 -0
  7. package/dist/agent-learning.d.ts +182 -0
  8. package/dist/agent-learning.d.ts.map +1 -0
  9. package/dist/client.d.ts +767 -80
  10. package/dist/client.d.ts.map +1 -1
  11. package/dist/docs/SKILL.md +52 -0
  12. package/dist/docs/assets/SOURCE_MAP.json +6 -0
  13. package/dist/docs/references/docs-agents-a2a.md +340 -0
  14. package/dist/docs/references/docs-editor-overview.md +349 -0
  15. package/dist/docs/references/docs-long-running-agents-schedules.md +201 -0
  16. package/dist/docs/references/docs-long-running-agents-signals.md +426 -0
  17. package/dist/docs/references/docs-server-auth-auth0.md +262 -0
  18. package/dist/docs/references/docs-server-auth-clerk.md +154 -0
  19. package/dist/docs/references/docs-server-auth-firebase.md +294 -0
  20. package/dist/docs/references/docs-server-auth-jwt.md +116 -0
  21. package/dist/docs/references/docs-server-auth-supabase.md +139 -0
  22. package/dist/docs/references/docs-server-auth-workos.md +271 -0
  23. package/dist/docs/references/docs-server-mastra-client.md +323 -0
  24. package/dist/docs/references/reference-ai-sdk-to-ai-sdk-messages.md +97 -0
  25. package/dist/docs/references/reference-ai-sdk-to-ai-sdk-stream.md +282 -0
  26. package/dist/docs/references/reference-ai-sdk-to-ai-sdk-v4-messages.md +81 -0
  27. package/dist/docs/references/reference-ai-sdk-to-ai-sdk-v5-messages.md +78 -0
  28. package/dist/docs/references/reference-client-js-agents.md +959 -0
  29. package/dist/docs/references/reference-client-js-conversations.md +137 -0
  30. package/dist/docs/references/reference-client-js-error-handling.md +18 -0
  31. package/dist/docs/references/reference-client-js-logs.md +26 -0
  32. package/dist/docs/references/reference-client-js-mastra-client.md +96 -0
  33. package/dist/docs/references/reference-client-js-memory.md +237 -0
  34. package/dist/docs/references/reference-client-js-observability.md +183 -0
  35. package/dist/docs/references/reference-client-js-responses.md +219 -0
  36. package/dist/docs/references/reference-client-js-telemetry.md +22 -0
  37. package/dist/docs/references/reference-client-js-tools.md +46 -0
  38. package/dist/docs/references/reference-client-js-vectors.md +81 -0
  39. package/dist/docs/references/reference-client-js-workflows.md +393 -0
  40. package/dist/docs/references/reference-editor-versioning.md +130 -0
  41. package/dist/index.cjs +7638 -3257
  42. package/dist/index.cjs.map +1 -1
  43. package/dist/index.d.ts +9 -0
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js +7606 -3252
  46. package/dist/index.js.map +1 -1
  47. package/dist/observability/collector.d.ts +45 -0
  48. package/dist/observability/collector.d.ts.map +1 -0
  49. package/dist/observability/index.d.ts +14 -0
  50. package/dist/observability/index.d.ts.map +1 -0
  51. package/dist/observability/types.d.ts +27 -0
  52. package/dist/observability/types.d.ts.map +1 -0
  53. package/dist/resources/a2a.d.ts +80 -11
  54. package/dist/resources/a2a.d.ts.map +1 -1
  55. package/dist/resources/agent-builder.d.ts +57 -72
  56. package/dist/resources/agent-builder.d.ts.map +1 -1
  57. package/dist/resources/agent-controller.d.ts +589 -0
  58. package/dist/resources/agent-controller.d.ts.map +1 -0
  59. package/dist/resources/agent.d.ts +368 -59
  60. package/dist/resources/agent.d.ts.map +1 -1
  61. package/dist/resources/base.d.ts +2 -1
  62. package/dist/resources/base.d.ts.map +1 -1
  63. package/dist/resources/channels.d.ts +63 -0
  64. package/dist/resources/channels.d.ts.map +1 -0
  65. package/dist/resources/conversations.d.ts +15 -0
  66. package/dist/resources/conversations.d.ts.map +1 -0
  67. package/dist/resources/index.d.ts +14 -0
  68. package/dist/resources/index.d.ts.map +1 -1
  69. package/dist/resources/mcp-tool.d.ts +5 -5
  70. package/dist/resources/mcp-tool.d.ts.map +1 -1
  71. package/dist/resources/memory-thread.d.ts +51 -16
  72. package/dist/resources/memory-thread.d.ts.map +1 -1
  73. package/dist/resources/observability.d.ts +222 -19
  74. package/dist/resources/observability.d.ts.map +1 -1
  75. package/dist/resources/processor-provider.d.ts +15 -0
  76. package/dist/resources/processor-provider.d.ts.map +1 -0
  77. package/dist/resources/processor.d.ts +20 -0
  78. package/dist/resources/processor.d.ts.map +1 -0
  79. package/dist/resources/responses.d.ts +22 -0
  80. package/dist/resources/responses.d.ts.map +1 -0
  81. package/dist/resources/run.d.ts +256 -0
  82. package/dist/resources/run.d.ts.map +1 -0
  83. package/dist/resources/stored-agent.d.ts +112 -0
  84. package/dist/resources/stored-agent.d.ts.map +1 -0
  85. package/dist/resources/stored-mcp-client.d.ts +30 -0
  86. package/dist/resources/stored-mcp-client.d.ts.map +1 -0
  87. package/dist/resources/stored-prompt-block.d.ts +83 -0
  88. package/dist/resources/stored-prompt-block.d.ts.map +1 -0
  89. package/dist/resources/stored-scorer.d.ts +83 -0
  90. package/dist/resources/stored-scorer.d.ts.map +1 -0
  91. package/dist/resources/stored-skill.d.ts +40 -0
  92. package/dist/resources/stored-skill.d.ts.map +1 -0
  93. package/dist/resources/stored-workflow.d.ts +18 -0
  94. package/dist/resources/stored-workflow.d.ts.map +1 -0
  95. package/dist/resources/tool-provider.d.ts +80 -0
  96. package/dist/resources/tool-provider.d.ts.map +1 -0
  97. package/dist/resources/tool.d.ts +4 -4
  98. package/dist/resources/vector.d.ts +9 -9
  99. package/dist/resources/vector.d.ts.map +1 -1
  100. package/dist/resources/workflow.d.ts +32 -231
  101. package/dist/resources/workflow.d.ts.map +1 -1
  102. package/dist/resources/workspace.d.ts +129 -0
  103. package/dist/resources/workspace.d.ts.map +1 -0
  104. package/dist/route-types.generated.d.ts +18087 -0
  105. package/dist/route-types.generated.d.ts.map +1 -0
  106. package/dist/tools.d.ts +3 -6
  107. package/dist/tools.d.ts.map +1 -1
  108. package/dist/types.d.ts +2740 -197
  109. package/dist/types.d.ts.map +1 -1
  110. package/dist/utils/client-tool-model-output.d.ts +16 -0
  111. package/dist/utils/client-tool-model-output.d.ts.map +1 -0
  112. package/dist/utils/index.d.ts +65 -4
  113. package/dist/utils/index.d.ts.map +1 -1
  114. package/dist/utils/process-a2a-stream.d.ts +4 -0
  115. package/dist/utils/process-a2a-stream.d.ts.map +1 -0
  116. package/dist/utils/process-client-tools.d.ts.map +1 -1
  117. package/dist/utils/process-mastra-stream.d.ts +8 -7
  118. package/dist/utils/process-mastra-stream.d.ts.map +1 -1
  119. package/dist/utils/stream-transforms.d.ts +9 -0
  120. package/dist/utils/stream-transforms.d.ts.map +1 -0
  121. package/dist/utils/verify-agent-card-signature.d.ts +21 -0
  122. package/dist/utils/verify-agent-card-signature.d.ts.map +1 -0
  123. package/dist/utils/zod-to-json-schema.d.ts +11 -2
  124. package/dist/utils/zod-to-json-schema.d.ts.map +1 -1
  125. package/package.json +26 -19
  126. package/dist/resources/network-memory-thread.d.ts +0 -47
  127. package/dist/resources/network-memory-thread.d.ts.map +0 -1
@@ -1,16 +1,36 @@
1
- import { processDataStream } from '@ai-sdk/ui-utils';
1
+ import { processDataStream } from '../_types/@ai-sdk_ui-utils/dist/index.d.ts';
2
+ import type { JSONValue } from '../_types/@ai-sdk_ui-utils/dist/index.d.ts';
2
3
  import type { MessageListInput } from '@mastra/core/agent/message-list';
3
4
  import type { GenerateReturn } from '@mastra/core/llm';
4
- import type { RuntimeContext } from '@mastra/core/runtime-context';
5
- import type { OutputSchema, MastraModelOutput } from '@mastra/core/stream';
5
+ import type { RequestContext } from '@mastra/core/request-context';
6
+ import type { FullOutput } from '@mastra/core/stream';
6
7
  import type { JSONSchema7 } from 'json-schema';
7
- import type { ZodType } from 'zod';
8
- import type { GenerateLegacyParams, GetAgentResponse, GetEvalsByAgentIdResponse, GetToolResponse, ClientOptions, StreamParams, StreamLegacyParams, UpdateModelParams, UpdateModelInModelListParams, ReorderModelListParams, NetworkStreamParams } from '../types.js';
8
+ import type { ZodSchema, GenerateLegacyParams, GetAgentBrowserSessionResponse, GetAgentResponse, GetToolResponse, ClientOptions, AgentVersionIdentifier, StreamLegacyParams, UpdateModelParams, UpdateModelInModelListParams, ReorderModelListParams, NetworkStreamParams, StreamParamsBaseWithoutMessages, CloneAgentParams, StoredAgentResponse, StructuredOutputOptions, AgentVersionResponse, ListAgentVersionsParams, ListAgentVersionsResponse, SendAgentMessageParams, SendAgentSignalParams, QueueAgentMessageParams, SubscribeAgentThreadParams, ListAgentSuspendedRunsParams, ListAgentSuspendedRunsResponse, ProcessAgentThreadStreamOptions, CreateCodeAgentVersionParams, ActivateAgentVersionResponse, CompareVersionsResponse, DeleteAgentVersionResponse, RestoreAgentVersionResponse } from '../types.js';
9
9
  import { processMastraNetworkStream, processMastraStream } from '../utils/process-mastra-stream.js';
10
10
  import { BaseResource } from './base.js';
11
+ type ResumeStreamParams<OUTPUT extends {}> = StreamParamsBaseWithoutMessages<OUTPUT> & {
12
+ messages?: MessageListInput;
13
+ runId: string;
14
+ toolCallId?: string;
15
+ structuredOutput?: StructuredOutputOptions<OUTPUT>;
16
+ };
17
+ type RecoverParams = {
18
+ runId: string;
19
+ requestContext?: Record<string, unknown>;
20
+ versions?: {
21
+ agents?: Record<string, {
22
+ versionId: string;
23
+ } | {
24
+ status: 'draft' | 'published';
25
+ }>;
26
+ defaultStatus?: 'draft' | 'published';
27
+ };
28
+ };
11
29
  export declare class AgentVoice extends BaseResource {
12
30
  private agentId;
13
- constructor(options: ClientOptions, agentId: string);
31
+ private version?;
32
+ constructor(options: ClientOptions, agentId: string, version?: AgentVersionIdentifier | undefined);
33
+ private getQueryString;
14
34
  /**
15
35
  * Convert text to speech using the agent's voice provider
16
36
  * @param text - Text to convert to speech
@@ -32,34 +52,163 @@ export declare class AgentVoice extends BaseResource {
32
52
  }>;
33
53
  /**
34
54
  * Get available speakers for the agent's voice provider
35
- * @param runtimeContext - Optional runtime context to pass as query parameter
36
- * @param runtimeContext - Optional runtime context to pass as query parameter
55
+ * @param requestContext - Optional request context to pass as query parameter
56
+ * @param requestContext - Optional request context to pass as query parameter
37
57
  * @returns Promise containing list of available speakers
38
58
  */
39
- getSpeakers(runtimeContext?: RuntimeContext | Record<string, any>): Promise<Array<{
59
+ getSpeakers(requestContext?: RequestContext | Record<string, any>): Promise<Array<{
40
60
  voiceId: string;
41
61
  [key: string]: any;
42
62
  }>>;
43
63
  /**
44
64
  * Get the listener configuration for the agent's voice provider
45
- * @param runtimeContext - Optional runtime context to pass as query parameter
46
- * @param runtimeContext - Optional runtime context to pass as query parameter
65
+ * @param requestContext - Optional request context to pass as query parameter
66
+ * @param requestContext - Optional request context to pass as query parameter
47
67
  * @returns Promise containing a check if the agent has listening capabilities
48
68
  */
49
- getListener(runtimeContext?: RuntimeContext | Record<string, any>): Promise<{
69
+ getListener(requestContext?: RequestContext | Record<string, any>): Promise<{
50
70
  enabled: boolean;
51
71
  }>;
52
72
  }
53
73
  export declare class Agent extends BaseResource {
54
74
  private agentId;
75
+ private version?;
55
76
  readonly voice: AgentVoice;
56
- constructor(options: ClientOptions, agentId: string);
77
+ constructor(options: ClientOptions, agentId: string, version?: AgentVersionIdentifier | undefined);
78
+ private getQueryString;
79
+ private getSignalRuntimeRunKey;
80
+ private getSignalRuntimeThreadKey;
81
+ private setSignalRuntimeOptions;
82
+ private getSignalRuntimeOptions;
83
+ private deleteSignalRuntimeOptions;
84
+ private deleteLatestSignalRuntimeOptions;
85
+ private prepareSignalRouteBody;
86
+ private requestSignalRoute;
57
87
  /**
58
88
  * Retrieves details about the agent
59
- * @param runtimeContext - Optional runtime context to pass as query parameter
89
+ * @param requestContext - Optional request context to pass as query parameter
60
90
  * @returns Promise containing agent details including model and instructions
61
91
  */
62
- details(runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetAgentResponse>;
92
+ details(requestContext?: RequestContext | Record<string, any>): Promise<GetAgentResponse>;
93
+ /**
94
+ * Probe the agent's browser session state before opening a screencast WebSocket.
95
+ *
96
+ * Returns `{ hasSession, screencastAvailable }`. Use this to avoid opening a WS
97
+ * that would either fail (screencast packages not installed) or sit idle (no
98
+ * active browser session yet). See {@link GetAgentBrowserSessionResponse}.
99
+ *
100
+ * @param threadId - Optional thread ID for thread-scoped browser sessions
101
+ */
102
+ browserSession(threadId?: string): Promise<GetAgentBrowserSessionResponse>;
103
+ /**
104
+ * Close the agent's browser session.
105
+ *
106
+ * For thread-scoped browsers, pass `threadId` to close only that thread's
107
+ * session. Omit it to close the shared session (or all sessions for the agent
108
+ * depending on the toolset's scope).
109
+ *
110
+ * @param threadId - Optional thread ID for thread-scoped browser sessions
111
+ */
112
+ closeBrowser(threadId?: string): Promise<{
113
+ success: boolean;
114
+ }>;
115
+ enhanceInstructions(instructions: string, comment: string): Promise<{
116
+ explanation: string;
117
+ new_prompt: string;
118
+ }>;
119
+ /**
120
+ * @experimental Agent message APIs are experimental and may change in a future release.
121
+ */
122
+ sendMessage(params: SendAgentMessageParams): Promise<{
123
+ accepted: true;
124
+ runId: string;
125
+ signal?: unknown;
126
+ }>;
127
+ /**
128
+ * @experimental Agent message APIs are experimental and may change in a future release.
129
+ */
130
+ queueMessage(params: QueueAgentMessageParams): Promise<{
131
+ accepted: true;
132
+ runId: string;
133
+ signal?: unknown;
134
+ }>;
135
+ /**
136
+ * @experimental Agent signals are experimental and may change in a future release.
137
+ */
138
+ sendSignal(params: SendAgentSignalParams): Promise<{
139
+ accepted: true;
140
+ runId: string;
141
+ }>;
142
+ /**
143
+ * @experimental Agent signals are experimental and may change in a future release.
144
+ */
145
+ subscribeToThread(params: SubscribeAgentThreadParams): Promise<Response & {
146
+ processDataStream: (options: ProcessAgentThreadStreamOptions) => Promise<void>;
147
+ abort: () => Promise<boolean>;
148
+ unsubscribe: () => void;
149
+ }>;
150
+ /**
151
+ * @experimental Agent signals are experimental and may change in a future release.
152
+ */
153
+ abortThread(params: SubscribeAgentThreadParams): Promise<{
154
+ aborted: boolean;
155
+ }>;
156
+ /**
157
+ * Clones this agent to a new stored agent in the database
158
+ * @param params - Clone parameters including optional newId, newName, metadata, authorId, and requestContext
159
+ * @returns Promise containing the created stored agent
160
+ */
161
+ clone(params?: CloneAgentParams): Promise<StoredAgentResponse>;
162
+ /**
163
+ * Lists all override versions for this code agent
164
+ * @param params - Optional pagination and sorting parameters
165
+ * @param requestContext - Optional request context to pass as query parameter
166
+ * @returns Promise containing paginated list of versions
167
+ */
168
+ listVersions(params?: ListAgentVersionsParams, requestContext?: RequestContext | Record<string, any>): Promise<ListAgentVersionsResponse>;
169
+ /**
170
+ * Creates a new override version snapshot for this code agent
171
+ * @param params - Optional override fields and change message for the version
172
+ * @param requestContext - Optional request context to pass as query parameter
173
+ * @returns Promise containing the created version
174
+ */
175
+ createVersion(params?: CreateCodeAgentVersionParams, requestContext?: RequestContext | Record<string, any>): Promise<AgentVersionResponse>;
176
+ /**
177
+ * Retrieves a specific override version by its ID
178
+ * @param versionId - The UUID of the version to retrieve
179
+ * @param requestContext - Optional request context to pass as query parameter
180
+ * @returns Promise containing the version details
181
+ */
182
+ getVersion(versionId: string, requestContext?: RequestContext | Record<string, any>): Promise<AgentVersionResponse>;
183
+ /**
184
+ * Activates a specific override version for this code agent
185
+ * @param versionId - The UUID of the version to activate
186
+ * @param requestContext - Optional request context to pass as query parameter
187
+ * @returns Promise containing the activated version details
188
+ */
189
+ activateVersion(versionId: string, requestContext?: RequestContext | Record<string, any>): Promise<ActivateAgentVersionResponse>;
190
+ /**
191
+ * Restores a version by creating a new override version with the same configuration
192
+ * @param versionId - The UUID of the version to restore
193
+ * @param requestContext - Optional request context to pass as query parameter
194
+ * @returns Promise containing the newly created version
195
+ */
196
+ restoreVersion(versionId: string, requestContext?: RequestContext | Record<string, any>): Promise<RestoreAgentVersionResponse>;
197
+ /**
198
+ * Deletes a specific override version
199
+ * @param versionId - The UUID of the version to delete
200
+ * @param requestContext - Optional request context to pass as query parameter
201
+ * @returns Promise that resolves with deletion response
202
+ */
203
+ deleteVersion(versionId: string, requestContext?: RequestContext | Record<string, any>): Promise<DeleteAgentVersionResponse>;
204
+ /**
205
+ * Compares two override versions and returns their differences
206
+ * @param fromId - The UUID of the source version
207
+ * @param toId - The UUID of the target version
208
+ * @param requestContext - Optional request context to pass as query parameter
209
+ * @returns Promise containing the comparison results
210
+ */
211
+ compareVersions(fromId: string, toId: string, requestContext?: RequestContext | Record<string, any>): Promise<CompareVersionsResponse>;
63
212
  /**
64
213
  * Generates a response from the agent
65
214
  * @param params - Generation parameters including prompt
@@ -69,42 +218,224 @@ export declare class Agent extends BaseResource {
69
218
  output?: never;
70
219
  experimental_output?: never;
71
220
  }): Promise<GenerateReturn<any, undefined, undefined>>;
72
- generateLegacy<Output extends JSONSchema7 | ZodType>(params: GenerateLegacyParams<Output> & {
221
+ generateLegacy<Output extends JSONSchema7 | ZodSchema>(params: GenerateLegacyParams<Output> & {
73
222
  output: Output;
74
223
  experimental_output?: never;
75
- }): Promise<GenerateReturn<any, Output, undefined>>;
76
- generateLegacy<StructuredOutput extends JSONSchema7 | ZodType>(params: GenerateLegacyParams<StructuredOutput> & {
224
+ }): Promise<GenerateReturn<any, any, any>>;
225
+ generateLegacy<StructuredOutput extends JSONSchema7 | ZodSchema>(params: GenerateLegacyParams<StructuredOutput> & {
77
226
  output?: never;
78
227
  experimental_output: StructuredOutput;
79
- }): Promise<GenerateReturn<any, undefined, StructuredOutput>>;
80
- generate<OUTPUT extends OutputSchema = undefined>(messages: MessageListInput, options?: Omit<StreamParams<OUTPUT>, 'messages'>): Promise<ReturnType<MastraModelOutput<OUTPUT>['getFullOutput']>>;
81
- generate<OUTPUT extends OutputSchema = undefined>(params: StreamParams<OUTPUT>): Promise<ReturnType<MastraModelOutput<OUTPUT>['getFullOutput']>>;
228
+ }): Promise<GenerateReturn<any, any, any>>;
229
+ generate<OUTPUT extends {}>(messages: MessageListInput, options: StreamParamsBaseWithoutMessages<OUTPUT> & {
230
+ structuredOutput: StructuredOutputOptions<OUTPUT>;
231
+ }): Promise<FullOutput<OUTPUT>>;
232
+ generate(messages: MessageListInput, options?: StreamParamsBaseWithoutMessages): Promise<FullOutput<undefined>>;
82
233
  private processChatResponse;
83
234
  /**
84
235
  * Streams a response from the agent
85
236
  * @param params - Stream parameters including prompt
86
237
  * @returns Promise containing the enhanced Response object with processDataStream method
87
238
  */
88
- streamLegacy<T extends JSONSchema7 | ZodType | undefined = undefined>(params: StreamLegacyParams<T>): Promise<Response & {
239
+ streamLegacy<T extends JSONSchema7 | ZodSchema | undefined = undefined>(params: StreamLegacyParams<T>): Promise<Response & {
89
240
  processDataStream: (options?: Omit<Parameters<typeof processDataStream>[0], 'stream'>) => Promise<void>;
90
241
  }>;
91
242
  private processChatResponse_vNext;
92
- processStreamResponse(processedParams: any, writable: any): Promise<Response>;
93
- network(params: NetworkStreamParams): Promise<Response & {
243
+ processStreamResponse(processedParams: any, controller: ReadableStreamDefaultController<Uint8Array>, route?: string): Promise<Response>;
244
+ network<OUTPUT>(messages: MessageListInput, params: Omit<NetworkStreamParams<OUTPUT>, 'messages'>): Promise<Response & {
245
+ processDataStream: ({ onChunk, }: {
246
+ onChunk: Parameters<typeof processMastraNetworkStream>[0]['onChunk'];
247
+ }) => Promise<void>;
248
+ }>;
249
+ approveNetworkToolCall(params: {
250
+ runId: string;
251
+ model?: string;
252
+ requestContext?: RequestContext | Record<string, any>;
253
+ }): Promise<Response & {
254
+ processDataStream: ({ onChunk, }: {
255
+ onChunk: Parameters<typeof processMastraNetworkStream>[0]['onChunk'];
256
+ }) => Promise<void>;
257
+ }>;
258
+ declineNetworkToolCall(params: {
259
+ runId: string;
260
+ model?: string;
261
+ requestContext?: RequestContext | Record<string, any>;
262
+ }): Promise<Response & {
94
263
  processDataStream: ({ onChunk, }: {
95
264
  onChunk: Parameters<typeof processMastraNetworkStream>[0]['onChunk'];
96
265
  }) => Promise<void>;
97
266
  }>;
98
- stream<OUTPUT extends OutputSchema = undefined>(messages: MessageListInput, options?: Omit<StreamParams<OUTPUT>, 'messages'>): Promise<Response & {
267
+ stream<OUTPUT extends {}>(messages: MessageListInput, streamOptions: StreamParamsBaseWithoutMessages<OUTPUT> & {
268
+ structuredOutput: StructuredOutputOptions<OUTPUT>;
269
+ }): Promise<Response & {
270
+ processDataStream: ({ onChunk, }: {
271
+ onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
272
+ }) => Promise<void>;
273
+ }>;
274
+ stream(messages: MessageListInput, streamOptions: StreamParamsBaseWithoutMessages<any> & {
275
+ structuredOutput?: StructuredOutputOptions<any>;
276
+ }): Promise<Response & {
277
+ processDataStream: ({ onChunk, }: {
278
+ onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
279
+ }) => Promise<void>;
280
+ }>;
281
+ stream(messages: MessageListInput, streamOptions?: StreamParamsBaseWithoutMessages): Promise<Response & {
282
+ processDataStream: ({ onChunk, }: {
283
+ onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
284
+ }) => Promise<void>;
285
+ }>;
286
+ /**
287
+ * @deprecated Use `stream(messages, { untilIdle: true })` instead.
288
+ */
289
+ streamUntilIdle<OUTPUT extends {}>(messages: MessageListInput, streamOptions: StreamParamsBaseWithoutMessages<OUTPUT> & {
290
+ structuredOutput: StructuredOutputOptions<OUTPUT>;
291
+ maxIdleMs?: number;
292
+ }): Promise<Response & {
293
+ processDataStream: ({ onChunk, }: {
294
+ onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
295
+ }) => Promise<void>;
296
+ }>;
297
+ streamUntilIdle(messages: MessageListInput, streamOptions: StreamParamsBaseWithoutMessages<any> & {
298
+ structuredOutput?: StructuredOutputOptions<any>;
299
+ maxIdleMs?: number;
300
+ }): Promise<Response & {
301
+ processDataStream: ({ onChunk, }: {
302
+ onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
303
+ }) => Promise<void>;
304
+ }>;
305
+ streamUntilIdle(messages: MessageListInput, streamOptions?: StreamParamsBaseWithoutMessages<any> & {
306
+ maxIdleMs?: number;
307
+ }): Promise<Response & {
308
+ processDataStream: ({ onChunk, }: {
309
+ onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
310
+ }) => Promise<void>;
311
+ }>;
312
+ /**
313
+ * Lists suspended runs for this agent from storage — runs waiting on a
314
+ * tool-call approval or on a tool that suspended. Backed by storage, so it
315
+ * works after a server restart and across server instances. Pass the
316
+ * returned runId to approveToolCall(), declineToolCall(), or resumeStream().
317
+ * @param params - Optional filters (threadId, resourceId, fromDate, toDate) and pagination (perPage, page)
318
+ * @param requestContext - Optional request context
319
+ * @returns Promise containing the matching runs and the total count before pagination
320
+ */
321
+ listSuspendedRuns(params?: ListAgentSuspendedRunsParams, requestContext?: RequestContext | Record<string, any>): Promise<ListAgentSuspendedRunsResponse>;
322
+ approveToolCall(params: {
323
+ runId: string;
324
+ toolCallId: string;
325
+ model?: string;
326
+ requestContext?: RequestContext | Record<string, any>;
327
+ }): Promise<Response & {
328
+ processDataStream: ({ onChunk, }: {
329
+ onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
330
+ }) => Promise<void>;
331
+ }>;
332
+ sendToolApproval(params: {
333
+ resourceId: string;
334
+ threadId: string;
335
+ toolCallId: string;
336
+ approved: boolean;
337
+ resumeData?: unknown;
338
+ requestContext?: RequestContext | Record<string, any>;
339
+ messages?: MessageListInput;
340
+ streamOptions?: StreamParamsBaseWithoutMessages<any>;
341
+ }): Promise<{
342
+ accepted: true;
343
+ runId: string;
344
+ toolCallId?: string;
345
+ }>;
346
+ declineToolCall(params: {
347
+ runId: string;
348
+ toolCallId: string;
349
+ model?: string;
350
+ requestContext?: RequestContext | Record<string, any>;
351
+ }): Promise<Response & {
352
+ processDataStream: ({ onChunk, }: {
353
+ onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
354
+ }) => Promise<void>;
355
+ }>;
356
+ /**
357
+ * Observe (reconnect to) an existing agent stream.
358
+ * Use this to resume receiving events after a disconnection.
359
+ *
360
+ * @param params.runId - The run ID to observe
361
+ * @param params.offset - Optional position to resume from (0-based). If omitted, replays all events.
362
+ * @returns Promise containing a streaming Response
363
+ *
364
+ * @example
365
+ * ```typescript
366
+ * // Reconnect to a stream from a specific position
367
+ * const response = await client.agents('my-agent').observe({
368
+ * runId: 'run-123',
369
+ * offset: 42, // Resume from event 42
370
+ * });
371
+ *
372
+ * await response.processDataStream({
373
+ * onChunk: (chunk) => console.log('Received:', chunk),
374
+ * });
375
+ * ```
376
+ */
377
+ observe(params: {
378
+ runId: string;
379
+ offset?: number;
380
+ }): Promise<Response & {
381
+ processDataStream: ({ onChunk, }: {
382
+ onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
383
+ }) => Promise<void>;
384
+ }>;
385
+ /**
386
+ * Resumes a suspended agent stream with custom resume data.
387
+ * Used to continue execution after a suspension point (e.g., workflow suspend within an agent).
388
+ */
389
+ resumeStream<OUTPUT extends {}>(resumeData: JSONValue, options: ResumeStreamParams<OUTPUT>): Promise<Response & {
390
+ processDataStream: ({ onChunk, }: {
391
+ onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
392
+ }) => Promise<void>;
393
+ }>;
394
+ /**
395
+ * Re-drives an orphaned RUNNING durable-agent run after a process restart.
396
+ *
397
+ * Only supported when the target agent is a durable agent (createDurableAgent).
398
+ * The server rebuilds the runtime state from the persisted snapshot, replays
399
+ * past chunks, and continues the loop to completion.
400
+ */
401
+ recover(params: RecoverParams): Promise<Response & {
99
402
  processDataStream: ({ onChunk, }: {
100
403
  onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
101
404
  }) => Promise<void>;
102
405
  }>;
103
- stream<OUTPUT extends OutputSchema = undefined>(params: StreamParams<OUTPUT>): Promise<Response & {
406
+ /**
407
+ * @deprecated Use `resumeStream(resumeData, { untilIdle: true, ... })` instead.
408
+ *
409
+ * Resumes a suspended agent stream until idle with custom resume data.
410
+ * Used to continue execution after a suspension point (e.g., workflow suspend within an agent).
411
+ */
412
+ resumeStreamUntilIdle<OUTPUT extends {}>(resumeData: JSONValue, options: ResumeStreamParams<OUTPUT> & {
413
+ maxIdleMs?: number;
414
+ }): Promise<Response & {
104
415
  processDataStream: ({ onChunk, }: {
105
416
  onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
106
417
  }) => Promise<void>;
107
418
  }>;
419
+ /**
420
+ * Approves a pending tool call and returns the complete response (non-streaming).
421
+ * Used when `requireToolApproval` is enabled with generate() to allow the agent to proceed.
422
+ */
423
+ approveToolCallGenerate(params: {
424
+ runId: string;
425
+ toolCallId: string;
426
+ model?: string;
427
+ requestContext?: RequestContext | Record<string, any>;
428
+ }): Promise<any>;
429
+ /**
430
+ * Declines a pending tool call and returns the complete response (non-streaming).
431
+ * Used when `requireToolApproval` is enabled with generate() to prevent tool execution.
432
+ */
433
+ declineToolCallGenerate(params: {
434
+ runId: string;
435
+ toolCallId: string;
436
+ model?: string;
437
+ requestContext?: RequestContext | Record<string, any>;
438
+ }): Promise<any>;
108
439
  /**
109
440
  * Processes the stream response and handles tool calls
110
441
  */
@@ -112,10 +443,10 @@ export declare class Agent extends BaseResource {
112
443
  /**
113
444
  * Gets details about a specific tool available to the agent
114
445
  * @param toolId - ID of the tool to retrieve
115
- * @param runtimeContext - Optional runtime context to pass as query parameter
446
+ * @param requestContext - Optional request context to pass as query parameter
116
447
  * @returns Promise containing tool details
117
448
  */
118
- getTool(toolId: string, runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetToolResponse>;
449
+ getTool(toolId: string, requestContext?: RequestContext | Record<string, any>): Promise<GetToolResponse>;
119
450
  /**
120
451
  * Executes a tool for the agent
121
452
  * @param toolId - ID of the tool to execute
@@ -124,20 +455,8 @@ export declare class Agent extends BaseResource {
124
455
  */
125
456
  executeTool(toolId: string, params: {
126
457
  data: any;
127
- runtimeContext?: RuntimeContext | Record<string, any>;
458
+ requestContext?: RequestContext | Record<string, any>;
128
459
  }): Promise<any>;
129
- /**
130
- * Retrieves evaluation results for the agent
131
- * @param runtimeContext - Optional runtime context to pass as query parameter
132
- * @returns Promise containing agent evaluations
133
- */
134
- evals(runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetEvalsByAgentIdResponse>;
135
- /**
136
- * Retrieves live evaluation results for the agent
137
- * @param runtimeContext - Optional runtime context to pass as query parameter
138
- * @returns Promise containing live agent evaluations
139
- */
140
- liveEvals(runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetEvalsByAgentIdResponse>;
141
460
  /**
142
461
  * Updates the model for the agent
143
462
  * @param params - Parameters for updating the model
@@ -146,6 +465,13 @@ export declare class Agent extends BaseResource {
146
465
  updateModel(params: UpdateModelParams): Promise<{
147
466
  message: string;
148
467
  }>;
468
+ /**
469
+ * Resets the agent's model to the original model that was set during construction
470
+ * @returns Promise containing a success message
471
+ */
472
+ resetModel(): Promise<{
473
+ message: string;
474
+ }>;
149
475
  /**
150
476
  * Updates the model for the agent in the model list
151
477
  * @param params - Parameters for updating the model
@@ -162,23 +488,6 @@ export declare class Agent extends BaseResource {
162
488
  reorderModelList(params: ReorderModelListParams): Promise<{
163
489
  message: string;
164
490
  }>;
165
- /**
166
- * @deprecated generateVNext has been renamed to generate. Please use generate instead.
167
- */
168
- generateVNext<OUTPUT extends OutputSchema = undefined>(messages: MessageListInput, options?: Omit<StreamParams<OUTPUT>, 'messages'>): Promise<ReturnType<MastraModelOutput['getFullOutput']>>;
169
- generateVNext<OUTPUT extends OutputSchema = undefined>(params: StreamParams<OUTPUT>): Promise<ReturnType<MastraModelOutput['getFullOutput']>>;
170
- /**
171
- * @deprecated streamVNext has been renamed to stream. Please use stream instead.
172
- */
173
- streamVNext<OUTPUT extends OutputSchema = undefined>(messages: MessageListInput, options?: Omit<StreamParams<OUTPUT>, 'messages'>): Promise<Response & {
174
- processDataStream: ({ onChunk, }: {
175
- onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
176
- }) => Promise<void>;
177
- }>;
178
- streamVNext<OUTPUT extends OutputSchema = undefined>(params: StreamParams<OUTPUT>): Promise<Response & {
179
- processDataStream: ({ onChunk, }: {
180
- onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
181
- }) => Promise<void>;
182
- }>;
183
491
  }
492
+ export {};
184
493
  //# sourceMappingURL=agent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/resources/agent.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAWvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,kBAAkB,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,KAAK,EACV,oBAAoB,EACpB,gBAAgB,EAChB,yBAAyB,EACzB,eAAe,EACf,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,4BAA4B,EAC5B,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAIlB,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAEjG,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AA8EtC,qBAAa,UAAW,SAAQ,YAAY;IAGxC,OAAO,CAAC,OAAO;gBADf,OAAO,EAAE,aAAa,EACd,OAAO,EAAE,MAAM;IAMzB;;;;;OAKG;IACG,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAA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AAM,EAAE,GAAG,CAAC,CAAC;KACvD,GAAG,OAAO,CAAC,GAAG,CAAC;IAQhB;;OAEG;YACW,2BAA2B;IA8JzC;;;;;OAKG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC;IAIxG;;;;;OAKG;IACH,WAAW,CACT,MAAM,EAAE,MAAM,EACd,MAAM,EAAE;QAAE,IAAI,EAAE,GAAG,CAAC;QAAC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,GAC3E,OAAO,CAAC,GAAG,CAAC;IAWf;;;;OAIG;IACH,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAOpE;;;OAGG;IACH,UAAU,IAAI,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAO1C;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,aAAa,EAAE,GAAG,MAAM,EAAE,EAAE,4BAA4B,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAOhH;;;;OAIG;IACH,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAM/E"}
@@ -1,10 +1,11 @@
1
1
  import type { RequestOptions, ClientOptions } from '../types.js';
2
2
  export declare class BaseResource {
3
3
  readonly options: ClientOptions;
4
+ protected readonly apiPrefix: string;
4
5
  constructor(options: ClientOptions);
5
6
  /**
6
7
  * Makes an HTTP request to the API with retries and exponential backoff
7
- * @param path - The API endpoint path
8
+ * @param path - The API endpoint path (without prefix, e.g., '/agents')
8
9
  * @param options - Optional request configuration
9
10
  * @returns Promise containing the response data
10
11
  */
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/resources/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9D,qBAAa,YAAY;IACvB,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;gBAEpB,OAAO,EAAE,aAAa;IAIlC;;;;;OAKG;IACU,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,CAAC,CAAC;CA6DhF"}
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/resources/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAI9D,qBAAa,YAAY;IACvB,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;gBAEzB,OAAO,EAAE,aAAa;IAKlC;;;;;OAKG;IACU,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,CAAC,CAAC;CAkFhF"}
@@ -0,0 +1,63 @@
1
+ import type { ClientOptions } from '../types.js';
2
+ import { BaseResource } from './base.js';
3
+ export interface ChannelPlatformInfo {
4
+ id: string;
5
+ name: string;
6
+ isConfigured: boolean;
7
+ connectOptionsSchema?: Record<string, unknown>;
8
+ }
9
+ export interface ChannelInstallationInfo {
10
+ id: string;
11
+ platform: string;
12
+ agentId: string;
13
+ status: 'active' | 'pending';
14
+ displayName?: string;
15
+ installedAt?: string;
16
+ }
17
+ export interface ChannelConnectOAuth {
18
+ type: 'oauth';
19
+ authorizationUrl: string;
20
+ installationId: string;
21
+ }
22
+ export interface ChannelConnectDeepLink {
23
+ type: 'deep_link';
24
+ url: string;
25
+ installationId: string;
26
+ }
27
+ export interface ChannelConnectImmediate {
28
+ type: 'immediate';
29
+ installationId: string;
30
+ }
31
+ export type ChannelConnectResult = ChannelConnectOAuth | ChannelConnectDeepLink | ChannelConnectImmediate;
32
+ export declare class Channels extends BaseResource {
33
+ constructor(options: ClientOptions);
34
+ /**
35
+ * Lists all registered channel platforms and their configuration status.
36
+ * @returns Array of available platforms
37
+ */
38
+ listPlatforms(): Promise<ChannelPlatformInfo[]>;
39
+ /**
40
+ * Lists installations for a given platform, optionally filtered by agent.
41
+ * @param platform - Platform identifier (e.g., "slack")
42
+ * @param agentId - Optional agent ID to filter by (client-side)
43
+ * @returns Array of installations
44
+ */
45
+ listInstallations(platform: string, agentId?: string): Promise<ChannelInstallationInfo[]>;
46
+ /**
47
+ * Connects an agent to a channel platform.
48
+ * @param platform - Platform identifier (e.g., "slack")
49
+ * @param agentId - Agent to connect
50
+ * @param options - Platform-specific connection options
51
+ * @returns Discriminated connect result — check `type` for the authorization flow
52
+ */
53
+ connect(platform: string, agentId: string, options?: Record<string, unknown>): Promise<ChannelConnectResult>;
54
+ /**
55
+ * Disconnects an agent from a channel platform.
56
+ * @param platform - Platform identifier (e.g., "slack")
57
+ * @param agentId - Agent to disconnect
58
+ */
59
+ disconnect(platform: string, agentId: string): Promise<{
60
+ success: boolean;
61
+ }>;
62
+ }
63
+ //# sourceMappingURL=channels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../src/resources/channels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,OAAO,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChD;AAED,MAAM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