crosscheck-mcp 0.2.28 → 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 +127 -22
- package/dist/browser-ext.cjs.map +1 -1
- package/dist/browser-ext.js +127 -22
- package/dist/browser-ext.js.map +1 -1
- package/dist/embed.cjs +379 -26
- package/dist/embed.cjs.map +1 -1
- package/dist/embed.d.cts +134 -2
- package/dist/embed.d.ts +134 -2
- package/dist/embed.js +372 -25
- package/dist/embed.js.map +1 -1
- package/dist/node-stdio.cjs +130 -25
- package/dist/node-stdio.cjs.map +1 -1
- package/dist/node-stdio.d.cts +1 -75
- package/dist/node-stdio.d.ts +1 -75
- package/dist/node-stdio.js +127 -22
- package/dist/node-stdio.js.map +1 -1
- package/dist/types-HA3W47O4.d.cts +87 -0
- package/dist/types-HA3W47O4.d.ts +87 -0
- package/package.json +3 -2
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/** One provider call's token + cost record. Mirrors `Usage.to_dict()`
|
|
2
|
+
* output exactly. */
|
|
3
|
+
interface Usage {
|
|
4
|
+
provider: string;
|
|
5
|
+
model: string;
|
|
6
|
+
prompt_tokens: number;
|
|
7
|
+
completion_tokens: number;
|
|
8
|
+
cached_tokens: number;
|
|
9
|
+
total_tokens: number;
|
|
10
|
+
cost_usd: number;
|
|
11
|
+
estimated: boolean;
|
|
12
|
+
purpose: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** An image sent with a message: base64 bytes and their media type
|
|
16
|
+
* (image/png, image/jpeg, image/webp, image/gif). */
|
|
17
|
+
interface ImagePart {
|
|
18
|
+
mediaType: string;
|
|
19
|
+
data: string;
|
|
20
|
+
}
|
|
21
|
+
/** Inbound message shape — chat-completions style. `images`, on a user
|
|
22
|
+
* message, are sent alongside its text by adapters whose provider can see
|
|
23
|
+
* images (each in its own wire shape). */
|
|
24
|
+
interface ChatMessage {
|
|
25
|
+
role: "system" | "user" | "assistant" | string;
|
|
26
|
+
content: string;
|
|
27
|
+
images?: readonly ImagePart[];
|
|
28
|
+
[k: string]: unknown;
|
|
29
|
+
}
|
|
30
|
+
/** Image media types every vision provider here accepts. */
|
|
31
|
+
declare const IMAGE_MEDIA_TYPES: readonly ["image/png", "image/jpeg", "image/webp", "image/gif"];
|
|
32
|
+
/** A successful `send()` result. */
|
|
33
|
+
interface SendResult {
|
|
34
|
+
/** Concatenated text from the provider response. */
|
|
35
|
+
text: string;
|
|
36
|
+
/** Number of HTTP attempts that produced this result (>= 1). */
|
|
37
|
+
attempts: number;
|
|
38
|
+
/** Parsed + cost-augmented usage record. */
|
|
39
|
+
usage: Usage;
|
|
40
|
+
}
|
|
41
|
+
/** Args passed into every `Provider.send()` call. Mirrors the Python
|
|
42
|
+
* `send(messages, max_tokens, temperature, purpose='worker')` signature
|
|
43
|
+
* plus an optional `signal` for cancellation. */
|
|
44
|
+
interface SendArgs {
|
|
45
|
+
messages: readonly ChatMessage[];
|
|
46
|
+
maxTokens: number;
|
|
47
|
+
temperature: number;
|
|
48
|
+
purpose?: string;
|
|
49
|
+
/** Optional AbortSignal so callers can cancel long-running calls. */
|
|
50
|
+
signal?: AbortSignal;
|
|
51
|
+
/** Optional one-call model override. Used by the cheap-mode tier
|
|
52
|
+
* picker (see core/retarget.ts) to route a node to a cheaper model
|
|
53
|
+
* without mutating the provider's default. */
|
|
54
|
+
modelOverride?: string;
|
|
55
|
+
/** F4b: optional JSON Schema that the response MUST conform to.
|
|
56
|
+
* When set, provider adapters that support native structured output
|
|
57
|
+
* (currently: openai-compatible adapter with provider=openai) wire
|
|
58
|
+
* it into the request as `response_format: {type: "json_schema"}`
|
|
59
|
+
* or the provider's equivalent. Adapters that don't support native
|
|
60
|
+
* structured mode silently ignore this field — the schema-in-prompt
|
|
61
|
+
* + F4c tolerant parser path still works as the universal fallback.
|
|
62
|
+
* Mirror of OpenAI's json_schema spec; downstream adapters normalise
|
|
63
|
+
* to their own provider's native shape. */
|
|
64
|
+
jsonSchema?: Record<string, unknown>;
|
|
65
|
+
}
|
|
66
|
+
/** Provider adapter. */
|
|
67
|
+
interface Provider {
|
|
68
|
+
/** Lowercased identifier (e.g. "anthropic", "openai"). */
|
|
69
|
+
readonly name: string;
|
|
70
|
+
/** Default model for this provider (env-resolved at factory time). */
|
|
71
|
+
readonly model: string;
|
|
72
|
+
/** Ordered fallback models — "greenlight" candidates to try, in order,
|
|
73
|
+
* when `model` comes back with a model-access failure (the account/
|
|
74
|
+
* project doesn't have it enabled) rather than any other kind of
|
|
75
|
+
* error. Env-resolved at factory time from `<PROVIDER>_MODEL_
|
|
76
|
+
* FALLBACKS`, or set from a user's/org's configured chain. Empty for
|
|
77
|
+
* most providers — a bad key or rate limit isn't fixed by switching
|
|
78
|
+
* models, so this is only ever consulted for that one failure mode
|
|
79
|
+
* (see core/model-fallback.ts). */
|
|
80
|
+
readonly fallbackModels?: readonly string[];
|
|
81
|
+
/** Make a request and return the parsed result. Throws `ProviderError`
|
|
82
|
+
* on classified failures (auth, rate_limit, timeout, server, parse,
|
|
83
|
+
* network, client). */
|
|
84
|
+
send(args: SendArgs): Promise<SendResult>;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export { type ChatMessage as C, type ImagePart as I, type Provider as P, type SendArgs as S, IMAGE_MEDIA_TYPES as a };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/** One provider call's token + cost record. Mirrors `Usage.to_dict()`
|
|
2
|
+
* output exactly. */
|
|
3
|
+
interface Usage {
|
|
4
|
+
provider: string;
|
|
5
|
+
model: string;
|
|
6
|
+
prompt_tokens: number;
|
|
7
|
+
completion_tokens: number;
|
|
8
|
+
cached_tokens: number;
|
|
9
|
+
total_tokens: number;
|
|
10
|
+
cost_usd: number;
|
|
11
|
+
estimated: boolean;
|
|
12
|
+
purpose: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** An image sent with a message: base64 bytes and their media type
|
|
16
|
+
* (image/png, image/jpeg, image/webp, image/gif). */
|
|
17
|
+
interface ImagePart {
|
|
18
|
+
mediaType: string;
|
|
19
|
+
data: string;
|
|
20
|
+
}
|
|
21
|
+
/** Inbound message shape — chat-completions style. `images`, on a user
|
|
22
|
+
* message, are sent alongside its text by adapters whose provider can see
|
|
23
|
+
* images (each in its own wire shape). */
|
|
24
|
+
interface ChatMessage {
|
|
25
|
+
role: "system" | "user" | "assistant" | string;
|
|
26
|
+
content: string;
|
|
27
|
+
images?: readonly ImagePart[];
|
|
28
|
+
[k: string]: unknown;
|
|
29
|
+
}
|
|
30
|
+
/** Image media types every vision provider here accepts. */
|
|
31
|
+
declare const IMAGE_MEDIA_TYPES: readonly ["image/png", "image/jpeg", "image/webp", "image/gif"];
|
|
32
|
+
/** A successful `send()` result. */
|
|
33
|
+
interface SendResult {
|
|
34
|
+
/** Concatenated text from the provider response. */
|
|
35
|
+
text: string;
|
|
36
|
+
/** Number of HTTP attempts that produced this result (>= 1). */
|
|
37
|
+
attempts: number;
|
|
38
|
+
/** Parsed + cost-augmented usage record. */
|
|
39
|
+
usage: Usage;
|
|
40
|
+
}
|
|
41
|
+
/** Args passed into every `Provider.send()` call. Mirrors the Python
|
|
42
|
+
* `send(messages, max_tokens, temperature, purpose='worker')` signature
|
|
43
|
+
* plus an optional `signal` for cancellation. */
|
|
44
|
+
interface SendArgs {
|
|
45
|
+
messages: readonly ChatMessage[];
|
|
46
|
+
maxTokens: number;
|
|
47
|
+
temperature: number;
|
|
48
|
+
purpose?: string;
|
|
49
|
+
/** Optional AbortSignal so callers can cancel long-running calls. */
|
|
50
|
+
signal?: AbortSignal;
|
|
51
|
+
/** Optional one-call model override. Used by the cheap-mode tier
|
|
52
|
+
* picker (see core/retarget.ts) to route a node to a cheaper model
|
|
53
|
+
* without mutating the provider's default. */
|
|
54
|
+
modelOverride?: string;
|
|
55
|
+
/** F4b: optional JSON Schema that the response MUST conform to.
|
|
56
|
+
* When set, provider adapters that support native structured output
|
|
57
|
+
* (currently: openai-compatible adapter with provider=openai) wire
|
|
58
|
+
* it into the request as `response_format: {type: "json_schema"}`
|
|
59
|
+
* or the provider's equivalent. Adapters that don't support native
|
|
60
|
+
* structured mode silently ignore this field — the schema-in-prompt
|
|
61
|
+
* + F4c tolerant parser path still works as the universal fallback.
|
|
62
|
+
* Mirror of OpenAI's json_schema spec; downstream adapters normalise
|
|
63
|
+
* to their own provider's native shape. */
|
|
64
|
+
jsonSchema?: Record<string, unknown>;
|
|
65
|
+
}
|
|
66
|
+
/** Provider adapter. */
|
|
67
|
+
interface Provider {
|
|
68
|
+
/** Lowercased identifier (e.g. "anthropic", "openai"). */
|
|
69
|
+
readonly name: string;
|
|
70
|
+
/** Default model for this provider (env-resolved at factory time). */
|
|
71
|
+
readonly model: string;
|
|
72
|
+
/** Ordered fallback models — "greenlight" candidates to try, in order,
|
|
73
|
+
* when `model` comes back with a model-access failure (the account/
|
|
74
|
+
* project doesn't have it enabled) rather than any other kind of
|
|
75
|
+
* error. Env-resolved at factory time from `<PROVIDER>_MODEL_
|
|
76
|
+
* FALLBACKS`, or set from a user's/org's configured chain. Empty for
|
|
77
|
+
* most providers — a bad key or rate limit isn't fixed by switching
|
|
78
|
+
* models, so this is only ever consulted for that one failure mode
|
|
79
|
+
* (see core/model-fallback.ts). */
|
|
80
|
+
readonly fallbackModels?: readonly string[];
|
|
81
|
+
/** Make a request and return the parsed result. Throws `ProviderError`
|
|
82
|
+
* on classified failures (auth, rate_limit, timeout, server, parse,
|
|
83
|
+
* network, client). */
|
|
84
|
+
send(args: SendArgs): Promise<SendResult>;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export { type ChatMessage as C, type ImagePart as I, type Provider as P, type SendArgs as S, IMAGE_MEDIA_TYPES as a };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "crosscheck-mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.30",
|
|
4
4
|
"description": "Multi-LLM MCP server: confer / debate / coordinate / audit / orchestrate across Anthropic + OpenAI + xAI + Gemini + Mistral + Groq + DeepSeek + Kimi + Qwen, with scoreboard-driven router, canary-leak detection, sandboxed shell verifiers, and a tier-aware cheap-mode picker. TypeScript implementation; no Python at runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -76,7 +76,8 @@
|
|
|
76
76
|
"prices:drift:strict": "tsx ../../scripts/price-drift.ts --strict",
|
|
77
77
|
"canary": "tsx ../../scripts/canary.ts",
|
|
78
78
|
"canary:super": "tsx ../../scripts/canary.ts --super",
|
|
79
|
-
"canary:fallbacks": "tsx ../../scripts/canary.ts --fallbacks"
|
|
79
|
+
"canary:fallbacks": "tsx ../../scripts/canary.ts --fallbacks",
|
|
80
|
+
"canary:vision": "tsx ../../scripts/canary-vision.ts"
|
|
80
81
|
},
|
|
81
82
|
"dependencies": {
|
|
82
83
|
"@modelcontextprotocol/sdk": "^1.29.0",
|