dsh-plugin-tether 0.1.10 → 0.1.12

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/index.js +24 -5
  3. package/package.json +7 -6
package/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  本文件记录面向用户的变化。每个版本的这一节会原样作为该版本 Release 的说明。
4
4
 
5
+ ## 0.1.12
6
+
7
+ ### 修复
8
+
9
+ - **Termux:`tether-host` 启动时打一段 `android context was not initialized` 的 panic 栈**([#5](https://github.com/zexadev/dsh-tether/issues/5))。iroh 默认解析器在 android 上经 JNI 读系统 DNS,Termux 没有 JVM;iroh 内部接住 panic 后回退 Google DNS,进程照常工作,但栈已经打出来了。现在 android 目标直接用等价的解析器,不再走 JNI。
10
+ - **侧栏底部「连接手机」按钮与 dsh-cost-meter 互挤,被压成只剩图标的竖条**([#7](https://github.com/zexadev/dsh-tether/issues/7))。两者共用 `sidebar.footer.action` 插槽,横排下互挤。现改为纵向堆叠、各占一行,展开态与折叠成图标条两种状态都与「设置」按钮几何一致。
11
+ - **手机每次打开 App,dsh web UI 都当作全新访问;配合 Prefab Anchored Standard 一类一进会话就写入历史的预设,每开一次多一条会话**([#7](https://github.com/zexadev/dsh-tether/issues/7))。手机侧本地代理端口此前每次连接随机,web UI 按源保存的「当前会话」等状态永远读不到。现在端口按主机派生固定,同一台电脑每次同源;不同电脑不同源,状态互不串。
12
+
13
+ ## 0.1.11
14
+
15
+ ### 新增
16
+
17
+ - **`tether-host` 新增 android-arm64 平台子包,支持在 Termux 里跑**([#5](https://github.com/zexadev/dsh-tether/issues/5))。sidecar 本身是与 tauri 无关的纯 CLI,交叉编译到 `aarch64-linux-android`(NDK,API 24)与其余四个平台走的是同一套打包流程。Termux 的 Node 把 `process.platform` 报成 `android`(不是 `linux`),`index.js` 现有的自动选包逻辑按这个字段筛,所以是新增一个平台子包而不是复用 linux-arm64。
18
+
19
+ ### 修复
20
+
21
+ - **iOS:配对必然 `timed out`,主机侧完全收不到配对请求**([#6](https://github.com/zexadev/dsh-tether/issues/6))。iOS 14 起,发往同网段私网 IP 的收发受内核层 Local Network Privacy 管控,且不区分是否经 NWFramework——iroh/quinn 用的原始 UDP socket 同样受限。此前 `Info.ios.plist` 只有 `NSAllowsLocalNetworking`(管 WebView 加载本机代理页面的 ATS 例外),没有 `NSLocalNetworkUsageDescription`,系统既不弹权限询问也不放行局域网收发。
22
+
23
+ 现补上这个键,系统会弹一次性授权询问。**本修复未在 iOS 真机验证**,由用户反馈发现;若升级后仍 timed out,麻烦在 issue 里确认安装后是否弹出过「本地网络」权限询问、以及设置里该权限是否开启。
24
+
5
25
  ## 0.1.10
6
26
 
7
27
  ### 修复
package/index.js CHANGED
@@ -347,6 +347,16 @@ function apply(ctx, config = {}) {
347
347
  */
348
348
  function injectNarrowScreenCss(html) {
349
349
  const css = `
350
+ /* 侧栏底部的 sidebar.footer.action 是横排 flex 行,官方设想里放并排的小动作。
351
+ 「连接手机」照抄「设置」的类,是占满一行的触发行;别的插件(dsh-cost-meter)
352
+ 又往同一行放 width:100% 的面板,横排下两者互挤:本按钮被压到只剩图标,
353
+ rail 态更被顶出 56px 的侧栏。改成纵向堆叠,各占一行;独占时与横排等价。
354
+ rail 态容器宽随内容,居中才与「设置」图标对齐。 */
355
+ [class*="footArea"] > [class*="footerActions"] {
356
+ flex-direction: column !important;
357
+ align-items: stretch !important;
358
+ }
359
+ [class*="collapsed"] [class*="footArea"] > [class*="footerActions"] { align-items: center !important; }
350
360
  @media (max-width: 640px) {
351
361
  /* hero 背后的装饰性发光椭圆比视口宽,会让整页能被横向拖动 */
352
362
  html, body { overflow-x: hidden; }
@@ -652,7 +662,13 @@ function injectNarrowScreenCss(html) {
652
662
  if (!slot || slot.querySelector('[data-dsh-tether="hosts-trigger"]')) return
653
663
  var settings = document.querySelector('[data-slot="settings.trigger"]')
654
664
  var reference = settings && settings.closest ? settings.closest('button') : null
655
- if (!reference) return
665
+ if (!reference || !reference.parentElement) return
666
+ // 「设置」是 triggerRow(定高的横排容器)套 trigger(flex:1 1 0%)两层。只抄
667
+ // 里层放进纵向堆叠的插槽,basis 0% 会变成高度,按钮塌成一行字;两层都抄,
668
+ // 几何才在宽态 / rail 态都与「设置」一致。
669
+ var row = document.createElement('div')
670
+ row.setAttribute('data-dsh-tether', 'hosts-row')
671
+ row.className = reference.parentElement.className
656
672
  var button = document.createElement('button')
657
673
  button.type = 'button'
658
674
  button.setAttribute('data-dsh-tether', 'hosts-trigger')
@@ -665,10 +681,13 @@ function injectNarrowScreenCss(html) {
665
681
  if (framed) window.parent.postMessage({ type: 'dsh-tether:open-hosts' }, '*')
666
682
  else showPairing()
667
683
  })
668
- slot.append(button)
669
- // 侧栏展开/收起时「设置」按钮会换类名(rail 与否),跟着同步
670
- new MutationObserver(function () { button.className = reference.className })
671
- .observe(reference, { attributes: true, attributeFilter: ['class'] })
684
+ row.append(button)
685
+ slot.append(row)
686
+ // 侧栏展开/收起时「设置」两层都会换类名(rail 与否),跟着同步
687
+ new MutationObserver(function () {
688
+ button.className = reference.className
689
+ row.className = reference.parentElement.className
690
+ }).observe(reference.parentElement, { attributes: true, attributeFilter: ['class'], subtree: true })
672
691
  }
673
692
  mountHostsTrigger()
674
693
  new MutationObserver(mountHostsTrigger).observe(document.documentElement, { childList: true, subtree: true })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-tether",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "Mobile client for the DeepSeek Harness — use the dsh on your dev machine from your Android or iOS phone, remotely across networks, peer-to-peer with no server in between (iroh)",
5
5
  "keywords": [
6
6
  "dsh",
@@ -50,10 +50,11 @@
50
50
  "@deepseek-ai/dsh-user-approval": { "optional": true }
51
51
  },
52
52
  "optionalDependencies": {
53
- "dsh-tether-host-darwin-arm64": "0.1.10",
54
- "dsh-tether-host-darwin-x64": "0.1.10",
55
- "dsh-tether-host-linux-arm64": "0.1.10",
56
- "dsh-tether-host-linux-x64": "0.1.10",
57
- "dsh-tether-host-win32-x64": "0.1.10"
53
+ "dsh-tether-host-android-arm64": "0.1.12",
54
+ "dsh-tether-host-darwin-arm64": "0.1.12",
55
+ "dsh-tether-host-darwin-x64": "0.1.12",
56
+ "dsh-tether-host-linux-arm64": "0.1.12",
57
+ "dsh-tether-host-linux-x64": "0.1.12",
58
+ "dsh-tether-host-win32-x64": "0.1.12"
58
59
  }
59
60
  }