llm-cli-gateway 1.5.28 → 1.5.30
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/CHANGELOG.md +12 -0
- package/dist/executor.d.ts +1 -0
- package/dist/executor.js +22 -0
- package/dist/provider-status.js +1 -0
- package/dist/upstream-contracts.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the llm-cli-gateway project.
|
|
4
4
|
|
|
5
|
+
## [1.5.30] - 2026-05-25
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Quote Windows `.cmd` and `.bat` provider shim invocations through `cmd.exe` to preserve paths with spaces and escape command-processor metacharacters in forwarded arguments.
|
|
10
|
+
|
|
11
|
+
## [1.5.29] - 2026-05-25
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- Launch Windows `.cmd` and `.bat` provider shims through `cmd.exe` instead of spawning them directly, fixing Gemini npm shim failures reported as `spawn EINVAL` by `gemini_request`, `cli_versions`, and `contracts --probe-installed`.
|
|
16
|
+
|
|
5
17
|
## [1.5.28] - 2026-05-25
|
|
6
18
|
|
|
7
19
|
### Fixed
|
package/dist/executor.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export declare function envWithExtendedPath(baseEnv?: NodeJS.ProcessEnv, extende
|
|
|
19
19
|
export interface ResolvedSpawnCommand {
|
|
20
20
|
command: string;
|
|
21
21
|
args: string[];
|
|
22
|
+
windowsVerbatimArguments?: boolean;
|
|
22
23
|
}
|
|
23
24
|
export declare function resolveCommandForSpawn(command: string, args: string[], options?: {
|
|
24
25
|
envPath?: string;
|
package/dist/executor.js
CHANGED
|
@@ -136,8 +136,29 @@ export function resolveCommandForSpawn(command, args, options = {}) {
|
|
|
136
136
|
args: ["-NoProfile", "-ExecutionPolicy", "Bypass", "-File", resolved, ...args],
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
+
if ([".cmd", ".bat"].includes(extname(resolved).toLowerCase())) {
|
|
140
|
+
return {
|
|
141
|
+
command: "cmd.exe",
|
|
142
|
+
args: ["/d", "/s", "/c", `"${buildWindowsCmdCommand(resolved, args)}"`],
|
|
143
|
+
windowsVerbatimArguments: true,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
139
146
|
return { command: resolved, args };
|
|
140
147
|
}
|
|
148
|
+
function buildWindowsCmdCommand(command, args) {
|
|
149
|
+
return [escapeWindowsCmdCommand(command), ...args.map(escapeWindowsCmdArgument)].join(" ");
|
|
150
|
+
}
|
|
151
|
+
const WINDOWS_CMD_META_CHARS = /([()\][%!^"`<>&|;, *?])/g;
|
|
152
|
+
function escapeWindowsCmdCommand(value) {
|
|
153
|
+
return win32.normalize(value).replace(WINDOWS_CMD_META_CHARS, "^$1");
|
|
154
|
+
}
|
|
155
|
+
function escapeWindowsCmdArgument(value) {
|
|
156
|
+
let arg = `${value}`;
|
|
157
|
+
arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
|
|
158
|
+
arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1");
|
|
159
|
+
arg = `"${arg}"`;
|
|
160
|
+
return arg.replace(WINDOWS_CMD_META_CHARS, "^$1");
|
|
161
|
+
}
|
|
141
162
|
function resolveWindowsCommandPath(command, envPath) {
|
|
142
163
|
if (/[\\/]/.test(command)) {
|
|
143
164
|
return existsSync(command) ? command : null;
|
|
@@ -260,6 +281,7 @@ export function spawnCliProcess(command, args, options) {
|
|
|
260
281
|
cwd: options.cwd,
|
|
261
282
|
detached,
|
|
262
283
|
windowsHide: true,
|
|
284
|
+
windowsVerbatimArguments: resolved.windowsVerbatimArguments,
|
|
263
285
|
stdio: options.stdio,
|
|
264
286
|
env: options.env,
|
|
265
287
|
});
|
package/dist/provider-status.js
CHANGED
|
@@ -106,6 +106,7 @@ function runCommand(command, args, timeoutMs) {
|
|
|
106
106
|
input: "",
|
|
107
107
|
timeout: timeoutMs,
|
|
108
108
|
windowsHide: true,
|
|
109
|
+
windowsVerbatimArguments: resolved.windowsVerbatimArguments,
|
|
109
110
|
});
|
|
110
111
|
const output = sanitizeOutput(`${result.stdout || ""}\n${result.stderr || ""}`);
|
|
111
112
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "llm-cli-gateway",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.30",
|
|
4
4
|
"mcpName": "io.github.verivus-oss/llm-cli-gateway",
|
|
5
5
|
"description": "MCP server providing unified access to Claude Code, Codex, Gemini, Grok, and Mistral Vibe CLIs with session management, retry logic, async job orchestration, durable job results, and cross-LLM validation.",
|
|
6
6
|
"license": "MIT",
|