claudemesh-cli 0.8.5 → 0.8.7
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 +127 -5
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -47674,6 +47674,7 @@ var TOOLS = [
|
|
|
47674
47674
|
file_id: { type: "string", description: "File ID of uploaded zip (from share_file)" },
|
|
47675
47675
|
git_url: { type: "string", description: "Git repo URL" },
|
|
47676
47676
|
git_branch: { type: "string", description: "Branch to clone (default: main)" },
|
|
47677
|
+
npx_package: { type: "string", description: "npm package name to run via npx (e.g. @upstash/context7-mcp)" },
|
|
47677
47678
|
env: { type: "object", description: "Environment variables. Use $vault:<key> for vault secrets." },
|
|
47678
47679
|
runtime: { type: "string", enum: ["node", "python", "bun"], description: "Runtime (auto-detected if omitted)" },
|
|
47679
47680
|
memory_mb: { type: "number", description: "Memory limit in MB (default: 256)" },
|
|
@@ -47732,6 +47733,37 @@ var TOOLS = [
|
|
|
47732
47733
|
name: "vault_delete",
|
|
47733
47734
|
description: "Remove a credential from your vault.",
|
|
47734
47735
|
inputSchema: { type: "object", properties: { key: { type: "string" } }, required: ["key"] }
|
|
47736
|
+
},
|
|
47737
|
+
{
|
|
47738
|
+
name: "mesh_watch",
|
|
47739
|
+
description: "Watch a URL for changes. The broker polls it at the given interval and notifies you when the response changes. Works with any URL — websites (hash mode), JSON APIs (json mode), or status codes (status mode).",
|
|
47740
|
+
inputSchema: {
|
|
47741
|
+
type: "object",
|
|
47742
|
+
properties: {
|
|
47743
|
+
url: { type: "string", description: "URL to watch" },
|
|
47744
|
+
mode: { type: "string", enum: ["hash", "json", "status"], description: "Detection mode: hash (SHA-256 of body), json (extract jsonpath value), status (HTTP status code). Default: hash" },
|
|
47745
|
+
extract: { type: "string", description: "For json mode: dot path to extract (e.g. 'status' or 'data.deployments[0].status')" },
|
|
47746
|
+
interval: { type: "number", description: "Poll interval in seconds (min: 5, default: 30)" },
|
|
47747
|
+
notify_on: { type: "string", description: "When to notify: 'change' (default), 'match:<value>', 'not_match:<value>'" },
|
|
47748
|
+
headers: { type: "object", description: "Optional HTTP headers (e.g. for auth)" },
|
|
47749
|
+
label: { type: "string", description: "Human-readable label for this watch" }
|
|
47750
|
+
},
|
|
47751
|
+
required: ["url"]
|
|
47752
|
+
}
|
|
47753
|
+
},
|
|
47754
|
+
{
|
|
47755
|
+
name: "mesh_unwatch",
|
|
47756
|
+
description: "Stop watching a URL.",
|
|
47757
|
+
inputSchema: {
|
|
47758
|
+
type: "object",
|
|
47759
|
+
properties: { watch_id: { type: "string" } },
|
|
47760
|
+
required: ["watch_id"]
|
|
47761
|
+
}
|
|
47762
|
+
},
|
|
47763
|
+
{
|
|
47764
|
+
name: "mesh_watches",
|
|
47765
|
+
description: "List your active URL watches.",
|
|
47766
|
+
inputSchema: { type: "object", properties: {} }
|
|
47735
47767
|
}
|
|
47736
47768
|
];
|
|
47737
47769
|
|
|
@@ -48922,6 +48954,41 @@ class BrokerClient {
|
|
|
48922
48954
|
this.sendRaw({ type: "skill_deploy", source, _reqId: reqId });
|
|
48923
48955
|
});
|
|
48924
48956
|
}
|
|
48957
|
+
watchAckResolvers = new Map;
|
|
48958
|
+
watchListResolvers = new Map;
|
|
48959
|
+
async watch(url, opts) {
|
|
48960
|
+
return new Promise((resolve) => {
|
|
48961
|
+
const reqId = `watch_${Date.now()}`;
|
|
48962
|
+
const timer = setTimeout(() => {
|
|
48963
|
+
this.watchAckResolvers.delete(reqId);
|
|
48964
|
+
resolve({ error: "timeout" });
|
|
48965
|
+
}, 1e4);
|
|
48966
|
+
this.watchAckResolvers.set(reqId, { resolve, timer });
|
|
48967
|
+
this.sendRaw({ type: "watch", url, ...opts, _reqId: reqId });
|
|
48968
|
+
});
|
|
48969
|
+
}
|
|
48970
|
+
async unwatch(watchId) {
|
|
48971
|
+
return new Promise((resolve) => {
|
|
48972
|
+
const reqId = `unwatch_${Date.now()}`;
|
|
48973
|
+
const timer = setTimeout(() => {
|
|
48974
|
+
this.watchAckResolvers.delete(reqId);
|
|
48975
|
+
resolve(false);
|
|
48976
|
+
}, 1e4);
|
|
48977
|
+
this.watchAckResolvers.set(reqId, { resolve: () => resolve(true), timer });
|
|
48978
|
+
this.sendRaw({ type: "unwatch", watchId, _reqId: reqId });
|
|
48979
|
+
});
|
|
48980
|
+
}
|
|
48981
|
+
async watchList() {
|
|
48982
|
+
return new Promise((resolve) => {
|
|
48983
|
+
const reqId = `watchlist_${Date.now()}`;
|
|
48984
|
+
const timer = setTimeout(() => {
|
|
48985
|
+
this.watchListResolvers.delete(reqId);
|
|
48986
|
+
resolve([]);
|
|
48987
|
+
}, 1e4);
|
|
48988
|
+
this.watchListResolvers.set(reqId, { resolve, timer });
|
|
48989
|
+
this.sendRaw({ type: "watch_list", _reqId: reqId });
|
|
48990
|
+
});
|
|
48991
|
+
}
|
|
48925
48992
|
async getServiceTools(serviceName) {
|
|
48926
48993
|
const cached2 = this._serviceCatalog.find((s) => s.name === serviceName);
|
|
48927
48994
|
if (cached2?.tools?.length)
|
|
@@ -49515,6 +49582,24 @@ class BrokerClient {
|
|
|
49515
49582
|
r.resolve({ name: msg.name, files: msg.files ?? [] });
|
|
49516
49583
|
}
|
|
49517
49584
|
}
|
|
49585
|
+
if (msg.type === "watch_ack") {
|
|
49586
|
+
const reqId = msg._reqId;
|
|
49587
|
+
if (reqId && this.watchAckResolvers.has(reqId)) {
|
|
49588
|
+
const r = this.watchAckResolvers.get(reqId);
|
|
49589
|
+
clearTimeout(r.timer);
|
|
49590
|
+
this.watchAckResolvers.delete(reqId);
|
|
49591
|
+
r.resolve(msg);
|
|
49592
|
+
}
|
|
49593
|
+
}
|
|
49594
|
+
if (msg.type === "watch_list_result") {
|
|
49595
|
+
const reqId = msg._reqId;
|
|
49596
|
+
if (reqId && this.watchListResolvers.has(reqId)) {
|
|
49597
|
+
const r = this.watchListResolvers.get(reqId);
|
|
49598
|
+
clearTimeout(r.timer);
|
|
49599
|
+
this.watchListResolvers.delete(reqId);
|
|
49600
|
+
r.resolve(msg.watches ?? []);
|
|
49601
|
+
}
|
|
49602
|
+
}
|
|
49518
49603
|
if (msg.type === "error") {
|
|
49519
49604
|
this.debug(`broker error: ${msg.code} ${msg.message}`);
|
|
49520
49605
|
const id = msg.id ? String(msg.id) : null;
|
|
@@ -51071,15 +51156,15 @@ ${lines.join(`
|
|
|
51071
51156
|
return text(ok ? `Vault entry "${key}" deleted.` : `Vault entry "${key}" not found.`);
|
|
51072
51157
|
}
|
|
51073
51158
|
case "mesh_mcp_deploy": {
|
|
51074
|
-
const { server_name, file_id, git_url, git_branch, env: deployEnv, runtime, memory_mb, network_allow, scope } = args ?? {};
|
|
51159
|
+
const { server_name, file_id, git_url, git_branch, npx_package, env: deployEnv, runtime, memory_mb, network_allow, scope } = args ?? {};
|
|
51075
51160
|
if (!server_name)
|
|
51076
51161
|
return text("mesh_mcp_deploy: `server_name` required", true);
|
|
51077
|
-
if (!file_id && !git_url)
|
|
51078
|
-
return text("mesh_mcp_deploy:
|
|
51162
|
+
if (!file_id && !git_url && !npx_package)
|
|
51163
|
+
return text("mesh_mcp_deploy: one of `file_id`, `git_url`, or `npx_package` required", true);
|
|
51079
51164
|
const client2 = allClients()[0];
|
|
51080
51165
|
if (!client2)
|
|
51081
51166
|
return text("mesh_mcp_deploy: not connected", true);
|
|
51082
|
-
const source = file_id ? { type: "zip", file_id } : { type: "git", url: git_url, branch: git_branch };
|
|
51167
|
+
const source = npx_package ? { type: "npx", package: npx_package } : file_id ? { type: "zip", file_id } : { type: "git", url: git_url, branch: git_branch };
|
|
51083
51168
|
const resolvedEnv = {};
|
|
51084
51169
|
const vaultResolved = [];
|
|
51085
51170
|
if (deployEnv) {
|
|
@@ -51246,6 +51331,43 @@ ${lines.join(`
|
|
|
51246
51331
|
const result = await client2.skillDeploy(source);
|
|
51247
51332
|
return text(`Skill "${result.name}" deployed.
|
|
51248
51333
|
Files: ${result.files.join(", ")}`);
|
|
51334
|
+
}
|
|
51335
|
+
case "mesh_watch": {
|
|
51336
|
+
const { url, mode, extract, interval, notify_on, headers, label } = args ?? {};
|
|
51337
|
+
if (!url)
|
|
51338
|
+
return text("mesh_watch: `url` required", true);
|
|
51339
|
+
const client2 = allClients()[0];
|
|
51340
|
+
if (!client2)
|
|
51341
|
+
return text("mesh_watch: not connected", true);
|
|
51342
|
+
const result = await client2.watch(url, { mode, extract, interval, notify_on, headers, label });
|
|
51343
|
+
if (result.error)
|
|
51344
|
+
return text(`mesh_watch: ${result.error}`, true);
|
|
51345
|
+
return text(`Watching "${label ?? url}" (${result.mode}, every ${result.interval}s)
|
|
51346
|
+
Watch ID: ${result.watchId}`);
|
|
51347
|
+
}
|
|
51348
|
+
case "mesh_unwatch": {
|
|
51349
|
+
const { watch_id } = args ?? {};
|
|
51350
|
+
if (!watch_id)
|
|
51351
|
+
return text("mesh_unwatch: `watch_id` required", true);
|
|
51352
|
+
const client2 = allClients()[0];
|
|
51353
|
+
if (!client2)
|
|
51354
|
+
return text("mesh_unwatch: not connected", true);
|
|
51355
|
+
await client2.unwatch(watch_id);
|
|
51356
|
+
return text(`Watch ${watch_id} stopped.`);
|
|
51357
|
+
}
|
|
51358
|
+
case "mesh_watches": {
|
|
51359
|
+
const client2 = allClients()[0];
|
|
51360
|
+
if (!client2)
|
|
51361
|
+
return text("mesh_watches: not connected", true);
|
|
51362
|
+
const watches = await client2.watchList();
|
|
51363
|
+
if (watches.length === 0)
|
|
51364
|
+
return text("No active watches.");
|
|
51365
|
+
const lines = watches.map((w) => `- **${w.id}** ${w.label ? `(${w.label}) ` : ""}${w.url}
|
|
51366
|
+
mode: ${w.mode} | interval: ${w.interval}s | last: ${w.lastValue?.slice(0, 30) ?? "pending"} | checked: ${w.lastCheck ?? "never"}`);
|
|
51367
|
+
return text(`${watches.length} active watch(es):
|
|
51368
|
+
|
|
51369
|
+
${lines.join(`
|
|
51370
|
+
`)}`);
|
|
51249
51371
|
}
|
|
51250
51372
|
default:
|
|
51251
51373
|
return text(`Unknown tool: ${name}`, true);
|
|
@@ -52603,7 +52725,7 @@ init_config();
|
|
|
52603
52725
|
// package.json
|
|
52604
52726
|
var package_default = {
|
|
52605
52727
|
name: "claudemesh-cli",
|
|
52606
|
-
version: "0.8.
|
|
52728
|
+
version: "0.8.7",
|
|
52607
52729
|
description: "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.",
|
|
52608
52730
|
keywords: [
|
|
52609
52731
|
"claude-code",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claudemesh-cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.7",
|
|
4
4
|
"description": "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"prettier": "3.6.2",
|
|
49
49
|
"typescript": "5.9.3",
|
|
50
50
|
"vitest": "4.0.14",
|
|
51
|
+
"@turbostarter/vitest-config": "0.1.0",
|
|
51
52
|
"@turbostarter/tsconfig": "0.1.0",
|
|
52
53
|
"@turbostarter/eslint-config": "0.1.0",
|
|
53
|
-
"@turbostarter/prettier-config": "0.1.0"
|
|
54
|
-
"@turbostarter/vitest-config": "0.1.0"
|
|
54
|
+
"@turbostarter/prettier-config": "0.1.0"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "bun build src/index.ts --target=node --outfile dist/index.js --banner \"#!/usr/bin/env node\" && chmod +x dist/index.js",
|