@mrrisega/dsh-remote 0.7.5-beta.1 → 0.7.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrrisega/dsh-remote",
3
- "version": "0.7.5-beta.1",
3
+ "version": "0.7.5",
4
4
  "description": "手机远程控制 DeepSeek Harness · Remote control DeepSeek Harness (dsh web) from any phone browser — 100% 全功能 App 级体验:发消息、看工具执行、审批权限、改设置、管凭据,含特权操作,免内网穿透。一条命令安装 npx @mrrisega/dsh-remote。Mobile remote control for DSH, self-host or SaaS, no server needed on LAN.",
5
5
  "keywords": [
6
6
  "deepseek-harness",
@@ -265,11 +265,6 @@ window.__ModuleLoader__.load({
265
265
  ".dru-msg-err{color:var(--dru-danger)}",
266
266
  ".dru-msg-warn{color:var(--dru-warn)}",
267
267
  ".dru-hint{font-size:12px;color:var(--dru-fg-muted);line-height:1.6}",
268
- // 📄 购买入口的《会员服务购买协议》小字链接(购买/升级按钮旁边,不抢眼;只用既有设计令牌)
269
- ".dru-legal{font-size:12px;color:var(--dru-fg-muted);line-height:1.6;margin-top:8px}",
270
- ".dru-legal a{color:var(--dru-accent);text-decoration:underline;text-underline-offset:2px;border-radius:4px}",
271
- ".dru-legal a:hover{color:var(--dru-accent-fg)}",
272
- ".dru-legal a:focus-visible{outline:2px solid var(--dru-focus);outline-offset:2px}",
273
268
  // ── 重启 DeepSeek harness(首次安装/更新后置顶提醒 + 底部常驻按钮) ──
274
269
  ".dru-restart-alert{display:flex;gap:10px;align-items:flex-start;background:var(--dru-warn-soft);border:1px solid var(--dru-warn-border-2);border-radius:10px;padding:12px 14px;margin-bottom:12px}",
275
270
  ".dru-restart-alert-icon{font-size:18px;line-height:1.2}",
@@ -2804,42 +2799,9 @@ window.__ModuleLoader__.load({
2804
2799
  .catch(function () { return null; }); // 静默:接口/网络/字段异常一律不弹
2805
2800
  }
2806
2801
 
2807
- // ══ 📄 会员服务购买协议(购买/升级入口的《会员服务购买协议》链接)════════════════
2808
- //
2809
- // 业主要求:购买入口必须能看到协议链接(客户端 0.7.5-beta.1)。正式协议由企业端提供:
2810
- // · 优先用 node 半 `GET /dsh-remote/purchase-agreement` 下发的 URL ——
2811
- // 它读企业端 public-config 的 `agreement_url`(新字段,没有就忽略);
2812
- // · 兜底常量(企业端还没上线/读不到时也永远可点)。
2813
- //
2814
- // 纪律:
2815
- // ① **只允许 http(s) 绝对地址**:这个值最终进 `<a href>`,`javascript:`/`data:`/协议相对
2816
- // 一律丢弃回兜底(服务端字段被改坏也不能变成 XSS 面)。
2817
- // ② **失败不影响购买**:取不到就用兜底;链接打不开也不影响旁边的「升级/续费」按钮 ——
2818
- // 这里没有任何会阻塞购买流程的 await/分支。
2819
- // ③ 30 分钟模块级缓存:协议地址不会频繁变,面板反复打开不重复打本机 node 半。
2820
- var PURCHASE_AGREEMENT_FALLBACK = "https://n.risegao.cn:13443/relay-api/api/purchase-agreement";
2821
- var PURCHASE_AGREEMENT_TTL_MS = 30 * 60 * 1000;
2822
- var purchaseAgreementCache = { at: 0, url: "" };
2823
- /** 只认 http(s) 绝对地址;其余(含空串/相对路径/协议相对)一律返回空串。 */
2824
- function purchaseAgreementUrlSafe(raw) {
2825
- var s = String(raw == null ? "" : raw).trim();
2826
- return /^https?:\/\/[^\s]+$/i.test(s) ? s : "";
2827
- }
2828
- /** 取协议 URL(永不 reject;失败/非法 → 兜底常量)。 */
2829
- function loadPurchaseAgreementUrl() {
2830
- var now = Date.now();
2831
- if (purchaseAgreementCache.url && now - purchaseAgreementCache.at < PURCHASE_AGREEMENT_TTL_MS) {
2832
- return Promise.resolve(purchaseAgreementCache.url);
2833
- }
2834
- return api("/dsh-remote/purchase-agreement").then(function (b) {
2835
- var url = purchaseAgreementUrlSafe(b && b.url) || PURCHASE_AGREEMENT_FALLBACK;
2836
- purchaseAgreementCache = { at: Date.now(), url: url };
2837
- return url;
2838
- }).catch(function () {
2839
- // 失败不缓存:下次进面板还能拿到服务端后来配好的地址;这次先用兜底。
2840
- return PURCHASE_AGREEMENT_FALLBACK;
2841
- });
2842
- }
2802
+ // 【2026-10-24 移除】业主决定:面板不再展示购买协议(协议只在**手机端支付扫码前**展示)。
2803
+ // 相关常量 / 渲染函数 / 样式已一并删除;node 半 `GET /dsh-remote/purchase-agreement` 代理保留
2804
+ // (手机端 / 其它端后续可复用,见 lib/index.js 同名段注释)。
2843
2805
 
2844
2806
  // ── 面板主体(渲染于设置页 settings.section 栏目内) ─────────────────────
2845
2807
  // 匿名装机统计的「面板打开」只上报一次/每页(node 半还会每进程去重)。
@@ -3296,27 +3258,6 @@ window.__ModuleLoader__.load({
3296
3258
  }).finally(function () { setBusy(""); });
3297
3259
  };
3298
3260
 
3299
- /**
3300
- * 📄 购买入口的《会员服务购买协议》小字链接(新标签打开;不抢眼、不阻塞购买)。
3301
- *
3302
- * 用**原生 `<a href target=_blank rel=noopener noreferrer>`** 而不是 button+window.open:
3303
- * · 语义正确(用户可复制链接/中键打开),且与 Electron 的 window.open 拦截走同一条路径;
3304
- * · 纯 HTML 无 JS,链接打不开/被拦截也不会抛错、更不会影响旁边的「升级 / 续费」按钮。
3305
- * href 永远有值:node 半取不到时用兜底常量(见 loadPurchaseAgreementUrl)。
3306
- */
3307
- function renderAgreementLink() {
3308
- return h("div", { className: "dru-legal" },
3309
- "购买即表示同意",
3310
- h("a", {
3311
- className: "dru-legal-a",
3312
- href: agreementUrl,
3313
- target: "_blank",
3314
- rel: "noopener noreferrer",
3315
- title: "《会员服务购买协议》(在新标签打开)"
3316
- }, "《会员服务购买协议》")
3317
- );
3318
- }
3319
-
3320
3261
  // 停留主视图(home)时:轮询连接状态(15s,审计降频) + 每秒刷新倒计时;隐藏暂停、回前台立即刷新
3321
3262
  useEffect(function () {
3322
3263
  if (view !== "home") return;
@@ -4083,8 +4024,6 @@ window.__ModuleLoader__.load({
4083
4024
  onClick: function () { setView("invite"); loadInvite(); }
4084
4025
  }, inviteLabel)
4085
4026
  : null),
4086
- // 📄 有购买(升级)这条路时,同一块里给协议链接(拉新-only 态不摆购买协议,避免误导)
4087
- up ? renderAgreementLink() : null,
4088
4027
  // 交换说明只在拉新可用时出现(关闭态或纯升级态不该再讲拉新)
4089
4028
  inviteOk
4090
4029
  ? h("div", { className: "dru-dual-note" },
@@ -4264,8 +4203,6 @@ window.__ModuleLoader__.load({
4264
4203
  h("span", { className: "dru-disclose-caret", "aria-hidden": "true" }, moreOpen ? "▲" : "▼")
4265
4204
  )
4266
4205
  ),
4267
- // 📄 购买入口的协议链接(紧贴主行动按钮下方;小字、不抢眼,业主要求购买入口必须可见)
4268
- renderAgreementLink(),
4269
4206
  // 🎁 邀请引导气泡:紧跟按钮行(不遮挡按钮)。点 ✕ 只做"不再提示",不再改变入口位置。
4270
4207
  renderInviteTip(),
4271
4208
  // 🧰 「更多」折叠体:带新用户 / 修改密码 / 加入交流群 + 修改密码表单
@@ -5209,19 +5146,6 @@ window.__ModuleLoader__.load({
5209
5146
  return function () { alive = false; };
5210
5147
  }, [loggedIn, mode, phoneKey]);
5211
5148
 
5212
- // ── 📄 会员服务购买协议 URL:hook 同样追加在**最后一个既有 hook 之后** ─────────────
5213
- // 初值直接用兜底常量 → 购买入口第一帧就有可点链接(不闪、不等待)。
5214
- // 登录后才去问 node 半(企业端 public-config 可能配了正式地址);失败静默保持兜底。
5215
- var agrArr = useState(PURCHASE_AGREEMENT_FALLBACK); var agreementUrl = agrArr[0]; var setAgreementUrl = agrArr[1];
5216
- useEffect(function () {
5217
- if (!loggedIn) return undefined;
5218
- var alive = true;
5219
- loadPurchaseAgreementUrl().then(function (u) {
5220
- if (alive && u && u !== agreementUrl) setAgreementUrl(u);
5221
- });
5222
- return function () { alive = false; };
5223
- }, [loggedIn, phoneKey]);
5224
-
5225
5149
  /** 取消本次自动重启(按事件持久化:同一 pending 事件不再自动重启)。 */
5226
5150
  var cancelAutoRestart = function () {
5227
5151
  markAutoRestartCancelled(restartInfo.at || 0);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-remote-web",
3
- "version": "0.7.5-beta.1",
3
+ "version": "0.7.5",
4
4
  "description": "公网远程控制 DeepSeek Harness(dsh web):安装即得专属加密地址,人在外面也能用手机访问电脑上的 dsh——无需同一局域网/WiFi、无需公网 IP 与内网穿透,全程加密;手机端 100% 还原电脑体验(对话/工具/审批/设置)。技术用户可选自建服务,流量走自己的服务器。Remote control DeepSeek Harness (dsh web) from anywhere over the public internet — install, get an encrypted URL, use it from your phone on any network (dual-half cordis plugin: Settings panel + same-origin /dsh-remote routes). (2026-09 由 dsh-remote-ui 更名 / renamed from dsh-remote-ui; dsh-remote 的 dsh web 插件半,不是纯 UI/皮肤插件)",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",