opencode-studio-server 1.14.0 → 1.14.1

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/backend.log CHANGED
@@ -1,3 +1,4 @@
1
1
  [Auth] Syncing github-copilot login for profile-1768679085919 to pool.
2
2
  Server running at http://localhost:3001
3
3
  [Profiles] Migrating existing config to "default" profile
4
+ [Prompts] Saving to: C:\Users\Microck\.config\opencode\OPENCODE.md
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-studio-server",
3
- "version": "1.14.0",
3
+ "version": "1.14.1",
4
4
  "description": "Backend server for OpenCode Studio - manages opencode configurations",
5
5
  "main": "index.js",
6
6
  "bin": {
package/proxy-manager.js CHANGED
@@ -15,6 +15,9 @@ let isProxyRunning = false;
15
15
  // Helper to check if binary exists
16
16
  const checkBinary = (cmd) => {
17
17
  return new Promise((resolve) => {
18
+ if (path.isAbsolute(cmd)) {
19
+ return resolve(fs.existsSync(cmd));
20
+ }
18
21
  const checkCmd = process.platform === 'win32' ? `where ${cmd}` : `which ${cmd}`;
19
22
  exec(checkCmd, (err) => {
20
23
  resolve(!err);
@@ -23,7 +26,20 @@ const checkBinary = (cmd) => {
23
26
  };
24
27
 
25
28
  const getProxyCommand = async () => {
29
+ if (process.platform === 'win32') {
30
+ const localAppData = process.env.LOCALAPPDATA;
31
+ if (localAppData) {
32
+ const wingetPath = path.join(localAppData, 'Microsoft', 'WinGet', 'Links', 'CLIProxyAPI.exe');
33
+ if (fs.existsSync(wingetPath)) return wingetPath;
34
+
35
+ const progPath = path.join(localAppData, 'Programs', 'CLIProxyAPI', 'CLIProxyAPI.exe');
36
+ if (fs.existsSync(progPath)) return progPath;
37
+ }
38
+ }
39
+
26
40
  if (await checkBinary('cliproxyapi')) return 'cliproxyapi';
41
+ if (await checkBinary('CLIProxyAPI')) return 'CLIProxyAPI';
42
+ if (await checkBinary('cliproxyapi.exe')) return 'cliproxyapi.exe';
27
43
  if (await checkBinary('cliproxy')) return 'cliproxy';
28
44
  return null;
29
45
  };