@mastra/server 1.84.0-alpha.1 → 1.84.0-alpha.2

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 (42) hide show
  1. package/dist/{agent-builder-DLFPC1xm.cjs → agent-builder-CMAT5xu8.cjs} +2 -2
  2. package/dist/{agent-builder-DLFPC1xm.cjs.map → agent-builder-CMAT5xu8.cjs.map} +1 -1
  3. package/dist/{agent-builder-CiOghrTT.js → agent-builder-DYu--54x.js} +2 -2
  4. package/dist/{agent-builder-CiOghrTT.js.map → agent-builder-DYu--54x.js.map} +1 -1
  5. package/dist/{api-schema-manifest-ClDNVUxK.cjs → api-schema-manifest-DyOyIk-C.cjs} +2 -2
  6. package/dist/{api-schema-manifest-ClDNVUxK.cjs.map → api-schema-manifest-DyOyIk-C.cjs.map} +1 -1
  7. package/dist/{api-schema-manifest-BKeWpPyw.js → api-schema-manifest-MtnJy994.js} +2 -2
  8. package/dist/{api-schema-manifest-BKeWpPyw.js.map → api-schema-manifest-MtnJy994.js.map} +1 -1
  9. package/dist/{catalogue-GycxwkWT.js → catalogue-BdR5h6fv.js} +3 -3
  10. package/dist/{catalogue-GycxwkWT.js.map → catalogue-BdR5h6fv.js.map} +1 -1
  11. package/dist/{catalogue-B5aCtg9L.cjs → catalogue-oK_QSBRh.cjs} +3 -3
  12. package/dist/{catalogue-B5aCtg9L.cjs.map → catalogue-oK_QSBRh.cjs.map} +1 -1
  13. package/dist/{dist-D50lVcGc.js → dist-4o3EGZcG.js} +20 -7
  14. package/dist/{dist-D50lVcGc.js.map → dist-4o3EGZcG.js.map} +1 -1
  15. package/dist/dist-CecsVJCw.js +1 -0
  16. package/dist/{dist-DNQOx6xv.cjs → dist-DXhZqfZZ.cjs} +1 -1
  17. package/dist/{dist-CgezUz3C.cjs → dist-p7VXVmE_.cjs} +20 -7
  18. package/dist/{dist-CgezUz3C.cjs.map → dist-p7VXVmE_.cjs.map} +1 -1
  19. package/dist/docs/SKILL.md +1 -1
  20. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  21. package/dist/{probe-image-size-DVVxU5Q8.cjs → probe-image-size-DmttstPc.cjs} +2 -2
  22. package/dist/{probe-image-size-DVVxU5Q8.cjs.map → probe-image-size-DmttstPc.cjs.map} +1 -1
  23. package/dist/{probe-image-size-BFwgURuP.js → probe-image-size-IIGl_zRY.js} +2 -2
  24. package/dist/{probe-image-size-BFwgURuP.js.map → probe-image-size-IIGl_zRY.js.map} +1 -1
  25. package/dist/{routes-B8RVC_It.cjs → routes-6lsEmZwB.cjs} +3 -3
  26. package/dist/{routes-B8RVC_It.cjs.map → routes-6lsEmZwB.cjs.map} +1 -1
  27. package/dist/{routes-CuiId75P.js → routes-DAnFdADa.js} +3 -3
  28. package/dist/{routes-CuiId75P.js.map → routes-DAnFdADa.js.map} +1 -1
  29. package/dist/server/handlers/agent-builder.cjs +1 -1
  30. package/dist/server/handlers/agent-builder.js +1 -1
  31. package/dist/server/handlers/system.cjs +1 -1
  32. package/dist/server/handlers/system.js +1 -1
  33. package/dist/server/handlers.cjs +1 -1
  34. package/dist/server/handlers.js +1 -1
  35. package/dist/server/server-adapter/index.cjs +2 -2
  36. package/dist/server/server-adapter/index.js +2 -2
  37. package/dist/{server-adapter-B27F74-Q.cjs → server-adapter-CbxRgDBh.cjs} +2 -2
  38. package/dist/{server-adapter-B27F74-Q.cjs.map → server-adapter-CbxRgDBh.cjs.map} +1 -1
  39. package/dist/{server-adapter-DlhCV-sv.js → server-adapter-Dgy-iIqA.js} +2 -2
  40. package/dist/{server-adapter-DlhCV-sv.js.map → server-adapter-Dgy-iIqA.js.map} +1 -1
  41. package/package.json +3 -3
  42. package/dist/dist-mbbahDg1.js +0 -1
@@ -0,0 +1 @@
1
+ export { n as openai } from "./dist-4o3EGZcG.js";
@@ -1,3 +1,3 @@
1
1
  require("./rolldown-runtime-10nMEhjP.cjs");
2
- const require_dist = require("./dist-CgezUz3C.cjs");
2
+ const require_dist = require("./dist-p7VXVmE_.cjs");
3
3
  exports.openai = require_dist.openai;
@@ -8654,7 +8654,7 @@ function splitLines(text) {
8654
8654
  else result.push(result.pop().slice(0, -1));
8655
8655
  return result;
8656
8656
  }
8657
- // ../memory/dist/src-CshY_uyn.js
8657
+ // ../memory/dist/src-DGBUSKXy.js
8658
8658
  var __defProp$3 = Object.defineProperty;
8659
8659
  var __exportAll = (all, no_symbols) => {
8660
8660
  let target = {};
@@ -36583,6 +36583,19 @@ function buildEstimateKey(kind, text) {
36583
36583
  function resolveEstimatorId() {
36584
36584
  return "tokenx";
36585
36585
  }
36586
+ const ATTACHMENT_CONTENT_PART_TYPES = /* @__PURE__ */ new Set([
36587
+ "image",
36588
+ "image-data",
36589
+ "media",
36590
+ "audio",
36591
+ "file-data"
36592
+ ]);
36593
+ /** Mirrors the parts countMultimodalToolResultContent counts as attachments. */
36594
+ function isAttachmentContentPart(item) {
36595
+ if (!item || typeof item !== "object") return false;
36596
+ const contentPart = item;
36597
+ return ATTACHMENT_CONTENT_PART_TYPES.has(contentPart.type) && typeof contentPart.data === "string";
36598
+ }
36586
36599
  function isTokenEstimateEntry(value) {
36587
36600
  if (!value || typeof value !== "object") return false;
36588
36601
  const entry = value;
@@ -36772,7 +36785,7 @@ async function resolveImageDimensionsAsync(part) {
36772
36785
  const url = resolveHttpAssetUrl(getObjectValue(part, "image") ?? getObjectValue(part, "data"));
36773
36786
  if (!url) return existing;
36774
36787
  try {
36775
- const probeImageSize = (await Promise.resolve().then(() => /* @__PURE__ */ require_rolldown_runtime.__toESM(require("./probe-image-size-DVVxU5Q8.cjs").default, 1))).default;
36788
+ const probeImageSize = (await Promise.resolve().then(() => /* @__PURE__ */ require_rolldown_runtime.__toESM(require("./probe-image-size-DmttstPc.cjs").default, 1))).default;
36776
36789
  const probed = await probeImageSize(url, {
36777
36790
  open_timeout: REMOTE_IMAGE_PROBE_TIMEOUT_MS,
36778
36791
  response_timeout: REMOTE_IMAGE_PROBE_TIMEOUT_MS,
@@ -37375,12 +37388,12 @@ var TokenCounter = class TokenCounter {
37375
37388
  }
37376
37389
  countMultimodalToolResultContent(part, toolResult) {
37377
37390
  if (!toolResult || typeof toolResult !== "object") return;
37391
+ const output = toolResult;
37392
+ const content = output.type === "content" && Array.isArray(output.value) ? output.value : output.content;
37393
+ if (!Array.isArray(content) || !content.some(isAttachmentContentPart)) return;
37378
37394
  const resultKey = buildEstimateKey("tool-result-multimodal-content-source", JSON.stringify(toolResult));
37379
37395
  const cached = this.multimodalToolResultCounts.get(part);
37380
37396
  if (cached?.resultKey === resultKey) return cached.tokens;
37381
- const output = toolResult;
37382
- const content = output.type === "content" && Array.isArray(output.value) ? output.value : output.content;
37383
- if (!Array.isArray(content)) return;
37384
37397
  let hasAttachment = false;
37385
37398
  let tokens = 0;
37386
37399
  const cacheParts = [];
@@ -52013,7 +52026,7 @@ const createModelInstance = async (provider, modelId, version = "v2") => {
52013
52026
  try {
52014
52027
  const providerFn = version === `v1` ? { v1: {
52015
52028
  openai: async () => {
52016
- const { openai } = await Promise.resolve().then(() => require("./dist-DNQOx6xv.cjs"));
52029
+ const { openai } = await Promise.resolve().then(() => require("./dist-DXhZqfZZ.cjs"));
52017
52030
  return openai(modelId);
52018
52031
  },
52019
52032
  anthropic: async () => {
@@ -59843,4 +59856,4 @@ Object.defineProperty(exports, "require_webp", {
59843
59856
  }
59844
59857
  });
59845
59858
 
59846
- //# sourceMappingURL=dist-CgezUz3C.cjs.map
59859
+ //# sourceMappingURL=dist-p7VXVmE_.cjs.map