{"_id":"@az7627/dsh-mobile-remote","_rev":"2-2be949d51e209a4a1229ee436041207b","name":"@az7627/dsh-mobile-remote","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@az7627/dsh-mobile-remote","version":"0.1.0","license":"MIT","_id":"@az7627/dsh-mobile-remote@0.1.0","maintainers":[{"name":"az7627","email":"a233d@outlook.com"}],"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-layout","@deepseek-ai/dsh-client-ui-primitives","@deepseek-ai/dsh-client-ui-settings"],"platform":"web"}},"dist":{"shasum":"44b49df299fc771ec5854c88236b8e855a1b9b52","tarball":"https://registry.npmjs.org/@az7627/dsh-mobile-remote/-/dsh-mobile-remote-0.1.0.tgz","fileCount":107,"integrity":"sha512-1kwfSd40g4J558Dxr3bREBwIh6s/N+MdR1ewiZ8oMCDyyk79UNAYMww4xi30wkA+yYIjGMStiPCMSUepYqlBbg==","signatures":[{"sig":"MEQCIAc+R4cJRDKa4QskQfZ2/eydTeza/1zgKYVxBd7NlxgAAiA9VpVxwsfpKHkvyEKY/9dsvlRCp8UMDcCCRbOCrC30QQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2377536},"main":"lib/index.js","pnpm":{"autoInstallPeers":false},"type":"module","types":"lib/types/index.d.ts","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./package.json":"./package.json"},"gitHead":"dd2a9c82f3af0371a23aa90c7950211454452176","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json && tsdown","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"az7627","email":"a233d@outlook.com"},"_npmVersion":"11.13.0","description":"Mobile responsive shell (single-column layout, drawer sidebar, overlay details) and WireGuard remote enhancements for the DeepSeek Harness web GUI","directories":{},"_nodeVersion":"24.16.0","dependencies":{"zod":"^4.4.3","node-pty":"~1.1.0","@xterm/xterm":"^5.5.0","@xterm/addon-fit":"^0.10.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^29.0.0","react":"^18.2.0","tsdown":"^0.22.2","vitest":"^4.1.0","react-dom":"^18.2.0","typescript":"^6.0.0","@types/node":"^24.0.0","@types/react":"~18.3.1","lightningcss":"^1.30.0","@types/react-dom":"~18.3.0","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0","@deepseek-ai/cordis":"*","@deepseek-ai/dsh-client-locale":"*","@deepseek-ai/dsh-client-runtime":"*","@deepseek-ai/dsh-client-ui-slots":"*","@deepseek-ai/dsh-client-ui-layout":"*","@deepseek-ai/dsh-client-connection":"*","@deepseek-ai/dsh-client-ui-settings":"*","@deepseek-ai/dsh-client-ui-primitives":"*"},"_npmOperationalInternal":{"tmp":"tmp/dsh-mobile-remote_0.1.0_1786896126850_0.32094563097431483","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@az7627/dsh-mobile-remote","version":"0.1.1","description":"Mobile responsive shell (single-column layout, drawer sidebar, overlay details) and WireGuard remote enhancements for the DeepSeek Harness web GUI","type":"module","main":"lib/index.js","types":"lib/types/index.d.ts","repository":{"type":"git","url":"git+https://github.com/az7627/dsh-mobile-remote.git"},"publishConfig":{"access":"public"},"exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./package.json":"./package.json"},"scripts":{"build":"tsc -p tsconfig.json && tsdown","typecheck":"tsc -p tsconfig.json --noEmit","test":"vitest run"},"license":"MIT","dependencies":{"@xterm/addon-fit":"^0.10.0","@xterm/xterm":"^5.5.0","node-pty":"~1.1.0","zod":"^4.4.3"},"pnpm":{"autoInstallPeers":false},"peerDependencies":{"@deepseek-ai/cordis":"*","@deepseek-ai/dsh-client-connection":"*","@deepseek-ai/dsh-client-locale":"*","@deepseek-ai/dsh-client-runtime":"*","@deepseek-ai/dsh-client-ui-layout":"*","@deepseek-ai/dsh-client-ui-primitives":"*","@deepseek-ai/dsh-client-ui-settings":"*","@deepseek-ai/dsh-client-ui-slots":"*","react":"^18.2.0","react-dom":"^18.2.0"},"devDependencies":{"@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2","@types/node":"^24.0.0","@types/react":"~18.3.1","@types/react-dom":"~18.3.0","jsdom":"^29.0.0","lightningcss":"^1.30.0","react":"^18.2.0","react-dom":"^18.2.0","tsdown":"^0.22.2","typescript":"^6.0.0","vitest":"^4.1.0"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-layout","@deepseek-ai/dsh-client-ui-primitives","@deepseek-ai/dsh-client-ui-settings"],"platform":"web"}},"gitHead":"ae383566ef4fa626b1581f6c386be5f1d9d4fac1","_id":"@az7627/dsh-mobile-remote@0.1.1","bugs":{"url":"https://github.com/az7627/dsh-mobile-remote/issues"},"homepage":"https://github.com/az7627/dsh-mobile-remote#readme","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-5E5FTNJidNqHD4l6SR8GWKsCQzyIfQfzVdC/bwkLEELG+XdZs6hppW8S1/w9gXV9nuTEMTCbsjR8edxHwVyY6A==","shasum":"1b9ecf76102764725377908a0f8ea93e4406c083","tarball":"https://registry.npmjs.org/@az7627/dsh-mobile-remote/-/dsh-mobile-remote-0.1.1.tgz","fileCount":107,"unpackedSize":2377875,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFAzCbP2gmSVHAGhLviiN26KPuYf04gE/o44kQVVcpLuAiEA7fUB2jRUmRW/RaRen67+h4hbZUVXq/ZjlXWxzm9gcHY="}]},"_npmUser":{"name":"az7627","email":"a233d@outlook.com"},"directories":{},"maintainers":[{"name":"az7627","email":"a233d@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dsh-mobile-remote_0.1.1_1786967064545_0.7263172933082807"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-16T16:02:06.624Z","modified":"2026-08-17T11:44:24.878Z","0.1.0":"2026-08-16T16:02:07.009Z","0.1.1":"2026-08-17T11:44:24.716Z"},"license":"MIT","description":"Mobile responsive shell (single-column layout, drawer sidebar, overlay details) and WireGuard remote enhancements for the DeepSeek Harness web GUI","maintainers":[{"name":"az7627","email":"a233d@outlook.com"}],"readme":"# @az7627/dsh-mobile-remote\n\nDeepSeek Harness Web GUI 的手机响应式适配与 WireGuard 远程增强插件（双面包，不改 Harness 源码、不改 npx 安装内容）。npm 包名带作用域（无作用域的 `dsh-mobile-remote` 已被他人占用）。\n\n## 功能\n\n- **手机布局（≤760px 视口）**：三栏外壳单栏化；侧边栏变为左滑抽屉（含遮罩与左上角菜单按钮）；details 面板变为全屏覆盖层；拖拽把手隐藏；iOS safe-area、输入框 16px 防缩放、触控目标 ≥36px。\n- **弹窗手机化**：真正的模态对话框（primitives Modal 与设置面板）在手机上全屏化，内容区独立滚动；普通弹层面板（菜单、上下文面板等）保留自己的盒子与背景，不受影响。\n- **弹层防越界**：菜单、列表、带背景阴影的面板等浮层若出屏，自动平移到屏幕内（先钳宽度、再横向平移）；触发器位置变化（如工具栏换行）时跟随重算；抽屉、详情面板等自带 transform 动画的表面不受干扰。已实测 320–430px 六档宽度下模型选择菜单始终完整在屏。\n- **预设标签精简**：窄屏下 Agent 预设按钮只显示图标 + `标准` / `极简` / `PTC` / `创造`（英文同理），去掉\"模式\"二字；桌面端保持全称。\n- **桌面零改动**：所有规则收窄在媒体查询内，桌面布局与列宽不受影响。\n- **目录选择页重建**：本插件把 Harness 的目录选择交互钉为 Web 目录页，并以自研界面取代内置 browse 对话框（宿主 browse 后端保留）。桌面端：大对话框 + 左侧快捷目录（主文件夹/下载/桌面/文档/图片/音乐/视频 + 底部\"此电脑\"/根目录）、**分栏（Miller columns）浏览**、四键工具栏（后退/前进/上一级/刷新）、面包屑路径栏（每级可点击，点击空白处可输入路径跳转）；手机端：**快捷目录落地页 → 单列列表 + 返回键**，全屏呈现。任何绑定方式下\"添加工作区\"都可用，且不再弹系统对话框。\n- **文件管理**：侧边栏\"设置\"上方新增\"文件管理\"入口——与选择器同一分栏视图；每打开一个目录追加一栏、放不下时底部横向滚动条自动定位到最新栏、**每栏独立滚动条且展开新栏时原栏滚动位置保持**；**右键菜单**（重命名、复制、粘贴、删除、下载、选择打开方式、复制文件地址、属性、新建、上传、刷新、在终端中打开），粘贴自动加 `-copy-2` 后缀防重名；按扩展名打开（文本预览/编辑保存、图片/视频/音频内联预览、PDF 新标签页、未知类型自定义打开方式），十六进制编辑（64KB 分窗、8MB 上限）、上传（8MB）、下载、删除（非空文件夹二次确认）；**文件夹属性显示递归统计的真实大小**；**隐藏文件以半透明显示**；手机端保留行内触控按钮。\n- **真 PTY 交互终端**：侧边栏\"终端\"按钮（位于文件管理上方）打开浏览器内终端——宿主 **node-pty**（Windows 走 ConPTY）会话 + 客户端 **xterm.js** 渲染：行编辑、ANSI 颜色、全屏 TUI 应用（more/vim/top 等）都能用；终端跟随视口 fit 并同步 PTY 尺寸；输出为有界环形缓冲（256KB），轮询 60ms；**空闲回收**：客户端停止轮询（页面关闭而未走关闭 RPC）10 分钟后自动杀掉会话，避免 PowerShell 进程泄漏。文件管理右键\"在终端中打开\"可在任意目录启动终端；Windows 默认 PowerShell（`-NoProfile`），其他平台 bash。\n- **手机设置页可用（回环补丁）**：rc.6 对非 loopback 浏览器把设置作用域钉为 `persistence:\"memory\"`——手机上的设置标签页（插件配置/通用/模型/欢迎）不发任何请求、整页空白。本插件在可信远程会话中把连接句柄的 `isLoopback` 置真，并对已消费旧值的设置消费者条目（settings-plugins / settings-general / settings-models / deliverables）做一次 fiber 重应用，让它们重新绑定到主机持久化传输（经下文的特权转发通道）。桌面（loopback）完全不受影响。\n- **远程增强**：断线重连状态条；通用设置里的\"远程访问状态\"行（绑定地址 / 信任来源 / 目录选择后端 / 插件版本，手机可自查）；PWA 增强（standalone manifest + PNG 图标 + apple-touch-icon）。\n- **非安全上下文修复**：手机经 `http://隧道IP`（非安全源）访问时浏览器不提供 `crypto.randomUUID`，导致所有 RPC（设置、目录列表、模型/插件/预设）报 `crypto.randomUUID is not a function`。插件启动时安装 UUIDv4 回退（基于 `crypto.getRandomValues`，任何源可用），手机上接口恢复正常。\n- **特权 API 解除 loopback 钉死**：rc.6 把设置/凭据/Agent 预设/模型发现等方法钉为仅本机可用（手机上 403 forbidden）。插件把同源特权调用转发到自己的 trusted-host 通道，宿主侧再以**回环请求**交给内置 apiProxy 分发（信任边界仍是 profile 里的 trustedHosts，即 WireGuard 隧道地址）。\n\n## 安装\n\n### 从 npm 安装（推荐）\n\n```powershell\ndsh plugin --profile web add @az7627/dsh-mobile-remote\n```\n\n重启 `npx @deepseek-ai/dsh web` 生效。\n\n- 更新：重新执行上面的 add（pnpm 会装最新版）\n- 卸载：`dsh plugin --profile web remove @az7627/dsh-mobile-remote`\n\n### 本地开发（link 安装）\n\n```powershell\ndsh plugin --profile web add C:\\path\\to\\dsh-mobile-remote\n```\n\n改完源码 `pnpm run build` 后重启 `npx @deepseek-ai/dsh web` 即生效，无需重新 add。\n\n## 手机（WireGuard）远程访问\n\n> **重要（rc.6 实测）**：rc.6 的 webserver 只接受 `127.0.0.1` / `0.0.0.0` 绑定，且 CLI 有意拒绝 `0.0.0.0`——**无法直接把服务绑到 10.66.66.1**。远程访问采用：本机绑定 + WireGuard 地址端口转发，目录选择由本插件钉为 Web 目录页（上面已说明）。\n\n1. profile（`~/.dsh/profiles/web/cordis.patch.yml`）的 `web-runtime` 配置需包含隧道地址的 `trustedHosts`（例如 `10.66.66.1` 与 `10.66.66.1:3080`），手机请求才能通过 /api 信任栅栏。\n2. 安装端口转发（一次，需管理员）：\n   ```powershell\n   netsh interface portproxy add v4tov4 listenaddress=10.66.66.1 listenport=3080 connectaddress=127.0.0.1 connectport=3080\n   ```\n3. 启动（本机绑定）并访问手机地址 `http://10.66.66.1:3080`。\n\n推荐的无人值守启动方式（`scripts/start-dsh-web.ps1`）：\n\n```powershell\npwsh -File scripts\\start-dsh-web.ps1 -InstallPortProxy   # 一次：安装端口转发（管理员）\npwsh -File scripts\\start-dsh-web.ps1                     # 启动（检测接口/端口占用/转发状态）\npwsh -File scripts\\start-dsh-web.ps1 -RegisterStartup    # 可选：注册登录自启计划任务\n```\n\n## 目标版本\n\n按 DeepSeek Harness **0.1.0-rc.6** 的 Web 外壳 DOM 契约实现（三栏 inline grid、`data-sidebar-collapsed`/`data-details-collapsed` 状态属性、`ctx.layout` 面板契约、`shell.overlay`/`settings.general.item` 槽位）。核心升级后需重新验证并随版本跟进。\n\n## 开发\n\n```powershell\npnpm install\npnpm run typecheck\npnpm test\npnpm run build\n# 一次性测试实例（必须！与真实 ~/.dsh 完全隔离，避免污染真实会话日志）：\npwsh -File scripts\\start-test-dsh.ps1            # 启动 http://127.0.0.1:3097\npwsh -File scripts\\start-test-dsh.ps1 -Remove    # 清空隔离测试目录\n# 实测（针对上面的隔离实例）：\nnode scripts/verify-mobile.mjs\nnode scripts/verify-file-manager.mjs http://127.0.0.1:3097\nnode scripts/verify-terminal.mjs http://127.0.0.1:3097\nnode scripts/verify-settings-loopback.mjs http://127.0.0.1:3097   # 手机权威仿真（10.66.66.1 映射回环）\nnode scripts/verify-usage-remote.mjs http://127.0.0.1:3097        # token-usage /usage 信任栅栏\n```\n\n> ⚠️ 不要用共享 `~/.dsh` 的实例跑验证脚本：验证浏览器打开会话会触发加载修复，向真实会话日志写入 closers，与运行中实例的写入冲突会造成日志 seq gap。\n\n## License\n\nMIT\n","readmeFilename":"README.md","homepage":"https://github.com/az7627/dsh-mobile-remote#readme","repository":{"type":"git","url":"git+https://github.com/az7627/dsh-mobile-remote.git"},"bugs":{"url":"https://github.com/az7627/dsh-mobile-remote/issues"}}