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/browser-ext.cjs +29 -6
- package/dist/browser-ext.cjs.map +1 -1
- package/dist/browser-ext.js +29 -6
- package/dist/browser-ext.js.map +1 -1
- package/dist/embed.cjs +26 -7
- package/dist/embed.cjs.map +1 -1
- package/dist/embed.js +26 -7
- package/dist/embed.js.map +1 -1
- package/dist/node-stdio.cjs +24 -6
- package/dist/node-stdio.cjs.map +1 -1
- package/dist/node-stdio.js +24 -6
- package/dist/node-stdio.js.map +1 -1
- package/dist/pricing.json +5 -0
- package/package.json +1 -1
package/dist/embed.cjs
CHANGED
|
@@ -71,7 +71,12 @@ function loadPricing(path12) {
|
|
|
71
71
|
function modelPricing(pricing, provider, model) {
|
|
72
72
|
const block = pricing[provider];
|
|
73
73
|
if (!block || typeof block !== "object" || Array.isArray(block)) return null;
|
|
74
|
-
const
|
|
74
|
+
const table = block;
|
|
75
|
+
let entry = table[model];
|
|
76
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
|
|
77
|
+
const best = Object.keys(table).filter((k) => model.startsWith(k)).sort((a, b) => b.length - a.length)[0];
|
|
78
|
+
entry = best !== void 0 ? table[best] : void 0;
|
|
79
|
+
}
|
|
75
80
|
if (!entry || typeof entry !== "object" || Array.isArray(entry)) return null;
|
|
76
81
|
const e = entry;
|
|
77
82
|
return {
|
|
@@ -428,6 +433,14 @@ async function acquireRateLimit(provider, deps) {
|
|
|
428
433
|
// src/providers/anthropic.ts
|
|
429
434
|
var ANTHROPIC_API_URL = "https://api.anthropic.com/v1/messages";
|
|
430
435
|
var ANTHROPIC_VERSION_HEADER = "2023-06-01";
|
|
436
|
+
var ADAPTIVE_THINKING_PREFIXES = [
|
|
437
|
+
"claude-fable-5",
|
|
438
|
+
"claude-opus-5-5"
|
|
439
|
+
];
|
|
440
|
+
function rejectsDisabledThinking(model) {
|
|
441
|
+
const m = model.toLowerCase();
|
|
442
|
+
return ADAPTIVE_THINKING_PREFIXES.some((p) => m.startsWith(p));
|
|
443
|
+
}
|
|
431
444
|
var ANTHROPIC_STRUCTURED_TOOL_NAME = "structured_output";
|
|
432
445
|
function applyPromptCaching(body, env = process.env) {
|
|
433
446
|
const flag = (env["CROSSCHECK_ANTHROPIC_PROMPT_CACHE"] ?? "").trim();
|
|
@@ -472,7 +485,7 @@ function buildAnthropicRequest(opts) {
|
|
|
472
485
|
}
|
|
473
486
|
applyPromptCaching(body);
|
|
474
487
|
if (isReasoningModel("anthropic", opts.model)) {
|
|
475
|
-
if (opts.model
|
|
488
|
+
if (rejectsDisabledThinking(opts.model)) {
|
|
476
489
|
body.thinking = { type: "adaptive" };
|
|
477
490
|
body.output_config = { effort: "low" };
|
|
478
491
|
} else {
|
|
@@ -992,7 +1005,7 @@ async function sendOpenAICompatible(args) {
|
|
|
992
1005
|
|
|
993
1006
|
// src/providers/registry.ts
|
|
994
1007
|
var DEFAULT_MODELS = {
|
|
995
|
-
anthropic: "claude-opus-5",
|
|
1008
|
+
anthropic: "claude-opus-5-5",
|
|
996
1009
|
openai: "gpt-5.6-sol",
|
|
997
1010
|
xai: "grok-4-latest",
|
|
998
1011
|
mistral: "mistral-large-latest",
|
|
@@ -1009,7 +1022,12 @@ var DEFAULT_FALLBACKS = {
|
|
|
1009
1022
|
// about.
|
|
1010
1023
|
openai: ["gpt-5"],
|
|
1011
1024
|
// 3.8 Flash is recent enough that some projects won't have it yet.
|
|
1012
|
-
gemini: ["gemini-3.1-pro-preview"]
|
|
1025
|
+
gemini: ["gemini-3.1-pro-preview"],
|
|
1026
|
+
// Opus 5.5 is new enough that an account could still be waiting on it.
|
|
1027
|
+
// Opus 5 is the same family one step back — and this chain is consulted
|
|
1028
|
+
// ONLY for a model-access failure, never for a bad key or a rate limit,
|
|
1029
|
+
// so it can't quietly downgrade anyone who simply hit a 429.
|
|
1030
|
+
anthropic: ["claude-opus-5"]
|
|
1013
1031
|
};
|
|
1014
1032
|
var MODEL_ENV_VARS = {
|
|
1015
1033
|
anthropic: "ANTHROPIC_MODEL",
|
|
@@ -1134,7 +1152,7 @@ var import_zod = require("zod");
|
|
|
1134
1152
|
|
|
1135
1153
|
// src/server-meta.ts
|
|
1136
1154
|
var SERVER_NAME = "crosscheck-agent";
|
|
1137
|
-
var SERVER_VERSION = true ? "0.2.
|
|
1155
|
+
var SERVER_VERSION = true ? "0.2.26" : "0.0.0-dev";
|
|
1138
1156
|
|
|
1139
1157
|
// src/tools/audit.ts
|
|
1140
1158
|
var import_node_fs4 = require("fs");
|
|
@@ -11622,7 +11640,7 @@ var CHECK_INTERVAL_SECONDS = 3 * 24 * 60 * 60;
|
|
|
11622
11640
|
var DEFAULT_PACKAGE = "crosscheck-cli";
|
|
11623
11641
|
var FETCH_TIMEOUT_MS = 3e3;
|
|
11624
11642
|
function engineVersion() {
|
|
11625
|
-
return true ? "0.2.
|
|
11643
|
+
return true ? "0.2.26" : "0.0.0-dev";
|
|
11626
11644
|
}
|
|
11627
11645
|
function defaultUpdateCachePath() {
|
|
11628
11646
|
const base = process.env["CROSSCHECK_DATA_DIR"] || import_node_path12.default.join(import_node_os2.default.homedir() || import_node_os2.default.tmpdir(), ".crosscheck");
|
|
@@ -13396,11 +13414,12 @@ function usageOf(answer) {
|
|
|
13396
13414
|
const total = num("total_tokens") || prompt + completion;
|
|
13397
13415
|
if (prompt === 0 && completion === 0 && total === 0) return null;
|
|
13398
13416
|
const rawCost = rec["cost_usd"];
|
|
13417
|
+
const unpriced = rec["estimated"] === true;
|
|
13399
13418
|
return {
|
|
13400
13419
|
promptTokens: prompt,
|
|
13401
13420
|
completionTokens: completion,
|
|
13402
13421
|
totalTokens: total,
|
|
13403
|
-
costUsd: typeof rawCost === "number" && Number.isFinite(rawCost) ? rawCost : null
|
|
13422
|
+
costUsd: !unpriced && typeof rawCost === "number" && Number.isFinite(rawCost) ? rawCost : null
|
|
13404
13423
|
};
|
|
13405
13424
|
}
|
|
13406
13425
|
function textOf(answer) {
|