@theokit/sdk 4.17.0 → 4.17.1

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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.17.1
4
+
5
+ ### Patch Changes
6
+
7
+ - fix(session): hydration REPLACES the cache from disk (source of truth) instead of skipping when non-empty — after an invalidation (compact/inject), an in-flight turn repopulating the cache with one message used to pin the parent to a 1-message context until restart (M51 review F4; race test added).
8
+
3
9
  ## 4.17.0
4
10
 
5
11
  ### Minor Changes
package/dist/cron.cjs CHANGED
@@ -5948,9 +5948,7 @@ async function hydrateSession(agentId, loc) {
5948
5948
  hydratedKeys.add(key);
5949
5949
  const persisted = await readSessionMessages(loc.store, agentId);
5950
5950
  if (persisted.length === 0) return;
5951
- if (!sessions.has(agentId) || sessions.get(agentId)?.length === 0) {
5952
- sessions.set(agentId, persisted);
5953
- }
5951
+ sessions.set(agentId, persisted);
5954
5952
  }
5955
5953
  async function flushSessionWrites() {
5956
5954
  while (pendingWrites.size > 0) {