@lengmoxxl/dsh-remote-workspace 0.1.11
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/LICENSE +21 -0
- package/README.md +85 -0
- package/README.zh.md +78 -0
- package/cordis.patch.yml +10 -0
- package/lib/client.js +16344 -0
- package/lib/client.js.map +1 -0
- package/lib/index.d.ts +87 -0
- package/lib/index.js +5741 -0
- package/lib/index.js.map +1 -0
- package/package.json +183 -0
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// dsh-remote-workspace host half
|
|
2
|
+
import z from "@deepseek-ai/schemastery";
|
|
3
|
+
import { Context } from "@deepseek-ai/cordis";
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
/** Plugin name used by the Loader and by diagnostics. */
|
|
6
|
+
export declare const name = "dsh-remote-workspace";
|
|
7
|
+
/**
|
|
8
|
+
* Services this plugin needs before it activates. `sandboxPolicy` is required
|
|
9
|
+
* by the composed local delegate, and declaring it here keeps provision of
|
|
10
|
+
* `ctx.fs` behind that dependency rather than racing it. The Sidebar terminal
|
|
11
|
+
* reads the session store and the terminal seam it serves, so it looks both up
|
|
12
|
+
* dynamically rather than making them activation dependencies.
|
|
13
|
+
*/
|
|
14
|
+
export declare const inject: string[];
|
|
15
|
+
/** Deployment-varying choices for this plugin. */
|
|
16
|
+
export interface Config {
|
|
17
|
+
/**
|
|
18
|
+
* Directory holding the node registry. Defaults to
|
|
19
|
+
* `$DSH_HOME/remote-worktrees`, which the anchor directory store also uses.
|
|
20
|
+
*/
|
|
21
|
+
dataDir?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Remote binary a host-resolved ripgrep is rewritten to. Defaults to `rg`.
|
|
24
|
+
*/
|
|
25
|
+
remoteRipgrep?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Root directory every managed worktree is cut under, on every machine.
|
|
28
|
+
*
|
|
29
|
+
* Defaults to `~/.dsh/worktrees`, resolved against the machine's own home; an
|
|
30
|
+
* absolute path is used verbatim. A checkout lands at
|
|
31
|
+
* `<root>/<repository>/<name>`, never inside the repository.
|
|
32
|
+
*/
|
|
33
|
+
worktreeRoot?: string;
|
|
34
|
+
/**
|
|
35
|
+
* How long the SSH forward may take to start accepting connections, in
|
|
36
|
+
* milliseconds. Defaults to {@link DEFAULT_FORWARD_TIMEOUT_MS}.
|
|
37
|
+
*
|
|
38
|
+
* A deployment across a slow link or through a bastion raises this; the
|
|
39
|
+
* failure it prevents is a forward that was still negotiating when the
|
|
40
|
+
* budget ran out.
|
|
41
|
+
*/
|
|
42
|
+
sshForwardTimeoutMs?: number;
|
|
43
|
+
/**
|
|
44
|
+
* How long the daemon may take to answer the handshake once its forward is
|
|
45
|
+
* up, in milliseconds. Defaults to {@link DEFAULT_HANDSHAKE_TIMEOUT_MS}.
|
|
46
|
+
*
|
|
47
|
+
* This is what turns "the daemon is not running" into a report instead of a
|
|
48
|
+
* call that never returns, so a deployment should not raise it far.
|
|
49
|
+
*/
|
|
50
|
+
daemonHandshakeTimeoutMs?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Program the Sidebar terminal runs. Unset — the default — runs the machine's
|
|
53
|
+
* own login shell, resolved on whichever machine owns the workspace, so one
|
|
54
|
+
* deployment spanning a Mac and a Linux node starts zsh on one and bash on
|
|
55
|
+
* the other.
|
|
56
|
+
*/
|
|
57
|
+
shell?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Arguments after {@link Config.shell}. Defaults to `['-l']`, a login shell,
|
|
60
|
+
* which is what makes the user's own profile load. Ignored while `shell` is
|
|
61
|
+
* unset.
|
|
62
|
+
*/
|
|
63
|
+
shellArgs?: string[];
|
|
64
|
+
/** TERM-to-KILL grace for one terminal session, in milliseconds. */
|
|
65
|
+
graceMs?: number;
|
|
66
|
+
/**
|
|
67
|
+
* Safety valve: how long a terminal whose browser socket went away is kept,
|
|
68
|
+
* in milliseconds. Unset or `0` — the default — keeps it for as long as its
|
|
69
|
+
* process lives, because a browser's absence is not the shell's business.
|
|
70
|
+
*
|
|
71
|
+
* A positive value releases a terminal nobody has come back for that long
|
|
72
|
+
* after the last socket left. A tab that is closed ends its terminal
|
|
73
|
+
* immediately regardless, because the browser sends `close` first.
|
|
74
|
+
*/
|
|
75
|
+
detachGraceMs?: number;
|
|
76
|
+
}
|
|
77
|
+
/** Validated plugin config. */
|
|
78
|
+
export declare const Config: z<Config>;
|
|
79
|
+
/**
|
|
80
|
+
* Mount the plugin.
|
|
81
|
+
*
|
|
82
|
+
* @param ctx - the host context this plugin was mounted on.
|
|
83
|
+
* @param config - the validated plugin config.
|
|
84
|
+
*/
|
|
85
|
+
export declare function apply(ctx: Context, config: Config): Promise<void>;
|
|
86
|
+
//#endregion
|
|
87
|
+
//# sourceMappingURL=index.d.ts.map
|