@splithub/mcp 0.1.1 → 0.1.3
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/index.js +12 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -87,15 +87,16 @@ function reply(r, fallback = "") {
|
|
|
87
87
|
}
|
|
88
88
|
return { content: [{ type: "text", text: r.json ? JSON.stringify(r.json, null, 2) : r.stdout.trim() || fallback }] };
|
|
89
89
|
}
|
|
90
|
-
server.tool("splithub_status", "Every experiment of this project with status, visitors, days and the verdict headline. Start here.", {}, async () => reply(await runCli(["status"])));
|
|
91
|
-
server.tool("splithub_results", "Full verdict for one experiment: sample per variant, lift, p-value, confidence interval, P(beat), SRM, winner. Report verdict.message verbatim.", { experiment: z.string().describe("experiment id (key)") }, async ({ experiment }) => reply(await runCli(["results", experiment])));
|
|
90
|
+
server.tool("splithub_status", "Every experiment of this project with status, visitors, days and the verdict headline. Start here. A finished experiment is over but its variants are still in the code: report its verdict, ask the user which variant to keep and whether to remove the test from the code, then follow the splithub-ship skill.", {}, async () => reply(await runCli(["status"])));
|
|
91
|
+
server.tool("splithub_results", "Full verdict for one experiment: sample per variant, lift, p-value, confidence interval, P(beat), SRM, winner; multivariate experiments add factors[] (each factor on its own). Report verdict.message verbatim. If status is finished, ask the user which variant to keep and whether to clean the test out of the code (splithub-ship skill).", { experiment: z.string().describe("experiment id (key)") }, async ({ experiment }) => reply(await runCli(["results", experiment])));
|
|
92
92
|
server.tool(
|
|
93
93
|
"splithub_create_experiment",
|
|
94
|
-
"Add an experiment to splithub.config.ts (starts as draft). kind: value (text/number/URL read with useValue), component (<Experiment>/<Variant> markup), redirect (match path + per-variant destination). First variant is the control.",
|
|
94
|
+
"Add an experiment to splithub.config.ts (starts as draft; runDraftsInDev: true in the config serves drafts in development). kind: value (text/number/URL read with useValue), component (<Experiment>/<Variant> markup), redirect (match path + per-variant destination), mvt (multivariate: factors instead of variants, every combination tested, read with useValue as { factor: value }). First variant / first level is the control.",
|
|
95
95
|
{
|
|
96
96
|
id: z.string().regex(/^[a-z0-9][a-z0-9_-]{0,63}$/).describe("experiment key, lowercase"),
|
|
97
|
-
kind: z.enum(["value", "component", "redirect"]),
|
|
98
|
-
variants: z.array(z.string()).min(2).describe("variant keys, first = control"),
|
|
97
|
+
kind: z.enum(["value", "component", "redirect", "mvt"]),
|
|
98
|
+
variants: z.array(z.string()).min(2).optional().describe("variant keys, first = control (not for mvt)"),
|
|
99
|
+
factors: z.record(z.record(z.string())).optional().describe('mvt only: factor \u2192 level \u2192 value, e.g. { headline: { old: "Old", new: "New" }, button: { blue: "#2563eb", green: "#16a34a" } }; first level = control; at most 4 factors \xD7 4 levels'),
|
|
99
100
|
weights: z.array(z.number()).optional().describe("relative weights, same order as variants"),
|
|
100
101
|
goal: z.string().optional().describe("goal key from the config"),
|
|
101
102
|
values: z.record(z.string()).optional().describe("value experiments: variant \u2192 value"),
|
|
@@ -105,7 +106,10 @@ server.tool(
|
|
|
105
106
|
description: z.string().optional()
|
|
106
107
|
},
|
|
107
108
|
async (a) => {
|
|
108
|
-
const args = ["create", "--kind", a.kind, "--id", a.id, "--
|
|
109
|
+
const args = ["create", "--kind", a.kind, "--id", a.id, "--yes"];
|
|
110
|
+
if (a.kind === "mvt") {
|
|
111
|
+
for (const [factor, levels] of Object.entries(a.factors ?? {})) args.push("--factor", `${factor}=${Object.entries(levels).map(([l, v]) => `${l}:${v}`).join(",")}`);
|
|
112
|
+
} else args.push("--variants", (a.variants ?? ["control", "b"]).join(","));
|
|
109
113
|
if (a.weights) args.push("--weights", a.weights.join(","));
|
|
110
114
|
if (a.goal) args.push("--goal", a.goal);
|
|
111
115
|
if (a.values) for (const [k, v] of Object.entries(a.values)) args.push("--value", `${k}=${v}`);
|
|
@@ -116,11 +120,11 @@ server.tool(
|
|
|
116
120
|
return reply(await runCli(args));
|
|
117
121
|
}
|
|
118
122
|
);
|
|
119
|
-
server.tool("splithub_set_status", "Start, pause or finish an experiment. In cloud mode it applies live within a minute; the config file is updated too.", { experiment: z.string(), status: z.enum(["running", "paused", "finished"]) }, async ({ experiment, status }) => {
|
|
123
|
+
server.tool("splithub_set_status", "Start, pause or finish an experiment. In cloud mode it applies live within a minute; the config file is updated too. After finishing, the variants are still in the code: ask the user which variant to keep and whether to remove the test from the code, then follow the splithub-ship skill.", { experiment: z.string(), status: z.enum(["running", "paused", "finished"]) }, async ({ experiment, status }) => {
|
|
120
124
|
const cmd = status === "running" ? "start" : status === "paused" ? "pause" : "finish";
|
|
121
125
|
return reply(await runCli([cmd, experiment]));
|
|
122
126
|
});
|
|
123
|
-
server.tool("splithub_review", "AI reviews of an experiment stored in SplitHub Cloud (Pro): written
|
|
127
|
+
server.tool("splithub_review", "AI reviews of an experiment stored in SplitHub Cloud (Pro): written at the start, when the verdict changes while it runs, when it finishes, or on demand in the dashboard. Newest first.", { experiment: z.string().optional().describe("experiment id; omit for every experiment of the project") }, async ({ experiment }) => reply(await runCli(experiment ? ["review", experiment] : ["review"])));
|
|
124
128
|
server.tool("splithub_push", "Upload splithub.config.ts to SplitHub Cloud (cloud mode). Returns experiments created in the dashboard that were written into the file.", {}, async () => reply(await runCli(["push"])));
|
|
125
129
|
server.tool("splithub_pull", "Fetch the cloud config and write dashboard-created experiments into splithub.config.ts.", {}, async () => reply(await runCli(["pull"])));
|
|
126
130
|
server.tool("splithub_doctor", "Check the installation: config, provider, middleware, routes, code references, endpoint.", {}, async () => reply(await runCli(["doctor"])));
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/cli.ts"],"sourcesContent":["// @splithub/mcp — stdio MCP server exposing the splithub CLI as tools.\n//\n// { \"mcpServers\": { \"splithub\": { \"command\": \"npx\", \"args\": [\"-y\", \"@splithub/mcp\"] } } }\n//\n// Every tool runs `splithub <command> --json` in SPLITHUB_PROJECT_DIR (default:\n// the client's working directory), so the agent sees exactly what a human\n// would get from the terminal, with the same config file and credentials.\n\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport { z } from 'zod';\nimport { runCli, startLogin, type CliResult } from './cli.js';\n\nconst server = new McpServer({ name: 'splithub', version: '0.1.0' });\n\ntype ToolReply = { content: Array<{ type: 'text'; text: string }>; isError?: boolean };\n\nfunction reply(r: CliResult, fallback = ''): ToolReply {\n if (r.code !== 0) {\n const text = (r.stderr || r.stdout || fallback).trim();\n const hint = /not logged in|API key required|login/i.test(text) ? '\\n\\nThis folder is not connected to SplitHub Cloud: call splithub_login, show the link to the user, wait for their approval, then retry.' : '';\n return { content: [{ type: 'text', text: `${text}${hint}` }], isError: true };\n }\n return { content: [{ type: 'text', text: r.json ? JSON.stringify(r.json, null, 2) : r.stdout.trim() || fallback }] };\n}\n\nserver.tool('splithub_status', 'Every experiment of this project with status, visitors, days and the verdict headline. Start here.', {}, async () => reply(await runCli(['status'])));\n\nserver.tool('splithub_results', 'Full verdict for one experiment: sample per variant, lift, p-value, confidence interval, P(beat), SRM, winner. Report verdict.message verbatim.', { experiment: z.string().describe('experiment id (key)') }, async ({ experiment }) => reply(await runCli(['results', experiment])));\n\nserver.tool(\n 'splithub_create_experiment',\n 'Add an experiment to splithub.config.ts (starts as draft). kind: value (text/number/URL read with useValue), component (<Experiment>/<Variant> markup), redirect (match path + per-variant destination). First variant is the control.',\n {\n id: z.string().regex(/^[a-z0-9][a-z0-9_-]{0,63}$/).describe('experiment key, lowercase'),\n kind: z.enum(['value', 'component', 'redirect']),\n variants: z.array(z.string()).min(2).describe('variant keys, first = control'),\n weights: z.array(z.number()).optional().describe('relative weights, same order as variants'),\n goal: z.string().optional().describe('goal key from the config'),\n values: z.record(z.string()).optional().describe('value experiments: variant → value'),\n match: z.string().optional().describe('redirect experiments: path to test, e.g. /'),\n to: z.record(z.string()).optional().describe('redirect experiments: variant → destination path'),\n status: z.enum(['draft', 'running']).optional(),\n description: z.string().optional(),\n },\n async (a) => {\n const args = ['create', '--kind', a.kind, '--id', a.id, '--variants', a.variants.join(','), '--yes'];\n if (a.weights) args.push('--weights', a.weights.join(','));\n if (a.goal) args.push('--goal', a.goal);\n if (a.values) for (const [k, v] of Object.entries(a.values)) args.push('--value', `${k}=${v}`);\n if (a.match) args.push('--match', a.match);\n if (a.to) for (const [k, v] of Object.entries(a.to)) args.push('--to', `${k}=${v}`);\n if (a.status) args.push('--status', a.status);\n if (a.description) args.push('--description', a.description);\n return reply(await runCli(args));\n }\n);\n\nserver.tool('splithub_set_status', 'Start, pause or finish an experiment. In cloud mode it applies live within a minute; the config file is updated too.', { experiment: z.string(), status: z.enum(['running', 'paused', 'finished']) }, async ({ experiment, status }) => {\n const cmd = status === 'running' ? 'start' : status === 'paused' ? 'pause' : 'finish';\n return reply(await runCli([cmd, experiment]));\n});\n\nserver.tool('splithub_review', 'AI reviews of an experiment stored in SplitHub Cloud (Pro): written when it finishes, daily while it runs, or on demand in the dashboard. Newest first.', { experiment: z.string().optional().describe('experiment id; omit for every experiment of the project') }, async ({ experiment }) => reply(await runCli(experiment ? ['review', experiment] : ['review'])));\n\nserver.tool('splithub_push', 'Upload splithub.config.ts to SplitHub Cloud (cloud mode). Returns experiments created in the dashboard that were written into the file.', {}, async () => reply(await runCli(['push'])));\nserver.tool('splithub_pull', 'Fetch the cloud config and write dashboard-created experiments into splithub.config.ts.', {}, async () => reply(await runCli(['pull'])));\nserver.tool('splithub_doctor', 'Check the installation: config, provider, middleware, routes, code references, endpoint.', {}, async () => reply(await runCli(['doctor'])));\nserver.tool('splithub_whoami', 'Which cloud project this folder is connected to, and its public key.', {}, async () => reply(await runCli(['whoami'])));\n\nserver.tool('splithub_login', 'Connect this folder to SplitHub Cloud. Returns a sign-in link and a code: show them to the user, who approves in the browser (and can create a project there). The CLI then stores a project API key for this folder. Call splithub_whoami afterwards.', {}, async () => {\n const r = await startLogin();\n if ('error' in r) return { content: [{ type: 'text', text: r.error }], isError: r.error !== 'already logged in' };\n return { content: [{ type: 'text', text: `Open this link to connect: ${r.verifyUrl}\\nCode: ${r.userCode} (expires in ${Math.round(r.expiresIn / 60)} min)\\nWaiting for the approval in the background; call splithub_whoami to check.` }] };\n});\n\nserver.tool('splithub_init', 'Set up SplitHub in this project: config file, framework files, agent skills; in cloud mode also prints a sign-in link (see splithub_login). Use once per project.', { mode: z.enum(['cloud', 'self']).default('cloud'), key: z.string().optional().describe('public key pk_… when known') }, async ({ mode, key }) => {\n const args = ['init', '--mode', mode, '--yes', '--no-install', '--no-login'];\n if (key) args.push('--key', key);\n return reply(await runCli(args, { timeoutMs: 120_000 }));\n});\n\nconst transport = new StdioServerTransport();\nawait server.connect(transport);\n","// Runs the splithub CLI as a child process with --json and parses the reply.\n// The MCP server is a thin layer: credentials, config parsing and the cloud\n// protocol stay in one place (the CLI).\nimport { spawn } from 'node:child_process';\nimport { createRequire } from 'node:module';\n\nconst require = createRequire(import.meta.url);\n\nexport function cliPath(): string {\n if (process.env.SPLITHUB_CLI) return process.env.SPLITHUB_CLI;\n return require.resolve('splithub/dist/index.js');\n}\n\nexport function projectDir(): string {\n return process.env.SPLITHUB_PROJECT_DIR || process.cwd();\n}\n\nexport interface CliResult {\n code: number;\n stdout: string;\n stderr: string;\n json: unknown;\n}\n\nfunction parseJson(text: string): unknown {\n // The CLI may print one JSON document; init/login print several lines (one per step).\n const lines = text\n .split('\\n')\n .map((l) => l.trim())\n .filter((l) => l.startsWith('{') || l.startsWith('['));\n if (lines.length === 0) return null;\n try {\n return JSON.parse(lines[lines.length - 1]!);\n } catch {\n try {\n return JSON.parse(text);\n } catch {\n return null;\n }\n }\n}\n\nexport function runCli(args: string[], options: { timeoutMs?: number } = {}): Promise<CliResult> {\n const extra: string[] = [];\n if (process.env.SPLITHUB_API) extra.push('--api', process.env.SPLITHUB_API);\n return new Promise((resolve) => {\n const child = spawn(process.execPath, [cliPath(), ...args, ...extra, '--json'], { cwd: projectDir(), env: { ...process.env, NO_COLOR: '1' }, stdio: ['ignore', 'pipe', 'pipe'] });\n let stdout = '';\n let stderr = '';\n child.stdout.on('data', (d) => (stdout += d));\n child.stderr.on('data', (d) => (stderr += d));\n const timer = setTimeout(() => child.kill(), options.timeoutMs ?? 60_000);\n child.on('close', (code) => {\n clearTimeout(timer);\n resolve({ code: code ?? 1, stdout, stderr, json: parseJson(stdout) });\n });\n });\n}\n\n/**\n * `login` prints the sign-in link first and then waits (up to 10 min) for the\n * approval. Return the link at once and let the process finish on its own.\n */\nexport function startLogin(): Promise<{ verifyUrl: string; userCode: string; expiresIn: number } | { error: string }> {\n const extra: string[] = [];\n if (process.env.SPLITHUB_API) extra.push('--api', process.env.SPLITHUB_API);\n return new Promise((resolve) => {\n const child = spawn(process.execPath, [cliPath(), 'login', '--yes', ...extra, '--json'], { cwd: projectDir(), env: { ...process.env, NO_COLOR: '1' }, stdio: ['ignore', 'pipe', 'pipe'], detached: false });\n let buf = '';\n let done = false;\n child.stdout.on('data', (d) => {\n buf += d;\n if (done) return;\n for (const line of buf.split('\\n')) {\n if (!line.trim().startsWith('{')) continue;\n try {\n const j = JSON.parse(line) as { step?: string; verifyUrl?: string; userCode?: string; expiresIn?: number; alreadyLoggedIn?: boolean; error?: string };\n if (j.step === 'approve' && j.verifyUrl) {\n done = true;\n resolve({ verifyUrl: j.verifyUrl, userCode: j.userCode ?? '', expiresIn: j.expiresIn ?? 600 });\n } else if (j.alreadyLoggedIn) {\n done = true;\n resolve({ error: 'already logged in' });\n }\n } catch {\n // partial line\n }\n }\n });\n child.on('close', (code) => {\n if (!done) resolve({ error: `login exited with code ${code}: ${buf.slice(0, 300)}` });\n });\n child.unref();\n });\n}\n"],"mappings":";;;AAQA,SAAS,iBAAiB;AAC1B,SAAS,4BAA4B;AACrC,SAAS,SAAS;;;ACPlB,SAAS,aAAa;AACtB,SAAS,qBAAqB;AAE9B,IAAMA,WAAU,cAAc,YAAY,GAAG;AAEtC,SAAS,UAAkB;A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AM,CAAC,EAAE,QAAQ,OAAO,GAAG,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,iCAA4B,EAAE,GAAG,OAAO,EAAE,MAAM,IAAI,MAAM;AAClV,QAAM,OAAO,CAAC,QAAQ,UAAU,MAAM,SAAS,gBAAgB,YAAY;AAC3E,MAAI,IAAK,MAAK,KAAK,SAAS,GAAG;AAC/B,SAAO,MAAM,MAAM,OAAO,MAAM,EAAE,WAAW,KAAQ,CAAC,CAAC;AACzD,CAAC;AAED,IAAM,YAAY,IAAI,qBAAqB;AAC3C,MAAM,OAAO,QAAQ,SAAS;","names":["require"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/cli.ts"],"sourcesContent":["// @splithub/mcp — stdio MCP server exposing the splithub CLI as tools.\n//\n// { \"mcpServers\": { \"splithub\": { \"command\": \"npx\", \"args\": [\"-y\", \"@splithub/mcp\"] } } }\n//\n// Every tool runs `splithub <command> --json` in SPLITHUB_PROJECT_DIR (default:\n// the client's working directory), so the agent sees exactly what a human\n// would get from the terminal, with the same config file and credentials.\n\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport { z } from 'zod';\nimport { runCli, startLogin, type CliResult } from './cli.js';\n\nconst server = new McpServer({ name: 'splithub', version: '0.1.0' });\n\ntype ToolReply = { content: Array<{ type: 'text'; text: string }>; isError?: boolean };\n\nfunction reply(r: CliResult, fallback = ''): ToolReply {\n if (r.code !== 0) {\n const text = (r.stderr || r.stdout || fallback).trim();\n const hint = /not logged in|API key required|login/i.test(text) ? '\\n\\nThis folder is not connected to SplitHub Cloud: call splithub_login, show the link to the user, wait for their approval, then retry.' : '';\n return { content: [{ type: 'text', text: `${text}${hint}` }], isError: true };\n }\n return { content: [{ type: 'text', text: r.json ? JSON.stringify(r.json, null, 2) : r.stdout.trim() || fallback }] };\n}\n\nserver.tool('splithub_status', 'Every experiment of this project with status, visitors, days and the verdict headline. Start here. A finished experiment is over but its variants are still in the code: report its verdict, ask the user which variant to keep and whether to remove the test from the code, then follow the splithub-ship skill.', {}, async () => reply(await runCli(['status'])));\n\nserver.tool('splithub_results', 'Full verdict for one experiment: sample per variant, lift, p-value, confidence interval, P(beat), SRM, winner; multivariate experiments add factors[] (each factor on its own). Report verdict.message verbatim. If status is finished, ask the user which variant to keep and whether to clean the test out of the code (splithub-ship skill).', { experiment: z.string().describe('experiment id (key)') }, async ({ experiment }) => reply(await runCli(['results', experiment])));\n\nserver.tool(\n 'splithub_create_experiment',\n 'Add an experiment to splithub.config.ts (starts as draft; runDraftsInDev: true in the config serves drafts in development). kind: value (text/number/URL read with useValue), component (<Experiment>/<Variant> markup), redirect (match path + per-variant destination), mvt (multivariate: factors instead of variants, every combination tested, read with useValue as { factor: value }). First variant / first level is the control.',\n {\n id: z.string().regex(/^[a-z0-9][a-z0-9_-]{0,63}$/).describe('experiment key, lowercase'),\n kind: z.enum(['value', 'component', 'redirect', 'mvt']),\n variants: z.array(z.string()).min(2).optional().describe('variant keys, first = control (not for mvt)'),\n factors: z.record(z.record(z.string())).optional().describe('mvt only: factor → level → value, e.g. { headline: { old: \"Old\", new: \"New\" }, button: { blue: \"#2563eb\", green: \"#16a34a\" } }; first level = control; at most 4 factors × 4 levels'),\n weights: z.array(z.number()).optional().describe('relative weights, same order as variants'),\n goal: z.string().optional().describe('goal key from the config'),\n values: z.record(z.string()).optional().describe('value experiments: variant → value'),\n match: z.string().optional().describe('redirect experiments: path to test, e.g. /'),\n to: z.record(z.string()).optional().describe('redirect experiments: variant → destination path'),\n status: z.enum(['draft', 'running']).optional(),\n description: z.string().optional(),\n },\n async (a) => {\n const args = ['create', '--kind', a.kind, '--id', a.id, '--yes'];\n if (a.kind === 'mvt') {\n for (const [factor, levels] of Object.entries(a.factors ?? {})) args.push('--factor', `${factor}=${Object.entries(levels).map(([l, v]) => `${l}:${v}`).join(',')}`);\n } else args.push('--variants', (a.variants ?? ['control', 'b']).join(','));\n if (a.weights) args.push('--weights', a.weights.join(','));\n if (a.goal) args.push('--goal', a.goal);\n if (a.values) for (const [k, v] of Object.entries(a.values)) args.push('--value', `${k}=${v}`);\n if (a.match) args.push('--match', a.match);\n if (a.to) for (const [k, v] of Object.entries(a.to)) args.push('--to', `${k}=${v}`);\n if (a.status) args.push('--status', a.status);\n if (a.description) args.push('--description', a.description);\n return reply(await runCli(args));\n }\n);\n\nserver.tool('splithub_set_status', 'Start, pause or finish an experiment. In cloud mode it applies live within a minute; the config file is updated too. After finishing, the variants are still in the code: ask the user which variant to keep and whether to remove the test from the code, then follow the splithub-ship skill.', { experiment: z.string(), status: z.enum(['running', 'paused', 'finished']) }, async ({ experiment, status }) => {\n const cmd = status === 'running' ? 'start' : status === 'paused' ? 'pause' : 'finish';\n return reply(await runCli([cmd, experiment]));\n});\n\nserver.tool('splithub_review', 'AI reviews of an experiment stored in SplitHub Cloud (Pro): written at the start, when the verdict changes while it runs, when it finishes, or on demand in the dashboard. Newest first.', { experiment: z.string().optional().describe('experiment id; omit for every experiment of the project') }, async ({ experiment }) => reply(await runCli(experiment ? ['review', experiment] : ['review'])));\n\nserver.tool('splithub_push', 'Upload splithub.config.ts to SplitHub Cloud (cloud mode). Returns experiments created in the dashboard that were written into the file.', {}, async () => reply(await runCli(['push'])));\nserver.tool('splithub_pull', 'Fetch the cloud config and write dashboard-created experiments into splithub.config.ts.', {}, async () => reply(await runCli(['pull'])));\nserver.tool('splithub_doctor', 'Check the installation: config, provider, middleware, routes, code references, endpoint.', {}, async () => reply(await runCli(['doctor'])));\nserver.tool('splithub_whoami', 'Which cloud project this folder is connected to, and its public key.', {}, async () => reply(await runCli(['whoami'])));\n\nserver.tool('splithub_login', 'Connect this folder to SplitHub Cloud. Returns a sign-in link and a code: show them to the user, who approves in the browser (and can create a project there). The CLI then stores a project API key for this folder. Call splithub_whoami afterwards.', {}, async () => {\n const r = await startLogin();\n if ('error' in r) return { content: [{ type: 'text', text: r.error }], isError: r.error !== 'already logged in' };\n return { content: [{ type: 'text', text: `Open this link to connect: ${r.verifyUrl}\\nCode: ${r.userCode} (expires in ${Math.round(r.expiresIn / 60)} min)\\nWaiting for the approval in the background; call splithub_whoami to check.` }] };\n});\n\nserver.tool('splithub_init', 'Set up SplitHub in this project: config file, framework files, agent skills; in cloud mode also prints a sign-in link (see splithub_login). Use once per project.', { mode: z.enum(['cloud', 'self']).default('cloud'), key: z.string().optional().describe('public key pk_… when known') }, async ({ mode, key }) => {\n const args = ['init', '--mode', mode, '--yes', '--no-install', '--no-login'];\n if (key) args.push('--key', key);\n return reply(await runCli(args, { timeoutMs: 120_000 }));\n});\n\nconst transport = new StdioServerTransport();\nawait server.connect(transport);\n","// Runs the splithub CLI as a child process with --json and parses the reply.\n// The MCP server is a thin layer: credentials, config parsing and the cloud\n// protocol stay in one place (the CLI).\nimport { spawn } from 'node:child_process';\nimport { createRequire } from 'node:module';\n\nconst require = createRequire(import.meta.url);\n\nexport function cliPath(): string {\n if (process.env.SPLITHUB_CLI) return process.env.SPLITHUB_CLI;\n return require.resolve('splithub/dist/index.js');\n}\n\nexport function projectDir(): string {\n return process.env.SPLITHUB_PROJECT_DIR || process.cwd();\n}\n\nexport interface CliResult {\n code: number;\n stdout: string;\n stderr: string;\n json: unknown;\n}\n\nfunction parseJson(text: string): unknown {\n // The CLI may print one JSON document; init/login print several lines (one per step).\n const lines = text\n .split('\\n')\n .map((l) => l.trim())\n .filter((l) => l.startsWith('{') || l.startsWith('['));\n if (lines.length === 0) return null;\n try {\n return JSON.parse(lines[lines.length - 1]!);\n } catch {\n try {\n return JSON.parse(text);\n } catch {\n return null;\n }\n }\n}\n\nexport function runCli(args: string[], options: { timeoutMs?: number } = {}): Promise<CliResult> {\n const extra: string[] = [];\n if (process.env.SPLITHUB_API) extra.push('--api', process.env.SPLITHUB_API);\n return new Promise((resolve) => {\n const child = spawn(process.execPath, [cliPath(), ...args, ...extra, '--json'], { cwd: projectDir(), env: { ...process.env, NO_COLOR: '1' }, stdio: ['ignore', 'pipe', 'pipe'] });\n let stdout = '';\n let stderr = '';\n child.stdout.on('data', (d) => (stdout += d));\n child.stderr.on('data', (d) => (stderr += d));\n const timer = setTimeout(() => child.kill(), options.timeoutMs ?? 60_000);\n child.on('close', (code) => {\n clearTimeout(timer);\n resolve({ code: code ?? 1, stdout, stderr, json: parseJson(stdout) });\n });\n });\n}\n\n/**\n * `login` prints the sign-in link first and then waits (up to 10 min) for the\n * approval. Return the link at once and let the process finish on its own.\n */\nexport function startLogin(): Promise<{ verifyUrl: string; userCode: string; expiresIn: number } | { error: string }> {\n const extra: string[] = [];\n if (process.env.SPLITHUB_API) extra.push('--api', process.env.SPLITHUB_API);\n return new Promise((resolve) => {\n const child = spawn(process.execPath, [cliPath(), 'login', '--yes', ...extra, '--json'], { cwd: projectDir(), env: { ...process.env, NO_COLOR: '1' }, stdio: ['ignore', 'pipe', 'pipe'], detached: false });\n let buf = '';\n let done = false;\n child.stdout.on('data', (d) => {\n buf += d;\n if (done) return;\n for (const line of buf.split('\\n')) {\n if (!line.trim().startsWith('{')) continue;\n try {\n const j = JSON.parse(line) as { step?: string; verifyUrl?: string; userCode?: string; expiresIn?: number; alreadyLoggedIn?: boolean; error?: string };\n if (j.step === 'approve' && j.verifyUrl) {\n done = true;\n resolve({ verifyUrl: j.verifyUrl, userCode: j.userCode ?? '', expiresIn: j.expiresIn ?? 600 });\n } else if (j.alreadyLoggedIn) {\n done = true;\n resolve({ error: 'already logged in' });\n }\n } catch {\n // partial line\n }\n }\n });\n child.on('close', (code) => {\n if (!done) resolve({ error: `login exited with code ${code}: ${buf.slice(0, 300)}` });\n });\n child.unref();\n });\n}\n"],"mappings":";;;AAQA,SAAS,iBAAiB;AAC1B,SAAS,4BAA4B;AACrC,SAAS,SAAS;;;ACPlB,SAAS,aAAa;AACtB,SAAS,qBAAqB;AAE9B,IAAMA,WAAU,cAAc,YAAY,GAAG;AAEtC,SAAS,UAAkB;AAChC,MAAI,QAAQ,IAAI,aAAc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AAM,IAAI,MAAM,WAAW;AAC3B,MAAI,WAAW,EAAG,QAAO,EAAE,SAAS,CAAC,EAAE,MAAM,QAAQ,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EAAE,UAAU,oBAAoB;AAChH,SAAO,EAAE,SAAS,CAAC,EAAE,MAAM,QAAQ,MAAM,8BAA8B,EAAE,SAAS;AAAA,QAAW,EAAE,QAAQ,gBAAgB,KAAK,MAAM,EAAE,YAAY,EAAE,CAAC;AAAA,4EAAoF,CAAC,EAAE;AAC5O,CAAC;AAED,OAAO,KAAK,iBAAiB,qKAAqK,EAAE,MAAM,EAAE,KAAK,CAAC,SAAS,MAAM,CAAC,EAAE,QAAQ,OAAO,GAAG,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,iCAA4B,EAAE,GAAG,OAAO,EAAE,MAAM,IAAI,MAAM;AAClV,QAAM,OAAO,CAAC,QAAQ,UAAU,MAAM,SAAS,gBAAgB,YAAY;AAC3E,MAAI,IAAK,MAAK,KAAK,SAAS,GAAG;AAC/B,SAAO,MAAM,MAAM,OAAO,MAAM,EAAE,WAAW,KAAQ,CAAC,CAAC;AACzD,CAAC;AAED,IAAM,YAAY,IAAI,qBAAqB;AAC3C,MAAM,OAAO,QAAQ,SAAS;","names":["require"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@splithub/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "SplitHub as MCP tools for Claude Code, Cursor and Codex: create tests, start and finish them, read verdicts.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
18
18
|
"zod": "^3.23.8",
|
|
19
|
-
"splithub": "0.1.
|
|
19
|
+
"splithub": "0.1.3"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/node": "^22.13.0",
|