dsh-adb 0.1.3 → 0.1.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 xiabing7
3
+ Copyright (c) 2026 SamXiaBing
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -64,25 +64,19 @@ npm pack --dry-run # 校验发布包内容(lib/ + cordis.patch.yml)
64
64
 
65
65
  注意:本机若设了 `NODE_ENV=production`,npm 会跳过 devDependencies,安装时用 `npm install --include=dev`。
66
66
 
67
- ## 真机/台架冒烟(2026-08-14,SA_DIREWOLF_IVI 台架,Android 13)
67
+ ## 测试与验证
68
68
 
69
- headless profile 端到端验证(`dsh --profile bench "任务"`),**7 个工具全部实测通过**:
69
+ - 原则:**提交即测** —— 全部已提交功能均有实测覆盖(单元 + headless 端到端 + 车机台架/真机)。
70
+ - 验证设备:Android 13 车机台架 + Android 13 真机。
71
+ - 版本化变更与每版验证记录见 [CHANGELOG.md](CHANGELOG.md);测试方法与覆盖现状见 [docs/TESTING.md](docs/TESTING.md)。
70
72
 
71
- | 工具 | 实测结果 |
72
- | --- | --- |
73
- | `adb_devices` | ✅ 返回 `f20c9b04 device msmnile_gvmq_for_arm64` |
74
- | `adb_connect` / `adb_disconnect` | ✅ 不可达端点正确返回 CONNECT_FAILED;disconnect 正常 |
75
- | `adb_logcat`(前向) | level=E tail=5 返回真实错误日志 |
76
- | `adb_logcat`(后台采集) | job_output 读回 43065 行/7MB 流,job_kill 正常 |
77
- | `adb_install` | ✅ pull 真机 apk → `install -r` "Performing Streamed Install / Success" |
78
- | `adb_file` | ✅ ls / push / pull 往返字节一致 |
79
- | `adb_perf_snapshot` | ✅ meminfo(SystemUI PSS 131MB)+ gfxinfo(232 帧/60.78% 卡顿)解析正确;battery 空(台架无电池服务) |
80
-
81
- 配置覆盖(`adbPath`/`defaultSerial`)✅ · 错误码(`ADB_NOT_FOUND`/`CONNECT_FAILED`)✅
82
-
83
- > 冒烟发现并修复两个已发布 bug:
84
- > - **v0.1.0 → v0.1.1**:`ctx.tools.register` 未声明 `inject: ['tools']` 导致加载失败(Cordis Guard 拒绝未声明依赖)
85
- > - **v0.1.1 → v0.1.2**:后台 logcat 的 `readOutput` 返回 `{added,text}` 对象,违反 jobs 契约(须返回字符串)导致 `job_output` 报 `value.text must be a string`
73
+ ## 项目文档(供 AI 对话/协作者参考)
74
+
75
+ - [docs/AGENTS.md](docs/AGENTS.md) 进项目先读:定位、铁律、命令、环境事实、文档地图
76
+ - [docs/REQUIREMENTS.md](docs/REQUIREMENTS.md) 目的/范围/非目标/验收标准
77
+ - [docs/TESTING.md](docs/TESTING.md) 测试哲学(提交即测)、三层测试方法、E2E 步骤、回归清单
78
+ - [docs/DEVELOPMENT-LOG.md](docs/DEVELOPMENT-LOG.md) 进度时间线、4 个已修复 bug 教训、环境/生态经验
79
+ - [PLAN.md](PLAN.md) 里程碑与待办
86
80
 
87
81
  ## License
88
82
 
package/lib/tools/perf.js CHANGED
@@ -24,7 +24,11 @@ export function registerPerfTool(ctx, cfg) {
24
24
  const metrics = args.metrics ?? ['meminfo', 'gfxinfo', 'battery'];
25
25
  const result = { package: args.package, metrics: [...metrics] };
26
26
  for (const metric of metrics) {
27
- const output = await runAdb(ctx, cfg, ['shell', 'dumpsys', metric, args.package], {
27
+ // dumpsys battery is device-global and takes no package argument.
28
+ const argv = metric === 'battery'
29
+ ? ['shell', 'dumpsys', 'battery']
30
+ : ['shell', 'dumpsys', metric, args.package];
31
+ const output = await runAdb(ctx, cfg, argv, {
28
32
  signal: exec.signal,
29
33
  serial: args.serial,
30
34
  maxBytes: 4 * 1024 * 1024,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-adb",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "ADB device & bench operations for DeepSeek Harness: device discovery, structured logcat, apk install, file pull/push, performance snapshots",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -17,7 +17,7 @@
17
17
  "bench"
18
18
  ],
19
19
  "license": "MIT",
20
- "author": "xiabing7",
20
+ "author": "SamXiaBing",
21
21
  "dsh": {
22
22
  "bundle": {
23
23
  "patch": "./cordis.patch.yml"