@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/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { runReadOnlyMcpServer } from './chunk-TLE64A3T.mjs';
1
+ import { runReadOnlyMcpServer } from './chunk-C6EBJS57.mjs';
2
2
  import { readFileSync } from 'fs';
3
3
  import path from 'path';
4
4
  import { fileURLToPath } from 'url';
package/dist/index.cjs CHANGED
@@ -2106,6 +2106,7 @@ function buildEvidenceManifest(parts) {
2106
2106
  verificationPolicy: parts.verificationPolicy ?? parts.redactionProfile
2107
2107
  },
2108
2108
  assessment,
2109
+ ...parts.semantics !== void 0 ? { semantics: { ...parts.semantics } } : {},
2109
2110
  files: buildEvidenceFileEntries(parts.files)
2110
2111
  };
2111
2112
  }
@@ -2859,6 +2860,38 @@ function summarizeSemanticParity(events) {
2859
2860
  diagnostics: projection.diagnostics
2860
2861
  };
2861
2862
  }
2863
+ function buildTraceFacts(events) {
2864
+ const projection = projectLogicalEvents(events);
2865
+ const toolsByName = /* @__PURE__ */ new Map();
2866
+ const llmEvents = [];
2867
+ const outcomeEvents = [];
2868
+ for (const event of projection.logicalEvents) {
2869
+ if (event.kind === "TOOL" && event.status !== "running") {
2870
+ const name = resolveCanonicalToolName(event);
2871
+ const list = toolsByName.get(name) ?? [];
2872
+ list.push(event);
2873
+ toolsByName.set(name, list);
2874
+ }
2875
+ if (event.kind === "LLM" && event.status !== "running") {
2876
+ llmEvents.push(event);
2877
+ }
2878
+ if (event.kind === "OUTCOME") {
2879
+ outcomeEvents.push(event);
2880
+ }
2881
+ }
2882
+ for (const [name, list] of [...toolsByName.entries()]) {
2883
+ toolsByName.set(name, Object.freeze([...list]));
2884
+ }
2885
+ return {
2886
+ rawEvents: Object.freeze([...events]),
2887
+ logicalEvents: projection.logicalEvents,
2888
+ diagnostics: projection.diagnostics,
2889
+ toolsByName,
2890
+ llmEvents: Object.freeze(llmEvents),
2891
+ outcomeEvents: Object.freeze(outcomeEvents),
2892
+ summary: summarizeSemanticParity(events)
2893
+ };
2894
+ }
2862
2895
 
2863
2896
  // packages/core/src/checks/index.ts
2864
2897
  var SEVERITY_RANK = {
@@ -6931,6 +6964,11 @@ var FLAGSHIP_TOOLS = [
6931
6964
  name: "get_adapter_diagnostics",
6932
6965
  description: "Bounded adapter/source diagnostics for one run.",
6933
6966
  inputSchema: RUN_ID_SCHEMA
6967
+ },
6968
+ {
6969
+ name: "get_trace_facts",
6970
+ description: "Bounded TraceFacts summary for one run (logical projection counts and finished tool names; no raw prompts).",
6971
+ inputSchema: RUN_ID_SCHEMA
6934
6972
  }
6935
6973
  ];
6936
6974
  var LEGACY_TOOLS = [
@@ -7103,6 +7141,23 @@ async function callReadOnlyTool(context, name, args = {}) {
7103
7141
  context
7104
7142
  );
7105
7143
  }
7144
+ if (name === "get_trace_facts") {
7145
+ const runId = String(args.runId ?? "");
7146
+ const { read } = await openRunTrace(context, runId);
7147
+ const facts = buildTraceFacts(read.events);
7148
+ return deliverMcpPayload(
7149
+ {
7150
+ runId,
7151
+ projectionVersion: "logical-lifecycle-0.1",
7152
+ summary: facts.summary,
7153
+ toolNames: [...facts.toolsByName.keys()].sort((a, b) => a.localeCompare(b)),
7154
+ llmCount: facts.llmEvents.length,
7155
+ outcomeCount: facts.outcomeEvents.length,
7156
+ note: "Bounded TraceFacts summary only; raw events and prompts are not included."
7157
+ },
7158
+ context
7159
+ );
7160
+ }
7106
7161
  if (name === "get_first_causal_failure") {
7107
7162
  const runId = String(args.runId ?? "");
7108
7163
  const { read } = await openRunTrace(context, runId);