vibora 2.0.0 → 2.2.0

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/README.md CHANGED
@@ -56,7 +56,7 @@ claude plugin marketplace add knowsuchagency/vibora
56
56
  claude plugin install vibora@vibora --scope user
57
57
  ```
58
58
 
59
- Open http://localhost:3333 in your browser.
59
+ Open http://localhost:7777 in your browser.
60
60
 
61
61
  ### Remote Server Setup
62
62
 
@@ -76,11 +76,11 @@ Run the backend on a remote server and connect from the desktop app or browser:
76
76
  2. **Connect from desktop app:**
77
77
  - Launch the app
78
78
  - Click "Connect to Remote" (if local server not found)
79
- - Enter the server URL: `your-server.example.com:3333`
79
+ - Enter the server URL: `your-server.example.com:7777`
80
80
  - Enter credentials when prompted
81
81
 
82
82
  3. **Or access via browser:**
83
- Open `http://your-server.example.com:3333`
83
+ Open `http://your-server.example.com:7777`
84
84
 
85
85
  ### Server Commands (Web Application)
86
86
 
@@ -100,7 +100,7 @@ Settings are stored in `.vibora/settings.json`. The vibora directory is resolved
100
100
 
101
101
  | Setting | Env Var | Default |
102
102
  |---------|---------|---------|
103
- | port | `PORT` | 3333 |
103
+ | port | `PORT` | 7777 |
104
104
  | defaultGitReposDir | `VIBORA_GIT_REPOS_DIR` | ~ |
105
105
  | remoteHost | `VIBORA_REMOTE_HOST` | (empty) |
106
106
  | sshPort | `VIBORA_SSH_PORT` | 22 |
@@ -212,7 +212,7 @@ vibora notify <title> [message] # Send a notification to all enabled channels
212
212
  ### Global Options
213
213
 
214
214
  ```bash
215
- --port=<port> # Server port (default: 3333)
215
+ --port=<port> # Server port (default: 7777)
216
216
  --url=<url> # Override full server URL
217
217
  --pretty # Pretty-print JSON output
218
218
  ```
package/bin/vibora.js CHANGED
@@ -5,6 +5,35 @@
5
5
  import { existsSync, readFileSync } from "fs";
6
6
  import { join } from "path";
7
7
  import { homedir } from "os";
8
+ var DEFAULT_PORT = 7777;
9
+ function getPortFromSettings(settings) {
10
+ if (!settings)
11
+ return null;
12
+ if (settings.server?.port) {
13
+ return settings.server.port;
14
+ }
15
+ if (settings.port) {
16
+ return settings.port;
17
+ }
18
+ return null;
19
+ }
20
+ function getAuthFromSettings(settings) {
21
+ if (!settings)
22
+ return null;
23
+ if (settings.authentication?.username && settings.authentication?.password) {
24
+ return {
25
+ username: settings.authentication.username,
26
+ password: settings.authentication.password
27
+ };
28
+ }
29
+ if (settings.basicAuthUsername && settings.basicAuthPassword) {
30
+ return {
31
+ username: settings.basicAuthUsername,
32
+ password: settings.basicAuthPassword
33
+ };
34
+ }
35
+ return null;
36
+ }
8
37
  function expandPath(p) {
9
38
  if (p.startsWith("~/")) {
10
39
  return join(homedir(), p.slice(2));
@@ -33,21 +62,24 @@ function discoverServerUrl(urlOverride, portOverride) {
33
62
  if (process.env.VIBORA_DIR) {
34
63
  const viboraDirSettings = join(expandPath(process.env.VIBORA_DIR), "settings.json");
35
64
  const settings = readSettingsFile(viboraDirSettings);
36
- if (settings?.port) {
37
- return `http://localhost:${settings.port}`;
65
+ const port = getPortFromSettings(settings);
66
+ if (port) {
67
+ return `http://localhost:${port}`;
38
68
  }
39
69
  }
40
70
  const cwdSettings = join(process.cwd(), ".vibora", "settings.json");
41
71
  const localSettings = readSettingsFile(cwdSettings);
42
- if (localSettings?.port) {
43
- return `http://localhost:${localSettings.port}`;
72
+ const localPort = getPortFromSettings(localSettings);
73
+ if (localPort) {
74
+ return `http://localhost:${localPort}`;
44
75
  }
45
76
  const globalSettings = join(homedir(), ".vibora", "settings.json");
46
77
  const homeSettings = readSettingsFile(globalSettings);
47
- if (homeSettings?.port) {
48
- return `http://localhost:${homeSettings.port}`;
78
+ const homePort = getPortFromSettings(homeSettings);
79
+ if (homePort) {
80
+ return `http://localhost:${homePort}`;
49
81
  }
50
- return "http://localhost:3333";
82
+ return `http://localhost:${DEFAULT_PORT}`;
51
83
  }
52
84
  function getViboraDir() {
53
85
  if (process.env.VIBORA_DIR) {
@@ -67,11 +99,9 @@ function getAuthCredentials() {
67
99
  ].filter(Boolean);
68
100
  for (const path of settingsPaths) {
69
101
  const settings = readSettingsFile(path);
70
- if (settings?.basicAuthUsername && settings?.basicAuthPassword) {
71
- return {
72
- username: settings.basicAuthUsername,
73
- password: settings.basicAuthPassword
74
- };
102
+ const auth = getAuthFromSettings(settings);
103
+ if (auth) {
104
+ return auth;
75
105
  }
76
106
  }
77
107
  return null;
@@ -509,7 +539,7 @@ function getPort(portOverride) {
509
539
  if (!isNaN(port))
510
540
  return port;
511
541
  }
512
- return 3333;
542
+ return 7777;
513
543
  }
514
544
 
515
545
  // cli/src/utils/prompt.ts
@@ -917,12 +947,12 @@ async function handleDevCommand(action, flags) {
917
947
  if (!devMode.enabled) {
918
948
  throw new CliError("DEVELOPER_MODE_REQUIRED", "Developer mode is not enabled. Set VIBORA_DEVELOPER=1 environment variable.", ExitCodes.INVALID_STATE);
919
949
  }
920
- output({ status: "restarting", message: "Triggering restart (build + restart via systemd)..." });
950
+ output({ status: "restarting", message: "Triggering restart (build + migrate + restart)..." });
921
951
  const result = await client.restartVibora();
922
952
  if (result.error) {
923
953
  throw new CliError("RESTART_FAILED", result.error, ExitCodes.OPERATION_FAILED);
924
954
  }
925
- output({ status: "initiated", message: "Restart initiated. If build fails, old instance keeps running." });
955
+ output({ status: "initiated", message: "Restart initiated. If build or migration fails, old instance keeps running." });
926
956
  break;
927
957
  }
928
958
  case "status": {
@@ -1027,7 +1057,7 @@ Commands:
1027
1057
  dev status Check if developer mode is enabled
1028
1058
 
1029
1059
  Global Options:
1030
- --port=<port> Server port (default: 3333)
1060
+ --port=<port> Server port (default: 7777)
1031
1061
  --url=<url> Override full server URL
1032
1062
  --pretty Pretty-print JSON output
1033
1063
  --version Show version