@agent-inspect/mcp-server 6.13.0 → 6.14.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-TLE64A3T.mjs → chunk-C6EBJS57.mjs} +57 -2
- package/dist/chunk-C6EBJS57.mjs.map +1 -0
- package/dist/cli.cjs +55 -0
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +55 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
- package/dist/chunk-TLE64A3T.mjs.map +0 -1
|
@@ -2096,6 +2096,7 @@ function buildEvidenceManifest(parts) {
|
|
|
2096
2096
|
verificationPolicy: parts.verificationPolicy ?? parts.redactionProfile
|
|
2097
2097
|
},
|
|
2098
2098
|
assessment,
|
|
2099
|
+
...parts.semantics !== void 0 ? { semantics: { ...parts.semantics } } : {},
|
|
2099
2100
|
files: buildEvidenceFileEntries(parts.files)
|
|
2100
2101
|
};
|
|
2101
2102
|
}
|
|
@@ -2849,6 +2850,38 @@ function summarizeSemanticParity(events) {
|
|
|
2849
2850
|
diagnostics: projection.diagnostics
|
|
2850
2851
|
};
|
|
2851
2852
|
}
|
|
2853
|
+
function buildTraceFacts(events) {
|
|
2854
|
+
const projection = projectLogicalEvents(events);
|
|
2855
|
+
const toolsByName = /* @__PURE__ */ new Map();
|
|
2856
|
+
const llmEvents = [];
|
|
2857
|
+
const outcomeEvents = [];
|
|
2858
|
+
for (const event of projection.logicalEvents) {
|
|
2859
|
+
if (event.kind === "TOOL" && event.status !== "running") {
|
|
2860
|
+
const name = resolveCanonicalToolName(event);
|
|
2861
|
+
const list = toolsByName.get(name) ?? [];
|
|
2862
|
+
list.push(event);
|
|
2863
|
+
toolsByName.set(name, list);
|
|
2864
|
+
}
|
|
2865
|
+
if (event.kind === "LLM" && event.status !== "running") {
|
|
2866
|
+
llmEvents.push(event);
|
|
2867
|
+
}
|
|
2868
|
+
if (event.kind === "OUTCOME") {
|
|
2869
|
+
outcomeEvents.push(event);
|
|
2870
|
+
}
|
|
2871
|
+
}
|
|
2872
|
+
for (const [name, list] of [...toolsByName.entries()]) {
|
|
2873
|
+
toolsByName.set(name, Object.freeze([...list]));
|
|
2874
|
+
}
|
|
2875
|
+
return {
|
|
2876
|
+
rawEvents: Object.freeze([...events]),
|
|
2877
|
+
logicalEvents: projection.logicalEvents,
|
|
2878
|
+
diagnostics: projection.diagnostics,
|
|
2879
|
+
toolsByName,
|
|
2880
|
+
llmEvents: Object.freeze(llmEvents),
|
|
2881
|
+
outcomeEvents: Object.freeze(outcomeEvents),
|
|
2882
|
+
summary: summarizeSemanticParity(events)
|
|
2883
|
+
};
|
|
2884
|
+
}
|
|
2852
2885
|
|
|
2853
2886
|
// packages/core/src/checks/index.ts
|
|
2854
2887
|
var SEVERITY_RANK = {
|
|
@@ -6921,6 +6954,11 @@ var FLAGSHIP_TOOLS = [
|
|
|
6921
6954
|
name: "get_adapter_diagnostics",
|
|
6922
6955
|
description: "Bounded adapter/source diagnostics for one run.",
|
|
6923
6956
|
inputSchema: RUN_ID_SCHEMA
|
|
6957
|
+
},
|
|
6958
|
+
{
|
|
6959
|
+
name: "get_trace_facts",
|
|
6960
|
+
description: "Bounded TraceFacts summary for one run (logical projection counts and finished tool names; no raw prompts).",
|
|
6961
|
+
inputSchema: RUN_ID_SCHEMA
|
|
6924
6962
|
}
|
|
6925
6963
|
];
|
|
6926
6964
|
var LEGACY_TOOLS = [
|
|
@@ -7093,6 +7131,23 @@ async function callReadOnlyTool(context, name, args = {}) {
|
|
|
7093
7131
|
context
|
|
7094
7132
|
);
|
|
7095
7133
|
}
|
|
7134
|
+
if (name === "get_trace_facts") {
|
|
7135
|
+
const runId = String(args.runId ?? "");
|
|
7136
|
+
const { read } = await openRunTrace(context, runId);
|
|
7137
|
+
const facts = buildTraceFacts(read.events);
|
|
7138
|
+
return deliverMcpPayload(
|
|
7139
|
+
{
|
|
7140
|
+
runId,
|
|
7141
|
+
projectionVersion: "logical-lifecycle-0.1",
|
|
7142
|
+
summary: facts.summary,
|
|
7143
|
+
toolNames: [...facts.toolsByName.keys()].sort((a, b) => a.localeCompare(b)),
|
|
7144
|
+
llmCount: facts.llmEvents.length,
|
|
7145
|
+
outcomeCount: facts.outcomeEvents.length,
|
|
7146
|
+
note: "Bounded TraceFacts summary only; raw events and prompts are not included."
|
|
7147
|
+
},
|
|
7148
|
+
context
|
|
7149
|
+
);
|
|
7150
|
+
}
|
|
7096
7151
|
if (name === "get_first_causal_failure") {
|
|
7097
7152
|
const runId = String(args.runId ?? "");
|
|
7098
7153
|
const { read } = await openRunTrace(context, runId);
|
|
@@ -7531,5 +7586,5 @@ async function runReadOnlyMcpServer(options = {}) {
|
|
|
7531
7586
|
}
|
|
7532
7587
|
|
|
7533
7588
|
export { MCP_MAX_REQUEST_BYTES, MCP_PROTOCOL_VERSION, READ_ONLY_TOOLS, callReadOnlyTool, createMcpServerContext, handleMcpProtocolLine, runReadOnlyMcpServer };
|
|
7534
|
-
//# sourceMappingURL=chunk-
|
|
7535
|
-
//# sourceMappingURL=chunk-
|
|
7589
|
+
//# sourceMappingURL=chunk-C6EBJS57.mjs.map
|
|
7590
|
+
//# sourceMappingURL=chunk-C6EBJS57.mjs.map
|