@goodandready/dsh-clinebot 0.3.20 → 0.3.21
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 +5 -0
- package/lib/account-pool.js +12 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,11 @@ All notable changes to `@goodandready/dsh-clinebot` will be documented in this f
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.3.21] - 2026-09-23
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Account Failover Persistence & Cache Invalidation (#61)**: Fixed `rotateToNextAccount` returning `rotated: true` when settings persistence (`settingsApi.replace` or `settings.mutate`) fails. It now returns `{ rotated: false, activeAccount: active, reason: 'failed_to_persist' }` on failure, and defers `clearUsageCache()` and `clearProbeCache()` until settings are confirmed written. This prevents the provider from staying on the previous account while its quota and health telemetry caches are wiped.
|
|
12
|
+
|
|
8
13
|
## [0.3.20] - 2026-09-23
|
|
9
14
|
|
|
10
15
|
### Fixed
|
package/lib/account-pool.js
CHANGED
|
@@ -117,6 +117,17 @@ export async function rotateToNextAccount(ctx, cfg, reason = 'rate_limit', setti
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
if (!updated) {
|
|
121
|
+
return {
|
|
122
|
+
rotated: false,
|
|
123
|
+
previousAccount: active,
|
|
124
|
+
activeAccount: active,
|
|
125
|
+
reason: 'failed_to_persist',
|
|
126
|
+
message: 'Failed to persist rotated activeAccount to settings',
|
|
127
|
+
updatedSettings: false,
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
120
131
|
// Reset cached quota and host probes so new account immediately revalidates
|
|
121
132
|
clearUsageCache()
|
|
122
133
|
clearProbeCache()
|
|
@@ -126,6 +137,6 @@ export async function rotateToNextAccount(ctx, cfg, reason = 'rate_limit', setti
|
|
|
126
137
|
previousAccount: active,
|
|
127
138
|
activeAccount: nextAcc.apiKeyEnv,
|
|
128
139
|
reason,
|
|
129
|
-
updatedSettings:
|
|
140
|
+
updatedSettings: true,
|
|
130
141
|
}
|
|
131
142
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodandready/dsh-clinebot",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.21",
|
|
4
4
|
"description": "DeepSeek Harness companion for ClineBot / ClinePass: dynamic subscription models sync, quota exhaustion warnings, session metrics, dedicated settings page, live usage limits, and /cline slash-command.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|