@mastra/server 1.83.0-alpha.5 → 1.83.0-alpha.6
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/{agent-builder-C4H6DCxX.cjs → agent-builder-BP3doUBF.cjs} +2 -2
- package/dist/{agent-builder-C4H6DCxX.cjs.map → agent-builder-BP3doUBF.cjs.map} +1 -1
- package/dist/{agent-builder-CM3ahyKi.js → agent-builder-tQdzjW0P.js} +2 -2
- package/dist/{agent-builder-CM3ahyKi.js.map → agent-builder-tQdzjW0P.js.map} +1 -1
- package/dist/{api-schema-manifest-BxJovXGA.cjs → api-schema-manifest-Bsbh_Rp6.cjs} +2 -2
- package/dist/{api-schema-manifest-BxJovXGA.cjs.map → api-schema-manifest-Bsbh_Rp6.cjs.map} +1 -1
- package/dist/{api-schema-manifest-DyPtNiCm.js → api-schema-manifest-BuUPZy-0.js} +2 -2
- package/dist/{api-schema-manifest-DyPtNiCm.js.map → api-schema-manifest-BuUPZy-0.js.map} +1 -1
- package/dist/{dist-cCQ5-Jqn.js → dist-C3cKdDos.js} +30 -5
- package/dist/{dist-cCQ5-Jqn.js.map → dist-C3cKdDos.js.map} +1 -1
- package/dist/dist-CDQ0dDmK.js +1 -0
- package/dist/{dist-CeTjOkVU.cjs → dist-DlH7rr5l.cjs} +1 -1
- package/dist/{dist-ChFEVV0z.cjs → dist-bVYV7beH.cjs} +30 -5
- package/dist/{dist-ChFEVV0z.cjs.map → dist-bVYV7beH.cjs.map} +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/{memory-JzgWJevA.js → memory-B_qwCpu5.js} +89 -39
- package/dist/memory-B_qwCpu5.js.map +1 -0
- package/dist/{memory-DIos0BE-.cjs → memory-BfabRYCo.cjs} +89 -39
- package/dist/memory-BfabRYCo.cjs.map +1 -0
- package/dist/{probe-image-size-BfNwxl51.cjs → probe-image-size-0dhxcl8e.cjs} +2 -2
- package/dist/{probe-image-size-BfNwxl51.cjs.map → probe-image-size-0dhxcl8e.cjs.map} +1 -1
- package/dist/{probe-image-size-DLmoo3Jh.js → probe-image-size-fFwPOWWg.js} +2 -2
- package/dist/{probe-image-size-DLmoo3Jh.js.map → probe-image-size-fFwPOWWg.js.map} +1 -1
- package/dist/route-builder-BKEzjw_M.js.map +1 -1
- package/dist/route-builder-DHqDrSSy.cjs.map +1 -1
- package/dist/{routes-DTAeTr8M.cjs → routes-B0HqAMAk.cjs} +3 -3
- package/dist/{routes-DTAeTr8M.cjs.map → routes-B0HqAMAk.cjs.map} +1 -1
- package/dist/{routes-P_uCi0AL.js → routes-u0J9BsY1.js} +3 -3
- package/dist/{routes-P_uCi0AL.js.map → routes-u0J9BsY1.js.map} +1 -1
- package/dist/server/handlers/agent-builder.cjs +1 -1
- package/dist/server/handlers/agent-builder.js +1 -1
- package/dist/server/handlers/memory.cjs +1 -1
- package/dist/server/handlers/memory.d.ts.map +1 -1
- package/dist/server/handlers/memory.js +1 -1
- package/dist/server/handlers/system.cjs +1 -1
- package/dist/server/handlers/system.js +1 -1
- package/dist/server/handlers.cjs +2 -2
- package/dist/server/handlers.js +2 -2
- package/dist/server/server-adapter/api-schema-manifest.d.ts +1 -1
- package/dist/server/server-adapter/index.cjs +1 -1
- package/dist/server/server-adapter/index.js +1 -1
- package/dist/server/server-adapter/openapi-utils.d.ts +1 -1
- package/package.json +4 -4
- package/dist/dist-Dd4aPQrP.js +0 -1
- package/dist/memory-DIos0BE-.cjs.map +0 -1
- package/dist/memory-JzgWJevA.js.map +0 -1
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/_types/@internal_ai-sdk-v4@0.0.95/dist/index.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/_types/@internal_ai-sdk-v5@0.0.95/dist/index.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/_types/@internal_ai-v6@0.0.95/dist/index.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/_types/@standard-schema_spec@1.1.0/dist/index.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/_types/@types_json-schema@7.0.15/index.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/index.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/null-to-undefined.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/provider-compats/anthropic.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/provider-compats/deepseek.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/provider-compats/google.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/provider-compats/meta.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/provider-compats/openai-reasoning.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/provider-compats/openai.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/schema-compatibility-v3.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/schema-compatibility-v4.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/schema-compatibility.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/schema.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/schema.types.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/standard-schema/standard-schema.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/standard-schema/standard-schema.types.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/standard-schema-compat.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/types.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/utils.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/dist/zod-to-json.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat@1.3.17 → @mastra_schema-compat@1.3.18-alpha.0}/package.json +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { n as openai } from "./dist-C3cKdDos.js";
|
|
@@ -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-
|
|
8657
|
+
// ../memory/dist/src-KIKQ7ztT.js
|
|
8658
8658
|
var __defProp$3 = Object.defineProperty;
|
|
8659
8659
|
var __exportAll = (all, no_symbols) => {
|
|
8660
8660
|
let target = {};
|
|
@@ -36771,7 +36771,7 @@ async function resolveImageDimensionsAsync(part) {
|
|
|
36771
36771
|
const url = resolveHttpAssetUrl(getObjectValue(part, "image") ?? getObjectValue(part, "data"));
|
|
36772
36772
|
if (!url) return existing;
|
|
36773
36773
|
try {
|
|
36774
|
-
const probeImageSize = (await Promise.resolve().then(() => /* @__PURE__ */ require_rolldown_runtime.__toESM(require("./probe-image-size-
|
|
36774
|
+
const probeImageSize = (await Promise.resolve().then(() => /* @__PURE__ */ require_rolldown_runtime.__toESM(require("./probe-image-size-0dhxcl8e.cjs").default, 1))).default;
|
|
36775
36775
|
const probed = await probeImageSize(url, {
|
|
36776
36776
|
open_timeout: REMOTE_IMAGE_PROBE_TIMEOUT_MS,
|
|
36777
36777
|
response_timeout: REMOTE_IMAGE_PROBE_TIMEOUT_MS,
|
|
@@ -38709,6 +38709,31 @@ function wrapInObservationGroup(observations, range, id = generateAnchorId(), _s
|
|
|
38709
38709
|
const content = observations.trim();
|
|
38710
38710
|
return `<observation-group id="${id}" range="${range}"${kind ? ` kind="${kind}"` : ""}>\n${content}\n</observation-group>`;
|
|
38711
38711
|
}
|
|
38712
|
+
function isObservationGroupOpeningLine(line) {
|
|
38713
|
+
const trimmed = line.trimStart();
|
|
38714
|
+
return trimmed.startsWith(OBSERVATION_GROUP_OPEN) && /\s/.test(trimmed[18] ?? "");
|
|
38715
|
+
}
|
|
38716
|
+
/**
|
|
38717
|
+
* Moves a cut of `cut` leading lines so it never splits an observation group. A cut inside a group
|
|
38718
|
+
* moves back to just before the group's opening tag (and the blank lines that separate it from the
|
|
38719
|
+
* previous group). When nothing precedes that group, the cut moves forward to just after its closing
|
|
38720
|
+
* tag instead, so the whole group is cut. A cut outside every group, and observations without group
|
|
38721
|
+
* tags, are returned unchanged.
|
|
38722
|
+
*/
|
|
38723
|
+
function alignLineCutToObservationGroups(lines, cut) {
|
|
38724
|
+
let openingLine = -1;
|
|
38725
|
+
for (let i = 0; i < cut; i++) {
|
|
38726
|
+
const line = lines[i];
|
|
38727
|
+
if (isObservationGroupOpeningLine(line)) openingLine = i;
|
|
38728
|
+
else if (line.trim() === OBSERVATION_GROUP_CLOSE) openingLine = -1;
|
|
38729
|
+
}
|
|
38730
|
+
if (openingLine === -1) return cut;
|
|
38731
|
+
let before = openingLine;
|
|
38732
|
+
while (before > 0 && lines[before - 1].trim() === "") before--;
|
|
38733
|
+
if (before > 0) return before;
|
|
38734
|
+
for (let i = cut; i < lines.length; i++) if (lines[i].trim() === OBSERVATION_GROUP_CLOSE) return i + 1;
|
|
38735
|
+
return cut;
|
|
38736
|
+
}
|
|
38712
38737
|
function parseObservationGroups(observations) {
|
|
38713
38738
|
if (!observations) return [];
|
|
38714
38739
|
const groups = [];
|
|
@@ -44504,7 +44529,7 @@ var ReflectorRunner = class {
|
|
|
44504
44529
|
const totalLines = allLines.length;
|
|
44505
44530
|
const avgTokensPerLine = totalLines > 0 ? observationTokens / totalLines : 0;
|
|
44506
44531
|
const activationPointTokens = reflectThreshold * bufferActivation;
|
|
44507
|
-
const linesToReflect = avgTokensPerLine > 0 ? Math.min(Math.floor(activationPointTokens / avgTokensPerLine), totalLines) : totalLines;
|
|
44532
|
+
const linesToReflect = alignLineCutToObservationGroups(allLines, avgTokensPerLine > 0 ? Math.min(Math.floor(activationPointTokens / avgTokensPerLine), totalLines) : totalLines);
|
|
44508
44533
|
const hookContext = {
|
|
44509
44534
|
threadId: currentRecord.threadId ?? void 0,
|
|
44510
44535
|
resourceId: currentRecord.resourceId ?? void 0,
|
|
@@ -51984,7 +52009,7 @@ const createModelInstance = async (provider, modelId, version = "v2") => {
|
|
|
51984
52009
|
try {
|
|
51985
52010
|
const providerFn = version === `v1` ? { v1: {
|
|
51986
52011
|
openai: async () => {
|
|
51987
|
-
const { openai } = await Promise.resolve().then(() => require("./dist-
|
|
52012
|
+
const { openai } = await Promise.resolve().then(() => require("./dist-DlH7rr5l.cjs"));
|
|
51988
52013
|
return openai(modelId);
|
|
51989
52014
|
},
|
|
51990
52015
|
anthropic: async () => {
|
|
@@ -59814,4 +59839,4 @@ Object.defineProperty(exports, "require_webp", {
|
|
|
59814
59839
|
}
|
|
59815
59840
|
});
|
|
59816
59841
|
|
|
59817
|
-
//# sourceMappingURL=dist-
|
|
59842
|
+
//# sourceMappingURL=dist-bVYV7beH.cjs.map
|