@askalf/dario 4.8.14 → 4.8.15

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.
@@ -116,10 +116,19 @@ export function loadTemplate(_options) {
116
116
  if (age < LIVE_TTL_MS) {
117
117
  return cached;
118
118
  }
119
- // Stale cache still better than bundled if bundled is older.
120
- // We return the stale live cache and let the background refresh
121
- // update it for next startup.
122
- return cached;
119
+ // Stale cache: prefer whichever of the live cache and the bundled
120
+ // snapshot was captured more recently do NOT blindly keep the cache.
121
+ // A frozen live cache must not shadow a newer bundled template, which is
122
+ // exactly what happens in a no-CC deployment (e.g. the Hetzner container):
123
+ // the async refresh can never run there, so the cache stays pinned at its
124
+ // last capture while shipped releases move the bundle ahead. Without this
125
+ // comparison, every bundled-template update is silently ignored until the
126
+ // cache file is removed by hand. A fresh live capture (age < TTL) still
127
+ // wins above; a stale cache only wins if it is still newer than the bundle.
128
+ const bundled = loadBundledTemplate(_options);
129
+ const cachedAt = new Date(cached._captured).getTime();
130
+ const bundledAt = new Date(bundled._captured).getTime();
131
+ return Number.isFinite(bundledAt) && bundledAt > cachedAt ? bundled : cached;
123
132
  }
124
133
  return loadBundledTemplate(_options);
125
134
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askalf/dario",
3
- "version": "4.8.14",
3
+ "version": "4.8.15",
4
4
  "description": "Use your Claude Pro/Max subscription in any tool — Cursor, Cline, Aider, the Agent SDK, your scripts — at subscription pricing, not per-token API bills. One local Anthropic + OpenAI-compatible endpoint.",
5
5
  "type": "module",
6
6
  "bin": {