dsh-wsl-workspace 0.2.2 → 0.2.3
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.de.md +49 -0
- package/README.es.md +49 -0
- package/README.fr.md +49 -0
- package/README.ja.md +49 -0
- package/README.ko.md +49 -0
- package/README.md +1 -1
- package/README.pt.md +49 -0
- package/README.ru.md +49 -0
- package/README.zh.md +3 -3
- package/lib/client.js +76 -5
- package/lib/client.js.map +1 -1
- package/lib/fs.js +1 -1
- package/lib/index.js +92 -13
- package/lib/index.js.map +1 -1
- package/lib/{paths-DBaSmi7x.js → paths-BDE1NVOv.js} +17 -2
- package/lib/paths-BDE1NVOv.js.map +1 -0
- package/lib/shell.js +2 -2
- package/lib/{wsl-GjkUifnx.js → wsl-CW3VPEIA.js} +41 -3
- package/lib/wsl-CW3VPEIA.js.map +1 -0
- package/package.json +8 -3
- package/src/client/AddWslWorkspace.tsx +349 -346
- package/src/client/api.ts +124 -104
- package/src/client/index.ts +233 -194
- package/src/index.ts +108 -13
- package/src/shared/paths.ts +175 -159
- package/src/shared/wsl-credentials.ts +135 -85
- package/image-1.png +0 -0
- package/image.png +0 -0
- package/lib/paths-DBaSmi7x.js.map +0 -1
- package/lib/wsl-GjkUifnx.js.map +0 -1
package/README.de.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# dsh-wsl-workspace
|
|
2
|
+
|
|
3
|
+
[English](README.md) · [中文](README.zh.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Español](README.es.md) · [Português](README.pt.md) · [Русский](README.ru.md)
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
Füge aus der DeepSeek-Harness-Web-GUI einen WSL-Arbeitsbereich hinzu und führe die gesamte Agent-Sitzung — Bash-Befehle und Datei-Lesen/-Schreiben — innerhalb einer lokalen WSL-Distribution mit Linux-Pfaden aus. In WSL muss nichts installiert werden. Die Sitzung kann gleichzeitig auf WSL und Windows zugreifen: Bash-Befehle laufen in der WSL-Distribution, während Windows-Dateien über `/mnt/<laufwerk>` (z. B. `/mnt/c/Users/...`) erreichbar bleiben.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
Wähle eine der drei folgenden Methoden und starte danach `dsh web` neu:
|
|
11
|
+
|
|
12
|
+
```powershell
|
|
13
|
+
# 1) npm-Paket
|
|
14
|
+
dsh plugin --profile web add dsh-wsl-workspace
|
|
15
|
+
|
|
16
|
+
# 2) GitHub-Repository (enthält das vorgebaute lib/, kein lokaler Build nötig)
|
|
17
|
+
dsh plugin --profile web add https://github.com/6Mikao9/dsh-wsl-workspace
|
|
18
|
+
|
|
19
|
+
# 3) Lokales Verzeichnis (Entwicklung / eigener Gebrauch)
|
|
20
|
+
dsh plugin --profile web add D:\path\to\dsh-wsl-workspace
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Nach dem Neustart von `dsh web` erscheint neben Settings am unteren Rand der Seitenleiste ein W-Button.
|
|
24
|
+
|
|
25
|
+
## Verwendung
|
|
26
|
+
|
|
27
|
+
Klicke in der Seitenleiste unten neben Settings auf den W-Button, um den Dialog „Add WSL workspace" zu öffnen. Wähle eine Distribution, durchsuche den Verzeichnisbaum oder gib einen absoluten Linux-Pfad ein (z. B. `/home/me/proj`) — mit dem Check-Button kannst du prüfen, ob der Pfad existiert. Der Dialog folgt der Sprache der DeepSeek-Harness-Oberfläche. Das Feld Benutzername ist optional: Leer lassen führt die Befehle als Standardbenutzer der Distribution aus, ein Eintrag führt die Sitzung als diesen Benutzer aus (äquivalent zu `wsl.exe -u <benutzer>`). Der Benutzername ändert nur die Ausführungsidentität des Bash-Tools — die Datei-Tools laufen über die Windows-seitige WSL-Freigabe und sind davon unberührt. Der Benutzername jedes Arbeitsbereichs liegt in `<dshHome>/wsl-workspaces.json`; lösche den Eintrag (oder erstelle den Arbeitsbereich über den Dialog neu), um zum Standardbenutzer zurückzukehren.
|
|
28
|
+
|
|
29
|
+
Klicke auf „Create & open", um eine neue Sitzung im Arbeitsbereich zu starten. In der neuen Sitzung führt das Bash-Tool Befehle in der gewählten Distribution aus, und `read`/`write`/`edit` arbeiten auf WSL-Dateien — jeder vom Modell gesehene Pfad ist ein Linux-Pfad. Der Modus-Wähler funktioniert wie gewohnt: Standard, PTC, Minimal und Creative landen automatisch auf ihrer WSL-Variante (die WSL-Varianten-Einträge im Wähler sind zweisprachig, z. B. `WSL · Standard mode(标准模式)`), und Windows-Dateien bleiben aus der Sitzung unter `/mnt/<laufwerk>` (z. B. `/mnt/c/Users/...`) erreichbar.
|
|
30
|
+
|
|
31
|
+

|
|
32
|
+
## Verhaltenshinweise
|
|
33
|
+
|
|
34
|
+
- **Bash-Tool**: läuft in der WSL-Distribution als der konfigurierte Benutzername (leer = Standardbenutzer der Distribution, oft `root`) und kann daher überall in der Distribution lesen und schreiben. Die Windows-ACL-Sandbox kann `wsl.exe` nicht umhüllen — die Kindprozesse laufen auf der Linux-Kernelseite — daher ist WSL selbst die Isolationsgrenze, und die DSH-Dateipolitik gilt nicht für Bash.
|
|
35
|
+
- **Datei-Tools (`read`/`write`/`edit`)**: laufen über die Windows-seitige WSL-9P-Freigabe und unterliegen der DSH-Dateipolitik. Unter `workspace-write` ist Lesen überall möglich, Schreiben aber auf den Sitzungs-Arbeitsbereich beschränkt; stelle die Politik auf `danger-full-access` um, um auch außerhalb schreiben zu können. Das Benutzername-Feld betrifft die Datei-Tools nicht.
|
|
36
|
+
- Das verzerrte `localhost`-Port-Forwarding-Banner, das `wsl.exe` auf stderr ausgibt, wenn die Distribution noch nicht lief, ist harmlos.
|
|
37
|
+
|
|
38
|
+
## Lizenz und Namensnennung
|
|
39
|
+
|
|
40
|
+
MIT — siehe [LICENSE](LICENSE) und [NOTICE](NOTICE). Das NOTICE listet präzise auf:
|
|
41
|
+
|
|
42
|
+
- **Angepasster/übernommener Quellcode**: DeepSeek Harness (MIT) — `dsh-bash-local` (Ausführungsmechanik), `dsh-fs-local` (`WslFileSystem` subklassifiziert es) und die mitgelieferten Agent-Presets (vom Variantengenerator gelesen und transformiert);
|
|
43
|
+
- **Design-Referenzen (kein Code kopiert)**: [dsh-bash-terminal](https://github.com/MAXeaglet/dsh-bash-terminal) (MIT, wsl-argv-/WSLENV-Ansatz), [dsh-side-panel](https://github.com/ccq1/dsh-side-panel) (BSD-3-Clause, Host-Route-Muster), [vpshub](https://github.com/Sdongmaker/vpshub) (MIT, Roadmap-Referenz).
|
|
44
|
+
|
|
45
|
+
Behalte `LICENSE` und `NOTICE` bei der Weiterverteilung bei.
|
|
46
|
+
|
|
47
|
+
## Danksagung
|
|
48
|
+
|
|
49
|
+
Besonderer Dank an [dsh-deep-whale](https://github.com/Small-tailqwq/dsh-deep-whale) (DSH-Web-鲸鱼娘-Skin-Serie · 深海女仆工坊 maid-atelier, CC BY-NC-SA 4.0): Das Wal-Mädchen-Skin-Plugin bringt eine ganze Reihe bezaubernder Skins in die DeepSeek-Harness-Web-Oberfläche und macht die tägliche Nutzung von DSH wärmer.
|
package/README.es.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# dsh-wsl-workspace
|
|
2
|
+
|
|
3
|
+
[English](README.md) · [中文](README.zh.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Español](README.es.md) · [Português](README.pt.md) · [Русский](README.ru.md)
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
Añade un espacio de trabajo WSL desde la interfaz web de DeepSeek Harness y ejecuta toda la sesión del agente — comandos bash y lectura/escritura de archivos — dentro de una distribución WSL local con rutas en formato Linux. No hay nada que instalar dentro de WSL. La sesión puede acceder a la vez a WSL y a Windows: los comandos bash se ejecutan dentro de la distribución WSL, mientras que los archivos de Windows siguen accesibles vía `/mnt/<unidad>` (por ejemplo `/mnt/c/Users/...`).
|
|
7
|
+
|
|
8
|
+
## Instalación
|
|
9
|
+
|
|
10
|
+
Elige uno de los tres métodos siguientes y reinicia `dsh web`:
|
|
11
|
+
|
|
12
|
+
```powershell
|
|
13
|
+
# 1) Paquete npm
|
|
14
|
+
dsh plugin --profile web add dsh-wsl-workspace
|
|
15
|
+
|
|
16
|
+
# 2) Repositorio de GitHub (incluye lib/ precompilado, sin compilar en local)
|
|
17
|
+
dsh plugin --profile web add https://github.com/6Mikao9/dsh-wsl-workspace
|
|
18
|
+
|
|
19
|
+
# 3) Directorio local (desarrollo / uso personal)
|
|
20
|
+
dsh plugin --profile web add D:\path\to\dsh-wsl-workspace
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Tras reiniciar `dsh web`, aparece un botón W junto a Settings en la parte inferior de la barra lateral.
|
|
24
|
+
|
|
25
|
+
## Uso
|
|
26
|
+
|
|
27
|
+
Haz clic en el botón W junto a Settings en la parte inferior de la barra lateral para abrir el diálogo «Add WSL workspace». Elige una distribución, explora el árbol de directorios o escribe una ruta Linux absoluta (por ejemplo `/home/me/proj`) — el botón Check verifica que la ruta exista antes de crear el espacio de trabajo. El diálogo sigue el idioma de la interfaz de DeepSeek Harness. El campo de nombre de usuario es opcional: déjalo vacío para ejecutar los comandos con el usuario por defecto de la distribución, o indica un usuario Linux de esa distribución para ejecutar la sesión como ese usuario (equivalente a `wsl.exe -u <usuario>`). El nombre de usuario solo cambia la identidad de ejecución de la herramienta bash — las herramientas de archivos pasan por el recurso compartido WSL del lado de Windows y no se ven afectadas. El nombre de usuario de cada espacio de trabajo se guarda en `<dshHome>/wsl-workspaces.json`; borra la entrada (o recrea el espacio de trabajo desde el diálogo) para volver al usuario por defecto.
|
|
28
|
+
|
|
29
|
+
Haz clic en «Create & open» para iniciar una nueva sesión en el espacio de trabajo. En la nueva sesión, la herramienta bash ejecuta comandos dentro de la distribución elegida y `read`/`write`/`edit` operan sobre archivos WSL, así que cada ruta que ve el modelo es una ruta Linux. El selector de modos sigue funcionando igual: Standard, PTC, Minimal y Creative aterrizan automáticamente en su variante WSL (las entradas de variante WSL del selector son bilingües, p. ej. `WSL · Standard mode(标准模式)`), y los archivos de Windows siguen accesibles desde la sesión bajo `/mnt/<unidad>` (por ejemplo `/mnt/c/Users/...`).
|
|
30
|
+
|
|
31
|
+

|
|
32
|
+
## Notas de comportamiento
|
|
33
|
+
|
|
34
|
+
- **Herramienta bash**: se ejecuta dentro de la distribución WSL con el nombre de usuario configurado (vacío = usuario por defecto de la distribución, a menudo `root`), por lo que puede leer y escribir en cualquier parte de la distribución. El sandbox ACL de Windows no puede envolver `wsl.exe` — sus procesos hijo corren del lado del kernel de Linux — así que WSL es en sí la frontera de aislamiento y la política de archivos de DSH no se aplica a bash.
|
|
35
|
+
- **Herramientas de archivo (`read`/`write`/`edit`)**: pasan por el recurso compartido WSL 9P del lado de Windows y quedan sujetas a la política de archivos de DSH. Con `workspace-write`, las lecturas funcionan en cualquier lugar pero las escrituras se limitan al espacio de trabajo de la sesión; cambia la política a `danger-full-access` para permitir también escrituras fuera. El campo de nombre de usuario no afecta a las herramientas de archivo.
|
|
36
|
+
- El banner de reenvío de puerto `localhost` (texto ilegible) que `wsl.exe` imprime en stderr cuando la distribución aún no estaba en marcha es inofensivo.
|
|
37
|
+
|
|
38
|
+
## Licencia y atribución
|
|
39
|
+
|
|
40
|
+
MIT — ver [LICENSE](LICENSE) y [NOTICE](NOTICE). El NOTICE enumera con precisión:
|
|
41
|
+
|
|
42
|
+
- **Código fuente adaptado/heredado**: DeepSeek Harness (MIT) — `dsh-bash-local` (mecánica del ejecutor), `dsh-fs-local` (`WslFileSystem` lo subclasa) y los agent presets incluidos (leídos y transformados por el generador de variantes);
|
|
43
|
+
- **Referencias de diseño (sin código copiado)**: [dsh-bash-terminal](https://github.com/MAXeaglet/dsh-bash-terminal) (MIT, enfoque wsl argv/WSLENV), [dsh-side-panel](https://github.com/ccq1/dsh-side-panel) (BSD-3-Clause, patrón de ruta del host), [vpshub](https://github.com/Sdongmaker/vpshub) (MIT, referencia de hoja de ruta).
|
|
44
|
+
|
|
45
|
+
Conserva `LICENSE` y `NOTICE` al redistribuir.
|
|
46
|
+
|
|
47
|
+
## Agradecimientos
|
|
48
|
+
|
|
49
|
+
Un agradecimiento especial a [dsh-deep-whale](https://github.com/Small-tailqwq/dsh-deep-whale) (serie de skins 鲸鱼娘 para DSH Web · 深海女仆工坊 maid-atelier, CC BY-NC-SA 4.0): el plugin de skins de la chica ballena aporta un conjunto completo de skins adorables a la interfaz web de DeepSeek Harness y hace más cálido el uso diario de DSH.
|
package/README.fr.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# dsh-wsl-workspace
|
|
2
|
+
|
|
3
|
+
[English](README.md) · [中文](README.zh.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Español](README.es.md) · [Português](README.pt.md) · [Русский](README.ru.md)
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
Ajoutez un espace de travail WSL depuis l'interface web de DeepSeek Harness et exécutez toute la session de l'agent — commandes bash et lectures/écritures de fichiers — dans une distribution WSL locale avec des chemins au format Linux. Aucune installation supplémentaire n'est nécessaire dans WSL. La session peut accéder simultanément à WSL et à Windows : les commandes bash s'exécutent dans la distribution WSL, tandis que les fichiers Windows restent accessibles via `/mnt/<lecteur>` (par exemple `/mnt/c/Users/...`).
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
Choisissez l'une des trois méthodes ci-dessous, puis redémarrez `dsh web` :
|
|
11
|
+
|
|
12
|
+
```powershell
|
|
13
|
+
# 1) Paquet npm
|
|
14
|
+
dsh plugin --profile web add dsh-wsl-workspace
|
|
15
|
+
|
|
16
|
+
# 2) Dépôt GitHub (livré avec lib/ pré-construit, aucune compilation locale requise)
|
|
17
|
+
dsh plugin --profile web add https://github.com/6Mikao9/dsh-wsl-workspace
|
|
18
|
+
|
|
19
|
+
# 3) Répertoire local (développement / usage personnel)
|
|
20
|
+
dsh plugin --profile web add D:\path\to\dsh-wsl-workspace
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Après le redémarrage de `dsh web`, un bouton W apparaît à côté de Settings en bas de la barre latérale.
|
|
24
|
+
|
|
25
|
+
## Utilisation
|
|
26
|
+
|
|
27
|
+
Cliquez sur le bouton W à côté de Settings en bas de la barre latérale pour ouvrir la boîte de dialogue « Add WSL workspace ». Choisissez une distribution, parcourez l'arborescence ou saisissez un chemin Linux absolu (par exemple `/home/me/proj`) — le bouton Check vérifie que le chemin existe avant la création. La langue de la boîte de dialogue suit la langue de l'interface DeepSeek Harness. Le champ nom d'utilisateur est facultatif : laissez-le vide pour exécuter les commandes avec l'utilisateur par défaut de la distribution, ou indiquez un utilisateur Linux de cette distribution pour exécuter la session sous cet utilisateur (équivalent à `wsl.exe -u <utilisateur>`). Le nom d'utilisateur ne change que l'identité d'exécution de l'outil bash — les outils de fichiers passent par le partage WSL côté Windows et ne sont pas affectés. Le nom d'utilisateur de chaque espace de travail est conservé dans `<dshHome>/wsl-workspaces.json` ; supprimez l'entrée (ou recréez l'espace de travail depuis la boîte de dialogue) pour revenir à l'utilisateur par défaut.
|
|
28
|
+
|
|
29
|
+
Cliquez sur « Create & open » pour démarrer une nouvelle session dans l'espace de travail. Dans la nouvelle session, l'outil bash exécute les commandes dans la distribution choisie et `read`/`write`/`edit` opèrent sur les fichiers WSL, donc chaque chemin vu par le modèle est un chemin Linux. Le sélecteur de mode fonctionne comme d'habitude : Standard, PTC, Minimal et Creative tombent chacun automatiquement sur leur variante WSL (les entrées des variantes WSL dans le sélecteur sont bilingues, ex. `WSL · Standard mode(标准模式)`), et les fichiers Windows restent accessibles depuis la session sous `/mnt/<lecteur>` (par exemple `/mnt/c/Users/...`).
|
|
30
|
+
|
|
31
|
+

|
|
32
|
+
## Notes de comportement
|
|
33
|
+
|
|
34
|
+
- **Outil bash** : s'exécute dans la distribution WSL avec le nom d'utilisateur configuré (vide = utilisateur par défaut de la distribution, souvent `root`), il peut donc lire et écrire n'importe où dans la distribution. Le sandbox ACL de Windows ne peut pas envelopper `wsl.exe` — ses enfants s'exécutent côté noyau Linux — donc WSL lui-même est la frontière d'isolation et la politique de fichiers de DSH ne s'applique pas à bash.
|
|
35
|
+
- **Outils de fichiers (`read`/`write`/`edit`)** : passent par le partage WSL 9P côté Windows et sont soumis à la politique de fichiers de DSH. Sous `workspace-write`, les lectures fonctionnent partout mais les écritures sont limitées à l'espace de travail de la session ; passez la politique à `danger-full-access` pour autoriser aussi les écritures en dehors. Le champ nom d'utilisateur n'affecte pas les outils de fichiers.
|
|
36
|
+
- La bannière de transfert de port `localhost` (texte illisible) que `wsl.exe` imprime sur stderr quand la distribution n'était pas encore démarrée est inoffensive.
|
|
37
|
+
|
|
38
|
+
## Licence et attribution
|
|
39
|
+
|
|
40
|
+
MIT — voir [LICENSE](LICENSE) et [NOTICE](NOTICE). Le NOTICE liste précisément :
|
|
41
|
+
|
|
42
|
+
- **Code source adapté/hérité** : DeepSeek Harness (MIT) — `dsh-bash-local` (mécanique de l'exécuteur), `dsh-fs-local` (`WslFileSystem` le sous-classe), et les agent presets fournis (lus et transformés par le générateur de variantes) ;
|
|
43
|
+
- **Références de conception (aucun code copié)** : [dsh-bash-terminal](https://github.com/MAXeaglet/dsh-bash-terminal) (MIT, approche wsl argv/WSLENV), [dsh-side-panel](https://github.com/ccq1/dsh-side-panel) (BSD-3-Clause, motif de route hôte), [vpshub](https://github.com/Sdongmaker/vpshub) (MIT, référence de feuille de route).
|
|
44
|
+
|
|
45
|
+
Conservez `LICENSE` et `NOTICE` lors de la redistribution.
|
|
46
|
+
|
|
47
|
+
## Remerciements
|
|
48
|
+
|
|
49
|
+
Merci tout particulier à [dsh-deep-whale](https://github.com/Small-tailqwq/dsh-deep-whale) (série de skins 鲸鱼娘 pour le web DSH · 深海女仆工坊 maid-atelier, CC BY-NC-SA 4.0) : le plugin de skin de la fille-baleine apporte une gamme complète de skins adorables à l'interface web de DeepSeek Harness et rend l'usage quotidien de DSH plus chaleureux.
|
package/README.ja.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# dsh-wsl-workspace
|
|
2
|
+
|
|
3
|
+
[English](README.md) · [中文](README.zh.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Español](README.es.md) · [Português](README.pt.md) · [Русский](README.ru.md)
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
DeepSeek Harness Web GUI から WSL ワークスペースを追加し、エージェントセッション全体(bash コマンドとファイルの読み書き)をローカルの WSL ディストリビューション内で実行します。パスはすべて Linux 形式です。WSL 内への追加インストールは不要です。セッションから WSL と Windows の両方に同時にアクセスできます。bash コマンドは WSL ディストリビューション内で実行され、Windows のファイルは `/mnt/<drive>`(例:`/mnt/c/Users/...`)経由でいつでもアクセスできます。
|
|
7
|
+
|
|
8
|
+
## インストール
|
|
9
|
+
|
|
10
|
+
次のいずれかの方法でインストールし、`dsh web` を再起動してください:
|
|
11
|
+
|
|
12
|
+
```powershell
|
|
13
|
+
# 1) npm パッケージ
|
|
14
|
+
dsh plugin --profile web add dsh-wsl-workspace
|
|
15
|
+
|
|
16
|
+
# 2) GitHub リポジトリ(事前ビルド済みの lib/ を含むためローカルビルド不要)
|
|
17
|
+
dsh plugin --profile web add https://github.com/6Mikao9/dsh-wsl-workspace
|
|
18
|
+
|
|
19
|
+
# 3) ローカルディレクトリ(開発・自用)
|
|
20
|
+
dsh plugin --profile web add D:\path\to\dsh-wsl-workspace
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`dsh web` を再起動すると、サイドバー下部の Settings の隣に W ボタンが表示されます。
|
|
24
|
+
|
|
25
|
+
## 使い方
|
|
26
|
+
|
|
27
|
+
サイドバー下部の Settings の隣にある W ボタンをクリックして「Add WSL workspace」ダイアログを開きます。ディストリビューションを選択し、ディレクトリツリーを閲覧するか Linux の絶対パス(例:`/home/me/proj`)を入力します。Check ボタンでパスの存在を確認できます。ダイアログの言語は DeepSeek Harness の UI 言語に追従します。ユーザー名フィールドは任意です。空欄の場合はディストリビューションのデフォルトユーザーで実行され、入力した場合はそのユーザーで実行されます(`wsl.exe -u <ユーザー名>` と同等)。ユーザー名は bash ツールの実行ユーザーのみに影響し、ファイルツールは Windows 側の WSL 共有経由のため影響を受けません。ワークスペースごとのユーザー名は `<dshHome>/wsl-workspaces.json` に保存されます。エントリを削除する(またはダイアログからワークスペースを作り直す)とデフォルトユーザーに戻ります。
|
|
28
|
+
|
|
29
|
+
「Create & open」をクリックすると、新しいセッションが WSL で起動します。セッション内では bash ツールが選択したディストリビューション内でコマンドを実行し、`read`/`write`/`edit` は WSL のファイルを操作するため、モデルが見るすべてのパスは Linux 形式です。モード選択は従来どおり機能します。Standard・PTC・Minimal・Creative はそれぞれ対応する WSL バリアントに自動的に割り当てられます(選択肢の WSL バリアントは二言語表示、例:`WSL · Standard mode(标准模式)`)。セッション内から Windows のファイルは `/mnt/<drive>`(例:`/mnt/c/Users/...`)経由でアクセスできます。
|
|
30
|
+
|
|
31
|
+

|
|
32
|
+
## 動作メモ
|
|
33
|
+
|
|
34
|
+
- **bash ツール**:設定されたユーザー名で WSL ディストリビューション内で実行されます(空欄=ディストリビューションのデフォルトユーザー、多くの場合 `root`)。ディストリビューション内のどこでも読み書きできます。Windows の ACL サンドボックスは `wsl.exe` を包み込めません(子プロセスは Linux カーネル側で実行されるため)。WSL 自体が分離境界となり、DSH のファイルポリシーは bash には適用されません。
|
|
35
|
+
- **ファイルツール(`read`/`write`/`edit`)**:Windows 側の WSL 9P 共有経由で動作し、DSH のファイルポリシーの適用を受けます。`workspace-write` では読み取りはどこでも可能ですが、書き込みはセッションのワークスペース内に制限されます。ファイルポリシーを `danger-full-access` に変更するとワークスペース外への書き込みも可能になります。ユーザー名フィールドはファイルツールには影響しません。
|
|
36
|
+
- ディストリビューションがまだ起動していないときに `wsl.exe` が stderr に出力する `localhost` ポート転送の文字化けバナーは無害です。
|
|
37
|
+
|
|
38
|
+
## ライセンスとクレジット
|
|
39
|
+
|
|
40
|
+
MIT — [LICENSE](LICENSE) と [NOTICE](NOTICE) をご覧ください。NOTICE に正確なリストがあります:
|
|
41
|
+
|
|
42
|
+
- **改変・継承したソースコード**:DeepSeek Harness(MIT)— `dsh-bash-local`(実行機構)、`dsh-fs-local`(`WslFileSystem` がサブクラス化)、同梱の agent presets(バリアント生成で読み取り・変換);
|
|
43
|
+
- **設計参照(コードの複製なし)**:[dsh-bash-terminal](https://github.com/MAXeaglet/dsh-bash-terminal)(MIT、wsl argv/WSLENV の手法)、[dsh-side-panel](https://github.com/ccq1/dsh-side-panel)(BSD-3-Clause、ホストルートパターン)、[vpshub](https://github.com/Sdongmaker/vpshub)(MIT、ロードマップ参考)。
|
|
44
|
+
|
|
45
|
+
再配布の際は `LICENSE` と `NOTICE` を保持してください。
|
|
46
|
+
|
|
47
|
+
## 謝辞
|
|
48
|
+
|
|
49
|
+
[dsh-deep-whale](https://github.com/Small-tailqwq/dsh-deep-whale)(DSH Web 鲸鱼娘 スキンシリーズ · 深海女仆工坊 maid-atelier、CC BY-NC-SA 4.0)に感謝します。クジラ娘スキンプラグインは DeepSeek Harness Web UI に可愛いスキン一式をもたらし、DSH の日常利用をより温かみのあるものにしてくれます。
|
package/README.ko.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# dsh-wsl-workspace
|
|
2
|
+
|
|
3
|
+
[English](README.md) · [中文](README.zh.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Español](README.es.md) · [Português](README.pt.md) · [Русский](README.ru.md)
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
DeepSeek Harness Web GUI에서 WSL 워크스페이스를 추가하고 에이전트 세션 전체(bash 명령과 파일 읽기/쓰기)를 로컬 WSL 배포판 안에서 실행합니다. 모든 경로는 Linux 형식이며, WSL 내부에 별도로 설치할 것이 없습니다. 세션에서 WSL과 Windows 양쪽에 동시에 접근할 수 있습니다. bash 명령은 WSL 배포판 안에서 실행되고, Windows 파일은 `/mnt/<drive>`(예: `/mnt/c/Users/...`)로 언제든 접근할 수 있습니다.
|
|
7
|
+
|
|
8
|
+
## 설치
|
|
9
|
+
|
|
10
|
+
아래 세 가지 방법 중 하나를 선택한 뒤 `dsh web`을 다시 시작하세요:
|
|
11
|
+
|
|
12
|
+
```powershell
|
|
13
|
+
# 1) npm 패키지
|
|
14
|
+
dsh plugin --profile web add dsh-wsl-workspace
|
|
15
|
+
|
|
16
|
+
# 2) GitHub 저장소(사전 빌드된 lib/ 포함, 로컬 빌드 불필요)
|
|
17
|
+
dsh plugin --profile web add https://github.com/6Mikao9/dsh-wsl-workspace
|
|
18
|
+
|
|
19
|
+
# 3) 로컬 디렉터리(개발/개인용)
|
|
20
|
+
dsh plugin --profile web add D:\path\to\dsh-wsl-workspace
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`dsh web`을 다시 시작하면 사이드바 하단 Settings 옆에 W 버튼이 나타납니다.
|
|
24
|
+
|
|
25
|
+
## 사용법
|
|
26
|
+
|
|
27
|
+
사이드바 하단 Settings 옆의 W 버튼을 클릭해 "Add WSL workspace" 대화상자를 엽니다. 배포판을 선택하고 디렉터리 트리를 탐색하거나 Linux 절대 경로(예: `/home/me/proj`)를 입력하세요. Check 버튼으로 경로 존재 여부를 확인할 수 있습니다. 대화상자 언어는 DeepSeek Harness UI 언어를 따릅니다. 사용자 이름 필드는 선택 사항입니다. 비워 두면 배포판의 기본 사용자로 실행되고, 입력하면 해당 사용자로 실행됩니다(`wsl.exe -u <사용자 이름>`과 동일). 사용자 이름은 bash 도구의 실행 사용자에게만 영향을 주며, 파일 도구는 Windows 쪽 WSL 공유를 거치므로 영향을 받지 않습니다. 워크스페이스별 사용자 이름은 `<dshHome>/wsl-workspaces.json`에 저장됩니다. 항목을 삭제하거나(또는 대화상자에서 워크스페이스를 다시 만들면) 기본 사용자로 돌아갑니다.
|
|
28
|
+
|
|
29
|
+
"Create & open"을 클릭하면 새 세션이 WSL에서 시작됩니다. 세션에서 bash 도구는 선택한 배포판 안에서 명령을 실행하고 `read`/`write`/`edit`는 WSL 파일을 다루므로 모델이 보는 모든 경로는 Linux 형식입니다. 모드 선택은 평소와 같이 작동합니다. Standard, PTC, Minimal, Creative는 각각 해당하는 WSL 변형으로 자동 연결됩니다(선택기의 WSL 변형 항목은 이중 언어로 표시, 예: `WSL · Standard mode(标准模式)`). 세션 안에서도 Windows 파일은 `/mnt/<drive>`(예: `/mnt/c/Users/...`)로 접근할 수 있습니다.
|
|
30
|
+
|
|
31
|
+

|
|
32
|
+
## 동작 참고
|
|
33
|
+
|
|
34
|
+
- **bash 도구**: 설정된 사용자 이름으로 WSL 배포판 안에서 실행됩니다(비움 = 배포판 기본 사용자, 대개 `root`). 배포판 어디든 읽고 쓸 수 있습니다. Windows ACL 샌드박스는 `wsl.exe`를 감쌀 수 없으며(자식 프로세스는 Linux 커널 쪽에서 실행됨), WSL 자체가 격리 경계가 되어 DSH 파일 정책은 bash에 적용되지 않습니다.
|
|
35
|
+
- **파일 도구(`read`/`write`/`edit`)**: Windows 쪽 WSL 9P 공유를 통해 동작하며 DSH 파일 정책의 적용을 받습니다. `workspace-write`에서는 읽기는 어디서나 가능하지만 쓰기는 세션 워크스페이스 안으로 제한됩니다. 파일 정책을 `danger-full-access`로 바꾸면 워크스페이스 밖 쓰기도 가능합니다. 사용자 이름 필드는 파일 도구에 영향을 주지 않습니다.
|
|
36
|
+
- 배포판이 아직 시작되지 않았을 때 `wsl.exe`가 stderr로 출력하는 `localhost` 포트 포워딩 깨진 배너는 무해합니다.
|
|
37
|
+
|
|
38
|
+
## 라이선스 및 출처
|
|
39
|
+
|
|
40
|
+
MIT — [LICENSE](LICENSE)와 [NOTICE](NOTICE)를 참고하세요. NOTICE에 정확한 목록이 있습니다:
|
|
41
|
+
|
|
42
|
+
- **개작/계승한 소스 코드**: DeepSeek Harness(MIT) — `dsh-bash-local`(실행 메커니즘), `dsh-fs-local`(`WslFileSystem`이 서브클래싱), 번들 agent presets(변형 생성에서 읽고 변환);
|
|
43
|
+
- **설계 참조(코드 복제 없음)**: [dsh-bash-terminal](https://github.com/MAXeaglet/dsh-bash-terminal)(MIT, wsl argv/WSLENV 방식), [dsh-side-panel](https://github.com/ccq1/dsh-side-panel)(BSD-3-Clause, 호스트 라우트 패턴), [vpshub](https://github.com/Sdongmaker/vpshub)(MIT, 로드맵 참고).
|
|
44
|
+
|
|
45
|
+
재배포 시 `LICENSE`와 `NOTICE`를 유지하세요.
|
|
46
|
+
|
|
47
|
+
## 감사의 말
|
|
48
|
+
|
|
49
|
+
[dsh-deep-whale](https://github.com/Small-tailqwq/dsh-deep-whale)(DSH Web 鲸鱼娘 스킨 시리즈 · 深海女仆工坊 maid-atelier, CC BY-NC-SA 4.0)에 특별히 감사드립니다. 고래 소녀 스킨 플러그인은 DeepSeek Harness Web UI에 귀여운 스킨 세트를 제공하며 DSH 사용을 더 따뜻하게 만들어 줍니다.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# dsh-wsl-workspace
|
|
2
2
|
|
|
3
|
-
[中文](README.zh.md)
|
|
3
|
+
[English](README.md) · [中文](README.zh.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Español](README.es.md) · [Português](README.pt.md) · [Русский](README.ru.md)
|
|
4
4
|

|
|
5
5
|
Add a WSL workspace from the DeepSeek Harness web GUI and run the whole agent session — bash commands and file reads/writes — inside a local WSL distribution with Linux paths. Nothing needs to be installed inside WSL. The session can reach both WSL and Windows at the same time: bash commands run inside the WSL distribution, while Windows files stay accessible via `/mnt/<drive>` (for example `/mnt/c/Users/...`).
|
|
6
6
|
|
package/README.pt.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# dsh-wsl-workspace
|
|
2
|
+
|
|
3
|
+
[English](README.md) · [中文](README.zh.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Español](README.es.md) · [Português](README.pt.md) · [Русский](README.ru.md)
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
Adicione um espaço de trabalho WSL a partir da interface web do DeepSeek Harness e execute toda a sessão do agente — comandos bash e leitura/escrita de arquivos — dentro de uma distribuição WSL local com caminhos em formato Linux. Não é necessário instalar nada dentro do WSL. A sessão pode acessar WSL e Windows ao mesmo tempo: os comandos bash são executados dentro da distribuição WSL, enquanto os arquivos do Windows continuam acessíveis via `/mnt/<unidade>` (por exemplo `/mnt/c/Users/...`).
|
|
7
|
+
|
|
8
|
+
## Instalação
|
|
9
|
+
|
|
10
|
+
Escolha um dos três métodos abaixo e reinicie o `dsh web`:
|
|
11
|
+
|
|
12
|
+
```powershell
|
|
13
|
+
# 1) Pacote npm
|
|
14
|
+
dsh plugin --profile web add dsh-wsl-workspace
|
|
15
|
+
|
|
16
|
+
# 2) Repositório GitHub (inclui lib/ pré-compilado, sem build local)
|
|
17
|
+
dsh plugin --profile web add https://github.com/6Mikao9/dsh-wsl-workspace
|
|
18
|
+
|
|
19
|
+
# 3) Diretório local (desenvolvimento / uso próprio)
|
|
20
|
+
dsh plugin --profile web add D:\path\to\dsh-wsl-workspace
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Após reiniciar o `dsh web`, um botão W aparece ao lado de Settings na parte inferior da barra lateral.
|
|
24
|
+
|
|
25
|
+
## Uso
|
|
26
|
+
|
|
27
|
+
Clique no botão W ao lado de Settings na parte inferior da barra lateral para abrir o diálogo "Add WSL workspace". Escolha uma distribuição, navegue pela árvore de diretórios ou digite um caminho Linux absoluto (por exemplo `/home/me/proj`) — o botão Check verifica se o caminho existe antes de criar o espaço de trabalho. O diálogo segue o idioma da interface do DeepSeek Harness. O campo nome de usuário é opcional: deixe vazio para executar os comandos com o usuário padrão da distribuição, ou informe um usuário Linux dessa distribuição para executar a sessão como esse usuário (equivalente a `wsl.exe -u <usuário>`). O nome de usuário só altera a identidade de execução da ferramenta bash — as ferramentas de arquivo passam pelo compartilhamento WSL do lado do Windows e não são afetadas. O nome de usuário de cada espaço de trabalho fica em `<dshHome>/wsl-workspaces.json`; exclua a entrada (ou recrie o espaço de trabalho pelo diálogo) para voltar ao usuário padrão.
|
|
28
|
+
|
|
29
|
+
Clique em "Create & open" para iniciar uma nova sessão no espaço de trabalho. Na nova sessão, a ferramenta bash executa comandos dentro da distribuição escolhida e `read`/`write`/`edit` operam nos arquivos WSL, portanto cada caminho visto pelo modelo é um caminho Linux. O seletor de modos continua funcionando normalmente: Standard, PTC, Minimal e Creative caem automaticamente na sua variante WSL (as entradas de variante WSL no seletor são bilíngues, ex. `WSL · Standard mode(标准模式)`), e os arquivos do Windows continuam acessíveis a partir da sessão sob `/mnt/<unidade>` (por exemplo `/mnt/c/Users/...`).
|
|
30
|
+
|
|
31
|
+

|
|
32
|
+
## Notas de comportamento
|
|
33
|
+
|
|
34
|
+
- **Ferramenta bash**: é executada dentro da distribuição WSL com o nome de usuário configurado (vazio = usuário padrão da distribuição, geralmente `root`), podendo ler e escrever em qualquer lugar da distribuição. O sandbox de ACL do Windows não consegue envolver o `wsl.exe` — seus processos filhos rodam no lado do kernel Linux — então o WSL em si é a fronteira de isolamento e a política de arquivos do DSH não se aplica ao bash.
|
|
35
|
+
- **Ferramentas de arquivo (`read`/`write`/`edit`)**: passam pelo compartilhamento WSL 9P do lado do Windows e ficam sujeitas à política de arquivos do DSH. Com `workspace-write`, leituras funcionam em qualquer lugar, mas escritas ficam restritas ao espaço de trabalho da sessão; mude a política para `danger-full-access` para permitir também escritas fora dele. O campo nome de usuário não afeta as ferramentas de arquivo.
|
|
36
|
+
- O banner de encaminhamento de porta `localhost` (texto ilegível) que o `wsl.exe` imprime em stderr quando a distribuição ainda não estava em execução é inofensivo.
|
|
37
|
+
|
|
38
|
+
## Licença e atribuição
|
|
39
|
+
|
|
40
|
+
MIT — veja [LICENSE](LICENSE) e [NOTICE](NOTICE). O NOTICE lista com precisão:
|
|
41
|
+
|
|
42
|
+
- **Código-fonte adaptado/herdado**: DeepSeek Harness (MIT) — `dsh-bash-local` (mecânica do executor), `dsh-fs-local` (`WslFileSystem` o subclassifica) e os agent presets fornecidos (lidos e transformados pelo gerador de variantes);
|
|
43
|
+
- **Referências de design (nenhum código copiado)**: [dsh-bash-terminal](https://github.com/MAXeaglet/dsh-bash-terminal) (MIT, abordagem wsl argv/WSLENV), [dsh-side-panel](https://github.com/ccq1/dsh-side-panel) (BSD-3-Clause, padrão de rota do host), [vpshub](https://github.com/Sdongmaker/vpshub) (MIT, referência de roadmap).
|
|
44
|
+
|
|
45
|
+
Mantenha `LICENSE` e `NOTICE` ao redistribuir.
|
|
46
|
+
|
|
47
|
+
## Agradecimentos
|
|
48
|
+
|
|
49
|
+
Agradecimento especial a [dsh-deep-whale](https://github.com/Small-tailqwq/dsh-deep-whale) (série de skins 鲸鱼娘 para DSH Web · 深海女仆工坊 maid-atelier, CC BY-NC-SA 4.0): o plugin de skins da garota-baleia traz um conjunto completo de skins adoráveis para a interface web do DeepSeek Harness e torna o uso diário do DSH mais acolhedor.
|
package/README.ru.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# dsh-wsl-workspace
|
|
2
|
+
|
|
3
|
+
[English](README.md) · [中文](README.zh.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Español](README.es.md) · [Português](README.pt.md) · [Русский](README.ru.md)
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
Добавьте рабочее пространство WSL из веб-интерфейса DeepSeek Harness и запустите всю сессию агента — команды bash и чтение/запись файлов — внутри локального дистрибутива WSL с путями в формате Linux. Ничего не нужно устанавливать внутри WSL. Сессия может одновременно обращаться и к WSL, и к Windows: команды bash выполняются внутри дистрибутива WSL, а файлы Windows остаются доступными через `/mnt/<диск>` (например `/mnt/c/Users/...`).
|
|
7
|
+
|
|
8
|
+
## Установка
|
|
9
|
+
|
|
10
|
+
Выберите один из трёх способов ниже, затем перезапустите `dsh web`:
|
|
11
|
+
|
|
12
|
+
```powershell
|
|
13
|
+
# 1) npm-пакет
|
|
14
|
+
dsh plugin --profile web add dsh-wsl-workspace
|
|
15
|
+
|
|
16
|
+
# 2) Репозиторий GitHub (включает предсобранный lib/, локальная сборка не нужна)
|
|
17
|
+
dsh plugin --profile web add https://github.com/6Mikao9/dsh-wsl-workspace
|
|
18
|
+
|
|
19
|
+
# 3) Локальная папка (разработка / личное использование)
|
|
20
|
+
dsh plugin --profile web add D:\path\to\dsh-wsl-workspace
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
После перезапуска `dsh web` рядом с Settings внизу боковой панели появится кнопка W.
|
|
24
|
+
|
|
25
|
+
## Использование
|
|
26
|
+
|
|
27
|
+
Нажмите кнопку W рядом с Settings внизу боковой панели, чтобы открыть диалог «Add WSL workspace». Выберите дистрибутив, просмотрите дерево каталогов или введите абсолютный путь Linux (например `/home/me/proj`) — кнопка Check проверяет существование пути перед созданием. Язык диалога следует языку интерфейса DeepSeek Harness. Поле имени пользователя необязательно: оставьте его пустым, чтобы выполнять команды от пользователя дистрибутива по умолчанию, или укажите пользователя Linux этого дистрибутива, чтобы сессия выполнялась от его имени (эквивалент `wsl.exe -u <пользователь>`). Имя пользователя меняет только учётную запись, под которой работает инструмент bash, — инструменты файлов идут через общую папку WSL со стороны Windows и не зависят от него. Имя пользователя каждого рабочего пространства хранится в `<dshHome>/wsl-workspaces.json`; удалите запись (или пересоздайте рабочее пространство через диалог), чтобы вернуться к пользователю по умолчанию.
|
|
28
|
+
|
|
29
|
+
Нажмите «Create & open», чтобы запустить новую сессию в рабочем пространстве. В новой сессии инструмент bash выполняет команды внутри выбранного дистрибутива, а `read`/`write`/`edit` работают с файлами WSL, поэтому каждый путь, который видит модель, — это путь Linux. Выбор режима работает как обычно: Standard, PTC, Minimal и Creative автоматически попадают на свой вариант WSL (записи вариантов WSL в селекторе двуязычные, напр. `WSL · Standard mode(标准模式)`), а файлы Windows остаются доступными из сессии через `/mnt/<диск>` (например `/mnt/c/Users/...`).
|
|
30
|
+
|
|
31
|
+

|
|
32
|
+
## Примечания о поведении
|
|
33
|
+
|
|
34
|
+
- **Инструмент bash**: выполняется внутри дистрибутива WSL под настроенным именем пользователя (пусто = пользователь по умолчанию, часто `root`), поэтому может читать и писать в любом месте дистрибутива. Песочница Windows ACL не может обернуть `wsl.exe` — его дочерние процессы работают на стороне ядра Linux — поэтому сама WSL является границей изоляции, и политика файлов DSH не применяется к bash.
|
|
35
|
+
- **Инструменты файлов (`read`/`write`/`edit`)**: идут через общую папку WSL 9P со стороны Windows и подчиняются политике файлов DSH. При `workspace-write` чтение работает где угодно, но запись ограничена рабочим пространством сессии; переключите политику на `danger-full-access`, чтобы разрешить запись и за его пределами. Поле имени пользователя не влияет на инструменты файлов.
|
|
36
|
+
- Искажённый баннер пересылки порта `localhost`, который `wsl.exe` печатает в stderr, когда дистрибутив ещё не был запущен, безвреден.
|
|
37
|
+
|
|
38
|
+
## Лицензия и атрибуция
|
|
39
|
+
|
|
40
|
+
MIT — см. [LICENSE](LICENSE) и [NOTICE](NOTICE). В NOTICE точно перечислено:
|
|
41
|
+
|
|
42
|
+
- **Адаптированный/унаследованный исходный код**: DeepSeek Harness (MIT) — `dsh-bash-local` (механика исполнителя), `dsh-fs-local` (`WslFileSystem` наследует его) и поставляемые agent presets (читаются и преобразуются генератором вариантов);
|
|
43
|
+
- **Ссылки на дизайн (код не копировался)**: [dsh-bash-terminal](https://github.com/MAXeaglet/dsh-bash-terminal) (MIT, подход wsl argv/WSLENV), [dsh-side-panel](https://github.com/ccq1/dsh-side-panel) (BSD-3-Clause, паттерн маршрута хоста), [vpshub](https://github.com/Sdongmaker/vpshub) (MIT, ссылка на дорожную карту).
|
|
44
|
+
|
|
45
|
+
Сохраняйте `LICENSE` и `NOTICE` при распространении.
|
|
46
|
+
|
|
47
|
+
## Благодарности
|
|
48
|
+
|
|
49
|
+
Особая благодарность [dsh-deep-whale](https://github.com/Small-tailqwq/dsh-deep-whale) (серия скинов 鲸鱼娘 для DSH Web · 深海女仆工坊 maid-atelier, CC BY-NC-SA 4.0): плагин скинов девушки-кита приносит в веб-интерфейс DeepSeek Harness целый набор очаровательных скинов и делает повседневное использование DSH теплее.
|
package/README.zh.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# dsh-wsl-workspace
|
|
2
2
|
|
|
3
|
-
[English](README.md)
|
|
4
|
-
 · [中文](README.zh.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Español](README.es.md) · [Português](README.pt.md) · [Русский](README.ru.md)
|
|
4
|
+

|
|
5
5
|
在 DeepSeek Harness Web GUI 中「添加 WSL 工作区」:让 agent 会话的 bash 命令与文件读写都运行在本机 WSL 发行版里,路径均为 Linux 形式,WSL 内无需安装任何工具链。会话可同时访问 WSL 与 Windows 两个系统——bash 命令在 WSL 发行版内执行,Windows 文件随时可通过 `/mnt/<drive>`(如 `/mnt/c/Users/...`)访问。
|
|
6
6
|
|
|
7
7
|
## 安装
|
|
@@ -25,7 +25,7 @@ dsh plugin --profile web add D:\path\to\dsh-wsl-workspace
|
|
|
25
25
|
点侧栏底部 Settings 旁的 W 按钮,打开「添加 WSL 工作区」对话框。先从下拉框选择一个发行版,再浏览目录树或直接输入 Linux 绝对路径(如 `/home/me/proj`),可以点「检查」确认路径存在。对话框文案跟随 DSH 界面语言。用户名是可选项:留空则以该发行版的默认用户运行,填写该发行版里的某个 Linux 用户名则以该用户运行(等价于 `wsl.exe -u <用户名>`)。用户名只影响 bash 命令的运行身份,文件工具通过 Windows 侧的 WSL 共享访问、不受其影响;每个工作区填写的用户名保存在 `<dshHome>/wsl-workspaces.json`,删除对应条目(或重开对话框重建工作区)即可恢复默认用户。
|
|
26
26
|
|
|
27
27
|
点「创建并打开」后,新会话随即运行在 WSL:`bash` 工具在所选发行版内执行命令,`read`/`write`/`edit` 读写 WSL 文件,模型看到的所有路径都是 Linux 形式。模式选择器照常可用——标准、PTC、极简、创造都会自动落到对应的 WSL 变体(选择器里的 WSL 变体条目为中英双语,如 `WSL · Standard mode(标准模式)`);会话内仍可通过 `/mnt/<drive>`(如 `/mnt/c/Users/...`)访问 Windows 文件。
|
|
28
|
-

|
|
29
29
|
## 行为与权限说明
|
|
30
30
|
|
|
31
31
|
- **bash 工具**:以配置的用户名在 WSL 发行版内运行(留空 = 发行版默认用户,通常为 root),可对发行版内任意路径读写。Windows 的 ACL 沙箱无法包裹 `wsl.exe`(子进程运行在 Linux 内核侧),WSL 自身即隔离边界,DSH 文件策略不作用于 bash。
|
package/lib/client.js
CHANGED
|
@@ -89,6 +89,28 @@ window.__ModuleLoader__.load({
|
|
|
89
89
|
username
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* Register a `/mnt/<drive>` WSL workspace under its Windows drive path,
|
|
94
|
+
* recording the distro (and optional username) for the session env.
|
|
95
|
+
* @param linuxPath - the `/mnt/<drive>/…` Linux path.
|
|
96
|
+
* @param distro - the WSL distribution the workspace belongs to.
|
|
97
|
+
* @param username - optional Linux username.
|
|
98
|
+
*/
|
|
99
|
+
async function registerWindows(linuxPath, distro, username) {
|
|
100
|
+
return call("registerWindows", {
|
|
101
|
+
linuxPath,
|
|
102
|
+
distro,
|
|
103
|
+
username
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* List every registered WSL workspace key (canonical UNC and Windows drive
|
|
108
|
+
* spellings). The client uses the drive keys to recognize `/mnt` workspaces
|
|
109
|
+
* across page reloads.
|
|
110
|
+
*/
|
|
111
|
+
async function listWorkspaces() {
|
|
112
|
+
return call("listWorkspaces", {});
|
|
113
|
+
}
|
|
92
114
|
//#endregion
|
|
93
115
|
//#region src/shared/paths.ts
|
|
94
116
|
/** The two UNC hosts WSL exposes a distribution's filesystem under. */
|
|
@@ -153,6 +175,32 @@ window.__ModuleLoader__.load({
|
|
|
153
175
|
const windowsSegments = (normalized.startsWith("/") ? normalized.slice(1) : normalized).replace(/\//g, "\\");
|
|
154
176
|
return `\\\\wsl.localhost\\${distro}${windowsSegments === "" ? "" : `\\${windowsSegments}`}`;
|
|
155
177
|
}
|
|
178
|
+
/**
|
|
179
|
+
* Translate a `/mnt/<drive>/…` path back to its Windows drive path.
|
|
180
|
+
* @param linuxPath - the candidate Linux path.
|
|
181
|
+
* @returns the `X:\…` drive path, or `null` when the path is not a drvfs mount.
|
|
182
|
+
*/
|
|
183
|
+
function mntToWindowsPath(linuxPath) {
|
|
184
|
+
const match = /^\/mnt\/([a-zA-Z])(?:\/(.*))?$/.exec(linuxPath);
|
|
185
|
+
if (match === null) return null;
|
|
186
|
+
const rest = (match[2] ?? "").replace(/\//g, "\\");
|
|
187
|
+
return `${(match[1] ?? "").toUpperCase()}:\\${rest}`;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Canonical Windows drive path for store keys and cross-realm identity:
|
|
191
|
+
* separators unified to `\`, trailing separator stripped, and the WHOLE path
|
|
192
|
+
* lowercased — Windows paths compare case-insensitively, and the workspace
|
|
193
|
+
* registry may realpath a different casing than the caller spelled (8.3 or
|
|
194
|
+
* on-disk casing), so the store key must collide across casings.
|
|
195
|
+
* @param path - candidate Windows drive path.
|
|
196
|
+
* @returns the canonical form, or `null` when not drive-shaped.
|
|
197
|
+
*/
|
|
198
|
+
function canonicalWindowsPath(path) {
|
|
199
|
+
const match = /^([A-Za-z]):[\\/](.*)$/.exec(path);
|
|
200
|
+
if (match === null) return null;
|
|
201
|
+
const rest = (match[2] ?? "").replace(/[\\/]+/g, "\\").replace(/\\$/, "").toLowerCase();
|
|
202
|
+
return `${(match[1] ?? "").toLowerCase()}:\\${rest}`;
|
|
203
|
+
}
|
|
156
204
|
/** Linux username shape for `wsl.exe -u`: starts with a letter or underscore, then letters/digits/`_`/`.`/`-` (max 64). */
|
|
157
205
|
const WSL_USERNAME_PATTERN = /^[A-Za-z_][A-Za-z0-9_.-]{0,63}$/;
|
|
158
206
|
/**
|
|
@@ -358,7 +406,7 @@ window.__ModuleLoader__.load({
|
|
|
358
406
|
setError(t("error.pathNotFound"));
|
|
359
407
|
return;
|
|
360
408
|
}
|
|
361
|
-
const failure = await createWorkspace(
|
|
409
|
+
const failure = await createWorkspace(path, user, distro);
|
|
362
410
|
if (failure !== void 0) {
|
|
363
411
|
setError(failure);
|
|
364
412
|
return;
|
|
@@ -891,6 +939,7 @@ window.__ModuleLoader__.load({
|
|
|
891
939
|
en
|
|
892
940
|
}), "dsh-wsl-workspace: locale dictionaries");
|
|
893
941
|
const t = ctx.locale.bind("wslWorkspace");
|
|
942
|
+
let wslWindowsPaths = /* @__PURE__ */ new Set();
|
|
894
943
|
const injected = () => ({
|
|
895
944
|
t,
|
|
896
945
|
checkPreset: async () => {
|
|
@@ -906,10 +955,20 @@ window.__ModuleLoader__.load({
|
|
|
906
955
|
listDistros: () => listDistros(),
|
|
907
956
|
listDir: (distro, path) => listDir(distro, path),
|
|
908
957
|
check: (distro, path) => check(distro, path),
|
|
909
|
-
createWorkspace: async (
|
|
958
|
+
createWorkspace: async (linuxPath, username, distro) => {
|
|
910
959
|
try {
|
|
911
|
-
const
|
|
912
|
-
|
|
960
|
+
const winPath = mntToWindowsPath(linuxPath);
|
|
961
|
+
if (winPath !== null) {
|
|
962
|
+
const view = await workspaces.create({ path: winPath });
|
|
963
|
+
await registerWindows(linuxPath, distro, username);
|
|
964
|
+
const canonical = canonicalWindowsPath(winPath);
|
|
965
|
+
if (canonical !== null) wslWindowsPaths = new Set(wslWindowsPaths).add(canonical);
|
|
966
|
+
workspaces.startSession(view.workspaceId);
|
|
967
|
+
return;
|
|
968
|
+
}
|
|
969
|
+
const uncPath = joinUnc(distro, linuxPath);
|
|
970
|
+
const view = await workspaces.create({ path: uncPath });
|
|
971
|
+
await setWorkspaceUser(uncPath, username);
|
|
913
972
|
workspaces.startSession(view.workspaceId);
|
|
914
973
|
return;
|
|
915
974
|
} catch (error) {
|
|
@@ -937,12 +996,24 @@ window.__ModuleLoader__.load({
|
|
|
937
996
|
}).catch(() => {});
|
|
938
997
|
};
|
|
939
998
|
refreshRoster();
|
|
999
|
+
const refreshWorkspaces = () => {
|
|
1000
|
+
listWorkspaces().then((keys) => {
|
|
1001
|
+
const next = /* @__PURE__ */ new Set();
|
|
1002
|
+
for (const key of keys) {
|
|
1003
|
+
const canonical = canonicalWindowsPath(key);
|
|
1004
|
+
if (canonical !== null) next.add(canonical);
|
|
1005
|
+
}
|
|
1006
|
+
wslWindowsPaths = next;
|
|
1007
|
+
}).catch(() => {});
|
|
1008
|
+
};
|
|
1009
|
+
refreshWorkspaces();
|
|
940
1010
|
const maybeBind = () => {
|
|
941
1011
|
const state = sessions.list.getSnapshot();
|
|
942
1012
|
for (const id of state.ids) {
|
|
943
1013
|
const summary = state.byId[id];
|
|
944
1014
|
if (summary === void 0 || !summary.blank || summary.cwd === void 0) continue;
|
|
945
|
-
|
|
1015
|
+
const canonical = canonicalWindowsPath(summary.cwd);
|
|
1016
|
+
if (!(isWslUnc(summary.cwd) || canonical !== null && wslWindowsPaths.has(canonical))) continue;
|
|
946
1017
|
const current = summary.agentPreset;
|
|
947
1018
|
if (current !== void 0 && current.startsWith("wsl-")) continue;
|
|
948
1019
|
const base = current === LEGACY_WSL_PRESET_ID ? defaultPreset ?? "standard" : current ?? defaultPreset;
|