@goodandready/dsh-clinebot 0.5.12 → 0.5.13
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 +6 -0
- package/lib/index.js +21 -1
- package/lib/routes/accounts.js +1 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ 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.5.13] - 2026-10-02
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Native Volatile Account Switch Catalog & Plan Reset (Issue #168)**: In `loader/volatile-update`, actively detect when `activeAccount` changes via native Cosmokit volatile settings, resetting `dynamicModels = []`, `planSyncedAt = 0`, and clearing usage and probe caches (`clearUsageCache()`, `clearProbeCache()`) to guarantee stale catalogs from previous accounts are never marked verified.
|
|
12
|
+
- **Account Deletion Rollback Automatic Mode Preservation (Issue #187)**: Ensure surgical rollback of account deletion in `lib/routes/accounts.js` unconditionally preserves live `fresh.activeAccount`, preventing unintended restoration of deleted accounts or overriding concurrent selections of automatic mode (`activeAccount: ""`).
|
|
13
|
+
|
|
8
14
|
## [0.5.12] - 2026-10-02
|
|
9
15
|
|
|
10
16
|
### Fixed
|
package/lib/index.js
CHANGED
|
@@ -4,6 +4,8 @@ import {
|
|
|
4
4
|
sessionStats,
|
|
5
5
|
recordSessionRequest,
|
|
6
6
|
resetSessionStats,
|
|
7
|
+
clearUsageCache,
|
|
8
|
+
clearProbeCache,
|
|
7
9
|
} from './cline-client.js'
|
|
8
10
|
import {
|
|
9
11
|
rotateToNextAccount,
|
|
@@ -104,9 +106,27 @@ export function apply(ctx, config) {
|
|
|
104
106
|
}
|
|
105
107
|
}
|
|
106
108
|
|
|
109
|
+
let lastActiveAccount = publicConfig(live()).activeAccount
|
|
107
110
|
if (typeof ctx?.on === 'function') {
|
|
108
111
|
ctx.on('loader/volatile-update', () => {
|
|
109
|
-
|
|
112
|
+
const liveCfg = live()
|
|
113
|
+
const currentActive = publicConfig(liveCfg).activeAccount
|
|
114
|
+
if (currentActive !== lastActiveAccount) {
|
|
115
|
+
lastActiveAccount = currentActive
|
|
116
|
+
try {
|
|
117
|
+
if (currentConfig && typeof currentConfig === 'object') {
|
|
118
|
+
currentConfig.dynamicModels = []
|
|
119
|
+
currentConfig.planSyncedAt = 0
|
|
120
|
+
}
|
|
121
|
+
} catch {
|
|
122
|
+
/* ignore read-only or frozen */
|
|
123
|
+
}
|
|
124
|
+
overrides.dynamicModels = []
|
|
125
|
+
overrides.planSyncedAt = 0
|
|
126
|
+
clearUsageCache()
|
|
127
|
+
clearProbeCache()
|
|
128
|
+
}
|
|
129
|
+
syncStatsStorage(liveCfg)
|
|
110
130
|
})
|
|
111
131
|
}
|
|
112
132
|
|
package/lib/routes/accounts.js
CHANGED
|
@@ -210,13 +210,10 @@ export function registerAccountsRoutes(ctx, { live, getSettingsApi, syncProvider
|
|
|
210
210
|
if (!freshAccounts.some((a) => a && a.apiKeyEnv === targetEnv)) {
|
|
211
211
|
freshAccounts.push(accountToDelete)
|
|
212
212
|
}
|
|
213
|
-
const shouldRestoreActive = (curr.activeAccount === targetEnv && (!fresh.activeAccount || fresh.activeAccount === targetEnv))
|
|
214
|
-
? targetEnv
|
|
215
|
-
: fresh.activeAccount
|
|
216
213
|
const restoredConfig = plainConfig(Config({
|
|
217
214
|
...fresh,
|
|
218
215
|
accounts: freshAccounts,
|
|
219
|
-
activeAccount:
|
|
216
|
+
activeAccount: fresh.activeAccount,
|
|
220
217
|
}))
|
|
221
218
|
await settingsApi.replace(restoredConfig)
|
|
222
219
|
await syncProviderState(restoredConfig)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodandready/dsh-clinebot",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.13",
|
|
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",
|