feat: runner accepts git/npx sources, broker delegates extraction
Some checks failed
CI / Lint (push) Has been cancelled
CI / Typecheck (push) Has been cancelled
CI / Broker tests (Postgres) (push) Has been cancelled
CI / Docker build (linux/amd64) (push) Has been cancelled

Runner /load now accepts gitUrl, npxPackage, or sourcePath. It handles
git clone and npm install internally. Broker no longer needs shared
volume for source extraction — just tells the runner what to fetch.

CLI mesh_mcp_deploy now supports npx_package as a third source type.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alejandro Gutiérrez
2026-04-08 13:18:25 +01:00
parent 6a3f087209
commit 71c0767a1b
5 changed files with 82 additions and 53 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "claudemesh-cli",
"version": "0.8.5",
"version": "0.8.6",
"description": "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.",
"keywords": [
"claude-code",

View File

@@ -1400,18 +1400,21 @@ Your message mode is "${messageMode}".
// --- Service deployment tools ---
case "mesh_mcp_deploy": {
const { server_name, file_id, git_url, git_branch, env: deployEnv, runtime, memory_mb, network_allow, scope } = (args ?? {}) as {
const { server_name, file_id, git_url, git_branch, npx_package, env: deployEnv, runtime, memory_mb, network_allow, scope } = (args ?? {}) as {
server_name?: string; file_id?: string; git_url?: string; git_branch?: string;
npx_package?: string;
env?: Record<string, string>; runtime?: string; memory_mb?: number;
network_allow?: string[]; scope?: unknown;
};
if (!server_name) return text("mesh_mcp_deploy: `server_name` required", true);
if (!file_id && !git_url) return text("mesh_mcp_deploy: either `file_id` or `git_url` required", true);
if (!file_id && !git_url && !npx_package) return text("mesh_mcp_deploy: one of `file_id`, `git_url`, or `npx_package` required", true);
const client = allClients()[0];
if (!client) return text("mesh_mcp_deploy: not connected", true);
const source = file_id
? { type: "zip" as const, file_id }
: { type: "git" as const, url: git_url!, branch: git_branch };
const source = npx_package
? { type: "npx" as const, package: npx_package }
: file_id
? { type: "zip" as const, file_id }
: { type: "git" as const, url: git_url!, branch: git_branch };
// Resolve $vault: references in env vars — decrypt client-side
const resolvedEnv: Record<string, string> = {};

View File

@@ -906,6 +906,7 @@ export const TOOLS: Tool[] = [
file_id: { type: "string", description: "File ID of uploaded zip (from share_file)" },
git_url: { type: "string", description: "Git repo URL" },
git_branch: { type: "string", description: "Branch to clone (default: main)" },
npx_package: { type: "string", description: "npm package name to run via npx (e.g. @upstash/context7-mcp)" },
env: { type: "object", description: "Environment variables. Use $vault:<key> for vault secrets." },
runtime: { type: "string", enum: ["node", "python", "bun"], description: "Runtime (auto-detected if omitted)" },
memory_mb: { type: "number", description: "Memory limit in MB (default: 256)" },