llm-cli-gateway 1.5.29 → 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 +6 -0
- package/dist/executor.d.ts +1 -0
- package/dist/executor.js +17 -1
- 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,12 @@
|
|
|
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
|
+
|
|
5
11
|
## [1.5.29] - 2026-05-25
|
|
6
12
|
|
|
7
13
|
### 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
|
@@ -139,11 +139,26 @@ export function resolveCommandForSpawn(command, args, options = {}) {
|
|
|
139
139
|
if ([".cmd", ".bat"].includes(extname(resolved).toLowerCase())) {
|
|
140
140
|
return {
|
|
141
141
|
command: "cmd.exe",
|
|
142
|
-
args: ["/d", "/s", "/c", resolved,
|
|
142
|
+
args: ["/d", "/s", "/c", `"${buildWindowsCmdCommand(resolved, args)}"`],
|
|
143
|
+
windowsVerbatimArguments: true,
|
|
143
144
|
};
|
|
144
145
|
}
|
|
145
146
|
return { command: resolved, args };
|
|
146
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
|
+
}
|
|
147
162
|
function resolveWindowsCommandPath(command, envPath) {
|
|
148
163
|
if (/[\\/]/.test(command)) {
|
|
149
164
|
return existsSync(command) ? command : null;
|
|
@@ -266,6 +281,7 @@ export function spawnCliProcess(command, args, options) {
|
|
|
266
281
|
cwd: options.cwd,
|
|
267
282
|
detached,
|
|
268
283
|
windowsHide: true,
|
|
284
|
+
windowsVerbatimArguments: resolved.windowsVerbatimArguments,
|
|
269
285
|
stdio: options.stdio,
|
|
270
286
|
env: options.env,
|
|
271
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",
|