@toolplex/client 0.1.22 → 0.1.23

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.
@@ -89,6 +89,15 @@ export class RuntimeCheck {
89
89
  this.resolveDependency(command);
90
90
  }
91
91
  static extractCommandName(command) {
92
- return command.trim().split(/\s+/)[0];
92
+ const trimmed = command.trim();
93
+ // For absolute paths (starting with / or drive letter like C:\),
94
+ // the entire path is the command - don't split on spaces
95
+ // This handles paths like "/Users/name/Library/Application Support/tool"
96
+ if (trimmed.startsWith("/") || /^[A-Za-z]:[\\/]/.test(trimmed)) {
97
+ return trimmed;
98
+ }
99
+ // For relative commands (like "npx", "node --version"),
100
+ // split on whitespace to extract just the command name
101
+ return trimmed.split(/\s+/)[0];
93
102
  }
94
103
  }
@@ -205,7 +205,9 @@ export class ServerManager {
205
205
  throw new Error("Command is required for stdio transport");
206
206
  // Use RuntimeCheck to resolve the command, which prioritizes bundled dependencies
207
207
  const { RuntimeCheck } = await import("../mcp-server/utils/runtimeCheck.js");
208
- const resolvedCommand = RuntimeCheck.resolveDependency(config.command);
208
+ // Extract command name first (handles paths with spaces correctly)
209
+ const commandName = RuntimeCheck.extractCommandName(config.command);
210
+ const resolvedCommand = RuntimeCheck.resolveDependency(commandName);
209
211
  const enhancedPath = getEnhancedPath();
210
212
  const serverParams = {
211
213
  command: resolvedCommand,
@@ -89,6 +89,15 @@ export class RuntimeCheck {
89
89
  this.resolveDependency(command);
90
90
  }
91
91
  static extractCommandName(command) {
92
- return command.trim().split(/\s+/)[0];
92
+ const trimmed = command.trim();
93
+ // For absolute paths (starting with / or drive letter like C:\),
94
+ // the entire path is the command - don't split on spaces
95
+ // This handles paths like "/Users/name/Library/Application Support/tool"
96
+ if (trimmed.startsWith("/") || /^[A-Za-z]:[\\/]/.test(trimmed)) {
97
+ return trimmed;
98
+ }
99
+ // For relative commands (like "npx", "node --version"),
100
+ // split on whitespace to extract just the command name
101
+ return trimmed.split(/\s+/)[0];
93
102
  }
94
103
  }
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "0.1.22";
1
+ export declare const version = "0.1.23";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '0.1.22';
1
+ export const version = '0.1.23';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolplex/client",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "author": "ToolPlex LLC",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "description": "The official ToolPlex client for AI agent tool discovery and execution",