deskssh 0.0.1 → 0.1.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.
Files changed (53) hide show
  1. package/README.md +26 -55
  2. package/bin/deskssh.js +36 -0
  3. package/dist/server.js +851 -0
  4. package/dist/web/assets/index-Bf6XF_tt.css +32 -0
  5. package/dist/web/assets/index-D17lV7-E.js +234 -0
  6. package/{packages/web/dist → dist/web}/index.html +3 -2
  7. package/package.json +34 -38
  8. package/.eslintrc.cjs +0 -21
  9. package/.github/workflows/ci.yml +0 -40
  10. package/.prettierignore +0 -5
  11. package/.prettierrc.json +0 -6
  12. package/CONTRIBUTING.md +0 -59
  13. package/LICENSE +0 -661
  14. package/packages/cli/README.md +0 -11
  15. package/packages/cli/bin/deskssh.js +0 -12
  16. package/packages/cli/package.json +0 -37
  17. package/packages/core/dist/index.d.ts +0 -2
  18. package/packages/core/dist/index.d.ts.map +0 -1
  19. package/packages/core/dist/index.js +0 -6
  20. package/packages/core/dist/index.js.map +0 -1
  21. package/packages/core/package.json +0 -22
  22. package/packages/core/src/index.test.ts +0 -8
  23. package/packages/core/src/index.ts +0 -6
  24. package/packages/core/tsconfig.json +0 -9
  25. package/packages/server/dist/index.d.ts +0 -3
  26. package/packages/server/dist/index.d.ts.map +0 -1
  27. package/packages/server/dist/index.js +0 -7
  28. package/packages/server/dist/index.js.map +0 -1
  29. package/packages/server/package.json +0 -19
  30. package/packages/server/src/index.ts +0 -8
  31. package/packages/server/tsconfig.json +0 -10
  32. package/packages/web/dist/assets/index-DNUNZ8WK.js +0 -65
  33. package/packages/web/index.html +0 -12
  34. package/packages/web/node_modules/.bin/browserslist +0 -17
  35. package/packages/web/node_modules/.bin/vite +0 -17
  36. package/packages/web/package.json +0 -27
  37. package/packages/web/src/App.tsx +0 -17
  38. package/packages/web/src/i18n/en.ts +0 -8
  39. package/packages/web/src/i18n/es.ts +0 -7
  40. package/packages/web/src/i18n/index.ts +0 -27
  41. package/packages/web/src/main.tsx +0 -12
  42. package/packages/web/tsconfig.json +0 -14
  43. package/packages/web/vite.config.ts +0 -6
  44. package/pnpm-workspace.yaml +0 -2
  45. package/specs/001-core/plan.md +0 -246
  46. package/specs/001-core/spec.md +0 -206
  47. package/specs/001-core/tasks.md +0 -110
  48. package/specs/constitution.md +0 -110
  49. package/specs/glossary.md +0 -35
  50. package/specs/vision.md +0 -145
  51. package/tsconfig.base.json +0 -23
  52. package/tsconfig.json +0 -4
  53. package/vitest.config.ts +0 -7
@@ -1,110 +0,0 @@
1
- # DeskSSH Constitution
2
-
3
- **Non-negotiable** principles. Every spec, plan, task or line of code must respect
4
- them. If anything conflicts with the constitution, the constitution wins; changing
5
- it requires an explicit amendment in this document (with date and reason).
6
-
7
- Last revised: 2026-06-25.
8
-
9
- ---
10
-
11
- ## Article 1 — No remote desktop (the premise)
12
-
13
- DeskSSH **does not transmit pixels** nor reuse the server's graphical environment.
14
- It is not VNC, RDP, X-forwarding, SPICE or similar. The interface is
15
- **synthesized on the client** from data obtained over SSH. Any proposal that
16
- violates this is out of scope, however useful it may seem.
17
-
18
- ## Article 2 — Agentless
19
-
20
- DeskSSH **installs no software, agents or daemons** on the remote host. It assumes
21
- only:
22
-
23
- - a running SSH server, and
24
- - standard POSIX/Unix utilities already present (`sh`, `ls`, `stat`, `ps`, `df`, …).
25
-
26
- If a feature needs something non-standard, it must **degrade gracefully** (offer
27
- less, not fail) and never require changes on the server.
28
-
29
- ## Article 3 — Command transparency
30
-
31
- The user can always **see the command** a GUI action is about to run (or has run).
32
- DeskSSH is an administration tool, not a black box: showing the command builds
33
- trust and, along the way, teaches the command line. Raw output must always be
34
- accessible.
35
-
36
- ## Article 4 — Security is not optional
37
-
38
- - Secrets (passwords, passphrases, private keys) are never stored in plain text nor
39
- appear in logs.
40
- - **Least privilege**: DeskSSH acts with the SSH user's permissions; it never
41
- escalates privileges on its own.
42
- - In the web model, the backend is an **SSH gateway**: treated as a critical
43
- component (authentication, session isolation, auditing).
44
- - Every destructive operation (delete, overwrite, kill processes, stop services)
45
- requires **explicit user confirmation**.
46
-
47
- ## Article 5 — Frontend-agnostic core
48
-
49
- The logic (SSH sessions, OS adapters, parsers, "app" definitions) lives in a **core
50
- independent of presentation**. This allows serving a web app and, with the same
51
- core, delivering it either hosted or self-hosted (npm). No business rule lives in
52
- UI components.
53
-
54
- ## Article 6 — Portability through adapters
55
-
56
- Servers differ (Debian/Ubuntu, RHEL/Fedora, Arch, BSD; `bash`/`sh`; GNU vs BSD
57
- coreutils). The differences are isolated in an **adapter layer**. The rest of the
58
- system talks to a uniform interface and assumes no specific distro. Machine-
59
- readable output (`stat -c`, `ps -eo`, `--json` flags where available) is preferred
60
- over parsing human-formatted text.
61
-
62
- ## Article 7 — Resilience and graceful degradation
63
-
64
- Server diversity makes parsing fail sometimes. A parsing failure must **never**
65
- crash the app: the raw output is shown and we move on. Every round trip may fail or
66
- be slow; the UI reflects this without freezing.
67
-
68
- ## Article 8 — Latency-aware performance
69
-
70
- Every GUI action is, potentially, a network round trip. The design must **minimize
71
- round trips** (batching, listing caches, optimistic UI) and never assume zero
72
- latency.
73
-
74
- ## Article 9 — 100% open source and contributor-friendly
75
-
76
- DeskSSH is and will remain fully open source under **AGPL-3.0-or-later**. AGPL
77
- (strong copyleft with a network clause) is chosen precisely because the project is
78
- web-first: it guarantees that any improvement, even when offered only as a
79
- network-accessible service, comes back to the community. A low barrier to entry for
80
- contributors is also prioritized: mainstream stack, documentation in `specs/`,
81
- explained and traceable decisions. No proprietary dependencies on the critical
82
- path, nor licenses incompatible with AGPL-3.0.
83
-
84
- ## Article 10 — Non-interactive, structured primitives
85
-
86
- DeskSSH **does not drive remote interactive tools** (nano, vim, top, etc.) by
87
- sending them keystrokes over a PTY: it is fragile, version-dependent and impossible
88
- to normalize across platforms. Instead, every feature is built on **non-interactive,
89
- structured-output primitives** defined in the capability contract (e.g.
90
- `readFile`/`writeFile` instead of launching a remote editor), and the experience is
91
- **emulated on the client**. Asking for machine-readable output is always preferred
92
- over parsing human-formatted text.
93
-
94
- The **only deliberate exception** is the **terminal** app, which exposes the raw
95
- shell on purpose (where the user does see `bash`/`PowerShell`/`csh`).
96
-
97
- This article is the foundation that makes Article 6's portability viable: without
98
- structured output, the capability contract could not normalize across OSes.
99
-
100
- ---
101
-
102
- ## Amendments
103
-
104
- - _(none yet)_
105
-
106
- ## Closed decisions
107
-
108
- - **License: AGPL-3.0-or-later** (decided 2026-06-25). Closes the GPL's "network
109
- loophole", consistent with the web-first model and the goal of keeping the
110
- project 100% open. See Article 9 and the `LICENSE` file.
package/specs/glossary.md DELETED
@@ -1,35 +0,0 @@
1
- # DeskSSH Glossary
2
-
3
- Domain vocabulary. DeskSSH constantly translates between two worlds —the **desktop
4
- metaphor** and **system commands**— so a shared language avoids confusion.
5
-
6
- | Term | Definition |
7
- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------- |
8
- | **Host** | A remote server connected to via SSH. Has credentials, address, port and an associated OS adapter. |
9
- | **Session** | A live SSH connection to a host, able to run commands and open channels (PTY, SFTP). |
10
- | **Core** | Frontend-agnostic logic: session management, adapters, parsers and app definitions. |
11
- | **OS adapter** | A module that knows the specifics of a system family (commands, flags, paths) and exposes a uniform interface. |
12
- | **Desktop app** | An "application" inside DeskSSH (file manager, terminal, monitor…). Each maps GUI actions to command sets. |
13
- | **Action** | A user interaction (double click, drag, button) that resolves into one or more remote commands. |
14
- | **VFS (Virtual File System)** | The view of the remote filesystem that the client builds and caches from `ls`/`stat`/SFTP. |
15
- | **Desktop shell** | The UI layer that draws windows, taskbar, launcher and icons. The "face" of DeskSSH. |
16
- | **Command transparency** | The ability to inspect the exact command behind each action (see Constitution, Art. 3). |
17
- | **Round trip** | A request→execute→response cycle against the remote host. The unit of latency cost. |
18
- | **Graceful degradation** | Offering less functionality (not failing) when the remote doesn't support something. |
19
- | **Backend / gateway** | In the web model, the service that keeps SSH sessions alive and serves the UI. The browser never opens SSH directly. |
20
-
21
- ## Metaphor ↔ command map (illustrative, not exhaustive)
22
-
23
- | Desktop action | Equivalent command(s) (indicative) |
24
- | -------------------- | ----------------------------------------------------- |
25
- | Open folder | `ls`, `stat -c` / SFTP `readdir` |
26
- | File properties | `stat`, `file`, `getfacl` |
27
- | Copy / move / delete | `cp` / `mv` / `rm` (with confirmation) |
28
- | Create folder | `mkdir` |
29
- | Open terminal | PTY channel over SSH |
30
- | Task manager | `ps -eo`, `top -b -n1`, `kill` |
31
- | System monitor | `free`, `df`, `uptime`, `cat /proc/...` |
32
- | Service manager | `systemctl list-units`, `systemctl start/stop/status` |
33
- | Log viewer | `journalctl`, `tail -f` over a channel |
34
- | Text editor | read via SFTP/`cat`, save via SFTP |
35
- | Network connections | `ss -tulpn`, `ip a` |
package/specs/vision.md DELETED
@@ -1,145 +0,0 @@
1
- # DeskSSH Vision
2
-
3
- > The project's north: the _why_ and the _where-to_. More aspirational than
4
- > `spec.md`/`plan.md`, but consistent with `constitution.md`.
5
- > Last revised: 2026-06-26.
6
-
7
- ## Purpose
8
-
9
- To make administering and using a Linux server over SSH **as accessible as a
10
- lifelong desktop**: installing nothing on the server, transmitting no pixels and
11
- losing no transparency. DeskSSH is the GUI for those whom the terminal intimidates
12
- — and the convenience for those it doesn't.
13
-
14
- ## North star (the scenario we pursue)
15
-
16
- A company **stops paying** for expensive, slow, heavy remote-desktop systems.
17
- Instead it has a simple **headless SSH server** and gives its employees **DeskSSH**:
18
- they log in, work with a familiar interface and feel comfortable, without anyone
19
- needing to master the console. Adoption grows so much that third parties want to
20
- integrate — e.g. **OnlyOffice ships an extension** for DeskSSH and office documents
21
- are handled from there.
22
-
23
- That scenario sums up the project's three bets: **accessibility**, **trust
24
- (security)** and **ecosystem**.
25
-
26
- ## Primary user
27
-
28
- A person with **low CLI fluency** (see `spec.md §5`). v1 prioritizes accessibility:
29
- safe, guided defaults, plain language, the terminal as a last resort and
30
- transparency (Art. 3) on demand, not as the protagonist.
31
-
32
- ## v1 ambition
33
-
34
- A **focused, polished** cut —better small and round than large and half-baked—:
35
- connection/hosts, desktop shell, file manager, editor, terminal and system monitor
36
- (see `plan.md §6`). The "full desktop" is earned iteration by iteration, not all at
37
- once.
38
-
39
- ## Success criteria
40
-
41
- What "popular and useful" means to us (in this order):
42
-
43
- 1. **Real usage** — people and **teams actually using it** on their servers; visible
44
- traction (npm downloads, active deployments). This is priority #1.
45
- 2. **Ecosystem** — third parties contributing **apps/handlers and adapters**; the
46
- emblematic case is an **OnlyOffice-style** integration for office documents.
47
-
48
- > `[TBD]` concrete metrics/deadlines (stars, number of users, date). For now success
49
- > is defined **qualitatively**, not by numbers.
50
-
51
- ## Ecosystem and extensibility
52
-
53
- The OnlyOffice scenario **is not magic**: it is the extensibility already seeded in
54
- the architecture.
55
-
56
- - The **file-type handler registry** + "Open with" (FR-025) is the hook point: a
57
- third party registers a handler for `.docx/.xlsx` that delegates to its engine
58
- (e.g. an OnlyOffice Document Server).
59
- - The **capability contract** (IR) lets new **platforms** be added by filling in
60
- manifests, not rewriting (see `plan.md §4`).
61
- - The **third-party app/plugin store** is out of v1, but the architecture is
62
- designed **not to close the door** on it.
63
-
64
- > Honest reality-check: the "company without remote desktop" scenario raises the bar
65
- > on **gateway security** (multi-user, auth, isolation, auditing), which is already
66
- > the project's biggest risk (`plan.md §5, §7`). Trust is a **requirement, not an
67
- > extra**, for that vision.
68
-
69
- ## Host roadmap (the reach ambition)
70
-
71
- To reach **Windows, macOS, \*BSD and a wide range of Linux distributions** as remote
72
- host, without the user noticing the difference (unless they open the terminal).
73
- Prioritized by **popularity**, not difficulty (see the tier matrix in `plan.md §4`).
74
-
75
- ## Ideas under exploration
76
-
77
- > Seedbed: ideas captured **without commitment**. 💡 = from the author · 🔹 =
78
- > suggested for consideration. Those marked **→** could graduate to
79
- > `spec.md`/`plan.md`.
80
-
81
- ### Desktop experience
82
-
83
- - 💡 **Mirror the remote desktop:** show the same desktop as the remote machine (its
84
- `~/Desktop` folder); if it doesn't exist (headless server), use desktop
85
- preferences **stored locally** per user/host.
86
- - 💡 **Streaming open:** open certain files via _streaming_ (partial SFTP reads)
87
- without downloading them whole, with a **loading screen** and latency-aware UI
88
- (Art. 8). **→** extends FR-025.
89
- - 💡 **"Everything from DeskSSH":** the user shouldn't need to fall back to the OS —
90
- including **viewing installed apps and installing/uninstalling** per their
91
- permissions (the Packages app, _post-v1_; privilege/`sudo`-sensitive, Art. 4).
92
- - 🔹 **Trash + undo:** delete moves to trash instead of a direct `rm`; a key safety
93
- net for a non-technical user.
94
- - 🔹 **Global search** (files, apps, actions) and **favorites/shortcuts** to servers
95
- and folders.
96
- - 🔹 **Learning mode:** show and explain the command behind each action (supports
97
- Art. 3 in an educational way).
98
- - 🔹 **i18n** from early on (to be "popular" at global scale) and **real
99
- accessibility** (keyboard, screen readers), consistent with the project's
100
- inclusive spirit.
101
-
102
- ### Integrations and extensions
103
-
104
- - 💡 **Office documents (OnlyOffice):** third-party handler for `.docx/.xlsx`
105
- delegating to an OnlyOffice Document Server — the emblematic case of the north
106
- star.
107
- - 💡 **VSCode-like code editor:** via **Monaco** (VSCode's editor) as a handler for
108
- code files. _(Note: "VSCode Remote-SSH" is a different product; here we mean
109
- embedding its editor.)_
110
- - 💡 **HTML/web view** ("Chromium" idea): a handler that previews `.html` and
111
- similar. Since DeskSSH is a web app, **a sandboxed `<iframe>` is enough** to have a
112
- "browser" (remote content = risk → isolate well).
113
- - 💡 **Chrome-like extension system:** clear rules, a **manifest**, an **extension
114
- store** and third-party extensions (at least in the local version). **→** The
115
- **permission/security model** is the hard core: an extension that runs SSH
116
- commands is as powerful as the user; it needs declared permissions, isolation and
117
- (for the store) review/signing.
118
- - 🔹 Other natural handler integrations: **Git**, **Docker/containers**,
119
- **databases** — all as apps/extensions.
120
-
121
- ### Distribution, community and sustainability
122
-
123
- - 💡 **Two usage forms** (almost architecture, **→** `plan.md`):
124
- - **Hosted web:** an SSH client for servers with an open internet connection.
125
- - **Local via npm:** for SSH servers **only reachable over LAN**; self-hosted. The
126
- hosted web links to this installation.
127
- - 💡 **Repository system** for apps/extensions: one for the web version and a
128
- freely-installable one for the local version.
129
- - 💡 **"How to build extensions" docs** and the **GitHub** page as the collaboration
130
- hub.
131
- - 💡 **Donations** to sustain the project (GitHub Sponsors / OpenCollective).
132
- - 💡 **Community space** for users to propose their needs and ideas (feature requests
133
- / discussions) — **instead of telemetry**, consistent with trust and the
134
- open-source spirit.
135
- - 🔹 **Trust note:** a hosted instance that **relays SSH** to internet-exposed
136
- servers is the scenario of **maximum security responsibility** and a juicy target;
137
- many will prefer the local/LAN version. The two modes serve different trust
138
- appetites.
139
-
140
- ## Anti-vision (what we do NOT want to be)
141
-
142
- - **Not** a remote desktop / VNC / RDP (transmitting pixels).
143
- - **Not** an admin panel that requires installing an agent on the server.
144
- - **Not** a tool only for power users (that already exists).
145
- - **Not** a "half-everything": we prefer a few excellent apps.
@@ -1,23 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "compilerOptions": {
4
- "target": "ES2022",
5
- "module": "NodeNext",
6
- "moduleResolution": "NodeNext",
7
- "lib": ["ES2022"],
8
- "declaration": true,
9
- "declarationMap": true,
10
- "sourceMap": true,
11
- "composite": true,
12
- "strict": true,
13
- "noUncheckedIndexedAccess": true,
14
- "noImplicitOverride": true,
15
- "noFallthroughCasesInSwitch": true,
16
- "noUnusedLocals": true,
17
- "noUnusedParameters": true,
18
- "esModuleInterop": true,
19
- "forceConsistentCasingInFileNames": true,
20
- "skipLibCheck": true,
21
- "verbatimModuleSyntax": true
22
- }
23
- }
package/tsconfig.json DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "files": [],
3
- "references": [{ "path": "./packages/core" }, { "path": "./packages/server" }]
4
- }
package/vitest.config.ts DELETED
@@ -1,7 +0,0 @@
1
- import { defineConfig } from 'vitest/config';
2
-
3
- export default defineConfig({
4
- test: {
5
- include: ['packages/*/src/**/*.{test,spec}.ts'],
6
- },
7
- });