@monotykamary/dsh-web-app 0.1.0-rc.9 → 0.1.0
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 +1 -2
- package/README.zh.md +1 -2
- package/cordis.patch.yml +20 -3
- package/lib/index.js +9 -6
- package/lib/portless.js +32 -0
- package/lib/types/portless.d.ts +21 -0
- package/package.json +90 -81
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: 5d483f25639fcfb8a46906f5657dd98637a13701
|
|
6
|
+
README.zh.md: d2e38df708c17842276435c790006f66c9e72e5c
|
package/README.md
CHANGED
|
@@ -2,8 +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, 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, tailnet, portless}`). That plugin resolves the built frontend dist through `@monotykamary/dsh-web-frontend`'s exports, samples bind-dependent LAN trust once, resolves the enabled remote surfaces after the Loader tree settles (`--tailnet`: the tailscale serve DNS name; `--portless`: the `dsh.localhost` HTTPS alias) and adds their derived host authorities to the `/api` browser-trust fence through `ctx.connection.addTrustedAuthority`, provides the snapshot as `webRuntime` to the 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. The line always leads with the canonical `http://127.0.0.1:<port>` (supervisors parse that prefix) and appends `LAN`, `tailnet`, and `portless` entries as they resolve. 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`, `--tailnet`, `--portless`, and the app's `--help`, then provides `webStartup`. It rejects `--host 0.0.0.0` before publishing that service because the CLI intentionally does not support all-interfaces binding yet. `--tailnet` probes `tailscale serve status` for an HTTPS front of the bound port and `tailscale status` for the node DNS name, then trusts and announces `https://<node>.ts.net`; `--portless`
|
|
6
|
-
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 `{openBrowser, printUrl, surfaceContext, trustedHosts}`). That plugin resolves the built frontend dist through `@monotykamary/dsh-web-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, and registers the harness-source and web-surface prompt sections plus the bash-visible `DSH_WEB_URL` runtime variable when `surfaceContext` is true. After its Loader tree settles, it prints the `dsh web:` URL line when `printUrl` is true and opens the canonical host URL in the default browser when `openBrowser` is true and the inherited `SSH_CONNECTION` and `SSH_TTY` are blank or absent. An SSH launch keeps the URL line but suppresses browser handoff because the SSH client or editor owns the local forwarded address. Immediately before a handoff, the runtime prints `dsh web: opening the default browser; pass --no-open to disable`. A short-lived Node helper runs the maintained platform opener with the canonical scrubbed child environment. On Windows it stays alive until the short-lived PowerShell launcher exits, because `open` reports spawn before that launcher has handed the URL to the shell; elsewhere the helper stops after the opener accepts spawn. A helper failure writes a diagnostic with its reason and the manual URL to stderr without stopping the server, and no path waits for the browser to exit. 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`, `--no-open`, and the app's `--help`, then provides `webStartup`; browser opening defaults on for local launches, and `--no-open` turns it off for this invocation. It rejects `--host 0.0.0.0` before publishing that service because the CLI intentionally does not support all-interfaces binding yet. Flag-configured rows inject the 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.
|
|
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, tailnet, portless}`). That plugin resolves the built frontend dist through `@monotykamary/dsh-web-frontend`'s exports, samples bind-dependent LAN trust once, resolves the enabled remote surfaces after the Loader tree settles (`--tailnet`: the tailscale serve DNS name; `--portless`: the `dsh.localhost` HTTPS alias) and adds their derived host authorities to the `/api` browser-trust fence through `ctx.connection.addTrustedAuthority`, provides the snapshot as `webRuntime` to the 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. The line always leads with the canonical `http://127.0.0.1:<port>` (supervisors parse that prefix) and appends `LAN`, `tailnet`, and `portless` entries as they resolve. 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`, `--tailnet`, `--portless`, and the app's `--help`, then provides `webStartup`. It rejects `--host 0.0.0.0` before publishing that service because the CLI intentionally does not support all-interfaces binding yet. `--tailnet` probes `tailscale serve status` for an HTTPS front of the bound port and `tailscale status` for the node DNS name, then trusts and announces `https://<node>.ts.net`; `--portless` runs the bundled, installation-owned portless CLI to register the `dsh` alias and, while the proxy serves loopback `:443`, trusts and announces `https://dsh.localhost`; `dsh portless setup` explicitly installs and starts its privileged HTTPS service. Tailscale remains an external, operator-managed CLI and daemon. Missing service state, tooling, or an unmatched route logs a warning and leaves that surface off. Flag-configured rows inject the 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. 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 `{openBrowser, printUrl, surfaceContext, trustedHosts}`). That plugin resolves the built frontend dist through `@monotykamary/dsh-web-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, and registers the harness-source and web-surface prompt sections plus the bash-visible `DSH_WEB_URL` runtime variable when `surfaceContext` is true. After its Loader tree settles, it prints the `dsh web:` URL line when `printUrl` is true and hands a URL to the default browser when `openBrowser` is true and the inherited `SSH_CONNECTION` and `SSH_TTY` are blank or absent. A successfully resolved `--portless` launch opens `https://dsh.localhost`; other launches open the canonical host URL. An SSH launch keeps the URL line but suppresses browser handoff because the SSH client or editor owns the local forwarded address. Immediately before a handoff, the runtime prints `dsh web: opening the default browser; pass --no-open to disable`. A short-lived Node helper runs the maintained platform opener with the canonical scrubbed child environment. On Windows it stays alive until the short-lived PowerShell launcher exits, because `open` reports spawn before that launcher has handed the URL to the shell; elsewhere the helper stops after the opener accepts spawn. A helper failure writes a diagnostic with its reason and the manual URL to stderr without stopping the server, and no path waits for the browser to exit. 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`, `--no-open`, and the app's `--help`, then provides `webStartup`; browser opening defaults on for local launches, and `--no-open` turns it off for this invocation. It rejects `--host 0.0.0.0` before publishing that service because the CLI intentionally does not support all-interfaces binding yet. Flag-configured rows inject the 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.
|
|
7
6
|
|
|
8
7
|
## Model retry defaults
|
|
9
8
|
Web uses the shared bounded normal default of five eligible retries after the initial request. The `deepseek-official` route and settings-added pi-ai routes use that default when they omit `retryPolicy`; explicit provider policies still win. Web adds no retry-specific composition override, so the same omission behavior applies to non-Web profiles.
|
package/README.zh.md
CHANGED
|
@@ -2,8 +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、投影缓存、存储)、浏览器插件名录与始终挂载的客户端插件重载链([`dsh-client-hmr`](../../client/hmr/README.md),在重建 watcher 改写客户端 bundle 之前保持空闲),并挂载本包的 `web-runtime` 粘合插件(配置为 `{printUrl, surfaceContext, trustedHosts, tailnet, portless}`)。该插件通过 `@monotykamary/dsh-web-frontend` 的 exports 解析已构建的前端 dist,只采样一次依赖 bind 的 LAN 信任信息,在 Loader 配置树结算后解析已启用的远程表层(`--tailnet`:tailscale serve 的 DNS 名;`--portless`:`dsh.localhost` HTTPS 别名),通过 `ctx.connection.addTrustedAuthority` 把派生出的主机权威加入 `/api` 浏览器信任栅栏,将快照作为 `webRuntime` 提供给栅栏和客户端名录,挂载 [`frontend-static`](../../host/frontend-static/README.md) 回退席位所有者,在 `surfaceContext` 为 true 时注册 Harness 源码与 Web 表层提示词段落,以及 bash 可见的 `DSH_WEB_URL` 运行时变量,并在 `printUrl` 为 true 时等自身的 Loader 配置树结算后再打印 `dsh web:` URL 行,避免兄弟行失败时公告一个已失效的应用。该行始终以规范的 `http://127.0.0.1:<port>` 开头(监控程序解析此前缀),并随解析结果追加 `LAN`、`tailnet`、`portless` 条目。本组合包还持有应用命令行:普通 `web-startup` 提供方([`src/startup.ts`](src/startup.ts))注入 `ctx.cmdlineArgs`([`dsh-cmdline`](../../boot/cmdline/README.md)),解析 `--host`、`--port`、可重复的 `--trusted-host`、`--tailnet`、`--portless` 以及应用自己的 `--help`,再提供 `webStartup`。它会在发布该服务前拒绝 `--host 0.0.0.0`,因为 CLI 目前有意不支持绑定所有网络接口。`--tailnet` 探测 `tailscale serve status` 中绑定端口的 HTTPS 前端,并用 `tailscale status` 取节点 DNS 名,然后信任并公告 `https://<node>.ts.net`;`--portless`
|
|
6
|
-
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` 粘合插件(配置为 `{openBrowser, printUrl, surfaceContext, trustedHosts}`)。该插件通过 `@monotykamary/dsh-web-frontend` 的 exports 解析已构建的前端 dist,只采样一次依赖 bind 的 LAN 信任信息并将其作为 `webRuntime` 提供给浏览器信任栅栏和客户端名录,挂载 [`frontend-static`](../../host/frontend-static/README.md) 回退席位所有者,并在 `surfaceContext` 为 true 时注册 Harness 源码与 Web 表层提示词段落,以及 bash 可见的 `DSH_WEB_URL` 运行时变量。自身 Loader 配置树结算后,它在 `printUrl` 为 true 时打印 `dsh web:` URL 行;`openBrowser` 为 true 且继承的 `SSH_CONNECTION` 与 `SSH_TTY` 均为空或不存在时,才会用默认浏览器打开规范宿主机 URL。SSH 启动仍保留 URL 行,但会跳过浏览器交接,因为本地转发地址由 SSH 客户端或编辑器持有。交接前,运行时会打印英文提示 `dsh web: opening the default browser; pass --no-open to disable`。短生命周期 Node helper 使用规范的脱敏子进程环境运行受维护的平台 opener。在 Windows 上,helper 会保持存活,直至短生命周期的 PowerShell launcher 退出,因为 `open` 会在 launcher 把 URL 交给 shell 之前、仅在 spawn 时返回;其他平台则在 opener 接受 spawn 后结束。helper 失败时会向 stderr 写入包含原因和手动访问 URL 的诊断,不会停止服务器,且任何路径都不会等待浏览器退出。本组合包还持有应用命令行:普通 `web-startup` 提供方([`src/startup.ts`](src/startup.ts))注入 `ctx.cmdlineArgs`([`dsh-cmdline`](../../boot/cmdline/README.md)),解析 `--host`、`--port`、可重复的 `--trusted-host`、`--no-open` 以及应用自己的 `--help`,再提供 `webStartup`;本机启动默认会打开浏览器,`--no-open` 则只对本次调用关闭该行为。它会在发布该服务前拒绝 `--host 0.0.0.0`,因为 CLI 目前有意不支持绑定所有网络接口。由 flag 配置的行会注入该服务,并在惰性配置中直接读取它,因此参数解析完成前不会有任何东西绑定端口,`dsh --profile web --help` 也不会启动服务器。[`dsh-headless`](../headless/README.md) 是同一 base 之上的同级表层,不挂载本组合包。
|
|
5
|
+
dsh 浏览器表层组合包。[`cordis.patch.yml`](cordis.patch.yml) 叠加在 [`dsh-base`](../base/README.zh.md) 之上:设置 coding persona,插入 Web 宿主行(webserver、API 网关、workspace、投影缓存、存储)、浏览器插件名录与始终挂载的客户端插件重载链([`dsh-client-hmr`](../../client/hmr/README.zh.md),在重建 watcher 改写客户端 bundle 之前保持空闲),并挂载本包的 `web-runtime` 粘合插件(配置为 `{printUrl, surfaceContext, trustedHosts, tailnet, portless}`)。该插件通过 `@monotykamary/dsh-web-frontend` 的 exports 解析已构建的前端 dist,只采样一次依赖 bind 的 LAN 信任信息,在 Loader 配置树结算后解析已启用的远程表层(`--tailnet`:tailscale serve 的 DNS 名;`--portless`:`dsh.localhost` HTTPS 别名),通过 `ctx.connection.addTrustedAuthority` 把派生出的主机权威加入 `/api` 浏览器信任栅栏,将快照作为 `webRuntime` 提供给栅栏和客户端名录,挂载 [`frontend-static`](../../host/frontend-static/README.zh.md) 回退席位所有者,在 `surfaceContext` 为 true 时注册 Harness 源码与 Web 表层提示词段落,以及 bash 可见的 `DSH_WEB_URL` 运行时变量,并在 `printUrl` 为 true 时等自身的 Loader 配置树结算后再打印 `dsh web:` URL 行,避免兄弟行失败时公告一个已失效的应用。该行始终以规范的 `http://127.0.0.1:<port>` 开头(监控程序解析此前缀),并随解析结果追加 `LAN`、`tailnet`、`portless` 条目。本组合包还持有应用命令行:普通 `web-startup` 提供方([`src/startup.ts`](src/startup.ts))注入 `ctx.cmdlineArgs`([`dsh-cmdline`](../../boot/cmdline/README.zh.md)),解析 `--host`、`--port`、可重复的 `--trusted-host`、`--tailnet`、`--portless` 以及应用自己的 `--help`,再提供 `webStartup`。它会在发布该服务前拒绝 `--host 0.0.0.0`,因为 CLI 目前有意不支持绑定所有网络接口。`--tailnet` 探测 `tailscale serve status` 中绑定端口的 HTTPS 前端,并用 `tailscale status` 取节点 DNS 名,然后信任并公告 `https://<node>.ts.net`;`--portless` 运行随安装提供的 portless CLI 来注册 `dsh` 别名,并在代理于回环 `:443` 上服务时信任并公告 `https://dsh.localhost`;`dsh portless setup` 会明确安装并启动需要权限的 HTTPS 服务。Tailscale 仍是由操作员管理的外部 CLI 与守护进程。服务状态或工具缺失、路由不匹配时会在启动日志打印警告并保持该表层关闭。由 flag 配置的行会注入该服务,并在惰性配置中直接读取它,因此参数解析完成前不会有任何东西绑定端口,`dsh --profile web --help` 也不会启动服务器。[`dsh-headless`](../headless/README.zh.md) 是同一 base 之上的同级表层,不挂载本组合包。 dsh 浏览器表层组合包。[`cordis.patch.yml`](cordis.patch.yml) 叠加在 [`dsh-base`](../base/README.zh.md) 之上:设置 coding persona,插入 Web 宿主行(webserver、API 网关、workspace、投影缓存、存储)、浏览器插件名录与始终挂载的客户端插件重载链([`dsh-client-hmr`](../../client/hmr/README.zh.md),在重建 watcher 改写客户端 bundle 之前保持空闲),并挂载本包的 `web-runtime` 粘合插件(配置为 `{openBrowser, printUrl, surfaceContext, trustedHosts}`)。该插件通过 `@monotykamary/dsh-web-frontend` 的 exports 解析已构建的前端 dist,只采样一次依赖 bind 的 LAN 信任信息并将其作为 `webRuntime` 提供给浏览器信任栅栏和客户端名录,挂载 [`frontend-static`](../../host/frontend-static/README.zh.md) 回退席位所有者,并在 `surfaceContext` 为 true 时注册 Harness 源码与 Web 表层提示词段落,以及 bash 可见的 `DSH_WEB_URL` 运行时变量。自身 Loader 配置树结算后,它在 `printUrl` 为 true 时打印 `dsh web:` URL 行;`openBrowser` 为 true 且继承的 `SSH_CONNECTION` 与 `SSH_TTY` 均为空或不存在时,才会把 URL 交给默认浏览器。成功解析 `--portless` 时会打开 `https://dsh.localhost`,其他启动则打开规范宿主机 URL。SSH 启动仍保留 URL 行,但会跳过浏览器交接,因为本地转发地址由 SSH 客户端或编辑器持有。交接前,运行时会打印英文提示 `dsh web: opening the default browser; pass --no-open to disable`。短生命周期 Node helper 使用规范的脱敏子进程环境运行受维护的平台 opener。在 Windows 上,helper 会保持存活,直至短生命周期的 PowerShell launcher 退出,因为 `open` 会在 launcher 把 URL 交给 shell 之前、仅在 spawn 时返回;其他平台则在 opener 接受 spawn 后结束。helper 失败时会向 stderr 写入包含原因和手动访问 URL 的诊断,不会停止服务器,且任何路径都不会等待浏览器退出。本组合包还持有应用命令行:普通 `web-startup` 提供方([`src/startup.ts`](src/startup.ts))注入 `ctx.cmdlineArgs`([`dsh-cmdline`](../../boot/cmdline/README.zh.md)),解析 `--host`、`--port`、可重复的 `--trusted-host`、`--no-open` 以及应用自己的 `--help`,再提供 `webStartup`;本机启动默认会打开浏览器,`--no-open` 则只对本次调用关闭该行为。它会在发布该服务前拒绝 `--host 0.0.0.0`,因为 CLI 目前有意不支持绑定所有网络接口。由 flag 配置的行会注入该服务,并在惰性配置中直接读取它,因此参数解析完成前不会有任何东西绑定端口,`dsh --profile web --help` 也不会启动服务器。[`dsh-headless`](../headless/README.zh.md) 是同一 base 之上的同级表层,不挂载本组合包。
|
|
7
6
|
|
|
8
7
|
## 模型重试默认值
|
|
9
8
|
Web 使用共享的有界 normal 默认值,在首次请求后最多再重试五次符合条件的失败。`deepseek-official` 与由 settings 新增的 pi-ai 路由在省略 `retryPolicy` 时使用该默认值;显式提供方策略仍然优先。Web 不再增加重试专用的组合覆盖,因此非 Web profile 的省略行为与之相同。
|
package/cordis.patch.yml
CHANGED
|
@@ -99,6 +99,13 @@
|
|
|
99
99
|
- id: plugin-inventory
|
|
100
100
|
name: '@monotykamary/dsh-host-plugin-inventory'
|
|
101
101
|
|
|
102
|
+
# Cached registry checks and channel-aware detached updates. The launcher
|
|
103
|
+
# replaces appManifest with its installation anchor before composition.
|
|
104
|
+
- id: distribution-update
|
|
105
|
+
name: '@monotykamary/dsh-distribution-update'
|
|
106
|
+
config:
|
|
107
|
+
appManifest: package.json
|
|
108
|
+
|
|
102
109
|
# Session-authorized file tree, bounded reads, and guarded edits over each Agent's selected fs provider.
|
|
103
110
|
- id: workspace-files
|
|
104
111
|
name: '@monotykamary/dsh-host-workspace-files'
|
|
@@ -209,6 +216,9 @@
|
|
|
209
216
|
- id: ui-layout
|
|
210
217
|
name: '@monotykamary/dsh-client-ui-layout'
|
|
211
218
|
|
|
219
|
+
- id: ui-renderer
|
|
220
|
+
name: '@monotykamary/dsh-client-ui-renderer'
|
|
221
|
+
|
|
212
222
|
- id: ui-workbench
|
|
213
223
|
name: '@monotykamary/dsh-client-ui-workbench'
|
|
214
224
|
|
|
@@ -221,9 +231,6 @@
|
|
|
221
231
|
- id: ui-command-palette
|
|
222
232
|
name: '@monotykamary/dsh-client-ui-command-palette'
|
|
223
233
|
|
|
224
|
-
- id: ui-renderer
|
|
225
|
-
name: '@monotykamary/dsh-client-ui-renderer'
|
|
226
|
-
|
|
227
234
|
- id: ui-sidebar
|
|
228
235
|
name: '@monotykamary/dsh-client-ui-sidebar'
|
|
229
236
|
|
|
@@ -239,6 +246,9 @@
|
|
|
239
246
|
- id: ui-settings-plugin-inventory
|
|
240
247
|
name: '@monotykamary/dsh-client-ui-settings-plugin-inventory'
|
|
241
248
|
|
|
249
|
+
- id: ui-settings-updates
|
|
250
|
+
name: '@monotykamary/dsh-client-ui-settings-updates'
|
|
251
|
+
|
|
242
252
|
- id: ui-conversation
|
|
243
253
|
name: '@monotykamary/dsh-client-ui-conversation'
|
|
244
254
|
|
|
@@ -266,6 +276,13 @@
|
|
|
266
276
|
- id: ui-deliverables
|
|
267
277
|
name: '@monotykamary/dsh-client-ui-deliverables'
|
|
268
278
|
|
|
279
|
+
# Bounded current-Session receipt reader paired with the Web Changes UI.
|
|
280
|
+
- id: tool-session-mutations
|
|
281
|
+
name: '@monotykamary/dsh-tool-session-mutations'
|
|
282
|
+
config:
|
|
283
|
+
maxListItems: 50
|
|
284
|
+
maxDiffChars: 12000
|
|
285
|
+
|
|
269
286
|
|
|
270
287
|
- id: ui-workspace
|
|
271
288
|
name: '@monotykamary/dsh-client-ui-workspace'
|
package/lib/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { portlessCliPath } from "./portless.js";
|
|
1
2
|
import { createRequire } from "node:module";
|
|
2
3
|
import { execFile, spawn } from "node:child_process";
|
|
3
4
|
import { networkInterfaces } from "node:os";
|
|
@@ -131,17 +132,18 @@ async function resolveTailnetSurface(port, exec) {
|
|
|
131
132
|
*/
|
|
132
133
|
async function resolvePortlessSurface(port, exec, probe) {
|
|
133
134
|
try {
|
|
134
|
-
await exec(
|
|
135
|
+
await exec(process.execPath, [
|
|
136
|
+
portlessCliPath(),
|
|
135
137
|
"alias",
|
|
136
138
|
PORTLESS_ALIAS_NAME,
|
|
137
139
|
String(port),
|
|
138
140
|
"--force"
|
|
139
141
|
]);
|
|
140
142
|
} catch (error) {
|
|
141
|
-
if (isEnoent(error)) return { warning: "portless
|
|
143
|
+
if (isEnoent(error)) return { warning: "bundled portless CLI is unavailable — reinstall DSH, then run `dsh portless setup`" };
|
|
142
144
|
return { warning: `portless alias registration failed: ${errorText(error)}` };
|
|
143
145
|
}
|
|
144
|
-
if (!(await Promise.all([probe("127.0.0.1", PORTLESS_PROXY_PORT), probe("::1", PORTLESS_PROXY_PORT)])).some(Boolean)) return { warning: "portless proxy not running on :443 — run `portless
|
|
146
|
+
if (!(await Promise.all([probe("127.0.0.1", PORTLESS_PROXY_PORT), probe("::1", PORTLESS_PROXY_PORT)])).some(Boolean)) return { warning: "portless proxy not running on :443 — run `dsh portless setup` for named localhost URLs" };
|
|
145
147
|
return { surface: {
|
|
146
148
|
url: `https://${PORTLESS_ALIAS_NAME}.localhost`,
|
|
147
149
|
authority: `${PORTLESS_ALIAS_NAME}.localhost`
|
|
@@ -412,15 +414,16 @@ function apply(ctx, config) {
|
|
|
412
414
|
const settled = ctx.get("loader")?.await();
|
|
413
415
|
const afterSettlement = async () => {
|
|
414
416
|
if (ctx.get("webServer") === void 0) return;
|
|
415
|
-
const
|
|
417
|
+
const localUrl = localWebUrl(ctx);
|
|
416
418
|
const resolution = await settleSurfaces(ctx, config);
|
|
417
419
|
for (const warning of resolution.warnings) ctx.logger.warn(warning);
|
|
418
420
|
if (config.printUrl) printUrl(ctx, runtime, resolution);
|
|
419
421
|
if (handoffBrowser) {
|
|
422
|
+
const browserUrl = resolution.portless?.url ?? localUrl;
|
|
420
423
|
console.log("dsh web: opening the default browser; pass --no-open to disable");
|
|
421
|
-
internals.openBrowser(
|
|
424
|
+
internals.openBrowser(browserUrl).catch((error) => {
|
|
422
425
|
const reason = error instanceof Error ? error.message : String(error);
|
|
423
|
-
console.error(`web-app: could not open the default browser because ${reason}; visit ${
|
|
426
|
+
console.error(`web-app: could not open the default browser because ${reason}; visit ${browserUrl} manually`);
|
|
424
427
|
});
|
|
425
428
|
}
|
|
426
429
|
};
|
package/lib/portless.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { spawnSync } from "node:child_process";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
//#region lib/types/portless.js
|
|
5
|
+
/** Installation-owned portless CLI resolution and explicit service provisioning. */
|
|
6
|
+
/**
|
|
7
|
+
* Resolve the portless CLI bundled with this Web app package.
|
|
8
|
+
* @returns its absolute JavaScript entry path.
|
|
9
|
+
*/
|
|
10
|
+
function portlessCliPath() {
|
|
11
|
+
return join(dirname(fileURLToPath(import.meta.resolve("portless"))), "cli.js");
|
|
12
|
+
}
|
|
13
|
+
/** Test hook for the child-process boundary; production never mutates it. */
|
|
14
|
+
const internals = { spawn: spawnSync };
|
|
15
|
+
/**
|
|
16
|
+
* Run the installation-owned portless CLI with inherited interactive stdio.
|
|
17
|
+
* @param args - portless arguments after the executable name.
|
|
18
|
+
* @returns the child exit code, normalized to one for spawn or signal failure.
|
|
19
|
+
*/
|
|
20
|
+
function runPortlessCli(args) {
|
|
21
|
+
const result = internals.spawn(process.execPath, [portlessCliPath(), ...args], {
|
|
22
|
+
stdio: "inherit",
|
|
23
|
+
env: process.env
|
|
24
|
+
});
|
|
25
|
+
if (result.error !== void 0) {
|
|
26
|
+
process.stderr.write(`dsh: could not start the bundled portless CLI: ${result.error.message}\n`);
|
|
27
|
+
return 1;
|
|
28
|
+
}
|
|
29
|
+
return result.status ?? 1;
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { internals, portlessCliPath, runPortlessCli };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** Installation-owned portless CLI resolution and explicit service provisioning. */
|
|
2
|
+
import { type SpawnSyncReturns } from 'node:child_process';
|
|
3
|
+
/**
|
|
4
|
+
* Resolve the portless CLI bundled with this Web app package.
|
|
5
|
+
* @returns its absolute JavaScript entry path.
|
|
6
|
+
*/
|
|
7
|
+
export declare function portlessCliPath(): string;
|
|
8
|
+
/** Test hook for the child-process boundary; production never mutates it. */
|
|
9
|
+
export declare const internals: {
|
|
10
|
+
spawn: (command: string, args: readonly string[], options: {
|
|
11
|
+
stdio: 'inherit';
|
|
12
|
+
env: NodeJS.ProcessEnv;
|
|
13
|
+
}) => SpawnSyncReturns<Buffer>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Run the installation-owned portless CLI with inherited interactive stdio.
|
|
17
|
+
* @param args - portless arguments after the executable name.
|
|
18
|
+
* @returns the child exit code, normalized to one for spawn or signal failure.
|
|
19
|
+
*/
|
|
20
|
+
export declare function runPortlessCli(args: readonly string[]): number;
|
|
21
|
+
//# sourceMappingURL=portless.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monotykamary/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.1.0
|
|
4
|
+
"version": "0.1.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
"types": "./lib/types/startup.d.ts",
|
|
23
23
|
"default": "./lib/startup.js"
|
|
24
24
|
},
|
|
25
|
+
"./portless": {
|
|
26
|
+
"types": "./lib/types/portless.d.ts",
|
|
27
|
+
"default": "./lib/portless.js"
|
|
28
|
+
},
|
|
25
29
|
"./invariant": {
|
|
26
30
|
"types": "./lib/types/invariant.d.ts",
|
|
27
31
|
"default": "./lib/invariant.js"
|
|
@@ -35,6 +39,7 @@
|
|
|
35
39
|
"lib/invariant.js",
|
|
36
40
|
"lib/startup.js",
|
|
37
41
|
"cordis.patch.yml",
|
|
42
|
+
"lib/portless.js",
|
|
38
43
|
"lib/types/**/*.d.ts"
|
|
39
44
|
],
|
|
40
45
|
"license": "MIT",
|
|
@@ -46,94 +51,98 @@
|
|
|
46
51
|
"dependencies": {
|
|
47
52
|
"commander": "^15.0.0",
|
|
48
53
|
"open": "^11.0.0",
|
|
49
|
-
"
|
|
50
|
-
"@monotykamary/dsh-
|
|
51
|
-
"@monotykamary/dsh-client-
|
|
52
|
-
"@monotykamary/dsh-
|
|
53
|
-
"@monotykamary/dsh-
|
|
54
|
-
"@monotykamary/dsh-client-
|
|
55
|
-
"@monotykamary/dsh-client-
|
|
56
|
-
"@monotykamary/dsh-
|
|
57
|
-
"@monotykamary/dsh-client-ui-
|
|
58
|
-
"@monotykamary/dsh-client-ui-
|
|
59
|
-
"@monotykamary/dsh-client-
|
|
60
|
-
"@monotykamary/dsh-client-
|
|
61
|
-
"@monotykamary/dsh-client-ui-
|
|
62
|
-
"@monotykamary/dsh-client-ui-
|
|
63
|
-
"@monotykamary/dsh-client-ui-
|
|
64
|
-
"@monotykamary/dsh-client-ui-
|
|
65
|
-
"@monotykamary/dsh-client-ui-
|
|
66
|
-
"@monotykamary/dsh-client-ui-
|
|
67
|
-
"@monotykamary/dsh-client-ui-
|
|
68
|
-
"@monotykamary/dsh-client-ui-
|
|
69
|
-
"@monotykamary/dsh-client-ui-
|
|
70
|
-
"@monotykamary/dsh-client-ui-
|
|
71
|
-
"@monotykamary/dsh-client-ui-
|
|
72
|
-
"@monotykamary/dsh-client-ui-
|
|
73
|
-
"@monotykamary/dsh-client-ui-settings-
|
|
74
|
-
"@monotykamary/dsh-client-ui-
|
|
75
|
-
"@monotykamary/dsh-client-ui-
|
|
76
|
-
"@monotykamary/dsh-client-ui-
|
|
77
|
-
"@monotykamary/dsh-client-ui-
|
|
78
|
-
"@monotykamary/dsh-client-ui-
|
|
79
|
-
"@monotykamary/dsh-client-ui-
|
|
80
|
-
"@monotykamary/dsh-client-ui-
|
|
81
|
-
"@monotykamary/dsh-client-ui-
|
|
82
|
-
"@monotykamary/dsh-client-ui-
|
|
83
|
-
"@monotykamary/dsh-client-ui-
|
|
84
|
-
"@monotykamary/dsh-client-ui-
|
|
85
|
-
"@monotykamary/dsh-client-ui-
|
|
86
|
-
"@monotykamary/dsh-client-ui-
|
|
87
|
-
"@monotykamary/dsh-
|
|
88
|
-
"@monotykamary/dsh-
|
|
89
|
-
"@monotykamary/dsh-client-ui-
|
|
90
|
-
"@monotykamary/dsh-
|
|
91
|
-
"@monotykamary/dsh-
|
|
92
|
-
"@monotykamary/dsh-
|
|
93
|
-
"@monotykamary/dsh-cordis-
|
|
94
|
-
"@monotykamary/dsh-host-frontend-static": "^0.1.0
|
|
95
|
-
"@monotykamary/dsh-
|
|
96
|
-
"@monotykamary/dsh-host-
|
|
97
|
-
"@monotykamary/dsh-host-directory-picker-
|
|
98
|
-
"@monotykamary/dsh-host-apiproxy": "^0.1.0
|
|
99
|
-
"@monotykamary/dsh-
|
|
100
|
-
"@monotykamary/dsh-
|
|
101
|
-
"@monotykamary/dsh-
|
|
102
|
-
"@monotykamary/dsh-
|
|
103
|
-
"@monotykamary/dsh-
|
|
104
|
-
"@monotykamary/dsh-
|
|
105
|
-
"@monotykamary/dsh-
|
|
106
|
-
"@monotykamary/dsh-
|
|
107
|
-
"@monotykamary/dsh-
|
|
108
|
-
"@monotykamary/dsh-
|
|
109
|
-
"@monotykamary/dsh-session-
|
|
110
|
-
"@monotykamary/dsh-session-
|
|
111
|
-
"@monotykamary/dsh-storage-domain": "^0.1.0
|
|
54
|
+
"portless": "0.13.0",
|
|
55
|
+
"@monotykamary/dsh-agent-presets": "^0.1.0",
|
|
56
|
+
"@monotykamary/dsh-client-connection": "^0.1.0",
|
|
57
|
+
"@monotykamary/dsh-app-boot": "^0.1.0",
|
|
58
|
+
"@monotykamary/dsh-api-remotes": "^0.1.0",
|
|
59
|
+
"@monotykamary/dsh-client-locale": "^0.1.0",
|
|
60
|
+
"@monotykamary/dsh-client-hmr": "^0.1.0",
|
|
61
|
+
"@monotykamary/dsh-client-modules": "^0.1.0",
|
|
62
|
+
"@monotykamary/dsh-client-ui-renderer": "^0.1.0",
|
|
63
|
+
"@monotykamary/dsh-client-ui-attachment": "^0.1.0",
|
|
64
|
+
"@monotykamary/dsh-client-ui-brand-official": "^0.1.0",
|
|
65
|
+
"@monotykamary/dsh-client-runtime": "^0.1.0",
|
|
66
|
+
"@monotykamary/dsh-client-ui-commands": "^0.1.0",
|
|
67
|
+
"@monotykamary/dsh-client-ui-cordis": "^0.1.0",
|
|
68
|
+
"@monotykamary/dsh-client-ui-deliverables": "^0.1.0",
|
|
69
|
+
"@monotykamary/dsh-client-ui-conversation": "^0.1.0",
|
|
70
|
+
"@monotykamary/dsh-client-ui-agent-preset": "^0.1.0",
|
|
71
|
+
"@monotykamary/dsh-client-ui-directory-picker-browse": "^0.1.0",
|
|
72
|
+
"@monotykamary/dsh-client-ui-directory-picker-native": "^0.1.0",
|
|
73
|
+
"@monotykamary/dsh-client-ui-message-feedback": "^0.1.0",
|
|
74
|
+
"@monotykamary/dsh-client-ui-layout": "^0.1.0",
|
|
75
|
+
"@monotykamary/dsh-client-ui-goal": "^0.1.0",
|
|
76
|
+
"@monotykamary/dsh-client-ui-model-selection": "^0.1.0",
|
|
77
|
+
"@monotykamary/dsh-client-ui-settings-models": "^0.1.0",
|
|
78
|
+
"@monotykamary/dsh-client-ui-settings-plugin-inventory": "^0.1.0",
|
|
79
|
+
"@monotykamary/dsh-client-ui-plan": "^0.1.0",
|
|
80
|
+
"@monotykamary/dsh-client-ui-permission-presets": "^0.1.0",
|
|
81
|
+
"@monotykamary/dsh-client-ui-user-questions": "^0.1.0",
|
|
82
|
+
"@monotykamary/dsh-client-ui-settings-plugins": "^0.1.0",
|
|
83
|
+
"@monotykamary/dsh-client-ui-settings": "^0.1.0",
|
|
84
|
+
"@monotykamary/dsh-client-ui-settings-general": "^0.1.0",
|
|
85
|
+
"@monotykamary/dsh-client-ui-sidebar": "^0.1.0",
|
|
86
|
+
"@monotykamary/dsh-client-ui-skill": "^0.1.0",
|
|
87
|
+
"@monotykamary/dsh-client-ui-input-trigger": "^0.1.0",
|
|
88
|
+
"@monotykamary/dsh-client-ui-subagent": "^0.1.0",
|
|
89
|
+
"@monotykamary/dsh-client-ui-jobs": "^0.1.0",
|
|
90
|
+
"@monotykamary/dsh-client-ui-theme": "^0.1.0",
|
|
91
|
+
"@monotykamary/dsh-client-ui-reference": "^0.1.0",
|
|
92
|
+
"@monotykamary/dsh-client-ui-workflow-run": "^0.1.0",
|
|
93
|
+
"@monotykamary/dsh-client-ui-trajectory": "^0.1.0",
|
|
94
|
+
"@monotykamary/dsh-client-ui-workspace": "^0.1.0",
|
|
95
|
+
"@monotykamary/dsh-code-runtime-worker-thread": "^0.1.0",
|
|
96
|
+
"@monotykamary/dsh-cmdline": "^0.1.0",
|
|
97
|
+
"@monotykamary/dsh-cordis-client-runner": "^0.1.0",
|
|
98
|
+
"@monotykamary/dsh-cordis-host-runner": "^0.1.0",
|
|
99
|
+
"@monotykamary/dsh-host-frontend-static": "^0.1.0",
|
|
100
|
+
"@monotykamary/dsh-web-frontend": "^0.1.0",
|
|
101
|
+
"@monotykamary/dsh-host-directory-picker-auto": "^0.1.0",
|
|
102
|
+
"@monotykamary/dsh-host-directory-picker-browse": "^0.1.0",
|
|
103
|
+
"@monotykamary/dsh-host-apiproxy": "^0.1.0",
|
|
104
|
+
"@monotykamary/dsh-host-directory-picker-native": "^0.1.0",
|
|
105
|
+
"@monotykamary/dsh-client-ui-tool": "^0.1.0",
|
|
106
|
+
"@monotykamary/dsh-host-plugin-inventory": "^0.1.0",
|
|
107
|
+
"@monotykamary/dsh-host-webserver": "^0.1.0",
|
|
108
|
+
"@monotykamary/dsh-file-reference-local": "^0.1.0",
|
|
109
|
+
"@monotykamary/dsh-file-reference": "^0.1.0",
|
|
110
|
+
"@monotykamary/dsh-launch-environment": "^0.1.0",
|
|
111
|
+
"@monotykamary/dsh-message-feedback": "^0.1.0",
|
|
112
|
+
"@monotykamary/dsh-session-reference": "^0.1.0",
|
|
113
|
+
"@monotykamary/dsh-session-projection-cache": "^0.1.0",
|
|
114
|
+
"@monotykamary/dsh-session-log-export": "^0.1.0",
|
|
115
|
+
"@monotykamary/dsh-tool-session-mutations": "^0.1.0",
|
|
116
|
+
"@monotykamary/dsh-storage-domain": "^0.1.0",
|
|
117
|
+
"@monotykamary/dsh-session-stats": "^0.1.0",
|
|
118
|
+
"@monotykamary/dsh-storage-json": "^0.1.0",
|
|
119
|
+
"@monotykamary/dsh-storage": "^0.1.0",
|
|
120
|
+
"@monotykamary/dsh-subprocess": "^0.1.0",
|
|
121
|
+
"@monotykamary/dsh-client-ui-command-palette": "^0.1.0",
|
|
122
|
+
"@monotykamary/dsh-client-ui-workbench": "^0.1.0",
|
|
123
|
+
"@monotykamary/dsh-workspace": "^0.1.0",
|
|
124
|
+
"@monotykamary/dsh-client-ui-files": "^0.1.0",
|
|
125
|
+
"@monotykamary/dsh-client-ui-terminal": "^0.1.0",
|
|
112
126
|
"@monotykamary/schemastery": "^3.18.1",
|
|
113
|
-
"@monotykamary/dsh-
|
|
114
|
-
"@monotykamary/dsh-
|
|
115
|
-
"@monotykamary/dsh-
|
|
116
|
-
"@monotykamary/dsh-web-identity": "^0.1.0
|
|
117
|
-
"@monotykamary/dsh-client-ui-
|
|
118
|
-
"@monotykamary/dsh-
|
|
119
|
-
"@monotykamary/dsh-terminal-web": "^0.1.0-rc.9",
|
|
120
|
-
"@monotykamary/dsh-client-ui-files": "^0.1.0-rc.9",
|
|
121
|
-
"@monotykamary/dsh-subprocess": "^0.1.0-rc.9",
|
|
122
|
-
"@monotykamary/dsh-host-workspace-files": "^0.1.0-rc.9",
|
|
123
|
-
"@monotykamary/dsh-workspace": "^0.1.0-rc.9"
|
|
127
|
+
"@monotykamary/dsh-client-ui-session-title": "^0.1.0",
|
|
128
|
+
"@monotykamary/dsh-host-workspace-files": "^0.1.0",
|
|
129
|
+
"@monotykamary/dsh-terminal-web": "^0.1.0",
|
|
130
|
+
"@monotykamary/dsh-web-identity": "^0.1.0",
|
|
131
|
+
"@monotykamary/dsh-client-ui-settings-updates": "^0.1.0",
|
|
132
|
+
"@monotykamary/dsh-distribution-update": "^0.1.0"
|
|
124
133
|
},
|
|
125
134
|
"peerDependencies": {
|
|
126
|
-
"@monotykamary/dsh-invariants": "^0.1.0-rc.9",
|
|
127
135
|
"@monotykamary/cordis-plugin-loader": "^1.0.2",
|
|
136
|
+
"@monotykamary/dsh-shell-env": "^0.1.0",
|
|
137
|
+
"@monotykamary/dsh-system-prompt": "^0.1.0",
|
|
128
138
|
"@monotykamary/cordis": "^4.0.1",
|
|
129
|
-
"@monotykamary/dsh-
|
|
130
|
-
"@monotykamary/dsh-shell-env": "^0.1.0-rc.9"
|
|
139
|
+
"@monotykamary/dsh-invariants": "^0.1.0"
|
|
131
140
|
},
|
|
132
141
|
"devDependencies": {
|
|
133
142
|
"@monotykamary/cordis-plugin-loader": "^1.0.2",
|
|
134
|
-
"@monotykamary/dsh-invariants": "^0.1.0
|
|
143
|
+
"@monotykamary/dsh-invariants": "^0.1.0",
|
|
144
|
+
"@monotykamary/dsh-system-prompt": "^0.1.0",
|
|
135
145
|
"@monotykamary/cordis": "^4.0.1",
|
|
136
|
-
"@monotykamary/dsh-
|
|
137
|
-
"@monotykamary/dsh-shell-env": "^0.1.0-rc.9"
|
|
146
|
+
"@monotykamary/dsh-shell-env": "^0.1.0"
|
|
138
147
|
}
|
|
139
148
|
}
|