crosscheck-mcp 0.2.29 → 0.2.30

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.
@@ -1293,6 +1293,11 @@ function reasoningSharesOutputBudget(provider) {
1293
1293
 
1294
1294
  // src/providers/types.ts
1295
1295
  init_cjs_shims();
1296
+ var IMAGE_MEDIA_TYPES = ["image/png", "image/jpeg", "image/webp", "image/gif"];
1297
+ function imagesOf(m) {
1298
+ if (m.role !== "user" || !Array.isArray(m.images)) return [];
1299
+ return m.images.filter((i) => Boolean(i) && typeof i.data === "string" && i.data.length > 0 && IMAGE_MEDIA_TYPES.includes(i.mediaType));
1300
+ }
1296
1301
  var ProviderError = class extends Error {
1297
1302
  name = "ProviderError";
1298
1303
  kind;
@@ -1692,7 +1697,12 @@ function buildAnthropicRequest(opts) {
1692
1697
  }
1693
1698
  continue;
1694
1699
  }
1695
- convo.push({ role: m.role, content: typeof m.content === "string" ? m.content : "" });
1700
+ const text = typeof m.content === "string" ? m.content : "";
1701
+ const images = imagesOf(m);
1702
+ convo.push(images.length ? { role: m.role, content: [
1703
+ ...images.map((i) => ({ type: "image", source: { type: "base64", media_type: i.mediaType, data: i.data } })),
1704
+ { type: "text", text }
1705
+ ] } : { role: m.role, content: text });
1696
1706
  }
1697
1707
  const body = {
1698
1708
  model: opts.model,
@@ -1933,7 +1943,10 @@ function buildGeminiRequest(opts) {
1933
1943
  const role = m.role === "user" ? "user" : "model";
1934
1944
  contents.push({
1935
1945
  role,
1936
- parts: [{ text: typeof m.content === "string" ? m.content : "" }]
1946
+ parts: [
1947
+ ...imagesOf(m).map((i) => ({ inline_data: { mime_type: i.mediaType, data: i.data } })),
1948
+ { text: typeof m.content === "string" ? m.content : "" }
1949
+ ]
1937
1950
  });
1938
1951
  }
1939
1952
  const body = {
@@ -2102,10 +2115,11 @@ function supportsNativeJsonSchema(provider, model) {
2102
2115
  return true;
2103
2116
  }
2104
2117
  function buildOpenAICompatibleRequest(opts) {
2105
- const msgs = opts.messages.map((m) => ({
2106
- role: m.role,
2107
- content: typeof m.content === "string" ? m.content : ""
2108
- }));
2118
+ const msgs = opts.messages.map((m) => {
2119
+ const text = typeof m.content === "string" ? m.content : "";
2120
+ const images = imagesOf(m);
2121
+ return images.length ? { role: m.role, content: [{ type: "text", text }, ...images.map((i) => ({ type: "image_url", image_url: { url: `data:${i.mediaType};base64,${i.data}` } }))] } : { role: m.role, content: text };
2122
+ });
2109
2123
  const body = {
2110
2124
  model: opts.model,
2111
2125
  messages: msgs
@@ -2427,7 +2441,7 @@ function makeGeminiProvider(model, apiKey, opts, fallbackModels = []) {
2427
2441
  // src/server.ts
2428
2442
  init_cjs_shims();
2429
2443
  var import_server = require("@modelcontextprotocol/sdk/server/index.js");
2430
- var import_types9 = require("@modelcontextprotocol/sdk/types.js");
2444
+ var import_types12 = require("@modelcontextprotocol/sdk/types.js");
2431
2445
 
2432
2446
  // src/instructions.ts
2433
2447
  init_cjs_shims();
@@ -2515,7 +2529,7 @@ var import_zod = require("zod");
2515
2529
  // src/server-meta.ts
2516
2530
  init_cjs_shims();
2517
2531
  var SERVER_NAME = "crosscheck-agent";
2518
- var SERVER_VERSION = true ? "0.2.29" : "0.0.0-dev";
2532
+ var SERVER_VERSION = true ? "0.2.30" : "0.0.0-dev";
2519
2533
 
2520
2534
  // src/tools/audit.ts
2521
2535
  init_cjs_shims();
@@ -5524,6 +5538,7 @@ async function pickAutoPanel(storage, purpose, n, providers, allowlist) {
5524
5538
 
5525
5539
  // src/core/super-mode.ts
5526
5540
  init_cjs_shims();
5541
+ var import_node_async_hooks = require("async_hooks");
5527
5542
  var SUPER_MODELS = {
5528
5543
  // Fable 5.1 verified present on the account; 5 as the fallback for accounts
5529
5544
  // that haven't been granted 5.1 yet.
@@ -5566,7 +5581,9 @@ function parseChain(v) {
5566
5581
  }
5567
5582
  return out;
5568
5583
  }
5569
- function superChainFor(provider, env = process.env) {
5584
+ var superEnvStore = new import_node_async_hooks.AsyncLocalStorage();
5585
+ var currentEnv = () => superEnvStore.getStore() ?? process.env;
5586
+ function superChainFor(provider, env = currentEnv()) {
5570
5587
  const varName = SUPER_ENV_VARS[provider];
5571
5588
  const user = varName ? parseChain(env[varName]) : [];
5572
5589
  if (user.length > 0) {
@@ -5575,14 +5592,14 @@ function superChainFor(provider, env = process.env) {
5575
5592
  }
5576
5593
  return SUPER_MODELS[provider] ?? [];
5577
5594
  }
5578
- function superPrimary(provider, env = process.env) {
5595
+ function superPrimary(provider, env = currentEnv()) {
5579
5596
  return superChainFor(provider, env)[0];
5580
5597
  }
5581
5598
  var SUPER_PROVIDER_NAMES = Object.keys(SUPER_MODELS);
5582
5599
  function isSuperRequested(args) {
5583
5600
  return args["super"] === true;
5584
5601
  }
5585
- function retargetForSuper(p, env = process.env) {
5602
+ function retargetForSuper(p, env = currentEnv()) {
5586
5603
  const chain = superChainFor(p.name, env);
5587
5604
  if (chain.length === 0) return p;
5588
5605
  const [primary, ...fallbacks] = chain;
@@ -7663,9 +7680,9 @@ var import_node_perf_hooks6 = require("perf_hooks");
7663
7680
 
7664
7681
  // src/core/progress.ts
7665
7682
  init_cjs_shims();
7666
- var import_node_async_hooks = require("async_hooks");
7683
+ var import_node_async_hooks2 = require("async_hooks");
7667
7684
  var import_node_perf_hooks5 = require("perf_hooks");
7668
- var progressStorage = new import_node_async_hooks.AsyncLocalStorage();
7685
+ var progressStorage = new import_node_async_hooks2.AsyncLocalStorage();
7669
7686
  async function withProgress(token, sendNotification, fn) {
7670
7687
  if (token === void 0 || token === null) {
7671
7688
  return fn();
@@ -12960,7 +12977,7 @@ var CHECK_INTERVAL_SECONDS = 3 * 24 * 60 * 60;
12960
12977
  var DEFAULT_PACKAGE = "crosscheck-cli";
12961
12978
  var FETCH_TIMEOUT_MS = 3e3;
12962
12979
  function engineVersion() {
12963
- return true ? "0.2.29" : "0.0.0-dev";
12980
+ return true ? "0.2.30" : "0.0.0-dev";
12964
12981
  }
12965
12982
  function defaultUpdateCachePath() {
12966
12983
  const base = process.env["CROSSCHECK_DATA_DIR"] || import_node_path13.default.join(import_node_os2.default.homedir() || import_node_os2.default.tmpdir(), ".crosscheck");
@@ -15171,14 +15188,14 @@ function createServer(opts = {}) {
15171
15188
  });
15172
15189
  };
15173
15190
  const tools = buildToolRegistry(opts);
15174
- server.setRequestHandler(import_types9.ListToolsRequestSchema, async () => ({
15191
+ server.setRequestHandler(import_types12.ListToolsRequestSchema, async () => ({
15175
15192
  tools: Array.from(tools.values()).map((t) => ({
15176
15193
  name: t.name,
15177
15194
  description: t.description,
15178
15195
  inputSchema: t.inputSchema
15179
15196
  }))
15180
15197
  }));
15181
- server.setRequestHandler(import_types9.CallToolRequestSchema, async (req) => {
15198
+ server.setRequestHandler(import_types12.CallToolRequestSchema, async (req) => {
15182
15199
  const name = req.params.name;
15183
15200
  const tool = tools.get(name);
15184
15201
  if (!tool) {