@agent-inspect/mcp-server 6.12.2 → 6.13.0
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/{chunk-J72IWHQK.mjs → chunk-TLE64A3T.mjs} +60 -8
- package/dist/chunk-TLE64A3T.mjs.map +1 -0
- package/dist/cli.cjs +58 -6
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +58 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
- package/dist/chunk-J72IWHQK.mjs.map +0 -1
package/dist/cli.cjs
CHANGED
|
@@ -2773,11 +2773,16 @@ function projectLogicalEvents(events) {
|
|
|
2773
2773
|
}
|
|
2774
2774
|
if (!remapped) {
|
|
2775
2775
|
if (!logicalById.has(originalParentId) && !logicalByRawId.has(originalParentId)) {
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2776
|
+
const mapping = event.attributes?.parentMapping;
|
|
2777
|
+
const unresolved = mapping === "unresolved" || event.attributes?.parentUnresolved === true || event.attributes?.unresolvedParent === true || // LangGraph/framework scaffolding sentinel labels are not event ids.
|
|
2778
|
+
/^LangGraph$/i.test(originalParentId) || originalParentId.startsWith("unresolved:");
|
|
2779
|
+
if (!unresolved) {
|
|
2780
|
+
diagnostics.push({
|
|
2781
|
+
code: "AI_LOGICAL_PARENT_UNRESOLVED",
|
|
2782
|
+
message: `Parent ${originalParentId} unresolved for ${event.eventId}.`,
|
|
2783
|
+
eventIds: [event.eventId]
|
|
2784
|
+
});
|
|
2785
|
+
}
|
|
2781
2786
|
}
|
|
2782
2787
|
normalized.push(event);
|
|
2783
2788
|
continue;
|
|
@@ -2808,6 +2813,52 @@ function projectLogicalEvents(events) {
|
|
|
2808
2813
|
diagnostics: Object.freeze(diagnostics)
|
|
2809
2814
|
};
|
|
2810
2815
|
}
|
|
2816
|
+
function resolveCanonicalToolName(event) {
|
|
2817
|
+
const attrs = event.attributes;
|
|
2818
|
+
const direct = pickString(attrs, ["toolName", "tool"]);
|
|
2819
|
+
if (direct) return direct;
|
|
2820
|
+
const metadata = attrs?.metadata;
|
|
2821
|
+
if (isRecord6(metadata)) {
|
|
2822
|
+
const nested = pickString(metadata, ["toolName", "tool"]);
|
|
2823
|
+
if (nested) return nested;
|
|
2824
|
+
}
|
|
2825
|
+
for (const prefix of ["tool:", "function:", "mcp-tools:"]) {
|
|
2826
|
+
if (event.name.startsWith(prefix)) return event.name.slice(prefix.length);
|
|
2827
|
+
}
|
|
2828
|
+
return event.name;
|
|
2829
|
+
}
|
|
2830
|
+
function pickString(record, keys) {
|
|
2831
|
+
if (!record) return void 0;
|
|
2832
|
+
for (const key of keys) {
|
|
2833
|
+
const value = record[key];
|
|
2834
|
+
if (typeof value === "string" && value.trim() !== "") return value.trim();
|
|
2835
|
+
}
|
|
2836
|
+
return void 0;
|
|
2837
|
+
}
|
|
2838
|
+
|
|
2839
|
+
// packages/core/src/checks/trace-facts.ts
|
|
2840
|
+
function summarizeSemanticParity(events) {
|
|
2841
|
+
const projection = projectLogicalEvents(events);
|
|
2842
|
+
const logical = projection.logicalEvents;
|
|
2843
|
+
const finishedTools = logical.filter(
|
|
2844
|
+
(event) => event.kind === "TOOL" && event.status !== "running"
|
|
2845
|
+
);
|
|
2846
|
+
const finishedToolNames = Object.freeze(
|
|
2847
|
+
finishedTools.map((event) => resolveCanonicalToolName(event)).sort((a, b) => a.localeCompare(b))
|
|
2848
|
+
);
|
|
2849
|
+
return {
|
|
2850
|
+
rawEventCount: events.length,
|
|
2851
|
+
logicalEventCount: logical.length,
|
|
2852
|
+
runningLogicalCount: logical.filter((event) => event.status === "running").length,
|
|
2853
|
+
finishedToolNames,
|
|
2854
|
+
finishedToolCount: finishedTools.length,
|
|
2855
|
+
pairedCount: logical.filter((event) => event.projection.paired).length,
|
|
2856
|
+
parentRemapCount: projection.diagnostics.filter(
|
|
2857
|
+
(item) => item.code === "AI_LOGICAL_PARENT_REMAPPED"
|
|
2858
|
+
).length,
|
|
2859
|
+
diagnostics: projection.diagnostics
|
|
2860
|
+
};
|
|
2861
|
+
}
|
|
2811
2862
|
|
|
2812
2863
|
// packages/core/src/checks/index.ts
|
|
2813
2864
|
var SEVERITY_RANK = {
|
|
@@ -7046,7 +7097,8 @@ async function callReadOnlyTool(context, name, args = {}) {
|
|
|
7046
7097
|
sourceFile: path14__default.default.basename(meta.filePath),
|
|
7047
7098
|
warnings: read.warnings.slice(0, 20),
|
|
7048
7099
|
unsupportedFields: read.unsupportedFields.slice(0, 20),
|
|
7049
|
-
|
|
7100
|
+
semanticParity: summarizeSemanticParity(read.events),
|
|
7101
|
+
note: "Bounded local diagnostics only; not a network health check. semanticParity uses logicalEvents projection."
|
|
7050
7102
|
},
|
|
7051
7103
|
context
|
|
7052
7104
|
);
|