shellward 0.5.12 → 0.5.14

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.
@@ -220,7 +220,7 @@ function handleRequest(req) {
220
220
  jsonrpc: '2.0',
221
221
  id: id ?? null,
222
222
  result: {
223
- protocolVersion: '2024-11-05',
223
+ protocolVersion: '2025-03-26',
224
224
  capabilities: { tools: {} },
225
225
  serverInfo: {
226
226
  name: 'shellward',
@@ -293,6 +293,8 @@ function handleRequest(req) {
293
293
  // Use raw Buffer to handle UTF-8 multi-byte characters correctly.
294
294
  // Content-Length is in bytes, not characters.
295
295
  let rawBuffer = Buffer.alloc(0);
296
+ // Keep event loop alive — prevent Node.js from exiting before mcp-proxy connects
297
+ process.stdin.resume();
296
298
  process.stdin.on('data', (chunk) => {
297
299
  rawBuffer = Buffer.concat([rawBuffer, chunk]);
298
300
  while (true) {
@@ -333,5 +335,6 @@ function send(msg) {
333
335
  process.stdout.write(header + body);
334
336
  }
335
337
  process.stdin.on('end', () => process.exit(0));
338
+ process.stdin.on('error', () => process.exit(1));
336
339
  // Log to stderr so it doesn't interfere with stdio protocol
337
340
  process.stderr.write(`[ShellWard MCP] Server started (mode: ${guard.config.mode}, locale: ${guard.locale})\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shellward",
3
- "version": "0.5.12",
3
+ "version": "0.5.14",
4
4
  "mcpName": "io.github.jnMetaCode/shellward",
5
5
  "description": "AI agent security & MCP security middleware — prompt injection detection, AI firewall, runtime guardrails & data-loss prevention for LLM tool calls. 8-layer defense against data exfiltration & dangerous commands. Zero dependencies. SDK + OpenClaw plugin. Supports LangChain, AutoGPT, Claude Code, Cursor, OpenAI Agents.",
6
6
  "keywords": [
@@ -43,6 +43,7 @@
43
43
  },
44
44
  "type": "module",
45
45
  "bin": {
46
+ "shellward": "dist/mcp-server.js",
46
47
  "shellward-mcp": "dist/mcp-server.js"
47
48
  },
48
49
  "main": "dist/index.js",
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/jnMetaCode/shellward",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.5.12",
9
+ "version": "0.5.14",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "shellward",
14
- "version": "0.5.12",
14
+ "version": "0.5.14",
15
15
  "runtime": "node",
16
16
  "transport": {
17
17
  "type": "stdio"
package/src/mcp-server.ts CHANGED
@@ -254,7 +254,7 @@ function handleRequest(req: JsonRpcRequest): JsonRpcResponse | null {
254
254
  jsonrpc: '2.0',
255
255
  id: id ?? null,
256
256
  result: {
257
- protocolVersion: '2024-11-05',
257
+ protocolVersion: '2025-03-26',
258
258
  capabilities: { tools: {} },
259
259
  serverInfo: {
260
260
  name: 'shellward',
@@ -337,6 +337,9 @@ function handleRequest(req: JsonRpcRequest): JsonRpcResponse | null {
337
337
 
338
338
  let rawBuffer = Buffer.alloc(0)
339
339
 
340
+ // Keep event loop alive — prevent Node.js from exiting before mcp-proxy connects
341
+ process.stdin.resume()
342
+
340
343
  process.stdin.on('data', (chunk: Buffer) => {
341
344
  rawBuffer = Buffer.concat([rawBuffer, chunk])
342
345
 
@@ -381,6 +384,7 @@ function send(msg: JsonRpcResponse) {
381
384
  }
382
385
 
383
386
  process.stdin.on('end', () => process.exit(0))
387
+ process.stdin.on('error', () => process.exit(1))
384
388
 
385
389
  // Log to stderr so it doesn't interfere with stdio protocol
386
390
  process.stderr.write(`[ShellWard MCP] Server started (mode: ${guard.config.mode}, locale: ${guard.locale})\n`)