@yemi33/minions 0.1.732 → 0.1.733

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,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.733 (2026-04-09)
4
+
5
+ ### Fixes
6
+ - merge localStorage pins to server on migration, always sync cache
7
+
3
8
  ## 0.1.732 (2026-04-09)
4
9
 
5
10
  ### Fixes
@@ -29,11 +29,23 @@ function togglePin(key) {
29
29
  }
30
30
  function _syncPinsFromServer() {
31
31
  fetch('/api/kb-pins').then(function(r) { return r.json(); }).then(function(d) {
32
- if (Array.isArray(d.pins) && d.pins.length > 0) {
33
- _pinsCache = d.pins;
34
- // Clear legacy localStorage
32
+ var serverPins = Array.isArray(d.pins) ? d.pins : [];
33
+ // Migrate: merge localStorage pins into server if not already there
34
+ var localPins = [];
35
+ try { localPins = JSON.parse(localStorage.getItem('minions-pinned-items') || '[]'); } catch {}
36
+ if (localPins.length > 0) {
37
+ var merged = serverPins.slice();
38
+ var changed = false;
39
+ for (var i = 0; i < localPins.length; i++) {
40
+ if (merged.indexOf(localPins[i]) < 0) { merged.unshift(localPins[i]); changed = true; }
41
+ }
42
+ if (changed) {
43
+ fetch('/api/kb-pins', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ pins: merged }) }).catch(function() {});
44
+ serverPins = merged;
45
+ }
35
46
  localStorage.removeItem('minions-pinned-items');
36
47
  }
48
+ _pinsCache = serverPins;
37
49
  }).catch(function() {});
38
50
  }
39
51
  function inboxPinKey(name) { return 'notes/inbox/' + name; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.732",
3
+ "version": "0.1.733",
4
4
  "description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
5
5
  "bin": {
6
6
  "minions": "bin/minions.js"