@deepseek-ai/dsh-host-directory-picker-auto 0.2.1-alpha.1 → 0.2.1-alpha.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.i18n.yaml +8 -8
- package/README.md +5 -3
- package/README.zh.md +5 -3
- package/lib/index.js +30 -18
- package/lib/types/index.d.ts +15 -10
- package/lib/types/resolve.d.ts +14 -8
- package/locale/en.json +5 -0
- package/locale/zh.json +6 -0
- package/package.json +23 -19
package/README.i18n.yaml
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
en: 919d44a5781ac8be
|
|
10
10
|
zh: 0e7a812a5af49125
|
|
11
11
|
/deepseek-ai-dsh-host-directory-picker-auto/summary:
|
|
12
|
-
en:
|
|
13
|
-
zh:
|
|
12
|
+
en: 3ff3bda883cccfc0
|
|
13
|
+
zh: a01af7bac5580514
|
|
14
14
|
/deepseek-ai-dsh-host-directory-picker-auto/table-of-contents:
|
|
15
15
|
en: d152484eb41ac6b4
|
|
16
16
|
zh: 09388d293f9be9cb
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
en: 9ed11c3e0a03da01
|
|
19
19
|
zh: ffa5e373dfc99bb8
|
|
20
20
|
/deepseek-ai-dsh-host-directory-picker-auto/use-this-package/how-the-choice-is-made:
|
|
21
|
-
en:
|
|
22
|
-
zh:
|
|
21
|
+
en: 8489d65845345ada
|
|
22
|
+
zh: d0b1f92cfa6aba9b
|
|
23
23
|
/deepseek-ai-dsh-host-directory-picker-auto/use-this-package/what-you-get:
|
|
24
24
|
en: 6571c17daecc1e29
|
|
25
25
|
zh: d70089d67e41a32e
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
en: abc8d3962e4580c3
|
|
37
37
|
zh: 4442dde69faf680f
|
|
38
38
|
/deepseek-ai-dsh-host-directory-picker-auto/understand-the-implementation/the-resolution-table:
|
|
39
|
-
en:
|
|
40
|
-
zh:
|
|
39
|
+
en: 0edb097d5df327e8
|
|
40
|
+
zh: e9b59fc2070dfc42
|
|
41
41
|
/deepseek-ai-dsh-host-directory-picker-auto/understand-the-implementation/source-map:
|
|
42
42
|
en: 43a0268a54380a72
|
|
43
43
|
zh: a8f8cd0c3f502e6b
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
en: ca75c51c89c2c9b0
|
|
52
52
|
zh: de54f3467ef3b9be
|
|
53
53
|
/deepseek-ai-dsh-host-directory-picker-auto/known-limitations-and-deferred-work:
|
|
54
|
-
en:
|
|
55
|
-
zh:
|
|
54
|
+
en: 77982e87798474a3
|
|
55
|
+
zh: b60a3ec8b4ce49e8
|
|
56
56
|
/deepseek-ai-dsh-host-directory-picker-auto/known-limitations-and-deferred-work/dev-note:
|
|
57
57
|
en: e67f633dc6fe7773
|
|
58
58
|
zh: 3bb0c20c93f16f98
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
|
|
9
9
|
|
|
10
10
|
## Summary
|
|
11
11
|
|
|
12
|
-
`dsh-host-directory-picker-auto` picks the right directory-picking interaction for every boot: it resolves the host's situation once at boot and mounts the matching backend — [native](../directory-picker-native/README.md) or [browse](../directory-picker-browse/README.md) — together with its browser half, as real Loader entries in the in-memory root tree. The resolution is one pure boot-time sample: `native` requires a loopback-only bind, a non-SSH launch, and a servable display session; anything ambiguous resolves to `browse`, which works everywhere. Pinning an interaction means composing that backend directly. The mounted capability stays stable for the service lifetime, as the seam requires.
|
|
12
|
+
`dsh-host-directory-picker-auto` picks the right directory-picking interaction for every boot: it resolves the host's situation once at boot and mounts the matching backend — [native](../directory-picker-native/README.md) or [browse](../directory-picker-browse/README.md) — together with its browser half, as real Loader entries in the in-memory root tree. The resolution is one pure boot-time sample: `native` requires no remote-authority trust, a loopback-only bind, a non-SSH launch, and a servable display session; anything ambiguous resolves to `browse`, which works everywhere. Pinning an interaction means composing that backend directly. The mounted capability stays stable for the service lifetime, as the seam requires.
|
|
13
13
|
|
|
14
14
|
## Table of Contents
|
|
15
15
|
|
|
@@ -29,7 +29,7 @@ Compose this plugin instead of a concrete backend when the same composition must
|
|
|
29
29
|
|
|
30
30
|
### How the choice is made
|
|
31
31
|
|
|
32
|
-
`native` requires every signal that the operator can see the host display and the native backend can serve it: a loopback-only bind (read from the injected `webServer`;
|
|
32
|
+
`native` requires every signal that the operator can see the host display and the native backend can serve it: no remote-authority trust (`allowsRemoteAuthorities` is false — every validated `trustedHosts` entry names a loopback hostname), a loopback-only bind (read from the injected `webServer`; remote-authority trust or a non-loopback bind admits remote browsers no OS chooser can reach), no SSH launch (the shared [launch-environment](../../util/launch-environment/README.md) predicate ignores project/user `.env` values and checks only inherited non-empty `SSH_CONNECTION`/`SSH_TTY`), and a servable display session — assumed on darwin and win32; on linux, `DISPLAY`/`WAYLAND_DISPLAY` plus a zenity or kdialog binary on `PATH`; never on any other platform. Anything ambiguous resolves to `browse`, which works everywhere.
|
|
33
33
|
|
|
34
34
|
### What you get
|
|
35
35
|
|
|
@@ -59,7 +59,8 @@ The chooser is a pure decision plus a mount: `resolveDirectoryPickerBackend` sam
|
|
|
59
59
|
|
|
60
60
|
| Condition | Backend |
|
|
61
61
|
|---|---|
|
|
62
|
-
|
|
|
62
|
+
| A `trustedHosts` entry admits a non-loopback authority | `browse` |
|
|
63
|
+
| Bind host is not loopback (`isLoopbackHost`) | `browse` |
|
|
63
64
|
| `SSH_CONNECTION` or `SSH_TTY` present | `browse` |
|
|
64
65
|
| darwin or win32 | `native` |
|
|
65
66
|
| linux with a chooser binary and a display | `native` |
|
|
@@ -108,6 +109,7 @@ These limits define when the boot-time sample can misjudge the host. They are cu
|
|
|
108
109
|
- **Detection infers operator location from launch context, which no launch-side signal can prove** — a tmux session detached from its SSH launch loses the `SSH_*` markers; a Darwin process outside an Aqua session still counts as displayed; and a workstation-local launch later reached through `ssh -L` arrives from `127.0.0.1`, resolves `native`, and opens the chooser on the unattended workstation. A wrong `native` choice degrades to the backend's existing retryable failure dialog, and composing `-browse` directly selects the safe interaction for such deployments.
|
|
109
110
|
- **The Linux chooser probe reads `PATH` only** — a zenity/kdialog reachable some other way (shell alias, non-PATH install) still resolves `browse`; installing either binary on `PATH` restores `native` eligibility at the next boot.
|
|
110
111
|
- **Boot-time only** — one resolution serves every client of the boot; per-connection adaptivity (native for a local browser, browse for a remote one, same server) would need a per-client capability and the wire advertisement the seam does not carry, and waits for a deployment that serves both at once.
|
|
112
|
+
- **A loopback-presenting proxy hides a remote browser** — a reverse proxy that rewrites both the request `Host` and `Origin` to a loopback authority (say `127.0.0.1:3080`), with no non-loopback `trustedHosts` entry, passes the browser-trust fence: a browser's `/api` POST carries `Origin: https://app.example`, which the Origin fence rejects unless the proxy rewrites that header too. Only then does a remote browser still resolve `native` and open the chooser on the host display.
|
|
111
113
|
|
|
112
114
|
<a id="dev-note"></a>
|
|
113
115
|
### Dev Note
|
package/README.zh.md
CHANGED
|
@@ -9,7 +9,7 @@ kind: "package-reference"
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
`dsh-host-directory-picker-auto` 为每次启动选出正确的目录选择交互:它在启动时一次性判定宿主处境,并把匹配的后端——[原生](../directory-picker-native/README.zh.md)或[浏览](../directory-picker-browse/README.zh.md)——连同其 browser 半侧一起,作为真实的 Loader 条目挂进内存根树。判定是一次纯函数的启动时采样:`native`
|
|
12
|
+
`dsh-host-directory-picker-auto` 为每次启动选出正确的目录选择交互:它在启动时一次性判定宿主处境,并把匹配的后端——[原生](../directory-picker-native/README.zh.md)或[浏览](../directory-picker-browse/README.zh.md)——连同其 browser 半侧一起,作为真实的 Loader 条目挂进内存根树。判定是一次纯函数的启动时采样:`native` 要求无远程 authority 信任、仅回环绑定、非 SSH 启动与可服务的显示会话;任何含糊情形都判定为处处可用的 `browse`。固定某种交互就是直接组合那个后端。挂载的能力在服务生命周期内保持稳定,符合 seam 的要求。
|
|
13
13
|
|
|
14
14
|
## 目录
|
|
15
15
|
|
|
@@ -29,7 +29,7 @@ kind: "package-reference"
|
|
|
29
29
|
|
|
30
30
|
### 选择是如何作出的
|
|
31
31
|
|
|
32
|
-
`native`
|
|
32
|
+
`native` 要求「操作者看得到宿主屏幕、且原生后端能服务它」的全部信号:无远程 authority 信任(`allowsRemoteAuthorities` 为 false——每条通过校验的 `trustedHosts` 条目都只命名回环主机名);仅回环的绑定(从注入的 `webServer` 读取;远程 authority 信任或非回环绑定都会接入任何 OS 选择器都触及不到的远程浏览器);非 SSH 启动(共用的 [launch-environment](../../util/launch-environment/README.zh.md) 判断忽略项目与用户 `.env` 中的值,只检查继承的非空 `SSH_CONNECTION`/`SSH_TTY`);以及可服务的显示会话——darwin 与 win32 上视为存在;linux 上要求 `DISPLAY`/`WAYLAND_DISPLAY`,外加 `PATH` 上有 zenity 或 kdialog 二进制;其余任何平台上都不成立。任何含糊情形都判定为处处可用的 `browse`。
|
|
33
33
|
|
|
34
34
|
### 你会得到什么
|
|
35
35
|
|
|
@@ -59,7 +59,8 @@ kind: "package-reference"
|
|
|
59
59
|
|
|
60
60
|
| 条件 | 后端 |
|
|
61
61
|
|---|---|
|
|
62
|
-
|
|
|
62
|
+
| 某条 `trustedHosts` 条目信任非回环 authority | `browse` |
|
|
63
|
+
| 绑定地址不是 loopback(`isLoopbackHost`) | `browse` |
|
|
63
64
|
| 存在 `SSH_CONNECTION` 或 `SSH_TTY` | `browse` |
|
|
64
65
|
| darwin 或 win32 | `native` |
|
|
65
66
|
| linux 且带选择器二进制与显示 | `native` |
|
|
@@ -108,6 +109,7 @@ kind: "package-reference"
|
|
|
108
109
|
- **探测是从启动上下文推断操作者位置,而任何启动侧信号都无法证明这一点**——从 SSH 启动中脱离的 tmux 会话会丢失 `SSH_*` 标记;Aqua 会话之外的 Darwin 进程仍被算作有显示;在工作站本地启动、之后经 `ssh -L` 访问时,请求会从 `127.0.0.1` 到达,系统会判定 `native`,并把选择器弹在无人值守的工作站上。错误的 `native` 选择会退化为后端既有的可重试失败对话框,而对这类部署,直接组合 `-browse` 即选择安全的交互。
|
|
109
110
|
- **Linux 选择器探查只读 `PATH`**——以其他途径可用的 zenity/kdialog(shell 别名、未装在 PATH 上)仍判定为 `browse`;把任一二进制装到 `PATH` 上,下次启动即恢复 `native` 资格。
|
|
110
111
|
- **仅在启动时判定**——一次判定服务本次启动的所有客户端;按连接自适应(同一台服务器,本地浏览器用 native、远程浏览器用 browse)需要按客户端的能力对象以及 seam 未携带的协议通告,等到出现同时服务两种形态的部署再做。
|
|
112
|
+
- **以 loopback authority 呈现的代理会藏起远程浏览器**——反向代理把请求 `Host` 和 `Origin` 一并改写为 loopback authority(如 `127.0.0.1:3080`),且没有任何非 loopback 的 `trustedHosts` 条目时,请求才会通过浏览器信任栅栏:浏览器对 `/api` 的 POST 会附带 `Origin: https://app.example`,代理若不改写该头就会被 Origin 栅栏拒绝。也只有在两者都被改写时,远程浏览器才会仍判定为 `native`,选择器在宿主屏幕上打开。
|
|
111
113
|
|
|
112
114
|
<a id="dev-note"></a>
|
|
113
115
|
### 开发备注
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { launchEnvironmentOf, launchedThroughSsh } from "@deepseek-ai/dsh-launch-environment";
|
|
2
2
|
import { accessSync, constants } from "node:fs";
|
|
3
3
|
import { delimiter, join } from "node:path";
|
|
4
|
+
import { isLoopbackHost } from "@deepseek-ai/dsh-host-webserver";
|
|
4
5
|
//#region lib/types/probe.js
|
|
5
6
|
/**
|
|
6
7
|
* PATH probe for the native backend's Linux chooser binaries: one boot-time
|
|
@@ -51,18 +52,19 @@ const present = (value) => value !== void 0 && value !== "";
|
|
|
51
52
|
/**
|
|
52
53
|
* Resolve which backend serves this boot. `native` requires every signal that
|
|
53
54
|
* the operator can see the host display and the native backend can serve it:
|
|
54
|
-
*
|
|
55
|
-
* chooser can reach), no SSH
|
|
56
|
-
*
|
|
57
|
-
* assumed on darwin/win32, requiring
|
|
58
|
-
* chooser binary on linux, and never true
|
|
59
|
-
* drives exactly darwin/win32/linux). Anything
|
|
55
|
+
* no remote-authority trust, a loopback bind (remote-authority trust or a
|
|
56
|
+
* non-loopback bind admits remote browsers no OS chooser can reach), no SSH
|
|
57
|
+
* launch (a forwarded connection cannot display the server's chooser), and a
|
|
58
|
+
* servable display session — assumed on darwin/win32, requiring
|
|
59
|
+
* `DISPLAY`/`WAYLAND_DISPLAY` plus a chooser binary on linux, and never true
|
|
60
|
+
* elsewhere (the native backend drives exactly darwin/win32/linux). Anything
|
|
61
|
+
* ambiguous resolves to
|
|
60
62
|
* `browse`, which works everywhere.
|
|
61
63
|
* @param facts - the sampled host facts.
|
|
62
64
|
* @returns the backend kind to mount.
|
|
63
65
|
*/
|
|
64
66
|
function resolveDirectoryPickerBackend(facts) {
|
|
65
|
-
if (facts.
|
|
67
|
+
if (facts.allowsRemoteAuthorities || !isLoopbackHost(facts.bindHost)) return "browse";
|
|
66
68
|
if (facts.ssh) return "browse";
|
|
67
69
|
if (facts.platform === "darwin" || facts.platform === "win32") return "native";
|
|
68
70
|
if (facts.platform !== "linux" || !facts.linuxChooser) return "browse";
|
|
@@ -72,20 +74,29 @@ function resolveDirectoryPickerBackend(facts) {
|
|
|
72
74
|
//#region lib/types/index.js
|
|
73
75
|
/**
|
|
74
76
|
* Adaptive chooser of the directory-picker seam: resolves the host's
|
|
75
|
-
* situation once at boot (bind host, SSH launch,
|
|
76
|
-
* chooser binary) and mounts the matching interaction —
|
|
77
|
-
* — as real Loader entries in the in-memory root tree.
|
|
78
|
-
* pair: the Host backend serving the seam capability and
|
|
79
|
-
* occupying ui-workspace's directory-flow holes. Both
|
|
80
|
-
* entries, so the surface is discovered exactly as a
|
|
81
|
-
* and one resolved choice still swaps both faces;
|
|
82
|
-
* remains composing that pair directly instead of this
|
|
77
|
+
* situation once at boot (remote-authority trust, bind host, SSH launch,
|
|
78
|
+
* display session, chooser binary) and mounts the matching interaction —
|
|
79
|
+
* `native` or `browse` — as real Loader entries in the in-memory root tree.
|
|
80
|
+
* Each interaction is a pair: the Host backend serving the seam capability and
|
|
81
|
+
* the client surface occupying ui-workspace's directory-flow holes. Both
|
|
82
|
+
* arrive as ordinary entries, so the surface is discovered exactly as a
|
|
83
|
+
* config-row's would be and one resolved choice still swaps both faces;
|
|
84
|
+
* pinning an interaction remains composing that pair directly instead of this
|
|
85
|
+
* row.
|
|
83
86
|
* @module @deepseek-ai/dsh-host-directory-picker-auto
|
|
84
87
|
*/
|
|
85
88
|
/** Cordis plugin name. */
|
|
86
89
|
const name = "directory-picker-auto";
|
|
87
|
-
/**
|
|
88
|
-
|
|
90
|
+
/**
|
|
91
|
+
* Required services: HTTP deployment settings (`webServer`), the Connection
|
|
92
|
+
* trust policy (`connection`), and the entry tree the backend mounts into
|
|
93
|
+
* (`loader`).
|
|
94
|
+
*/
|
|
95
|
+
const inject = [
|
|
96
|
+
"webServer",
|
|
97
|
+
"connection",
|
|
98
|
+
"loader"
|
|
99
|
+
];
|
|
89
100
|
/**
|
|
90
101
|
* Host backend package per resolved kind — fixed composition vocabulary, not a
|
|
91
102
|
* tunable. Exported because the reference is a runtime string the static
|
|
@@ -112,11 +123,12 @@ const SURFACE_PACKAGES = {
|
|
|
112
123
|
* surface as Loader entries; the effect's disposer removes both entries and
|
|
113
124
|
* joins their fibers' teardown, so unloading this plugin returns only after
|
|
114
125
|
* both faces of the mounted interaction (and their dependents) quiesced.
|
|
115
|
-
* @param ctx - cordis context carrying the injected
|
|
126
|
+
* @param ctx - cordis context carrying the injected services.
|
|
116
127
|
*/
|
|
117
128
|
async function apply(ctx) {
|
|
118
129
|
const backend = resolveDirectoryPickerBackend({
|
|
119
130
|
bindHost: ctx.webServer.host,
|
|
131
|
+
allowsRemoteAuthorities: ctx.connection.allowsRemoteAuthorities,
|
|
120
132
|
platform: process.platform,
|
|
121
133
|
ssh: launchedThroughSsh(launchEnvironmentOf(ctx)),
|
|
122
134
|
env: process.env,
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Adaptive chooser of the directory-picker seam: resolves the host's
|
|
3
|
-
* situation once at boot (bind host, SSH launch,
|
|
4
|
-
* chooser binary) and mounts the matching interaction —
|
|
5
|
-
* — as real Loader entries in the in-memory root tree.
|
|
6
|
-
* pair: the Host backend serving the seam capability and
|
|
7
|
-
* occupying ui-workspace's directory-flow holes. Both
|
|
8
|
-
* entries, so the surface is discovered exactly as a
|
|
9
|
-
* and one resolved choice still swaps both faces;
|
|
10
|
-
* remains composing that pair directly instead of this
|
|
3
|
+
* situation once at boot (remote-authority trust, bind host, SSH launch,
|
|
4
|
+
* display session, chooser binary) and mounts the matching interaction —
|
|
5
|
+
* `native` or `browse` — as real Loader entries in the in-memory root tree.
|
|
6
|
+
* Each interaction is a pair: the Host backend serving the seam capability and
|
|
7
|
+
* the client surface occupying ui-workspace's directory-flow holes. Both
|
|
8
|
+
* arrive as ordinary entries, so the surface is discovered exactly as a
|
|
9
|
+
* config-row's would be and one resolved choice still swaps both faces;
|
|
10
|
+
* pinning an interaction remains composing that pair directly instead of this
|
|
11
|
+
* row.
|
|
11
12
|
* @module @deepseek-ai/dsh-host-directory-picker-auto
|
|
12
13
|
*/
|
|
13
14
|
import type { Context } from '@deepseek-ai/cordis';
|
|
@@ -17,7 +18,11 @@ export type { DirectoryPickerBackendKind, DirectoryPickerEnv, DirectoryPickerHos
|
|
|
17
18
|
export { resolveDirectoryPickerBackend } from './resolve.ts';
|
|
18
19
|
/** Cordis plugin name. */
|
|
19
20
|
export declare const name = "directory-picker-auto";
|
|
20
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Required services: HTTP deployment settings (`webServer`), the Connection
|
|
23
|
+
* trust policy (`connection`), and the entry tree the backend mounts into
|
|
24
|
+
* (`loader`).
|
|
25
|
+
*/
|
|
21
26
|
export declare const inject: string[];
|
|
22
27
|
/**
|
|
23
28
|
* Host backend package per resolved kind — fixed composition vocabulary, not a
|
|
@@ -39,7 +44,7 @@ export declare const SURFACE_PACKAGES: Record<DirectoryPickerBackendKind, string
|
|
|
39
44
|
* surface as Loader entries; the effect's disposer removes both entries and
|
|
40
45
|
* joins their fibers' teardown, so unloading this plugin returns only after
|
|
41
46
|
* both faces of the mounted interaction (and their dependents) quiesced.
|
|
42
|
-
* @param ctx - cordis context carrying the injected
|
|
47
|
+
* @param ctx - cordis context carrying the injected services.
|
|
43
48
|
*/
|
|
44
49
|
export declare function apply(ctx: Context): Promise<void>;
|
|
45
50
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/types/resolve.d.ts
CHANGED
|
@@ -5,15 +5,20 @@
|
|
|
5
5
|
* stable for the service lifetime as the seam requires.
|
|
6
6
|
* @module @deepseek-ai/dsh-host-directory-picker-auto/resolve
|
|
7
7
|
*/
|
|
8
|
-
import type
|
|
8
|
+
import { type Config as HttpServerConfig } from '@deepseek-ai/dsh-host-webserver';
|
|
9
9
|
/** Concrete interaction backend the resolver chooses between. */
|
|
10
10
|
export type DirectoryPickerBackendKind = 'native' | 'browse';
|
|
11
11
|
/** Environment keys the resolution reads (a `process.env` subset). */
|
|
12
12
|
export type DirectoryPickerEnv = Readonly<Partial<Record<'DISPLAY' | 'WAYLAND_DISPLAY', string>>>;
|
|
13
13
|
/** Host facts the backend choice is a pure function of, sampled once at boot. */
|
|
14
14
|
export interface DirectoryPickerHostFacts {
|
|
15
|
-
/** Effective webserver bind
|
|
15
|
+
/** Effective webserver bind address (a concrete IP literal of one local interface). */
|
|
16
16
|
bindHost: HttpServerConfig['host'];
|
|
17
|
+
/**
|
|
18
|
+
* Whether the Connection trust policy admits a non-loopback authority (a
|
|
19
|
+
* validated `trustedHosts` entry naming a remote hostname).
|
|
20
|
+
*/
|
|
21
|
+
allowsRemoteAuthorities: boolean;
|
|
17
22
|
/** Host process platform. */
|
|
18
23
|
platform: NodeJS.Platform;
|
|
19
24
|
/** SSH launch fact from the inherited process layer, independent of `.env` values. */
|
|
@@ -26,12 +31,13 @@ export interface DirectoryPickerHostFacts {
|
|
|
26
31
|
/**
|
|
27
32
|
* Resolve which backend serves this boot. `native` requires every signal that
|
|
28
33
|
* the operator can see the host display and the native backend can serve it:
|
|
29
|
-
*
|
|
30
|
-
* chooser can reach), no SSH
|
|
31
|
-
*
|
|
32
|
-
* assumed on darwin/win32, requiring
|
|
33
|
-
* chooser binary on linux, and never true
|
|
34
|
-
* drives exactly darwin/win32/linux). Anything
|
|
34
|
+
* no remote-authority trust, a loopback bind (remote-authority trust or a
|
|
35
|
+
* non-loopback bind admits remote browsers no OS chooser can reach), no SSH
|
|
36
|
+
* launch (a forwarded connection cannot display the server's chooser), and a
|
|
37
|
+
* servable display session — assumed on darwin/win32, requiring
|
|
38
|
+
* `DISPLAY`/`WAYLAND_DISPLAY` plus a chooser binary on linux, and never true
|
|
39
|
+
* elsewhere (the native backend drives exactly darwin/win32/linux). Anything
|
|
40
|
+
* ambiguous resolves to
|
|
35
41
|
* `browse`, which works everywhere.
|
|
36
42
|
* @param facts - the sampled host facts.
|
|
37
43
|
* @returns the backend kind to mount.
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-host-directory-picker-auto",
|
|
3
3
|
"description": "Adaptive chooser of the directory-picker seam: resolves the host situation at boot and mounts the native or browse backend for the DeepSeek Harness web GUI host",
|
|
4
|
-
"version": "0.2.1-alpha.
|
|
4
|
+
"version": "0.2.1-alpha.3",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -19,34 +19,38 @@
|
|
|
19
19
|
"default": "./lib/index.js"
|
|
20
20
|
},
|
|
21
21
|
"./src/*": "./src/*",
|
|
22
|
-
"./package.json": "./package.json"
|
|
22
|
+
"./package.json": "./package.json",
|
|
23
|
+
"./locale/*.json": "./locale/*.json"
|
|
23
24
|
},
|
|
24
25
|
"files": [
|
|
26
|
+
"locale/*.json",
|
|
25
27
|
"lib/index.js",
|
|
26
28
|
"lib/types/**/*.d.ts"
|
|
27
29
|
],
|
|
28
30
|
"license": "MIT",
|
|
29
31
|
"peerDependencies": {
|
|
30
|
-
"@deepseek-ai/cordis
|
|
31
|
-
"@deepseek-ai/cordis": "~
|
|
32
|
-
"@deepseek-ai/dsh-client-
|
|
33
|
-
"@deepseek-ai/dsh-client-ui-directory-picker-
|
|
34
|
-
"@deepseek-ai/dsh-
|
|
35
|
-
"@deepseek-ai/dsh-host-directory-picker-
|
|
36
|
-
"@deepseek-ai/dsh-host-
|
|
32
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.2",
|
|
33
|
+
"@deepseek-ai/cordis-plugin-loader": "~1.0.6-alpha.2",
|
|
34
|
+
"@deepseek-ai/dsh-client-connection": "0.2.1-alpha.3",
|
|
35
|
+
"@deepseek-ai/dsh-client-ui-directory-picker-browse": "0.2.1-alpha.3",
|
|
36
|
+
"@deepseek-ai/dsh-client-ui-directory-picker-native": "0.2.1-alpha.3",
|
|
37
|
+
"@deepseek-ai/dsh-host-directory-picker-browse": "0.2.1-alpha.3",
|
|
38
|
+
"@deepseek-ai/dsh-host-directory-picker-native": "0.2.1-alpha.3",
|
|
39
|
+
"@deepseek-ai/dsh-host-webserver": "0.2.1-alpha.3"
|
|
37
40
|
},
|
|
38
41
|
"devDependencies": {
|
|
39
|
-
"@deepseek-ai/cordis": "~4.0.5-alpha.
|
|
40
|
-
"@deepseek-ai/cordis-plugin-include": "~1.0.10-alpha.
|
|
41
|
-
"@deepseek-ai/cordis-plugin-loader": "~1.0.6-alpha.
|
|
42
|
-
"@deepseek-ai/dsh-client-
|
|
43
|
-
"@deepseek-ai/dsh-client-ui-directory-picker-
|
|
44
|
-
"@deepseek-ai/dsh-
|
|
45
|
-
"@deepseek-ai/dsh-host-directory-picker
|
|
46
|
-
"@deepseek-ai/dsh-host-
|
|
47
|
-
"@deepseek-ai/dsh-host-directory-picker-native": "0.2.1-alpha.
|
|
42
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.2",
|
|
43
|
+
"@deepseek-ai/cordis-plugin-include": "~1.0.10-alpha.2",
|
|
44
|
+
"@deepseek-ai/cordis-plugin-loader": "~1.0.6-alpha.2",
|
|
45
|
+
"@deepseek-ai/dsh-client-connection": "0.2.1-alpha.3",
|
|
46
|
+
"@deepseek-ai/dsh-client-ui-directory-picker-browse": "0.2.1-alpha.3",
|
|
47
|
+
"@deepseek-ai/dsh-client-ui-directory-picker-native": "0.2.1-alpha.3",
|
|
48
|
+
"@deepseek-ai/dsh-host-directory-picker": "0.2.1-alpha.3",
|
|
49
|
+
"@deepseek-ai/dsh-host-directory-picker-browse": "0.2.1-alpha.3",
|
|
50
|
+
"@deepseek-ai/dsh-host-directory-picker-native": "0.2.1-alpha.3",
|
|
51
|
+
"@deepseek-ai/dsh-host-webserver": "0.2.1-alpha.3"
|
|
48
52
|
},
|
|
49
53
|
"dependencies": {
|
|
50
|
-
"@deepseek-ai/dsh-launch-environment": "0.2.1-alpha.
|
|
54
|
+
"@deepseek-ai/dsh-launch-environment": "0.2.1-alpha.3"
|
|
51
55
|
}
|
|
52
56
|
}
|