@lethevimlet/sshift 0.9.3 → 0.9.4
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
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
1
3
|
# SSHIFT - Web-based SSH/SFTP Terminal Client for the AI Stack
|
|
2
4
|
|
|
3
5
|
[](https://lethevimlet.github.io/sshift/)
|
|
@@ -7,8 +9,6 @@
|
|
|
7
9
|
|
|
8
10
|
A modern, responsive web-based SSH and SFTP terminal client built with Node.js, Express, and xterm.js. Designed for the AI coding workflow — featuring tab flash notifications that alert you when AI tools like OpenCode or Claude are waiting for your input, so you never miss a prompt while multitasking. Also features excellent TUI support, tabbed sessions, bookmarks, and mobile-friendly design.
|
|
9
11
|
|
|
10
|
-

|
|
11
|
-
|
|
12
12
|
## 📸 Screenshots
|
|
13
13
|
|
|
14
14
|
<div align="center">
|
|
@@ -119,12 +119,10 @@ SSHIFT uses a priority-based configuration system. Config files are searched in
|
|
|
119
119
|
|
|
120
120
|
| Priority | Path | Notes |
|
|
121
121
|
|----------|------|-------|
|
|
122
|
-
| 1 |
|
|
123
|
-
| 2 |
|
|
124
|
-
| 3 | `~/.local/share/sshift/config.json` | User install
|
|
125
|
-
| 4 | `~/.local/share/
|
|
126
|
-
| 5 | `<PACKAGE_DIR>/.env/config.json` | NPM package directory |
|
|
127
|
-
| 6 | `<PACKAGE_DIR>/config.json` | NPM package root (fallback) |
|
|
122
|
+
| 1 | `<PACKAGE_DIR>/.env/config.json` | NPM package directory |
|
|
123
|
+
| 2 | `<PACKAGE_DIR>/config.json` | NPM package root (fallback) |
|
|
124
|
+
| 3 | `~/.local/share/sshift/.env/config.json` | User install location |
|
|
125
|
+
| 4 | `~/.local/share/sshift/config.json` | User install (no `.env` subdir) |
|
|
128
126
|
|
|
129
127
|
### Port Priority
|
|
130
128
|
|
package/package.json
CHANGED
|
@@ -93,13 +93,19 @@ class PluginManager {
|
|
|
93
93
|
this._lineBuffers.clear();
|
|
94
94
|
this.flashingSessions.clear();
|
|
95
95
|
|
|
96
|
+
this._loadPlugins();
|
|
97
|
+
|
|
96
98
|
if (this.io) {
|
|
97
99
|
for (const [, socket] of this.io.sockets.sockets) {
|
|
98
100
|
this.syncFlashState(socket);
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
|
|
102
|
-
this.
|
|
104
|
+
if (this.sshManager) {
|
|
105
|
+
for (const sessionId of this.sshManager.sessions.keys()) {
|
|
106
|
+
this.emit('onSessionConnect', sessionId, {});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
103
109
|
}
|
|
104
110
|
|
|
105
111
|
init({ io, sshManager, tabManager, config }) {
|
|
@@ -11,23 +11,16 @@ const crypto = require('crypto');
|
|
|
11
11
|
// Get user's home directory
|
|
12
12
|
const HOME_DIR = os.homedir();
|
|
13
13
|
|
|
14
|
-
//
|
|
15
|
-
const
|
|
16
|
-
// Linux/macOS
|
|
17
|
-
path.join(HOME_DIR, '.local', 'share', 'sshift'),
|
|
18
|
-
// Windows
|
|
19
|
-
path.join(HOME_DIR, '.local', 'share', 'sshift'),
|
|
20
|
-
// Alternative locations
|
|
21
|
-
path.join(HOME_DIR, '.local', 'share', 'bin'),
|
|
22
|
-
];
|
|
14
|
+
// User install directory for config
|
|
15
|
+
const USER_INSTALL_DIR = path.join(HOME_DIR, '.local', 'share', 'sshift');
|
|
23
16
|
|
|
24
|
-
// Config paths - prioritize
|
|
17
|
+
// Config paths - prioritize package directory, then user install directory
|
|
25
18
|
const PACKAGE_DIR = path.join(__dirname, '..', '..', '..');
|
|
26
19
|
const ENV_CONFIG_PATHS = [
|
|
27
|
-
...DEFAULT_INSTALL_DIRS.map(dir => path.join(dir, '.env', 'config.json')),
|
|
28
|
-
...DEFAULT_INSTALL_DIRS.map(dir => path.join(dir, 'config.json')),
|
|
29
20
|
path.join(PACKAGE_DIR, '.env', 'config.json'),
|
|
30
21
|
path.join(PACKAGE_DIR, 'config.json'),
|
|
22
|
+
path.join(USER_INSTALL_DIR, '.env', 'config.json'),
|
|
23
|
+
path.join(USER_INSTALL_DIR, 'config.json'),
|
|
31
24
|
];
|
|
32
25
|
|
|
33
26
|
// Default config structure
|
|
@@ -15,29 +15,18 @@ function loadEnvFiles() {
|
|
|
15
15
|
// Get user's home directory
|
|
16
16
|
const HOME_DIR = os.homedir();
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
const DEFAULT_INSTALL_DIRS = [
|
|
20
|
-
// Linux/macOS
|
|
21
|
-
path.join(HOME_DIR, '.local', 'share', 'sshift'),
|
|
22
|
-
// Windows
|
|
23
|
-
path.join(HOME_DIR, '.local', 'share', 'sshift'),
|
|
24
|
-
// Alternative locations
|
|
25
|
-
path.join(HOME_DIR, '.local', 'share', 'bin'),
|
|
26
|
-
];
|
|
27
|
-
|
|
28
|
-
// Package directory (for development)
|
|
18
|
+
const USER_INSTALL_DIR = path.join(HOME_DIR, '.local', 'share', 'sshift');
|
|
29
19
|
const PACKAGE_DIR = path.join(__dirname, '..', '..', '..');
|
|
30
20
|
|
|
31
|
-
// Build env paths - prioritize user install directory, then package directory
|
|
32
21
|
const envPaths = [
|
|
33
|
-
...DEFAULT_INSTALL_DIRS.map(dir => path.join(dir, '.env', '.env.local')),
|
|
34
|
-
...DEFAULT_INSTALL_DIRS.map(dir => path.join(dir, '.env.local')),
|
|
35
|
-
...DEFAULT_INSTALL_DIRS.map(dir => path.join(dir, '.env', '.env')),
|
|
36
|
-
...DEFAULT_INSTALL_DIRS.map(dir => path.join(dir, '.env')),
|
|
37
22
|
path.join(PACKAGE_DIR, '.env', '.env.local'),
|
|
38
23
|
path.join(PACKAGE_DIR, '.env.local'),
|
|
39
24
|
path.join(PACKAGE_DIR, '.env', '.env'),
|
|
40
|
-
path.join(PACKAGE_DIR, '.env')
|
|
25
|
+
path.join(PACKAGE_DIR, '.env'),
|
|
26
|
+
path.join(USER_INSTALL_DIR, '.env', '.env.local'),
|
|
27
|
+
path.join(USER_INSTALL_DIR, '.env.local'),
|
|
28
|
+
path.join(USER_INSTALL_DIR, '.env', '.env'),
|
|
29
|
+
path.join(USER_INSTALL_DIR, '.env')
|
|
41
30
|
];
|
|
42
31
|
|
|
43
32
|
envPaths.forEach(envPath => {
|
package/src/webapp/js/app.js
CHANGED
|
@@ -6702,20 +6702,17 @@ class SSHIFTClient {
|
|
|
6702
6702
|
const flashingSessions = this._flashingSessions || (this._flashingSessions = new Set());
|
|
6703
6703
|
flashingSessions.add(sessionId);
|
|
6704
6704
|
|
|
6705
|
-
|
|
6706
|
-
if (tab) {
|
|
6705
|
+
document.querySelectorAll(`.tab[data-session-id="${sessionId}"]`).forEach(tab => {
|
|
6707
6706
|
tab.classList.add('flashing');
|
|
6708
|
-
}
|
|
6707
|
+
});
|
|
6709
6708
|
|
|
6710
|
-
|
|
6711
|
-
if (mobileOption) {
|
|
6709
|
+
document.querySelectorAll(`.mobile-tab-option[data-session-id="${sessionId}"]`).forEach(mobileOption => {
|
|
6712
6710
|
mobileOption.classList.add('flashing');
|
|
6713
|
-
}
|
|
6711
|
+
});
|
|
6714
6712
|
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
}
|
|
6713
|
+
document.querySelectorAll('.mobile-tabs-toggle').forEach(toggle => {
|
|
6714
|
+
toggle.classList.add('flashing');
|
|
6715
|
+
});
|
|
6719
6716
|
|
|
6720
6717
|
if (!this._tabFlashTimers) this._tabFlashTimers = new Map();
|
|
6721
6718
|
if (options.duration) {
|
|
@@ -6739,20 +6736,19 @@ class SSHIFTClient {
|
|
|
6739
6736
|
flashingSessions.delete(sessionId);
|
|
6740
6737
|
}
|
|
6741
6738
|
|
|
6742
|
-
|
|
6743
|
-
if (tab) {
|
|
6739
|
+
document.querySelectorAll(`.tab[data-session-id="${sessionId}"]`).forEach(tab => {
|
|
6744
6740
|
tab.classList.remove('flashing');
|
|
6745
|
-
}
|
|
6741
|
+
});
|
|
6746
6742
|
|
|
6747
|
-
|
|
6748
|
-
if (mobileOption) {
|
|
6743
|
+
document.querySelectorAll(`.mobile-tab-option[data-session-id="${sessionId}"]`).forEach(mobileOption => {
|
|
6749
6744
|
mobileOption.classList.remove('flashing');
|
|
6750
|
-
}
|
|
6745
|
+
});
|
|
6751
6746
|
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6747
|
+
document.querySelectorAll('.mobile-tabs-toggle').forEach(toggle => {
|
|
6748
|
+
if (!flashingSessions || flashingSessions.size === 0) {
|
|
6749
|
+
toggle.classList.remove('flashing');
|
|
6750
|
+
}
|
|
6751
|
+
});
|
|
6756
6752
|
|
|
6757
6753
|
if (this._tabFlashTimers) {
|
|
6758
6754
|
const timer = this._tabFlashTimers.get(sessionId);
|
|
@@ -6768,21 +6764,18 @@ class SSHIFTClient {
|
|
|
6768
6764
|
if (!flashingSessions || flashingSessions.size === 0) return;
|
|
6769
6765
|
|
|
6770
6766
|
for (const sessionId of flashingSessions) {
|
|
6771
|
-
|
|
6772
|
-
if (tab) {
|
|
6767
|
+
document.querySelectorAll(`.tab[data-session-id="${sessionId}"]`).forEach(tab => {
|
|
6773
6768
|
tab.classList.add('flashing');
|
|
6774
|
-
}
|
|
6769
|
+
});
|
|
6775
6770
|
|
|
6776
|
-
|
|
6777
|
-
if (mobileOption) {
|
|
6771
|
+
document.querySelectorAll(`.mobile-tab-option[data-session-id="${sessionId}"]`).forEach(mobileOption => {
|
|
6778
6772
|
mobileOption.classList.add('flashing');
|
|
6779
|
-
}
|
|
6773
|
+
});
|
|
6780
6774
|
}
|
|
6781
6775
|
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
}
|
|
6776
|
+
document.querySelectorAll('.mobile-tabs-toggle').forEach(toggle => {
|
|
6777
|
+
toggle.classList.add('flashing');
|
|
6778
|
+
});
|
|
6786
6779
|
}
|
|
6787
6780
|
|
|
6788
6781
|
switchTab(sessionId, panelId = null) {
|