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.
- package/dist/browser-ext.cjs +30 -13
- package/dist/browser-ext.cjs.map +1 -1
- package/dist/browser-ext.js +30 -13
- package/dist/browser-ext.js.map +1 -1
- package/dist/embed.cjs +83 -20
- package/dist/embed.cjs.map +1 -1
- package/dist/embed.d.cts +42 -2
- package/dist/embed.d.ts +42 -2
- package/dist/embed.js +77 -19
- package/dist/embed.js.map +1 -1
- package/dist/node-stdio.cjs +33 -16
- package/dist/node-stdio.cjs.map +1 -1
- package/dist/node-stdio.d.cts +1 -1
- package/dist/node-stdio.d.ts +1 -1
- package/dist/node-stdio.js +30 -13
- package/dist/node-stdio.js.map +1 -1
- package/dist/{types-BcprisDl.d.cts → types-HA3W47O4.d.cts} +13 -2
- package/dist/{types-BcprisDl.d.ts → types-HA3W47O4.d.ts} +13 -2
- package/package.json +3 -2
package/dist/browser-ext.cjs
CHANGED
|
@@ -611,6 +611,11 @@ function reasoningSharesOutputBudget(provider) {
|
|
|
611
611
|
}
|
|
612
612
|
|
|
613
613
|
// src/providers/types.ts
|
|
614
|
+
var IMAGE_MEDIA_TYPES = ["image/png", "image/jpeg", "image/webp", "image/gif"];
|
|
615
|
+
function imagesOf(m) {
|
|
616
|
+
if (m.role !== "user" || !Array.isArray(m.images)) return [];
|
|
617
|
+
return m.images.filter((i) => Boolean(i) && typeof i.data === "string" && i.data.length > 0 && IMAGE_MEDIA_TYPES.includes(i.mediaType));
|
|
618
|
+
}
|
|
614
619
|
var ProviderError = class extends Error {
|
|
615
620
|
name = "ProviderError";
|
|
616
621
|
kind;
|
|
@@ -999,7 +1004,12 @@ function buildAnthropicRequest(opts) {
|
|
|
999
1004
|
}
|
|
1000
1005
|
continue;
|
|
1001
1006
|
}
|
|
1002
|
-
|
|
1007
|
+
const text = typeof m.content === "string" ? m.content : "";
|
|
1008
|
+
const images = imagesOf(m);
|
|
1009
|
+
convo.push(images.length ? { role: m.role, content: [
|
|
1010
|
+
...images.map((i) => ({ type: "image", source: { type: "base64", media_type: i.mediaType, data: i.data } })),
|
|
1011
|
+
{ type: "text", text }
|
|
1012
|
+
] } : { role: m.role, content: text });
|
|
1003
1013
|
}
|
|
1004
1014
|
const body = {
|
|
1005
1015
|
model: opts.model,
|
|
@@ -1239,7 +1249,10 @@ function buildGeminiRequest(opts) {
|
|
|
1239
1249
|
const role = m.role === "user" ? "user" : "model";
|
|
1240
1250
|
contents.push({
|
|
1241
1251
|
role,
|
|
1242
|
-
parts: [
|
|
1252
|
+
parts: [
|
|
1253
|
+
...imagesOf(m).map((i) => ({ inline_data: { mime_type: i.mediaType, data: i.data } })),
|
|
1254
|
+
{ text: typeof m.content === "string" ? m.content : "" }
|
|
1255
|
+
]
|
|
1243
1256
|
});
|
|
1244
1257
|
}
|
|
1245
1258
|
const body = {
|
|
@@ -1407,10 +1420,11 @@ function supportsNativeJsonSchema(provider, model) {
|
|
|
1407
1420
|
return true;
|
|
1408
1421
|
}
|
|
1409
1422
|
function buildOpenAICompatibleRequest(opts) {
|
|
1410
|
-
const msgs = opts.messages.map((m) =>
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1423
|
+
const msgs = opts.messages.map((m) => {
|
|
1424
|
+
const text = typeof m.content === "string" ? m.content : "";
|
|
1425
|
+
const images = imagesOf(m);
|
|
1426
|
+
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 };
|
|
1427
|
+
});
|
|
1414
1428
|
const body = {
|
|
1415
1429
|
model: opts.model,
|
|
1416
1430
|
messages: msgs
|
|
@@ -1723,7 +1737,7 @@ var import_zod = require("zod");
|
|
|
1723
1737
|
|
|
1724
1738
|
// src/server-meta.ts
|
|
1725
1739
|
var SERVER_NAME = "crosscheck-agent";
|
|
1726
|
-
var SERVER_VERSION = true ? "0.2.
|
|
1740
|
+
var SERVER_VERSION = true ? "0.2.30" : "0.0.0-dev";
|
|
1727
1741
|
|
|
1728
1742
|
// src/tools/audit.ts
|
|
1729
1743
|
var import_node_fs4 = require("fs");
|
|
@@ -4687,6 +4701,7 @@ async function pickAutoPanel(storage, purpose, n, providers, allowlist) {
|
|
|
4687
4701
|
}
|
|
4688
4702
|
|
|
4689
4703
|
// src/core/super-mode.ts
|
|
4704
|
+
var import_node_async_hooks = require("async_hooks");
|
|
4690
4705
|
var SUPER_MODELS = {
|
|
4691
4706
|
// Fable 5.1 verified present on the account; 5 as the fallback for accounts
|
|
4692
4707
|
// that haven't been granted 5.1 yet.
|
|
@@ -4729,7 +4744,9 @@ function parseChain(v) {
|
|
|
4729
4744
|
}
|
|
4730
4745
|
return out;
|
|
4731
4746
|
}
|
|
4732
|
-
|
|
4747
|
+
var superEnvStore = new import_node_async_hooks.AsyncLocalStorage();
|
|
4748
|
+
var currentEnv = () => superEnvStore.getStore() ?? process.env;
|
|
4749
|
+
function superChainFor(provider, env = currentEnv()) {
|
|
4733
4750
|
const varName = SUPER_ENV_VARS[provider];
|
|
4734
4751
|
const user = varName ? parseChain(env[varName]) : [];
|
|
4735
4752
|
if (user.length > 0) {
|
|
@@ -4738,14 +4755,14 @@ function superChainFor(provider, env = process.env) {
|
|
|
4738
4755
|
}
|
|
4739
4756
|
return SUPER_MODELS[provider] ?? [];
|
|
4740
4757
|
}
|
|
4741
|
-
function superPrimary(provider, env =
|
|
4758
|
+
function superPrimary(provider, env = currentEnv()) {
|
|
4742
4759
|
return superChainFor(provider, env)[0];
|
|
4743
4760
|
}
|
|
4744
4761
|
var SUPER_PROVIDER_NAMES = Object.keys(SUPER_MODELS);
|
|
4745
4762
|
function isSuperRequested(args) {
|
|
4746
4763
|
return args["super"] === true;
|
|
4747
4764
|
}
|
|
4748
|
-
function retargetForSuper(p, env =
|
|
4765
|
+
function retargetForSuper(p, env = currentEnv()) {
|
|
4749
4766
|
const chain = superChainFor(p.name, env);
|
|
4750
4767
|
if (chain.length === 0) return p;
|
|
4751
4768
|
const [primary, ...fallbacks] = chain;
|
|
@@ -6816,9 +6833,9 @@ var import_node_path9 = __toESM(require("path"), 1);
|
|
|
6816
6833
|
var import_node_perf_hooks6 = require("perf_hooks");
|
|
6817
6834
|
|
|
6818
6835
|
// src/core/progress.ts
|
|
6819
|
-
var
|
|
6836
|
+
var import_node_async_hooks2 = require("async_hooks");
|
|
6820
6837
|
var import_node_perf_hooks5 = require("perf_hooks");
|
|
6821
|
-
var progressStorage = new
|
|
6838
|
+
var progressStorage = new import_node_async_hooks2.AsyncLocalStorage();
|
|
6822
6839
|
async function emitProgress(message, opts) {
|
|
6823
6840
|
const ctx = progressStorage.getStore();
|
|
6824
6841
|
const wallStart = ctx ? ctx.wallStart : import_node_perf_hooks5.performance.now();
|
|
@@ -12076,7 +12093,7 @@ var CHECK_INTERVAL_SECONDS = 3 * 24 * 60 * 60;
|
|
|
12076
12093
|
var DEFAULT_PACKAGE = "crosscheck-cli";
|
|
12077
12094
|
var FETCH_TIMEOUT_MS = 3e3;
|
|
12078
12095
|
function engineVersion() {
|
|
12079
|
-
return true ? "0.2.
|
|
12096
|
+
return true ? "0.2.30" : "0.0.0-dev";
|
|
12080
12097
|
}
|
|
12081
12098
|
function defaultUpdateCachePath() {
|
|
12082
12099
|
const base = process.env["CROSSCHECK_DATA_DIR"] || import_node_path12.default.join(import_node_os2.default.homedir() || import_node_os2.default.tmpdir(), ".crosscheck");
|