easy-claude 1.0.2 → 1.0.3
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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# 更新记录
|
|
2
2
|
|
|
3
|
+
## 1.0.3
|
|
4
|
+
|
|
5
|
+
- Refresh usage every five minutes; keep one-minute online confirmation when a reset or availability alert is due.
|
|
6
|
+
- Keep usage valid between polls with a ten-minute stale-data threshold; errors and expired windows remain explicit.
|
|
7
|
+
- HTTP 429 pauses queries for 10 minutes, then up to 15 minutes; success restores normal polling. Manual and reminder queries obey the same cooldown.
|
|
8
|
+
- Keep the half-size AM/PM or Chinese day period beside the floating time, with the city below.
|
|
9
|
+
- Verify background quota refresh with isolated continuous-typing and marked-text checks; do not activate the official application.
|
|
10
|
+
|
|
3
11
|
## 1.0.2
|
|
4
12
|
|
|
5
13
|
- Refresh usage every minute. HTTP 429 pauses all refresh entry points for 2/4/8/15 minutes (capped); successful queries restore the normal interval.
|
package/README.md
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
A lightweight companion for Claude: read CLI account usage, show transparent usage rings and a world clock, and manage them from a native macOS menu bar panel. No model calls or changes to the official application.
|
|
6
6
|
|
|
7
|
-
## v1.0.
|
|
7
|
+
## v1.0.3 release notes
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
9
|
+
- Refresh usage every five minutes; keep one-minute online confirmation when a reset or availability alert is due.
|
|
10
|
+
- Keep usage valid between polls with a ten-minute stale-data threshold; errors and expired windows remain explicit.
|
|
11
|
+
- HTTP 429 pauses queries for 10 minutes, then up to 15 minutes; success restores normal polling. Manual and reminder queries obey the same cooldown.
|
|
12
|
+
- Keep the half-size AM/PM or Chinese day period beside the floating time, with the city below.
|
|
13
|
+
- Verify background quota refresh with isolated continuous-typing and marked-text checks; do not activate the official application.
|
|
14
14
|
|
|
15
|
-
[Release history](CHANGELOG.md) · [1.0.
|
|
15
|
+
[Release history](CHANGELOG.md) · [1.0.3 development and verification](https://github.com/UnionSchool/easy-claude/blob/main/docs/版本/1.0.3开发管理.md)
|
|
16
16
|
|
|
17
17
|
## Install and run
|
|
18
18
|
|
|
@@ -35,7 +35,7 @@ claude auth login
|
|
|
35
35
|
|
|
36
36
|
CLI and desktop login are separate. This tool cannot verify that their accounts match. Missing or stale data is never treated as full or zero usage. API key balances and current conversation context are outside its scope.
|
|
37
37
|
|
|
38
|
-
Usage refreshes every minute. HTTP 429 pauses requests for
|
|
38
|
+
Usage refreshes every five minutes; due resets and availability alerts are confirmed once per minute. HTTP 429 pauses requests for 10 minutes, then up to 15 minutes. Manual refresh and alerts respect the same cooldown. A successful query restores the five-minute interval; query failures never imply availability.
|
|
39
39
|
|
|
40
40
|
## Usage rings and recovery
|
|
41
41
|
|
package/README.zh-CN.md
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
|
|
7
7
|
需要 Node.js 22+ 与 Claude Code 订阅登录;不支持把 API Key 账单余额当作订阅额度。
|
|
8
8
|
|
|
9
|
-
## v1.0.
|
|
9
|
+
## v1.0.3 更新说明
|
|
10
10
|
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
11
|
+
- 正常额度每5分钟刷新;到重置时刻或提醒到点后,仍每分钟在线确认。
|
|
12
|
+
- 展示数据有效期为10分钟,避免正常刷新间隔内提前显示未知;查询错误和过期窗口仍明确标记。
|
|
13
|
+
- 遇到429先暂停10分钟,随后最长15分钟;成功后恢复正常频率,手动和提醒查询共用冷却。
|
|
14
|
+
- 浮窗保持时段在时间右侧、字号减半,城市在下方。
|
|
15
|
+
- 隔离测试验证后台额度刷新期间的连续输入及组字保持,不主动激活官方应用。
|
|
16
16
|
|
|
17
|
-
历史记录见[CHANGELOG](CHANGELOG.md),本版管理见[开发与验收](https://github.com/UnionSchool/easy-claude/blob/main/docs/版本/1.0.
|
|
17
|
+
历史记录见[CHANGELOG](CHANGELOG.md),本版管理见[开发与验收](https://github.com/UnionSchool/easy-claude/blob/main/docs/版本/1.0.3开发管理.md)。
|
|
18
18
|
|
|
19
19
|
## 安装与使用
|
|
20
20
|
|
|
@@ -31,7 +31,7 @@ easy-claude show
|
|
|
31
31
|
- macOS 14+;跟随 Claude 桌面应用窗口,前台显示,后台隐藏。默认左下角账户栏右侧,32×32,透明背景,无底板和阴影。
|
|
32
32
|
- 显示剩余百分比:大于 50% 为绿色、20%–50% 橙色、低于 20% 红色;未知或过期为灰色,不伪装满额。
|
|
33
33
|
- 按返回的真实额度自适应:只有周额度时显示单周环和周剩余数字,不显示5小时项;只有5小时则显示单5小时环,两项都有时双环同时显示:周额度为外侧粗实线环,5 小时额度为内侧细实线环(外环未使用部分为淡色虚线底轨),中心数字默认显示 5 小时剩余百分比(环内省略 %,菜单保留),可在菜单点击“5小时”或“周”切换并记住选择;两环独立配色和判断过期。右键查看“5小时 · 剩余百分比 · 重置时间”和“周 · 剩余百分比 · 重置时间”(重置使用电脑本地时区)、刷新、恢复位置或退出,双击刷新,拖动校准。
|
|
34
|
-
-
|
|
34
|
+
- 运行时每5分钟查询,冷却期间暂停请求;超过有效期或已到重置时间的数据标为过期;接口错误会立即标记未知。
|
|
35
35
|
- 不显示“7天”等底部文字,详情在悬停提示和菜单。状态栏显示产品图标和剩余额度或恢复倒计时。
|
|
36
36
|
- 基于窗口边界定位,不识别头像,不读取桌面聊天或截图;无法自动核对桌面账号与 CLI 账号一致。
|
|
37
37
|
|
|
@@ -115,7 +115,7 @@ IP地理库的城市与时区可能存在偏差或互相不一致;显示接口
|
|
|
115
115
|
|
|
116
116
|
登录配置保存当前Node/npm安装路径,常规原前缀npm更新可继续使用;删除或迁移Node/npm目录后,从新安装打开浮窗并关闭再开启此选项以更新路径。
|
|
117
117
|
|
|
118
|
-
12小时制时段按时钟所选时区计算;跟随IP时使用有效IP
|
|
118
|
+
12小时制时段按时钟所选时区计算;跟随IP时使用有效IP时区,获取失败沿用自定义时间。浮窗、城市菜单和辅助文本使用相同五时段,Claude时间在前、时段在右;Codex时段在时间上方。零点如“凌晨 00:12”、正午如“下午 12:12”;24小时制不增加时段文字,额度重置时刻继续使用系统格式。
|
|
119
119
|
|
|
120
120
|
## 状态栏与控制面板
|
|
121
121
|
|
|
@@ -133,6 +133,6 @@ IP地理库的城市与时区可能存在偏差或互相不一致;显示接口
|
|
|
133
133
|
|
|
134
134
|
收起面板中,网络出口文字下方至底部分隔线的空白由约48pt减至约24pt,不改变网络刷新频率或控件操作。
|
|
135
135
|
|
|
136
|
-
- 时间浮窗:12小时制显示“10:09 上午”,时间在前,时段在右且字号为数字的一半;城市在下方。英文为“10:09 AM”,24
|
|
136
|
+
- 时间浮窗:12小时制显示“10:09 上午”,时间在前,时段在右且字号为数字的一半;城市在下方。英文为“10:09 AM”,24小时制不显示时段。Claude适用;Codex时段放在时间上方,保持各自浮窗边界。
|
|
137
137
|
|
|
138
|
-
额度每60
|
|
138
|
+
额度每300秒刷新;重置/提醒到点后每60秒确认。服务返回429后先等待10分钟、后最长15分钟,手动刷新及提醒共用限制,成功后恢复300秒。IP仍每5分钟刷新,与额度频率独立。
|
package/native/Overlay.swift
CHANGED
|
@@ -149,8 +149,8 @@ struct UsageRefreshSchedule {
|
|
|
149
149
|
func allows(_ now: Double) -> Bool { now >= nextAllowedAt }
|
|
150
150
|
mutating func receive(rateLimited: Bool, succeeded: Bool, now: Double) {
|
|
151
151
|
if rateLimited {
|
|
152
|
-
rateLimitCount = min(rateLimitCount + 1,
|
|
153
|
-
nextAllowedAt = now + min(900,
|
|
152
|
+
rateLimitCount = min(rateLimitCount + 1, 2)
|
|
153
|
+
nextAllowedAt = now + min(900, usageRefreshInterval * pow(2, Double(rateLimitCount)))
|
|
154
154
|
} else if succeeded {
|
|
155
155
|
rateLimitCount = 0
|
|
156
156
|
nextAllowedAt = 0
|
|
@@ -521,7 +521,8 @@ enum LoginStartup {
|
|
|
521
521
|
let controlProduct = "Claude"
|
|
522
522
|
let controlLoginName = "Claude Code"
|
|
523
523
|
let controlLoginCommand = "claude auth login"
|
|
524
|
-
let
|
|
524
|
+
let usageRefreshInterval: TimeInterval = 300
|
|
525
|
+
let controlStaleSeconds: Double = usageRefreshInterval * 2
|
|
525
526
|
func controlQuotas(_ windows: [UsageWindow]) -> [ControlQuota] { return [windows.first { $0.id == "five_hour:primary" }.map { ControlQuota(window: $0, weekly: false) }, windows.first { $0.id == "seven_day:primary" }.map { ControlQuota(window: $0, weekly: true) }].compactMap { $0 } }
|
|
526
527
|
|
|
527
528
|
struct ControlQuota: Identifiable {
|
|
@@ -962,7 +963,10 @@ final class Overlay: NSObject, NSApplicationDelegate, NSMenuDelegate, UNUserNoti
|
|
|
962
963
|
@objc func tick() {
|
|
963
964
|
checkVersionIfNeeded()
|
|
964
965
|
if Date().timeIntervalSince(ipLastAttempt) >= 300 { refreshIP() }
|
|
965
|
-
|
|
966
|
+
let now = Date()
|
|
967
|
+
let resetDue = snapshot?.windows.contains { $0.resetsAt.map { $0 <= now.timeIntervalSince1970 } ?? false } ?? false
|
|
968
|
+
let reminderDue = reminder.map { $0.due <= now.timeIntervalSince1970 } ?? false
|
|
969
|
+
if now.timeIntervalSince(lastAttempt) >= (resetDue || reminderDue ? 60 : usageRefreshInterval) { refresh() }
|
|
966
970
|
refreshControls()
|
|
967
971
|
guard let rect = targetWindow() else { hide(); lastRect = nil; return }
|
|
968
972
|
lastRect = rect
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<key>CFBundleIdentifier</key><string>com.unionschool.easy-claude.overlay</string>
|
|
6
6
|
<key>CFBundleName</key><string>Easy Claude Overlay</string>
|
|
7
7
|
<key>CFBundlePackageType</key><string>APPL</string>
|
|
8
|
-
<key>CFBundleShortVersionString</key><string>1.0.
|
|
8
|
+
<key>CFBundleShortVersionString</key><string>1.0.3</string>
|
|
9
9
|
<key>LSMinimumSystemVersion</key><string>14.0</string>
|
|
10
10
|
<key>CFBundleLocalizations</key><array><string>en</string><string>zh-Hans</string><string>zh-Hant</string></array>
|
|
11
11
|
<key>LSUIElement</key><true/>
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "easy-claude",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Claude Code quota rings and transparent world clock for Claude desktop",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -27,7 +27,9 @@
|
|
|
27
27
|
"test:lock": "python3 scripts/test-native-lock.py",
|
|
28
28
|
"test:reminder": "python3 scripts/test-native-reminder.py",
|
|
29
29
|
"test:controls": "python3 scripts/test-controls.py",
|
|
30
|
-
"test:refresh": "python3 scripts/test-refresh.py"
|
|
30
|
+
"test:refresh": "python3 scripts/test-refresh.py",
|
|
31
|
+
"test:focus": "python3 scripts/test-focus.py",
|
|
32
|
+
"test:polling": "python3 scripts/test-polling.py"
|
|
31
33
|
},
|
|
32
34
|
"license": "MIT",
|
|
33
35
|
"author": "UnionSchool",
|