@the-open-engine/zeroshot 6.0.2 → 6.0.3

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.
@@ -7,8 +7,9 @@ function commandExists(command) {
7
7
  if (command.includes(path.sep)) {
8
8
  return fs.existsSync(command);
9
9
  }
10
+ const probe = process.platform === 'win32' ? `where ${command}` : `command -v ${command}`;
10
11
  try {
11
- execSync(`command -v ${command}`, { stdio: 'pipe' });
12
+ execSync(probe, { stdio: 'pipe' });
12
13
  return true;
13
14
  } catch {
14
15
  return false;
@@ -20,9 +21,11 @@ function getCommandPath(command) {
20
21
  if (command.includes(path.sep)) {
21
22
  return fs.existsSync(command) ? command : null;
22
23
  }
24
+ const probe = process.platform === 'win32' ? `where ${command}` : `command -v ${command}`;
23
25
  try {
24
- const output = execSync(`command -v ${command}`, { encoding: 'utf8', stdio: 'pipe' });
25
- return output.trim() || null;
26
+ const output = execSync(probe, { encoding: 'utf8', stdio: 'pipe' });
27
+ // `where` can return multiple matches (one per line); take the first.
28
+ return output.split(/\r?\n/)[0].trim() || null;
26
29
  } catch {
27
30
  return null;
28
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-open-engine/zeroshot",
3
- "version": "6.0.2",
3
+ "version": "6.0.3",
4
4
  "description": "Multi-agent orchestration engine for Claude, Codex, and Gemini",
5
5
  "main": "src/orchestrator.js",
6
6
  "bin": {