@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
|
@@ -2763,11 +2763,16 @@ function projectLogicalEvents(events) {
|
|
|
2763
2763
|
}
|
|
2764
2764
|
if (!remapped) {
|
|
2765
2765
|
if (!logicalById.has(originalParentId) && !logicalByRawId.has(originalParentId)) {
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2766
|
+
const mapping = event.attributes?.parentMapping;
|
|
2767
|
+
const unresolved = mapping === "unresolved" || event.attributes?.parentUnresolved === true || event.attributes?.unresolvedParent === true || // LangGraph/framework scaffolding sentinel labels are not event ids.
|
|
2768
|
+
/^LangGraph$/i.test(originalParentId) || originalParentId.startsWith("unresolved:");
|
|
2769
|
+
if (!unresolved) {
|
|
2770
|
+
diagnostics.push({
|
|
2771
|
+
code: "AI_LOGICAL_PARENT_UNRESOLVED",
|
|
2772
|
+
message: `Parent ${originalParentId} unresolved for ${event.eventId}.`,
|
|
2773
|
+
eventIds: [event.eventId]
|
|
2774
|
+
});
|
|
2775
|
+
}
|
|
2771
2776
|
}
|
|
2772
2777
|
normalized.push(event);
|
|
2773
2778
|
continue;
|
|
@@ -2798,6 +2803,52 @@ function projectLogicalEvents(events) {
|
|
|
2798
2803
|
diagnostics: Object.freeze(diagnostics)
|
|
2799
2804
|
};
|
|
2800
2805
|
}
|
|
2806
|
+
function resolveCanonicalToolName(event) {
|
|
2807
|
+
const attrs = event.attributes;
|
|
2808
|
+
const direct = pickString(attrs, ["toolName", "tool"]);
|
|
2809
|
+
if (direct) return direct;
|
|
2810
|
+
const metadata = attrs?.metadata;
|
|
2811
|
+
if (isRecord6(metadata)) {
|
|
2812
|
+
const nested = pickString(metadata, ["toolName", "tool"]);
|
|
2813
|
+
if (nested) return nested;
|
|
2814
|
+
}
|
|
2815
|
+
for (const prefix of ["tool:", "function:", "mcp-tools:"]) {
|
|
2816
|
+
if (event.name.startsWith(prefix)) return event.name.slice(prefix.length);
|
|
2817
|
+
}
|
|
2818
|
+
return event.name;
|
|
2819
|
+
}
|
|
2820
|
+
function pickString(record, keys) {
|
|
2821
|
+
if (!record) return void 0;
|
|
2822
|
+
for (const key of keys) {
|
|
2823
|
+
const value = record[key];
|
|
2824
|
+
if (typeof value === "string" && value.trim() !== "") return value.trim();
|
|
2825
|
+
}
|
|
2826
|
+
return void 0;
|
|
2827
|
+
}
|
|
2828
|
+
|
|
2829
|
+
// packages/core/src/checks/trace-facts.ts
|
|
2830
|
+
function summarizeSemanticParity(events) {
|
|
2831
|
+
const projection = projectLogicalEvents(events);
|
|
2832
|
+
const logical = projection.logicalEvents;
|
|
2833
|
+
const finishedTools = logical.filter(
|
|
2834
|
+
(event) => event.kind === "TOOL" && event.status !== "running"
|
|
2835
|
+
);
|
|
2836
|
+
const finishedToolNames = Object.freeze(
|
|
2837
|
+
finishedTools.map((event) => resolveCanonicalToolName(event)).sort((a, b) => a.localeCompare(b))
|
|
2838
|
+
);
|
|
2839
|
+
return {
|
|
2840
|
+
rawEventCount: events.length,
|
|
2841
|
+
logicalEventCount: logical.length,
|
|
2842
|
+
runningLogicalCount: logical.filter((event) => event.status === "running").length,
|
|
2843
|
+
finishedToolNames,
|
|
2844
|
+
finishedToolCount: finishedTools.length,
|
|
2845
|
+
pairedCount: logical.filter((event) => event.projection.paired).length,
|
|
2846
|
+
parentRemapCount: projection.diagnostics.filter(
|
|
2847
|
+
(item) => item.code === "AI_LOGICAL_PARENT_REMAPPED"
|
|
2848
|
+
).length,
|
|
2849
|
+
diagnostics: projection.diagnostics
|
|
2850
|
+
};
|
|
2851
|
+
}
|
|
2801
2852
|
|
|
2802
2853
|
// packages/core/src/checks/index.ts
|
|
2803
2854
|
var SEVERITY_RANK = {
|
|
@@ -7036,7 +7087,8 @@ async function callReadOnlyTool(context, name, args = {}) {
|
|
|
7036
7087
|
sourceFile: path14.basename(meta.filePath),
|
|
7037
7088
|
warnings: read.warnings.slice(0, 20),
|
|
7038
7089
|
unsupportedFields: read.unsupportedFields.slice(0, 20),
|
|
7039
|
-
|
|
7090
|
+
semanticParity: summarizeSemanticParity(read.events),
|
|
7091
|
+
note: "Bounded local diagnostics only; not a network health check. semanticParity uses logicalEvents projection."
|
|
7040
7092
|
},
|
|
7041
7093
|
context
|
|
7042
7094
|
);
|
|
@@ -7479,5 +7531,5 @@ async function runReadOnlyMcpServer(options = {}) {
|
|
|
7479
7531
|
}
|
|
7480
7532
|
|
|
7481
7533
|
export { MCP_MAX_REQUEST_BYTES, MCP_PROTOCOL_VERSION, READ_ONLY_TOOLS, callReadOnlyTool, createMcpServerContext, handleMcpProtocolLine, runReadOnlyMcpServer };
|
|
7482
|
-
//# sourceMappingURL=chunk-
|
|
7483
|
-
//# sourceMappingURL=chunk-
|
|
7534
|
+
//# sourceMappingURL=chunk-TLE64A3T.mjs.map
|
|
7535
|
+
//# sourceMappingURL=chunk-TLE64A3T.mjs.map
|