@agent-webui/ai-desk-daemon 1.0.52-beta2 → 1.0.52-beta3

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.
Files changed (2) hide show
  1. package/lib/daemon-manager.js +20 -5
  2. package/package.json +11 -11
@@ -5,7 +5,7 @@
5
5
  const fs = require('fs');
6
6
  const { spawn, execSync } = require('child_process');
7
7
  const http = require('http');
8
- const { getDaemonBinaryPath, getPidPath, getConfiguredLogPath, getLogPath } = require('./platform');
8
+ const { getDaemonBinaryPath, getPidPath, getConfiguredLogPath, getLogPath, VERSION } = require('./platform');
9
9
  const { getPort, getConfigPath } = require('./config');
10
10
 
11
11
  /**
@@ -67,6 +67,15 @@ function getHealth() {
67
67
  });
68
68
  }
69
69
 
70
+ function formatStartOutput({ pid, port, version, logPath }) {
71
+ return [
72
+ `Daemon started (PID: ${pid})`,
73
+ `Version: ${version || 'unknown'}`,
74
+ `Port: ${port}`,
75
+ `Logs: ${logPath}`
76
+ ];
77
+ }
78
+
70
79
  /**
71
80
  * Start daemon
72
81
  */
@@ -122,9 +131,14 @@ function start() {
122
131
  // Save PID
123
132
  fs.writeFileSync(getPidPath(), child.pid.toString());
124
133
 
125
- console.log(`Daemon started (PID: ${child.pid})`);
126
- console.log(`Port: ${portNumber}`);
127
- console.log(`Logs: ${getLogPath()}`);
134
+ for (const line of formatStartOutput({
135
+ pid: child.pid,
136
+ port: portNumber,
137
+ version: VERSION,
138
+ logPath: getLogPath()
139
+ })) {
140
+ console.log(line);
141
+ }
128
142
 
129
143
  return child.pid;
130
144
  }
@@ -184,5 +198,6 @@ module.exports = {
184
198
  start,
185
199
  stop,
186
200
  restart,
187
- status
201
+ status,
202
+ _formatStartOutputForTest: formatStartOutput
188
203
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-webui/ai-desk-daemon",
3
- "version": "1.0.52-beta2",
3
+ "version": "1.0.52-beta3",
4
4
  "description": "AI Desk Daemon - CLI tool for managing the AI Desk daemon service",
5
5
  "workspaces": [
6
6
  "packages/*"
@@ -39,16 +39,16 @@
39
39
  "chalk": "^4.1.2"
40
40
  },
41
41
  "optionalDependencies": {
42
- "@agent-webui/ai-desk-daemon-darwin-arm64": "1.0.52-beta2",
43
- "@agent-webui/ai-desk-daemon-darwin-x64": "1.0.52-beta2",
44
- "@agent-webui/ai-desk-daemon-linux-arm64": "1.0.52-beta2",
45
- "@agent-webui/ai-desk-daemon-linux-x64": "1.0.52-beta2",
46
- "@agent-webui/ai-desk-daemon-win32-x64": "1.0.52-beta2",
47
- "@agent-webui/ai-desk-python-darwin-arm64": "1.0.52-beta2",
48
- "@agent-webui/ai-desk-python-darwin-x64": "1.0.52-beta2",
49
- "@agent-webui/ai-desk-python-linux-arm64": "1.0.52-beta2",
50
- "@agent-webui/ai-desk-python-linux-x64": "1.0.52-beta2",
51
- "@agent-webui/ai-desk-python-win32-x64": "1.0.52-beta2"
42
+ "@agent-webui/ai-desk-daemon-darwin-arm64": "1.0.52-beta3",
43
+ "@agent-webui/ai-desk-daemon-darwin-x64": "1.0.52-beta3",
44
+ "@agent-webui/ai-desk-daemon-linux-arm64": "1.0.52-beta3",
45
+ "@agent-webui/ai-desk-daemon-linux-x64": "1.0.52-beta3",
46
+ "@agent-webui/ai-desk-daemon-win32-x64": "1.0.52-beta3",
47
+ "@agent-webui/ai-desk-python-darwin-arm64": "1.0.52-beta3",
48
+ "@agent-webui/ai-desk-python-darwin-x64": "1.0.52-beta3",
49
+ "@agent-webui/ai-desk-python-linux-arm64": "1.0.52-beta3",
50
+ "@agent-webui/ai-desk-python-linux-x64": "1.0.52-beta3",
51
+ "@agent-webui/ai-desk-python-win32-x64": "1.0.52-beta3"
52
52
  },
53
53
  "repository": {
54
54
  "type": "git",