@mastra/server 0.10.12-alpha.1 → 0.10.13

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 (99) hide show
  1. package/package.json +3 -3
  2. package/dist/_tsup-dts-rollup.d.cts +0 -1078
  3. package/dist/_tsup-dts-rollup.d.ts +0 -1078
  4. package/dist/chunk-2KZFMI6P.cjs +0 -37
  5. package/dist/chunk-2SLFAFTR.cjs +0 -148
  6. package/dist/chunk-4D66QEKC.js +0 -81
  7. package/dist/chunk-5PQQ42EZ.js +0 -320
  8. package/dist/chunk-75ZPJI57.cjs +0 -9
  9. package/dist/chunk-7TP2LX5L.cjs +0 -129
  10. package/dist/chunk-B2PAS2IB.cjs +0 -514
  11. package/dist/chunk-BK4XT6EG.js +0 -270
  12. package/dist/chunk-CCGRCYWJ.cjs +0 -18
  13. package/dist/chunk-CRCR3ZUK.js +0 -142
  14. package/dist/chunk-DN7K6FJK.cjs +0 -251
  15. package/dist/chunk-FRVBFMO2.cjs +0 -128
  16. package/dist/chunk-G7KH752Y.cjs +0 -145
  17. package/dist/chunk-GHC4YV6R.js +0 -504
  18. package/dist/chunk-H7DMHBKY.js +0 -498
  19. package/dist/chunk-JMLYCXMK.cjs +0 -332
  20. package/dist/chunk-KHZKYUNR.js +0 -112
  21. package/dist/chunk-LCM566I4.js +0 -35
  22. package/dist/chunk-LF7P5PLR.js +0 -14
  23. package/dist/chunk-LI436ITD.cjs +0 -2042
  24. package/dist/chunk-LRCAAFUA.js +0 -122
  25. package/dist/chunk-LZ3VJXSO.cjs +0 -278
  26. package/dist/chunk-MEGCYGBU.js +0 -2039
  27. package/dist/chunk-MKLYEKEF.js +0 -241
  28. package/dist/chunk-MLKGABMK.js +0 -7
  29. package/dist/chunk-PZQDCRPV.cjs +0 -16
  30. package/dist/chunk-QGX47B5D.cjs +0 -86
  31. package/dist/chunk-RG473F6Y.js +0 -141
  32. package/dist/chunk-RHSWAXKB.cjs +0 -118
  33. package/dist/chunk-RSEO4XPX.js +0 -16
  34. package/dist/chunk-SDPGVWQJ.cjs +0 -512
  35. package/dist/chunk-WNVFNNWN.js +0 -121
  36. package/dist/index.cjs +0 -2
  37. package/dist/index.d.cts +0 -1
  38. package/dist/index.d.ts +0 -1
  39. package/dist/index.js +0 -1
  40. package/dist/server/handlers/a2a.cjs +0 -30
  41. package/dist/server/handlers/a2a.d.cts +0 -6
  42. package/dist/server/handlers/a2a.d.ts +0 -6
  43. package/dist/server/handlers/a2a.js +0 -1
  44. package/dist/server/handlers/agents.cjs +0 -30
  45. package/dist/server/handlers/agents.d.cts +0 -6
  46. package/dist/server/handlers/agents.d.ts +0 -6
  47. package/dist/server/handlers/agents.js +0 -1
  48. package/dist/server/handlers/error.cjs +0 -10
  49. package/dist/server/handlers/error.d.cts +0 -1
  50. package/dist/server/handlers/error.d.ts +0 -1
  51. package/dist/server/handlers/error.js +0 -1
  52. package/dist/server/handlers/legacyWorkflows.cjs +0 -46
  53. package/dist/server/handlers/legacyWorkflows.d.cts +0 -10
  54. package/dist/server/handlers/legacyWorkflows.d.ts +0 -10
  55. package/dist/server/handlers/legacyWorkflows.js +0 -1
  56. package/dist/server/handlers/logs.cjs +0 -18
  57. package/dist/server/handlers/logs.d.cts +0 -3
  58. package/dist/server/handlers/logs.d.ts +0 -3
  59. package/dist/server/handlers/logs.js +0 -1
  60. package/dist/server/handlers/memory.cjs +0 -38
  61. package/dist/server/handlers/memory.d.cts +0 -8
  62. package/dist/server/handlers/memory.d.ts +0 -8
  63. package/dist/server/handlers/memory.js +0 -1
  64. package/dist/server/handlers/network.cjs +0 -22
  65. package/dist/server/handlers/network.d.cts +0 -4
  66. package/dist/server/handlers/network.d.ts +0 -4
  67. package/dist/server/handlers/network.js +0 -1
  68. package/dist/server/handlers/telemetry.cjs +0 -14
  69. package/dist/server/handlers/telemetry.d.cts +0 -2
  70. package/dist/server/handlers/telemetry.d.ts +0 -2
  71. package/dist/server/handlers/telemetry.js +0 -1
  72. package/dist/server/handlers/tools.cjs +0 -22
  73. package/dist/server/handlers/tools.d.cts +0 -4
  74. package/dist/server/handlers/tools.d.ts +0 -4
  75. package/dist/server/handlers/tools.js +0 -1
  76. package/dist/server/handlers/utils.cjs +0 -10
  77. package/dist/server/handlers/utils.d.cts +0 -1
  78. package/dist/server/handlers/utils.d.ts +0 -1
  79. package/dist/server/handlers/utils.js +0 -1
  80. package/dist/server/handlers/vNextNetwork.cjs +0 -218
  81. package/dist/server/handlers/vNextNetwork.d.cts +0 -6
  82. package/dist/server/handlers/vNextNetwork.d.ts +0 -6
  83. package/dist/server/handlers/vNextNetwork.js +0 -211
  84. package/dist/server/handlers/vector.cjs +0 -30
  85. package/dist/server/handlers/vector.d.cts +0 -6
  86. package/dist/server/handlers/vector.d.ts +0 -6
  87. package/dist/server/handlers/vector.js +0 -1
  88. package/dist/server/handlers/voice.cjs +0 -22
  89. package/dist/server/handlers/voice.d.cts +0 -4
  90. package/dist/server/handlers/voice.d.ts +0 -4
  91. package/dist/server/handlers/voice.js +0 -1
  92. package/dist/server/handlers/workflows.cjs +0 -62
  93. package/dist/server/handlers/workflows.d.cts +0 -14
  94. package/dist/server/handlers/workflows.d.ts +0 -14
  95. package/dist/server/handlers/workflows.js +0 -1
  96. package/dist/server/handlers.cjs +0 -60
  97. package/dist/server/handlers.d.cts +0 -11
  98. package/dist/server/handlers.d.ts +0 -11
  99. package/dist/server/handlers.js +0 -11
@@ -1,1078 +0,0 @@
1
- import type { Agent } from '@mastra/core/agent';
2
- import type { AgentCard } from '@mastra/core/a2a';
3
- import type { AgentNetwork } from '@mastra/core/network';
4
- import type { Artifact } from '@mastra/core/a2a';
5
- import type { BaseLogMessage } from '@mastra/core/logger';
6
- import { CoreMessage } from 'ai';
7
- import type { CoreMessage as CoreMessage_2 } from '@mastra/core/llm';
8
- import { DefaultEngineType } from '@mastra/core/workflows';
9
- import { EvalRow } from '@mastra/core/storage';
10
- import { GenerateObjectResult } from 'ai';
11
- import { GenerateTextResult } from 'ai';
12
- import type { IMastraLogger } from '@mastra/core/logger';
13
- import type { JSONRPCError } from '@mastra/core/a2a';
14
- import { JSONRPCResponse } from '@mastra/core/a2a';
15
- import { LegacyStep } from '@mastra/core/workflows/legacy';
16
- import type { LegacyWorkflow } from '@mastra/core/workflows/legacy';
17
- import { LegacyWorkflowRunResult } from '@mastra/core/workflows/legacy';
18
- import type { LegacyWorkflowRuns } from '@mastra/core/storage';
19
- import type { LogLevel } from '@mastra/core/logger';
20
- import type { Mastra } from '@mastra/core/mastra';
21
- import type { MastraError } from '@mastra/core/error';
22
- import type { MastraMemory } from '@mastra/core/memory';
23
- import { MastraMessageV1 } from '@mastra/core/memory';
24
- import type { Message } from '@mastra/core/a2a';
25
- import type { QueryResult } from '@mastra/core/vector';
26
- import { ReadableStream as ReadableStream_2 } from 'node:stream/web';
27
- import { ReadableStream as ReadableStream_3 } from 'stream/web';
28
- import { RuntimeContext } from '@mastra/core/runtime-context';
29
- import type { RuntimeContext as RuntimeContext_2 } from '@mastra/core/di';
30
- import type { SerializedStepFlowEntry } from '@mastra/core/workflows';
31
- import { Step } from '@mastra/core/workflows';
32
- import { StepExecutionContext } from '@mastra/core/workflows/legacy';
33
- import { StepGraph } from '@mastra/core/workflows/legacy';
34
- import { StepResult } from '@mastra/core/workflows';
35
- import { StorageThreadType } from '@mastra/core/memory';
36
- import { StreamEvent } from '@mastra/core/workflows';
37
- import { Task } from '@mastra/core/a2a';
38
- import { TaskAndHistory } from '@mastra/core/a2a';
39
- import type { TaskContext } from '@mastra/core/a2a';
40
- import type { TaskIdParams } from '@mastra/core/a2a';
41
- import type { TaskQueryParams } from '@mastra/core/a2a';
42
- import type { TaskSendParams } from '@mastra/core/a2a';
43
- import type { TaskStatus } from '@mastra/core/a2a';
44
- import type { ToolAction } from '@mastra/core/tools';
45
- import { UIMessage } from 'ai';
46
- import type { VercelTool } from '@mastra/core/tools';
47
- import type { WatchEvent } from '@mastra/core/workflows';
48
- import type { Workflow } from '@mastra/core/workflows';
49
- import { WorkflowContext as WorkflowContext_2 } from '@mastra/core/workflows/legacy';
50
- import { WorkflowResult } from '@mastra/core/workflows';
51
- import type { WorkflowRuns } from '@mastra/core/storage';
52
- import { ZodBoolean } from 'zod';
53
- import { ZodEnum } from 'zod';
54
- import { ZodNumber } from 'zod';
55
- import { ZodObject } from 'zod';
56
- import { ZodOptional } from 'zod';
57
- import { ZodString } from 'zod';
58
- import { ZodType } from 'zod';
59
- import { ZodTypeAny } from 'zod';
60
- import { ZodTypeDef } from 'zod';
61
-
62
- export declare namespace a2a {
63
- export {
64
- getAgentCardByIdHandler,
65
- handleTaskSend,
66
- handleTaskGet,
67
- handleTaskSendSubscribe,
68
- handleTaskCancel,
69
- getAgentExecutionHandler
70
- }
71
- }
72
-
73
- export declare namespace agents {
74
- export {
75
- getAgentsHandler,
76
- getAgentByIdHandler,
77
- getEvalsByAgentIdHandler,
78
- getLiveEvalsByAgentIdHandler,
79
- generateHandler,
80
- streamGenerateHandler
81
- }
82
- }
83
-
84
- export declare interface ApiError extends MastraError {
85
- message: string;
86
- status?: number;
87
- }
88
-
89
- export declare function applyUpdateToTaskAndHistory(current: TaskAndHistory, update: Omit<TaskStatus, 'timestamp'> | Artifact): TaskAndHistory;
90
-
91
- export declare function cancelWorkflowRunHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext_3, 'mastra' | 'workflowId' | 'runId'>): Promise<{
92
- message: string;
93
- }>;
94
-
95
- declare type ClientErrorStatusCode = 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451;
96
-
97
- export declare interface Context {
98
- mastra: Mastra;
99
- }
100
-
101
- export declare function convertToCoreMessage(message: Message): CoreMessage_2;
102
-
103
- export declare function createErrorResponse(id: number | string | null, error: JSONRPCError<unknown>): JSONRPCResponse<null, unknown>;
104
-
105
- export declare function createIndex({ mastra, vectorName, index, }: Pick<VectorContext, 'mastra' | 'vectorName'> & {
106
- index: CreateIndexRequest;
107
- }): Promise<{
108
- success: boolean;
109
- }>;
110
-
111
- declare interface CreateIndexRequest {
112
- indexName: string;
113
- dimension: number;
114
- metric?: 'cosine' | 'euclidean' | 'dotproduct';
115
- }
116
-
117
- export declare function createLegacyWorkflowRunHandler({ mastra, workflowId, runId: prevRunId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<{
118
- runId: string;
119
- }>;
120
-
121
- export declare function createSuccessResponse<T>(id: number | string | null, result: T): JSONRPCResponse<T>;
122
-
123
- export declare function createTaskContext({ task, userMessage, history, activeCancellations, }: {
124
- task: Task;
125
- userMessage: Message;
126
- history: Message[];
127
- activeCancellations: Set<string>;
128
- }): TaskContext;
129
-
130
- export declare function createThreadHandler({ mastra, agentId, body, networkId, runtimeContext, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'networkId' | 'runtimeContext'> & {
131
- body?: Omit<Parameters<MastraMemory['createThread']>[0], 'resourceId'> & {
132
- resourceId?: string;
133
- };
134
- }): Promise<StorageThreadType>;
135
-
136
- export declare function createWorkflowRunHandler({ mastra, workflowId, runId: prevRunId, }: Pick<WorkflowContext_3, 'mastra' | 'workflowId' | 'runId'>): Promise<{
137
- runId: string;
138
- }>;
139
-
140
- export declare function deleteIndex({ mastra, vectorName, indexName, }: Pick<VectorContext, 'mastra' | 'vectorName'> & {
141
- indexName?: string;
142
- }): Promise<{
143
- success: boolean;
144
- }>;
145
-
146
- export declare function deleteThreadHandler({ mastra, agentId, threadId, networkId, runtimeContext, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId' | 'networkId' | 'runtimeContext'>): Promise<{
147
- result: string;
148
- }>;
149
-
150
- declare type DeprecatedStatusCode = 305 | 306;
151
-
152
- export declare function describeIndex({ mastra, vectorName, indexName, }: Pick<VectorContext, 'mastra' | 'vectorName'> & {
153
- indexName?: string;
154
- }): Promise<{
155
- dimension: number;
156
- count: number;
157
- metric: string | undefined;
158
- }>;
159
-
160
- export declare function executeAgentToolHandler({ mastra, agentId, toolId, data, runtimeContext, }: Pick<ToolsContext, 'mastra' | 'toolId'> & {
161
- agentId?: string;
162
- data: any;
163
- runtimeContext: RuntimeContext_2;
164
- }): Promise<any>;
165
-
166
- export declare function executeToolHandler(tools: ToolsContext['tools']): ({ mastra, runId, toolId, data, runtimeContext, }: Pick<ToolsContext, "mastra" | "toolId" | "runId"> & {
167
- data?: unknown;
168
- runtimeContext: RuntimeContext_2;
169
- }) => Promise<any>;
170
-
171
- export declare function generateHandler({ mastra, runtimeContext, agentId, body, abortSignal, }: Context & {
172
- runtimeContext: RuntimeContext;
173
- agentId: string;
174
- body: GetBody<'generate'> & {
175
- resourceid?: string;
176
- runtimeContext?: Record<string, unknown>;
177
- };
178
- abortSignal?: AbortSignal;
179
- }): Promise<GenerateTextResult<any, unknown>>;
180
-
181
- export declare function generateHandler_alias_1({ mastra, runtimeContext, networkId, body, }: NetworkContext & {
182
- runtimeContext: RuntimeContext;
183
- body: {
184
- messages?: Parameters<AgentNetwork['generate']>[0];
185
- } & Parameters<AgentNetwork['generate']>[1];
186
- }): Promise<GenerateObjectResult<any>>;
187
-
188
- /**
189
- * Generate speech from text
190
- */
191
- export declare function generateSpeechHandler({ mastra, agentId, body, }: VoiceContext & {
192
- body?: {
193
- text?: string;
194
- speakerId?: string;
195
- };
196
- }): Promise<NodeJS.ReadableStream>;
197
-
198
- export declare function generateVNextNetworkHandler({ mastra, runtimeContext, networkId, body, }: NetworkContext_2 & {
199
- runtimeContext: RuntimeContext;
200
- body: {
201
- message: string;
202
- threadId?: string;
203
- resourceId?: string;
204
- };
205
- }): Promise<{
206
- task: string;
207
- result: string;
208
- resourceId: string;
209
- resourceType: "none" | "tool" | "workflow" | "agent";
210
- }>;
211
-
212
- export declare function getAgentByIdHandler({ mastra, runtimeContext, agentId, isPlayground, }: Context & {
213
- isPlayground?: boolean;
214
- runtimeContext: RuntimeContext;
215
- agentId: string;
216
- }): Promise<{
217
- name: any;
218
- instructions: string;
219
- tools: any;
220
- workflows: {};
221
- provider: string;
222
- modelId: string;
223
- defaultGenerateOptions: any;
224
- defaultStreamOptions: any;
225
- }>;
226
-
227
- export declare function getAgentCardByIdHandler({ mastra, agentId, executionUrl, provider, version, runtimeContext, }: Context & {
228
- runtimeContext: RuntimeContext;
229
- agentId: keyof ReturnType<typeof mastra.getAgents>;
230
- executionUrl?: string;
231
- version?: string;
232
- provider?: {
233
- organization: string;
234
- url: string;
235
- };
236
- }): Promise<AgentCard>;
237
-
238
- export declare function getAgentExecutionHandler({ requestId, mastra, agentId, runtimeContext, method, params, taskStore, logger, }: Context & {
239
- requestId: string;
240
- runtimeContext: RuntimeContext;
241
- agentId: string;
242
- method: 'tasks/send' | 'tasks/sendSubscribe' | 'tasks/get' | 'tasks/cancel';
243
- params: TaskSendParams | TaskQueryParams | TaskIdParams;
244
- taskStore?: InMemoryTaskStore;
245
- logger?: IMastraLogger;
246
- }): Promise<any>;
247
-
248
- export declare function getAgentsHandler({ mastra, runtimeContext }: Context & {
249
- runtimeContext: RuntimeContext;
250
- }): Promise<Record<string, Omit<{
251
- id: string;
252
- name: any;
253
- instructions: string;
254
- tools: any;
255
- workflows: {};
256
- provider: string;
257
- modelId: string;
258
- defaultGenerateOptions: any;
259
- defaultStreamOptions: any;
260
- }, "id">>>;
261
-
262
- declare type GetBody<T extends keyof Agent & {
263
- [K in keyof Agent]: Agent[K] extends (...args: any) => any ? K : never;
264
- }[keyof Agent]> = {
265
- messages: Parameters<Agent[T]>[0];
266
- } & Parameters<Agent[T]>[1];
267
-
268
- export declare function getEvalsByAgentIdHandler({ mastra, runtimeContext, agentId, }: Context & {
269
- runtimeContext: RuntimeContext;
270
- agentId: string;
271
- }): Promise<{
272
- id: string;
273
- name: any;
274
- instructions: string;
275
- evals: EvalRow[];
276
- }>;
277
-
278
- export declare function getLegacyWorkflowByIdHandler({ mastra, workflowId }: WorkflowContext): Promise<{
279
- stepGraph: StepGraph;
280
- stepSubscriberGraph: Record<string, StepGraph>;
281
- serializedStepGraph: StepGraph;
282
- serializedStepSubscriberGraph: Record<string, StepGraph>;
283
- name: string;
284
- triggerSchema: string | undefined;
285
- steps: any;
286
- }>;
287
-
288
- export declare function getLegacyWorkflowRunHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReturnType<LegacyWorkflow['getRun']>>;
289
-
290
- export declare function getLegacyWorkflowRunsHandler({ mastra, workflowId, fromDate, toDate, limit, offset, resourceId, }: WorkflowContext & {
291
- fromDate?: Date;
292
- toDate?: Date;
293
- limit?: number;
294
- offset?: number;
295
- resourceId?: string;
296
- }): Promise<LegacyWorkflowRuns>;
297
-
298
- export declare function getLegacyWorkflowsHandler({ mastra }: WorkflowContext): Promise<any>;
299
-
300
- /**
301
- * Get available listeners for an agent
302
- */
303
- export declare function getListenerHandler({ mastra, agentId }: VoiceContext): Promise<{
304
- enabled: boolean;
305
- }>;
306
-
307
- export declare function getLiveEvalsByAgentIdHandler({ mastra, runtimeContext, agentId, }: Context & {
308
- runtimeContext: RuntimeContext;
309
- agentId: string;
310
- }): Promise<{
311
- id: string;
312
- name: any;
313
- instructions: string;
314
- evals: EvalRow[];
315
- }>;
316
-
317
- export declare function getLogsByRunIdHandler({ mastra, runId, transportId, params, }: Pick<LogsContext, 'mastra' | 'runId' | 'transportId' | 'params'>): Promise<{
318
- logs: BaseLogMessage[];
319
- total: number;
320
- page: number;
321
- perPage: number;
322
- hasMore: boolean;
323
- }>;
324
-
325
- export declare function getLogsHandler({ mastra, transportId, params, }: Pick<LogsContext, 'mastra' | 'transportId' | 'params'>): Promise<{
326
- logs: BaseLogMessage[];
327
- total: number;
328
- page: number;
329
- perPage: number;
330
- hasMore: boolean;
331
- }>;
332
-
333
- export declare function getLogTransports({ mastra }: Pick<LogsContext, 'mastra'>): Promise<{
334
- transports: string[];
335
- }>;
336
-
337
- export declare function getMemoryStatusHandler({ mastra, agentId, networkId, runtimeContext, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'networkId' | 'runtimeContext'>): Promise<{
338
- result: boolean;
339
- }>;
340
-
341
- export declare function getMessagesHandler({ mastra, agentId, threadId, limit, networkId, runtimeContext, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId' | 'networkId' | 'runtimeContext'> & {
342
- limit?: number;
343
- }): Promise<{
344
- messages: CoreMessage[];
345
- uiMessages: UIMessage[];
346
- }>;
347
-
348
- export declare function getNetworkByIdHandler({ mastra, networkId, runtimeContext, }: Pick<NetworkContext, 'mastra' | 'networkId' | 'runtimeContext'>): Promise<{
349
- id: string;
350
- name: string;
351
- instructions: string;
352
- agents: {
353
- name: string;
354
- provider: string;
355
- modelId: string;
356
- }[];
357
- routingModel: {
358
- provider: string;
359
- modelId: string;
360
- };
361
- }>;
362
-
363
- export declare function getNetworksHandler({ mastra, runtimeContext, }: Pick<NetworkContext, 'mastra' | 'runtimeContext'>): Promise<{
364
- id: string;
365
- name: string;
366
- instructions: string;
367
- agents: {
368
- name: string;
369
- provider: string;
370
- modelId: string;
371
- }[];
372
- routingModel: {
373
- provider: string;
374
- modelId: string;
375
- };
376
- }[]>;
377
-
378
- /**
379
- * Get available speakers for an agent
380
- */
381
- export declare function getSpeakersHandler({ mastra, agentId }: VoiceContext): Promise<{
382
- voiceId: string;
383
- }[]>;
384
-
385
- export declare function getTelemetryHandler({ mastra, body }: TelemetryContext): Promise<any[]>;
386
-
387
- export declare function getThreadByIdHandler({ mastra, agentId, threadId, networkId, runtimeContext, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId' | 'networkId' | 'runtimeContext'>): Promise<StorageThreadType>;
388
-
389
- export declare function getThreadsHandler({ mastra, agentId, resourceId, networkId, runtimeContext, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'resourceId' | 'networkId' | 'runtimeContext'>): Promise<StorageThreadType[]>;
390
-
391
- export declare function getToolByIdHandler({ tools, toolId }: Pick<ToolsContext, 'tools' | 'toolId'>): Promise<any>;
392
-
393
- export declare function getToolsHandler({ tools }: Pick<ToolsContext, 'tools'>): Promise<Record<string, any>>;
394
-
395
- export declare function getVNextNetworkByIdHandler({ mastra, networkId, runtimeContext, }: Pick<NetworkContext_2, 'mastra' | 'networkId' | 'runtimeContext'>): Promise<{
396
- id: string;
397
- name: string;
398
- instructions: string;
399
- agents: {
400
- name: string;
401
- provider: string;
402
- modelId: string;
403
- }[];
404
- workflows: {
405
- name: string | undefined;
406
- description: string | undefined;
407
- inputSchema: string | undefined;
408
- outputSchema: string | undefined;
409
- }[];
410
- tools: {
411
- id: string;
412
- description: string;
413
- }[];
414
- routingModel: {
415
- provider: string;
416
- modelId: string;
417
- };
418
- }>;
419
-
420
- export declare function getVNextNetworksHandler({ mastra, runtimeContext, }: Pick<NetworkContext_2, 'mastra' | 'runtimeContext'>): Promise<{
421
- id: string;
422
- name: string;
423
- instructions: string;
424
- tools: {
425
- id: string;
426
- description: string;
427
- }[];
428
- agents: {
429
- name: string;
430
- provider: string;
431
- modelId: string;
432
- }[];
433
- workflows: {
434
- name: string | undefined;
435
- description: string | undefined;
436
- inputSchema: string | undefined;
437
- outputSchema: string | undefined;
438
- }[];
439
- routingModel: {
440
- provider: string;
441
- modelId: string;
442
- };
443
- }[]>;
444
-
445
- export declare function getWorkflowByIdHandler({ mastra, workflowId }: WorkflowContext_3): Promise<{
446
- steps: Record<string, SerializedStep>;
447
- allSteps: Record<string, SerializedStep>;
448
- name: string | undefined;
449
- description: string | undefined;
450
- stepGraph: SerializedStepFlowEntry[];
451
- inputSchema: string | undefined;
452
- outputSchema: string | undefined;
453
- }>;
454
-
455
- export declare function getWorkflowRunByIdHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext_3, 'mastra' | 'workflowId' | 'runId'>): Promise<ReturnType<Workflow['getWorkflowRunById']>>;
456
-
457
- export declare function getWorkflowRunExecutionResultHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext_3, 'mastra' | 'workflowId' | 'runId'>): Promise<WatchEvent['payload']['workflowState']>;
458
-
459
- export declare function getWorkflowRunsHandler({ mastra, workflowId, fromDate, toDate, limit, offset, resourceId, }: WorkflowContext_3 & {
460
- fromDate?: Date;
461
- toDate?: Date;
462
- limit?: number;
463
- offset?: number;
464
- resourceId?: string;
465
- }): Promise<WorkflowRuns>;
466
-
467
- export declare function getWorkflowsHandler({ mastra }: WorkflowContext_3): Promise<any>;
468
-
469
- export declare function handleError(error: unknown, defaultMessage: string): never;
470
-
471
- export declare function handleTaskCancel({ requestId, taskStore, agentId, taskId, logger, }: {
472
- requestId: string;
473
- taskStore: InMemoryTaskStore;
474
- agentId: string;
475
- taskId: string;
476
- logger?: IMastraLogger;
477
- }): Promise<JSONRPCResponse<Task, unknown>>;
478
-
479
- export declare function handleTaskGet({ requestId, taskStore, agentId, taskId, }: {
480
- requestId: string;
481
- taskStore: InMemoryTaskStore;
482
- agentId: string;
483
- taskId: string;
484
- }): Promise<JSONRPCResponse<TaskAndHistory, unknown>>;
485
-
486
- export declare function handleTaskSend({ requestId, params, taskStore, agent, agentId, logger, runtimeContext, }: {
487
- requestId: string;
488
- params: TaskSendParams;
489
- taskStore: InMemoryTaskStore;
490
- agent: Agent;
491
- agentId: string;
492
- logger?: IMastraLogger;
493
- runtimeContext: RuntimeContext;
494
- }): Promise<JSONRPCResponse<null, unknown> | JSONRPCResponse<Task, unknown>>;
495
-
496
- export declare function handleTaskSendSubscribe({ requestId, params, taskStore, agent, agentId, logger, runtimeContext, }: {
497
- requestId: string;
498
- params: TaskSendParams;
499
- taskStore: InMemoryTaskStore;
500
- agent: Agent;
501
- agentId: string;
502
- logger?: IMastraLogger;
503
- runtimeContext: RuntimeContext;
504
- }): AsyncGenerator<JSONRPCResponse<null, unknown> | JSONRPCResponse<Task, unknown> | JSONRPCResponse< {
505
- state: string;
506
- message: {
507
- role: string;
508
- parts: {
509
- type: string;
510
- text: string;
511
- }[];
512
- };
513
- }, unknown>, void, unknown>;
514
-
515
- /**
516
- * `HTTPException` must be used when a fatal error such as authentication failure occurs.
517
- *
518
- * @see {@link https://hono.dev/docs/api/exception}
519
- *
520
- * @param {StatusCode} status - status code of HTTPException
521
- * @param {HTTPExceptionOptions} options - options of HTTPException
522
- * @param {HTTPExceptionOptions["res"]} options.res - response of options of HTTPException
523
- * @param {HTTPExceptionOptions["message"]} options.message - message of options of HTTPException
524
- * @param {HTTPExceptionOptions["cause"]} options.cause - cause of options of HTTPException
525
- *
526
- * @example
527
- * ```ts
528
- * import { HTTPException } from 'hono/http-exception'
529
- *
530
- * // ...
531
- *
532
- * app.post('/auth', async (c, next) => {
533
- * // authentication
534
- * if (authorized === false) {
535
- * throw new HTTPException(401, { message: 'Custom error message' })
536
- * }
537
- * await next()
538
- * })
539
- * ```
540
- */
541
- export declare class HTTPException extends Error {
542
- readonly res?: Response;
543
- readonly status: StatusCode;
544
- /**
545
- * Creates an instance of `HTTPException`.
546
- * @param status - HTTP status code for the exception. Defaults to 500.
547
- * @param options - Additional options for the exception.
548
- */
549
- constructor(status?: StatusCode, options?: HTTPExceptionOptions);
550
- /**
551
- * Returns the response object associated with the exception.
552
- * If a response object is not provided, a new response is created with the error message and status code.
553
- * @returns The response object.
554
- */
555
- getResponse(): Response;
556
- }
557
-
558
- /**
559
- * Options for creating an `HTTPException`.
560
- * @property res - Optional response object to use.
561
- * @property message - Optional custom error message.
562
- * @property cause - Optional cause of the error.
563
- * @property stack - Optional stack trace for the error.
564
- */
565
- declare type HTTPExceptionOptions = {
566
- res?: Response;
567
- message?: string;
568
- cause?: unknown;
569
- stack?: string;
570
- };
571
-
572
- /**
573
- * @module
574
- * This module provides the `HTTPException` class.
575
- */
576
- declare type InfoStatusCode = 100 | 101 | 102 | 103;
577
-
578
- export declare class InMemoryTaskStore {
579
- private store;
580
- activeCancellations: Set<string>;
581
- load({ agentId, taskId }: {
582
- agentId: string;
583
- taskId: string;
584
- }): Promise<TaskAndHistory | null>;
585
- save({ agentId, data }: {
586
- agentId: string;
587
- data: TaskAndHistory;
588
- }): Promise<void>;
589
- }
590
-
591
- export declare namespace legacyWorkflows {
592
- export {
593
- getLegacyWorkflowsHandler,
594
- getLegacyWorkflowByIdHandler,
595
- startAsyncLegacyWorkflowHandler,
596
- getLegacyWorkflowRunHandler,
597
- createLegacyWorkflowRunHandler,
598
- startLegacyWorkflowRunHandler,
599
- watchLegacyWorkflowHandler,
600
- resumeAsyncLegacyWorkflowHandler,
601
- resumeLegacyWorkflowHandler,
602
- getLegacyWorkflowRunsHandler
603
- }
604
- }
605
-
606
- export declare function listIndexes({ mastra, vectorName }: Pick<VectorContext, 'mastra' | 'vectorName'>): Promise<string[]>;
607
-
608
- export declare function loadOrCreateTaskAndHistory({ agentId, taskId, taskStore, message, sessionId, metadata, logger, }: {
609
- agentId: string;
610
- taskId: string;
611
- taskStore: InMemoryTaskStore;
612
- message: Message;
613
- sessionId?: string | null;
614
- metadata?: Record<string, unknown> | null;
615
- logger?: IMastraLogger;
616
- }): Promise<TaskAndHistory>;
617
-
618
- export declare namespace logs {
619
- export {
620
- getLogsHandler,
621
- getLogsByRunIdHandler,
622
- getLogTransports
623
- }
624
- }
625
-
626
- declare type LogsContext = {
627
- mastra: Mastra;
628
- transportId?: string;
629
- runId?: string;
630
- params?: {
631
- fromDate?: Date;
632
- toDate?: Date;
633
- logLevel?: LogLevel;
634
- filters?: string | string[];
635
- page?: number;
636
- perPage?: number;
637
- };
638
- };
639
-
640
- export declare function loopStreamVNextNetworkHandler({ mastra, networkId, body, runtimeContext, }: NetworkContext_2 & {
641
- runtimeContext: RuntimeContext;
642
- body: {
643
- message: string;
644
- threadId?: string;
645
- resourceId?: string;
646
- maxIterations?: number;
647
- };
648
- }): Promise<{
649
- stream: ReadableStream_3<StreamEvent>;
650
- getWorkflowState: () => Promise<WorkflowResult<ZodObject< {
651
- task: ZodString;
652
- resourceId: ZodString;
653
- resourceType: ZodEnum<["agent", "workflow", "none", "tool", "none"]>;
654
- prompt: ZodString;
655
- result: ZodString;
656
- isComplete: ZodOptional<ZodBoolean>;
657
- completionReason: ZodOptional<ZodString>;
658
- iteration: ZodNumber;
659
- }, "strip", ZodTypeAny, {
660
- prompt: string;
661
- resourceId: string;
662
- result: string;
663
- task: string;
664
- resourceType: "none" | "tool" | "workflow" | "agent";
665
- iteration: number;
666
- isComplete?: boolean | undefined;
667
- completionReason?: string | undefined;
668
- }, {
669
- prompt: string;
670
- resourceId: string;
671
- result: string;
672
- task: string;
673
- resourceType: "none" | "tool" | "workflow" | "agent";
674
- iteration: number;
675
- isComplete?: boolean | undefined;
676
- completionReason?: string | undefined;
677
- }>, Step<string, any, any, any, any, DefaultEngineType>[]>>;
678
- }>;
679
-
680
- export declare function loopVNextNetworkHandler({ mastra, networkId, body, runtimeContext, }: NetworkContext_2 & {
681
- runtimeContext: RuntimeContext;
682
- body: {
683
- message: string;
684
- };
685
- }): Promise<{
686
- status: "success";
687
- result: {
688
- text: string;
689
- iteration: number;
690
- };
691
- steps: {
692
- [x: string]: StepResult<any, any, any, any> | StepResult<unknown, unknown, unknown, unknown>;
693
- };
694
- }>;
695
-
696
- export declare namespace memory {
697
- export {
698
- getMemoryStatusHandler,
699
- getThreadsHandler,
700
- getThreadByIdHandler,
701
- saveMessagesHandler,
702
- createThreadHandler,
703
- updateThreadHandler,
704
- deleteThreadHandler,
705
- getMessagesHandler
706
- }
707
- }
708
-
709
- declare interface MemoryContext extends Context {
710
- agentId?: string;
711
- resourceId?: string;
712
- threadId?: string;
713
- networkId?: string;
714
- runtimeContext?: RuntimeContext_2;
715
- }
716
-
717
- export declare namespace network {
718
- export {
719
- getNetworksHandler,
720
- getNetworkByIdHandler,
721
- generateHandler_alias_1 as generateHandler,
722
- streamGenerateHandler_alias_1 as streamGenerateHandler
723
- }
724
- }
725
-
726
- declare interface NetworkContext extends Context {
727
- networkId?: string;
728
- runtimeContext: RuntimeContext;
729
- }
730
-
731
- declare interface NetworkContext_2 extends Context {
732
- networkId?: string;
733
- runtimeContext: RuntimeContext;
734
- }
735
-
736
- export declare function normalizeError(error: any, reqId: number | string | null, taskId?: string, logger?: IMastraLogger): JSONRPCResponse<null, unknown>;
737
-
738
- declare interface QueryRequest {
739
- indexName: string;
740
- queryVector: number[];
741
- topK?: number;
742
- filter?: Record<string, any>;
743
- includeVector?: boolean;
744
- }
745
-
746
- export declare function queryVectors({ mastra, vectorName, query, }: Pick<VectorContext, 'mastra' | 'vectorName'> & {
747
- query: QueryRequest;
748
- }): Promise<QueryResult[]>;
749
-
750
- declare type RedirectStatusCode = 300 | 301 | 302 | 303 | 304 | DeprecatedStatusCode | 307 | 308;
751
-
752
- export declare function resumeAsyncLegacyWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: WorkflowContext & {
753
- body: {
754
- stepId: string;
755
- context: any;
756
- };
757
- runtimeContext: RuntimeContext;
758
- }): Promise<Omit<LegacyWorkflowRunResult<any, LegacyStep<string, any, any, StepExecutionContext<any, WorkflowContext_2<any, LegacyStep<string, any, any, any>[], Record<string, any>>>>[], any>, "runId"> | undefined>;
759
-
760
- export declare function resumeAsyncWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: WorkflowContext_3 & {
761
- body: {
762
- step: string | string[];
763
- resumeData?: unknown;
764
- };
765
- runtimeContext?: RuntimeContext_2;
766
- }): Promise<WorkflowResult<ZodType<any, ZodTypeDef, any>, Step<string, any, any, any, any, any>[]>>;
767
-
768
- export declare function resumeLegacyWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: WorkflowContext & {
769
- body: {
770
- stepId: string;
771
- context: any;
772
- };
773
- runtimeContext: RuntimeContext;
774
- }): Promise<{
775
- message: string;
776
- }>;
777
-
778
- export declare function resumeWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: WorkflowContext_3 & {
779
- body: {
780
- step: string | string[];
781
- resumeData?: unknown;
782
- };
783
- runtimeContext?: RuntimeContext_2;
784
- }): Promise<{
785
- message: string;
786
- }>;
787
-
788
- export declare function saveMessagesHandler({ mastra, agentId, body, networkId, runtimeContext, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'networkId' | 'runtimeContext'> & {
789
- body: {
790
- messages: Parameters<MastraMemory['saveMessages']>[0]['messages'];
791
- };
792
- }): Promise<MastraMessageV1[]>;
793
-
794
- export declare function sendWorkflowRunEventHandler({ mastra, workflowId, runId, event, data, }: Pick<WorkflowContext_3, 'mastra' | 'workflowId' | 'runId'> & {
795
- event: string;
796
- data: unknown;
797
- }): Promise<{
798
- message: string;
799
- }>;
800
-
801
- declare type SerializedStep = {
802
- id: string;
803
- description: string;
804
- inputSchema: string | undefined;
805
- outputSchema: string | undefined;
806
- resumeSchema: string | undefined;
807
- suspendSchema: string | undefined;
808
- };
809
-
810
- declare type ServerErrorStatusCode = 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511;
811
-
812
- export declare function startAsyncLegacyWorkflowHandler({ mastra, runtimeContext, workflowId, runId, triggerData, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
813
- triggerData?: unknown;
814
- runtimeContext: RuntimeContext;
815
- }): Promise<LegacyWorkflowRunResult<any, LegacyStep<string, any, any, StepExecutionContext<any, WorkflowContext_2<any, LegacyStep<string, any, any, any>[], Record<string, any>>>>[], any>>;
816
-
817
- export declare function startAsyncWorkflowHandler({ mastra, runtimeContext, workflowId, runId, inputData, }: Pick<WorkflowContext_3, 'mastra' | 'workflowId' | 'runId'> & {
818
- inputData?: unknown;
819
- runtimeContext?: RuntimeContext_2;
820
- }): Promise<WorkflowResult<ZodType<any, ZodTypeDef, any>, Step<string, any, any, any, any, any>[]>>;
821
-
822
- export declare function startLegacyWorkflowRunHandler({ mastra, runtimeContext, workflowId, runId, triggerData, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
823
- triggerData?: unknown;
824
- runtimeContext: RuntimeContext;
825
- }): Promise<{
826
- message: string;
827
- }>;
828
-
829
- export declare function startWorkflowRunHandler({ mastra, runtimeContext, workflowId, runId, inputData, }: Pick<WorkflowContext_3, 'mastra' | 'workflowId' | 'runId'> & {
830
- inputData?: unknown;
831
- runtimeContext?: RuntimeContext_2;
832
- }): Promise<{
833
- message: string;
834
- }>;
835
-
836
- /**
837
- * If you want to use an unofficial status, use `UnofficialStatusCode`.
838
- */
839
- export declare type StatusCode = InfoStatusCode | SuccessStatusCode | RedirectStatusCode | ClientErrorStatusCode | ServerErrorStatusCode | UnofficialStatusCode;
840
-
841
- export declare function storeTelemetryHandler({ mastra, body }: Context & {
842
- body: {
843
- resourceSpans: any[];
844
- };
845
- }): Promise<{
846
- status: string;
847
- message: string;
848
- error: any;
849
- } | {
850
- status: string;
851
- message: string;
852
- traceCount?: undefined;
853
- } | {
854
- status: string;
855
- message: string;
856
- traceCount: number;
857
- }>;
858
-
859
- export declare function streamGenerateHandler({ mastra, runtimeContext, agentId, body, abortSignal, }: Context & {
860
- runtimeContext: RuntimeContext;
861
- agentId: string;
862
- body: GetBody<'stream'> & {
863
- resourceid?: string;
864
- runtimeContext?: string;
865
- };
866
- abortSignal?: AbortSignal;
867
- }): Promise<Response | undefined>;
868
-
869
- export declare function streamGenerateHandler_alias_1({ mastra, networkId, body, runtimeContext, }: NetworkContext & {
870
- runtimeContext: RuntimeContext;
871
- body: {
872
- messages?: Parameters<AgentNetwork['stream']>[0];
873
- } & Parameters<AgentNetwork['stream']>[1];
874
- }): Promise<Response>;
875
-
876
- export declare function streamGenerateVNextNetworkHandler({ mastra, networkId, body, runtimeContext, }: NetworkContext_2 & {
877
- runtimeContext: RuntimeContext;
878
- body: {
879
- message: string;
880
- threadId?: string;
881
- resourceId?: string;
882
- };
883
- }): Promise<{
884
- stream: ReadableStream_3<StreamEvent>;
885
- getWorkflowState: () => Promise<WorkflowResult<ZodObject< {
886
- task: ZodString;
887
- resourceId: ZodString;
888
- resourceType: ZodEnum<["agent", "workflow", "none", "tool", "none"]>;
889
- prompt: ZodString;
890
- result: ZodString;
891
- isComplete: ZodOptional<ZodBoolean>;
892
- completionReason: ZodOptional<ZodString>;
893
- iteration: ZodNumber;
894
- threadId: ZodOptional<ZodString>;
895
- threadResourceId: ZodOptional<ZodString>;
896
- isOneOff: ZodBoolean;
897
- }, "strip", ZodTypeAny, {
898
- prompt: string;
899
- resourceId: string;
900
- result: string;
901
- task: string;
902
- resourceType: "none" | "tool" | "workflow" | "agent";
903
- iteration: number;
904
- isOneOff: boolean;
905
- threadId?: string | undefined;
906
- threadResourceId?: string | undefined;
907
- isComplete?: boolean | undefined;
908
- completionReason?: string | undefined;
909
- }, {
910
- prompt: string;
911
- resourceId: string;
912
- result: string;
913
- task: string;
914
- resourceType: "none" | "tool" | "workflow" | "agent";
915
- iteration: number;
916
- isOneOff: boolean;
917
- threadId?: string | undefined;
918
- threadResourceId?: string | undefined;
919
- isComplete?: boolean | undefined;
920
- completionReason?: string | undefined;
921
- }>, Step<string, any, any, any, any, DefaultEngineType>[]>>;
922
- }>;
923
-
924
- export declare function streamWorkflowHandler({ mastra, runtimeContext, workflowId, runId, inputData, }: Pick<WorkflowContext_3, 'mastra' | 'workflowId' | 'runId'> & {
925
- inputData?: unknown;
926
- runtimeContext?: RuntimeContext_2;
927
- }): Promise<{
928
- stream: ReadableStream_2<StreamEvent>;
929
- getWorkflowState: () => Promise<WorkflowResult<ZodType<any, ZodTypeDef, any>, Step<string, any, any, any, any, any>[]>>;
930
- }>;
931
-
932
- declare type SuccessStatusCode = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226;
933
-
934
- export declare namespace telemetry {
935
- export {
936
- getTelemetryHandler,
937
- storeTelemetryHandler
938
- }
939
- }
940
-
941
- declare interface TelemetryContext extends Context {
942
- body?: {
943
- name?: string;
944
- scope?: string;
945
- page?: number;
946
- perPage?: number;
947
- attribute?: string | string[];
948
- fromDate?: Date;
949
- toDate?: Date;
950
- };
951
- }
952
-
953
- export declare namespace tools {
954
- export {
955
- getToolsHandler,
956
- getToolByIdHandler,
957
- executeToolHandler,
958
- executeAgentToolHandler
959
- }
960
- }
961
-
962
- declare interface ToolsContext extends Context {
963
- tools?: Record<string, ToolAction | VercelTool>;
964
- toolId?: string;
965
- runId?: string;
966
- }
967
-
968
- /**
969
- * Transcribe speech to text
970
- */
971
- export declare function transcribeSpeechHandler({ mastra, agentId, body, }: VoiceContext & {
972
- body?: {
973
- audioData?: Buffer;
974
- options?: Parameters<NonNullable<Agent['voice']>['listen']>[1];
975
- };
976
- }): Promise<{
977
- text: string | void | NodeJS.ReadableStream;
978
- }>;
979
-
980
- /**
981
- * @deprecated
982
- * Use `UnofficialStatusCode` instead.
983
- */
984
- export declare type UnOfficalStatusCode = UnofficialStatusCode;
985
-
986
- /**
987
- * `UnofficialStatusCode` can be used to specify an unofficial status code.
988
- * @example
989
- *
990
- * ```ts
991
- * app.get('/unknown', (c) => {
992
- * return c.text("Unknown Error", 520 as UnofficialStatusCode)
993
- * })
994
- * ```
995
- */
996
- export declare type UnofficialStatusCode = -1;
997
-
998
- export declare function updateThreadHandler({ mastra, agentId, threadId, body, networkId, runtimeContext, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId' | 'networkId' | 'runtimeContext'> & {
999
- body?: Parameters<MastraMemory['saveThread']>[0]['thread'];
1000
- }): Promise<StorageThreadType>;
1001
-
1002
- declare interface UpsertRequest {
1003
- indexName: string;
1004
- vectors: number[][];
1005
- metadata?: Record<string, any>[];
1006
- ids?: string[];
1007
- }
1008
-
1009
- export declare function upsertVectors({ mastra, vectorName, index }: VectorContext & {
1010
- index: UpsertRequest;
1011
- }): Promise<{
1012
- ids: string[];
1013
- }>;
1014
-
1015
- export declare function validateBody(body: Record<string, unknown>): void;
1016
-
1017
- export declare namespace vector {
1018
- export {
1019
- upsertVectors,
1020
- createIndex,
1021
- queryVectors,
1022
- listIndexes,
1023
- describeIndex,
1024
- deleteIndex
1025
- }
1026
- }
1027
-
1028
- declare interface VectorContext extends Context {
1029
- vectorName?: string;
1030
- }
1031
-
1032
- export declare namespace voice {
1033
- export {
1034
- getSpeakersHandler,
1035
- generateSpeechHandler,
1036
- transcribeSpeechHandler,
1037
- getListenerHandler
1038
- }
1039
- }
1040
-
1041
- declare interface VoiceContext extends Context {
1042
- agentId?: string;
1043
- }
1044
-
1045
- export declare function watchLegacyWorkflowHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReadableStream_2<string>>;
1046
-
1047
- export declare function watchWorkflowHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext_3, 'mastra' | 'workflowId' | 'runId'>): Promise<ReadableStream_2<string>>;
1048
-
1049
- declare interface WorkflowContext extends Context {
1050
- workflowId?: string;
1051
- runId?: string;
1052
- }
1053
-
1054
- declare interface WorkflowContext_3 extends Context {
1055
- workflowId?: string;
1056
- runId?: string;
1057
- }
1058
-
1059
- export declare namespace workflows {
1060
- export {
1061
- getWorkflowsHandler,
1062
- getWorkflowByIdHandler,
1063
- getWorkflowRunByIdHandler,
1064
- getWorkflowRunExecutionResultHandler,
1065
- createWorkflowRunHandler,
1066
- startAsyncWorkflowHandler,
1067
- startWorkflowRunHandler,
1068
- watchWorkflowHandler,
1069
- streamWorkflowHandler,
1070
- resumeAsyncWorkflowHandler,
1071
- resumeWorkflowHandler,
1072
- getWorkflowRunsHandler,
1073
- cancelWorkflowRunHandler,
1074
- sendWorkflowRunEventHandler
1075
- }
1076
- }
1077
-
1078
- export { }