crosscheck-mcp 0.2.1 → 0.2.2
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/node-stdio.cjs +322 -11
- package/dist/node-stdio.cjs.map +1 -1
- package/dist/node-stdio.js +322 -11
- package/dist/node-stdio.js.map +1 -1
- package/package.json +1 -1
package/dist/node-stdio.cjs
CHANGED
|
@@ -2113,7 +2113,9 @@ var ROUTABLE_TOOLS = [
|
|
|
2113
2113
|
"delegate",
|
|
2114
2114
|
"bench",
|
|
2115
2115
|
"config_pin",
|
|
2116
|
-
"update_crosscheck"
|
|
2116
|
+
"update_crosscheck",
|
|
2117
|
+
// Help
|
|
2118
|
+
"help"
|
|
2117
2119
|
];
|
|
2118
2120
|
var DEFAULT_TOOL = "confer";
|
|
2119
2121
|
function renderInstructions() {
|
|
@@ -2122,7 +2124,7 @@ function renderInstructions() {
|
|
|
2122
2124
|
When the user message begins with \`xc\` or \`XC\` followed by a space (or is exactly \`xc\`/\`XC\`), treat it as an explicit invocation of this server.
|
|
2123
2125
|
|
|
2124
2126
|
Routing rules:
|
|
2125
|
-
1. If the next whitespace-delimited token matches one of the tool names below, call \`mcp__crosscheck__<that name>\` and pass the remainder of the message as the natural-language input for that tool's primary argument (\`instruction\` for create/orchestrate/plan; \`question\` for confer/debate/coordinate/triangulate; \`output_to_audit\` for audit/review/critique; \`expr\` for verify; \`prompt\` for pick/solve; the obvious slot for the rest).
|
|
2127
|
+
1. If the next whitespace-delimited token matches one of the tool names below, call \`mcp__crosscheck__<that name>\` and pass the remainder of the message as the natural-language input for that tool's primary argument (\`instruction\` for create/orchestrate/plan; \`question\` for confer/debate/coordinate/triangulate; \`output_to_audit\` for audit/review/critique; \`expr\` for verify; \`prompt\` for pick/solve; \`command\` for help \u2014 and \`xc help\` alone calls help with no args; the obvious slot for the rest).
|
|
2126
2128
|
2. If the next token does NOT match a tool name (or there is no next token), default to \`mcp__crosscheck__${DEFAULT_TOOL}\` and pass the entire message tail (everything after \`xc\`/\`XC\`) as \`question\`.
|
|
2127
2129
|
3. Preserve the user's wording verbatim in the argument \u2014 do not paraphrase, summarize, or "clean up" the prompt before forwarding.
|
|
2128
2130
|
4. If the user message is exactly \`xc\` or \`XC\` with no tail, ask them what they want crosscheck to do; do not invent a question.
|
|
@@ -2133,6 +2135,7 @@ Examples:
|
|
|
2133
2135
|
- \`xc audit the diff in this PR\` \u2192 \`mcp__crosscheck__audit({ output_to_audit: "the diff in this PR" })\`
|
|
2134
2136
|
- \`xc plan the migration from REST to gRPC\` \u2192 \`mcp__crosscheck__plan({ instruction: "the migration from REST to gRPC" })\`
|
|
2135
2137
|
- \`xc verify x > 0 when x = 5\` \u2192 \`mcp__crosscheck__verify({ expr: "x > 0 when x = 5" })\`
|
|
2138
|
+
- \`xc help\` \u2192 \`mcp__crosscheck__help({})\` (lists every command); \`xc help debate\` \u2192 \`mcp__crosscheck__help({ command: "debate" })\`
|
|
2136
2139
|
- \`xc what's the right caching strategy here?\` \u2192 \`mcp__crosscheck__${DEFAULT_TOOL}({ question: "what's the right caching strategy here?" })\` (no tool name match \u2192 default to ${DEFAULT_TOOL})
|
|
2137
2140
|
- \`XC how risky is this refactor?\` \u2192 same default-to-${DEFAULT_TOOL} behavior
|
|
2138
2141
|
|
|
@@ -12225,7 +12228,7 @@ var CHECK_INTERVAL_SECONDS = 3 * 24 * 60 * 60;
|
|
|
12225
12228
|
var DEFAULT_PACKAGE = "crosscheck-cli";
|
|
12226
12229
|
var FETCH_TIMEOUT_MS = 3e3;
|
|
12227
12230
|
function engineVersion() {
|
|
12228
|
-
return true ? "0.2.
|
|
12231
|
+
return true ? "0.2.2" : "0.0.0-dev";
|
|
12229
12232
|
}
|
|
12230
12233
|
function defaultUpdateCachePath() {
|
|
12231
12234
|
const base = process.env["CROSSCHECK_DATA_DIR"] || import_node_path13.default.join(import_node_os2.default.homedir() || import_node_os2.default.tmpdir(), ".crosscheck");
|
|
@@ -12643,6 +12646,267 @@ async function runTriangulate(args, opts) {
|
|
|
12643
12646
|
return result;
|
|
12644
12647
|
}
|
|
12645
12648
|
|
|
12649
|
+
// src/core/help-catalog.ts
|
|
12650
|
+
init_cjs_shims();
|
|
12651
|
+
var SUITE_OVERVIEW = "Crosscheck is a multi-LLM orchestration layer for your terminal. It runs structured patterns \u2014 ask a panel in parallel, debate, cross-examine, plan, audit, build \u2014 across Anthropic, OpenAI, Google (Gemini), xAI (Grok), Mistral, Groq, and DeepSeek, using your own API keys. You invoke it from Claude Code with an `xc` (or `XC`) prefix, e.g. `xc debate <topic>`. A bare `xc <question>` with no command defaults to `confer` (ask the whole panel).";
|
|
12652
|
+
var HELP_CATEGORIES = [
|
|
12653
|
+
"Ask & deliberate",
|
|
12654
|
+
"Plan, build & review",
|
|
12655
|
+
"Single-shot utilities",
|
|
12656
|
+
"Memory & introspection",
|
|
12657
|
+
"Operations",
|
|
12658
|
+
"Help"
|
|
12659
|
+
];
|
|
12660
|
+
var HELP_CATALOG = [
|
|
12661
|
+
// ── Ask & deliberate ──────────────────────────────────────────────
|
|
12662
|
+
{
|
|
12663
|
+
name: "confer",
|
|
12664
|
+
category: "Ask & deliberate",
|
|
12665
|
+
primaryArg: "question",
|
|
12666
|
+
summary: "Ask the whole panel the same question in parallel and see every answer.",
|
|
12667
|
+
example: "xc confer what's the best caching strategy for this API?",
|
|
12668
|
+
detail: "Sends your question to every active provider at once and returns each model's answer side by side (plus an optional synthesis). Best for a fast, diverse read on an open question. This is also the default when you type `xc <something>` with no command."
|
|
12669
|
+
},
|
|
12670
|
+
{
|
|
12671
|
+
name: "debate",
|
|
12672
|
+
category: "Ask & deliberate",
|
|
12673
|
+
primaryArg: "topic",
|
|
12674
|
+
summary: "Bounded multi-round debate between models, ending in a synthesized recommendation.",
|
|
12675
|
+
example: "xc debate should we adopt a monorepo?",
|
|
12676
|
+
detail: `The panel argues across a few rounds \u2014 each model sees the others' prior turns, concedes or pushes back \u2014 then a moderator synthesizes a single grounded recommendation. Supports reasoning:"max" to bump the moderator synthesis seat to Fable 5. Great for contentious or trade-off-heavy calls.`
|
|
12677
|
+
},
|
|
12678
|
+
{
|
|
12679
|
+
name: "coordinate",
|
|
12680
|
+
category: "Ask & deliberate",
|
|
12681
|
+
primaryArg: "question",
|
|
12682
|
+
summary: "Proposer \u2192 critics \u2192 synthesizer pipeline for a vetted answer.",
|
|
12683
|
+
example: "xc coordinate design a rate limiter for our gateway",
|
|
12684
|
+
detail: "One model drafts a proposal, others critique it, and a synthesizer merges the critique into a final answer. More structured than confer/debate when you want a single reviewed deliverable rather than a spread of opinions."
|
|
12685
|
+
},
|
|
12686
|
+
{
|
|
12687
|
+
name: "triangulate",
|
|
12688
|
+
category: "Ask & deliberate",
|
|
12689
|
+
primaryArg: "question",
|
|
12690
|
+
summary: "Consensus + weighted confidence + a minority report across the panel.",
|
|
12691
|
+
example: "xc triangulate is this migration plan safe to ship Friday?",
|
|
12692
|
+
detail: "Runs the coordinate pipeline and reports where the panel agrees (consensus + weighted confidence), the key claims, and a minority report of dissenting views. Best when you need a defensible, confidence-scored verdict and want to see what the outliers think."
|
|
12693
|
+
},
|
|
12694
|
+
// ── Plan, build & review ──────────────────────────────────────────
|
|
12695
|
+
{
|
|
12696
|
+
name: "plan",
|
|
12697
|
+
category: "Plan, build & review",
|
|
12698
|
+
primaryArg: "goal",
|
|
12699
|
+
summary: "Collaborative step-by-step plan (steps, risks, alternatives) across models.",
|
|
12700
|
+
example: "xc plan migrate our REST API to gRPC",
|
|
12701
|
+
detail: 'Produces a numbered plan with risks and alternatives considered, built on the debate engine. Supports reasoning:"max" to run the plan synthesis on Fable 5 for the hardest planning.'
|
|
12702
|
+
},
|
|
12703
|
+
{
|
|
12704
|
+
name: "audit",
|
|
12705
|
+
category: "Plan, build & review",
|
|
12706
|
+
primaryArg: "output_to_audit",
|
|
12707
|
+
summary: "Score a piece of output against a rubric (single- or multi-judge).",
|
|
12708
|
+
example: "xc audit <paste a design doc or diff>",
|
|
12709
|
+
detail: 'An independent auditor (or a panel of judges) scores the given output against a rubric \u2014 correctness, clarity, security, etc. \u2014 and returns per-item pass/fail with rationale and an overall score. reasoning:"max" runs the auditor on Fable 5.'
|
|
12710
|
+
},
|
|
12711
|
+
{
|
|
12712
|
+
name: "review",
|
|
12713
|
+
category: "Plan, build & review",
|
|
12714
|
+
primaryArg: "output_to_audit",
|
|
12715
|
+
summary: "Lighter-weight peer review of output; narrative feedback.",
|
|
12716
|
+
example: "xc review this function for edge cases",
|
|
12717
|
+
detail: "A less formal cousin of audit: the panel reads your output and returns prose feedback rather than a scored rubric. Good for a quick second set of eyes."
|
|
12718
|
+
},
|
|
12719
|
+
{
|
|
12720
|
+
name: "critique",
|
|
12721
|
+
category: "Plan, build & review",
|
|
12722
|
+
primaryArg: "output_to_audit",
|
|
12723
|
+
summary: "Focused, pointed critique of a specific artifact.",
|
|
12724
|
+
example: "xc critique our onboarding email copy",
|
|
12725
|
+
detail: "Asks the panel to find what's weak, wrong, or missing in the given artifact. Sharper and more adversarial than review."
|
|
12726
|
+
},
|
|
12727
|
+
{
|
|
12728
|
+
name: "orchestrate",
|
|
12729
|
+
category: "Plan, build & review",
|
|
12730
|
+
primaryArg: "goal",
|
|
12731
|
+
summary: "Plan a task DAG and execute it across models, then recombine.",
|
|
12732
|
+
example: "xc orchestrate build a landing page with copy, layout, and SEO",
|
|
12733
|
+
detail: 'Decomposes a goal into a dependency graph of subtasks, runs them across providers (in parallel where possible), then synthesizes the results. reasoning:"max" runs the recombine/synthesis seat on Fable 5.'
|
|
12734
|
+
},
|
|
12735
|
+
{
|
|
12736
|
+
name: "create",
|
|
12737
|
+
category: "Plan, build & review",
|
|
12738
|
+
primaryArg: "instruction",
|
|
12739
|
+
summary: "End-to-end macro: scope \u2192 build \u2192 review \u2192 audit.",
|
|
12740
|
+
example: "xc create a Python script that dedupes a CSV by email",
|
|
12741
|
+
detail: "The full lifecycle in one call \u2014 scopes the work, builds it, reviews, and audits the result. Use `create_cheap` for the same flow routed through cheaper models."
|
|
12742
|
+
},
|
|
12743
|
+
{
|
|
12744
|
+
name: "create_cheap",
|
|
12745
|
+
category: "Plan, build & review",
|
|
12746
|
+
primaryArg: "instruction",
|
|
12747
|
+
summary: "Like create, but routes work through the cheap-tier model ladder.",
|
|
12748
|
+
example: "xc create_cheap a regex that validates US phone numbers",
|
|
12749
|
+
detail: "Same scope \u2192 build \u2192 review \u2192 audit lifecycle as create, but uses the cheap tier (e.g. Gemini 3.5 Flash, GPT-5-mini, Claude Haiku) to keep cost down for routine work."
|
|
12750
|
+
},
|
|
12751
|
+
// ── Single-shot utilities ─────────────────────────────────────────
|
|
12752
|
+
{
|
|
12753
|
+
name: "pick",
|
|
12754
|
+
category: "Single-shot utilities",
|
|
12755
|
+
primaryArg: "prompt",
|
|
12756
|
+
summary: "Have the panel vote among options and return the winner + tally.",
|
|
12757
|
+
example: "xc pick Postgres vs MySQL vs SQLite for a single-tenant app",
|
|
12758
|
+
detail: "Give it a decision + options (and optional criteria); each model votes, and you get the winning choice with the per-provider tally and rationale."
|
|
12759
|
+
},
|
|
12760
|
+
{
|
|
12761
|
+
name: "solve",
|
|
12762
|
+
category: "Single-shot utilities",
|
|
12763
|
+
primaryArg: "prompt",
|
|
12764
|
+
summary: "Iterative solver: generate \u2192 verify \u2192 retry until it passes.",
|
|
12765
|
+
example: "xc solve write a function that parses ISO-8601 durations (with tests)",
|
|
12766
|
+
detail: 'Generates a solution, runs it against a verifier (regex or a sandboxed shell command), and retries with the failure feedback until it passes or hits max attempts. With a target path it returns a unified-diff patch. reasoning:"max" routes the solver to Fable 5.'
|
|
12767
|
+
},
|
|
12768
|
+
{
|
|
12769
|
+
name: "verify",
|
|
12770
|
+
category: "Single-shot utilities",
|
|
12771
|
+
primaryArg: "expr",
|
|
12772
|
+
summary: "Check a claim/expression and return a structured true/false verdict.",
|
|
12773
|
+
example: "xc verify 2^10 > 1000",
|
|
12774
|
+
detail: "Evaluates a factual or logical expression and returns a structured verdict with reasoning. Some checks (shell, URL-head) can run in a sandbox."
|
|
12775
|
+
},
|
|
12776
|
+
{
|
|
12777
|
+
name: "fetch",
|
|
12778
|
+
category: "Single-shot utilities",
|
|
12779
|
+
primaryArg: "url",
|
|
12780
|
+
summary: "Fetch a URL's content for use as grounding context.",
|
|
12781
|
+
example: "xc fetch https://example.com/spec",
|
|
12782
|
+
detail: "Retrieves and cleans a URL's content so it can be fed into other tools as context. Subject to the configured fetch/egress policy."
|
|
12783
|
+
},
|
|
12784
|
+
// ── Memory & introspection ────────────────────────────────────────
|
|
12785
|
+
{
|
|
12786
|
+
name: "recall",
|
|
12787
|
+
category: "Memory & introspection",
|
|
12788
|
+
primaryArg: "query",
|
|
12789
|
+
summary: "Search past sessions/transcripts for prior work.",
|
|
12790
|
+
example: "xc recall what did we decide about auth tokens?",
|
|
12791
|
+
detail: "Full-text search over archived transcripts and session memory so the panel (and you) can pick up prior decisions. Requires local storage."
|
|
12792
|
+
},
|
|
12793
|
+
{
|
|
12794
|
+
name: "session_memory",
|
|
12795
|
+
category: "Memory & introspection",
|
|
12796
|
+
primaryArg: "action",
|
|
12797
|
+
summary: "Read/write carry-forward notes that persist across a session.",
|
|
12798
|
+
example: "xc session_memory list",
|
|
12799
|
+
detail: "Stores and retrieves durable notes for the current session so multi-step work keeps context. Requires local storage."
|
|
12800
|
+
},
|
|
12801
|
+
{
|
|
12802
|
+
name: "scoreboard",
|
|
12803
|
+
category: "Memory & introspection",
|
|
12804
|
+
primaryArg: "(none)",
|
|
12805
|
+
summary: "Leaderboard of provider win-rates, usage, and stats.",
|
|
12806
|
+
example: "xc scoreboard",
|
|
12807
|
+
detail: "Aggregates ballots, delegations, and usage across your history into a per-provider leaderboard. Powers the smart router's weighting. Requires local storage."
|
|
12808
|
+
},
|
|
12809
|
+
{
|
|
12810
|
+
name: "explain",
|
|
12811
|
+
category: "Memory & introspection",
|
|
12812
|
+
primaryArg: "session_id",
|
|
12813
|
+
summary: "Break down what a session/tool call did, cost, and timing.",
|
|
12814
|
+
example: "xc explain the last debate",
|
|
12815
|
+
detail: "Returns a per-purpose and per-provider breakdown of calls, tokens, cost, and wall/cpu time for a session or run. Requires local storage."
|
|
12816
|
+
},
|
|
12817
|
+
// ── Operations ────────────────────────────────────────────────────
|
|
12818
|
+
{
|
|
12819
|
+
name: "list_providers",
|
|
12820
|
+
category: "Operations",
|
|
12821
|
+
primaryArg: "(none)",
|
|
12822
|
+
summary: "Show configured providers, their default models, and active status.",
|
|
12823
|
+
example: "xc list_providers",
|
|
12824
|
+
detail: "Lists every provider Crosscheck knows about, which have keys configured, each one's default model, and whether it's active in the panel."
|
|
12825
|
+
},
|
|
12826
|
+
{
|
|
12827
|
+
name: "recommend_panel",
|
|
12828
|
+
category: "Operations",
|
|
12829
|
+
primaryArg: "task",
|
|
12830
|
+
summary: "Suggest which providers/models to use for a given task.",
|
|
12831
|
+
example: "xc recommend_panel a security audit of a smart contract",
|
|
12832
|
+
detail: "Recommends a panel composition (which providers + tiers) suited to the task, using historical performance where available."
|
|
12833
|
+
},
|
|
12834
|
+
{
|
|
12835
|
+
name: "delegate",
|
|
12836
|
+
category: "Operations",
|
|
12837
|
+
primaryArg: "task",
|
|
12838
|
+
summary: "Route a task to the single best-fit provider instead of the whole panel.",
|
|
12839
|
+
example: "xc delegate summarize this 40-page RFC",
|
|
12840
|
+
detail: "Picks the most suitable single model for the task (by capability + scoreboard weighting) and runs it there \u2014 cheaper than a full panel when one voice is enough."
|
|
12841
|
+
},
|
|
12842
|
+
{
|
|
12843
|
+
name: "bench",
|
|
12844
|
+
category: "Operations",
|
|
12845
|
+
primaryArg: "(none)",
|
|
12846
|
+
summary: "Run provider benchmarks against golden tasks.",
|
|
12847
|
+
example: "xc bench",
|
|
12848
|
+
detail: "Runs the configured golden benchmark set across providers to measure quality/latency/cost, feeding the scoreboard."
|
|
12849
|
+
},
|
|
12850
|
+
{
|
|
12851
|
+
name: "config_pin",
|
|
12852
|
+
category: "Operations",
|
|
12853
|
+
primaryArg: "action",
|
|
12854
|
+
summary: "Pin/verify the hash of canonical config files (pricing, config).",
|
|
12855
|
+
example: "xc config_pin status",
|
|
12856
|
+
detail: "Manages a ledger of expected config-file hashes so unexpected drift in pricing.json / crosscheck.config.json is detected."
|
|
12857
|
+
},
|
|
12858
|
+
{
|
|
12859
|
+
name: "update_crosscheck",
|
|
12860
|
+
category: "Operations",
|
|
12861
|
+
primaryArg: "(none)",
|
|
12862
|
+
summary: "Check for and report available Crosscheck updates.",
|
|
12863
|
+
example: "xc update_crosscheck",
|
|
12864
|
+
detail: "Checks whether a newer crosscheck-cli / engine is published and tells you how to upgrade."
|
|
12865
|
+
},
|
|
12866
|
+
// ── Help ──────────────────────────────────────────────────────────
|
|
12867
|
+
{
|
|
12868
|
+
name: "help",
|
|
12869
|
+
category: "Help",
|
|
12870
|
+
primaryArg: "command",
|
|
12871
|
+
summary: "List all commands, or explain one in detail.",
|
|
12872
|
+
example: "xc help \xB7 xc help debate",
|
|
12873
|
+
detail: "`xc help` lists every command grouped by category. `xc help <command>` shows the full description, primary argument, and an example for that one command."
|
|
12874
|
+
}
|
|
12875
|
+
];
|
|
12876
|
+
var BY_NAME = new Map(HELP_CATALOG.map((e) => [e.name, e]));
|
|
12877
|
+
function lookupHelp(command) {
|
|
12878
|
+
const c = command.trim().toLowerCase().replace(/^xc\s+/, "").replace(/[^a-z_]/g, "");
|
|
12879
|
+
return BY_NAME.get(c) ?? null;
|
|
12880
|
+
}
|
|
12881
|
+
function renderHelpOverview() {
|
|
12882
|
+
const lines = [SUITE_OVERVIEW, ""];
|
|
12883
|
+
const nameW = Math.max(...HELP_CATALOG.map((e) => e.name.length));
|
|
12884
|
+
for (const category of HELP_CATEGORIES) {
|
|
12885
|
+
const entries = HELP_CATALOG.filter((e) => e.category === category);
|
|
12886
|
+
if (entries.length === 0) continue;
|
|
12887
|
+
lines.push(`${category}:`);
|
|
12888
|
+
for (const e of entries) {
|
|
12889
|
+
lines.push(` xc ${e.name.padEnd(nameW)} ${e.summary}`);
|
|
12890
|
+
}
|
|
12891
|
+
lines.push("");
|
|
12892
|
+
}
|
|
12893
|
+
lines.push("Run `xc help <command>` for details on any one command (e.g. `xc help debate`).");
|
|
12894
|
+
lines.push(
|
|
12895
|
+
'Tip: a bare `xc <question>` with no command asks the whole panel (confer). Reasoning tools (plan, solve, debate, orchestrate, audit, triangulate) accept reasoning:"max" to bump the lead seat to Fable 5.'
|
|
12896
|
+
);
|
|
12897
|
+
return lines.join("\n");
|
|
12898
|
+
}
|
|
12899
|
+
function renderHelpCommand(entry) {
|
|
12900
|
+
return [
|
|
12901
|
+
`xc ${entry.name} \u2014 ${entry.summary}`,
|
|
12902
|
+
"",
|
|
12903
|
+
entry.detail,
|
|
12904
|
+
"",
|
|
12905
|
+
`Primary argument: ${entry.primaryArg}`,
|
|
12906
|
+
`Example: ${entry.example}`
|
|
12907
|
+
].join("\n");
|
|
12908
|
+
}
|
|
12909
|
+
|
|
12646
12910
|
// src/tools/index.ts
|
|
12647
12911
|
function defineTool(opts) {
|
|
12648
12912
|
return {
|
|
@@ -12685,6 +12949,49 @@ function zodToJsonSchema(schema) {
|
|
|
12685
12949
|
if (schema instanceof import_zod.z.ZodDefault) return zodToJsonSchema(schema._def.innerType);
|
|
12686
12950
|
return {};
|
|
12687
12951
|
}
|
|
12952
|
+
function helpTool() {
|
|
12953
|
+
return defineTool({
|
|
12954
|
+
name: "help",
|
|
12955
|
+
description: 'List all Crosscheck commands and what they do, or explain one command. Call with no args for the full catalog; pass `command` (e.g. "debate") for detail on a single command. Routed from `xc help` / `xc help <command>`.',
|
|
12956
|
+
schema: import_zod.z.object({ command: import_zod.z.string().optional() }),
|
|
12957
|
+
handler: async ({ command }) => {
|
|
12958
|
+
const query = (command ?? "").trim();
|
|
12959
|
+
if (query) {
|
|
12960
|
+
const entry = lookupHelp(query);
|
|
12961
|
+
if (entry) {
|
|
12962
|
+
return {
|
|
12963
|
+
tool: "help",
|
|
12964
|
+
command: entry.name,
|
|
12965
|
+
summary: entry.summary,
|
|
12966
|
+
detail: entry.detail,
|
|
12967
|
+
primary_arg: entry.primaryArg,
|
|
12968
|
+
example: entry.example,
|
|
12969
|
+
display_text: renderHelpCommand(entry)
|
|
12970
|
+
};
|
|
12971
|
+
}
|
|
12972
|
+
return {
|
|
12973
|
+
tool: "help",
|
|
12974
|
+
unknown_command: query,
|
|
12975
|
+
commands: HELP_CATALOG.map((e) => e.name),
|
|
12976
|
+
display_text: `Unknown command "${query}". Here are all Crosscheck commands:
|
|
12977
|
+
|
|
12978
|
+
` + renderHelpOverview()
|
|
12979
|
+
};
|
|
12980
|
+
}
|
|
12981
|
+
return {
|
|
12982
|
+
tool: "help",
|
|
12983
|
+
overview: SUITE_OVERVIEW,
|
|
12984
|
+
commands: HELP_CATALOG.map((e) => ({
|
|
12985
|
+
name: e.name,
|
|
12986
|
+
category: e.category,
|
|
12987
|
+
summary: e.summary,
|
|
12988
|
+
example: e.example
|
|
12989
|
+
})),
|
|
12990
|
+
display_text: renderHelpOverview()
|
|
12991
|
+
};
|
|
12992
|
+
}
|
|
12993
|
+
});
|
|
12994
|
+
}
|
|
12688
12995
|
function registerCoreTools(opts = {}) {
|
|
12689
12996
|
const o = opts && typeof opts === "object" && "toolNames" in opts ? { bridge: opts } : opts;
|
|
12690
12997
|
const tools = /* @__PURE__ */ new Map();
|
|
@@ -12806,7 +13113,8 @@ function registerCoreTools(opts = {}) {
|
|
|
12806
13113
|
o.nodeCache
|
|
12807
13114
|
),
|
|
12808
13115
|
createTool(o, "create", false),
|
|
12809
|
-
createTool(o, "create_cheap", true)
|
|
13116
|
+
createTool(o, "create_cheap", true),
|
|
13117
|
+
helpTool()
|
|
12810
13118
|
];
|
|
12811
13119
|
for (const t of list) tools.set(t.name, t);
|
|
12812
13120
|
return tools;
|
|
@@ -13772,15 +14080,18 @@ async function flush() {
|
|
|
13772
14080
|
|
|
13773
14081
|
// src/server.ts
|
|
13774
14082
|
var SERVER_NAME = "crosscheck-agent";
|
|
13775
|
-
var SERVER_VERSION = true ? "0.2.
|
|
14083
|
+
var SERVER_VERSION = true ? "0.2.2" : "0.0.0-dev";
|
|
13776
14084
|
function extractRunSummaryText(out) {
|
|
13777
14085
|
if (out === null || typeof out !== "object" || Array.isArray(out)) return void 0;
|
|
13778
|
-
const
|
|
13779
|
-
|
|
13780
|
-
|
|
13781
|
-
|
|
13782
|
-
|
|
13783
|
-
|
|
14086
|
+
const rec = out;
|
|
14087
|
+
const rs = rec["run_summary"];
|
|
14088
|
+
if (rs !== null && typeof rs === "object" && !Array.isArray(rs)) {
|
|
14089
|
+
const text = rs["text"];
|
|
14090
|
+
if (typeof text === "string" && text.trim() !== "") return text;
|
|
14091
|
+
}
|
|
14092
|
+
const display = rec["display_text"];
|
|
14093
|
+
if (typeof display === "string" && display.trim() !== "") return display;
|
|
14094
|
+
return void 0;
|
|
13784
14095
|
}
|
|
13785
14096
|
function createServer(opts = {}) {
|
|
13786
14097
|
const server = new import_server2.Server(
|