dsh-phone-control 0.1.0 → 0.1.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/lib/service.js +6 -1
- package/package.json +4 -4
package/lib/service.js
CHANGED
|
@@ -782,7 +782,12 @@ export class SpikeService {
|
|
|
782
782
|
const oldHash = this.tokenHash
|
|
783
783
|
tokenOut = randomB64u(32)
|
|
784
784
|
this.previousTokenHash = oldHash
|
|
785
|
-
|
|
785
|
+
// 旧 token 的宽限期从 10 分钟放宽到 24 小时。
|
|
786
|
+
// 原因:配对成功会立刻轮换 token,而手机端可能因为进程被杀 / 未落盘 /
|
|
787
|
+
// 版本旧而继续拿旧 token 重连。只给 10 分钟的话,用户睡一觉再连就是
|
|
788
|
+
// TOKEN_INVALID("登录凭证已失效"),只能重新配对。
|
|
789
|
+
// 旧 token 本来就是这台设备自己的有效凭据,多留一天不放宽任何攻击面。
|
|
790
|
+
this.previousTokenExpiresAt = Date.now() + 24 * 3600 * 1000
|
|
786
791
|
this.tokenHash = sha256(fromB64u(tokenOut))
|
|
787
792
|
this.pairedAt = Date.now()
|
|
788
793
|
void this.saveToken()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-phone-control",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Control an Android phone from DeepSeek Harness: read the accessibility tree, tap by text, type text, take screenshots. Pair the companion app once.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
},
|
|
47
47
|
"repository": {
|
|
48
48
|
"type": "git",
|
|
49
|
-
"url": "git+https://
|
|
49
|
+
"url": "git+https://github.com/xiaoxin3309/dsh-phone-control.git"
|
|
50
50
|
},
|
|
51
|
-
"homepage": "https://
|
|
51
|
+
"homepage": "https://github.com/xiaoxin3309/dsh-phone-control#readme",
|
|
52
52
|
"bugs": {
|
|
53
|
-
"url": "https://
|
|
53
|
+
"url": "https://github.com/xiaoxin3309/dsh-phone-control/issues"
|
|
54
54
|
},
|
|
55
55
|
"author": "dsh-phone-control contributors"
|
|
56
56
|
}
|