@mastra/observability 1.24.2-alpha.0 → 1.24.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.
- package/dist/docs/SKILL.md +2 -2
- package/dist/docs/assets/SOURCE_MAP.json +38 -38
- package/dist/docs/references/docs-observability-integrations-exporters-mastra-storage.md +1 -1
- package/dist/docs/references/docs-observability-overview.md +2 -2
- package/dist/docs/references/docs-studio-observability.md +2 -2
- package/dist/docs/references/integrations-observability-langfuse.md +1 -1
- package/dist/exporters/test.d.ts.map +1 -1
- package/dist/index.cjs +9 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/model-tracing.d.ts.map +1 -1
- package/package.json +6 -6
- /package/dist/docs/references/{docs-mastra-platform-observability.md → docs-mastra-platform-observability-overview.md} +0 -0
package/dist/index.js
CHANGED
|
@@ -2417,7 +2417,9 @@ function summarizePart(part) {
|
|
|
2417
2417
|
const toolResult = part;
|
|
2418
2418
|
const mastraMeta = toolResult.providerMetadata?.mastra ?? toolResult.providerOptions?.mastra;
|
|
2419
2419
|
const toolName = formatPreviewLabel(part.toolName, "unknown");
|
|
2420
|
-
if (mastraMeta?.modelOutput
|
|
2420
|
+
if (mastraMeta?.modelOutput != null) return formatToolResultPreviewValue(mastraMeta.modelOutput);
|
|
2421
|
+
const output = part.output;
|
|
2422
|
+
if (mastraMeta?.workflowTool === true && output !== void 0) return formatToolResultPreviewValue(output);
|
|
2421
2423
|
return `[tool-result: ${toolName}]`;
|
|
2422
2424
|
}
|
|
2423
2425
|
default: return `[${part.type}]`;
|
|
@@ -10544,6 +10546,8 @@ var TestExporter = class extends BaseExporter {
|
|
|
10544
10546
|
const prefixedUuidRegex = /^([a-z_]+)_([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/i;
|
|
10545
10547
|
const embeddedPrefixedUuidTest = /([a-z_]+)_([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i;
|
|
10546
10548
|
const embeddedPrefixedUuidRegex = /([a-z_]+)_([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/gi;
|
|
10549
|
+
const embeddedBareUuidTest = /(?<![0-9a-z_-])[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?![0-9a-z_-])/i;
|
|
10550
|
+
const embeddedBareUuidRegex = /(?<![0-9a-z_-])[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?![0-9a-z_-])/gi;
|
|
10547
10551
|
const normalizeUuid = (uuid, key) => {
|
|
10548
10552
|
if (!uuidMapsByKey.has(key)) {
|
|
10549
10553
|
uuidMapsByKey.set(key, /* @__PURE__ */ new Map());
|
|
@@ -10572,9 +10576,12 @@ var TestExporter = class extends BaseExporter {
|
|
|
10572
10576
|
const uuid = prefixMatch[2];
|
|
10573
10577
|
return `${prefix}_${normalizeUuid(uuid, prefix)}`;
|
|
10574
10578
|
}
|
|
10575
|
-
|
|
10579
|
+
let embedded = value;
|
|
10580
|
+
if (embeddedPrefixedUuidTest.test(embedded)) embedded = embedded.replace(embeddedPrefixedUuidRegex, (_match, prefix, uuid) => {
|
|
10576
10581
|
return `${prefix}_${normalizeUuid(uuid, prefix)}`;
|
|
10577
10582
|
});
|
|
10583
|
+
if (embeddedBareUuidTest.test(embedded)) embedded = embedded.replace(embeddedBareUuidRegex, (uuid) => normalizeUuid(uuid, "uuid"));
|
|
10584
|
+
if (embedded !== value) return embedded;
|
|
10578
10585
|
}
|
|
10579
10586
|
if (Array.isArray(value)) return value.map((v) => normalizeValue(v, key));
|
|
10580
10587
|
if (value && typeof value === "object") {
|