diff --git a/PLAN.md b/PLAN.md
index 2a54193..2e97d41 100644
--- a/PLAN.md
+++ b/PLAN.md
@@ -5,6 +5,17 @@
---
+## 0.5.6 统计页面与 Chamber Go(分支 `flutter`)
+
+| 项 | 结果 |
+| --- | --- |
+| 统计 | 全部功能里新增【统计】:时间范围(今天 / 7 天 / 30 天 / 90 天 / 全部)、项目筛选(所有项目或某个检出)、会话 / 提示词 / 令牌 / 费用 / 活跃天数 / 连续天数、每日(超过 92 天按周)活动柱状图、令牌构成、效率指标、模型排行(按令牌 / 费用 / 步数)、按需加载的工具调用统计(调用次数、成功率、失败、中位耗时)。数据来自 `/api/experimental/session/stats`;时区取设备的 IANA 名称(Android 平台通道,桌面回退 UTC) |
+| 命名 | 客户端显示名改为 **Chamber Go**(Android 启动器、iOS、Linux 窗口、关于页),包名不变。配对兑换上报的 `clientLabel` / `deviceName`、登录标签与请求 user-agent(`chamber-go/<版本>`)一并改名 |
+| 名称来源 | 网页端「连接到此服务器」列表显示服务器保存的 client label:操作员建配对链接时填的名字优先;否则沿用同设备(dedupeKey)已有的名字;第一次配对且都没填时才用客户端自报的 `clientLabel` / `deviceName`。因此老设备改名后仍显示旧名,要在列表里重命名,或撤销后重新配对 |
+| 版本 | **0.5.6(code 506)** |
+
+---
+
## 0.5.5 项目选择与计划任务运行位置(分支 `flutter`)
| 项 | 结果 |
diff --git a/README.md b/README.md
index 0e48b2e..34aad49 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,12 @@
-# OpenChamber Native
+# Chamber Go
-A lightweight OpenChamber client for phones, written in **Flutter** (Dart).
+Chamber Go is a lightweight OpenChamber client for phones, written in
+**Flutter** (Dart).
Android first. This branch (`flutter`) is a framework evaluation: the same
feature set as the earlier Asuka/Go and MyGo attempts, reimplemented in
Flutter to compare mobile UI maturity.
-Status: 0.5.5 — servers (passwordless / password login, HTTP/HTTPS and
+Status: 0.5.6 — servers (passwordless / password login, HTTP/HTTPS and
SOCKS5/socks5h proxy, self-signed certificates and pinning, or a pairing link
over the OpenChamber private relay with end-to-end encryption; the pairing
link is pasted or scanned with the camera), session list with search and live
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index da1fd8a..dc09398 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -8,7 +8,7 @@
result.notImplemented()
}
}
+ // The statistics API buckets days by an IANA zone; Dart only knows the
+ // abbreviation, so the platform reports the real id.
+ MethodChannel(flutterEngine.dartExecutor.binaryMessenger, "openchamber/device")
+ .setMethodCallHandler { call, result ->
+ when (call.method) {
+ "ianaTimeZone" -> result.success(java.util.TimeZone.getDefault().id)
+ else -> result.notImplemented()
+ }
+ }
}
}
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index af74a5b..4de0daf 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -7,7 +7,7 @@
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleDisplayName
- Openchamber
+ Chamber Go
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
diff --git a/lib/api/client.dart b/lib/api/client.dart
index f0e0e5d..e716335 100644
--- a/lib/api/client.dart
+++ b/lib/api/client.dart
@@ -9,6 +9,7 @@ import 'dart:typed_data';
import '../version.dart';
import 'models.dart';
import 'scheduled_tasks.dart';
+import 'usage_stats.dart';
import 'shells.dart';
import 'terminal.dart';
import 'transport.dart';
@@ -21,6 +22,11 @@ class ApiError implements Exception {
String toString() => message.isEmpty ? 'HTTP $status' : message;
}
+/// What the server sees in request headers; the connect page's device name
+/// comes from the pairing label below, not from this.
+String _userAgent() =>
+ 'chamber-go/${appVersion.isEmpty ? '0.0' : appVersion}';
+
class Client {
final Uri base;
@@ -55,7 +61,7 @@ class Client {
required String pairingId,
required String secret,
required String installId,
- String clientLabel = 'OpenChamber Native',
+ String clientLabel = 'Chamber Go',
String clientKind = 'mobile',
String? deviceName,
}) async {
@@ -78,7 +84,7 @@ class Client {
}
Future