@jingyi0605/codingns4dsh 0.1.0 → 0.1.1
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.en.md +306 -0
- package/README.md +190 -993
- package/data/build/dist/client/account-bar.d.ts +2 -2
- package/data/build/dist/client/account-bar.js +96 -39
- package/data/build/dist/client/bundle.js +13722 -3611
- package/data/build/dist/client/cli-catalog.js +20 -3
- package/data/build/dist/client/cli-slots.d.ts +5 -0
- package/data/build/dist/client/cli-slots.js +57 -7
- package/data/build/dist/client/debug/ui.d.ts +1 -1
- package/data/build/dist/client/debug/ui.js +62 -32
- package/data/build/dist/client/dsh-runtime-version.d.ts +9 -2
- package/data/build/dist/client/dsh-runtime-version.js +24 -2
- package/data/build/dist/client/features/cli-adapters.d.ts +1 -1
- package/data/build/dist/client/features/cli-adapters.js +19 -16
- package/data/build/dist/client/features/debug.js +2 -2
- package/data/build/dist/client/features/index.d.ts +2 -1
- package/data/build/dist/client/features/index.js +3 -1
- package/data/build/dist/client/features/lan-access-panel.d.ts +1 -1
- package/data/build/dist/client/features/lan-access-panel.js +8 -10
- package/data/build/dist/client/features/lan-access.js +1 -1
- package/data/build/dist/client/features/login-protection-panel.d.ts +1 -1
- package/data/build/dist/client/features/login-protection-panel.js +7 -9
- package/data/build/dist/client/features/reverse-proxy-panel.d.ts +1 -1
- package/data/build/dist/client/features/reverse-proxy-panel.js +99 -11
- package/data/build/dist/client/features/reverse-proxy.d.ts +1 -1
- package/data/build/dist/client/features/reverse-proxy.js +19 -18
- package/data/build/dist/client/features/terminal-enhancement-panel.d.ts +1 -1
- package/data/build/dist/client/features/terminal-enhancement-panel.js +62 -55
- package/data/build/dist/client/features/terminal-enhancement.d.ts +1 -1
- package/data/build/dist/client/features/terminal-enhancement.js +3 -3
- package/data/build/dist/client/features/types.d.ts +14 -3
- package/data/build/dist/client/features/workspace-session-enhancement-panel.d.ts +1 -1
- package/data/build/dist/client/features/workspace-session-enhancement-panel.js +31 -9
- package/data/build/dist/client/features/workspace-session-enhancement.js +72 -11
- package/data/build/dist/client/git-management.d.ts +16 -0
- package/data/build/dist/client/git-management.js +757 -0
- package/data/build/dist/client/index.d.ts +3 -2
- package/data/build/dist/client/index.js +152 -27
- package/data/build/dist/client/locale.js +91 -29
- package/data/build/dist/client/quick-phrase-layout.d.ts +49 -0
- package/data/build/dist/client/quick-phrase-layout.js +95 -0
- package/data/build/dist/client/quick-phrase-slot.d.ts +7 -0
- package/data/build/dist/client/quick-phrase-slot.js +370 -0
- package/data/build/dist/client/remote-web-context.js +1 -1
- package/data/build/dist/client/settings-bridge.d.ts +9 -6
- package/data/build/dist/client/settings-bridge.js +51 -27
- package/data/build/dist/client/settings-section.d.ts +3 -2
- package/data/build/dist/client/settings-section.js +33 -19
- package/data/build/dist/client/subscription-slot.d.ts +3 -0
- package/data/build/dist/client/subscription-slot.js +108 -16
- package/data/build/dist/client/terminal/model.d.ts +14 -2
- package/data/build/dist/client/terminal/model.js +109 -21
- package/data/build/dist/client/terminal/recovery.d.ts +50 -0
- package/data/build/dist/client/terminal/recovery.js +101 -0
- package/data/build/dist/client/terminal/ui.d.ts +2 -2
- package/data/build/dist/client/terminal/ui.js +49 -11
- package/data/build/dist/client/terminal/xterm-view.d.ts +2 -2
- package/data/build/dist/client/terminal/xterm-view.js +2 -1
- package/data/build/dist/client/theme.d.ts +6 -1
- package/data/build/dist/client/theme.js +32 -1
- package/data/build/dist/client/workspace-session-archive-dom.d.ts +12 -0
- package/data/build/dist/client/workspace-session-archive-dom.js +27 -5
- package/data/build/dist/client/workspace-session-visibility-dom.d.ts +30 -0
- package/data/build/dist/client/workspace-session-visibility-dom.js +604 -0
- package/data/build/dist/dsh-capabilities/client/config-forms-adapter.d.ts +50 -0
- package/data/build/dist/dsh-capabilities/client/config-forms-adapter.js +139 -0
- package/data/build/dist/dsh-capabilities/client/conversation-adapter.d.ts +7 -0
- package/data/build/dist/dsh-capabilities/client/conversation-adapter.js +6 -0
- package/data/build/dist/dsh-capabilities/client/locale-adapter.d.ts +9 -0
- package/data/build/dist/dsh-capabilities/client/locale-adapter.js +4 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts +10 -0
- package/data/build/dist/dsh-capabilities/client/primitives-adapter.js +14 -0
- package/data/build/dist/dsh-capabilities/client/settings-scope-adapter.d.ts +8 -0
- package/data/build/dist/dsh-capabilities/client/settings-scope-adapter.js +16 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-adapter.d.ts +7 -0
- package/data/build/dist/dsh-capabilities/client/sidebar-adapter.js +5 -0
- package/data/build/dist/dsh-capabilities/client/theme-adapter.d.ts +6 -0
- package/data/build/dist/dsh-capabilities/client/theme-adapter.js +4 -0
- package/data/build/dist/dsh-capabilities/client/typert-adapter.d.ts +5 -0
- package/data/build/dist/dsh-capabilities/client/typert-adapter.js +4 -0
- package/data/build/dist/dsh-capabilities/host/config-forms-adapter.d.ts +19 -0
- package/data/build/dist/dsh-capabilities/host/config-forms-adapter.js +45 -0
- package/data/build/dist/dsh-capabilities/host/connection-rpc-adapter.d.ts +19 -0
- package/data/build/dist/dsh-capabilities/host/connection-rpc-adapter.js +13 -0
- package/data/build/dist/dsh-capabilities/host/settings-scope-adapter.d.ts +8 -0
- package/data/build/dist/dsh-capabilities/host/settings-scope-adapter.js +47 -0
- package/data/build/dist/dsh-capabilities/host/typert-adapter.d.ts +6 -0
- package/data/build/dist/dsh-capabilities/host/typert-adapter.js +4 -0
- package/data/build/dist/dsh-capabilities/index.d.ts +6 -0
- package/data/build/dist/dsh-capabilities/index.js +6 -0
- package/data/build/dist/dsh-capabilities/matrix.d.ts +15 -0
- package/data/build/dist/dsh-capabilities/matrix.js +32 -0
- package/data/build/dist/dsh-capabilities/registry.d.ts +22 -0
- package/data/build/dist/dsh-capabilities/registry.js +196 -0
- package/data/build/dist/dsh-capabilities/routes.d.ts +10 -0
- package/data/build/dist/dsh-capabilities/routes.js +34 -0
- package/data/build/dist/dsh-capabilities/settings-store.d.ts +29 -0
- package/data/build/dist/dsh-capabilities/settings-store.js +5 -0
- package/data/build/dist/dsh-capabilities/types.d.ts +50 -0
- package/data/build/dist/dsh-capabilities/types.js +23 -0
- package/data/build/dist/features/registry.d.ts +8 -2
- package/data/build/dist/features/registry.js +104 -1
- package/data/build/dist/host/auth-session.d.ts +8 -1
- package/data/build/dist/host/auth-session.js +28 -6
- package/data/build/dist/host/cli-adapters/claude-driver.d.ts +2 -0
- package/data/build/dist/host/cli-adapters/claude-driver.js +19 -4
- package/data/build/dist/host/cli-adapters/claude-model-options.d.ts +14 -0
- package/data/build/dist/host/cli-adapters/claude-model-options.js +157 -0
- package/data/build/dist/host/cli-adapters/codex-driver.d.ts +11 -0
- package/data/build/dist/host/cli-adapters/codex-driver.js +166 -14
- package/data/build/dist/host/cli-adapters/driver.d.ts +2 -0
- package/data/build/dist/host/cli-adapters/dsh-message-projector.d.ts +15 -0
- package/data/build/dist/host/cli-adapters/dsh-message-projector.js +120 -29
- package/data/build/dist/host/cli-adapters/dsh-tool-history.d.ts +4 -1
- package/data/build/dist/host/cli-adapters/dsh-tool-history.js +25 -7
- package/data/build/dist/host/cli-adapters/feature.js +74 -8
- package/data/build/dist/host/cli-adapters/gemini-driver.js +2 -2
- package/data/build/dist/host/cli-adapters/grok-driver.js +2 -2
- package/data/build/dist/host/cli-adapters/json-rpc-process.d.ts +4 -2
- package/data/build/dist/host/cli-adapters/json-rpc-process.js +8 -9
- package/data/build/dist/host/cli-adapters/kimi-driver.js +1 -1
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.d.ts +17 -0
- package/data/build/dist/host/cli-adapters/legacy-session-adapter.js +88 -0
- package/data/build/dist/host/cli-adapters/legacy-session-settings.d.ts +24 -0
- package/data/build/dist/host/cli-adapters/legacy-session-settings.js +162 -0
- package/data/build/dist/host/cli-adapters/official-provider-subscription.d.ts +29 -0
- package/data/build/dist/host/cli-adapters/official-provider-subscription.js +361 -0
- package/data/build/dist/host/cli-adapters/opencode-driver.d.ts +2 -0
- package/data/build/dist/host/cli-adapters/opencode-driver.js +97 -12
- package/data/build/dist/host/cli-adapters/pi-driver.js +69 -23
- package/data/build/dist/host/cli-adapters/provider-registry.d.ts +33 -0
- package/data/build/dist/host/cli-adapters/provider-registry.js +83 -0
- package/data/build/dist/host/cli-adapters/provider-subscription.d.ts +25 -3
- package/data/build/dist/host/cli-adapters/provider-subscription.js +346 -30
- package/data/build/dist/host/cli-adapters/registry.d.ts +6 -0
- package/data/build/dist/host/cli-adapters/registry.js +170 -13
- package/data/build/dist/host/cli-adapters/rpc-driver-utils.js +10 -0
- package/data/build/dist/host/cli-adapters/session-store.d.ts +7 -0
- package/data/build/dist/host/cli-adapters/session-store.js +39 -1
- package/data/build/dist/host/cli-adapters/standard-stream-driver.d.ts +3 -0
- package/data/build/dist/host/cli-adapters/stream-normalizer.d.ts +3 -0
- package/data/build/dist/host/cli-adapters/stream-normalizer.js +22 -2
- package/data/build/dist/host/control-api-client.d.ts +3 -3
- package/data/build/dist/host/control-api-client.js +2 -1
- package/data/build/dist/host/credential-store.js +11 -1
- package/data/build/dist/host/dsh-device-runtime.d.ts +4 -0
- package/data/build/dist/host/dsh-device-runtime.js +20 -9
- package/data/build/dist/host/dsh-runtime-version.d.ts +3 -2
- package/data/build/dist/host/dsh-runtime-version.js +71 -2
- package/data/build/dist/host/features/auth.js +8 -5
- package/data/build/dist/host/features/debug.js +1 -1
- package/data/build/dist/host/features/git-management.d.ts +5 -0
- package/data/build/dist/host/features/git-management.js +290 -0
- package/data/build/dist/host/features/host-status.js +1 -1
- package/data/build/dist/host/features/index.d.ts +1 -0
- package/data/build/dist/host/features/index.js +3 -0
- package/data/build/dist/host/features/terminal-process.js +1 -1
- package/data/build/dist/host/features/terminal-status.d.ts +3 -1
- package/data/build/dist/host/features/terminal-status.js +3 -1
- package/data/build/dist/host/index.d.ts +7 -3
- package/data/build/dist/host/index.js +79 -15
- package/data/build/dist/host/lan-access-dsh.js +18 -5
- package/data/build/dist/host/native-session-bridge.d.ts +23 -1
- package/data/build/dist/host/native-session-bridge.js +157 -10
- package/data/build/dist/host/rpc-table.d.ts +1 -1
- package/data/build/dist/host/rpc.js +60 -10
- package/data/build/dist/host/session-migration-repair.d.ts +19 -0
- package/data/build/dist/host/session-migration-repair.js +395 -0
- package/data/build/dist/host/settings.d.ts +8 -1
- package/data/build/dist/host/settings.js +94 -3
- package/data/build/dist/host/terminal/backends/tmux-backend.d.ts +1 -0
- package/data/build/dist/host/terminal/backends/tmux-backend.js +4 -2
- package/data/build/dist/host/terminal/controller-factory.d.ts +4 -0
- package/data/build/dist/host/terminal/controller-factory.js +26 -7
- package/data/build/dist/host/terminal/runtime-manager.d.ts +2 -1
- package/data/build/dist/host/terminal/runtime-manager.js +3 -0
- package/data/build/dist/host/terminal/startup.d.ts +2 -0
- package/data/build/dist/host/terminal/startup.js +2 -1
- package/data/build/dist/host/terminal/terminal-controller.d.ts +10 -3
- package/data/build/dist/host/terminal/terminal-controller.js +101 -15
- package/data/build/dist/host/terminal/terminal-process-service.js +3 -1
- package/data/build/dist/host/terminal/terminal-service.d.ts +2 -0
- package/data/build/dist/host/terminal/terminal-service.js +10 -0
- package/data/build/dist/index.d.ts +6 -2
- package/data/build/dist/index.js +8 -2
- package/data/build/dist/shared/contracts/cli-adapter.d.ts +14 -0
- package/data/build/dist/shared/contracts/config.d.ts +31 -1
- package/data/build/dist/shared/contracts/config.js +25 -0
- package/data/build/dist/shared/contracts/dsh-device.d.ts +13 -1
- package/data/build/dist/shared/contracts/errors.d.ts +1 -1
- package/data/build/dist/shared/contracts/feature.d.ts +6 -0
- package/data/build/dist/shared/contracts/git.d.ts +82 -0
- package/data/build/dist/shared/contracts/git.js +3 -0
- package/data/build/dist/shared/contracts/subscription.d.ts +46 -0
- package/data/build/dist/shared/contracts/terminal.d.ts +4 -1
- package/data/build/dist/shared/contracts/version.d.ts +2 -2
- package/data/build/dist/shared/contracts/version.js +4 -6
- package/data/build/dist/shared/debug.d.ts +14 -0
- package/data/build/dist/shared/debug.js +53 -0
- package/data/build/dist/shared/index.d.ts +7 -4
- package/data/build/dist/shared/index.js +2 -1
- package/data/build/dist/transport/debug.d.ts +1 -1
- package/data/build/dist/transport/debug.js +3 -30
- package/data/build/dist/transport/dsh-session.js +3 -3
- package/data/build/dist/typert.host.d.ts +1 -1
- package/data/build/dist/typert.host.js +6 -3
- package/data/build/dist/typert.remote-client.d.ts +11 -0
- package/data/build/dist/typert.remote-client.js +7 -0
- package/dsh.bundle.patch +1 -1
- package/package.json +13 -5
- package/profile/README.md +4 -4
- package/profile/package.json +6 -4
- package/profile/scripts/check-dsh-install.mjs +2 -2
- package/profile/version.json +2 -2
- package/scripts/check-dsh-install.mjs +2 -2
- package/version.json +2 -2
package/README.en.md
ADDED
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# Codingns4DSH
|
|
4
|
+
|
|
5
|
+
**External Agent CLIs, persistent terminals, workspace debug and remote access — inside DSH's own UI.**
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@jingyi0605/codingns4dsh)
|
|
8
|
+
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
9
|
+
[](https://nodejs.org)
|
|
10
|
+
|
|
11
|
+
[简体中文](README.md) · **English**
|
|
12
|
+
|
|
13
|
+
**Current release `@jingyi0605/codingns4dsh@0.1.1`** · DSH **`>=0.1.5-rc.3 <=0.1.7-rc.2`** (validated `0.1.5-rc.3`, `0.1.6-alpha.2`, `0.1.7-rc.2`) · Node **`>= 22.19`** · macOS / Linux / Windows
|
|
14
|
+
|
|
15
|
+
**[GitHub](https://github.com/jingyi0605/Codingns4DSH)** · **[npm](https://www.npmjs.com/package/@jingyi0605/codingns4dsh)** · **QQ group 1092985965**
|
|
16
|
+
|
|
17
|
+
<p>
|
|
18
|
+
<a href="#interface-preview">Preview</a> ·
|
|
19
|
+
<a href="#what-is-codingns4dsh">What it is</a> ·
|
|
20
|
+
<a href="#supported-agents">Agents</a> ·
|
|
21
|
+
<a href="#feature-details">Features</a> ·
|
|
22
|
+
<a href="#installation">Install</a> ·
|
|
23
|
+
<a href="#first-run">First run</a> ·
|
|
24
|
+
<a href="#troubleshooting">Troubleshooting</a> ·
|
|
25
|
+
<a href="#development">Development</a> ·
|
|
26
|
+
<a href="#acknowledgements">Acknowledgements</a>
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
## Interface Preview
|
|
32
|
+
|
|
33
|
+
<div align="center">
|
|
34
|
+
<img width="100%" src="assets/screenshots/workspace-overview.jpg" alt="The CodingNS workbench and the Git sidebar">
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
The CodingNS workbench brings the conversation, Agent picker and Git sidebar together in one view.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## What is Codingns4DSH
|
|
42
|
+
|
|
43
|
+
**DSH (DeepSeek Harness)** is a coding-agent harness — a CLI plus Web UI that runs an agent loop inside your workspace.
|
|
44
|
+
|
|
45
|
+
**Codingns4DSH is a DSH plugin bundle** (Host + browser layers) adding seven modules, all configured under **Settings → Codingns4DSH**.
|
|
46
|
+
|
|
47
|
+
> Naming: this plugin is **Codingns4DSH** (npm package `@jingyi0605/codingns4dsh`; its settings entry is labelled Codingns4DSH). **Codingns4DSH** on its own refers to the platform service that provides the Control API, accounts and the relay tunnel.
|
|
48
|
+
|
|
49
|
+
| Module | What it does | Default |
|
|
50
|
+
| --- | --- | :---: |
|
|
51
|
+
| **External Agent integration** | Run installed Agent CLIs as native DSH sessions: streaming, tools, approvals, questions, usage, thinking levels | On |
|
|
52
|
+
| **Workspace session enhancement** | Agent logos on session rows, archived-session entry, subscription/usage readout | Off |
|
|
53
|
+
| **Terminal enhancement** | Persistent terminals plus shell, theme, font, cursor and scrollback settings | Off · restart |
|
|
54
|
+
| **LAN access to DSH** | Listener forwarding a LAN address to the local DSH Web port | Always on |
|
|
55
|
+
| **Login protection** | One optional local account guarding LAN **and** relay access; loopback always allowed | Always on (card) |
|
|
56
|
+
| **Relay access service** | **Your DSH Web from anywhere on the internet**, end-to-end encrypted | Off |
|
|
57
|
+
| **Workspace debug** | Per-workspace launch profiles, port checks, HTTP service proxy | On |
|
|
58
|
+
|
|
59
|
+
Nothing native is replaced — conversations, sessions, sidebar, settings and approvals stay DSH's own.
|
|
60
|
+
|
|
61
|
+
Everything runs on the **Host** (your machine): Agents, terminals, files, LAN/relay listeners; the browser is only a view. Agent CLIs run as DSH child processes with their own credentials and providers — model traffic never goes through Codingns4DSH. Remote access is available through optional modules.
|
|
62
|
+
|
|
63
|
+
Notes: the sidebar terminal exists as soon as the plugin is installed — **Terminal enhancement** only switches it to the persistent backend (tmux on macOS/Linux, ConPTY on Windows) and applies on restart; on DSH `0.1.5.x` Codingns4DSH runs in compatibility mode (no multi-tab or shell selection) and the cards say so; the 调试 card is currently Chinese-only.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Supported Agents
|
|
68
|
+
|
|
69
|
+
Detected on the Host by command name; version and models come from the CLI itself. Detected Agents are enabled by default and can be toggled individually. The built-in **DeepSeek Harness** Agent is always available.
|
|
70
|
+
|
|
71
|
+
| Agent | id | Command | Protocol | Capabilities |
|
|
72
|
+
| --- | --- | --- | --- | --- |
|
|
73
|
+
| Command Code | `command-code` | `command-code`, `commandcode`, `cmdc` | single-shot CLI | models, streaming, resume, interrupt, tools, thinking, usage |
|
|
74
|
+
| Claude Code | `claude-code` | `claude` | stream-json | models, streaming, resume, interrupt, tools, thinking, usage |
|
|
75
|
+
| Kimi CLI | `kimi` | `kimi`, `kimi-cli` | stream-json | all of the above + approvals, questions, steering |
|
|
76
|
+
| Gemini CLI | `gemini` | `gemini` | ACP | models, streaming, resume, interrupt, tools, thinking, usage, approvals |
|
|
77
|
+
| Pi Agent | `pi` | `pi`, `pi-agent` | JSON-RPC | models, streaming, resume, interrupt, tools, thinking, usage, steering |
|
|
78
|
+
| Codex | `codex` | `codex` | JSON-RPC (app-server) | all + approvals, questions, steering |
|
|
79
|
+
| OpenCode | `opencode` | `opencode`, or `OPENCODE_SERVER_URL` (default `http://127.0.0.1:4096`) | HTTP + SSE | all + approvals, questions |
|
|
80
|
+
| Grok Build | `grok` | `grok`, `grok-build` | ACP | models, streaming, tools, thinking, usage, approvals |
|
|
81
|
+
|
|
82
|
+
**models** model list · **streaming** live output · **resume** continue after restart · **interrupt** cancel a turn · **tools** tool calls in the conversation · **thinking** reasoning/effort · **usage** token or subscription limits · **approvals / questions** native DSH interactions · **steering** inject a message mid-turn.
|
|
83
|
+
|
|
84
|
+
Unlisted capabilities are unsupported by that CLI or version. Install and log in to each Agent outside DSH; Codingns4DSH never stores Agent credentials.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Feature Details
|
|
89
|
+
|
|
90
|
+
### External Agent Integration
|
|
91
|
+
|
|
92
|
+
After you pick an Agent and a model, Codingns4DSH starts (or resumes) that CLI as a DSH child process and projects its event stream into a native session; the model and thinking effort are remembered per Agent.
|
|
93
|
+
|
|
94
|
+
<div align="center">
|
|
95
|
+
<table>
|
|
96
|
+
<tr>
|
|
97
|
+
<td><img width="100%" src="assets/screenshots/agent-picker.jpg" alt="Workspace session enhancement with Agent logos and archived sessions"></td>
|
|
98
|
+
<td><img width="100%" src="assets/screenshots/model-picker.jpg" alt="The Codex model list"></td>
|
|
99
|
+
</tr>
|
|
100
|
+
</table>
|
|
101
|
+
</div>
|
|
102
|
+
|
|
103
|
+
The model list is read from each CLI and can be switched at any time; the composer button also shows the current model and thinking effort.
|
|
104
|
+
|
|
105
|
+
### Session Enhancement and Usage
|
|
106
|
+
|
|
107
|
+
Session rows show the Agent logo and archive entry, and the composer dock shows subscription or upstream usage for Agents whose limits can be read (cache hit rate, per-model stats and cost included).
|
|
108
|
+
|
|
109
|
+
<div align="center">
|
|
110
|
+
<table>
|
|
111
|
+
<tr>
|
|
112
|
+
<td><img width="100%" src="assets/screenshots/subscription-usage.jpg" alt="Codex upstream usage and cost statistics"></td>
|
|
113
|
+
<td><img width="100%" src="assets/screenshots/subscription-plan.jpg" alt="Codex subscription allowance and reset time"></td>
|
|
114
|
+
</tr>
|
|
115
|
+
</table>
|
|
116
|
+
</div>
|
|
117
|
+
|
|
118
|
+
Usage comes from the Agent's own quota API or a configured upstream source; it is read on the Host and never stored in the browser.
|
|
119
|
+
|
|
120
|
+
### Workspace Debug
|
|
121
|
+
|
|
122
|
+
Each workspace keeps its own launch profiles (`<workspace>/.codingns/debug.json`): command, working directory, environment, shell and an optional port — start, check the port, kill the process or stop it. An optional reverse proxy exposes the port through DSH (HTTP only for now).
|
|
123
|
+
|
|
124
|
+
<div align="center">
|
|
125
|
+
<table>
|
|
126
|
+
<tr>
|
|
127
|
+
<td><img width="100%" src="assets/screenshots/workspace-debug.jpg" alt="Workspace debug panel: launch profiles, port state and proxy"></td>
|
|
128
|
+
<td><img width="100%" src="assets/screenshots/workspace-debug-edit.jpg" alt="Workspace debug panel: edit a launch profile"></td>
|
|
129
|
+
</tr>
|
|
130
|
+
</table>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
The panel shows live port state and PID, and issues an unguessable proxy URL per running instance.
|
|
134
|
+
|
|
135
|
+
### Modules and Settings
|
|
136
|
+
|
|
137
|
+
The settings page renders one card per module — switch, description and restart notice all come from the module itself; terminal appearance, LAN mapping, login protection and relay account are configured inside their own cards.
|
|
138
|
+
|
|
139
|
+
<div align="center">
|
|
140
|
+
<table>
|
|
141
|
+
<tr>
|
|
142
|
+
<td><img width="100%" src="assets/screenshots/settings-overview.jpg" alt="Settings → Codingns4DSH module cards"></td>
|
|
143
|
+
<td><img width="100%" src="assets/screenshots/settings-modules.jpg" alt="All module switches"></td>
|
|
144
|
+
</tr>
|
|
145
|
+
</table>
|
|
146
|
+
</div>
|
|
147
|
+
|
|
148
|
+
### Login Protection
|
|
149
|
+
|
|
150
|
+
Off by default; once enabled on its card, one local account guards LAN **and** relay access (default session timeout 30 minutes). Authentication happens at the Host's forwarding boundary, so unauthenticated traffic never reaches DSH Web; `127.0.0.1` and `::1` are always allowed to prevent lockout.
|
|
151
|
+
|
|
152
|
+
<div align="center">
|
|
153
|
+
<img width="70%" src="assets/screenshots/login-protection.jpg" alt="Local account login page">
|
|
154
|
+
</div>
|
|
155
|
+
|
|
156
|
+
The password is `scrypt`-hashed in a `0600` file, and the browser only holds an `HttpOnly`, `SameSite=Strict` session cookie.
|
|
157
|
+
|
|
158
|
+
### Remote Access
|
|
159
|
+
|
|
160
|
+
| | LAN access | Relay access |
|
|
161
|
+
| --- | --- | --- |
|
|
162
|
+
| Connect from | Same local network | **Any device, anywhere on the internet** |
|
|
163
|
+
| Needs | Shared network + open listen port | Host can reach the Control API over HTTPS; your device can reach the Codingns4DSH entry |
|
|
164
|
+
| Local port exposed | Yes — chosen interface/port (default `13080`) | No — isolated device tunnel |
|
|
165
|
+
| Account | Optional login protection | Codingns4DSH account + bound Host |
|
|
166
|
+
|
|
167
|
+
**LAN**: pick a listen interface and port, auto-detect (or type) the local DSH Web port, start, then open `http://<lan-ip>:<port>` from another device; auto-start restores the mapping, and the module patches the `crypto.randomUUID` that plain-HTTP origins need.
|
|
168
|
+
|
|
169
|
+
**Relay**: set the Control API (default `https://channel.codingns.com:1443`, where you can register), log in, refresh devices, bind the current Host (label, public key, fingerprint), then open the bound Host from any device through **`https://dsh.codingns.com`** — no public IP, port forwarding or VPN.
|
|
170
|
+
|
|
171
|
+
<div align="center">
|
|
172
|
+
<table>
|
|
173
|
+
<tr>
|
|
174
|
+
<td><img width="100%" src="assets/screenshots/relay-service.jpg" alt="Relay access card"></td>
|
|
175
|
+
<td><img width="100%" src="assets/screenshots/relay-h5-login.jpg" alt="H5 login page: choose a DSH Host"></td>
|
|
176
|
+
</tr>
|
|
177
|
+
</table>
|
|
178
|
+
</div>
|
|
179
|
+
|
|
180
|
+
The account entry next to DSH's Settings button shows login state, access path and latency, host CPU/memory, and offers one-click logout.
|
|
181
|
+
|
|
182
|
+
<div align="center">
|
|
183
|
+
<img width="70%" src="assets/screenshots/relay-status.jpg" alt="Account status popover: access path, latency, CPU and memory">
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
The “access” line tells you whether you entered DSH Web locally, over the LAN or through the relay.
|
|
187
|
+
|
|
188
|
+
**Why the relay cannot read your DSH traffic** — the tunnel is end-to-end encrypted, so using it never hands your conversations to a server:
|
|
189
|
+
|
|
190
|
+
- Payload travels in a **WebRTC DataChannel protected by DTLS between the DSH Client and the DSH Host**; direct or via TURN, only ciphertext crosses the relay.
|
|
191
|
+
- The relay and control service handle **control-plane metadata only**: account/device records, Host binding, tickets, SDP/ICE signaling, online state, traffic accounting.
|
|
192
|
+
- Each Host keeps its own DTLS certificate (`~/.config/codingns4dsh/dtls-identity.json`) and publishes a SHA-256 fingerprint the remote side verifies during the handshake — a mismatch aborts the connection (`Host DTLS fingerprint 校验失败`) instead of accepting a substituted certificate; the same fingerprint shows in the relay card for manual comparison.
|
|
193
|
+
- Passwords are used only for login requests; refresh token and device credential stay on the Host. Diagnostics log protocol metadata only (direction, type, stream id, status, bytes) — never bodies, tickets, cookies or DSH Web content.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Installation
|
|
198
|
+
|
|
199
|
+
**Requirements**: DSH inside `>=0.1.5-rc.3 <=0.1.7-rc.2` (plugin and DSH versions ship independently; both the installer and the runtime reject unsupported versions) · Node.js `>= 22.19` · `pnpm` on `PATH` (`dsh plugin` forwards to pnpm) · optional: Agent CLIs, and `tmux` on macOS/Linux for persistent terminals (`brew install tmux` / `sudo apt install tmux`).
|
|
200
|
+
|
|
201
|
+
### Simplest install: use the built-in `web` profile
|
|
202
|
+
|
|
203
|
+
DSH automatically initializes the `web` profile on first use. You do not need to create a config file or run `--dump-config`:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
dsh plugin --profile web add @jingyi0605/codingns4dsh@0.1.1
|
|
207
|
+
dsh web
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Optional: use a separate profile
|
|
211
|
+
|
|
212
|
+
If you do not want to modify the built-in `web` profile, create a separate profile. Here `--dump-config` only initializes and inspects the profile; it is not required for installing the plugin:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
dsh codingns --from-default-profile web --dump-config
|
|
216
|
+
dsh plugin --profile codingns add @jingyi0605/codingns4dsh@0.1.1
|
|
217
|
+
dsh codingns
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
- **Do not** use `dsh plugin --profile <new-name> add ...` to create a separate profile that needs the Web UI: it initializes from `@deepseek-ai/dsh-base` only, then fails with `entry "terminal-controller" not found`. Use `--from-default-profile web` for a separate profile.
|
|
221
|
+
- A registry 404 means that version is not published yet — use the source install below.
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
# optional: verify the installation
|
|
225
|
+
dsh plugin --profile web list --depth 0 # -> codingns4dsh <version>
|
|
226
|
+
|
|
227
|
+
# upgrade, pin, uninstall (restart DSH afterwards)
|
|
228
|
+
dsh plugin --profile web add @jingyi0605/codingns4dsh@<version>
|
|
229
|
+
dsh plugin --profile web remove @jingyi0605/codingns4dsh
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
**From source** (npm unavailable, or running a checkout):
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
git clone https://github.com/jingyi0605/Codingns4DSH.git && cd Codingns4DSH
|
|
236
|
+
pnpm install && pnpm build
|
|
237
|
+
dsh plugin --profile web add "$PWD" # or: npm pack, then add ./jingyi0605-codingns4dsh-0.1.1.tgz
|
|
238
|
+
dsh web
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
A directory install links the checkout — rebuild (`pnpm build` / `pnpm dev:watch`) and restart DSH after changes.
|
|
242
|
+
|
|
243
|
+
**State on disk**: settings live in `$DSH_HOME/settings.yaml` (default `~/.dsh/settings.yaml`) under the `codingns:` namespace.
|
|
244
|
+
|
|
245
|
+
| Path | Contents |
|
|
246
|
+
| --- | --- |
|
|
247
|
+
| `$DSH_HOME/profiles/<profile>` | Installed plugin packages and `dsh.profile.bundles` |
|
|
248
|
+
| `$DSH_HOME/codingns4dsh/` | Terminal `host-id` and `terminals.json` (restore mapping) |
|
|
249
|
+
| `~/.config/codingns4dsh/` | Relay credentials, DTLS identity, login-protection hash |
|
|
250
|
+
| `<workspace>/.codingns/debug.json` | Debug launch profiles (mode `0600`, secrets rejected) |
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## First Run
|
|
255
|
+
|
|
256
|
+
1. `dsh codingns` opens the DSH Web UI.
|
|
257
|
+
2. Open **Settings → Codingns4DSH** to review the module cards (restart-required ones show both the effective and next-start state).
|
|
258
|
+
3. Install and log in to your Agent CLIs **outside** DSH, keep them on the Host `PATH`, then enable them in **外部Agent集成**.
|
|
259
|
+
4. Pick an Agent, model and thinking level in the composer and send a prompt — output streams into a native session with the Agent's logo.
|
|
260
|
+
5. Right sidebar: Terminal for a workspace shell (enable **终端强化** + restart for persistence); 调试 to add a launch profile and watch its port.
|
|
261
|
+
6. For remote use, turn on **登录保护**, configure **局域网访问DSH**, or log in to **中转访问服务** to connect from any network; the account entry shows the current path and host load.
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## Troubleshooting
|
|
266
|
+
|
|
267
|
+
- **Versions** — `dsh --version`, `dsh plugin --profile web list --depth 0` (replace `web` for a separate profile), `npm view @jingyi0605/codingns4dsh version`; install and startup both reject DSH outside the supported range.
|
|
268
|
+
- **`patch: entry "terminal-controller" not found`** — the profile lacks the Web app layer; recreate it from the `web` template as shown above.
|
|
269
|
+
- **Agent not detected** — run `<cli> --version` on the Host; ensure its directory is on the `PATH` of the process that started DSH (GUI launchers often differ); log in with the vendor tool, then restart DSH.
|
|
270
|
+
- **Terminal** — persistent mode needs `tmux` on macOS/Linux; enabling/disabling the module and changing the binding scope need a restart; terminals are addressed per workspace.
|
|
271
|
+
- **LAN** — check the card's forwarding line, allow the port through the firewall, keep both devices on one network; with several DSH instances pick the detected port manually; sign in first when login protection is on.
|
|
272
|
+
- **Relay** — verify Control API reachability, log in again if the session expired, refresh devices, then bind the Host.
|
|
273
|
+
- **Logs** — `CODINGNS4DSH_TUNNEL_DEBUG=1 dsh codingns --no-open` (metadata only); pnpm install logs live in `$DSH_HOME/profiles/<profile>/.plugin-manager/logs/`.
|
|
274
|
+
- **Reporting** — include DSH and Codingns4DSH versions, OS, module and exact error: [GitHub Issues](https://github.com/jingyi0605/Codingns4DSH/issues) or QQ **1092985965**.
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Development
|
|
279
|
+
|
|
280
|
+
Requires Node `>= 22.19` and pnpm:
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
pnpm install
|
|
284
|
+
pnpm build # version check -> tsc -> client + H5 bundles
|
|
285
|
+
pnpm test # build, then 61 suites under tests/
|
|
286
|
+
pnpm typecheck
|
|
287
|
+
pnpm run capability:check # capability retirement check
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
Dev loop: `pnpm dev:watch` with `pnpm dev:link <profile>`, then restart DSH. Versions come from `version.json` (`version:set-plugin` / `version:set-dsh`, guarded by `version:check`).
|
|
291
|
+
|
|
292
|
+
Layout: `src/host` (Host layer), `src/client` (browser layer), `src/dsh-capabilities` (capability registry and version routing), `src/shared/contracts`, `src/transport` (tunnel + WebRTC), `src/features` (module registry), `tests/`, `specs/`, `docs/`, `data/build` (git-ignored).
|
|
293
|
+
|
|
294
|
+
A `v*` tag runs GitHub Actions (tag/version check, frozen install, typecheck, tests, `npm pack`) and publishes with provenance; prereleases get the `next` dist-tag. Roadmap: PeerHost, file management, workspace sessions, debug-proxy completion (auth + WebSocket), Git, SKILL, more.
|
|
295
|
+
|
|
296
|
+
Screenshot assets and shot list: [assets/screenshots](assets/screenshots/README.md) (Chinese).
|
|
297
|
+
|
|
298
|
+
**Chinese version: [README.md](README.md)**
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## Acknowledgements
|
|
303
|
+
|
|
304
|
+
The inspiration for Codingns4DSH — and part of its implementation approach — comes from **[CodexHost](https://github.com/BytePioneer-AI/codex-host)**, which runs Pi, Claude Code, Grok Build and other Harnesses natively inside Codex Desktop. It showed the direction Codingns4DSH follows from the other side: host *other* Harnesses as first-class Agents instead of replacing them. The multi-Harness adapter model, projecting a CLI event stream into native sessions, and keeping each Agent's sessions in the host sidebar and composer trace back to that design. Thanks to its authors and community.
|
|
305
|
+
|
|
306
|
+
Codingns4DSH is an independent project and is not affiliated with CodexHost.
|