@deepseek-ai/dsh-web-app 0.0.1-rc.1 → 0.0.1-rc.2
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 +2 -2
- package/README.md +3 -3
- package/README.zh.md +3 -3
- package/cordis.patch.yml +40 -22
- package/lib/index.js +9 -23
- package/lib/startup.js +3 -5
- package/lib/types/index.d.ts +6 -11
- package/lib/types/startup.d.ts +1 -3
- package/package.json +58 -54
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/bundle/web-app/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 06856a47cd8ccc2c6ee5a53c40928b1bd2933cc7
|
|
6
|
+
README.zh.md: 8befc7c7404ea1b082842f122769967fff32df2f
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](README.zh.md)
|
|
4
4
|
|
|
5
|
-
The dsh browser-surface bundle. [`cordis.patch.yml`](cordis.patch.yml) rides over [`dsh-base`](../base/README.md): it sets the coding persona, inserts the Web host rows (webserver, API gateway, workspace, projection cache, storage) and the browser plugin roster, and mounts this package's `web-runtime` glue plugin (config `{
|
|
5
|
+
The dsh browser-surface bundle. [`cordis.patch.yml`](cordis.patch.yml) rides over [`dsh-base`](../base/README.md): it sets the coding persona, inserts the Web host rows (webserver, API gateway, workspace, projection cache, storage) and the browser plugin roster, the always-on client-plugin reload chain ([`dsh-client-hmr`](../../client/hmr/README.md), idle until a rebuild watcher rewrites client bundles), and mounts this package's `web-runtime` glue plugin (config `{printUrl, surfaceContext, trustedHosts}`). That plugin resolves the built frontend dist through `@deepseek-ai/dsh-frontend`'s exports, samples bind-dependent LAN trust once, provides it as `webRuntime` to the browser-trust fence and client roster, mounts the [`frontend-static`](../../host/frontend-static/README.md) fallback owner, registers the harness-source and web-surface prompt sections plus the bash-visible `DSH_WEB_URL` runtime variable when `surfaceContext` is true, and prints the `dsh web:` URL line when `printUrl` is true, after its Loader tree settles so a sibling failure cannot announce a dead app. This bundle also owns the app command line: the ordinary `web-startup` provider ([`src/startup.ts`](src/startup.ts)) injects `ctx.cmdlineArgs` ([`dsh-cmdline`](../../boot/cmdline/README.md)), parses `--host`, `--port`, repeatable `--trusted-host`, and the app's `--help`, then provides `webStartup`. Flag-configured rows inject that service and read it directly from lazy config, so nothing binds a port before argument resolution and `dsh --profile web --help` starts no server. [`dsh-headless`](../headless/README.md) is a sibling surface over the same base and does not mount this bundle.
|
|
6
6
|
|
|
7
7
|
## Model Experience
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ The dsh browser-surface bundle. [`cordis.patch.yml`](cordis.patch.yml) rides ove
|
|
|
10
10
|
|
|
11
11
|
#### What the model sees
|
|
12
12
|
|
|
13
|
-
When `surfaceContext` is true, the `harness:source` section identifies the on-disk Harness implementation without claiming it is the working directory, and the `app:web-surface` global section (order −98) orients the model to the GUI: the canonical local URL, the "this page" referent, the
|
|
13
|
+
When `surfaceContext` is true, the `harness:source` section identifies the on-disk Harness implementation without claiming it is the working directory, and the `app:web-surface` global section (order −98) orients the model to the GUI: the canonical local URL, the "this page" referent, the update contract (the reload receiver is always on; no-refresh reloads additionally need the `pnpm run dev:web` watcher), and the instruction not to start replacement servers. `DSH_WEB_URL` additionally appears in the managed bash environment with its description, resolved per invocation from the live server. When it is false, neither section nor the variable is registered.
|
|
14
14
|
|
|
15
15
|
#### Token effect
|
|
16
16
|
|
|
@@ -18,7 +18,7 @@ One source line and one prompt paragraph per session plus two managed-environmen
|
|
|
18
18
|
|
|
19
19
|
#### KV Cache effect
|
|
20
20
|
|
|
21
|
-
The prompt section sits near the system prompt's head and is stable for the life of the process (port
|
|
21
|
+
The prompt section sits near the system prompt's head and is stable for the life of the process (the port is a boot fact), so it does not invalidate the cache across turns.
|
|
22
22
|
|
|
23
23
|
## Known Limitations and Deferred Work
|
|
24
24
|
|
package/README.zh.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | 中文
|
|
4
4
|
|
|
5
|
-
dsh 浏览器表层组合包。[`cordis.patch.yml`](cordis.patch.yml) 叠加在 [`dsh-base`](../base/README.md) 之上:设置 coding persona,插入 Web 宿主行(webserver、API 网关、workspace
|
|
5
|
+
dsh 浏览器表层组合包。[`cordis.patch.yml`](cordis.patch.yml) 叠加在 [`dsh-base`](../base/README.md) 之上:设置 coding persona,插入 Web 宿主行(webserver、API 网关、workspace、投影缓存、存储)、浏览器插件名录与始终挂载的客户端插件重载链([`dsh-client-hmr`](../../client/hmr/README.md),在重建 watcher 改写客户端 bundle 之前保持空闲),并挂载本包的 `web-runtime` 粘合插件(配置为 `{printUrl, surfaceContext, trustedHosts}`)。该插件通过 `@deepseek-ai/dsh-frontend` 的 exports 解析已构建的前端 dist,只采样一次依赖 bind 的 LAN 信任信息并将其作为 `webRuntime` 提供给浏览器信任栅栏和客户端名录,挂载 [`frontend-static`](../../host/frontend-static/README.md) 回退席位所有者,在 `surfaceContext` 为 true 时注册 Harness 源码与 Web 表层提示词段落,以及 bash 可见的 `DSH_WEB_URL` 运行时变量,并在 `printUrl` 为 true 时等自身的 Loader 配置树结算后再打印 `dsh web:` URL 行,避免兄弟行失败时公告一个已失效的应用。本组合包还持有应用命令行:普通 `web-startup` 提供方([`src/startup.ts`](src/startup.ts))注入 `ctx.cmdlineArgs`([`dsh-cmdline`](../../boot/cmdline/README.md)),解析 `--host`、`--port`、可重复的 `--trusted-host` 以及应用自己的 `--help`,再提供 `webStartup`。由 flag 配置的行会注入该服务,并在惰性配置中直接读取它,因此参数解析完成前不会有任何东西绑定端口,`dsh --profile web --help` 也不会启动服务器。[`dsh-headless`](../headless/README.md) 是同一 base 之上的同级表层,不挂载本组合包。
|
|
6
6
|
|
|
7
7
|
## 模型体验
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ dsh 浏览器表层组合包。[`cordis.patch.yml`](cordis.patch.yml) 叠加在
|
|
|
10
10
|
|
|
11
11
|
#### 模型看到的内容
|
|
12
12
|
|
|
13
|
-
当 `surfaceContext` 为 true 时,`harness:source` 段落标明磁盘上的 Harness 实现,但不会声称它就是工作目录;全局段落 `app:web-surface`(顺序 −98)则向模型说明 GUI:规范的本地 URL、「this page
|
|
13
|
+
当 `surfaceContext` 为 true 时,`harness:source` 段落标明磁盘上的 Harness 实现,但不会声称它就是工作目录;全局段落 `app:web-surface`(顺序 −98)则向模型说明 GUI:规范的本地 URL、「this page」指代什么、更新约定(重载接收端始终开启;无刷新重载还需要 `pnpm run dev:web` watcher),以及不要启动替代服务器的指令。`DSH_WEB_URL` 还会连同描述出现在受管 bash 环境中,每次调用时从运行中的服务器解析。当它为 false 时,这两个段落和该变量都不会注册。
|
|
14
14
|
|
|
15
15
|
#### Token 影响
|
|
16
16
|
|
|
@@ -18,7 +18,7 @@ dsh 浏览器表层组合包。[`cordis.patch.yml`](cordis.patch.yml) 叠加在
|
|
|
18
18
|
|
|
19
19
|
#### KV Cache 影响
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
该提示词段落位于系统提示词靠前位置,且在进程整个生命周期内稳定(端口是启动期事实),因此不会使跨轮次缓存失效。
|
|
22
22
|
|
|
23
23
|
## 已知限制与延期工作
|
|
24
24
|
|
package/cordis.patch.yml
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
# The web-startup plugin injects `cmdlineArgs` and provides `webStartup` as an
|
|
9
9
|
# ordinary Cordis service. Rows configured from flags inject that service, so
|
|
10
10
|
# Loader resolves their expressions only after it exists. The web runtime then
|
|
11
|
-
# provides bind-dependent `webRuntime` values to the trust fence
|
|
12
|
-
#
|
|
11
|
+
# provides bind-dependent `webRuntime` values to the trust fence.
|
|
12
|
+
# `dsh --profile web --help` provides neither service, so no server binds.
|
|
13
13
|
|
|
14
14
|
# ── surface-specific values the base deliberately omits ─────────────────────
|
|
15
15
|
|
|
@@ -60,6 +60,11 @@
|
|
|
60
60
|
config:
|
|
61
61
|
backend: json
|
|
62
62
|
|
|
63
|
+
- id: message-feedback
|
|
64
|
+
name: '@deepseek-ai/dsh-message-feedback'
|
|
65
|
+
config:
|
|
66
|
+
maxNoteBytes: 8192
|
|
67
|
+
|
|
63
68
|
- id: workspace
|
|
64
69
|
name: '@deepseek-ai/dsh-workspace'
|
|
65
70
|
|
|
@@ -100,39 +105,34 @@
|
|
|
100
105
|
# Web glue owned by this bundle: resolves the built frontend dist (an
|
|
101
106
|
# assembly fact of dsh-web-app, never user config), mounts the
|
|
102
107
|
# frontend-static fallback owner, registers the web-surface prompt
|
|
103
|
-
# section and bash runtime
|
|
104
|
-
# provider supplies invocation-only values; after the server
|
|
105
|
-
# samples LAN trust once and provides `webRuntime`. A
|
|
106
|
-
# persona suppresses the prompt section for that
|
|
107
|
-
#
|
|
108
|
+
# section and the bash runtime variable, and prints the URL line. The
|
|
109
|
+
# webStartup provider supplies invocation-only values; after the server
|
|
110
|
+
# binds, this row samples LAN trust once and provides `webRuntime`. A
|
|
111
|
+
# complete agent-preset persona suppresses the prompt section for that
|
|
112
|
+
# agent while retaining the host-owned shell variable.
|
|
108
113
|
- id: web-runtime
|
|
109
114
|
name: '@deepseek-ai/dsh-web-app'
|
|
110
115
|
inject: [webStartup]
|
|
111
116
|
config:
|
|
112
|
-
mode: !!js ctx.webStartup.mode
|
|
113
117
|
printUrl: true
|
|
114
118
|
surfaceContext: true
|
|
115
119
|
trustedHosts: !!js ctx.webStartup.trustedHosts
|
|
116
120
|
|
|
117
|
-
# The client-plugin reload chain
|
|
118
|
-
#
|
|
119
|
-
# than a child of web-runtime because its node half is a
|
|
120
|
-
# which a host-side bundle cannot import.
|
|
121
|
+
# The client-plugin reload chain, always mounted: it is idle until a
|
|
122
|
+
# rebuild watcher (pnpm run dev:web) actually rewrites client bundles. It
|
|
123
|
+
# is a row rather than a child of web-runtime because its node half is a
|
|
124
|
+
# client-side package, which a host-side bundle cannot import.
|
|
121
125
|
- id: client-hmr
|
|
122
126
|
name: '@deepseek-ai/dsh-client-hmr'
|
|
123
|
-
inject: [webStartup]
|
|
124
|
-
disabled: true
|
|
125
127
|
|
|
126
128
|
# ── browser plugin roster (dsh.client rows; node halves are layer-2 hosts) ──
|
|
127
129
|
|
|
128
|
-
# Dual-face:
|
|
129
|
-
#
|
|
130
|
-
#
|
|
131
|
-
#
|
|
132
|
-
# (adopted as a plugin entry by the kernel, never fetched).
|
|
130
|
+
# Dual-face: the node half scans this tree, composes window.__DSH_BOOT__,
|
|
131
|
+
# and serves /plugins/<id>/client.js; the browser half is the module table
|
|
132
|
+
# the shell kernel constructs before cordis exists (adopted as a plugin
|
|
133
|
+
# entry by the kernel, never fetched).
|
|
133
134
|
- id: modules
|
|
134
135
|
name: '@deepseek-ai/dsh-client-modules'
|
|
135
|
-
inject: [webRuntime]
|
|
136
136
|
|
|
137
137
|
# Owns both ends of the web transport: node half binds the gateway to the
|
|
138
138
|
# webserver under /api; browser half is the fetch/SSE client.
|
|
@@ -179,6 +179,11 @@
|
|
|
179
179
|
- id: ui-tool
|
|
180
180
|
name: '@deepseek-ai/dsh-client-ui-tool'
|
|
181
181
|
|
|
182
|
+
# Durable workflow lifecycle as an independent Chat node after the
|
|
183
|
+
# existing generic workflow tool row.
|
|
184
|
+
- id: ui-workflow-run
|
|
185
|
+
name: '@deepseek-ai/dsh-client-ui-workflow-run'
|
|
186
|
+
|
|
182
187
|
# Turn tail: the produced-files row under each closing assistant message.
|
|
183
188
|
# Remove this entry to turn the surface off; the tail hole renders empty.
|
|
184
189
|
- id: ui-deliverables
|
|
@@ -202,6 +207,10 @@
|
|
|
202
207
|
- id: ui-subagent
|
|
203
208
|
name: '@deepseek-ai/dsh-client-ui-subagent'
|
|
204
209
|
|
|
210
|
+
# Background tasks: the session-header list over the tasksBySession mirror.
|
|
211
|
+
- id: ui-task
|
|
212
|
+
name: '@deepseek-ai/dsh-client-ui-task'
|
|
213
|
+
|
|
205
214
|
# Goal surface: GoalBar in the input dock over the goal session projection.
|
|
206
215
|
- id: ui-goal
|
|
207
216
|
name: '@deepseek-ai/dsh-client-ui-goal'
|
|
@@ -218,6 +227,11 @@
|
|
|
218
227
|
- id: ui-agent-preset
|
|
219
228
|
name: '@deepseek-ai/dsh-client-ui-agent-preset'
|
|
220
229
|
|
|
230
|
+
# Plugin configuration: the host-plane sections a user owns, as expandable
|
|
231
|
+
# cards. A namespace this deployment does not expose renders nothing.
|
|
232
|
+
- id: ui-plugin-config
|
|
233
|
+
name: '@deepseek-ai/dsh-client-ui-plugin-config'
|
|
234
|
+
|
|
221
235
|
# Plan control: the composer plan seat over the plan projection + /plan channel.
|
|
222
236
|
- id: ui-plan
|
|
223
237
|
name: '@deepseek-ai/dsh-client-ui-plan'
|
|
@@ -300,8 +314,12 @@
|
|
|
300
314
|
- id: plan-mode
|
|
301
315
|
disabled: true
|
|
302
316
|
|
|
303
|
-
|
|
304
|
-
|
|
317
|
+
# The token METER stays on the host plane; only the compaction backend that
|
|
318
|
+
# reads it moves. It owns the context-meter projection units, and that table is
|
|
319
|
+
# process-wide, so preset ownership would make the meter a function of which
|
|
320
|
+
# presets happen to be mounted rather than a per-session fact. Same criterion as
|
|
321
|
+
# `tasks` and `goals`; the reasoning has one home in
|
|
322
|
+
# `.agents/notes/implemented/architecture/2026-08-10-host-plane-ownership-after-presets.md`.
|
|
305
323
|
|
|
306
324
|
- id: compact-basic
|
|
307
325
|
disabled: true
|
package/lib/index.js
CHANGED
|
@@ -3,7 +3,6 @@ import { networkInterfaces } from "node:os";
|
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import z from "@deepseek-ai/schemastery";
|
|
5
5
|
import { addHarnessSourceSection } from "@deepseek-ai/dsh-app-boot";
|
|
6
|
-
import { enableRow } from "@deepseek-ai/dsh-cmdline";
|
|
7
6
|
import * as FrontendStatic from "@deepseek-ai/dsh-frontend-static";
|
|
8
7
|
//#region lib/types/index.js
|
|
9
8
|
/**
|
|
@@ -13,7 +12,7 @@ import * as FrontendStatic from "@deepseek-ai/dsh-frontend-static";
|
|
|
13
12
|
* the built frontend dist (workspace knowledge of this bundle, never user
|
|
14
13
|
* config), mounts the `frontend-static` fallback owner over it, registers the
|
|
15
14
|
* harness-source and web-surface prompt sections, the bash-visible web runtime
|
|
16
|
-
*
|
|
15
|
+
* variable, and the URL line. App command-line values arrive through the
|
|
17
16
|
* `webStartup` service expressions in the bundle patch.
|
|
18
17
|
* @module @deepseek-ai/dsh-web-app
|
|
19
18
|
*/
|
|
@@ -21,21 +20,17 @@ import * as FrontendStatic from "@deepseek-ai/dsh-frontend-static";
|
|
|
21
20
|
const name = "web-app";
|
|
22
21
|
/** This dsh installation's root, from either this package's source or built entry. */
|
|
23
22
|
const SOURCE_ROOT = fileURLToPath(new URL("../../../..", import.meta.url));
|
|
24
|
-
const HMR_ROW_ID = "client-hmr";
|
|
25
23
|
/** Runtime service that releases Web rows after bind-dependent values resolve. */
|
|
26
24
|
const WEB_RUNTIME_SERVICE = "webRuntime";
|
|
27
25
|
/** Services required before the web runtime can mount. */
|
|
28
26
|
const inject = ["httpServer"];
|
|
29
27
|
const Config = z.object({
|
|
30
|
-
mode: z.union([z.const("production"), z.const("development")]).default("production"),
|
|
31
28
|
printUrl: z.boolean().default(true),
|
|
32
29
|
surfaceContext: z.boolean().default(true),
|
|
33
30
|
trustedHosts: z.array(String).default([])
|
|
34
31
|
});
|
|
35
32
|
/** Environment variable naming the canonical local URL of this Web GUI. */
|
|
36
33
|
const DSH_WEB_URL = "DSH_WEB_URL";
|
|
37
|
-
/** Environment variable naming the Web runtime mode. */
|
|
38
|
-
const DSH_WEB_MODE = "DSH_WEB_MODE";
|
|
39
34
|
const LOOPBACK_HOST = "127.0.0.1";
|
|
40
35
|
/** The webserver schema's all-interfaces bind literal. */
|
|
41
36
|
const ALL_INTERFACES_HOST = "0.0.0.0";
|
|
@@ -57,9 +52,8 @@ function resolveLanTrust(bindHost, extra) {
|
|
|
57
52
|
};
|
|
58
53
|
}
|
|
59
54
|
/** Model-visible orientation and acceptance boundary for sessions created through `dsh web`. */
|
|
60
|
-
function webSurfacePrompt(webUrl
|
|
61
|
-
|
|
62
|
-
return `You are interacting with the user through the DeepSeek Harness Web GUI at ${webUrl}. When the user refers to "this page", "this GUI", or "this app" without naming another target, they mean this GUI. The browser provides no implicit DOM, route, or screenshot context. ` + updateContract + "Starting another server does not update this GUI. The apps/web Vite entry builds the shell but is not a standalone application because only dsh web injects window.__DSH_BOOT__. Do not start a replacement server unless the user asks; if one is needed, use a managed background task and verify its exact URL.";
|
|
55
|
+
function webSurfacePrompt(webUrl) {
|
|
56
|
+
return `You are interacting with the user through the DeepSeek Harness Web GUI at ${webUrl}. When the user refers to "this page", "this GUI", or "this app" without naming another target, they mean this GUI. The browser provides no implicit DOM, route, or screenshot context. The client-plugin HMR receiver is active, but client-plugin changes reload without a refresh only while \`pnpm run dev:web\` is also running from this same checkout to rebuild their bundles; verify that watcher before promising automatic updates. Every other change — the apps/web shell and plain packages — requires rebuilding the affected Web artifacts and verifying this existing URL after a page refresh. Starting another server does not update this GUI. The apps/web Vite entry builds the shell but is not a standalone application because only dsh web injects window.__DSH_BOOT__. Do not start a replacement server unless the user asks; if one is needed, use a managed background task and verify its exact URL.`;
|
|
63
57
|
}
|
|
64
58
|
/** Resolve the canonical loopback URL from the active Web server. */
|
|
65
59
|
function localWebUrl(ctx) {
|
|
@@ -80,14 +74,12 @@ function resolveDistIndex() {
|
|
|
80
74
|
/** Test hook: hosts with no built frontend dist substitute the resolver; production never touches this. */
|
|
81
75
|
const internals = { resolveDistIndex };
|
|
82
76
|
/**
|
|
83
|
-
* Mount the Web runtime: dist serving, surface prompt, bash runtime
|
|
84
|
-
*
|
|
77
|
+
* Mount the Web runtime: dist serving, surface prompt, the bash runtime
|
|
78
|
+
* variable, and the URL line.
|
|
85
79
|
* @param ctx - plugin context carrying the httpServer service.
|
|
86
80
|
* @param config - validated {@link Config}.
|
|
87
|
-
* @returns nothing once the invocation's client roster and runtime contributions are registered.
|
|
88
81
|
*/
|
|
89
|
-
|
|
90
|
-
if (config.mode === "development") await enableRow(ctx, HMR_ROW_ID);
|
|
82
|
+
function apply(ctx, config) {
|
|
91
83
|
const runtime = resolveLanTrust(ctx.httpServer.host, config.trustedHosts);
|
|
92
84
|
ctx.provide(WEB_RUNTIME_SERVICE, runtime);
|
|
93
85
|
ctx.plugin(FrontendStatic, { distIndex: internals.resolveDistIndex() });
|
|
@@ -97,20 +89,14 @@ async function apply(ctx, config) {
|
|
|
97
89
|
promptCtx.systemPrompt.section({
|
|
98
90
|
name: "app:web-surface",
|
|
99
91
|
order: -98,
|
|
100
|
-
text: () => webSurfacePrompt(localWebUrl(promptCtx)
|
|
92
|
+
text: () => webSurfacePrompt(localWebUrl(promptCtx))
|
|
101
93
|
});
|
|
102
94
|
});
|
|
103
95
|
ctx.inject(["bashEnv"], (runtimeCtx) => {
|
|
104
96
|
runtimeCtx.bashEnv.register({
|
|
105
97
|
name: "web-runtime",
|
|
106
|
-
variables: {
|
|
107
|
-
|
|
108
|
-
[DSH_WEB_MODE]: { description: "Web runtime mode: production, or development when the client-plugin HMR receiver is active." }
|
|
109
|
-
},
|
|
110
|
-
resolve: () => ({
|
|
111
|
-
[DSH_WEB_URL]: localWebUrl(runtimeCtx),
|
|
112
|
-
[DSH_WEB_MODE]: config.mode
|
|
113
|
-
})
|
|
98
|
+
variables: { [DSH_WEB_URL]: { description: "Canonical local URL of the DeepSeek Harness Web GUI serving this session." } },
|
|
99
|
+
resolve: () => ({ [DSH_WEB_URL]: localWebUrl(runtimeCtx) })
|
|
114
100
|
});
|
|
115
101
|
});
|
|
116
102
|
}
|
package/lib/startup.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { parseCmdline } from "@deepseek-ai/dsh-cmdline";
|
|
2
1
|
import { Command } from "commander";
|
|
2
|
+
import { parseCmdline } from "@deepseek-ai/dsh-cmdline";
|
|
3
3
|
//#region lib/types/startup.js
|
|
4
4
|
/**
|
|
5
5
|
* The web app's command-line provider: it parses the `dsh --profile web` flag
|
|
6
|
-
* family (`--host`, `--port`, `--
|
|
6
|
+
* family (`--host`, `--port`, `--trusted-host`) and its `--help`
|
|
7
7
|
* text, then provides the immutable values as {@link WEB_STARTUP_SERVICE}.
|
|
8
8
|
* Ordinary rows inject that service before reading it from lazy config.
|
|
9
9
|
* @module @deepseek-ai/dsh-web-app/startup
|
|
@@ -19,12 +19,11 @@ const WEB_STARTUP_SERVICE = "webStartup";
|
|
|
19
19
|
* @returns a fresh program, so one process can parse more than once (tests).
|
|
20
20
|
*/
|
|
21
21
|
function webCommand() {
|
|
22
|
-
return new Command().name("dsh --profile web").description("Serve the DeepSeek Harness browser UI.").helpOption("-h, --help", "show this help").option("--host <host>", "bind host; pass 0.0.0.0 to reach it from another machine").option("--port <port>", "listen port; pass 0 to let the OS pick a free one").option("--
|
|
22
|
+
return new Command().name("dsh --profile web").description("Serve the DeepSeek Harness browser UI.").helpOption("-h, --help", "show this help").option("--host <host>", "bind host; pass 0.0.0.0 to reach it from another machine").option("--port <port>", "listen port; pass 0 to let the OS pick a free one").option("--trusted-host <authority...>", "extra authority the /api browser-trust fence accepts (host or host:port; repeatable)").addHelpText("after", `
|
|
23
23
|
Examples:
|
|
24
24
|
dsh --profile web serve on the composed host and port
|
|
25
25
|
dsh --profile web --port 8080 serve on another port
|
|
26
26
|
dsh --profile web --host 0.0.0.0 reach it from another machine on the LAN
|
|
27
|
-
dsh --profile web --dev mount the client-plugin HMR receiver
|
|
28
27
|
`);
|
|
29
28
|
}
|
|
30
29
|
/**
|
|
@@ -38,7 +37,6 @@ function planWebStartup(program) {
|
|
|
38
37
|
return {
|
|
39
38
|
...options.host !== void 0 && { host: options.host },
|
|
40
39
|
...options.port !== void 0 && { port: Number(options.port) },
|
|
41
|
-
mode: options.dev === true ? "development" : "production",
|
|
42
40
|
trustedHosts: options.trustedHost ?? []
|
|
43
41
|
};
|
|
44
42
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* the built frontend dist (workspace knowledge of this bundle, never user
|
|
6
6
|
* config), mounts the `frontend-static` fallback owner over it, registers the
|
|
7
7
|
* harness-source and web-surface prompt sections, the bash-visible web runtime
|
|
8
|
-
*
|
|
8
|
+
* variable, and the URL line. App command-line values arrive through the
|
|
9
9
|
* `webStartup` service expressions in the bundle patch.
|
|
10
10
|
* @module @deepseek-ai/dsh-web-app
|
|
11
11
|
*/
|
|
@@ -15,18 +15,14 @@ import z from '@deepseek-ai/schemastery';
|
|
|
15
15
|
export declare const name = "web-app";
|
|
16
16
|
/** Services required before the web runtime can mount. */
|
|
17
17
|
export declare const inject: string[];
|
|
18
|
-
/** Web runtime mode: production, or development when the client-plugin HMR receiver is active. */
|
|
19
|
-
export type WebMode = 'production' | 'development';
|
|
20
18
|
/** Plugin config: composed deployment settings plus per-invocation command-line values. */
|
|
21
19
|
export interface Config {
|
|
22
|
-
/** Whether this process mounted the client-plugin HMR receiver (`dsh web --dev`). */
|
|
23
|
-
mode: WebMode;
|
|
24
20
|
/** Print the URL line on activation; a non-interactive layer can turn it off. */
|
|
25
21
|
printUrl: boolean;
|
|
26
22
|
/**
|
|
27
23
|
* Register the model-visible surface context (the `app:web-surface` prompt
|
|
28
|
-
* section and the `DSH_WEB_URL
|
|
29
|
-
*
|
|
24
|
+
* section and the `DSH_WEB_URL` bash variable). A one-shot non-interactive
|
|
25
|
+
* layer can turn it off when its user is not in the GUI, so the
|
|
30
26
|
* orientation text would be false.
|
|
31
27
|
*/
|
|
32
28
|
surfaceContext: boolean;
|
|
@@ -57,11 +53,10 @@ export declare const internals: {
|
|
|
57
53
|
resolveDistIndex: () => string;
|
|
58
54
|
};
|
|
59
55
|
/**
|
|
60
|
-
* Mount the Web runtime: dist serving, surface prompt, bash runtime
|
|
61
|
-
*
|
|
56
|
+
* Mount the Web runtime: dist serving, surface prompt, the bash runtime
|
|
57
|
+
* variable, and the URL line.
|
|
62
58
|
* @param ctx - plugin context carrying the httpServer service.
|
|
63
59
|
* @param config - validated {@link Config}.
|
|
64
|
-
* @returns nothing once the invocation's client roster and runtime contributions are registered.
|
|
65
60
|
*/
|
|
66
|
-
export declare function apply(ctx: Context, config: Config):
|
|
61
|
+
export declare function apply(ctx: Context, config: Config): void;
|
|
67
62
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/types/startup.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The web app's command-line provider: it parses the `dsh --profile web` flag
|
|
3
|
-
* family (`--host`, `--port`, `--
|
|
3
|
+
* family (`--host`, `--port`, `--trusted-host`) and its `--help`
|
|
4
4
|
* text, then provides the immutable values as {@link WEB_STARTUP_SERVICE}.
|
|
5
5
|
* Ordinary rows inject that service before reading it from lazy config.
|
|
6
6
|
* @module @deepseek-ai/dsh-web-app/startup
|
|
@@ -18,8 +18,6 @@ export interface WebStartupValues {
|
|
|
18
18
|
host?: string;
|
|
19
19
|
/** `--port`, absent when the invocation did not name one. */
|
|
20
20
|
port?: number;
|
|
21
|
-
/** Web runtime mode; `--dev` selects development, which also mounts the client-plugin reload chain. */
|
|
22
|
-
mode: 'production' | 'development';
|
|
23
21
|
/** Explicit `--trusted-host` authorities, in argument order. */
|
|
24
22
|
trustedHosts: string[];
|
|
25
23
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-web-app",
|
|
3
3
|
"description": "The dsh browser-surface bundle: the web patch layer over dsh-base plus the runtime glue plugin (frontend dist serving, web-surface prompt, bash runtime variables, URL line)",
|
|
4
|
-
"version": "0.0.1-rc.
|
|
4
|
+
"version": "0.0.1-rc.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "restricted"
|
|
7
7
|
},
|
|
@@ -45,63 +45,67 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"commander": "^15.0.0",
|
|
48
|
-
"@deepseek-ai/dsh-
|
|
49
|
-
"@deepseek-ai/dsh-
|
|
50
|
-
"@deepseek-ai/dsh-
|
|
51
|
-
"@deepseek-ai/dsh-client-hmr": "^0.0.1-rc.
|
|
52
|
-
"@deepseek-ai/dsh-client-locale": "^0.0.1-rc.
|
|
53
|
-
"@deepseek-ai/dsh-client-modules": "^0.0.1-rc.
|
|
54
|
-
"@deepseek-ai/dsh-
|
|
55
|
-
"@deepseek-ai/dsh-client-
|
|
56
|
-
"@deepseek-ai/dsh-client-ui-
|
|
57
|
-
"@deepseek-ai/dsh-client-ui-
|
|
58
|
-
"@deepseek-ai/dsh-client-ui-
|
|
59
|
-
"@deepseek-ai/dsh-client-ui-
|
|
60
|
-
"@deepseek-ai/dsh-client-
|
|
61
|
-
"@deepseek-ai/dsh-client-ui-
|
|
62
|
-
"@deepseek-ai/dsh-client-ui-
|
|
63
|
-
"@deepseek-ai/dsh-client-ui-
|
|
64
|
-
"@deepseek-ai/dsh-client-ui-permission": "^0.0.1-rc.
|
|
65
|
-
"@deepseek-ai/dsh-client-ui-plan": "^0.0.1-rc.
|
|
66
|
-
"@deepseek-ai/dsh-client-ui-
|
|
67
|
-
"@deepseek-ai/dsh-client-ui-
|
|
68
|
-
"@deepseek-ai/dsh-client-ui-
|
|
69
|
-
"@deepseek-ai/dsh-client-ui-
|
|
70
|
-
"@deepseek-ai/dsh-client-ui-
|
|
71
|
-
"@deepseek-ai/dsh-client-ui-
|
|
72
|
-
"@deepseek-ai/dsh-client-ui-slash": "^0.0.1-rc.
|
|
73
|
-
"@deepseek-ai/dsh-client-ui-
|
|
74
|
-
"@deepseek-ai/dsh-client-ui-
|
|
75
|
-
"@deepseek-ai/dsh-client-ui-
|
|
76
|
-
"@deepseek-ai/dsh-client-ui-
|
|
77
|
-
"@deepseek-ai/dsh-
|
|
78
|
-
"@deepseek-ai/dsh-
|
|
79
|
-
"@deepseek-ai/dsh-
|
|
80
|
-
"@deepseek-ai/dsh-
|
|
81
|
-
"@deepseek-ai/dsh-
|
|
82
|
-
"@deepseek-ai/dsh-
|
|
83
|
-
"@deepseek-ai/dsh-
|
|
84
|
-
"@deepseek-ai/dsh-host-
|
|
85
|
-
"@deepseek-ai/dsh-host-
|
|
86
|
-
"@deepseek-ai/dsh-
|
|
87
|
-
"@deepseek-ai/dsh-
|
|
88
|
-
"@deepseek-ai/dsh-
|
|
89
|
-
"@deepseek-ai/dsh-
|
|
90
|
-
"@deepseek-ai/dsh-
|
|
91
|
-
"@deepseek-ai/
|
|
48
|
+
"@deepseek-ai/dsh-agent-presets": "^0.0.1-rc.2",
|
|
49
|
+
"@deepseek-ai/dsh-api-remotes": "^0.0.1-rc.2",
|
|
50
|
+
"@deepseek-ai/dsh-app-boot": "^0.0.1-rc.2",
|
|
51
|
+
"@deepseek-ai/dsh-client-hmr": "^0.0.1-rc.2",
|
|
52
|
+
"@deepseek-ai/dsh-client-locale": "^0.0.1-rc.2",
|
|
53
|
+
"@deepseek-ai/dsh-client-modules": "^0.0.1-rc.2",
|
|
54
|
+
"@deepseek-ai/dsh-client-runtime": "^0.0.1-rc.2",
|
|
55
|
+
"@deepseek-ai/dsh-client-ui-agent-preset": "^0.0.1-rc.2",
|
|
56
|
+
"@deepseek-ai/dsh-client-ui-command": "^0.0.1-rc.2",
|
|
57
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.0.1-rc.2",
|
|
58
|
+
"@deepseek-ai/dsh-client-ui-deliverables": "^0.0.1-rc.2",
|
|
59
|
+
"@deepseek-ai/dsh-client-ui-goal": "^0.0.1-rc.2",
|
|
60
|
+
"@deepseek-ai/dsh-client-connection": "^0.0.1-rc.2",
|
|
61
|
+
"@deepseek-ai/dsh-client-ui-layout": "^0.0.1-rc.2",
|
|
62
|
+
"@deepseek-ai/dsh-client-ui-model": "^0.0.1-rc.2",
|
|
63
|
+
"@deepseek-ai/dsh-client-ui-models": "^0.0.1-rc.2",
|
|
64
|
+
"@deepseek-ai/dsh-client-ui-permission": "^0.0.1-rc.2",
|
|
65
|
+
"@deepseek-ai/dsh-client-ui-plan": "^0.0.1-rc.2",
|
|
66
|
+
"@deepseek-ai/dsh-client-ui-plugin-config": "^0.0.1-rc.2",
|
|
67
|
+
"@deepseek-ai/dsh-client-ui-question": "^0.0.1-rc.2",
|
|
68
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.0.1-rc.2",
|
|
69
|
+
"@deepseek-ai/dsh-client-ui-settings-general": "^0.0.1-rc.2",
|
|
70
|
+
"@deepseek-ai/dsh-client-ui-sidebar": "^0.0.1-rc.2",
|
|
71
|
+
"@deepseek-ai/dsh-client-ui-skill": "^0.0.1-rc.2",
|
|
72
|
+
"@deepseek-ai/dsh-client-ui-slash": "^0.0.1-rc.2",
|
|
73
|
+
"@deepseek-ai/dsh-client-ui-subagent": "^0.0.1-rc.2",
|
|
74
|
+
"@deepseek-ai/dsh-client-ui-task": "^0.0.1-rc.2",
|
|
75
|
+
"@deepseek-ai/dsh-client-ui-theme": "^0.0.1-rc.2",
|
|
76
|
+
"@deepseek-ai/dsh-client-ui-tool": "^0.0.1-rc.2",
|
|
77
|
+
"@deepseek-ai/dsh-client-ui-workflow-run": "^0.0.1-rc.2",
|
|
78
|
+
"@deepseek-ai/dsh-client-ui-trajectory": "^0.0.1-rc.2",
|
|
79
|
+
"@deepseek-ai/dsh-client-ui-workspace": "^0.0.1-rc.2",
|
|
80
|
+
"@deepseek-ai/dsh-cmdline": "^0.0.1-rc.2",
|
|
81
|
+
"@deepseek-ai/dsh-code-runtime-worker": "^0.0.1-rc.2",
|
|
82
|
+
"@deepseek-ai/dsh-frontend": "^0.0.1-rc.2",
|
|
83
|
+
"@deepseek-ai/dsh-frontend-static": "^0.0.1-rc.2",
|
|
84
|
+
"@deepseek-ai/dsh-host-apiproxy": "^0.0.1-rc.2",
|
|
85
|
+
"@deepseek-ai/dsh-host-directory-picker-auto": "^0.0.1-rc.2",
|
|
86
|
+
"@deepseek-ai/dsh-host-directory-picker-browse": "^0.0.1-rc.2",
|
|
87
|
+
"@deepseek-ai/dsh-host-directory-picker-native": "^0.0.1-rc.2",
|
|
88
|
+
"@deepseek-ai/dsh-host-webserver": "^0.0.1-rc.2",
|
|
89
|
+
"@deepseek-ai/dsh-message-feedback": "^0.0.1-rc.2",
|
|
90
|
+
"@deepseek-ai/dsh-session-projection-cache": "^0.0.1-rc.2",
|
|
91
|
+
"@deepseek-ai/dsh-storage": "^0.0.1-rc.2",
|
|
92
|
+
"@deepseek-ai/dsh-storage-json": "^0.0.1-rc.2",
|
|
93
|
+
"@deepseek-ai/dsh-workspace": "^0.0.1-rc.2",
|
|
94
|
+
"@deepseek-ai/schemastery": "^3.18.1-rc.1",
|
|
95
|
+
"@deepseek-ai/dsh-storage-domain": "^0.0.1-rc.2"
|
|
92
96
|
},
|
|
93
97
|
"peerDependencies": {
|
|
94
|
-
"@deepseek-ai/
|
|
95
|
-
"@deepseek-ai/dsh-
|
|
96
|
-
"@deepseek-ai/dsh-
|
|
97
|
-
"@deepseek-ai/
|
|
98
|
-
"@deepseek-ai/cordis
|
|
98
|
+
"@deepseek-ai/cordis-plugin-loader": "^1.0.1-rc.1",
|
|
99
|
+
"@deepseek-ai/dsh-bash-env": "^0.0.1-rc.2",
|
|
100
|
+
"@deepseek-ai/dsh-invariants": "^0.0.1-rc.2",
|
|
101
|
+
"@deepseek-ai/dsh-system-prompt": "^0.0.1-rc.2",
|
|
102
|
+
"@deepseek-ai/cordis": "^4.0.1-rc.1"
|
|
99
103
|
},
|
|
100
104
|
"devDependencies": {
|
|
101
105
|
"@deepseek-ai/cordis-plugin-loader": "^1.0.1-rc.1",
|
|
102
|
-
"@deepseek-ai/dsh-
|
|
103
|
-
"@deepseek-ai/
|
|
104
|
-
"@deepseek-ai/dsh-
|
|
105
|
-
"@deepseek-ai/
|
|
106
|
+
"@deepseek-ai/dsh-system-prompt": "^0.0.1-rc.2",
|
|
107
|
+
"@deepseek-ai/cordis": "^4.0.1-rc.1",
|
|
108
|
+
"@deepseek-ai/dsh-invariants": "^0.0.1-rc.2",
|
|
109
|
+
"@deepseek-ai/dsh-bash-env": "^0.0.1-rc.2"
|
|
106
110
|
}
|
|
107
111
|
}
|