@goodandready/dsh-clinebot 0.5.4 → 0.5.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.
@@ -274,10 +274,10 @@ export async function autoDiscoverPlanModels(ctx, { live, getSettingsApi, syncPr
274
274
  const hasObsolete = existingDynamic.some((m) => Boolean(OBSOLETE_MODEL_ID_MAP[m?.id]))
275
275
  if (hasObsolete && settingsApi?.replace) {
276
276
  const migrated = existingDynamic.map(migrateModelEntry)
277
- const next = Config({
277
+ const next = plainConfig(Config({
278
278
  ...plainConfig(live()),
279
279
  dynamicModels: migrated,
280
- })
280
+ }))
281
281
  await settingsApi.replace(next)
282
282
  await syncProviderState(next)
283
283
  }
@@ -286,11 +286,11 @@ export async function autoDiscoverPlanModels(ctx, { live, getSettingsApi, syncPr
286
286
  const fromDisk = await loadModelsDiskCache(cacheFile)
287
287
  if (Array.isArray(fromDisk) && fromDisk.length && settingsApi?.replace) {
288
288
  const migratedDisk = fromDisk.map(migrateModelEntry)
289
- const next = Config({
289
+ const next = plainConfig(Config({
290
290
  ...plainConfig(live()),
291
291
  dynamicModels: migratedDisk,
292
292
  planSyncedAt: fromDisk.planSyncedAt || Date.now(),
293
- })
293
+ }))
294
294
  await settingsApi.replace(next)
295
295
  await syncProviderState(next)
296
296
  }
@@ -311,11 +311,11 @@ export async function autoDiscoverPlanModels(ctx, { live, getSettingsApi, syncPr
311
311
 
312
312
  if (hasNew && settingsApi?.replace) {
313
313
  const now = Date.now()
314
- const next = Config({
314
+ const next = plainConfig(Config({
315
315
  ...plainConfig(live()),
316
316
  dynamicModels: usageData.dynamicModels,
317
317
  planSyncedAt: now,
318
- })
318
+ }))
319
319
  await settingsApi.replace(next)
320
320
  await syncProviderState(next)
321
321
  if (cacheFile) {
@@ -78,7 +78,7 @@ export function registerAccountsRoutes(ctx, { live, getSettingsApi, syncProvider
78
78
  existingAccounts.push(accountEntry)
79
79
  }
80
80
 
81
- const next = Config({ ...curr, accounts: existingAccounts })
81
+ const next = plainConfig(Config({ ...curr, accounts: existingAccounts }))
82
82
  await settingsApi.replace(next)
83
83
  await syncProviderState(next)
84
84
 
@@ -144,7 +144,7 @@ export function registerAccountsRoutes(ctx, { live, getSettingsApi, syncProvider
144
144
  activeAccount = ''
145
145
  }
146
146
 
147
- const next = Config({ ...curr, accounts: nextAccounts, activeAccount })
147
+ const next = plainConfig(Config({ ...curr, accounts: nextAccounts, activeAccount }))
148
148
  await settingsApi.replace(next)
149
149
  await syncProviderState(next)
150
150
 
@@ -193,7 +193,7 @@ export function registerAccountsRoutes(ctx, { live, getSettingsApi, syncProvider
193
193
  return writeJson(res, 503, { ok: false, error: 'Settings service unavailable or read-only' })
194
194
  }
195
195
 
196
- const next = Config({ ...plainConfig(live()), activeAccount: account })
196
+ const next = plainConfig(Config({ ...plainConfig(live()), activeAccount: account }))
197
197
  await settingsApi.replace(next)
198
198
  await syncProviderState(next)
199
199
  writeJson(res, 200, { ok: true, activeAccount: account })
@@ -40,11 +40,11 @@ export function registerModelsRoutes(ctx, { live, getSettingsApi, syncProviderSt
40
40
  }
41
41
 
42
42
  const now = Date.now()
43
- const next = Config({
43
+ const next = plainConfig(Config({
44
44
  ...plainConfig(live()),
45
45
  dynamicModels,
46
46
  planSyncedAt: now,
47
- })
47
+ }))
48
48
  await settingsApi.replace(next)
49
49
  await syncProviderState(next)
50
50
  const cacheFile = resolvePathWithHome(pub.modelsCachePath)
@@ -92,7 +92,7 @@ export function registerModelsRoutes(ctx, { live, getSettingsApi, syncProviderSt
92
92
  patch.disabledModels = allModels.map((m) => m.id).filter((id) => !enabledSet.has(id))
93
93
  }
94
94
  if (body.defaultModel) patch.defaultModel = body.defaultModel
95
- const next = Config({ ...plainConfig(live()), ...patch })
95
+ const next = plainConfig(Config({ ...plainConfig(live()), ...patch }))
96
96
  await settingsApi.replace(next)
97
97
  await syncProviderState(next)
98
98
  writeJson(res, 200, { ok: true, disabledModels: next.disabledModels, enabledModels: publicConfig(next).enabledModels })
@@ -164,10 +164,10 @@ export function registerModelsRoutes(ctx, { live, getSettingsApi, syncProviderSt
164
164
  return writeJson(res, 400, { ok: false, error: 'Missing modelId, mode, or overrides array' })
165
165
  }
166
166
 
167
- const next = Config({
167
+ const next = plainConfig(Config({
168
168
  ...plainConfig(live()),
169
169
  modelContextOverrides: currentOverrides,
170
- })
170
+ }))
171
171
  await settingsApi.replace(next)
172
172
  await syncProviderState(next)
173
173
 
@@ -93,7 +93,7 @@ export function registerSettingsRoutes(ctx, { live, getSettingsApi, syncProvider
93
93
  const base = plainConfig(live()) || {}
94
94
  delete base.enabledModels
95
95
  const merged = { ...base, ...rawPayload }
96
- const parsed = Config(merged)
96
+ const parsed = plainConfig(Config(merged))
97
97
  await settingsApi.replace(parsed)
98
98
  await syncProviderState(parsed)
99
99
  writeJson(res, 200, { ok: true, config: publicConfig(live()) })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-clinebot",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
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",