@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
@@ -0,0 +1,589 @@
1
+ import type { ActiveSubagentState, ActiveToolState, MastraDBMessage } from '@mastra/core/agent-controller';
2
+ export type { MastraDBMessage, MastraMessageContentV2, MastraMessagePart } from '@mastra/core/agent-controller';
3
+ import type { RequestContext } from '@mastra/core/request-context';
4
+ import type { ClientOptions } from '../types.js';
5
+ import { BaseResource } from './base.js';
6
+ /**
7
+ * Agent controller session client.
8
+ *
9
+ * Mirrors the controller HTTP routes served when an AgentController is
10
+ * registered on a Mastra instance (`new Mastra({ agentControllers })`). The
11
+ * routes are served under `/agent-controller`:
12
+ *
13
+ * GET /agent-controller listAgentControllers
14
+ * POST /agent-controller/:id/sessions session().create()
15
+ * GET /agent-controller/:id/sessions/:resourceId/stream session().subscribe()
16
+ * POST /agent-controller/:id/sessions/:resourceId/messages session().sendMessage()
17
+ * POST /agent-controller/:id/sessions/:resourceId/abort session().abort()
18
+ * POST /agent-controller/:id/sessions/:resourceId/tool-approval session().approveTool()
19
+ */
20
+ export interface AgentControllerInfo {
21
+ id: string;
22
+ }
23
+ /**
24
+ * Status-line relevant slice of observational-memory progress, mirroring the
25
+ * TUI status line. `msg` reads `pendingTokens/threshold ↓projectedMessageRemoval`
26
+ * (the active message window before an observation fires); `mem` reads
27
+ * `observationTokens/reflectionThreshold ↓projectedReflectionSavings`
28
+ * (accumulated observations before a reflection fires).
29
+ */
30
+ export interface AgentControllerOMProgress {
31
+ status: string;
32
+ pendingTokens: number;
33
+ threshold: number;
34
+ thresholdPercent: number;
35
+ observationTokens: number;
36
+ reflectionThreshold: number;
37
+ reflectionThresholdPercent: number;
38
+ projectedMessageRemoval: number;
39
+ projectedReflectionSavings: number;
40
+ }
41
+ /**
42
+ * AgentController events the SDK types explicitly. This is a discriminated union, so
43
+ * narrowing on `event.type` gives you the right payload fields. This mirrors the
44
+ * subset of the agent controller event stream a web client typically renders.
45
+ */
46
+ export type KnownAgentControllerEvent = {
47
+ type: 'agent_start';
48
+ } | {
49
+ type: 'agent_end';
50
+ reason?: 'complete' | 'aborted' | 'error' | 'suspended';
51
+ } | {
52
+ type: 'message_start';
53
+ message: MastraDBMessage;
54
+ } | {
55
+ type: 'message_update';
56
+ message: MastraDBMessage;
57
+ } | {
58
+ type: 'message_end';
59
+ message: MastraDBMessage;
60
+ } | {
61
+ type: 'tool_input_start';
62
+ toolCallId: string;
63
+ toolName: string;
64
+ } | {
65
+ type: 'tool_input_delta';
66
+ toolCallId: string;
67
+ argsTextDelta: string;
68
+ toolName?: string;
69
+ } | {
70
+ type: 'tool_input_end';
71
+ toolCallId: string;
72
+ } | {
73
+ type: 'tool_start';
74
+ toolCallId: string;
75
+ toolName: string;
76
+ args: unknown;
77
+ } | {
78
+ type: 'tool_update';
79
+ toolCallId: string;
80
+ partialResult: unknown;
81
+ } | {
82
+ type: 'shell_output';
83
+ toolCallId: string;
84
+ output: string;
85
+ stream: 'stdout' | 'stderr';
86
+ } | {
87
+ type: 'tool_end';
88
+ toolCallId: string;
89
+ result?: unknown;
90
+ isError?: boolean;
91
+ } | {
92
+ type: 'tool_approval_required';
93
+ toolCallId: string;
94
+ toolName: string;
95
+ args: unknown;
96
+ } | {
97
+ type: 'tool_suspended';
98
+ toolCallId: string;
99
+ toolName: string;
100
+ args: unknown;
101
+ suspendPayload: unknown;
102
+ } | {
103
+ type: 'mode_changed';
104
+ modeId: string;
105
+ previousModeId: string;
106
+ } | {
107
+ type: 'model_changed';
108
+ modelId: string;
109
+ scope?: 'global' | 'thread' | 'mode';
110
+ modeId?: string;
111
+ } | {
112
+ type: 'thread_changed';
113
+ threadId: string;
114
+ previousThreadId: string | null;
115
+ } | {
116
+ type: 'thread_created';
117
+ thread: {
118
+ id: string;
119
+ title?: string;
120
+ };
121
+ } | {
122
+ type: 'thread_deleted';
123
+ threadId: string;
124
+ } | {
125
+ type: 'subagent_start';
126
+ toolCallId: string;
127
+ agentType: string;
128
+ task: string;
129
+ modelId: string;
130
+ } | {
131
+ type: 'subagent_end';
132
+ toolCallId: string;
133
+ } | {
134
+ type: 'task_updated';
135
+ tasks: AgentControllerTaskSnapshot[];
136
+ } | {
137
+ type: 'notification';
138
+ notificationId?: string;
139
+ message: string;
140
+ source?: string;
141
+ kind?: string;
142
+ priority?: string;
143
+ status?: string;
144
+ attributes?: Record<string, unknown>;
145
+ metadata?: Record<string, unknown>;
146
+ } | {
147
+ type: 'notification_summary';
148
+ message: string;
149
+ pending: number;
150
+ bySource: Record<string, number>;
151
+ byPriority: Record<string, number>;
152
+ notificationIds: string[];
153
+ } | {
154
+ type: 'usage_update';
155
+ usage: unknown;
156
+ } | {
157
+ type: 'display_state_changed';
158
+ displayState: {
159
+ isRunning?: boolean;
160
+ omProgress?: AgentControllerOMProgress;
161
+ tokenUsage?: Record<string, unknown>;
162
+ /** Active tool executions keyed by toolCallId. */
163
+ activeTools?: Record<string, ActiveToolState>;
164
+ toolInputBuffers?: Record<string, {
165
+ text: string;
166
+ toolName: string;
167
+ }>;
168
+ pendingSuspensions?: Record<string, {
169
+ toolCallId: string;
170
+ toolName: string;
171
+ args: unknown;
172
+ suspendPayload: unknown;
173
+ resumeSchema?: string;
174
+ }>;
175
+ activeSubagents?: Record<string, ActiveSubagentState>;
176
+ /** `firstModified` is an ISO string on the wire. */
177
+ modifiedFiles?: Record<string, {
178
+ operations: string[];
179
+ firstModified: string;
180
+ }>;
181
+ [key: string]: unknown;
182
+ };
183
+ } | {
184
+ type: 'goal_evaluation';
185
+ payload: {
186
+ objective: string;
187
+ iteration: number;
188
+ maxRuns: number;
189
+ passed: boolean;
190
+ status: 'active' | 'paused' | 'done';
191
+ reason?: string;
192
+ };
193
+ } | {
194
+ type: 'follow_up_queued';
195
+ count: number;
196
+ } | {
197
+ type: 'om_observation_start';
198
+ } | {
199
+ type: 'om_observation_end';
200
+ } | {
201
+ type: 'om_observation_failed';
202
+ error?: string;
203
+ } | {
204
+ type: 'om_reflection_start';
205
+ } | {
206
+ type: 'om_reflection_end';
207
+ } | {
208
+ type: 'om_reflection_failed';
209
+ error?: string;
210
+ } | {
211
+ type: 'om_buffering_start';
212
+ } | {
213
+ type: 'om_buffering_end';
214
+ } | {
215
+ type: 'om_buffering_failed';
216
+ error?: string;
217
+ } | {
218
+ type: 'om_model_changed';
219
+ role: string;
220
+ modelId: string;
221
+ } | {
222
+ type: 'om_activation';
223
+ enabled: boolean;
224
+ } | {
225
+ type: 'om_status';
226
+ status: string;
227
+ } | {
228
+ type: 'om_thread_title_updated';
229
+ title: string;
230
+ } | {
231
+ type: 'workspace_ready';
232
+ } | {
233
+ type: 'workspace_error';
234
+ error?: string;
235
+ } | {
236
+ type: 'workspace_status_changed';
237
+ status: string;
238
+ } | {
239
+ type: 'info';
240
+ message: string;
241
+ } | {
242
+ type: 'error';
243
+ error: {
244
+ message?: string;
245
+ } | string;
246
+ errorType?: string;
247
+ };
248
+ /** Any other agent controller event the SDK doesn't model explicitly. */
249
+ export interface OtherAgentControllerEvent {
250
+ type: string;
251
+ [key: string]: unknown;
252
+ }
253
+ /**
254
+ * An agent controller event. Comparing `event.type` to a literal does NOT
255
+ * narrow this union — {@link OtherAgentControllerEvent} types `type` as
256
+ * `string`, which matches every literal. Narrow with
257
+ * {@link isKnownAgentControllerEvent} first, then switch on `type`.
258
+ */
259
+ export type AgentControllerEvent = KnownAgentControllerEvent | OtherAgentControllerEvent;
260
+ /** Narrows to the explicitly typed events; see {@link AgentControllerEvent}. */
261
+ export declare function isKnownAgentControllerEvent(event: AgentControllerEvent): event is KnownAgentControllerEvent;
262
+ /** Response from creating or resuming an agent controller session. */
263
+ export interface CreateAgentControllerSessionResponse {
264
+ controllerId: string;
265
+ resourceId: string;
266
+ threadId?: string;
267
+ }
268
+ /** Agent behavior settings, mirroring the TUI's `/settings` toggles. */
269
+ export interface AgentControllerSessionSettings {
270
+ /** Auto-approve all tool calls (no per-tool prompt). */
271
+ yolo: boolean;
272
+ /** Extended-thinking budget (session override). Absent when the session inherits a configured default. */
273
+ thinkingLevel?: 'off' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
274
+ /** How completion/notification alerts are delivered. */
275
+ notifications: 'off' | 'bell' | 'system' | 'both';
276
+ /** Use AST-aware smart editing when available. */
277
+ smartEditing: boolean;
278
+ }
279
+ /** State snapshot for an agent controller session. */
280
+ export interface AgentControllerSessionState {
281
+ controllerId: string;
282
+ resourceId: string;
283
+ threadId?: string;
284
+ modeId: string;
285
+ modelId: string;
286
+ /** Whether the agent is currently executing a run (for initial UI hydration). */
287
+ running?: boolean;
288
+ /** OM progress snapshot for the status line (initial hydration). */
289
+ omProgress?: AgentControllerOMProgress;
290
+ /** Cumulative token usage for the current thread. */
291
+ tokenUsage?: Record<string, unknown>;
292
+ /** Agent behavior settings (yolo, thinking, notifications, smart editing). */
293
+ settings?: AgentControllerSessionSettings;
294
+ }
295
+ export interface AgentControllerModeInfo {
296
+ id: string;
297
+ name?: string;
298
+ }
299
+ export interface AgentControllerThreadInfo {
300
+ id: string;
301
+ title?: string;
302
+ resourceId?: string;
303
+ createdAt?: string;
304
+ updatedAt?: string;
305
+ /**
306
+ * The session scoping tags this thread was stamped with at creation (e.g.
307
+ * `{ projectPath }`). Present on `listThreads()` results; used to tell which
308
+ * worktree/scope a thread belongs to when a resourceId is shared.
309
+ */
310
+ tags?: Record<string, string>;
311
+ /**
312
+ * Whether a run is currently executing on this thread (`'active'`) or not
313
+ * (`'idle'`). Present on `listThreads()` results; lets one listing report
314
+ * activity across every worktree/scope sharing the resourceId.
315
+ */
316
+ state?: 'active' | 'idle';
317
+ }
318
+ export interface AgentControllerAvailableModel {
319
+ id: string;
320
+ provider: string;
321
+ modelName: string;
322
+ hasApiKey: boolean;
323
+ apiKeyEnvVar?: string;
324
+ useCount: number;
325
+ }
326
+ export interface AgentControllerWorkspaceStatus {
327
+ hasWorkspace: boolean;
328
+ isReady: boolean;
329
+ }
330
+ export interface AgentControllerGoalRecord {
331
+ id?: string;
332
+ objective: string;
333
+ status: 'active' | 'paused' | 'done';
334
+ runsUsed: number;
335
+ maxRuns?: number;
336
+ judgeModelId?: string;
337
+ startedAt: number;
338
+ updatedAt: number;
339
+ pausedReason?: string;
340
+ }
341
+ /** Permission policy for a tool or category. */
342
+ export type PermissionPolicy = 'allow' | 'ask' | 'deny';
343
+ /** Tool category for permission grouping. */
344
+ export type ToolCategory = 'read' | 'edit' | 'execute' | 'mcp' | 'other';
345
+ /** Permission rules for controlling tool approval behavior. */
346
+ export interface PermissionRules {
347
+ categories?: Partial<Record<ToolCategory, PermissionPolicy>>;
348
+ tools?: Partial<Record<string, PermissionPolicy>>;
349
+ }
350
+ /** Snapshot of a single task item from the task tools. */
351
+ export interface AgentControllerTaskSnapshot {
352
+ id: string;
353
+ content: string;
354
+ status: 'pending' | 'in_progress' | 'completed';
355
+ activeForm: string;
356
+ }
357
+ /** Input for sending a notification signal to a session. */
358
+ export interface SendNotificationInput {
359
+ source: string;
360
+ kind: string;
361
+ summary: string;
362
+ priority?: 'low' | 'medium' | 'high' | 'urgent';
363
+ payload?: unknown;
364
+ sourceId?: string;
365
+ dedupeKey?: string;
366
+ coalesceKey?: string;
367
+ attributes?: Record<string, string | number | boolean | null | undefined>;
368
+ metadata?: Record<string, unknown>;
369
+ }
370
+ /** Result of sending a notification signal. */
371
+ export interface SendNotificationResult {
372
+ accepted: boolean;
373
+ notificationId?: string;
374
+ /** Delivery decision: deliver, queue, defer, summarize, persist, or discard. */
375
+ decision?: string;
376
+ runId?: string;
377
+ }
378
+ /** Resume payload for the built-in `submit_plan` suspension. */
379
+ export interface PlanResume {
380
+ action: 'approved' | 'rejected';
381
+ feedback?: string;
382
+ }
383
+ /**
384
+ * Options accepted by session methods that trigger or resume agent execution.
385
+ * The `requestContext` is merged into the server-derived request context for
386
+ * that run (server-controlled keys win), so it reaches dynamic instructions,
387
+ * tools, and workspace resolution — mirroring `agent.generate()`.
388
+ */
389
+ export interface AgentControllerRequestOptions {
390
+ requestContext?: RequestContext | Record<string, any>;
391
+ }
392
+ /** Options for subscribing to an agent controller session's event stream. */
393
+ export interface SubscribeAgentControllerSessionOptions {
394
+ /** Called for each event received over the stream. */
395
+ onEvent: (event: AgentControllerEvent) => void;
396
+ /**
397
+ * Called when the stream errors or ends and no (further) reconnect will be
398
+ * attempted — the subscription is dead after this fires.
399
+ */
400
+ onError?: (error: unknown) => void;
401
+ /**
402
+ * Called each time the stream is re-established after a drop (reconnect
403
+ * only). The server does NOT replay events missed while disconnected, so
404
+ * stateful consumers MUST re-sync from here (e.g. `session.state()`) or
405
+ * they will silently lose the gap.
406
+ */
407
+ onReconnect?: () => void;
408
+ /**
409
+ * Automatically re-establish the stream after an established stream drops
410
+ * (clean close or transport error). Does not apply to the initial
411
+ * connection — `subscribe()` rejects if it can't connect. Retries back off
412
+ * exponentially from `delayMs` (default 1s) up to `maxDelayMs` (default
413
+ * 30s); `maxRetries` (default Infinity) bounds the attempts per outage —
414
+ * the counter resets once a connection is re-established. When retries are
415
+ * exhausted, `onError` fires.
416
+ */
417
+ reconnect?: boolean | {
418
+ maxRetries?: number;
419
+ delayMs?: number;
420
+ maxDelayMs?: number;
421
+ };
422
+ }
423
+ export interface AgentControllerSubscription {
424
+ /** Stop reading and release the underlying stream. */
425
+ unsubscribe: () => void;
426
+ }
427
+ /**
428
+ * A session bound to a `resourceId` within one agent controller. Sessions are
429
+ * get-or-create on the server, so re-creating the same resourceId (and scope)
430
+ * resumes the existing conversation rather than forking it.
431
+ *
432
+ * Pass a `scope` to address an independent session over the same resourceId:
433
+ * two sessions with the same resourceId but different scopes have their own
434
+ * run loop, thread binding, and mode/model/state (e.g. one session per git
435
+ * worktree, with the worktree path as the scope). The scope travels on every
436
+ * request as a `sessionScope` query param.
437
+ */
438
+ export declare class AgentControllerSession extends BaseResource {
439
+ private readonly controllerId;
440
+ private readonly resourceId;
441
+ private readonly scope?;
442
+ constructor(options: ClientOptions, controllerId: string, resourceId: string, scope?: string | undefined);
443
+ private base;
444
+ /** Append this session's scope (if any) as a `sessionScope` query param. */
445
+ private url;
446
+ /**
447
+ * Create or resume this session. Pass `tags` to scope initial thread
448
+ * selection — a thread is a resume candidate only when its metadata matches
449
+ * every tag. Pass `threadId` to bind the session to one exact thread,
450
+ * creating it with that id when it does not exist.
451
+ */
452
+ create(options?: {
453
+ tags?: Record<string, string>;
454
+ threadId?: string;
455
+ }): Promise<CreateAgentControllerSessionResponse>;
456
+ /**
457
+ * Subscribe to this session's event stream (SSE). The assistant's reply to a
458
+ * message arrives here as `message_*` events, not on the sendMessage call.
459
+ *
460
+ * The returned promise resolves once the stream is actually established and
461
+ * rejects when it cannot be. A rejected subscribe leaves nothing running —
462
+ * `reconnect` governs only re-establishment after an established stream
463
+ * drops, so callers that want connect-time retry can loop around
464
+ * `subscribe()` themselves and keep cancellation control.
465
+ */
466
+ subscribe(options: SubscribeAgentControllerSessionOptions): Promise<AgentControllerSubscription>;
467
+ /**
468
+ * Send a user message. The reply streams over `subscribe()`.
469
+ * Pass a structured message to attach files (e.g. pasted images) as base64-encoded data:
470
+ * `sendMessage({ content: 'What is in this image?', files })`.
471
+ * Pass `options.requestContext` to merge custom context into the run's request context.
472
+ */
473
+ sendMessage(message: string | {
474
+ content: string;
475
+ files?: Array<{
476
+ data: string;
477
+ mediaType: string;
478
+ filename?: string;
479
+ }>;
480
+ }, options?: AgentControllerRequestOptions): Promise<void>;
481
+ /** Abort the in-flight run for this session. */
482
+ abort(): Promise<void>;
483
+ /** Approve or decline a pending tool call (`tool_approval_required`). */
484
+ approveTool(toolCallId: string, approved: boolean, options?: AgentControllerRequestOptions): Promise<void>;
485
+ /**
486
+ * Resume a suspended interactive tool (`tool_suspended`). The resume shape
487
+ * depends on the tool: a string (or string[]) for `ask_user`, "Yes"/"No" for
488
+ * `request_access`, and a {@link PlanResume} for `submit_plan`.
489
+ */
490
+ respondToToolSuspension(toolCallId: string, resumeData: string | string[] | PlanResume, options?: AgentControllerRequestOptions): Promise<void>;
491
+ /** Inject a message into the in-flight run without starting a new turn. */
492
+ steer(message: string, options?: AgentControllerRequestOptions): Promise<void>;
493
+ /** Get the current mode, model, and thread (for initial UI hydration). */
494
+ state(): Promise<AgentControllerSessionState>;
495
+ /** Merge key-value pairs into the session state. Existing keys not in the payload are preserved. */
496
+ setState(updates: Record<string, unknown>): Promise<void>;
497
+ /** Switch the active mode (e.g. `build`, `plan`). */
498
+ switchMode(modeId: string): Promise<void>;
499
+ /** Switch the model. Defaults to thread scope. */
500
+ switchModel(modelId: string, options?: {
501
+ scope?: 'global' | 'thread';
502
+ modeId?: string;
503
+ }): Promise<void>;
504
+ /**
505
+ * List the session's threads, newest first. Pass `limit` to cap the count
506
+ * (e.g. for a sidebar) and `tags` to scope to threads matching every tag —
507
+ * necessary when one resourceId is shared across git worktrees of the same
508
+ * repo (e.g. `{ tags: { projectPath } }` so each worktree sees only its own
509
+ * threads). Passing a bare number is shorthand for `{ limit }`.
510
+ */
511
+ listThreads(options?: number | {
512
+ limit?: number;
513
+ tags?: Record<string, string>;
514
+ }): Promise<AgentControllerThreadInfo[]>;
515
+ /** Switch the session to an existing thread (rebinds stream + state). */
516
+ switchThread(threadId: string): Promise<void>;
517
+ /** Create a new thread (unbinds previous, binds the new one). */
518
+ createThread(title?: string): Promise<AgentControllerThreadInfo>;
519
+ /** Delete a thread. If it's the active thread the session unbinds. */
520
+ deleteThread(threadId: string): Promise<void>;
521
+ /** Rename a thread. */
522
+ renameThread(threadId: string, title: string): Promise<void>;
523
+ /** Clone a thread (and its messages). The session binds to the clone. */
524
+ cloneThread(options?: {
525
+ sourceThreadId?: string;
526
+ title?: string;
527
+ }): Promise<AgentControllerThreadInfo>;
528
+ /** List messages for a specific thread. */
529
+ listMessages(threadId: string, limit?: number): Promise<MastraDBMessage[]>;
530
+ /**
531
+ * Queue a follow-up message. If the session is idle it sends immediately;
532
+ * if a run is active it queues for after completion.
533
+ */
534
+ followUp(message: string, options?: AgentControllerRequestOptions): Promise<void>;
535
+ /** Get the observational memory record for this session's thread. */
536
+ getOMRecord(): Promise<unknown>;
537
+ /** Change the session's resource identity. */
538
+ setResourceId(newResourceId: string): Promise<void>;
539
+ /** Get known resource IDs for this session. */
540
+ getResourceIds(): Promise<string[]>;
541
+ /** Get the current goal for this session's thread. */
542
+ getGoal(): Promise<AgentControllerGoalRecord | undefined>;
543
+ /** Set a new goal objective. The agent's in-loop judge evaluates progress after each turn. */
544
+ setGoal(objective: string, options?: {
545
+ judgeModelId?: string;
546
+ maxRuns?: number;
547
+ }): Promise<AgentControllerGoalRecord | undefined>;
548
+ /** Update goal options (judge model, max runs, status). */
549
+ updateGoal(options: {
550
+ judgeModelId?: string;
551
+ maxRuns?: number;
552
+ status?: 'active' | 'paused' | 'done';
553
+ }): Promise<AgentControllerGoalRecord | undefined>;
554
+ /** Clear the current goal. */
555
+ clearGoal(): Promise<void>;
556
+ /** Get the current permission rules (per-category and per-tool policies). */
557
+ getPermissions(): Promise<PermissionRules>;
558
+ /** Set the approval policy for a tool category. */
559
+ setPermissionForCategory(category: ToolCategory, policy: PermissionPolicy): Promise<void>;
560
+ /** Set the approval policy for a specific tool. */
561
+ setPermissionForTool(toolName: string, policy: PermissionPolicy): Promise<void>;
562
+ /**
563
+ * Send a notification signal to this session. The agent's delivery policy
564
+ * determines whether the notification wakes an idle thread, is summarised,
565
+ * or is persisted for later.
566
+ */
567
+ sendNotification(input: SendNotificationInput): Promise<SendNotificationResult>;
568
+ }
569
+ /** An agent controller hosted on the connected Mastra instance. */
570
+ export declare class AgentController extends BaseResource {
571
+ private readonly controllerId;
572
+ constructor(options: ClientOptions, controllerId: string);
573
+ private basePath;
574
+ /** List the modes configured on this agent controller (e.g. build, plan). */
575
+ listModes(): Promise<AgentControllerModeInfo[]>;
576
+ /** List available models on this agent controller (with auth status and use counts). */
577
+ listModels(): Promise<AgentControllerAvailableModel[]>;
578
+ /** Get workspace status for this agent controller. */
579
+ workspaceStatus(): Promise<AgentControllerWorkspaceStatus>;
580
+ /**
581
+ * Scope to a session bound to `resourceId` (e.g. a user or conversation id).
582
+ * Pass `scope` to address an independent session over the same resourceId
583
+ * (e.g. one session per git worktree, with the worktree path as the scope).
584
+ */
585
+ session(resourceId: string, scope?: string): AgentControllerSession;
586
+ }
587
+ /** Pull the plain text out of an assistant message's nested content parts. */
588
+ export declare function agentControllerMessageText(message: MastraDBMessage): string;
589
+ //# sourceMappingURL=agent-controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-controller.d.ts","sourceRoot":"","sources":["../../src/resources/agent-controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EACf,eAAe,EAEhB,MAAM,+BAA+B,CAAC;AACvC,YAAY,EAAE,eAAe,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAChH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,KAAK,EA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