dsh-adb 1.0.0 → 1.2.0
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/README.md +6 -3
- package/README.zh-CN.md +7 -4
- package/client.js +559 -137
- package/lib/index.d.ts +2 -0
- package/lib/index.js +8 -2
- package/lib/parsers/sysinfo.d.ts +18 -0
- package/lib/parsers/sysinfo.js +56 -0
- package/lib/report-store.d.ts +18 -0
- package/lib/report-store.js +55 -0
- package/lib/report.d.ts +103 -0
- package/lib/report.js +192 -0
- package/lib/rpc.d.ts +2 -7
- package/lib/rpc.js +114 -27
- package/lib/skill.d.ts +9 -0
- package/lib/skill.js +40 -0
- package/lib/tools/device-report.d.ts +10 -0
- package/lib/tools/device-report.js +52 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -14,13 +14,13 @@ dsh plugin --profile web add dsh-adb
|
|
|
14
14
|
|
|
15
15
|
Or install directly from GitHub: `dsh plugin --profile web add github:SamXiaBing/dsh-adb`
|
|
16
16
|
|
|
17
|
-
## Web device panel (v1.
|
|
17
|
+
## Web device panel (v1.1.0)
|
|
18
18
|
|
|
19
|
-
A "设备" tab in the conversation view ring (next to chat / trajectory / automation): device list with status, package-
|
|
19
|
+
A "设备" tab in the conversation view ring (next to chat / trajectory / automation): device list with status, package autocomplete (fuzzy search), live streaming logcat window (level/keyword/package/pid filters, pause/clear/auto-scroll), device info card, process list, performance snapshot, and a **one-click health report** (设备体检: device identity, top-RSS processes, crash buffer, W/E/F logcat window, storage — persisted under `reportDir`, sendable to the conversation for diagnosis). The report turns raw evidence into signal before it reaches the model: crash-buffer entries are classified into **real crashes (with stack chains) vs. MediaTek boot markers**, repetitive logcat is **aggregated by tag** ("AOSP-MdnsDiscoveryManag ×3264" instead of 3k identical lines), and a compact **health summary** (verdict + issues) is attached — so the agent reasons from conclusions, not 17k raw lines. Plus harness synergy: **send any logcat/snapshot/report to the conversation** (the agent analyzes it), a live strip of the agent's adb operations, and a registered **crash-analysis skill** (`dsh-adb-crash-analysis`) for automation pipelines. Data flows over the package RPC channel; install into a web profile and restart the GUI (see `scripts/restart-web.ps1` for a one-click restart).
|
|
20
20
|
|
|
21
21
|
## Ecosystem
|
|
22
22
|
|
|
23
|
-
- ✅ [npm](https://www.npmjs.com/package/dsh-adb) — `dsh-adb` published (latest: 1.
|
|
23
|
+
- ✅ [npm](https://www.npmjs.com/package/dsh-adb) — `dsh-adb` published (latest: 1.1.0)
|
|
24
24
|
- ✅ [awesome-deepseek-harness#87](https://github.com/0xsline/awesome-deepseek-harness/pull/87) — **merged**
|
|
25
25
|
- ✅ [awesome-dsh-plugin#85](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/pull/85) — **merged**
|
|
26
26
|
- ✅ [awesome-DSH-plugin#29](https://github.com/Alex-Yanggg/awesome-DSH-plugin/pull/29) — **merged**
|
|
@@ -39,6 +39,7 @@ Topics: `dsh-plugin` `dsh` `adb` `android` `automotive` `bench`
|
|
|
39
39
|
| `adb_perf_snapshot` | Structured `dumpsys meminfo / gfxinfo / battery` snapshots (PSS, frame percentiles, jank rate, battery) |
|
|
40
40
|
| `adb_perf_baseline` | Perf regression: save a snapshot as a baseline (label/tags), compare current state and get a numeric diff (PSS, janky %, percentiles), list/delete baselines (stored locally under `baselineDir`) |
|
|
41
41
|
| `adb_crash_report` | One-call crash scene: parsed logcat crash buffer + dropbox excerpt + process state + memory summary |
|
|
42
|
+
| `adb_device_report` | One-click health report: device identity + top-RSS processes + crash buffer (real crashes w/ stacks vs. boot markers) + W/E/F logcat aggregated by tag + storage + health verdict; each section degrades independently; persisted under `reportDir` |
|
|
42
43
|
|
|
43
44
|
Errors are structured `AdbError` with stable codes: `ADB_NOT_FOUND`, `ADB_UNAVAILABLE`, `DEVICE_NOT_FOUND`, `NO_DEVICES`, `CONNECT_FAILED`, `INSTALL_FAILED`, `ADB_EXIT_<code>`, etc.
|
|
44
45
|
|
|
@@ -61,6 +62,7 @@ Set the `config` block in `cordis.patch.yml` (or a profile patch):
|
|
|
61
62
|
| `defaultSerial` | Default target device serial | none |
|
|
62
63
|
| `timeoutMs` | Per-command timeout | 30000 |
|
|
63
64
|
| `baselineDir` | Directory for `adb_perf_baseline` storage | `~/.dsh/storages/dsh-adb` |
|
|
65
|
+
| `reportDir` | Directory for `adb_device_report` storage | `<baselineDir>/reports` |
|
|
64
66
|
|
|
65
67
|
## Development
|
|
66
68
|
|
|
@@ -83,6 +85,7 @@ npm pack --dry-run # verify publish contents (lib/ + cordis.patch.yml)
|
|
|
83
85
|
- [docs/REQUIREMENTS.md](docs/REQUIREMENTS.md) / [docs/REQUIREMENTS.en.md](docs/REQUIREMENTS.en.md) — purpose / scope / non-goals / acceptance criteria
|
|
84
86
|
- [docs/TESTING.md](docs/TESTING.md) / [docs/TESTING.en.md](docs/TESTING.en.md) — testing philosophy, three test layers, E2E steps, regression checklist
|
|
85
87
|
- [docs/DEVELOPMENT-LOG.md](docs/DEVELOPMENT-LOG.md) / [docs/DEVELOPMENT-LOG.en.md](docs/DEVELOPMENT-LOG.en.md) — timeline, fixed-bug lessons, environment & ecosystem notes
|
|
88
|
+
- [docs/ROADMAP.md](docs/ROADMAP.md) — harness×adb synergy feature roadmap (diagnosis report, crash attribution, screenshot vision, bench automation tests, wait primitives, approvals, multi-device compare, scheduled monitoring, rollback ledger)
|
|
86
89
|
- [PLAN.md](PLAN.md) / [PLAN.en.md](PLAN.en.md) — milestones & backlog
|
|
87
90
|
|
|
88
91
|
## License
|
package/README.zh-CN.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
[English](README.md) | 简体中文
|
|
6
6
|
|
|
7
|
-
让 DSH agent 直接操作 Android 设备 / 车机台架:设备发现、结构化 logcat、apk 安装、文件 pull/push
|
|
7
|
+
让 DSH agent 直接操作 Android 设备 / 车机台架:设备发现、结构化 logcat、apk 安装、文件 pull/push、性能快照、一键体检。面向实车与台架联调场景,业务内通用(不限 Unity、不限具体车机协议)。
|
|
8
8
|
|
|
9
9
|
## 安装
|
|
10
10
|
|
|
@@ -14,13 +14,13 @@ dsh plugin --profile web add dsh-adb
|
|
|
14
14
|
|
|
15
15
|
或从 GitHub 直装:`dsh plugin --profile web add github:SamXiaBing/dsh-adb`
|
|
16
16
|
|
|
17
|
-
## Web 设备面板(v1.
|
|
17
|
+
## Web 设备面板(v1.2.0)
|
|
18
18
|
|
|
19
|
-
会话视图页签「设备」(与 chat
|
|
19
|
+
会话视图页签「设备」(与 chat/轨迹/任务管理并列):设备列表/状态、包名下拉自动补全、实时 logcat 窗口(级别/关键字/包名/pid 过滤、暂停/清空/自动滚动)、设备信息卡、进程列表、性能快照、**一键体检**(设备信息 + Top RSS 进程 + 崩溃缓冲 + W/E/F 日志 + 存储用量,落盘到 `reportDir`,可一键发送到对话诊断)。体检报告先做**证据→信号**提炼再交给 agent:崩溃按签名分类(真实崩溃+堆栈链 / MediaTek 启动标记 / 其他)、W/E/F 按 tag 聚合(计数+样本行)、插件自产健康摘要(verdict + issues)——agent 从结论出发而非从 17k 行原始日志出发。harness 协同:logcat/快照/体检报告**一键发送到对话**、面板顶部实时显示 agent 的 adb 操作、注册 **crash-analysis 技能**(`dsh-adb-crash-analysis`)供自动化流水线使用。数据走 Package RPC;需装入 web profile 并重启 GUI 生效(一键重启见 `scripts/restart-web.ps1`)。
|
|
20
20
|
|
|
21
21
|
## 生态收录
|
|
22
22
|
|
|
23
|
-
- ✅ [npm](https://www.npmjs.com/package/dsh-adb) — `dsh-adb` 已发布(latest: 1.
|
|
23
|
+
- ✅ [npm](https://www.npmjs.com/package/dsh-adb) — `dsh-adb` 已发布(latest: 1.1.0)
|
|
24
24
|
- ✅ [awesome-deepseek-harness#87](https://github.com/0xsline/awesome-deepseek-harness/pull/87) — **已合并**
|
|
25
25
|
- ✅ [awesome-dsh-plugin#85](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/pull/85) — **已合并**
|
|
26
26
|
- ✅ [awesome-DSH-plugin#29](https://github.com/Alex-Yanggg/awesome-DSH-plugin/pull/29) — **已合并**
|
|
@@ -39,6 +39,7 @@ Topics:`dsh-plugin` `dsh` `adb` `android` `automotive` `bench`
|
|
|
39
39
|
| `adb_perf_snapshot` | `dumpsys meminfo / gfxinfo / battery` 结构化快照(PSS/帧率百分位/卡顿率/电量) |
|
|
40
40
|
| `adb_perf_baseline` | 性能回归:快照存基线(label/tags)、与当前状态数值对比(PSS/卡顿率/百分位)、list/delete(本地存储,`baselineDir`) |
|
|
41
41
|
| `adb_crash_report` | 崩溃现场一键采集:crash buffer 解析 + dropbox 摘录 + 进程状态 + 内存摘要 |
|
|
42
|
+
| `adb_device_report` | 一键体检:设备信息 + Top RSS 进程 + 崩溃缓冲(真实崩溃带堆栈/启动标记分类)+ W/E/F 日志按 tag 聚合 + 存储用量 + 健康结论;每节独立降级;落盘到 `reportDir` |
|
|
42
43
|
|
|
43
44
|
错误码:`ADB_NOT_FOUND`、`ADB_UNAVAILABLE`、`DEVICE_NOT_FOUND`、`NO_DEVICES`、`CONNECT_FAILED`、`INSTALL_FAILED`、`ADB_EXIT_<code>` 等,均为结构化 `AdbError`。
|
|
44
45
|
|
|
@@ -61,6 +62,7 @@ Topics:`dsh-plugin` `dsh` `adb` `android` `automotive` `bench`
|
|
|
61
62
|
| `defaultSerial` | 默认设备 serial | 无 |
|
|
62
63
|
| `timeoutMs` | 命令超时 | 30000 |
|
|
63
64
|
| `baselineDir` | `adb_perf_baseline` 基线存储目录 | `~/.dsh/storages/dsh-adb` |
|
|
65
|
+
| `reportDir` | `adb_device_report` 体检报告存储目录 | `<baselineDir>/reports` |
|
|
64
66
|
|
|
65
67
|
## 开发
|
|
66
68
|
|
|
@@ -85,6 +87,7 @@ npm pack --dry-run # 校验发布包内容(lib/ + cordis.patch.yml)
|
|
|
85
87
|
- [docs/REQUIREMENTS.md](docs/REQUIREMENTS.md) / [docs/REQUIREMENTS.en.md](docs/REQUIREMENTS.en.md) — 目的/范围/非目标/验收标准
|
|
86
88
|
- [docs/TESTING.md](docs/TESTING.md) / [docs/TESTING.en.md](docs/TESTING.en.md) — 测试哲学(提交即测)、三层测试方法、E2E 步骤、回归清单
|
|
87
89
|
- [docs/DEVELOPMENT-LOG.md](docs/DEVELOPMENT-LOG.md) / [docs/DEVELOPMENT-LOG.en.md](docs/DEVELOPMENT-LOG.en.md) — 进度时间线、4 个已修复 bug 教训、环境/生态经验
|
|
90
|
+
- [docs/ROADMAP.md](docs/ROADMAP.md) — harness×adb 协同功能路线图(诊断报告/崩溃归因/截图视觉/台架自动化测试/等待原语/审批/多设备对比/定时巡检/回滚台账)
|
|
88
91
|
- [PLAN.md](PLAN.md) / [PLAN.en.md](PLAN.en.md) — 里程碑与待办
|
|
89
92
|
|
|
90
93
|
## License
|