crosscheck-mcp 0.2.28 → 0.2.29

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.
@@ -0,0 +1,76 @@
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
+ /** Inbound message shape — chat-completions style. */
16
+ interface ChatMessage {
17
+ role: "system" | "user" | "assistant" | string;
18
+ content: string;
19
+ [k: string]: unknown;
20
+ }
21
+ /** A successful `send()` result. */
22
+ interface SendResult {
23
+ /** Concatenated text from the provider response. */
24
+ text: string;
25
+ /** Number of HTTP attempts that produced this result (>= 1). */
26
+ attempts: number;
27
+ /** Parsed + cost-augmented usage record. */
28
+ usage: Usage;
29
+ }
30
+ /** Args passed into every `Provider.send()` call. Mirrors the Python
31
+ * `send(messages, max_tokens, temperature, purpose='worker')` signature
32
+ * plus an optional `signal` for cancellation. */
33
+ interface SendArgs {
34
+ messages: readonly ChatMessage[];
35
+ maxTokens: number;
36
+ temperature: number;
37
+ purpose?: string;
38
+ /** Optional AbortSignal so callers can cancel long-running calls. */
39
+ signal?: AbortSignal;
40
+ /** Optional one-call model override. Used by the cheap-mode tier
41
+ * picker (see core/retarget.ts) to route a node to a cheaper model
42
+ * without mutating the provider's default. */
43
+ modelOverride?: string;
44
+ /** F4b: optional JSON Schema that the response MUST conform to.
45
+ * When set, provider adapters that support native structured output
46
+ * (currently: openai-compatible adapter with provider=openai) wire
47
+ * it into the request as `response_format: {type: "json_schema"}`
48
+ * or the provider's equivalent. Adapters that don't support native
49
+ * structured mode silently ignore this field — the schema-in-prompt
50
+ * + F4c tolerant parser path still works as the universal fallback.
51
+ * Mirror of OpenAI's json_schema spec; downstream adapters normalise
52
+ * to their own provider's native shape. */
53
+ jsonSchema?: Record<string, unknown>;
54
+ }
55
+ /** Provider adapter. */
56
+ interface Provider {
57
+ /** Lowercased identifier (e.g. "anthropic", "openai"). */
58
+ readonly name: string;
59
+ /** Default model for this provider (env-resolved at factory time). */
60
+ readonly model: string;
61
+ /** Ordered fallback models — "greenlight" candidates to try, in order,
62
+ * when `model` comes back with a model-access failure (the account/
63
+ * project doesn't have it enabled) rather than any other kind of
64
+ * error. Env-resolved at factory time from `<PROVIDER>_MODEL_
65
+ * FALLBACKS`, or set from a user's/org's configured chain. Empty for
66
+ * most providers — a bad key or rate limit isn't fixed by switching
67
+ * models, so this is only ever consulted for that one failure mode
68
+ * (see core/model-fallback.ts). */
69
+ readonly fallbackModels?: readonly string[];
70
+ /** Make a request and return the parsed result. Throws `ProviderError`
71
+ * on classified failures (auth, rate_limit, timeout, server, parse,
72
+ * network, client). */
73
+ send(args: SendArgs): Promise<SendResult>;
74
+ }
75
+
76
+ export type { ChatMessage as C, Provider as P };
@@ -0,0 +1,76 @@
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
+ /** Inbound message shape — chat-completions style. */
16
+ interface ChatMessage {
17
+ role: "system" | "user" | "assistant" | string;
18
+ content: string;
19
+ [k: string]: unknown;
20
+ }
21
+ /** A successful `send()` result. */
22
+ interface SendResult {
23
+ /** Concatenated text from the provider response. */
24
+ text: string;
25
+ /** Number of HTTP attempts that produced this result (>= 1). */
26
+ attempts: number;
27
+ /** Parsed + cost-augmented usage record. */
28
+ usage: Usage;
29
+ }
30
+ /** Args passed into every `Provider.send()` call. Mirrors the Python
31
+ * `send(messages, max_tokens, temperature, purpose='worker')` signature
32
+ * plus an optional `signal` for cancellation. */
33
+ interface SendArgs {
34
+ messages: readonly ChatMessage[];
35
+ maxTokens: number;
36
+ temperature: number;
37
+ purpose?: string;
38
+ /** Optional AbortSignal so callers can cancel long-running calls. */
39
+ signal?: AbortSignal;
40
+ /** Optional one-call model override. Used by the cheap-mode tier
41
+ * picker (see core/retarget.ts) to route a node to a cheaper model
42
+ * without mutating the provider's default. */
43
+ modelOverride?: string;
44
+ /** F4b: optional JSON Schema that the response MUST conform to.
45
+ * When set, provider adapters that support native structured output
46
+ * (currently: openai-compatible adapter with provider=openai) wire
47
+ * it into the request as `response_format: {type: "json_schema"}`
48
+ * or the provider's equivalent. Adapters that don't support native
49
+ * structured mode silently ignore this field — the schema-in-prompt
50
+ * + F4c tolerant parser path still works as the universal fallback.
51
+ * Mirror of OpenAI's json_schema spec; downstream adapters normalise
52
+ * to their own provider's native shape. */
53
+ jsonSchema?: Record<string, unknown>;
54
+ }
55
+ /** Provider adapter. */
56
+ interface Provider {
57
+ /** Lowercased identifier (e.g. "anthropic", "openai"). */
58
+ readonly name: string;
59
+ /** Default model for this provider (env-resolved at factory time). */
60
+ readonly model: string;
61
+ /** Ordered fallback models — "greenlight" candidates to try, in order,
62
+ * when `model` comes back with a model-access failure (the account/
63
+ * project doesn't have it enabled) rather than any other kind of
64
+ * error. Env-resolved at factory time from `<PROVIDER>_MODEL_
65
+ * FALLBACKS`, or set from a user's/org's configured chain. Empty for
66
+ * most providers — a bad key or rate limit isn't fixed by switching
67
+ * models, so this is only ever consulted for that one failure mode
68
+ * (see core/model-fallback.ts). */
69
+ readonly fallbackModels?: readonly string[];
70
+ /** Make a request and return the parsed result. Throws `ProviderError`
71
+ * on classified failures (auth, rate_limit, timeout, server, parse,
72
+ * network, client). */
73
+ send(args: SendArgs): Promise<SendResult>;
74
+ }
75
+
76
+ export type { ChatMessage as C, Provider as P };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crosscheck-mcp",
3
- "version": "0.2.28",
3
+ "version": "0.2.29",
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",