crosscheck-mcp 0.2.25 → 0.2.26

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/embed.js CHANGED
@@ -32,7 +32,12 @@ function loadPricing(path12) {
32
32
  function modelPricing(pricing, provider, model) {
33
33
  const block = pricing[provider];
34
34
  if (!block || typeof block !== "object" || Array.isArray(block)) return null;
35
- const entry = block[model];
35
+ const table = block;
36
+ let entry = table[model];
37
+ if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
38
+ const best = Object.keys(table).filter((k) => model.startsWith(k)).sort((a, b) => b.length - a.length)[0];
39
+ entry = best !== void 0 ? table[best] : void 0;
40
+ }
36
41
  if (!entry || typeof entry !== "object" || Array.isArray(entry)) return null;
37
42
  const e = entry;
38
43
  return {
@@ -389,6 +394,14 @@ async function acquireRateLimit(provider, deps) {
389
394
  // src/providers/anthropic.ts
390
395
  var ANTHROPIC_API_URL = "https://api.anthropic.com/v1/messages";
391
396
  var ANTHROPIC_VERSION_HEADER = "2023-06-01";
397
+ var ADAPTIVE_THINKING_PREFIXES = [
398
+ "claude-fable-5",
399
+ "claude-opus-5-5"
400
+ ];
401
+ function rejectsDisabledThinking(model) {
402
+ const m = model.toLowerCase();
403
+ return ADAPTIVE_THINKING_PREFIXES.some((p) => m.startsWith(p));
404
+ }
392
405
  var ANTHROPIC_STRUCTURED_TOOL_NAME = "structured_output";
393
406
  function applyPromptCaching(body, env = process.env) {
394
407
  const flag = (env["CROSSCHECK_ANTHROPIC_PROMPT_CACHE"] ?? "").trim();
@@ -433,7 +446,7 @@ function buildAnthropicRequest(opts) {
433
446
  }
434
447
  applyPromptCaching(body);
435
448
  if (isReasoningModel("anthropic", opts.model)) {
436
- if (opts.model.toLowerCase().startsWith("claude-fable-5")) {
449
+ if (rejectsDisabledThinking(opts.model)) {
437
450
  body.thinking = { type: "adaptive" };
438
451
  body.output_config = { effort: "low" };
439
452
  } else {
@@ -953,7 +966,7 @@ async function sendOpenAICompatible(args) {
953
966
 
954
967
  // src/providers/registry.ts
955
968
  var DEFAULT_MODELS = {
956
- anthropic: "claude-opus-5",
969
+ anthropic: "claude-opus-5-5",
957
970
  openai: "gpt-5.6-sol",
958
971
  xai: "grok-4-latest",
959
972
  mistral: "mistral-large-latest",
@@ -970,7 +983,12 @@ var DEFAULT_FALLBACKS = {
970
983
  // about.
971
984
  openai: ["gpt-5"],
972
985
  // 3.8 Flash is recent enough that some projects won't have it yet.
973
- gemini: ["gemini-3.1-pro-preview"]
986
+ gemini: ["gemini-3.1-pro-preview"],
987
+ // Opus 5.5 is new enough that an account could still be waiting on it.
988
+ // Opus 5 is the same family one step back — and this chain is consulted
989
+ // ONLY for a model-access failure, never for a bad key or a rate limit,
990
+ // so it can't quietly downgrade anyone who simply hit a 429.
991
+ anthropic: ["claude-opus-5"]
974
992
  };
975
993
  var MODEL_ENV_VARS = {
976
994
  anthropic: "ANTHROPIC_MODEL",
@@ -1095,7 +1113,7 @@ import { z } from "zod";
1095
1113
 
1096
1114
  // src/server-meta.ts
1097
1115
  var SERVER_NAME = "crosscheck-agent";
1098
- var SERVER_VERSION = true ? "0.2.25" : "0.0.0-dev";
1116
+ var SERVER_VERSION = true ? "0.2.26" : "0.0.0-dev";
1099
1117
 
1100
1118
  // src/tools/audit.ts
1101
1119
  import { readdirSync, readFileSync as readFileSync3, statSync } from "fs";
@@ -11600,7 +11618,7 @@ var CHECK_INTERVAL_SECONDS = 3 * 24 * 60 * 60;
11600
11618
  var DEFAULT_PACKAGE = "crosscheck-cli";
11601
11619
  var FETCH_TIMEOUT_MS = 3e3;
11602
11620
  function engineVersion() {
11603
- return true ? "0.2.25" : "0.0.0-dev";
11621
+ return true ? "0.2.26" : "0.0.0-dev";
11604
11622
  }
11605
11623
  function defaultUpdateCachePath() {
11606
11624
  const base = process.env["CROSSCHECK_DATA_DIR"] || path9.join(os.homedir() || os.tmpdir(), ".crosscheck");
@@ -13374,11 +13392,12 @@ function usageOf(answer) {
13374
13392
  const total = num("total_tokens") || prompt + completion;
13375
13393
  if (prompt === 0 && completion === 0 && total === 0) return null;
13376
13394
  const rawCost = rec["cost_usd"];
13395
+ const unpriced = rec["estimated"] === true;
13377
13396
  return {
13378
13397
  promptTokens: prompt,
13379
13398
  completionTokens: completion,
13380
13399
  totalTokens: total,
13381
- costUsd: typeof rawCost === "number" && Number.isFinite(rawCost) ? rawCost : null
13400
+ costUsd: !unpriced && typeof rawCost === "number" && Number.isFinite(rawCost) ? rawCost : null
13382
13401
  };
13383
13402
  }
13384
13403
  function textOf(answer) {