@mastra/client-js 1.54.0-alpha.2 → 1.54.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6051,6 +6051,7 @@ const KNOWN_AGENT_CONTROLLER_EVENT_TYPES = new Set(Object.keys({
6051
6051
  thread_changed: true,
6052
6052
  thread_created: true,
6053
6053
  thread_deleted: true,
6054
+ thread_owner_changed: true,
6054
6055
  thread_title_updated: true,
6055
6056
  subagent_start: true,
6056
6057
  subagent_text_delta: true,
@@ -6413,13 +6414,21 @@ var AgentControllerSession = class extends BaseResource {
6413
6414
  }
6414
6415
  });
6415
6416
  }
6416
- /** Inject a message into the in-flight run without starting a new turn. */
6417
+ /**
6418
+ * Aborts the in-flight run, then sends the message as a new turn.
6419
+ * Pass a structured message to attach files, as with `sendMessage`.
6420
+ */
6417
6421
  async steer(message, options) {
6422
+ const { content, files } = typeof message === "string" ? {
6423
+ content: message,
6424
+ files: void 0
6425
+ } : message;
6418
6426
  const requestContext = parseClientRequestContext(options?.requestContext);
6419
6427
  await this.request(this.url(`${this.base()}/steer`), {
6420
6428
  method: "POST",
6421
6429
  body: {
6422
- message,
6430
+ message: content,
6431
+ ...files?.length ? { files } : {},
6423
6432
  ...requestContext ? { requestContext } : {}
6424
6433
  }
6425
6434
  });
@@ -6530,13 +6539,19 @@ var AgentControllerSession = class extends BaseResource {
6530
6539
  /**
6531
6540
  * Queue a follow-up message. If the session is idle it sends immediately;
6532
6541
  * if a run is active it queues for after completion.
6542
+ * Pass a structured message to attach files, as with `sendMessage`.
6533
6543
  */
6534
6544
  async followUp(message, options) {
6545
+ const { content, files } = typeof message === "string" ? {
6546
+ content: message,
6547
+ files: void 0
6548
+ } : message;
6535
6549
  const requestContext = parseClientRequestContext(options?.requestContext);
6536
6550
  await this.request(this.url(`${this.base()}/follow-up`), {
6537
6551
  method: "POST",
6538
6552
  body: {
6539
- message,
6553
+ message: content,
6554
+ ...files?.length ? { files } : {},
6540
6555
  ...requestContext ? { requestContext } : {}
6541
6556
  }
6542
6557
  });