shell-mirror 1.5.89 → 1.5.91
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/http-agent.js
CHANGED
|
@@ -48,8 +48,8 @@ class TerminalMirrorHttpAgent {
|
|
|
48
48
|
const os = require('os');
|
|
49
49
|
const hostname = os.hostname();
|
|
50
50
|
const username = os.userInfo().username;
|
|
51
|
-
|
|
52
|
-
return `mac-${username}-${hostname}
|
|
51
|
+
// No timestamp - consistent ID per machine to avoid duplicate agent registrations
|
|
52
|
+
return `mac-${username}-${hostname}`.replace(/[^a-zA-Z0-9-]/g, '-');
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
showStartupInfo() {
|
|
@@ -118,8 +118,8 @@ function generateAgentId() {
|
|
|
118
118
|
const os = require('os');
|
|
119
119
|
const hostname = os.hostname();
|
|
120
120
|
const username = os.userInfo().username;
|
|
121
|
-
|
|
122
|
-
return `mac-${username}-${hostname}
|
|
121
|
+
// No timestamp - consistent ID per machine to avoid duplicate agent registrations
|
|
122
|
+
return `mac-${username}-${hostname}`.replace(/[^a-zA-Z0-9-]/g, '-');
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
function updateEnvFile(config) {
|
|
@@ -122,8 +122,8 @@ function generateAgentId() {
|
|
|
122
122
|
const os = require('os');
|
|
123
123
|
const hostname = os.hostname();
|
|
124
124
|
const username = os.userInfo().username;
|
|
125
|
-
|
|
126
|
-
return `mac-${username}-${hostname}
|
|
125
|
+
// No timestamp - consistent ID per machine to avoid duplicate agent registrations
|
|
126
|
+
return `mac-${username}-${hostname}`.replace(/[^a-zA-Z0-9-]/g, '-');
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
function updateEnvFile(config) {
|
package/mac-agent/web-setup.js
CHANGED
|
@@ -127,8 +127,8 @@ function generateAgentId() {
|
|
|
127
127
|
const os = require('os');
|
|
128
128
|
const hostname = os.hostname();
|
|
129
129
|
const username = os.userInfo().username;
|
|
130
|
-
|
|
131
|
-
return `mac-${username}-${hostname}
|
|
130
|
+
// No timestamp - consistent ID per machine to avoid duplicate agent registrations
|
|
131
|
+
return `mac-${username}-${hostname}`.replace(/[^a-zA-Z0-9-]/g, '-');
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
function updateEnvFile(config) {
|
package/package.json
CHANGED
package/public/app/dashboard.js
CHANGED
|
@@ -420,9 +420,10 @@ class ShellMirrorDashboard {
|
|
|
420
420
|
|
|
421
421
|
if (agentsData.success && agentsData.data && agentsData.data.agents) {
|
|
422
422
|
this.agents = agentsData.data.agents;
|
|
423
|
-
|
|
424
|
-
//
|
|
425
|
-
|
|
423
|
+
|
|
424
|
+
// Don't load stale sessions from localStorage - only show live sessions from agents
|
|
425
|
+
// Sessions will be populated via WebSocket updates from connected agents
|
|
426
|
+
localStorage.removeItem('shell-mirror-sessions'); // Clear any stale data
|
|
426
427
|
} else {
|
|
427
428
|
this.agents = [];
|
|
428
429
|
}
|