terminator-mcp-agent 0.6.12 → 0.6.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.
Files changed (2) hide show
  1. package/index.js +13 -9
  2. package/package.json +5 -5
package/index.js CHANGED
@@ -99,10 +99,8 @@ if (argv.includes("--add-to-app")) {
99
99
  addToApp(app);
100
100
  process.exit(0);
101
101
  }
102
- }
103
-
104
- // Default or --start: run the agent
105
- if (argv.length === 0 || argv.includes("--start")) {
102
+ } else {
103
+ // Default: run the agent and forward arguments
106
104
  const { pkg, bin, npmDir } = getPlatformInfo();
107
105
  let binary;
108
106
 
@@ -120,13 +118,17 @@ if (argv.length === 0 || argv.includes("--start")) {
120
118
  }
121
119
  }
122
120
 
123
- const child = spawn(binary, [], {
121
+ // Filter out --start if it exists, as it's for the wrapper script
122
+ const agentArgs = argv.filter((arg) => arg !== "--start");
123
+
124
+ const child = spawn(binary, agentArgs, {
124
125
  stdio: ["pipe", "pipe", "pipe"],
125
126
  shell: true,
126
127
  });
127
128
 
128
129
  process.stdin.pipe(child.stdin);
129
130
  child.stdout.pipe(process.stdout);
131
+ child.stderr.pipe(process.stderr);
130
132
 
131
133
  function killProcess(proc) {
132
134
  if (!proc) return;
@@ -134,11 +136,11 @@ if (argv.length === 0 || argv.includes("--start")) {
134
136
  if (process.platform === "win32") {
135
137
  try {
136
138
  execSync(`taskkill /PID ${pid} /T /F`);
137
- } catch (e) {}
139
+ } catch (e) { }
138
140
  } else {
139
141
  try {
140
142
  process.kill(-pid, "SIGKILL");
141
- } catch (e) {}
143
+ } catch (e) { }
142
144
  }
143
145
  }
144
146
 
@@ -155,7 +157,7 @@ if (argv.length === 0 || argv.includes("--start")) {
155
157
  } else {
156
158
  try {
157
159
  process.kill(child.pid, "SIGTERM");
158
- } catch (e) {}
160
+ } catch (e) { }
159
161
  setTimeout(() => {
160
162
  if (!child.killed) killProcess(child);
161
163
  }, 2000);
@@ -172,7 +174,9 @@ if (argv.length === 0 || argv.includes("--start")) {
172
174
  process.on("exit", shutdown);
173
175
 
174
176
  child.on("exit", (code) => {
175
- console.log(`[MCP exited with code ${code}]`);
177
+ if (code !== 0) {
178
+ console.error(`[MCP exited with code ${code}]`);
179
+ }
176
180
  process.exit(code);
177
181
  });
178
182
  }
package/package.json CHANGED
@@ -12,10 +12,10 @@
12
12
  ],
13
13
  "name": "terminator-mcp-agent",
14
14
  "optionalDependencies": {
15
- "terminator-mcp-darwin-arm64": "0.6.12",
16
- "terminator-mcp-darwin-x64": "0.6.12",
17
- "terminator-mcp-linux-x64-gnu": "0.6.12",
18
- "terminator-mcp-win32-x64-msvc": "0.6.12"
15
+ "terminator-mcp-darwin-arm64": "0.6.14",
16
+ "terminator-mcp-darwin-x64": "0.6.14",
17
+ "terminator-mcp-linux-x64-gnu": "0.6.14",
18
+ "terminator-mcp-win32-x64-msvc": "0.6.14"
19
19
  },
20
20
  "repository": {
21
21
  "type": "git",
@@ -27,5 +27,5 @@
27
27
  "sync-version": "node ./utils/sync-version.js",
28
28
  "update-badges": "node ./utils/update-badges.js"
29
29
  },
30
- "version": "0.6.12"
30
+ "version": "0.6.14"
31
31
  }