@agent-inspect/mcp-server 6.31.8 → 6.31.10

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.
@@ -1065,7 +1065,18 @@ async function readTraceEventsFromFile(filePath) {
1065
1065
  }
1066
1066
 
1067
1067
  // packages/core/src/context.ts
1068
- new AsyncLocalStorage();
1068
+ var GLOBAL_CONTEXT_ALS_KEY = "agent-inspect:execution-context-als:v1";
1069
+ function getSharedContextStorage() {
1070
+ const host = globalThis;
1071
+ const existing = host[GLOBAL_CONTEXT_ALS_KEY];
1072
+ if (existing instanceof AsyncLocalStorage) {
1073
+ return existing;
1074
+ }
1075
+ const created = new AsyncLocalStorage();
1076
+ host[GLOBAL_CONTEXT_ALS_KEY] = created;
1077
+ return created;
1078
+ }
1079
+ getSharedContextStorage();
1069
1080
 
1070
1081
  // packages/core/src/outcomes/types.ts
1071
1082
  var OBSERVED_OUTCOME_STATUSES = [
@@ -2430,6 +2441,17 @@ var PROGRAMMATIC_DIAGNOSTIC_SPECS = Object.freeze({
2430
2441
  summary: "Trace contains a parentId cycle.",
2431
2442
  remediation: "Use visibility-first tree linking for legacy fixtures; prefer acyclic capture for new adapter output.",
2432
2443
  relatedCodes: ["structure.cycle"]
2444
+ },
2445
+ AI_TRACE_CONTRACT_INPUT_INVALID: {
2446
+ code: "AI_TRACE_CONTRACT_INPUT_INVALID",
2447
+ summary: "evaluateTraceContract expects ({ read }, contract) or use evaluateTraceContractRead(read, contract).",
2448
+ remediation: "Pass TraceCheckInput as the first argument: evaluateTraceContract({ read }, contract).",
2449
+ relatedCodes: ["AI_CHECK_INVALID_ARGUMENTS"]
2450
+ },
2451
+ AI_INSPECT_RUN_UNSUPPORTED_OPTION: {
2452
+ code: "AI_INSPECT_RUN_UNSUPPORTED_OPTION",
2453
+ summary: 'inspectRun does not accept a "writer" option.',
2454
+ remediation: "Use createInspector({ writer }) then inspector.run(...). inspectRun persists via the global JSONL path (schema 0.1)."
2433
2455
  }
2434
2456
  });
2435
2457
  function formatProgrammaticDiagnostic(code, detail) {
@@ -9264,5 +9286,5 @@ async function runReadOnlyMcpServer(options = {}) {
9264
9286
  }
9265
9287
 
9266
9288
  export { MCP_MAX_REQUEST_BYTES, MCP_PROTOCOL_VERSION, MCP_SERVER_INSTRUCTIONS, READ_ONLY_TOOLS, TRACE_DATA_UNTRUSTED_WARNING, callReadOnlyTool, createMcpServerContext, handleMcpProtocolLine, runReadOnlyMcpServer };
9267
- //# sourceMappingURL=chunk-MXA5GAJQ.mjs.map
9268
- //# sourceMappingURL=chunk-MXA5GAJQ.mjs.map
9289
+ //# sourceMappingURL=chunk-GWLPG4BM.mjs.map
9290
+ //# sourceMappingURL=chunk-GWLPG4BM.mjs.map