@mastra/server 1.70.0-alpha.1 → 1.70.0-alpha.3

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 (41) hide show
  1. package/dist/{api-schema-manifest-CeiI0HER.cjs → api-schema-manifest-CE2lXPKH.cjs} +2 -2
  2. package/dist/{api-schema-manifest-CeiI0HER.cjs.map → api-schema-manifest-CE2lXPKH.cjs.map} +1 -1
  3. package/dist/{api-schema-manifest-BvIpcxxq.js → api-schema-manifest-D0_Q8UhK.js} +2 -2
  4. package/dist/{api-schema-manifest-BvIpcxxq.js.map → api-schema-manifest-D0_Q8UhK.js.map} +1 -1
  5. package/dist/{dist-DcTSQIB2.js → dist-B3wkDytS.js} +104 -53
  6. package/dist/dist-B3wkDytS.js.map +1 -0
  7. package/dist/{dist-1bGgLbxg.cjs → dist-pojdOe9l.cjs} +104 -53
  8. package/dist/dist-pojdOe9l.cjs.map +1 -0
  9. package/dist/docs/SKILL.md +1 -1
  10. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  11. package/dist/docs/references/reference-observability-tracing-trace-query.md +17 -1
  12. package/dist/{observability-new-endpoints-BIoS0_PJ.cjs → observability-new-endpoints-DJYL-Y5A.cjs} +5 -2
  13. package/dist/observability-new-endpoints-DJYL-Y5A.cjs.map +1 -0
  14. package/dist/{observability-new-endpoints-0hQR-aWF.js → observability-new-endpoints-DQHOnzNX.js} +6 -3
  15. package/dist/observability-new-endpoints-DQHOnzNX.js.map +1 -0
  16. package/dist/{routes-BU_1NO20.js → routes-CeJQfjk5.js} +2 -2
  17. package/dist/{routes-BU_1NO20.js.map → routes-CeJQfjk5.js.map} +1 -1
  18. package/dist/{routes-Czb2jV4R.cjs → routes-l-SxuNkD.cjs} +2 -2
  19. package/dist/{routes-Czb2jV4R.cjs.map → routes-l-SxuNkD.cjs.map} +1 -1
  20. package/dist/server/handlers/agent-builder.cjs +1 -1
  21. package/dist/server/handlers/agent-builder.js +1 -1
  22. package/dist/server/handlers/observability-new-endpoints.cjs +1 -1
  23. package/dist/server/handlers/observability-new-endpoints.d.ts.map +1 -1
  24. package/dist/server/handlers/observability-new-endpoints.js +1 -1
  25. package/dist/server/handlers/observability-shared.cjs +17 -0
  26. package/dist/server/handlers/observability-shared.cjs.map +1 -1
  27. package/dist/server/handlers/observability-shared.d.ts +3 -1
  28. package/dist/server/handlers/observability-shared.d.ts.map +1 -1
  29. package/dist/server/handlers/observability-shared.js +16 -1
  30. package/dist/server/handlers/observability-shared.js.map +1 -1
  31. package/dist/server/handlers/observability.cjs +1 -1
  32. package/dist/server/handlers/observability.js +1 -1
  33. package/dist/server/handlers/system.cjs +1 -1
  34. package/dist/server/handlers/system.js +1 -1
  35. package/dist/server/server-adapter/index.cjs +1 -1
  36. package/dist/server/server-adapter/index.js +1 -1
  37. package/package.json +6 -6
  38. package/dist/dist-1bGgLbxg.cjs.map +0 -1
  39. package/dist/dist-DcTSQIB2.js.map +0 -1
  40. package/dist/observability-new-endpoints-0hQR-aWF.js.map +0 -1
  41. package/dist/observability-new-endpoints-BIoS0_PJ.cjs.map +0 -1
@@ -4638,7 +4638,7 @@ function splitLines(text) {
4638
4638
  return result;
4639
4639
  }
4640
4640
  //#endregion
4641
- //#region ../memory/dist/src-2UN5fCQ5.js
4641
+ //#region ../memory/dist/src-B0ISVOJX.js
4642
4642
  var __defProp$3 = Object.defineProperty;
4643
4643
  var __exportAll = (all, no_symbols) => {
4644
4644
  let target = {};
@@ -22886,7 +22886,9 @@ var constants_exports = /* @__PURE__ */ __exportAll({
22886
22886
  OBSERVATIONAL_MEMORY_DEFAULTS: () => OBSERVATIONAL_MEMORY_DEFAULTS,
22887
22887
  OBSERVATION_CONTEXT_INSTRUCTIONS: () => OBSERVATION_CONTEXT_INSTRUCTIONS,
22888
22888
  OBSERVATION_CONTEXT_PROMPT: () => OBSERVATION_CONTEXT_PROMPT,
22889
+ OBSERVATION_CONTEXT_PROMPT_THREAD: () => OBSERVATION_CONTEXT_PROMPT_THREAD,
22889
22890
  OBSERVATION_CONTINUATION_HINT: () => OBSERVATION_CONTINUATION_HINT,
22891
+ getObservationContextPrompt: () => getObservationContextPrompt,
22890
22892
  getRetrievalInstructions: () => getRetrievalInstructions
22891
22893
  });
22892
22894
  /**
@@ -22936,6 +22938,19 @@ Any messages following this reminder are newer and should take priority.`;
22936
22938
  */
22937
22939
  const OBSERVATION_CONTEXT_PROMPT = `The following observations block contains your memory of past conversations with this user.`;
22938
22940
  /**
22941
+ * Preamble used when observations are thread-scoped: they describe earlier parts
22942
+ * of the current conversation, not other conversations.
22943
+ */
22944
+ const OBSERVATION_CONTEXT_PROMPT_THREAD = `The following observations block contains your memory of earlier parts of this current conversation. Everything recorded here (including IDs, artifacts, and tool results) came from this conversation and is available for you to reuse.`;
22945
+ /**
22946
+ * Returns the observations preamble matching the memory scope.
22947
+ * - `'thread'`: observations are earlier parts of the current conversation.
22948
+ * - `'resource'`: observations span past conversations with this user.
22949
+ */
22950
+ function getObservationContextPrompt(scope = "thread") {
22951
+ return scope === "resource" ? OBSERVATION_CONTEXT_PROMPT : OBSERVATION_CONTEXT_PROMPT_THREAD;
22952
+ }
22953
+ /**
22939
22954
  * Instructions that tell the model how to interpret and use observations.
22940
22955
  * Place AFTER the `<observations>` block so the model sees the data before the rules.
22941
22956
  */
@@ -23209,7 +23224,7 @@ async function applyExtractorHooks(opts) {
23209
23224
  failures: mergeExtractionFailures(failures)
23210
23225
  };
23211
23226
  }
23212
- function isRecord$4(value) {
23227
+ function isRecord$5(value) {
23213
23228
  return typeof value === "object" && value !== null;
23214
23229
  }
23215
23230
  /** Keep provider diagnostics in streamed/persisted markers, not whole API request/response objects. */
@@ -23221,7 +23236,7 @@ function formatOmError(error) {
23221
23236
  };
23222
23237
  function collectErrorDetails(value, depth) {
23223
23238
  if (depth > 5) return;
23224
- if (!isRecord$4(value)) {
23239
+ if (!isRecord$5(value)) {
23225
23240
  if (value !== void 0) add(String(value));
23226
23241
  return;
23227
23242
  }
@@ -23231,10 +23246,10 @@ function formatOmError(error) {
23231
23246
  if (typeof value.statusCode === "number") add(`HTTP ${value.statusCode}`);
23232
23247
  if (typeof value.responseBody === "string") try {
23233
23248
  const body = JSON.parse(value.responseBody);
23234
- if (isRecord$4(body)) {
23249
+ if (isRecord$5(body)) {
23235
23250
  add(body.message);
23236
23251
  add(body.detail);
23237
- if (isRecord$4(body.error)) add(body.error.message);
23252
+ if (isRecord$5(body.error)) add(body.error.message);
23238
23253
  else add(body.error);
23239
23254
  }
23240
23255
  } catch {}
@@ -23337,6 +23352,19 @@ ${extractorInstructions}${priorLines.length > 0 ? `\n\n## Prior Extracted Values
23337
23352
  failures
23338
23353
  };
23339
23354
  }
23355
+ const LEGACY_SYSTEM_REMINDER_METADATA_KEY = "dynamicAgentsMdReminder";
23356
+ function isRecord$4(value) {
23357
+ return typeof value === "object" && value !== null;
23358
+ }
23359
+ function isSystemReminderMessage(message) {
23360
+ if (!isRecord$4(message.content)) return false;
23361
+ const metadata = message.content.metadata;
23362
+ if (message.role === "signal") return isRecord$4(metadata) && isRecord$4(metadata.signal) && (metadata.signal.type === "system-reminder" || metadata.signal.type === "reactive");
23363
+ if (message.role !== "user") return false;
23364
+ if (isRecord$4(metadata) && (isRecord$4(metadata.systemReminder) || LEGACY_SYSTEM_REMINDER_METADATA_KEY in metadata)) return true;
23365
+ const firstTextPart = message.content.parts.find((part) => part.type === "text");
23366
+ return typeof firstTextPart?.text === "string" && firstTextPart.text.startsWith("<system-reminder");
23367
+ }
23340
23368
  const ANCHOR_ID_PATTERN = /^\[(O\d+(?:-N\d+)?)\]\s*/;
23341
23369
  const OBSERVATION_DATE_HEADER_PATTERN = /^\s*Date:\s+/;
23342
23370
  const XML_TAG_PATTERN = /^\s*<\/?[a-z][^>]*>\s*$/i;
@@ -24820,11 +24848,23 @@ function formatObserverToolArguments(args, maxCharacters) {
24820
24848
  if (args === void 0) return maybeTruncate("[arguments unavailable]", maxCharacters);
24821
24849
  return formatToolArgumentsForObserver(args, { maxCharacters: maxCharacters || void 0 });
24822
24850
  }
24851
+ /**
24852
+ * Labels signals and system reminders by their tag instead of as "User", so the Observer
24853
+ * does not record runtime instructions as things the user said (#22195).
24854
+ */
24855
+ function getObserverMessageLabel(msg) {
24856
+ if (msg.role === "signal") {
24857
+ const signal = msg.content?.metadata?.signal;
24858
+ return signal?.type === "user" ? "User" : signal?.tagName ?? signal?.type ?? "Signal";
24859
+ }
24860
+ if (isSystemReminderMessage(msg)) return "system-reminder";
24861
+ return msg.role.charAt(0).toUpperCase() + msg.role.slice(1);
24862
+ }
24823
24863
  function formatObserverMessage(msg, counter, toolFormatting, options) {
24824
24864
  const maxLen = options?.maxPartLength;
24825
24865
  const maxToolResultTokens = options?.maxToolResultTokens ?? 5e3;
24826
24866
  const attachmentFilter = options?.attachmentFilter;
24827
- const role = msg.role.charAt(0).toUpperCase() + msg.role.slice(1);
24867
+ const role = getObserverMessageLabel(msg);
24828
24868
  const attachments = [];
24829
24869
  const messageCreatedAt = normalizeObserverCreatedAt(msg.createdAt);
24830
24870
  let lines = [];
@@ -24998,7 +25038,36 @@ function buildMultiThreadObserverHistoryMessage(messagesByThread, threadOrder, o
24998
25038
  content
24999
25039
  };
25000
25040
  }
25001
- function buildMultiThreadObserverTaskPrompt(existingObservations, threadOrder, priorMetadataByThread, wasTruncated, includeThreadTitle, extractors = []) {
25041
+ /**
25042
+ * Build the Observer's single multi-thread request message: prior memory first, then the
25043
+ * thread histories, then the task. Keeping everything in one user message, with the task
25044
+ * after the history, stops the Observer from reading its own instructions as something
25045
+ * the user said (#22195).
25046
+ */
25047
+ function buildMultiThreadObserverRequestMessage(existingObservations, messagesByThread, threadOrder, priorMetadataByThread, wasTruncated, includeThreadTitle, extractors = [], formatOptions) {
25048
+ return surroundObserverHistory(buildMultiThreadObserverHistoryMessage(messagesByThread, threadOrder, formatOptions), buildMultiThreadObserverContextPrompt(existingObservations, threadOrder, priorMetadataByThread, wasTruncated, includeThreadTitle, extractors), buildMultiThreadObserverTaskInstructions(includeThreadTitle));
25049
+ }
25050
+ function surroundObserverHistory(history, contextPrompt, taskInstructions) {
25051
+ const historyContent = history.content;
25052
+ return {
25053
+ role: "user",
25054
+ content: [
25055
+ ...contextPrompt ? [{
25056
+ type: "text",
25057
+ text: contextPrompt
25058
+ }] : [],
25059
+ ...historyContent,
25060
+ {
25061
+ type: "text",
25062
+ text: `\n\n---\n\n${taskInstructions}`
25063
+ }
25064
+ ]
25065
+ };
25066
+ }
25067
+ function buildMultiThreadObserverTaskInstructions(includeThreadTitle) {
25068
+ return `## Your Task\n\nExtract new observations from each thread. Output your observations grouped by thread using <thread id="..."> tags inside your <observations> block. Each thread block should contain that thread's observations, current-task, suggested-response${includeThreadTitle ? ", and thread-title" : ""}, in the format specified in your instructions.`;
25069
+ }
25070
+ function buildMultiThreadObserverContextPrompt(existingObservations, threadOrder, priorMetadataByThread, wasTruncated, includeThreadTitle, extractors = []) {
25002
25071
  let prompt = "";
25003
25072
  if (existingObservations) {
25004
25073
  prompt += `## Previous Observations\n\n${existingObservations}\n\n---\n\n`;
@@ -25024,25 +25093,6 @@ function buildMultiThreadObserverTaskPrompt(existingObservations, threadOrder, p
25024
25093
  }
25025
25094
  prompt += `Use each thread's prior current-task, suggested-response${includeThreadTitle ? ", and thread-title" : ""} as continuity hints, then update them based on that thread's new messages.\n\n---\n\n`;
25026
25095
  }
25027
- prompt += `## Your Task\n\n`;
25028
- prompt += `Extract new observations from each thread. Output your observations grouped by thread using <thread id="..."> tags inside your <observations> block. Each thread block should contain that thread's observations, current-task, suggested-response${includeThreadTitle ? ", and thread-title" : ""}.\n\n`;
25029
- prompt += `Example output format:\n`;
25030
- prompt += `<observations>\n`;
25031
- prompt += `<thread id="thread1">\n`;
25032
- prompt += `Date: Dec 4, 2025\n`;
25033
- prompt += `* 🔴 (14:30) User prefers direct answers\n`;
25034
- prompt += `<current-task>Working on feature X</current-task>\n`;
25035
- prompt += `<suggested-response>Continue with the implementation</suggested-response>\n`;
25036
- if (includeThreadTitle) prompt += `<thread-title>Feature X implementation</thread-title>\n`;
25037
- prompt += `</thread>\n`;
25038
- prompt += `<thread id="thread2">\n`;
25039
- prompt += `Date: Dec 5, 2025\n`;
25040
- prompt += `* 🔴 (09:15) User asked about deployment\n`;
25041
- prompt += `<current-task>Discussing deployment options</current-task>\n`;
25042
- prompt += `<suggested-response>Explain the deployment process</suggested-response>\n`;
25043
- if (includeThreadTitle) prompt += `<thread-title>Deployment setup</thread-title>\n`;
25044
- prompt += `</thread>\n`;
25045
- prompt += `</observations>`;
25046
25096
  return prompt;
25047
25097
  }
25048
25098
  /**
@@ -25100,6 +25150,24 @@ function parseMultiThreadObserverOutput(output, extractors = []) {
25100
25150
  };
25101
25151
  }
25102
25152
  function buildObserverTaskPrompt(existingObservations, options) {
25153
+ return buildObserverContextPrompt(existingObservations, options) + buildObserverTaskInstructions(options);
25154
+ }
25155
+ /**
25156
+ * Build the Observer's single request message: prior memory first, then the message
25157
+ * history, then the task. Keeping everything in one user message, with the task after
25158
+ * the history, stops the Observer from reading its own instructions as something the
25159
+ * user said (#22195).
25160
+ */
25161
+ function buildObserverRequestMessage(existingObservations, messagesToObserve, options, formatOptions) {
25162
+ return surroundObserverHistory(buildObserverHistoryMessage(messagesToObserve, formatOptions), buildObserverContextPrompt(existingObservations, options), buildObserverTaskInstructions(options));
25163
+ }
25164
+ function buildObserverTaskInstructions(options) {
25165
+ let prompt = `## Your Task\n\n`;
25166
+ prompt += `Extract new observations from the message history above. Do not repeat observations that are already in the previous observations. Add your new observations in the format specified in your instructions.`;
25167
+ if (options?.skipContinuationHints) prompt += `\n\nOutput <observations> every time.`;
25168
+ return prompt;
25169
+ }
25170
+ function buildObserverContextPrompt(existingObservations, options) {
25103
25171
  let prompt = "";
25104
25172
  if (existingObservations) {
25105
25173
  prompt += `## Previous Observations\n\n${existingObservations}\n\n---\n\n`;
@@ -25120,9 +25188,6 @@ function buildObserverTaskPrompt(existingObservations, options) {
25120
25188
  const titleHint = options?.includeThreadTitle ? ", and thread-title" : "";
25121
25189
  prompt += `Use the prior current-task, suggested-response${titleHint} as continuity hints, then update them based on the new messages.\n\n---\n\n`;
25122
25190
  }
25123
- prompt += `## Your Task\n\n`;
25124
- prompt += `Extract new observations from the message history above. Do not repeat observations that are already in the previous observations. Add your new observations in the format specified in your instructions.`;
25125
- if (options?.skipContinuationHints) prompt += `\n\nOutput <observations> every time.`;
25126
25191
  return prompt;
25127
25192
  }
25128
25193
  /**
@@ -25751,14 +25816,11 @@ var ObserverRunner = class {
25751
25816
  const agent = temporaryMemory ? this.createAgent(resolvedModel.model, false, temporaryMemory.memory, activeExtractors) : this.createAgent(resolvedModel.model, false, void 0, activeExtractors);
25752
25817
  const internalRequestContext = withOmInternalThreadId(options?.requestContext, agent.id);
25753
25818
  const attachmentFilter = this.resolveAttachmentFilter(resolvedModel.model, options?.requestContext);
25754
- const observerMessages = [{
25755
- role: "user",
25756
- content: buildObserverTaskPrompt(existingObservations, {
25757
- ...options,
25758
- includeThreadTitle: this.observationConfig.threadTitle,
25759
- extractors: activeExtractors
25760
- })
25761
- }, buildObserverHistoryMessage(messagesToObserve, { attachmentFilter })];
25819
+ const observerMessages = [buildObserverRequestMessage(existingObservations, messagesToObserve, {
25820
+ ...options,
25821
+ includeThreadTitle: this.observationConfig.threadTitle,
25822
+ extractors: activeExtractors
25823
+ }, { attachmentFilter })];
25762
25824
  const doGenerate = async () => {
25763
25825
  return withRetry(() => withOmTracingSpan({
25764
25826
  phase: "observer",
@@ -25958,10 +26020,7 @@ var ObserverRunner = class {
25958
26020
  const agent = this.createAgent(resolvedModel.model, true, void 0, activeExtractors);
25959
26021
  const internalRequestContext = withOmInternalThreadId(requestContext, agent.id);
25960
26022
  const multiThreadAttachmentFilter = this.resolveAttachmentFilter(resolvedModel.model, requestContext);
25961
- const observerMessages = [{
25962
- role: "user",
25963
- content: buildMultiThreadObserverTaskPrompt(existingObservations, threadOrder, priorMetadataByThread, void 0, this.observationConfig.threadTitle, activeExtractors)
25964
- }, buildMultiThreadObserverHistoryMessage(messagesByThread, threadOrder, { attachmentFilter: multiThreadAttachmentFilter })];
26023
+ const observerMessages = [buildMultiThreadObserverRequestMessage(existingObservations, messagesByThread, threadOrder, priorMetadataByThread, void 0, this.observationConfig.threadTitle, activeExtractors, { attachmentFilter: multiThreadAttachmentFilter })];
25965
26024
  for (const msgs of messagesByThread.values()) for (const msg of msgs) this.observedMessageIds.add(msg.id);
25966
26025
  const doGenerate = async () => {
25967
26026
  return withRetry(() => withOmTracingSpan({
@@ -34120,7 +34179,7 @@ var ObservationalMemory = class ObservationalMemory {
34120
34179
  formatObservationsForContext(observations, currentTask, suggestedResponse, extractedValues, unobservedContextBlocks, currentDate, retrieval = false) {
34121
34180
  let optimized = retrieval ? renderObservationGroupsForReflection(observations) ?? optimizeObservationsForContext(observations) : optimizeObservationsForContext(observations);
34122
34181
  if (currentDate) optimized = addRelativeTimeToObservations(optimized, currentDate);
34123
- const messages = [`${OBSERVATION_CONTEXT_PROMPT}\n\n${OBSERVATION_CONTEXT_INSTRUCTIONS}${retrieval ? `\n\n${getRetrievalInstructions(this.retrievalScope, this.retrievalInstructions, this.retrievalSearch)}` : ""}`];
34182
+ const messages = [`${getObservationContextPrompt(this.scope)}\n\n${OBSERVATION_CONTEXT_INSTRUCTIONS}${retrieval ? `\n\n${getRetrievalInstructions(this.retrievalScope, this.retrievalInstructions, this.retrievalSearch)}` : ""}`];
34124
34183
  if (unobservedContextBlocks) messages.push(`The following content is from OTHER conversations different from the current conversation, they're here for reference, but they're not necessarily your focus:\nSTART_OTHER_CONVERSATIONS_BLOCK\n${unobservedContextBlocks}\nEND_OTHER_CONVERSATIONS_BLOCK`);
34125
34184
  const observationChunks = this.splitObservationContextChunks(optimized);
34126
34185
  if (observationChunks.length > 0) messages.push("<observations>", ...observationChunks);
@@ -36056,6 +36115,7 @@ var observational_memory_exports = /* @__PURE__ */ __exportAll({
36056
36115
  OBSERVATIONAL_MEMORY_DEFAULTS: () => OBSERVATIONAL_MEMORY_DEFAULTS,
36057
36116
  OBSERVATION_CONTEXT_INSTRUCTIONS: () => OBSERVATION_CONTEXT_INSTRUCTIONS,
36058
36117
  OBSERVATION_CONTEXT_PROMPT: () => OBSERVATION_CONTEXT_PROMPT,
36118
+ OBSERVATION_CONTEXT_PROMPT_THREAD: () => OBSERVATION_CONTEXT_PROMPT_THREAD,
36059
36119
  OBSERVATION_CONTINUATION_HINT: () => OBSERVATION_CONTINUATION_HINT,
36060
36120
  OBSERVER_SYSTEM_PROMPT: () => OBSERVER_SYSTEM_PROMPT,
36061
36121
  ObservationalMemory: () => ObservationalMemory,
@@ -36073,6 +36133,7 @@ var observational_memory_exports = /* @__PURE__ */ __exportAll({
36073
36133
  deriveObservationGroupProvenance: () => deriveObservationGroupProvenance,
36074
36134
  extractCurrentTask: () => extractCurrentTask,
36075
36135
  formatMessagesForObserver: () => formatMessagesForObserver,
36136
+ getObservationContextPrompt: () => getObservationContextPrompt,
36076
36137
  getObservationsAsOf: () => getObservationsAsOf,
36077
36138
  hasCurrentTaskSection: () => hasCurrentTaskSection,
36078
36139
  injectAnchorIds: () => injectAnchorIds,
@@ -36096,7 +36157,6 @@ var working_memory_state_exports = /* @__PURE__ */ __exportAll({
36096
36157
  });
36097
36158
  const WORKING_MEMORY_START_TAG = "<working_memory>";
36098
36159
  const WORKING_MEMORY_END_TAG = "</working_memory>";
36099
- const LEGACY_SYSTEM_REMINDER_METADATA_KEY = "dynamicAgentsMdReminder";
36100
36160
  function isRecord(value) {
36101
36161
  return typeof value === "object" && value !== null;
36102
36162
  }
@@ -36127,15 +36187,6 @@ function extractWorkingMemoryContent(text) {
36127
36187
  if (end === -1) return null;
36128
36188
  return text.substring(contentStart, end);
36129
36189
  }
36130
- function isSystemReminderMessage(message) {
36131
- if (!isRecord(message.content)) return false;
36132
- const metadata = message.content.metadata;
36133
- if (message.role === "signal") return isRecord(metadata) && isRecord(metadata.signal) && (metadata.signal.type === "system-reminder" || metadata.signal.type === "reactive");
36134
- if (message.role !== "user") return false;
36135
- if (isRecord(metadata) && (isRecord(metadata.systemReminder) || LEGACY_SYSTEM_REMINDER_METADATA_KEY in metadata)) return true;
36136
- const firstTextPart = message.content.parts.find((part) => part.type === "text");
36137
- return typeof firstTextPart?.text === "string" && firstTextPart.text.startsWith("<system-reminder");
36138
- }
36139
36190
  function isRecallSignalType(type) {
36140
36191
  return type === "user" || type === "state" || type === "reactive" || type === "notification" || type === "user-message" || type === "system-reminder";
36141
36192
  }
@@ -49156,4 +49207,4 @@ const agentBuilderWorkflows = {
49156
49207
  //#endregion
49157
49208
  exports.agentBuilderWorkflows = agentBuilderWorkflows;
49158
49209
 
49159
- //# sourceMappingURL=dist-1bGgLbxg.cjs.map
49210
+ //# sourceMappingURL=dist-pojdOe9l.cjs.map