shell-mirror 1.5.128 → 1.5.129
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/mac-agent/agent.js +15 -1
- package/package.json +1 -1
package/mac-agent/agent.js
CHANGED
|
@@ -7,6 +7,7 @@ const os = require('os');
|
|
|
7
7
|
const { v4: uuidv4 } = require('uuid');
|
|
8
8
|
const fs = require('fs');
|
|
9
9
|
const https = require('https');
|
|
10
|
+
const { exec } = require('child_process');
|
|
10
11
|
|
|
11
12
|
// Enhanced logging to file
|
|
12
13
|
const LOG_FILE = path.join(__dirname, 'agent-debug.log');
|
|
@@ -532,9 +533,22 @@ function connectToSignalingServer() {
|
|
|
532
533
|
|
|
533
534
|
ws.on('open', () => {
|
|
534
535
|
logToFile('✅ Connected to signaling server.');
|
|
535
|
-
|
|
536
|
+
|
|
536
537
|
// Start heartbeat system to maintain agent status
|
|
537
538
|
startHeartbeatSystem();
|
|
539
|
+
|
|
540
|
+
// Open dashboard in default browser
|
|
541
|
+
const dashboardUrl = 'https://shellmirror.app/app/dashboard.html';
|
|
542
|
+
logToFile(`🌐 Opening dashboard in browser: ${dashboardUrl}`);
|
|
543
|
+
|
|
544
|
+
exec(`open "${dashboardUrl}"`, (error) => {
|
|
545
|
+
if (error) {
|
|
546
|
+
logToFile(`⚠️ Could not open browser automatically: ${error.message}`);
|
|
547
|
+
logToFile(`💡 Please open ${dashboardUrl} manually in your browser`);
|
|
548
|
+
} else {
|
|
549
|
+
logToFile('✅ Dashboard opened in browser');
|
|
550
|
+
}
|
|
551
|
+
});
|
|
538
552
|
});
|
|
539
553
|
|
|
540
554
|
ws.on('message', async (message) => {
|
package/package.json
CHANGED