memshell-party-cli 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/README.md CHANGED
@@ -246,7 +246,7 @@ Example Claude Code / Claude Desktop config:
246
246
  ```
247
247
 
248
248
  Exposed tools: `list_servers`, `list_config`, `list_packers`, `list_command_configs`,
249
- `generate_memshell`, `generate_probe`, `parse_classname`, `server_version`.
249
+ `generate_memshell`, `generate_probe`, `parse_classname`, `server_version`, `connect_test`.
250
250
 
251
251
  ## AI skill (Claude Code)
252
252
 
package/README.zh-CN.md CHANGED
@@ -243,7 +243,7 @@ Claude Code / Claude Desktop 配置示例:
243
243
  ```
244
244
 
245
245
  暴露的工具:`list_servers`、`list_config`、`list_packers`、`list_command_configs`、
246
- `generate_memshell`、`generate_probe`、`parse_classname`、`server_version`。
246
+ `generate_memshell`、`generate_probe`、`parse_classname`、`server_version`、`connect_test`。
247
247
 
248
248
  ## AI 技能(Claude Code)
249
249
 
package/dist/cli.js CHANGED
@@ -1380,6 +1380,17 @@ var probeInput = {
1380
1380
  reqParamName: z.string().optional(),
1381
1381
  commandTemplate: z.string().optional()
1382
1382
  };
1383
+ var connectInput = {
1384
+ url: z.string().describe("URL of the deployed shell"),
1385
+ tool: z.enum(["godzilla", "behinder", "suo5"]).describe("shell tool to test"),
1386
+ pass: z.string().optional().describe("password (godzilla default: pass; behinder default: rebeyond)"),
1387
+ key: z.string().optional().describe("godzilla key (default: key)"),
1388
+ headerName: z.string().optional().describe("gate header name from generate_memshell shellToolConfig (usually User-Agent)"),
1389
+ headerValue: z.string().optional().describe("gate header value from generate_memshell shellToolConfig \u2014 required for MemShellParty shells"),
1390
+ suo5Mode: z.enum(["auto", "v2", "v1"]).optional().describe("suo5 protocol variant (default: auto)"),
1391
+ insecure: z.boolean().optional().describe("skip TLS certificate verification"),
1392
+ timeoutMs: z.number().optional().describe("request timeout in milliseconds (default 30000)")
1393
+ };
1383
1394
  function createMcpServer(client) {
1384
1395
  const server = new McpServer({ name: "memshell-party", version: CLI_VERSION });
1385
1396
  server.registerTool(
@@ -1482,6 +1493,39 @@ function createMcpServer(client) {
1482
1493
  }
1483
1494
  }
1484
1495
  );
1496
+ server.registerTool(
1497
+ "connect_test",
1498
+ {
1499
+ title: "Test shell connection",
1500
+ description: "Test whether a deployed Godzilla / Behinder / suo5 shell is alive and the credentials work, by performing the tool's real protocol handshake. Pass the gate header (headerName/headerValue) from generate_memshell output for MemShellParty shells.",
1501
+ inputSchema: connectInput
1502
+ },
1503
+ async (args) => {
1504
+ try {
1505
+ const common = {
1506
+ headerName: args.headerName,
1507
+ headerValue: args.headerValue,
1508
+ timeoutMs: args.timeoutMs,
1509
+ insecure: args.insecure
1510
+ };
1511
+ let result;
1512
+ switch (args.tool) {
1513
+ case "godzilla":
1514
+ result = await testGodzilla(args.url, args.pass ?? "pass", args.key ?? "key", common);
1515
+ break;
1516
+ case "behinder":
1517
+ result = await testBehinder(args.url, args.pass ?? "rebeyond", common);
1518
+ break;
1519
+ case "suo5":
1520
+ result = await testSuo5(args.url, { ...common, mode: args.suo5Mode });
1521
+ break;
1522
+ }
1523
+ return jsonContent(result);
1524
+ } catch (err) {
1525
+ return errorContent(err);
1526
+ }
1527
+ }
1528
+ );
1485
1529
  return server;
1486
1530
  }
1487
1531
  async function startMcpStdio(client) {