claudemesh-cli 0.8.0 → 0.8.1

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.
Files changed (2) hide show
  1. package/dist/index.js +173 -1
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -50972,6 +50972,178 @@ ${lines.join(`
50972
50972
  const ok = await client2.deleteWebhook(delName);
50973
50973
  return text(ok ? `Webhook "${delName}" deactivated.` : `Failed to deactivate webhook "${delName}".`, !ok);
50974
50974
  }
50975
+ case "vault_set": {
50976
+ const { key, value, type: vType, mount_path, description } = args ?? {};
50977
+ if (!key || !value)
50978
+ return text("vault_set: `key` and `value` required", true);
50979
+ const client2 = allClients()[0];
50980
+ if (!client2)
50981
+ return text("vault_set: not connected", true);
50982
+ const entryType = vType ?? "env";
50983
+ let plaintext = value;
50984
+ if (entryType === "file") {
50985
+ const { existsSync: existsSync2, readFileSync: readFileSync2 } = await import("node:fs");
50986
+ if (!existsSync2(value))
50987
+ return text(`vault_set: file not found: ${value}`, true);
50988
+ plaintext = readFileSync2(value, "base64");
50989
+ }
50990
+ const encoded = Buffer.from(plaintext).toString("base64");
50991
+ const ok = await client2.vaultSet(key, encoded, "placeholder-nonce", "placeholder-sealed", entryType, mount_path, description);
50992
+ if (!ok)
50993
+ return text("vault_set: broker did not acknowledge", true);
50994
+ return text(`Vault entry "${key}" stored (${entryType}).`);
50995
+ }
50996
+ case "vault_list": {
50997
+ const client2 = allClients()[0];
50998
+ if (!client2)
50999
+ return text("vault_list: not connected", true);
51000
+ const entries = await client2.vaultList();
51001
+ if (entries.length === 0)
51002
+ return text("Vault is empty.");
51003
+ const lines = entries.map((e) => `- **${e.key}** (${e.entry_type}${e.mount_path ? ` → ${e.mount_path}` : ""})${e.description ? ` — ${e.description}` : ""} (${e.updated_at})`);
51004
+ return text(`${entries.length} vault entry(s):
51005
+ ${lines.join(`
51006
+ `)}`);
51007
+ }
51008
+ case "vault_delete": {
51009
+ const { key } = args ?? {};
51010
+ if (!key)
51011
+ return text("vault_delete: `key` required", true);
51012
+ const client2 = allClients()[0];
51013
+ if (!client2)
51014
+ return text("vault_delete: not connected", true);
51015
+ const ok = await client2.vaultDelete(key);
51016
+ return text(ok ? `Vault entry "${key}" deleted.` : `Vault entry "${key}" not found.`);
51017
+ }
51018
+ case "mesh_mcp_deploy": {
51019
+ const { server_name, file_id, git_url, git_branch, env: deployEnv, runtime, memory_mb, network_allow, scope } = args ?? {};
51020
+ if (!server_name)
51021
+ return text("mesh_mcp_deploy: `server_name` required", true);
51022
+ if (!file_id && !git_url)
51023
+ return text("mesh_mcp_deploy: either `file_id` or `git_url` required", true);
51024
+ const client2 = allClients()[0];
51025
+ if (!client2)
51026
+ return text("mesh_mcp_deploy: not connected", true);
51027
+ const source = file_id ? { type: "zip", file_id } : { type: "git", url: git_url, branch: git_branch };
51028
+ const config3 = {};
51029
+ if (deployEnv)
51030
+ config3.env = deployEnv;
51031
+ if (runtime)
51032
+ config3.runtime = runtime;
51033
+ if (memory_mb)
51034
+ config3.memory_mb = memory_mb;
51035
+ if (network_allow)
51036
+ config3.network_allow = network_allow;
51037
+ const result = await client2.mcpDeploy(server_name, source, Object.keys(config3).length > 0 ? config3 : undefined, scope);
51038
+ const toolList = result.tools?.map((t) => ` - ${t.name}: ${t.description}`).join(`
51039
+ `) ?? " (pending)";
51040
+ return text(`Deployed "${server_name}" (status: ${result.status}).
51041
+
51042
+ Tools:
51043
+ ${toolList}
51044
+
51045
+ Default scope: peer (private). Use mesh_mcp_scope to share.`);
51046
+ }
51047
+ case "mesh_mcp_undeploy": {
51048
+ const { server_name } = args ?? {};
51049
+ if (!server_name)
51050
+ return text("mesh_mcp_undeploy: `server_name` required", true);
51051
+ const client2 = allClients()[0];
51052
+ if (!client2)
51053
+ return text("mesh_mcp_undeploy: not connected", true);
51054
+ const ok = await client2.mcpUndeploy(server_name);
51055
+ return text(ok ? `Service "${server_name}" undeployed.` : `Failed to undeploy "${server_name}".`);
51056
+ }
51057
+ case "mesh_mcp_update": {
51058
+ const { server_name } = args ?? {};
51059
+ if (!server_name)
51060
+ return text("mesh_mcp_update: `server_name` required", true);
51061
+ const client2 = allClients()[0];
51062
+ if (!client2)
51063
+ return text("mesh_mcp_update: not connected", true);
51064
+ const result = await client2.mcpUpdate(server_name);
51065
+ return text(`Updated "${server_name}" (status: ${result.status}).`);
51066
+ }
51067
+ case "mesh_mcp_logs": {
51068
+ const { server_name, lines: logLines } = args ?? {};
51069
+ if (!server_name)
51070
+ return text("mesh_mcp_logs: `server_name` required", true);
51071
+ const client2 = allClients()[0];
51072
+ if (!client2)
51073
+ return text("mesh_mcp_logs: not connected", true);
51074
+ const logs = await client2.mcpLogs(server_name, logLines);
51075
+ if (logs.length === 0)
51076
+ return text(`No logs for "${server_name}".`);
51077
+ return text(`Logs for "${server_name}" (${logs.length} lines):
51078
+ \`\`\`
51079
+ ${logs.join(`
51080
+ `)}
51081
+ \`\`\``);
51082
+ }
51083
+ case "mesh_mcp_scope": {
51084
+ const { server_name, scope } = args ?? {};
51085
+ if (!server_name)
51086
+ return text("mesh_mcp_scope: `server_name` required", true);
51087
+ const client2 = allClients()[0];
51088
+ if (!client2)
51089
+ return text("mesh_mcp_scope: not connected", true);
51090
+ const result = await client2.mcpScope(server_name, scope);
51091
+ if (scope !== undefined) {
51092
+ return text(`Scope for "${server_name}" updated to: ${JSON.stringify(result.scope)}`);
51093
+ }
51094
+ return text(`**${server_name}** scope: ${JSON.stringify(result.scope)}
51095
+ Deployed by: ${result.deployed_by}`);
51096
+ }
51097
+ case "mesh_mcp_schema": {
51098
+ const { server_name, tool_name } = args ?? {};
51099
+ if (!server_name)
51100
+ return text("mesh_mcp_schema: `server_name` required", true);
51101
+ const client2 = allClients()[0];
51102
+ if (!client2)
51103
+ return text("mesh_mcp_schema: not connected", true);
51104
+ const tools = await client2.mcpServiceSchema(server_name, tool_name);
51105
+ if (tools.length === 0)
51106
+ return text(`No tools found for "${server_name}"${tool_name ? ` (tool: ${tool_name})` : ""}.`);
51107
+ const lines = tools.map((t) => `### ${t.name}
51108
+ ${t.description}
51109
+ \`\`\`json
51110
+ ${JSON.stringify(t.inputSchema, null, 2)}
51111
+ \`\`\``);
51112
+ return text(`Tools for "${server_name}":
51113
+
51114
+ ${lines.join(`
51115
+
51116
+ `)}`);
51117
+ }
51118
+ case "mesh_mcp_catalog": {
51119
+ const client2 = allClients()[0];
51120
+ if (!client2)
51121
+ return text("mesh_mcp_catalog: not connected", true);
51122
+ const services = await client2.mcpCatalog();
51123
+ if (services.length === 0)
51124
+ return text("No services deployed in the mesh.");
51125
+ const lines = services.map((s) => {
51126
+ const scopeStr = typeof s.scope === "string" ? s.scope : JSON.stringify(s.scope);
51127
+ return `- **${s.name}** (${s.type}, ${s.status}) — ${s.description}
51128
+ ${s.tool_count} tools | scope: ${scopeStr} | by ${s.deployed_by} | ${s.source_type}${s.runtime ? ` (${s.runtime})` : ""}`;
51129
+ });
51130
+ return text(`${services.length} service(s) in mesh:
51131
+
51132
+ ${lines.join(`
51133
+ `)}`);
51134
+ }
51135
+ case "mesh_skill_deploy": {
51136
+ const { file_id, git_url, git_branch } = args ?? {};
51137
+ if (!file_id && !git_url)
51138
+ return text("mesh_skill_deploy: either `file_id` or `git_url` required", true);
51139
+ const client2 = allClients()[0];
51140
+ if (!client2)
51141
+ return text("mesh_skill_deploy: not connected", true);
51142
+ const source = file_id ? { type: "zip", file_id } : { type: "git", url: git_url, branch: git_branch };
51143
+ const result = await client2.skillDeploy(source);
51144
+ return text(`Skill "${result.name}" deployed.
51145
+ Files: ${result.files.join(", ")}`);
51146
+ }
50975
51147
  default:
50976
51148
  return text(`Unknown tool: ${name}`, true);
50977
51149
  }
@@ -52319,7 +52491,7 @@ init_config();
52319
52491
  // package.json
52320
52492
  var package_default = {
52321
52493
  name: "claudemesh-cli",
52322
- version: "0.8.0",
52494
+ version: "0.8.1",
52323
52495
  description: "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.",
52324
52496
  keywords: [
52325
52497
  "claude-code",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudemesh-cli",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
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/eslint-config": "0.1.0",
52
- "@turbostarter/prettier-config": "0.1.0",
51
+ "@turbostarter/vitest-config": "0.1.0",
53
52
  "@turbostarter/tsconfig": "0.1.0",
54
- "@turbostarter/vitest-config": "0.1.0"
53
+ "@turbostarter/prettier-config": "0.1.0",
54
+ "@turbostarter/eslint-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",