@marktrue/dsh-mobile-remote 3.3.0 → 3.3.1-alpha.1
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/CHANGELOG.md +21 -32
- package/docs/03-api.md +1 -1
- package/lib/git-read-bundled-provider.js +19 -3
- package/lib/index.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,46 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## v3.3.
|
|
3
|
+
## v3.3.1-alpha.1(build 64,issues #150/#152/#160/#161)— 多连接与子代理树候选
|
|
4
4
|
|
|
5
|
-
> 插件 `3.3.
|
|
5
|
+
> 插件 `3.3.1-alpha.1` / App `3.3.1+64` / 载体 `3.3.1-alpha.1-app`。
|
|
6
6
|
|
|
7
7
|
### 新功能
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
- 日志级别与过滤(#136)。
|
|
14
|
-
- 会话文件浏览单文件下载(#138)。
|
|
9
|
+
- **#152 多连接档案 + 单活动宿主**:profileId 主键、hostId 连接后绑定;staged switch;Android Keystore 原生凭据库 + MethodChannel;FloatingBubbleService 同源迁移;缓存按 `(profileId,hostId)` 隔离;设置页「连接」自包含入口;单活动、多宿主通知延后。
|
|
10
|
+
- **#160 子代理树批准稿**:无 tree rail/连接线;0/14/28dp 缩进 + L4/L5;56dp 展开井(大 chevron + 数量);展开/正文/中断独立命中;模型 + 本地化 effort 第三行;保留语义 tap 修复。
|
|
11
|
+
- **#150 密集任务卡贴底**:最后一条实际可见消息去掉多余 12dp 尾距,保留 6dp 设计底距;无 50 行分批/隐藏内容。
|
|
12
|
+
- **#161 Git stale upstream fail-soft**:单个本地分支 upstream 被删不再让整个分支列表 `git-command-failed`。
|
|
15
13
|
|
|
16
|
-
###
|
|
14
|
+
### 未包含/后续 alpha
|
|
17
15
|
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
16
|
+
- #151 提问卡缺失 debug 取证
|
|
17
|
+
- #155 设置页 5 Tab
|
|
18
|
+
- #159 Git tags
|
|
19
|
+
- #158 上下文抽屉
|
|
20
|
+
- #157 图片预览
|
|
21
|
+
- #153 插件三 Tab
|
|
22
|
+
- #154 日志记录/显示拆分
|
|
23
|
+
- #106 DSH 设置只读
|
|
21
24
|
|
|
22
|
-
###
|
|
25
|
+
### 已接受/已知未验证
|
|
23
26
|
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
- #
|
|
27
|
+
- #152 的 Keystore 升级迁移、后台悬浮球/原生 SSE、系统通知撤销、真实慢响应切档未真机验证。
|
|
28
|
+
- #160 的触控命中/TalkBack 未真机验证;截图来自 widget render。
|
|
29
|
+
- #150 未做真机像素验收;几何测试走真实 SliverList 路径。
|
|
30
|
+
- `origin/upstream/*` 已清理;本地 upstream 分支统一跟踪 `github/upstream/*`。
|
|
31
|
+
- #113 等 3.3.0 收尾项不重复。
|
|
29
32
|
|
|
30
|
-
## v3.3.0-rc.1(build 62,issues #105/#107/#117/#125/#136/#138/#156)— 3.3.0 发布候选
|
|
31
|
-
|
|
32
|
-
> 插件 `3.3.0-rc.1` / App `3.3.0+62` / 载体 `3.3.0-rc.1-app`。
|
|
33
|
-
|
|
34
|
-
### 相对 alpha.1 的修复
|
|
35
|
-
|
|
36
|
-
- **#156 / alpha 验收 D1**:`/plugin-inventory` 的 `host.restartSupported` 始终下发 bool;App 在 `restartRequired` 时只在宿主支持时渲染「重启电脑端」,不支持时明确提示在电脑端重启。契约测试覆盖 unsupported=false / systemd=true,Widget 覆盖渲染/隐藏。
|
|
37
|
-
- alpha 真机验收:A(代理面板)、C(四项功能)、E(320/深色/1.5x)通过;D(旧宿主/旧插件降级)用户实机通过;B3 重启按钮在 #156 修复后由 rc 补验。
|
|
38
|
-
- 功能范围与 alpha.1 相同:#105/105a/105b、#107、#117、#125、#136、#138,详见下一条 alpha.1 条目。
|
|
39
|
-
|
|
40
|
-
### 已知未验证 / 风险
|
|
41
|
-
|
|
42
|
-
- B3 重启按钮真实 `restart-required` 路径需 rc 真机补验;真实 systemd/前台 respawn/容器逐形态未测。
|
|
43
|
-
- #150 脱底空白、#151 手机提问卡偶发缺失仍独立跟踪;#137 上游 PR #98 仍 OPEN,等待 merge。
|
|
44
33
|
|
|
45
34
|
## v3.3.0-alpha.1(build 61,issues #105/#107/#117/#125/#136/#138)— 3.3.0 功能候选
|
|
46
35
|
|
package/docs/03-api.md
CHANGED
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
| `turn/end` | `{ turn: number, reason: object }` |
|
|
312
312
|
| 其他可见事件 | 保留 `type`、`seq`,未知类型使用通用卡保留顺序;不提供详情指针,也不允许通过 3.5b 读取原始载荷 |
|
|
313
313
|
|
|
314
|
-
**控制帧**:连接建立后立即 `data: {"type":"hello","serverTime":...,"capabilities":{"eventTimeline":{...},"turnOutline":{...}}}`;每 25s `: ping`
|
|
314
|
+
**控制帧**:连接建立后立即 `data: {"type":"hello","serverTime":...,"hostId":"<宿主稳定身份>","instanceId":"<本次运行实例>","capabilities":{"eventTimeline":{...},"turnOutline":{...}}}`;每 25s `: ping` 注释行。`hostId`/`instanceId` 为 issue #152 新增,旧 App 忽略;旧插件不下发时 App 用 bootstrap 已绑定值,不因此断连(`instanceId` 不作为连接档案身份)。bootstrap 同样返回这两项能力;`turnOutline` 与 bootstrap 同判据、同形状(见 §6.18),客户端应按能力协商而不是按版本号猜测。
|
|
315
315
|
**错误语义**:鉴权失败在连接建立阶段以 `401` HTTP 状态返回(EventSource 会触发 error 事件,客户端转登录态)。
|
|
316
316
|
|
|
317
317
|
**容量与满龄连接驱逐(启发式,issue #131)**:`connections.size >= maxConnections` 时不再直接 `503 too-many-connections`。宿主按「**stalled 优先** → 同 `clientId`(若请求头 `x-mobile-client-id` 带)→ 同来源 IP → 全局最旧」排序,只驱逐 **1 条年龄 ≥ `sseEvictMinAgeMs`(默认 60000ms)** 的满龄候选;没有达标候选才返回 `503`(body 带 `mobileOnline` / `maxConnections` / `oldestAgeMs` / `maxIdleMs` / `evictMinAgeMs`,并带 `Retry-After: 5`)。被驱逐的客户端按既有 SSE 重连逻辑自动回来并用 `/history` 补拉;年龄阈值用于保护多设备与重连风暴,绝不通过调大 `maxConnections` 掩盖泄漏。`GET /m/api/diagnostics` 的 `runtime.metrics` 增量输出 `mobileOldestAgeMs` / `mobileOldestIdleMs` / `mobileStalled` / `mobileEvicted` / `mobileRejected`,`checks.sseConnections` 输出「连接数 / 上限 · 最旧 · 最久未写 · 满龄候选 · stalled · 安全年龄 · 累计驱逐/拒绝」。**边界(Reviewer P3)**:`age >= sseEvictMinAgeMs` 只是可驱逐门槛,不是"活跃/陈旧"判据(活跃设备也可能连接很久);`stalled`(写失败/背压/50s 无成功写)只用于排序与日志。二者合起来仍是启发式,宿主不宣称已精确区分活跃/陈旧连接;能保证的只有「60s 内不驱逐、stalled 优先、每次最多 1 条、无候选才 503」。
|
|
@@ -448,14 +448,30 @@ export function createBundledGitReadProvider(ctx) {
|
|
|
448
448
|
if (ref.endsWith("/HEAD")) continue;
|
|
449
449
|
const local = ref.startsWith("refs/heads/");
|
|
450
450
|
let ahead = 0, behind = 0;
|
|
451
|
+
// issue #161:upstream 指向已删除的 remote ref 时,for-each-ref 仍会
|
|
452
|
+
// 返回 upstream:short,但 rev-list 会失败。必须按分支 fail-soft:
|
|
453
|
+
// 该行 tracking=null、ahead/behind=0,**不能让整个 branches() 抛错**。
|
|
454
|
+
let tracking = null;
|
|
451
455
|
if (local && upstream) {
|
|
452
|
-
|
|
453
|
-
|
|
456
|
+
try {
|
|
457
|
+
const counts = (await run(root, ["rev-list", "--left-right", "--count", `${ref}...${upstream}`]))
|
|
458
|
+
.trim().split(/\s+/).map(Number);
|
|
459
|
+
if (counts.length !== 2 || counts.some((value) => !Number.isSafeInteger(value) || value < 0)) {
|
|
460
|
+
throw new Error("invalid rev-list counts");
|
|
461
|
+
}
|
|
462
|
+
[ahead, behind] = counts;
|
|
463
|
+
tracking = `refs/remotes/${upstream}`;
|
|
464
|
+
} catch {
|
|
465
|
+
// upstream 缺失/非法/命令失败:保留分支,追踪信息降级为未知。
|
|
466
|
+
ahead = 0;
|
|
467
|
+
behind = 0;
|
|
468
|
+
tracking = null;
|
|
469
|
+
}
|
|
454
470
|
}
|
|
455
471
|
branches.push({
|
|
456
472
|
name: ref, displayName: ref.replace(/^refs\/(?:heads|remotes)\//, ""), oid,
|
|
457
473
|
kind: local ? "local" : "remote", current: local && head === "*",
|
|
458
|
-
tracking
|
|
474
|
+
tracking, ahead, behind,
|
|
459
475
|
});
|
|
460
476
|
}
|
|
461
477
|
return branches;
|
package/lib/index.js
CHANGED
|
@@ -7876,7 +7876,7 @@ export function apply(ctx, config, runtime = {}) {
|
|
|
7876
7876
|
return;
|
|
7877
7877
|
}
|
|
7878
7878
|
if (!safeWrite(res, ": connected\n\n")) return;
|
|
7879
|
-
if (!safeWrite(res, `data: ${JSON.stringify({ type: "hello", serverTime: now, capabilities: { eventTimeline: EVENT_TIMELINE_CAPABILITIES, turnOutline: turnOutlineCapabilityOf(ctx), fileRange: FILE_RANGE_CAPABILITIES, files: FILES_CAPABILITIES, turnTail: turnTailCapabilityOf(ctx), toolCards: toolCardsCapabilityOf(), hold: { version: 1, onlineMs: Math.max(0, Number(config.pendingTimeoutMs ?? DEFAULT_PENDING_TIMEOUT_MS) || 0), offlineMs: Math.max(0, Number(config.offlineHoldMs ?? 300_000) || 0) } } })}\n\n`)) return;
|
|
7879
|
+
if (!safeWrite(res, `data: ${JSON.stringify({ type: "hello", serverTime: now, hostId: hostIdentity, instanceId: pluginInstanceId, capabilities: { eventTimeline: EVENT_TIMELINE_CAPABILITIES, turnOutline: turnOutlineCapabilityOf(ctx), fileRange: FILE_RANGE_CAPABILITIES, files: FILES_CAPABILITIES, turnTail: turnTailCapabilityOf(ctx), toolCards: toolCardsCapabilityOf(), hold: { version: 1, onlineMs: Math.max(0, Number(config.pendingTimeoutMs ?? DEFAULT_PENDING_TIMEOUT_MS) || 0), offlineMs: Math.max(0, Number(config.offlineHoldMs ?? 300_000) || 0) } } })}\n\n`)) return;
|
|
7880
7880
|
connections.add(res);
|
|
7881
7881
|
ctx.logger.info(`mobile-remote: SSE open id=${meta.id} age=0s idle=0s remote=${meta.clientIp || "-"} app=${meta.appVersion || "-"} reason=open`);
|
|
7882
7882
|
// 补发断线期间挂起的问询/审批(与 PC 端 GUI 连接时的 pending 回放一致;超 TTL 的僵尸帧先清掉)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marktrue/dsh-mobile-remote",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.1-alpha.1",
|
|
4
4
|
"description": "DSH Mobile:把 DeepSeek Harness 变成随身控制台——手机远程发消息派活、看进度、收通知、审批决策、管理会话;配套 Flutter App(当前 Android 端,iOS 未开发)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"qrcode"
|
|
53
53
|
],
|
|
54
54
|
"optionalDependencies": {
|
|
55
|
-
"@marktrue/dsh-mobile-remote-app": "npm:@marktrue/dsh-mobile-remote@3.3.
|
|
55
|
+
"@marktrue/dsh-mobile-remote-app": "npm:@marktrue/dsh-mobile-remote@3.3.1-alpha.1-app"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@deepseek-ai/dsh-credentials": ">=0.1.0-rc.6 <=0.2.2 || >=0.2.0-0 <0.2.0 || >=0.2.1-0 <0.2.1 || >=0.2.2-0 <0.2.2",
|